Package: squashfs-tools
Version: 1:4.2-4+b1
Severity: normal
I am using the Pseudo operations to change the mode/uid/gid of existing files.
But it doesn't work with subdirectories :
$ cat /tmp/squa.lst
/bin m 0777 0 0
/bin/tata m 0777 0 0
mcastet@colossus:/tmp/test$ ls -lR
..:
total 4
drwxr-xr-x 3 mcastet mcastet 4096 Mar 2 16:10 bin
../bin:
total 4
drwxr-xr-x 2 mcastet mcastet 4096 Mar 2 16:10 tata
-rw-r--r-- 1 mcastet mcastet 0 Mar 2 16:01 toto
../bin/tata:
total 0
$ cat /tmp/squa.lst
/bin m 0777 0 0
/bin/tata m 0777 0 0
$ rm /tmp/image.sq; mksquashfs . /tmp/image.sq -pf /tmp/squa.lst
bin already exists as a non directory. Ignoring /bin/tata!
[...]
The problem seems to be in the pseudo parsing code.
Matthieu
PS : attached a possible fix
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)
Kernel: Linux 3.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
Versions of packages squashfs-tools depends on:
ii libc6 2.13-27
ii liblzma5 5.1.1alpha+20110809-3
ii liblzo2-2 2.06-1
ii zlib1g 1:1.2.6.dfsg-2
squashfs-tools recommends no packages.
squashfs-tools suggests no packages.
-- no debconf information
--- pseudo.c 2012-03-02 16:28:03.000000000 +0100
+++ pseudo.c.new 2012-03-02 16:27:57.000000000 +0100
@@ -155,7 +155,7 @@
*/
if(target[0] != '\0') {
/* entry must exist as a 'd' type pseudo file */
- if(pseudo->name[i].dev->type == 'd')
+ if(pseudo->name[i].dev->type == 'd' || pseudo->name[i].dev->type == 'm')
/* recurse adding child components */
pseudo->name[i].pseudo =
add_pseudo(NULL, pseudo_dev,