From: LaMont Jones Date: Fri, 24 Dec 2010 19:52:49 +0000 (-0700) Subject: use debconf (iff installed) to warn about noauto fileysstems with non-zero pass numbers X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ba5598d4c8cc7e9c7263ebc6d49c696d60c8564;p=util-linux use debconf (iff installed) to warn about noauto fileysstems with non-zero pass numbers Based on work by Serafeim Zanikolas Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566072 Signed-off-by: LaMont Jones --- diff --git a/debian/control b/debian/control index e7f23d37..2d1b88e1 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: util-linux -Build-Depends: libncurses5-dev, libncurses5, 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, libncurses5, 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 diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 00000000..831cb90d --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] util-linux.templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 00000000..399e5412 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,52 @@ +# 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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: util-linux@packages.debian.org\n" +"POT-Creation-Date: 2010-12-24 12:50-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: 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 "" +"/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 --git a/debian/rules b/debian/rules index e46255f7..17932f34 100755 --- a/debian/rules +++ b/debian/rules @@ -48,6 +48,15 @@ autofiles: AM_OPTS=--copy ./autogen.sh rm -rf autom4te.cache +newtemplate: + debconf-updatepo + +msgstats: + @cd debian/po && for i in *.po; do x=$$(msgfmt --statistics $$i 2>&1); echo $$i $$x; done; rm -f messages.mo *.po~ + +msg-email: + @podebconf-report-po + clean-preunpatch: dh_testdir dh_testroot @@ -165,6 +174,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 --git a/debian/util-linux.postinst b/debian/util-linux.postinst index 004f3487..b536eac9 100644 --- a/debian/util-linux.postinst +++ b/debian/util-linux.postinst @@ -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 && \ + test -f /usr/share/debconf/confmodule && \ + 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 --git a/debian/util-linux.templates b/debian/util-linux.templates new file mode 100644 index 00000000..553468d2 --- /dev/null +++ b/debian/util-linux.templates @@ -0,0 +1,16 @@ +Template: util-linux/noauto-with-nonzero-passnum +Type: note +_Description: Filesystem entries with noauto and non-zero pass number + /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).