Package: debirf
Version: 0.34
Severity: important
Tags: patch

When building on amd64 architecture and using the options
    DEBIRF_ARCH=i386
    DEBIRF_KERNEL_FLAVOUR=686-pae
debirf will copy the klibc.so and run-init from the host system, resulting in a
64bit binary inside a 32bit image (see line 180 and 181 in debirf).

A fix for this problem would be to install klibc-utils on the $DEBIRF_ROOT and
copy the files from there:
add klibc-utils to list of INCLUDE files for debootstrap and copy files from
$DEBIRF_ROOT

--- a/debirf
+++ b/debirf
@@ -42,7 +42,8 @@ export
DEVICE_ARCHIVE=${DEVICE_ARCHIVE:-/usr/share/debirf/devices.tar.gz}
 export INCLUDE=\
 busybox-static,\
 gpgv,\
-less
+less,\
+klibc-utils

 # list of packages to exclude from debootstrap
 export EXCLUDE=\
@@ -178,8 +179,8 @@ create_initrd_nested() {
     done

     # copy in run-init and needed libraries
-    cp -f /usr/lib/klibc/bin/run-init "$NEST_ROOT"/bin/
-    cp -f /lib/klibc-* "$NEST_ROOT"/lib/
+    cp -f "$DEBIRF_ROOT"/usr/lib/klibc/bin/run-init "$NEST_ROOT"/bin/
+    cp -f "$DEBIRF_ROOT"/lib/klibc-* "$NEST_ROOT"/lib/

     # symlink /lib64 if that is done on host
     # FIXME: is this necessary?



-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages debirf depends on:
ii  apt          1.0.9.6
ii  cpio         2.11+dfsg-4
ii  debootstrap  1.0.66
ii  fakechroot   2.17.2-1
ii  fakeroot     1.20.2-1
ii  klibc-utils  2.0.4-2

Versions of packages debirf recommends:
ii  grub-common      2.02~beta2-20
ii  lsb-release      4.1+Debian13+nmu1
ii  syslinux-common  3:6.03+dfsg-5
ii  xorriso          1.3.2-1.1

debirf suggests no packages.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to