summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-12-26 11:58:57 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-12-26 11:58:57 +0100
commit1f9d7dbe8c4e55956f8cb274d74d156ed2d35722 (patch)
tree61d1d271d98dfc25573d012f0c3ba7b18888b71e
parentc8cf23699feb55f0b754cfe9c14aced1ba4f56c7 (diff)
some release changes, correct systemddebian/1.0.24-7
-rw-r--r--debian/changelog17
-rwxr-xr-xdebian/rules6
-rw-r--r--debian/sane-utils.README.Debian11
-rw-r--r--debian/sane-utils.install2
-rw-r--r--debian/sane-utils.lintian-overrides5
-rw-r--r--debian/sane-utils.postrm13
-rw-r--r--debian/sane-utils.saned.default3
-rw-r--r--debian/saned.socket (renamed from debian/sane-utils.saned.socket)0
-rw-r--r--debian/saned@.service (renamed from debian/sane-utils.saned@.service)1
9 files changed, 55 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 15fb95e..65c3fef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+sane-backends (1.0.24-7) unstable; urgency=medium
+
+ * debian/rules:
+ - Split dh_installinit in two parts for systemd and SysV-style.
+ - Install systemd files without dh to prevent sideeffects (Closes: #773320).
+ - Override dh_systemd_enable to don't enable saned.socked.
+ * debian/sane-utils.lintian-overrides:
+ - Override systemd-no-service-for-init-script.
+ * debian/sane-utils.postrm:
+ - Add purge the manual installed files.
+ * debian/sane-utils.README.Debian:
+ - Add handling with systemd.
+ * debian/sane-utils.saned.default:
+ - Add note for enabling under systemd.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Wed, 17 Dec 2014 09:18:47 +0100
+
sane-backends (1.0.24-6) unstable; urgency=medium
* Revert changes from 1.0.24-5.
diff --git a/debian/rules b/debian/rules
index b04da9d..5fc4afb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -125,8 +125,10 @@ endif
chrpath -d debian/sane-utils/usr/bin/sane-find-scanner
override_dh_installinit:
- dh_installinit -psane-utils --name=saned@ --error-handler=saned_eh
- cp $(CURDIR)/debian/sane-utils.saned.socket $(CURDIR)/debian/sane-utils/lib/systemd/system/saned.socket
+ dh_installinit -psane-utils --name=saned --error-handler=saned_eh
+
+override_dh_systemd_enable:
+ dh_systemd_enable --no-enable saned.socket
override_dh_strip:
dh_strip --dbg-package=libsane-dbg
diff --git a/debian/sane-utils.README.Debian b/debian/sane-utils.README.Debian
index 2fb74d4..d5dd23f 100644
--- a/debian/sane-utils.README.Debian
+++ b/debian/sane-utils.README.Debian
@@ -57,6 +57,16 @@ To disable saned, use update-inetd to disable the service:
If you want to run saned under another user and/or group, edit /etc/inetd.conf
and change saned:saned for the appropriate user:group combination.
+ Running saned from systemd
+ --------------------------
+
+To enable saned in the default configuration (running as user and group saned),
+use systemctl to enable the service:
+ # systemctl enable saned.socket
+To disable saned, use systemctl to disable the service:
+ # systemctl disable saned.socket
+
+
Running saned as a standalone daemon
------------------------------------
@@ -70,3 +80,4 @@ To run saned as a standalone server:
-- Julien BLACHE <jblache@debian.org>, Mon, 05 May 2008 19:29:28 +0200
+-- Jörg Frings-Fürst <debian@jff-webhosting.net> Tue, 16 Dec 2014 22:04:23 +0100
diff --git a/debian/sane-utils.install b/debian/sane-utils.install
index b16ddd3..a953300 100644
--- a/debian/sane-utils.install
+++ b/debian/sane-utils.install
@@ -8,3 +8,5 @@ usr/share/man/man1/sane-find-scanner.1
usr/share/man/man1/scanimage.1
usr/share/man/man8/saned.8
tools/umax_pp usr/bin
+debian/saned.socket lib/systemd/system
+debian/saned@.service lib/systemd/system
diff --git a/debian/sane-utils.lintian-overrides b/debian/sane-utils.lintian-overrides
index 32a16bc..41e796f 100644
--- a/debian/sane-utils.lintian-overrides
+++ b/debian/sane-utils.lintian-overrides
@@ -2,3 +2,8 @@
# User enabled. See sane-utils.README.Debian
#
postrm-contains-additional-updaterc.d-calls
+
+#
+# False positives. See Debian bug #
+#
+systemd-no-service-for-init-script
diff --git a/debian/sane-utils.postrm b/debian/sane-utils.postrm
index 5ebdada..a11d248 100644
--- a/debian/sane-utils.postrm
+++ b/debian/sane-utils.postrm
@@ -7,6 +7,19 @@ if [ "$1" = purge ]; then
update-inetd --remove sane-port
update-inetd --remove "#<off># sane-port"
fi
+#
+# purge systemd files
+#
+ rm -f /etc/systemd/system/saned.socket
+ rm -f /var/lib/systemd/deb-systemd-helper-enabled/saned.socket.dsh-also
+ rm -f /var/lib/systemd/deb-systemd-helper-masked/saned.socket
+ if [ -d /var/lib/systemd/deb-systemd-helper-enabled ]; then
+ rmdir --ignore-fail-on-non-empty /var/lib/systemd/deb-systemd-helper-enabled
+ fi
+ if [ -d /var/lib/systemd/deb-systemd-helper-masked ]; then
+ rmdir --ignore-fail-on-non-empty /var/lib/systemd/deb-systemd-helper-masked
+ fi
+
fi
#DEBHELPER#
diff --git a/debian/sane-utils.saned.default b/debian/sane-utils.saned.default
index 4ea0cac..b0647cc 100644
--- a/debian/sane-utils.saned.default
+++ b/debian/sane-utils.saned.default
@@ -1,6 +1,7 @@
# Defaults for the saned initscript, from sane-utils
-# Set to yes to start saned
+# To enable under systemd please read README.Debian
+# Set to yes to start saned under SysV
RUN=no
# Set to the user saned should run as
diff --git a/debian/sane-utils.saned.socket b/debian/saned.socket
index 1aa19e7..1aa19e7 100644
--- a/debian/sane-utils.saned.socket
+++ b/debian/saned.socket
diff --git a/debian/sane-utils.saned@.service b/debian/saned@.service
index e9fc879..8b406eb 100644
--- a/debian/sane-utils.saned@.service
+++ b/debian/saned@.service
@@ -1,6 +1,7 @@
[Unit]
Description=Scanner Service
Requires=saned.socket
+Alias=saned
[Service]
ExecStart=/usr/sbin/saned