Bug#380159: kernel modules postinst script -- update templates to use dh_installmodules instead

2006-07-27 Thread Junichi Uekawa
Package: module-assistant
Version: 0.10.6

Hi,

>  > #!/bin/sh
>  > set -e
>  >
>  > SYSTEMMAP=/boot/System.map-_KVERS_
>  >
>  > if [ -f $SYSTEMMAP ] ; then
>  > depmod -ae -F $SYSTEMMAP _KVERS_
>  > elif [ "`uname -r`" = "_KVERS_" ] ; then
>  > depmod -a &
>  > fi
> 
> As of debhelper 5.0.37, dh_installmodules uses the System.map for the 
> target kernel as per template, iirc. No maintainer provided script 
> templates are required for this purpose if dh_installmodules is used.

Something like this?

diff -ur module-assistant-0.10.6/templates/debian/control 
module-assistant-0.10.7/templates/debian/control
--- module-assistant-0.10.6/templates/debian/control2005-04-10 
08:14:26.0 +0900
+++ module-assistant-0.10.7/templates/debian/control2006-07-28 
07:45:08.0 +0900
@@ -2,7 +2,7 @@
 Section: misc
 Priority: optional
 Maintainer: Eduard Bloch <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>= 4.0.0), bzip2
+Build-Depends: debhelper (>= 5.0.37), bzip2
 Standards-Version: 3.6.1
 
 Package: someproject-utils
diff -ur module-assistant-0.10.6/templates/debian/postinst.modules.in 
module-assistant-0.10.7/templates/debian/postinst.modules.in
--- module-assistant-0.10.6/templates/debian/postinst.modules.in
2005-04-10 08:22:15.0 +0900
+++ module-assistant-0.10.7/templates/debian/postinst.modules.in
2006-07-28 07:40:58.0 +0900
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "`uname -r`" = "_KVERS_" ]; then
-   /sbin/depmod -a
-fi
-
-#DEBHELPER#
-
-exit 0
diff -ur module-assistant-0.10.6/templates/debian/rules 
module-assistant-0.10.7/templates/debian/rules
--- module-assistant-0.10.6/templates/debian/rules  2005-04-10 
08:14:26.0 +0900
+++ module-assistant-0.10.7/templates/debian/rules  2006-07-28 
07:40:33.0 +0900
@@ -99,6 +99,7 @@
dh_installchangelogs
dh_compress
dh_fixperms
+   dh_installmodules
dh_installdeb
dh_gencontrol -- -v$(VERSION)
dh_md5sums


regards,
junichi
-- 
[EMAIL PROTECTED],netfort.gr.jp}   Debian Project


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: kernel modules postinst script

2006-07-23 Thread Kel Modderman

Hi,

Bernd wrote:
> #!/bin/sh
> set -e
>
> SYSTEMMAP=/boot/System.map-_KVERS_
>
> if [ -f $SYSTEMMAP ] ; then
> depmod -ae -F $SYSTEMMAP _KVERS_
> elif [ "`uname -r`" = "_KVERS_" ] ; then
> depmod -a &
> fi

As of debhelper 5.0.37, dh_installmodules uses the System.map for the 
target kernel as per template, iirc. No maintainer provided script 
templates are required for this purpose if dh_installmodules is used.


Thanks, Kel.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: kernel modules postinst script

2006-07-22 Thread Eduard Bloch
#include 
* Bernd Schubert [Sat, Jul 22 2006, 03:55:03PM]:
> Hi,
> 
> while I just build some kernel module packages for our clients and
> installing them, I think I found a bug applying to almost all kernel module
> packages.
> 
> Most packages have a file like postinst.modules.in with something like
> 
> #!/bin/sh
> set -e
> 
> if [ "`uname -r`" = "_KVERS_" ] ; then
>depmod -a &
> fi
> 
> Now imagine you are installing the package on a fileserver in a chroot and
> the file servers kernel version is different from _KVERS_. Furthermore, all
> clients mount their root directory read-only from the server.
> So /lib/modules/modules.dep will never be updated.
> 
> Why is not something like this used?

Because someone was too stupid, most likely me while creating bad
examples for others. Time for mass-bugfiling, IMO.

Eduard.

> #!/bin/sh
> set -e
> 
> SYSTEMMAP=/boot/System.map-_KVERS_
> 
> if [ -f $SYSTEMMAP ] ; then
> depmod -ae -F $SYSTEMMAP _KVERS_
> elif [ "`uname -r`" = "_KVERS_" ] ; then
> depmod -a &
> fi
> 
> Thanks,
> Bernd
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 

-- 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



kernel modules postinst script

2006-07-22 Thread Bernd Schubert
Hi,

while I just build some kernel module packages for our clients and
installing them, I think I found a bug applying to almost all kernel module
packages.

Most packages have a file like postinst.modules.in with something like

#!/bin/sh
set -e

if [ "`uname -r`" = "_KVERS_" ] ; then
   depmod -a &
fi

Now imagine you are installing the package on a fileserver in a chroot and
the file servers kernel version is different from _KVERS_. Furthermore, all
clients mount their root directory read-only from the server.
So /lib/modules/modules.dep will never be updated.

Why is not something like this used?

#!/bin/sh
set -e

SYSTEMMAP=/boot/System.map-_KVERS_

if [ -f $SYSTEMMAP ] ; then
depmod -ae -F $SYSTEMMAP _KVERS_
elif [ "`uname -r`" = "_KVERS_" ] ; then
depmod -a &
fi

Thanks,
Bernd


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]