[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#201740: rootskel: Files in /lib/debian-installer.d/ break mklibs



Package: rootskel
Version: +N/A; reported 2003-07-17
Severity: critical

The recently created files in /lib/debian-installer.d/ break mklibs:

# Library reduction.
mkdir -p ./tmp/floppy/tree/lib
mklibs -v -d ./tmp/floppy/tree/lib --root=./tmp/floppy/tree `find ./tmp/floppy -type f -perm +0111 -o -name '*.so'`
Command failed with status 1 : readelf --program-headers ./tmp/floppy/tree/lib/debian-installer.d/S30term-linux
With output: readelf: Error: Unable to read in 25964 bytes of section headers
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
make: *** [floppy-tree-stamp] Error 1

This is due to recently introduced rpath checks.  mklibs
has code to prevent such bugs:

objects = {}  # map from inode to filename
for prog in proglist:
    inode = os.stat(prog)[ST_INO]
    if objects.has_key(inode):
        debug(DEBUG_SPAM, prog, "is a hardlink to", objects[inode])
    elif so_pattern.match(prog):
        debug(DEBUG_SPAM, prog, "is a library")
    elif script_pattern.match(open(prog).read(256)):
        debug(DEBUG_SPAM, prog, "is a script")
    else:
        objects[inode] = prog

So, if those scripts would start with #! mklibs would happily
ignore them.

We have two solutions:

1. Either add #!/bin/sh to those scripts, even if they are
only sourced in /sbin/debian-installer.

2. Put them into some other place outside /lib.


Any preferences?

-- 
CYa,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger mlang@db.debian.org
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44



Reply to: