From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 04868158086 for ; Thu, 16 Dec 2021 12:54:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9AF772BC00B; Thu, 16 Dec 2021 12:54:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BC9092BC00B for ; Thu, 16 Dec 2021 12:54:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 04C24343534 for ; Thu, 16 Dec 2021 12:54:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 510961BF for ; Thu, 16 Dec 2021 12:54:24 +0000 (UTC) From: "Ben Kohler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ben Kohler" Message-ID: <1639659175.1aef8a06d8be597d39ea0c2e0e63ad93f4a7d303.bkohler@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/unifi-video/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/unifi-video/unifi-video-3.10.13-r5.ebuild X-VCS-Directories: media-video/unifi-video/ X-VCS-Committer: bkohler X-VCS-Committer-Name: Ben Kohler X-VCS-Revision: 1aef8a06d8be597d39ea0c2e0e63ad93f4a7d303 X-VCS-Branch: master Date: Thu, 16 Dec 2021 12:54:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5b8b7da4-98a2-4e17-b2b7-c369090ec46c X-Archives-Hash: 96840ccb50d9996289f3ea4773e583cb commit: 1aef8a06d8be597d39ea0c2e0e63ad93f4a7d303 Author: Ben Kohler gentoo org> AuthorDate: Thu Dec 16 12:52:02 2021 +0000 Commit: Ben Kohler gentoo org> CommitDate: Thu Dec 16 12:52:55 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1aef8a06 media-video/unifi-video: revbump for log4j "fix" Upstream community forums suggested this fix Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Ben Kohler gentoo.org> .../unifi-video/unifi-video-3.10.13-r5.ebuild | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/media-video/unifi-video/unifi-video-3.10.13-r5.ebuild b/media-video/unifi-video/unifi-video-3.10.13-r5.ebuild new file mode 100644 index 000000000000..09f2a37096a3 --- /dev/null +++ b/media-video/unifi-video/unifi-video-3.10.13-r5.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd + +MY_PV="${PV/_beta/-beta.}" +DESCRIPTION="UniFi Video Server" +HOMEPAGE="https://www.ubnt.com/download/unifi-video/" +SRC_URI="https://dl.ubnt.com/firmwares/ufv/v${MY_PV}/unifi-video.Ubuntu18.04_amd64.v${MY_PV}.deb" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" +RESTRICT="mirror" + +DEPEND="acct-group/unifi-video + acct-user/unifi-video + app-arch/zip" +RDEPEND="${DEPEND} + dev-db/mongodb + dev-java/commons-daemon + sys-apps/lsb-release + sys-apps/util-linux + sys-libs/libcap + virtual/jre:1.8" + +S=${WORKDIR} +QA_PREBUILT="usr/lib*/${PN}/lib/*.so usr/lib*/${PN}/bin/*" + +src_unpack() { + default + unpack "${WORKDIR}"/data.tar.gz +} + +src_prepare() { + eapply "${FILESDIR}"/commons-daemon-move.patch + sed -i usr/sbin/${PN} \ + -e '/require_root$/d' \ + -e '/update_limits$/d' \ + -e '/ulimit/d' \ + -e '/coredump_filter/d' || die + default + #delete problematic class in bundled log4j + zip -q -d \ + usr/lib/unifi-video/lib/log4j-core-2.1.jar \ + org/apache/logging/log4j/core/lookup/JndiLookup.class || die +} + +src_install() { + export CODEPATH=/usr/lib/${PN} + export DATAPATH=/var/lib/${PN} + LOGPATH=${DATAPATH}/logs + VARLOGPATH=/var/log/${PN} + + insinto /usr/lib + doins -r .${CODEPATH} + into /usr + dosbin usr/sbin/unifi-video + + keepdir ${LOGPATH} + dodir ${DATAPATH} + fowners -R ${PN}:${PN} ${DATAPATH} + dosym ${LOGPATH} ${VARLOGPATH} + dosym ${LOGPATH} ${CODEPATH}/logs + + dosym ${DATAPATH} ${CODEPATH}/data + + fperms 500 ${CODEPATH}/bin/ubnt.avtool + fperms 500 ${CODEPATH}/bin/evostreamms + fperms 500 /usr/sbin/${PN} + fowners -R ${PN}:${PN} ${CODEPATH} + fperms -R 0400 ${CODEPATH}/lib/ + fperms 500 ${CODEPATH}/lib/ + + echo "CONFIG_PROTECT=\"${DATAPATH}/system.properties\"" > "${T}"/99${PN} + doenvd "${T}"/99${PN} + + dosym ../../../bin/mongod ${CODEPATH}/bin/mongod + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service +} + +pkg_postinst() { + if [[ ! -f ${DATAPATH}/system.properties ]]; then + cp ${CODEPATH}/etc/system.properties ${DATAPATH}/system.properties + echo uuid=$(uuidgen) >> ${DATAPATH}/system.properties + fi +}