Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621520 - net-firewall/conntrack-tools-1.4.4: add systemd notify support
Summary: net-firewall/conntrack-tools-1.4.4: add systemd notify support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-06-11 14:39 UTC by Luke McKee
Modified: 2021-03-11 11:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
portage/net-firewall/conntrack-tools/files/conntrackd.service systemd unit (conntrackd.service,285 bytes, text/plain)
2017-06-12 02:05 UTC, Luke McKee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke McKee 2017-06-11 14:39:43 UTC
diff -Naur /usr/portage/net-firewall/conntrack-tools/conntrack-tools-1.4.4.ebuild conntrack-tools-1.4.4-r1.ebuild 
--- /usr/portage/net-firewall/conntrack-tools/conntrack-tools-1.4.4.ebuild	2017-02-28 19:50:50.000000000 +0000
+++ conntrack-tools-1.4.4-r1.ebuild	2017-06-11 14:31:28.254592855 +0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit autotools eutils linux-info
+inherit autotools eutils linux-info systemd
 
 DESCRIPTION="Connection tracking userspace tools"
 HOMEPAGE="http://conntrack-tools.netfilter.org"
@@ -11,7 +11,7 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~hppa ~x86"
-IUSE="doc"
+IUSE="doc systemd"
 
 RDEPEND="
 	>=net-libs/libmnl-1.0.3
@@ -30,6 +30,7 @@
 	virtual/pkgconfig
 	sys-devel/bison
 	sys-devel/flex
+	systemd? ( >=sys-apps/systemd-227 )
 "
 
 pkg_setup() {
@@ -66,6 +67,12 @@
 	eautoreconf
 }
 
+src_configure() {
+    econf \
+        --sbindir="${EPREFIX}"/sbin \
+        $(use_enable systemd systemd)
+}
+
 src_compile() {
 	default
 	use doc && emake -C doc/manual
@@ -76,6 +83,7 @@
 
 	newinitd "${FILESDIR}/conntrackd.initd-r3" conntrackd
 	newconfd "${FILESDIR}/conntrackd.confd-r2" conntrackd
+	systemd_dounit "${FILESDIR}/conntrackd.service"
 
 	insinto /etc/conntrackd
 	doins doc/stats/conntrackd.conf




Reproducible: Always




$(FILESDIR)/conntrackd.service:

[Unit]
Description=Conntrack Daemon
Documentation=man:conntrackd(8) man:conntrackd.conf(5)

[Service]
Type=notify
ExecStart=/usr/sbin/conntrackd -C /etc/conntrackd/conntrackd.conf
Restart=on-failure
ProtectSystem=full
ProtectHome=true
#WatchdogSec=60

[Install]
WantedBy=multi-user.target
Comment 1 Jonas Stein gentoo-dev 2017-06-11 22:54:45 UTC
Thank you.
Please attach patches next time.
Comment 2 Luke McKee 2017-06-12 01:36:09 UTC
Ok I'll attach the patches as files next time.

Also our gentoo is putting conntrackd in /sbin not /usr/sbin unlike arch, so we need to tweak that service file, i stole from arch.

I had to upgrade systemd from sabayon in order to get it to work. Sabayon keeps shitting me to tears. They dropped 32 bit, and they have 32 bit in the 64 bit version (crutft). So this is the last straw, I'm only using entropy as a package manager for rolling out my own gentoo distro to hosts now. I have a hybrid setup now.


epm -ql conntrack-tools
/etc/conntrackd/conntrackd.conf
/etc/conf.d/conntrackd
/etc/init.d/conntrackd
/sbin/conntrackd
/sbin/nfct
/sbin/conntrack
/usr/lib/debug/sbin/nfct.debug
/usr/lib/debug/sbin/conntrackd.debug
/usr/lib/debug/sbin/conntrack.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_sane.so.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_ssdp.so.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_tns.so.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_tftp.so.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_rpc.so.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_dhcpv6.so.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_ftp.so.debug
/usr/lib/debug/usr/lib64/conntrack-tools/ct_helper_amanda.so.debug
/usr/lib/systemd/system/conntrackd.service
/usr/share/doc/conntrack-tools-1.4.4-r1/TODO.bz2
/usr/share/doc/conntrack-tools-1.4.4-r1/conntrack-tools.html
/usr/share/doc/conntrack-tools-1.4.4-r1/AUTHORS
/usr/share/doc/conntrack-tools-1.4.4-r1/stats/conntrackd.conf.bz2
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/keepalived.conf.bz2
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/primary-backup.sh.bz2
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/ftfw/conntrackd.conf.bz2
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/ftfw/README
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/alarm/conntrackd.conf.bz2
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/alarm/README
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/notrack/conntrackd.conf.bz2
/usr/share/doc/conntrack-tools-1.4.4-r1/sync/notrack/README.bz2
/usr/share/man/man8/nfct.8.bz2
/usr/share/man/man8/conntrackd.8.bz2
/usr/share/man/man8/conntrack.8.bz2
/usr/share/man/man5/conntrackd.conf.5.bz2
/usr/lib64/conntrack-tools/ct_helper_sane.so
/usr/lib64/conntrack-tools/ct_helper_ssdp.so
/usr/lib64/conntrack-tools/ct_helper_tns.so
/usr/lib64/conntrack-tools/ct_helper_tftp.so
/usr/lib64/conntrack-tools/ct_helper_rpc.so
/usr/lib64/conntrack-tools/ct_helper_dhcpv6.so
/usr/lib64/conntrack-tools/ct_helper_ftp.so
/usr/lib64/conntrack-tools/ct_helper_amanda.so
/usr/lib64/conntrack-tools/ct_helper_ssdp.la
/usr/lib64/conntrack-tools/ct_helper_sane.la
/usr/lib64/conntrack-tools/ct_helper_tns.la
/usr/lib64/conntrack-tools/ct_helper_tftp.la
/usr/lib64/conntrack-tools/ct_helper_rpc.la
/usr/lib64/conntrack-tools/ct_helper_ftp.la
/usr/lib64/conntrack-tools/ct_helper_dhcpv6.la
/usr/lib64/conntrack-tools/ct_helper_amanda.la
Comment 3 Luke McKee 2017-06-12 02:05:10 UTC
Created attachment 476128 [details]
portage/net-firewall/conntrack-tools/files/conntrackd.service systemd unit

paths fixed, or consider modifying gentoo to put it in /usr/sbin like everyone else these days.  Gone are the days of /bin being a separate filesystem you can use in a rescue mode.
Comment 4 Wolfram Schlich 2019-02-04 05:52:30 UTC
This seems to be a duplicate of bug #573566.
Comment 5 Larry the Git Cow gentoo-dev 2020-04-02 15:01:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c622b568850b1b057669b750f187a3a4a28df0d

commit 6c622b568850b1b057669b750f187a3a4a28df0d
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2020-04-02 14:57:50 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2020-04-02 15:01:00 +0000

    net-firewall/conntrack-tools: Add IUSE=systemd
    
    Package-Manager: Portage-2.3.96, Repoman-2.3.22
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=621520
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 net-firewall/conntrack-tools/conntrack-tools-1.4.6.ebuild | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2020-04-02 15:03:40 UTC
(In reply to Luke McKee from comment #2)
> Also our gentoo is putting conntrackd in /sbin not /usr/sbin unlike arch, so
> we need to tweak that service file, i stole from arch.

It's the other way round: upstream developers set /sbin as install path and Arch Linux diverts from that.