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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 87E2F138359 for ; Fri, 3 Jul 2020 09:55:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D15ADE0875; Fri, 3 Jul 2020 09:55:11 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BC252E0875 for ; Fri, 3 Jul 2020 09:55:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 99AC934EEE0 for ; Fri, 3 Jul 2020 09:55:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C45592BE for ; Fri, 3 Jul 2020 09:55:05 +0000 (UTC) From: "Jeroen Roovers" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jeroen Roovers" Message-ID: <1593770102.77ef284cc14f41f8cf32cb1122822d2c8cad7716.jer@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/darkstat/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/darkstat/darkstat-9999999.ebuild X-VCS-Directories: net-analyzer/darkstat/ X-VCS-Committer: jer X-VCS-Committer-Name: Jeroen Roovers X-VCS-Revision: 77ef284cc14f41f8cf32cb1122822d2c8cad7716 X-VCS-Branch: master Date: Fri, 3 Jul 2020 09:55:05 +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: 167bb61a-2e3d-4775-9dec-d623831d442f X-Archives-Hash: 1e543f5794b36c773873569655b674c6 commit: 77ef284cc14f41f8cf32cb1122822d2c8cad7716 Author: Jeroen Roovers gentoo org> AuthorDate: Fri Jul 3 09:17:32 2020 +0000 Commit: Jeroen Roovers gentoo org> CommitDate: Fri Jul 3 09:55:02 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77ef284c net-analyzer/darkstat: Add live ebuild Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Jeroen Roovers gentoo.org> net-analyzer/darkstat/darkstat-9999999.ebuild | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/net-analyzer/darkstat/darkstat-9999999.ebuild b/net-analyzer/darkstat/darkstat-9999999.ebuild new file mode 100644 index 00000000000..a22c4018efb --- /dev/null +++ b/net-analyzer/darkstat/darkstat-9999999.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 user + +DESCRIPTION="Network traffic analyzer with cute web interface" +HOMEPAGE="https://unix4lyfe.org/darkstat/" +EGIT_REPO_URI="https://www.unix4lyfe.org/git/darkstat" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" + +DEPEND=" + dev-libs/libbsd + net-libs/libpcap + sys-libs/zlib +" +RDEPEND=" + ${DEPEND} +" +DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat} +DOCS=( AUTHORS ChangeLog README NEWS ) +PATCHES=( + "${FILESDIR}"/${PN}-3.0.719-strncpy-off-by-one.patch +) + +src_prepare() { + default + + sed -i \ + -e '/-DNDEBUG/d' \ + -e 's|-flto||g' \ + configure.ac || die + + eautoreconf +} + +src_configure() { + econf --with-privdrop-user=darkstat +} + +src_install() { + default + + newinitd "${FILESDIR}"/darkstat-initd darkstat + newconfd "${FILESDIR}"/darkstat-confd darkstat + + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat || die + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat || die + + keepdir "${DARKSTAT_CHROOT_DIR}" + chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}" +} + +pkg_preinst() { + enewuser darkstat +} + +pkg_postinst() { + # Workaround bug #141619 + DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' "${ROOT}"etc/conf.d/darkstat` + chown darkstat:0 "${ROOT}${DARKSTAT_CHROOT_DIR}" + + elog "To start different darkstat instances which will listen on a different" + elog "interfaces create in /etc/init.d directory the 'darkstat.if' symlink to" + elog "darkstat script where 'if' is the name of the interface." + elog "Also in /etc/conf.d directory copy darkstat to darkstat.if" + elog "and edit it to change default values." + elog + elog "darkstat's default chroot directory is: \"${ROOT}${DARKSTAT_CHROOT_DIR}\"" +}