Package: qemu
Version: 0.9.0-1netsweng4
Severity: normal
Tags: patch

Admitedly, this one is a bit ugly since it involves making qemu be setuid root,
but with this fix, fakeroot will work inside of a chroot of another 
architecture.
With this, I can use sbuild on top of a chroot of another architecture to build
packages for that architecture (ie arm on x86_64). This setup is similar to
http://wiki.debian.org/QemuUserEmulation, but does not need the dpkg-cross 
stuff.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages qemu depends on:
ii  bochsbios                   2.3-2        BIOS for the Bochs emulator
ii  libasound2                  1.0.13-2     ALSA library
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libncurses5                 5.5-5        Shared libraries for terminal hand
ii  libsdl1.2debian             1.2.11-8     Simple DirectMedia Layer
ii  openhackware                0.4.1-2      OpenFirmware emulator for PowerPC
ii  proll                       18-2         JavaStation PROM 2.x compatible re
ii  vgabios                     0.6a-1       VGA BIOS software for the Bochs an
ii  zlib1g                      1:1.2.3-13   compression library - runtime

Versions of packages qemu recommends:
ii  debootstrap                   0.3.3.2    Bootstrap a basic Debian system
ii  sharutils                     1:4.2.1-15 shar, unshar, uuencode, uudecode
pn  vde2                          <none>     (no description available)

-- no debconf information
#DPATCHLEVEL=0
--- linux-user/main.c.org       2007-03-13 10:59:16.000000000 -0400
+++ linux-user/main.c   2007-03-13 11:01:16.000000000 -0400
@@ -1775,6 +1775,11 @@
     env = cpu_init();
     global_env = env;
     
+    if(getenv("FAKEROOTKEY") ){
+       putenv("LD_PRELOAD=libfakeroot-sysv.so");
+       
putenv("LD_LIBRARY_PATH=/usr/lib/libfakeroot:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot");
+    }
+                
     if (loader_exec(filename, argv+optind, environ, regs, info) != 0) {
        printf("Error loading %s\n", filename);
        _exit(1);

Reply via email to