Bug#570046: Bug#568317: linux-image-* postinst did not correctly run lilo
This bug also applies to the scripts that kernel-package uses in the generated packages. I suspect that the //g modifiers can generally be removed. To see which regexps are duplicated and might not match as intended, run: for file in kernel/pkg/*/{post,pre}{inst,rm}; do echo $file: ; grep -o '/.*/[a-z]*g' $file | sort | uniq -cd done Ben. -- Ben Hutchings Humour is the best antidote to reality. signature.asc Description: This is a digitally signed message part
Bug#568823: kernel-package: See Bug#568317: linux-image-* postinst did not correctly run lilo
Hi, Thanks for your report. I agree that the /g modifier is a bug, since it shadows any attempt to use a pattern twice, and anchoring the patterns to the beginning is beneficial as well. One should note, though, that the do_bootloader variable has gone from the version of kernel-package in Sid and Squeeze, so the current problems you faced would not have been there with kernel-package generated images. I'll leave this bug open until I modify the pattern matches in k-p. Thanks again, manoj -- Rube Walker: Hey, Yogi, what time is it? Yogi Berra: You mean now? Manoj Srivastava sriva...@acm.org http://www.golden-gryphon.com/ 4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20 05B6 CF48 9438 C577 9A1C -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87iq9z4p1x@anzu.internal.golden-gryphon.com
Bug#568317: linux-image-* postinst did not correctly run lilo
Dear Ben, kernel-package has an old version of the script templates. The templates used by linux-2.6 are in debian/templates/temp.image.plain. Where do I find that? apt-get source linux-2.6 Sorry, am confused. Is that the same as apt-get install linux-source-2.6.26 It is not. I now tried that (not with apt-get but manually). I guess I needed the files: .../pool/main/l/linux-2.6/linux-2.6_2.6.26.orig.tar.gz .../pool/main/l/linux-2.6/linux-2.6_2.6.26-21.diff.gz (please confirm, or tell me what I messed up). After unpacking those, I find (essentially in the diff file) the .../linux-2.6-2.6.26/debian/templates/temp.image.plain/ directory. However, to my surprise, those files are older than those from the kernel-package directory, for example: diff -r /usr/share/kernel-package/pkg/image/postinst linux-2.6-2.6.26/debian/templates/temp.image.plain/postinst 8,10c8,10 # Last Modified On : Wed Oct 8 00:03:41 2008 # Last Machine Used: anzu.internal.golden-gryphon.com # Update Count : 360 --- # Last Modified On : Fri Sep 29 10:08:18 2006 # Last Machine Used: glaurung.internal.golden-gryphon.com # Update Count : 357 ... Does that mean that kernel-package is in fact newer, and you should import again then use my patches (sent previously)? - Should this bug somehow be given to kernel-package also (clone and reassign?): would you be able to do that? - BTW... lenny 5.0.4, with 2.6.26-21, was announced some time ago, but still http://packages.debian.org/search?keywords=linux-2.6searchon=sourcenamessuite=stablesection=all http://packages.debian.org/source/lenny/linux-2.6 show 2.6.26-19lenny2 : is that a problem? That is strange. Perhaps you should report a bug against www.debian.org. Would you be able to do that? (I guess should not use reportbug for that, am not sure how.) Thanks, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
On Sat, Feb 06, 2010 at 10:20:13AM +1100, paul.sz...@sydney.edu.au wrote: Dear Ben, kernel-package has an old version of the script templates. The templates used by linux-2.6 are in debian/templates/temp.image.plain. Where do I find that? apt-get source linux-2.6 Sorry, am confused. Is that the same as apt-get install linux-source-2.6.26 which would get me (and install) linux-source-2.6.26_2.6.26-21_all.deb and suggest to get/install kernel-package_11.015_all.deb ? I do not see anything about templates in either deb file, but see /usr/share/kernel-package/pkg/image/postinst in kernel-package. please 2.6.26 is old, we are working in sid on 2.6.32. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
Dear Paul, On Sun, Feb 07, 2010 at 10:02:47PM +1100, paul.sz...@sydney.edu.au wrote: I now tried that (not with apt-get but manually). I guess I needed the files: .../pool/main/l/linux-2.6/linux-2.6_2.6.26.orig.tar.gz .../pool/main/l/linux-2.6/linux-2.6_2.6.26-21.diff.gz (please confirm, or tell me what I messed up). After unpacking those, I find (essentially in the diff file) the as told in seperate mail that is outdated, as 2.6.32 is current dev. .../linux-2.6-2.6.26/debian/templates/temp.image.plain/ directory. However, to my surprise, those files are older than those from the kernel-package directory, for example: diff -r /usr/share/kernel-package/pkg/image/postinst linux-2.6-2.6.26/debian/templates/temp.image.plain/postinst 8,10c8,10 # Last Modified On : Wed Oct 8 00:03:41 2008 # Last Machine Used: anzu.internal.golden-gryphon.com # Update Count : 360 --- # Last Modified On : Fri Sep 29 10:08:18 2006 # Last Machine Used: glaurung.internal.golden-gryphon.com # Update Count : 357 ... well those lines have no other meanings as that they share a common ancestor, they have been changed a lot since. also 2.6.32 files have no longer those comments. Does that mean that kernel-package is in fact newer, and you should import again then use my patches (sent previously)? - Should this bug somehow be given to kernel-package also (clone and reassign?): would you be able to do that? don't know kernel-package is in slow maintenance, better have linux-2.6 fixed. but saw your old patch and can do that later tomorrow. thanks for your input. kind regards maks -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
Dear Maks, ... saw your old patch and can do that later tomorrow. Thanks. Please also fix current Debian stable, do not make us wait until 2.6.32 trickles down. Should this bug somehow be given to kernel-package also (clone and reassign?): would you be able to do that? don't know kernel-package is in slow maintenance, What does slow maintenance mean? They seem more up-to-date that linux-2.6 in Debian stable. Anyway please arrange for kernel-package to be fixed also. Cheers, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
On Mon, 2010-02-08 at 09:01 +1100, paul.sz...@sydney.edu.au wrote: Dear Maks, ... saw your old patch and can do that later tomorrow. Thanks. Please also fix current Debian stable, do not make us wait until 2.6.32 trickles down. Should this bug somehow be given to kernel-package also (clone and reassign?): would you be able to do that? don't know kernel-package is in slow maintenance, What does slow maintenance mean? They seem more up-to-date that linux-2.6 in Debian stable. Anyway please arrange for kernel-package to be fixed also. These maintainer script templates were written by Manoj Srivastava, who left the kernel team but still maintains kernel-package. The script templates in linux-2.6 and kernel-package are now two branches, and the date headers in linux-2.6 have not been updated since they are redundant with metadata maintained by the version control system. Ben. -- Ben Hutchings friends: People who know you well, but like you anyway. signature.asc Description: This is a digitally signed message part
Bug#568823: kernel-package: See Bug#568317: linux-image-* postinst did not correctly run lilo
Package: kernel-package Version: 11.015 Severity: normal Tags: patch Please see bug#568317 for details, particularly: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568317#26 for explanation and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568317#36 for patch. Cheers, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia -- System Information: Debian Release: 5.0.4 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.26-pk03.15-svr (SMP w/8 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/bash Versions of packages kernel-package depends on: ii binutils2.18.1~cvs20080103-7 The GNU assembler, linker and bina ii debianutils 2.30 Miscellaneous utilities specific t ii dpkg1.14.28 Debian package management system ii dpkg-dev1.14.28 Debian package development tools ii file4.26-1 Determines file type using magic ii gcc [c-compiler]4:4.3.2-2The GNU C compiler ii gcc-3.4 [c-compiler 3.4.6-9 The GNU C compiler ii gcc-4.1 [c-compiler 4.1.2-25 The GNU C compiler ii gcc-4.3 [c-compiler 4.3.2-1.1The GNU C compiler ii gettext 0.17-4 GNU Internationalization utilities ii make3.81-5 The GNU version of the make util ii module-init-tools 3.4-1tools for managing Linux kernel mo ii perl5.10.0-19lenny2 Larry Wall's Practical Extraction ii po-debconf 1.0.15 manage translated Debconf template ii util-linux 2.13.1.1-1 Miscellaneous system utilities Versions of packages kernel-package recommends: ii bzip2 1.0.5-1 high-quality block-sorting file co ii libc6-dev [libc-dev]2.7-18lenny2 GNU C Library: Development Librari Versions of packages kernel-package suggests: pn docbook-utils none (no description available) ii e2fsprogs 1.41.3-1 ext2/ext3/ext4 file system utiliti ii initramfs-tools [linux-in 0.92o tools for generating an initramfs pn libdb3-devnone (no description available) ii libncurses5-dev [libncurs 5.7+20081213-1 developer's libraries and docs for pn linux-source | kernel-sou none (no description available) pn xmlto none (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
Dear Ben, ... the date headers in linux-2.6 have not been updated ... I only whinged about headers; content in 2.6.26-21 is also in fact older than kernel-package. I do not know what you may have changed for bleeding-edge 2.6.32; and of course I want Debian stable to be updated (now or in the near future). Seeing your reluctance to talk to kernel-package, I now reported Bug#568823. Please report the issue with http://packages.debian.org/source/lenny/linux-2.6 . Cheers, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
On Fri, Feb 05, 2010 at 12:10:46PM +1100, paul.sz...@sydney.edu.au wrote: Dear Ben, kernel-package has an old version of the script templates. The templates used by linux-2.6 are in debian/templates/temp.image.plain. Where do I find that? apt-get source linux-2.6 or svn co svn://svn.debian.org/svn/kernel/dists/trunk/linux-2.6 I am using (working, building on) Debian lenny, building from linux-source-2.6.26-21.tar.bz2 . (Anyway, are not my suggested changes simple enough so you do not need actual patch files?) Possibly... I haven't compared yet. Ben. -- Ben Hutchings Beware of programmers who carry screwdrivers. - Leonard Brandwein signature.asc Description: Digital signature
Bug#568317: linux-image-* postinst did not correctly run lilo
Dear Ben, kernel-package has an old version of the script templates. The templates used by linux-2.6 are in debian/templates/temp.image.plain. Where do I find that? apt-get source linux-2.6 Sorry, am confused. Is that the same as apt-get install linux-source-2.6.26 which would get me (and install) linux-source-2.6.26_2.6.26-21_all.deb and suggest to get/install kernel-package_11.015_all.deb ? I do not see anything about templates in either deb file, but see /usr/share/kernel-package/pkg/image/postinst in kernel-package. BTW... lenny 5.0.4, with 2.6.26-21, was announced some time ago, but still http://packages.debian.org/search?keywords=linux-2.6searchon=sourcenamessuite=stablesection=all http://packages.debian.org/source/lenny/linux-2.6 show 2.6.26-19lenny2 : is that a problem? Thanks, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
reassign 568317 linux-2.6 retitle 568317 linux-image-* postinst did not correctly run lilo thanks On Thu, Feb 04, 2010 at 04:49:23PM +1100, paul.sz...@sydney.edu.au wrote: This is not a bug in perl, works as documented in 'man perlretut'. Right. The issue is with the /g modifier, as shown with script: This is bad usage in the linux-source-2.6.26 package. My /var/lib/dpkg/info/linux-image-2.6.26-*.postinst file has header: Should I report this bug (spurious, un-needed /g) to the linux-source-2.6.26 package, or will you be able to re-assign, or otherwise let Mr Srivastava know? Reassigning now. I see similar m//g usage in /var/lib/dpkg/info/linux-image-2.6.32-trunk-amd64.postinst but you could probably follow up and explain what exactly was incorrect about running lilo. -- Niko Tyni nt...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
Niko Tyni wrote: Reassigning now. ... Thanks. ... you could probably follow up and explain what exactly was incorrect about running lilo. Looking at my /var/lib/dpkg/info/linux-image-*.postinst files, I see in the code reading and parsing $CONF_LOC = '/etc/kernel-img.conf': ... $do_symlink = if /do_symlinks\s*=\s*(no|false|0)\s*$/ig; ... $do_bootloader = Yes if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig; $explicit_do_loader = YES if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig; ... Most of the match patterns are used once only; using /g on them is not necessary, and is probably wasteful (though perl is fast enough to handle such things). The pattern /do_bootloader.../ig is used twice. The first one may match; the second one will surely not match because of the spurious /g, thus explicit_do_loader will never be set (and lilo not run, or run after a question left un-answered in unattended runs of apt-get install). --- Minor issues, while I am criticizing perl style... These patterns are anchored at the end, should also be anchored at the beginning (and with explicit m//) like: $do_symlink = if m/^\s*do_symlinks\s*=\s*(no|false|0)\s*$/i; ... $image_dest = $1 if m/^\s*image_dest\s*=\s*(\S+)\s*$/i; I wonder about the need to use my() in a single-level script. --- Cheers, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#568317: linux-image-* postinst did not correctly run lilo
The linux-image postinst is known to be in bad shape but we are slowly cleaning it up. If you can provide patches, that would be most helpful. Ben. -- Ben Hutchings In a hierarchy, every employee tends to rise to his level of incompetence. signature.asc Description: Digital signature
Bug#568317: linux-image-* postinst did not correctly run lilo
Dear Ben, ... If you can provide patches, that would be most helpful. See below. I now see that the sources of these files are in package kernel-package (I do not know how that relates to linux-2.6). I only patched the spurious /g modifiers and cleaned up the patterns e.g. to anchor at the beginning; did not drop the unnecessary my(). Cheers, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia --- usr/share/kernel-package/pkg/headers/postinst.bak 2008-05-02 15:06:28.0 +1000 +++ usr/share/kernel-package/pkg/headers/postinst 2010-02-05 10:30:23.0 +1100 @@ -146,8 +146,8 @@ s/\#.*$//g; next if /^\s*$/; - $src_postinst_hook = $1 if /src_postinst_hook\s*=\s*(\S+)/ig; - $header_postinst_hook = $1 if /header_postinst_hook\s*=\s*(\S+)/ig; + $src_postinst_hook = $1 if m/^\s*src_postinst_hook\s*=\s*(\S+)\s*$/i; + $header_postinst_hook = $1 if m/^\s*header_postinst_hook\s*=\s*(\S+)\s*$/i; } close CONF; $have_conffile = Yes; --- usr/share/kernel-package/pkg/source/postinst.bak2008-05-02 15:06:28.0 +1000 +++ usr/share/kernel-package/pkg/source/postinst2010-02-05 10:31:06.0 +1100 @@ -57,7 +57,7 @@ s/\#.*$//g; next if /^\s*$/; - $src_postinst_hook = $1 if /src_postinst_hook\s*=\s*(\S+)/ig; + $src_postinst_hook = $1 if m/^\s*src_postinst_hook\s*=\s*(\S+)\s*$/i; } close CONF; $have_conffile = Yes; --- usr/share/kernel-package/pkg/doc/postinst.bak 2008-05-02 15:06:28.0 +1000 +++ usr/share/kernel-package/pkg/doc/postinst 2010-02-05 10:31:51.0 +1100 @@ -57,7 +57,7 @@ s/\#.*$//g; next if /^\s*$/; - $src_postinst_hook = $1 if /src_postinst_hook\s*=\s*(\S+)/ig; + $src_postinst_hook = $1 if m/^\s*src_postinst_hook\s*=\s*(\S+)\s*$/i; } close CONF; $have_conffile = Yes; --- usr/share/kernel-package/pkg/image/postinst.bak 2008-11-25 04:01:32.0 +1100 +++ usr/share/kernel-package/pkg/image/postinst 2010-02-05 10:43:59.0 +1100 @@ -116,60 +116,60 @@ warn Option image_in_boot is deprecated, and will go away. Use link_in_boot instead.\n if m/image_in_boot\s*=\s*/; - $do_symlink = if /do_symlinks\s*=\s*(no|false|0)\s*$/ig; - $no_symlink = if /no_symlinks\s*=\s*(no|false|0)\s*$/ig; - $reverse_symlink = if /reverse_symlink\s*=\s*(no|false|0)\s*$/ig; - $link_in_boot= if /link_in_boot\s*=\s*(no|false|0)\s*$/ig; - $link_in_boot= if /image_in_boot\s*=\s*(no|false|0)\s*$/ig; - $move_image = if /move_image\s*=\s*(no|false|0)\s*$/ig; - $clobber_modules = '' if /clobber_modules\s*=\s*(no|false|0)\s*$/ig; - $do_boot_enable = '' if /do_boot_enable\s*=\s*(no|false|0)\s*$/ig; - $do_bootfloppy = '' if /do_bootfloppy\s*=\s*(no|false|0)\s*$/ig; - $relative_links = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig; - $do_bootloader = '' if /do_bootloader\s*=\s*(no|false|0)\s*$/ig; - $do_initrd = '' if /do_initrd\s*=\s*(no|false|0)\s*$/ig; - $warn_initrd = '' if /warn_initrd\s*=\s*(no|false|0)\s*$/ig; - $use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig; - $silent_modules = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig; - $silent_loader = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig; - $warn_reboot = '' if /warn_reboot\s*=\s*(no|false|0)\s*$/ig; - $minimal_swap= '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig; - $ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/ig; - $relink_src_link = '' if /relink_src_link\s*=\s*(no|false|0)\s*$/ig; - $relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/ig; - $force_build_link = '' if /force_build_link\s*=\s*(no|false|0)\s*$/ig; - - $do_symlink = Yes if /do_symlinks\s*=\s*(yes|true|1)\s*$/ig; - $no_symlink = Yes if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig; - $reverse_symlink = Yes if /reverse_symlinks\s*=\s*(yes|true|1)\s*$/ig; - $link_in_boot= Yes if /link_in_boot\s*=\s*(yes|true|1)\s*$/ig; - $link_in_boot= Yes if /image_in_boot\s*=\s*(yes|true|1)\s*$/ig; - $move_image = Yes if /move_image\s*=\s*(yes|true|1)\s*$/ig; - $clobber_modules = Yes if /clobber_modules\s*=\s*(yes|true|1)\s*$/ig; - $do_boot_enable = Yes if /do_boot_enable\s*=\s*(yes|true|1)\s*$/ig; - $do_bootfloppy = Yes if /do_bootfloppy\s*=\s*(yes|true|1)\s*$/ig; - $do_bootloader = Yes if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig; - $explicit_do_loader = YES if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig; - $relative_links = Yes if /relative_links\s*=\s*(yes|true|1)\s*$/ig; - $do_initrd = Yes if /do_initrd\s*=\s*(yes|true|1)\s*$/ig; - $warn_initrd = Yes if
Bug#568317: linux-image-* postinst did not correctly run lilo
On Fri, Feb 05, 2010 at 10:54:33AM +1100, paul.sz...@sydney.edu.au wrote: Dear Ben, ... If you can provide patches, that would be most helpful. See below. I now see that the sources of these files are in package kernel-package (I do not know how that relates to linux-2.6). I only patched the spurious /g modifiers and cleaned up the patterns e.g. to anchor at the beginning; did not drop the unnecessary my(). [...] kernel-package has an old version of the script templates. The templates used by linux-2.6 are in debian/templates/temp.image.plain. Ben. -- Ben Hutchings In a hierarchy, every employee tends to rise to his level of incompetence. signature.asc Description: Digital signature
Bug#568317: linux-image-* postinst did not correctly run lilo
Dear Ben, kernel-package has an old version of the script templates. The templates used by linux-2.6 are in debian/templates/temp.image.plain. Where do I find that? I am using (working, building on) Debian lenny, building from linux-source-2.6.26-21.tar.bz2 . (Anyway, are not my suggested changes simple enough so you do not need actual patch files?) Thanks, Paul Paul Szabo p...@maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/ School of Mathematics and Statistics University of SydneyAustralia -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org