From: Steinar H. Gunderson Date: Sun, 21 May 2006 23:44:33 +0000 (+0200) Subject: Imported Debian patch 1.0.7-18 X-Git-Tag: debian/1%1.0.7-18^0 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=4f44986ea6265136beff9fe699f4ede63f463655 Imported Debian patch 1.0.7-18 --- diff --git a/debian/changelog b/debian/changelog index 640cbe3..7052060 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,32 @@ +nfs-utils (1:1.0.7-18) unstable; urgency=low + + * Make /etc/exports, /etc/default/nfs-{common,kernel-server}, + /etc/idmapd.conf and /etc/gssapi_mech.conf be managed by ucf + instead of being conffiles. (Closes: #353501) + * Make directories /usr/share/nfs-{common,kernel-server}/conffiles, + and install files in there at debian/rules time. At the same time, + install the files with install instead of cp. + * Call ucf at postinst time to get the files in. + * Correspondingly, call ucf at purge time to remove them as needed (code + snippets lifted from autofs). + * Make nfs-common and nfs-kernel-server depend on ucf. + * Remove the call to dh_installinit -- since it was already not modifying + postinst/postrm/prerm scripts due to being called with -n (I must admit + I don't know why, but I assume this has a good reason :-) ) and we now + install the init script ourself (because we don't want dh_installinit + to install our .default files to /etc), it doesn't do anything useful + for us. + * Include .md5sum files with MD5 checksums of previous defaults shipped, + to ease the transition into ucf; at the moment, only checksums from + 1:1.0.7-17 (the last non-ucf version) and 1:1.0.6-3.1 (the version + shipped in sarge) are included, but I think that should actually cover + all the defaults shipped in the period between as well. + * Install the .md5sum files in debian/rules. + * Remove call to dh_installexamples in debian/rules; we don't install any + examples. + + -- Steinar H. Gunderson Mon, 22 May 2006 01:44:33 +0200 + nfs-utils (1:1.0.7-17) unstable; urgency=low * The umounting of rpc_pipefs is non-critical and will fail if there are diff --git a/debian/control b/debian/control index 3f43754..d64d95c 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Standards-Version: 3.7.2 Package: nfs-kernel-server Priority: optional Architecture: any -Depends: nfs-common (>= 1:0.3.3-3), sysvinit (>= 2.80-1), ${shlibs:Depends} +Depends: nfs-common (>= 1:0.3.3-3), sysvinit (>= 2.80-1), ucf, ${shlibs:Depends} Provides: knfs, nfs-server Conflicts: knfs, nfs-server Replaces: knfs, nfs-server @@ -25,7 +25,7 @@ Description: Kernel NFS server support Package: nfs-common Architecture: any -Depends: portmap, sysvinit (>= 2.80-1), adduser, ${shlibs:Depends} +Depends: portmap, sysvinit (>= 2.80-1), adduser, ucf, ${shlibs:Depends} Provides: nfs-client Conflicts: nfs-client Replaces: nfs-client, nfs-kernel-server (<< 1:1.0.7-5) diff --git a/debian/etc.exports.md5sum b/debian/etc.exports.md5sum new file mode 100644 index 0000000..d6ceaeb --- /dev/null +++ b/debian/etc.exports.md5sum @@ -0,0 +1,2 @@ +fa071681b8e7f4eff1d6f5c4f43bf1d8 nfs-utils-1.0.6/debian/etc.exports +d9037825e2fbe4e58d6176e7297830cb nfs-utils-1.0.7/debian/etc.exports diff --git a/debian/gssapi_mech.conf.md5sum b/debian/gssapi_mech.conf.md5sum new file mode 100644 index 0000000..d3dc532 --- /dev/null +++ b/debian/gssapi_mech.conf.md5sum @@ -0,0 +1 @@ +36d38b443c98e40ccb89553a45abdcbc nfs-utils-1.0.7/debian/gssapi_mech.conf diff --git a/debian/idmapd.conf.md5sum b/debian/idmapd.conf.md5sum new file mode 100644 index 0000000..6c05a8b --- /dev/null +++ b/debian/idmapd.conf.md5sum @@ -0,0 +1 @@ +3e94f238294cc61b047e7ae50115dffc nfs-utils-1.0.7/debian/idmapd.conf diff --git a/debian/nfs-common.default.md5sum b/debian/nfs-common.default.md5sum new file mode 100644 index 0000000..254fe71 --- /dev/null +++ b/debian/nfs-common.default.md5sum @@ -0,0 +1,2 @@ +9409842759091e981d65a210e3e914cb nfs-utils-1.0.6/debian/nfs-common.default +bf979c79c0eca8c114c5388bf7225b4f nfs-utils-1.0.7/debian/nfs-common.default diff --git a/debian/nfs-common.dirs b/debian/nfs-common.dirs index 7dbf8aa..795c6e7 100644 --- a/debian/nfs-common.dirs +++ b/debian/nfs-common.dirs @@ -5,3 +5,4 @@ var/lib/nfs var/lib/nfs/sm var/lib/nfs/sm.bak var/lib/nfs/rpc_pipefs +usr/share/nfs-common/conffiles diff --git a/debian/nfs-common.postinst b/debian/nfs-common.postinst index f556bc2..c9055dc 100755 --- a/debian/nfs-common.postinst +++ b/debian/nfs-common.postinst @@ -4,6 +4,10 @@ case "$1" in configure) + ucf --three-way /usr/share/nfs-common/conffiles/idmapd.conf /etc/idmapd.conf + ucf --three-way /usr/share/nfs-common/conffiles/gssapi_mech.conf /etc/gssapi_mech.conf + ucf --three-way /usr/share/nfs-common/conffiles/nfs-common.default /etc/default/nfs-common + update-rc.d nfs-common defaults 21 79 >/dev/null if ! getent passwd statd >/dev/null; then diff --git a/debian/nfs-common.postrm b/debian/nfs-common.postrm index 005c928..6783bcd 100755 --- a/debian/nfs-common.postrm +++ b/debian/nfs-common.postrm @@ -6,6 +6,17 @@ case "$1" in purge) update-rc.d nfs-common remove >/dev/null + for FILE in /etc/default/nfs-common /etc/idmapd.conf /etc/gssapi_mech.conf; do + # Taken from the ucf example postrm + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + rm -f $FILE$ext + done + rm -f $FILE + if [ -x /usr/bin/ucf ]; then + ucf --purge $FILE + fi + done + rm -f /var/lib/nfs/state \ /var/lib/nfs/sm/* \ /var/lib/nfs/sm.bak/* diff --git a/debian/nfs-kernel-server.default.md5sum b/debian/nfs-kernel-server.default.md5sum new file mode 100644 index 0000000..1858c27 --- /dev/null +++ b/debian/nfs-kernel-server.default.md5sum @@ -0,0 +1,2 @@ +226f8fdd37b11c59d73e2f378e22b0d0 nfs-utils-1.0.6/debian/nfs-kernel-server.default +41388b5bb60d7ad1b1281b975dc07ce9 nfs-utils-1.0.7/debian/nfs-kernel-server.default diff --git a/debian/nfs-kernel-server.dirs b/debian/nfs-kernel-server.dirs index 9fd8242..7d336b9 100644 --- a/debian/nfs-kernel-server.dirs +++ b/debian/nfs-kernel-server.dirs @@ -2,3 +2,4 @@ etc/init.d usr/sbin var/lib/nfs var/lib/nfs/v4recovery +usr/share/nfs-kernel-server/conffiles diff --git a/debian/nfs-kernel-server.postinst b/debian/nfs-kernel-server.postinst index fa43e13..c8b244d 100755 --- a/debian/nfs-kernel-server.postinst +++ b/debian/nfs-kernel-server.postinst @@ -4,6 +4,9 @@ case "$1" in configure) + ucf --three-way /usr/share/nfs-kernel-server/conffiles/etc.exports /etc/exports + ucf --three-way /usr/share/nfs-kernel-server/conffiles/nfs-kernel-server.default /etc/default/nfs-kernel-server + for f in /var/lib/nfs/etab \ /var/lib/nfs/rmtab \ /var/lib/nfs/xtab; do diff --git a/debian/nfs-kernel-server.postrm b/debian/nfs-kernel-server.postrm index 6ee42b7..4a79162 100755 --- a/debian/nfs-kernel-server.postrm +++ b/debian/nfs-kernel-server.postrm @@ -6,6 +6,17 @@ case "$1" in purge) update-rc.d nfs-kernel-server remove >/dev/null + for FILE in /etc/default/nfs-kernel-server /etc/exports; do + # Taken from the ucf example postrm + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + rm -f $FILE$ext + done + rm -f $FILE + if [ -x /usr/bin/ucf ]; then + ucf --purge $FILE + fi + done + rm -f /var/lib/nfs/etab \ /var/lib/nfs/rmtab \ /var/lib/nfs/xtab diff --git a/debian/rules b/debian/rules index 8661045..332778c 100755 --- a/debian/rules +++ b/debian/rules @@ -56,15 +56,26 @@ binary-arch: build for f in lockd statd showmount; do \ perl -pi -e "s#/usr(/sbin/(rpc\\.)?$$f)#\$$1#g" \ tmp/usr/share/man/man8/$$f.8; \ - done; \ - cp --preserve=timestamps etc.exports nfs-kernel-server/etc/exports; \ - cp --preserve=timestamps idmapd.conf nfs-common/etc/; \ - cp --preserve=timestamps gssapi_mech.conf nfs-common/etc/; \ + done; # Fixups End Here # + + # Move all files that will be managed by ucf + install -m 0644 debian/idmapd.conf debian/nfs-common/usr/share/nfs-common/conffiles/ + install -m 0644 debian/gssapi_mech.conf debian/nfs-common/usr/share/nfs-common/conffiles/ + install -m 0644 debian/nfs-common.default debian/nfs-common/usr/share/nfs-common/conffiles/ + install -m 0644 debian/nfs-kernel-server.default debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/ + install -m 0644 debian/etc.exports debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/ + + install -m 0644 debian/idmapd.conf.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/ + install -m 0644 debian/gssapi_mech.conf.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/ + install -m 0644 debian/nfs-common.default.md5sum debian/nfs-common/usr/share/nfs-common/conffiles/ + install -m 0644 debian/nfs-kernel-server.default.md5sum debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/ + install -m 0644 debian/etc.exports.md5sum debian/nfs-kernel-server/usr/share/nfs-kernel-server/conffiles/ + dh_installdocs -A dh_installdocs -pnfs-common debian/README.Debian.nfsv4 - dh_installexamples - dh_installinit -n + install -m 0755 debian/nfs-common.init debian/nfs-common/etc/init.d/nfs-common + install -m 0755 debian/nfs-kernel-server.init debian/nfs-kernel-server/etc/init.d/nfs-kernel-server dh_installman dh_link dh_installchangelogs ChangeLog