Here's a slightly revised patch (the one before didn't actually call
dh_installdebconf)

-S
diff -Nurp orig/util-linux-2.17.2//debian/changelog 
util-linux-2.17.2//debian/changelog
--- orig/util-linux-2.17.2//debian/changelog    2010-11-28 14:52:49.000000000 
+0100
+++ util-linux-2.17.2//debian/changelog 2010-11-28 17:16:55.000000000 +0100
@@ -1,3 +1,16 @@
+util-linux (2.17.2-3.4) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * debian/util-linux.{postinst,templates}: warn user about possible
+    fsck failure upon boot, when fstab has entries with "noauto" and a
+    non-zero pass number (Closes: #566072)
+  * build-dep on po-debconf, and depend on debconf
+  * Create debian/po/{POTFILES.in,templates.pot}
+  * debian/rules: call debconf-updatepo in the clean target, and
+    dh_installdebconf in binary-indep
+
+ -- Serafeim Zanikolas <s...@debian.org>  Sun, 28 Nov 2010 14:07:07 +0100
+
 util-linux (2.17.2-3.3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nurp orig/util-linux-2.17.2//debian/control 
util-linux-2.17.2//debian/control
--- orig/util-linux-2.17.2//debian/control      2010-11-28 14:52:49.000000000 
+0100
+++ util-linux-2.17.2//debian/control   2010-11-28 15:17:39.000000000 +0100
@@ -1,5 +1,5 @@
 Source: util-linux
-Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4), gettext, zlib1g-dev, 
dpkg-dev (>=1.13.12), libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 
!hurd-i386], debhelper (>=5), lsb-release, pkg-config
+Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4), gettext, zlib1g-dev, 
dpkg-dev (>=1.13.12), libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 
!hurd-i386], debhelper (>=5), lsb-release, pkg-config, po-debconf
 Section: base
 Priority: required
 Uploaders: Scott James Remnant <sc...@ubuntu.com>
@@ -13,7 +13,7 @@ Architecture: any
 Section: utils
 Priority: required
 Essential: yes
-Depends: lsb-base (>= 3.0-6), tzdata (>=2006c-2), initscripts, dpkg (>= 
1.15.4) | install-info, ${misc:Depends}
+Depends: lsb-base (>= 3.0-6), tzdata (>=2006c-2), initscripts, dpkg (>= 
1.15.4) | install-info, debconf, ${misc:Depends}
 Pre-Depends: ${shlibs:Depends}
 Suggests: util-linux-locales, kbd | console-tools, dosfstools
 Replaces: schedutils, miscutils, setterm, fdisk, linux32, sparc-utils, 
e2fsprogs, ${util-linux:Conflicts}
diff -Nurp orig/util-linux-2.17.2//debian/po/POTFILES.in 
util-linux-2.17.2//debian/po/POTFILES.in
--- orig/util-linux-2.17.2//debian/po/POTFILES.in       1970-01-01 
01:00:00.000000000 +0100
+++ util-linux-2.17.2//debian/po/POTFILES.in    2010-11-28 17:18:42.000000000 
+0100
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] util-linux.templates
diff -Nurp orig/util-linux-2.17.2//debian/po/templates.pot 
util-linux-2.17.2//debian/po/templates.pot
--- orig/util-linux-2.17.2//debian/po/templates.pot     1970-01-01 
01:00:00.000000000 +0100
+++ util-linux-2.17.2//debian/po/templates.pot  2010-11-28 17:19:28.000000000 
+0100
@@ -0,0 +1,53 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <em...@address>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: util-li...@packages.debian.org\n"
+"POT-Creation-Date: 2010-11-28 17:19+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <em...@address>\n"
+"Language-Team: LANGUAGE <l...@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../util-linux.templates:1001
+msgid "Filesystem entries with noauto and non-zero pass number"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../util-linux.templates:1001
+msgid ""
+"It appears that /etc/fstab contains at least one entry that is marked as "
+"\"noauto\" with a non-zero pass number (meaning that the file system should "
+"not be automatically mounted upon boot, yet should be checked by fsck, the "
+"file system check utility)."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../util-linux.templates:1001
+msgid ""
+"From this release onwards, fsck will fail for file systems that have a non-"
+"zero pass number and are not available (eg. because they are unplugged) at "
+"the time fsck runs. This will cause the system to enter file system repair "
+"mode during boot."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../util-linux.templates:1001
+msgid ""
+"To avoid this problem, please adjust such fstab entries for removable "
+"devices, by either setting their pass number to zero, or adding the \"nofail"
+"\" option. For more details, please see mount(8)."
+msgstr ""
diff -Nurp orig/util-linux-2.17.2//debian/rules util-linux-2.17.2//debian/rules
--- orig/util-linux-2.17.2//debian/rules        2010-11-28 14:52:49.000000000 
+0100
+++ util-linux-2.17.2//debian/rules     2010-11-28 16:53:38.000000000 +0100
@@ -58,6 +58,7 @@ clean-preunpatch:
 clean: clean-preunpatch
        find . -name \*.o -exec rm {} \;
        rm -f build-stamp
+       debconf-updatepo
 
 install: build
        dh_testdir
@@ -170,6 +171,7 @@ endif
 binary-indep: build install
        dh_testdir -i
        dh_testroot -i
+       dh_installdebconf
        dh_installdeb -i
        dh_gencontrol -i -- -VUpstream=$(Upstream)
        dh_md5sums -i
diff -Nurp orig/util-linux-2.17.2//debian/util-linux.postinst 
util-linux-2.17.2//debian/util-linux.postinst
--- orig/util-linux-2.17.2//debian/util-linux.postinst  2010-11-28 
14:52:49.000000000 +0100
+++ util-linux-2.17.2//debian/util-linux.postinst       2010-11-28 
15:20:38.000000000 +0100
@@ -39,4 +39,16 @@ if [ -L /usr/doc/util-linux ] ; then
     rm -f /usr/doc/util-linux
 fi
 
+# warn about #566072, if applicable (when upgrading from versions prior to
+# 2.17, and there are fstab entries with noauto in the 4th column, and
+# non-zero in the 6th column (cases where the 6th column is ommited are OK)
+if test "x$2" != "x" && dpkg --compare-versions "$2" lt 2.17 \
+    && sed 's/\s\s*/ /g' /etc/fstab | cut -d' ' -f 1,4,6 \
+       | egrep -q '^[^#]\S+ \S*noauto\S* [^0]'; then
+
+    . /usr/share/debconf/confmodule
+    db_input critical util-linux/noauto-with-nonzero-passnum
+    db_go
+fi
+
 #DEBHELPER#
diff -Nurp orig/util-linux-2.17.2//debian/util-linux.templates 
util-linux-2.17.2//debian/util-linux.templates
--- orig/util-linux-2.17.2//debian/util-linux.templates 1970-01-01 
01:00:00.000000000 +0100
+++ util-linux-2.17.2//debian/util-linux.templates      2010-11-28 
16:58:53.000000000 +0100
@@ -0,0 +1,16 @@
+Template: util-linux/noauto-with-nonzero-passnum
+Type: note
+_Description: Filesystem entries with noauto and non-zero pass number
+ It appears that /etc/fstab contains at least one entry that is marked as
+ "noauto" with a non-zero pass number (meaning that the file system should not
+ be automatically mounted upon boot, yet should be checked by fsck, the
+ file system check utility).
+ .
+ From this release onwards, fsck will fail for file systems that have a
+ non-zero pass number and are not available (eg. because they are unplugged)
+ at the time fsck runs. This will cause the system to enter file system
+ repair mode during boot.
+ .
+ To avoid this problem, please adjust such fstab entries for removable
+ devices, by either setting their pass number to zero, or adding the "nofail"
+ option. For more details, please see mount(8).

Reply via email to