Bug#769027: (pre-approval for) unblock: dhcpy6d/0.4-2
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
I intend to upload the debdiff below to unstable to fix the following
two RC bugs:
#768989 [G|P| ] [dhcpy6d] dhcpy6d: Overwrites lease databases upon package upgrade if SQLite backend is used
#767817 [S|P| ] [dhcpy6d] dhcpy6d: modifies conffiles (policy 10.7.3): /etc/default/dhcpy6d
Since the minimal fix for #767817 introduced a new lintian warning
(executable-not-elf-or-script usr/share/dhcpy6d/default/dhcpy6d) and
because the fix #768989 already modifies the one line in
debian/dhcpy6d.postinst which needs to be changed to fix the remaining
part of ...
#769006 [m| | ] [dhcpy6d] dhcpy6d: Multiple files with unnecessary executable bit
.... I included a fix for this issue/lintian warning, too, but I have
neither yet pushed that part nor uploaded 0.4-2 yet.
So if the fix for #769006 included below is not ok, and the lintian
warning "executable-not-elf-or-script" is ok to be introduced by the
RC fix, I'll upload 0.4-2 without the #769006 fix (and send a new
debdiff afterwards).
Please note that the removal of dhcpy6d-0.4/debian/dhcpy6d.default
below is actually just deletion of a symbolic link. Upstream's
dhcpy6d-0.4/etc/default/dhcpy6d (to which the symlink pointed) still
exists.
Following the debdiff between the two source packages and then the
debdiff between the two resulting binary packages.
$ debdiff ../dhcpy6d_0.4-{1,2}.dsc
diff -Nru dhcpy6d-0.4/debian/changelog dhcpy6d-0.4/debian/changelog
--- dhcpy6d-0.4/debian/changelog 2014-10-22 21:03:57.000000000 +0200
+++ dhcpy6d-0.4/debian/changelog 2014-11-10 19:56:59.000000000 +0100
@@ -1,3 +1,18 @@
+dhcpy6d (0.4-2) unstable; urgency=medium
+
+ * Handle /etc/default/dhcpy6d with ucf. (Closes: #767817)
+ + Install file to /usr/share/dhcpy6d/default/dhcpy6d instead, remove
+ symlink debian/dhcpy6d.default, add debian/dhcpy6d.install.
+ + Depend on ucf.
+ * Install volatile.sqlite into /usr/share/dhcpy6d/ and copy it to
+ /var/lib/dhcpy6d/volatile.sqlite during postinst only if it doesn't
+ yet exist. Remove it upon purge. (Closes: #768989)
+ * Both fixes above together also remove unnecessary executable bits.
+ (Else the fix for #767817 newly introduces the lintian warning
+ executable-not-elf-or-script; closes: #769006)
+
+ -- Axel Beckert <abe@debian.org> Mon, 10 Nov 2014 19:56:57 +0100
+
dhcpy6d (0.4-1) unstable; urgency=low
[ Henri Wahl ]
diff -Nru dhcpy6d-0.4/debian/control dhcpy6d-0.4/debian/control
--- dhcpy6d-0.4/debian/control 2014-10-22 15:41:40.000000000 +0200
+++ dhcpy6d-0.4/debian/control 2014-11-10 12:40:18.000000000 +0100
@@ -15,6 +15,7 @@
Package: dhcpy6d
Architecture: all
Depends: adduser,
+ ucf,
${misc:Depends},
${python:Depends}
Pre-Depends: dpkg (>= 1.16.5)
diff -Nru dhcpy6d-0.4/debian/dhcpy6d.default dhcpy6d-0.4/debian/dhcpy6d.default
--- dhcpy6d-0.4/debian/dhcpy6d.default 2014-10-22 21:36:32.000000000 +0200
+++ dhcpy6d-0.4/debian/dhcpy6d.default 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-# dhcpy6d is disabled by default
-#RUN=yes
diff -Nru dhcpy6d-0.4/debian/dhcpy6d.dirs dhcpy6d-0.4/debian/dhcpy6d.dirs
--- dhcpy6d-0.4/debian/dhcpy6d.dirs 1970-01-01 01:00:00.000000000 +0100
+++ dhcpy6d-0.4/debian/dhcpy6d.dirs 2014-11-10 16:13:28.000000000 +0100
@@ -0,0 +1 @@
+usr/share/dhcpy6d/
diff -Nru dhcpy6d-0.4/debian/dhcpy6d.install dhcpy6d-0.4/debian/dhcpy6d.install
--- dhcpy6d-0.4/debian/dhcpy6d.install 1970-01-01 01:00:00.000000000 +0100
+++ dhcpy6d-0.4/debian/dhcpy6d.install 2014-11-07 19:45:02.000000000 +0100
@@ -0,0 +1 @@
+etc/default/dhcpy6d usr/share/dhcpy6d/default/
diff -Nru dhcpy6d-0.4/debian/dhcpy6d.postinst dhcpy6d-0.4/debian/dhcpy6d.postinst
--- dhcpy6d-0.4/debian/dhcpy6d.postinst 2014-09-18 19:53:36.000000000 +0200
+++ dhcpy6d-0.4/debian/dhcpy6d.postinst 2014-11-10 19:14:41.000000000 +0100
@@ -50,14 +50,23 @@
if [ ! -e /var/log/dhcpy6d.log ]; then
touch /var/log/dhcpy6d.log
fi
- chown $SERVER_USER:$SERVER_GROUP /var/log/dhcpy6d.log
- chmod 0770 /var/log/dhcpy6d.log
+ if [ ! -e /var/lib/dhcpy6d/volatile.sqlite ]; then
+ cp /usr/share/dhcpy6d/volatile.sqlite /var/lib/dhcpy6d/volatile.sqlite
+ fi
+ chown $SERVER_USER:$SERVER_GROUP /var/log/dhcpy6d.log /var/lib/dhcpy6d/volatile.sqlite
+ chmod 0660 /var/log/dhcpy6d.log /var/lib/dhcpy6d/volatile.sqlite
# 6. add DUID entry to /etc/default/dhcpy6d if not yet existing
- if [ ! $(grep "DUID=" /etc/default/dhcpy6d) ]; then
- echo >> /etc/default/dhcpy6d
- echo "# LLT DUID generated by Debian" >> /etc/default/dhcpy6d
- echo "DUID=$(dhcpy6d --generate-duid)" >> /etc/default/dhcpy6d
+ TMPFILE=`mktemp`
+ cat /usr/share/dhcpy6d/default/dhcpy6d > "${TMPFILE}"
+ echo >> "${TMPFILE}"
+ echo "# LLT DUID generated by Debian" >> "${TMPFILE}"
+ if [ ! -e /etc/default/dhcpy6d ] || ! grep -q "DUID=" /etc/default/dhcpy6d; then
+ echo "DUID=$(dhcpy6d --generate-duid)" >> "${TMPFILE}"
+ else
+ egrep "^DUID=" /etc/default/dhcpy6d >> "${TMPFILE}"
fi
+ ucf "${TMPFILE}" /etc/default/dhcpy6d
+ ucfr dhcpy6d /etc/default/dhcpy6d
;;
esac
diff -Nru dhcpy6d-0.4/debian/dhcpy6d.postrm dhcpy6d-0.4/debian/dhcpy6d.postrm
--- dhcpy6d-0.4/debian/dhcpy6d.postrm 2014-08-06 16:00:56.000000000 +0200
+++ dhcpy6d-0.4/debian/dhcpy6d.postrm 2014-11-10 17:36:53.000000000 +0100
@@ -7,7 +7,17 @@
case "$1" in
purge)
- rm -f /var/log/dhcpy6d.log*
+ rm -f /var/log/dhcpy6d.log* /var/lib/dhcpy6d/volatile.sqlite
+ # Taken from ucf's postrm example
+ for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
+ rm -f "/etc/default/dhcpy6d$ext"
+ done
+ if which ucf >/dev/null; then
+ ucf --purge /etc/default/dhcpy6d
+ fi
+ if which ucfr >/dev/null; then
+ ucfr --purge dhcpy6d /etc/default/dhcpy6d
+ fi
;;
esac
diff -Nru dhcpy6d-0.4/debian/rules dhcpy6d-0.4/debian/rules
--- dhcpy6d-0.4/debian/rules 2014-10-22 13:01:06.000000000 +0200
+++ dhcpy6d-0.4/debian/rules 2014-11-10 19:30:26.000000000 +0100
@@ -7,6 +7,11 @@
rm -f debian/dhcpy6d/usr/share/doc/dhcpy6d/LICENSE
rm -f debian/dhcpy6d/var/log/dhcpy6d.log
rm -f debian/dhcpy6d/usr/share/doc/dhcpy6d/*.[0-9]
+ mv -v debian/dhcpy6d/var/lib/dhcpy6d/volatile.sqlite debian/dhcpy6d/usr/share/dhcpy6d/
+
+override_dh_install:
+ dh_install
+ chmod 0644 debian/dhcpy6d/usr/share/dhcpy6d/default/dhcpy6d
# make -f debian/rules get-orig-source
get-orig-source:
$ debdiff ../dhcpy6d_0.4-{1,2}_all.deb
[The following lists of changes regard files as different if they have
different names, permissions or owners.]
Files in second .deb but not in first
-------------------------------------
-rw-r--r-- root/root /usr/share/dhcpy6d/default/dhcpy6d
-rw-r--r-- root/root /usr/share/dhcpy6d/volatile.sqlite
Files in first .deb but not in second
-------------------------------------
-rw-r--r-- root/root /etc/default/dhcpy6d
-rw-r--r-- root/root /var/lib/dhcpy6d/volatile.sqlite
Control files: lines which differ (wdiff format)
------------------------------------------------
Depends: adduser, {+ucf, python,+} python:any (<< 2.8), python:any (>= [-2.7.5-5~), python-] {+2.7.5-5~)+}
Installed-Size: [-304-] {+309+}
Version: [-0.4-1-] {+0.4-2+}
(Note to explain the different permissions shown above and in #769006:
the permissions of /var/lib/dhcpy6d/volatile.sqlite got altered by the
"chmod -R 0770 $SERVER_HOME" line in the postinst script of 0.4-1. In
0.4-2 it's copied to that location only after that line is executed.)
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (990, 'unstable'), (600, 'testing'), (500, 'buildd-unstable'), (400, 'stable'), (110, 'experimental'), (1, 'buildd-experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.17-rc5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Reply to: