Please find attached the diff for the 0.100-2.1 NMU. -- Josselin Mouette /\./\
"Do you have any more insane proposals for me?"
diff -u udev-0.100/debian/rules udev-0.100/debian/rules --- udev-0.100/debian/rules +++ udev-0.100/debian/rules @@ -66,6 +66,7 @@ clean: $(MAKE) -f debian/sys-build.mk source.clean + debconf-updatepo dh_clean build: $(STAMP_DIR)/build @@ -161,6 +162,7 @@ extra/udev.vim extra/udevtest-all cp $B/etc/udev/gentoo/udev.rules $(UEX)/gentoo.rules cp -a $B/etc/udev/suse/ $B/etc/udev/redhat/ $(UEX)/ + dh_installdebconf dh_installinit --no-start --update-rcd-params='start 03 S .' dh_installinit --no-start --update-rcd-params='start 36 S .' \ --name=udev-mtab diff -u udev-0.100/debian/control udev-0.100/debian/control --- udev-0.100/debian/control +++ udev-0.100/debian/control @@ -2,7 +2,7 @@ Section: admin Priority: important Maintainer: Marco d'Itri <[EMAIL PROTECTED]> -Build-Depends: debhelper (>> 4.2), bzip2, libselinux1-dev (>= 1.28-1) +Build-Depends: debhelper (>> 4.2), bzip2, libselinux1-dev (>= 1.28-1), po-debconf Standards-Version: 3.7.2.0 Package: udev diff -u udev-0.100/debian/changelog udev-0.100/debian/changelog --- udev-0.100/debian/changelog +++ udev-0.100/debian/changelog @@ -1,3 +1,14 @@ +udev (0.100-2.1) unstable; urgency=low + + * Non-maintainer upload. + * udev.{templates,preinst}, rules: use debconf for prompting the user + about the upgrade from an incompatible kernel version. When a + suitable kernel is already installed or installing, only ask for + reboot. Otherwise, the user has to force the upgrade. (Closes: #369479) + * control: depend on po-debconf. + + -- Josselin Mouette <[EMAIL PROTECTED]> Sun, 1 Oct 2006 16:47:15 +0200 + udev (0.100-2) unstable; urgency=high * More fixes for SELinux support. (Closes: #387051) diff -u udev-0.100/debian/udev.preinst udev-0.100/debian/udev.preinst --- udev-0.100/debian/udev.preinst +++ udev-0.100/debian/udev.preinst @@ -1,18 +1,40 @@ #!/bin/sh -e +# Hack to get the dpkg process' PID despite using debconf +if [ -z "$PARENT_PID" ]; then + PARENT_PID=$PPID + export PARENT_PID +fi +. /usr/share/debconf/confmodule + supported_kernel() { - case "$(uname -r)" in + case "$1" in 2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;; 2.6.1[0-4]|2.6.1[0-4][!0-9]*) return 1 ;; esac return 0 } +check_installed_kernel() { + for ver in `ls /lib/modules`; do + supported_kernel "$ver" && return 0 + done + return 1 +} + +check_installing_kernel() { + for pkg in `ps hp $PARENT_PID -o args`; do + ver=$(echo $pkg | sed -nr "s/^.*linux-image-(2\.6\.[0-9]+)-[0-9]+-.*_.*_.*\.deb$/\1/p") + test -n "$ver" && supported_kernel "$ver" && return 0 + done + return 1 +} + check_kernel_version() { # skip the check if udev is not already active [ -d /dev/.udev/ ] || return 0 - supported_kernel && return + supported_kernel "$(uname -r)" && return if [ -e /etc/udev/kernel-upgrade ]; then echo "This version of udev requires a kernel >= 2.6.15, but the upgrade was forced." @@ -20,29 +42,29 @@ /sbin/udevd -d || true return 0 fi + + db_title Upgrading udev -cat <<ERR - -***************************************************************************** - -This version of udev requires a kernel >= 2.6.15, upgrade aborted. - -You can upgrade the kernel at the same time by creating the file -/etc/udev/kernel-upgrade and then trying again, e.g.: - -# touch /etc/udev/kernel-upgrade -# apt-get install udev initramfs-tools linux-image-2.6-k7-smp - -After upgrading udev this way you should reboot as soon as possible. - -If you will reboot before the new kernel will have been properly -installed then udev will not be started, possibly breaking the system -or even making it unbootable! - -***************************************************************************** - -ERR + if check_installed_kernel || check_installing_kernel; then + db_fset udev/reboot_needed seen false + db_input high udev/reboot_needed || true + db_go + db_stop + echo "A reboot is needed, but proceeding with the upgrade." + return 0 + fi + db_fset udev/new_kernel_needed seen false + db_reset udev/new_kernel_needed + db_input critical udev/new_kernel_needed || true + db_go + db_get udev/new_kernel_needed + if [ "$RET" = true ]; then + db_stop + echo "This version of udev requires a kernel >= 2.6.15, but the upgrade was forced." + return 0 + fi + db_stop exit 1 } only in patch2: unchanged: --- udev-0.100.orig/debian/po/templates.pot +++ udev-0.100/debian/po/templates.pot @@ -0,0 +1,65 @@ +# 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 <[EMAIL PROTECTED]>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: [EMAIL PROTECTED]" +"POT-Creation-Date: 2006-10-01 14:51+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <[EMAIL PROTECTED]>\n" +"Language-Team: LANGUAGE <[EMAIL PROTECTED]>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../udev.templates:1001 +msgid "Reboot needed after this upgrade" +msgstr "" + +#. Type: note +#. Description +#: ../udev.templates:1001 +msgid "" +"You are currently upgrading udev using an incompatible kernel version. A " +"compatible version is installed or being installed on your system, but you " +"need to reboot using this new kernel as soon as the upgrade is complete." +msgstr "" + +#. Type: note +#. Description +#: ../udev.templates:1001 +msgid "" +"Without a reboot with this new kernel version, your system may become " +"UNUSABLE." +msgstr "" + +#. Type: boolean +#. Description +#: ../udev.templates:2001 +msgid "Proceed with the upgrade nevertheless?" +msgstr "" + +#. Type: boolean +#. Description +#: ../udev.templates:2001 +msgid "" +"You are currently upgrading udev using an incompatible kernel version. You " +"MUST install a compatible kernel version (2.6.15 or more) before proceeding " +"with the upgrade, otherwise your system may become UNUSABLE. Packages with a " +"name starting with \"linux-image-2.6-\" provide a kernel image usable with " +"this new udev version." +msgstr "" + +#. Type: boolean +#. Description +#: ../udev.templates:2001 +msgid "" +"If you choose to upgrade udev nevertheless, you should install a compatible " +"kernel and reboot on it as soon as possible. You have been warned." +msgstr "" only in patch2: unchanged: --- udev-0.100.orig/debian/po/POTFILES.in +++ udev-0.100/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] udev.templates + only in patch2: unchanged: --- udev-0.100.orig/debian/udev.templates +++ udev-0.100/debian/udev.templates @@ -0,0 +1,24 @@ +Template: udev/reboot_needed +Type: note +_Description: Reboot needed after this upgrade + You are currently upgrading udev using an incompatible kernel version. A + compatible version is installed or being installed on your system, but + you need to reboot using this new kernel as soon as the upgrade is + complete. + . + Without a reboot with this new kernel version, your system may become + UNUSABLE. + +Template: udev/new_kernel_needed +Type: boolean +Default: false +_Description: Proceed with the upgrade nevertheless? + You are currently upgrading udev using an incompatible kernel version. + You MUST install a compatible kernel version (2.6.15 or more) before + proceeding with the upgrade, otherwise your system may become UNUSABLE. + Packages with a name starting with "linux-image-2.6-" provide a kernel + image usable with this new udev version. + . + If you choose to upgrade udev nevertheless, you should install a + compatible kernel and reboot on it as soon as possible. You have been + warned.
signature.asc
Description: Ceci est une partie de message numériquement signée