modprobe (out of module-init-tools 3.7-pre5-1) complains a lot about
/etc/modprobe.d/nvidia-kernel-nkc at boot time:
WARNING: All config files need .conf: /etc/modprobe.d/nvidia-kernel-nkc, it will be ignored in a future release.
Below is a patch.
Regards
Harri
> Obviously this patch wasn't complete. Below is a
> better one.
>
> diff -ur nvidia-kernel-common-20080825+1/debian/changelog nvidia-kernel-common-20080825+1+nmu1/debian/changelog
> --- nvidia-kernel-common-20080825+1/debian/changelog 2008-09-01 20:22:35.000000000 +0200
> +++ nvidia-kernel-common-20080825+1+nmu1/debian/changelog 2009-03-07 07:22:21.000000000 +0100
> @@ -1,3 +1,10 @@
> +nvidia-kernel-common (20080825+1+nmu1) unstable; urgency=low
> +
> + * Non-maintainer upload.
> + * rename modprobe config file to nvidia-kernel-nkc.conf (closes: #518566)
> +
> + -- Harald Dunkel <harald...@t-online.de> Sat, 07 Mar 2009 07:21:49 +0100
> +
> nvidia-kernel-common (20080825+1) unstable; urgency=medium
>
> * Change maintainer.
> diff -ur nvidia-kernel-common-20080825+1/debian/preinst nvidia-kernel-common-20080825+1+nmu1/debian/preinst
> --- nvidia-kernel-common-20080825+1/debian/preinst 2008-08-25 22:51:21.000000000 +0200
> +++ nvidia-kernel-common-20080825+1+nmu1/debian/preinst 2009-03-07 07:16:30.000000000 +0100
> @@ -7,6 +7,9 @@
> rm -f /etc/devfs/conf.d/nvidia-kernel-nkc
> rm -f /etc/modutils/nvidia-kernel-nkc
> fi
> + if dpkg --compare-versions "$2" le-nl '20080825+1'; then
> + rm -f /etc/modprobe.d/nvidia-kernel-nkc
> + fi
> fi
>
> #DEBHELPER#
> diff -ur nvidia-kernel-common-20080825+1/debian/rules nvidia-kernel-common-20080825+1+nmu1/debian/rules
> --- nvidia-kernel-common-20080825+1/debian/rules 2008-08-26 18:50:25.000000000 +0200
> +++ nvidia-kernel-common-20080825+1+nmu1/debian/rules 2009-03-07 06:45:36.000000000 +0100
> @@ -21,7 +21,7 @@
>
> dh_installinit --name=nvidia-kernel -- start 20 2 3 4 5 . stop 20 1 .
>
> - install -D -m 0644 nvidia-kernel.modules-2.6 debian/nvidia-kernel-common/etc/modprobe.d/nvidia-kernel-nkc
> + install -D -m 0644 nvidia-kernel.modules-2.6 debian/nvidia-kernel-common/etc/modprobe.d/nvidia-kernel-nkc.conf
>
>
> # Build architecture-independent files here.
This one is still not good, since it fails to preserve local
modifications. Here is a patch that does this, shamelessly stolen from
the Ubuntu package:
On Tue, Mar 31, 2009 at 01:37:56PM +0200, Sven Joachim wrote:
> Here is a patch that does this, shamelessly stolen from
> the Ubuntu package:
>
> diff -Nru nvidia-kernel-common-20080825+1/debian/changelog nvidia-kernel-common-20080825+1+nmu1/debian/changelog
> --- nvidia-kernel-common-20080825+1/debian/changelog 2008-09-01 20:22:35.000000000 +0200
> +++ nvidia-kernel-common-20080825+1+nmu1/debian/changelog 2009-03-31 13:22:24.000000000 +0200
> @@ -1,3 +1,11 @@
> +nvidia-kernel-common (20080825+1+nmu1) unstable; urgency=low
> +
> + * Non-maintainer upload.
> + * Rename modprobe config file to nvidia-kernel-nkc.conf,
> + patch stolen from the Ubuntu package (closes: #518566).
> +
> + -- Sven Joachim <sven...@gmx.de> Tue, 31 Mar 2009 13:18:57 +0200
> +
> nvidia-kernel-common (20080825+1) unstable; urgency=medium
>
> * Change maintainer.
> diff -Nru nvidia-kernel-common-20080825+1/debian/postinst nvidia-kernel-common-20080825+1+nmu1/debian/postinst
> --- nvidia-kernel-common-20080825+1/debian/postinst 1970-01-01 01:00:00.000000000 +0100
> +++ nvidia-kernel-common-20080825+1+nmu1/debian/postinst 2009-03-05 21:13:25.000000000 +0100
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +
> +set -e
> +
> +if [ "$1" = "configure" ]; then
> + if [ -e "/etc/modprobe.d/nvidia-kernel-nkc" ]; then
> + echo "Preserving user changes to /etc/modprobe.d/nvidia-kernel-nkc.conf ..."
> + if [ -e "/etc/modprobe.d/nvidia-kernel-nkc.conf" ]; then
> + mv -f "/etc/modprobe.d/nvidia-kernel-nkc.conf" "/etc/modprobe.d/nvidia-kernel-nkc.conf.dpkg-new"
> + fi
> + mv -f "/etc/modprobe.d/nvidia-kernel-nkc" "/etc/modprobe.d/nvidia-kernel-nkc.conf"
> + fi
> +fi
> +
> +#DEBHELPER#
> diff -Nru nvidia-kernel-common-20080825+1/debian/preinst nvidia-kernel-common-20080825+1+nmu1/debian/preinst
> --- nvidia-kernel-common-20080825+1/debian/preinst 2008-08-25 22:51:21.000000000 +0200
> +++ nvidia-kernel-common-20080825+1+nmu1/debian/preinst 2009-03-31 13:14:35.000000000 +0200
> @@ -9,4 +9,14 @@
> fi
> fi
>
> +if [ "$1" = install ] || [ "$1" = upgrade ]; then
> + if [ -e "/etc/modprobe.d/nvidia-kernel-nkc" ]; then
> + if [ "`md5sum \"/etc/modprobe.d/nvidia-kernel-nkc\" | sed -e \"s/ .*//\"`" = \
> + "`dpkg-query -W -f='${Conffiles}' nvidia-kernel-common | sed -n -e \"\\\\' /etc/modprobe.d/nvidia-kernel-nkc's/.* //p\"`" ]
> + then
> + rm -f "/etc/modprobe.d/nvidia-kernel-nkc"
> + fi
> + fi
> +fi
> +
> #DEBHELPER#
> diff -Nru nvidia-kernel-common-20080825+1/debian/rules nvidia-kernel-common-20080825+1+nmu1/debian/rules
> --- nvidia-kernel-common-20080825+1/debian/rules 2008-08-26 18:50:25.000000000 +0200
> +++ nvidia-kernel-common-20080825+1+nmu1/debian/rules 2009-03-31 13:14:42.000000000 +0200
> @@ -21,7 +21,7 @@
>
> dh_installinit --name=nvidia-kernel -- start 20 2 3 4 5 . stop 20 1 .
>
> - install -D -m 0644 nvidia-kernel.modules-2.6 debian/nvidia-kernel-common/etc/modprobe.d/nvidia-kernel-nkc
> + install -D -m 0644 nvidia-kernel.modules-2.6 debian/nvidia-kernel-common/etc/modprobe.d/nvidia-kernel-nkc.conf
>
>
> # Build architecture-independent files here.
--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jame...@debian.org>
This patch is a bit incomplete. It does not deal with the case where the
upgrade fails. A postrm is needed to get the old configuration file back
in
this case (a corner case, admittedly). I have prepared such a patch.
I have (as announced on the mailing-list) a nvidia-kernel-common package
which resolves all declared bugs,
and some others. I post the relevant parts here for reference, but as some
reformatting was involved,
I hope the patch is good enough.