13.04.2016, 22:25, Daniel Kahn Gillmor kirjoitti: > > I'm unable to review it before tomorrow, and i would be the wrong person > to upload opendnssec anyway. if you think an nmu would make things work > better, i doubt anyone would complain :)
Well, I'm also a core-dev so can upload to ubuntu too, so an nmu would not be necessary for other than getting freeipa 4.3.1 in debian as well, now that bind9 added pkcs11 support. So here's another debdiff, this time using unit files named after the actual daemons like what other distros use. I've also added symlinks to mask the initscripts so that both wont get used. This also allows the old init names to be used. One thing to note is that since ods-enforcerd is Type=forking and the default config does not work, starting it would fail on package install before it gets to write it's own pidfile. This would fail installing the package, so to be on the safe side both units are disabled by default. Once they're configured, 'systemctl enable ...' will enable them. -- t
commit e0aa45a13a26e540047dbbdcfcf294bd933b4a5f Author: Timo Aaltonen <[email protected]> Date: Tue Mar 8 14:53:54 2016 +0200 Add systemd service files and default config. diff --git a/debian/changelog b/debian/changelog index e6d11b4..8da3cb4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +opendnssec (1:1.4.9-2) UNRELEASED; urgency=medium + + * Add systemd service files and default config. + + -- Timo Aaltonen <[email protected]> Tue, 08 Mar 2016 09:24:35 +0200 + opendnssec (1:1.4.9-1) unstable; urgency=medium * Install migrate_1_4_8 SQL scripts into opendnsec-common package diff --git a/debian/control b/debian/control index d2987fc..d781c42 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Uploaders: OndÅej Surý <[email protected]> Build-Depends: autotools-dev, debhelper (>= 9), dh-autoreconf, + dh-systemd, doxygen, graphviz, libcunit1-dev, diff --git a/debian/default/opendnssec b/debian/default/opendnssec new file mode 100644 index 0000000..1cf67f2 --- /dev/null +++ b/debian/default/opendnssec @@ -0,0 +1,2 @@ +ODS_SIGNERD_OPT="" +ODS_ENFORCERD_OPT="" diff --git a/debian/opendnssec-common.install b/debian/opendnssec-common.install index 0eaebf2..bcc8f0d 100644 --- a/debian/opendnssec-common.install +++ b/debian/opendnssec-common.install @@ -1,3 +1,4 @@ +debian/default/opendnssec etc/default etc/opendnssec/*.xml /usr/share/opendnssec/ usr/bin/ods-kasp2html usr/sbin/ods-control diff --git a/debian/opendnssec-common.tmpfile b/debian/opendnssec-common.tmpfile new file mode 100644 index 0000000..64a2864 --- /dev/null +++ b/debian/opendnssec-common.tmpfile @@ -0,0 +1 @@ +d /run/opendnssec 0775 opendnssec opendnssec - - diff --git a/debian/opendnssec-enforcer.links b/debian/opendnssec-enforcer.links new file mode 100644 index 0000000..758ee49 --- /dev/null +++ b/debian/opendnssec-enforcer.links @@ -0,0 +1 @@ +lib/systemd/system/ods-enforcerd.service lib/systemd/system/opendnssec-enforcer.service diff --git a/debian/opendnssec-enforcer.ods-enforcerd.service b/debian/opendnssec-enforcer.ods-enforcerd.service new file mode 100644 index 0000000..ca257f9 --- /dev/null +++ b/debian/opendnssec-enforcer.ods-enforcerd.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenDNSSEC Enforcer daemon +After=network.target + +[Service] +Type=forking +PIDFile=/var/run/opendnssec/enforcerd.pid +EnvironmentFile=-/etc/default/opendnssec +ExecStart=/usr/sbin/ods-enforcerd $ODS_ENFORCERD_OPT + +[Install] +WantedBy=multi-user.target diff --git a/debian/opendnssec-signer.links b/debian/opendnssec-signer.links new file mode 100644 index 0000000..ed7e406 --- /dev/null +++ b/debian/opendnssec-signer.links @@ -0,0 +1 @@ +lib/systemd/system/ods-signerd.service lib/systemd/system/opendnssec-signer.service diff --git a/debian/opendnssec-signer.ods-signerd.service b/debian/opendnssec-signer.ods-signerd.service new file mode 100644 index 0000000..aa73ef6 --- /dev/null +++ b/debian/opendnssec-signer.ods-signerd.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenDNSSEC signer daemon +After=network.target ods-enforcerd.service + +[Service] +Type=simple +PIDFile=/var/run/opendnssec/signerd.pid +EnvironmentFile=-/etc/default/opendnssec +ExecStart=/usr/sbin/ods-signerd -d $ODS_SIGNERD_OPT + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules index 6f41137..bbec32c 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,7 @@ export DEB_CFLAGS_MAINT_OPTIONS = -Wall -Wextra -g -pipe $(if $(findstring noopt export DEB_LDFLAGS_MAINT_OPTIONS = -Wl,-z,defs -Wl,--as-needed %: - dh $@ --with autoreconf,autotools-dev + dh $@ --with autoreconf,autotools-dev,systemd override_dh_autoreconf: dh_autoreconf --as-needed @@ -70,6 +70,10 @@ override_dh_auto_install: $(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/man/man1/ods-hsm* \ $(CURDIR)/debian/opendnssec-enforcer-mysql/usr/share/opendnssec/database_create* +override_dh_systemd_enable: + dh_systemd_enable -popendnssec-enforcer --no-enable --name=ods-enforcerd ods-enforcerd.service + dh_systemd_enable -popendnssec-signer --no-enable --name=ods-signerd ods-signerd.service + override_dh_installdocs-arch: dh_installdocs -popendnssec-common -popendnssec-common\ -popendnssec-dbg-mysql -popendnssec-dbg-sqlite3 \

