Your message dated Mon, 11 Aug 2025 11:10:06 +0300
with message-id <[email protected]>
and subject line Re: Bug#414805: qemu: can't use fakeroot in linux-user target 
when setuid root
has caused the Debian Bug report #414805,
regarding qemu: can't use fakeroot in linux-user target when setuid root
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
414805: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=414805
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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);

--- End Message ---
--- Begin Message ---
Version: 0.11.1-1

On Fri, 29 Nov 2013 10:51:38 -0500 (EST) Stuart Anderson <[email protected]> wrote:
On Fri, 29 Nov 2013, Michael Tokarev wrote:

> Do you know _why_ it fails in the first place?

Been a while 8-), but IIRC, this was a follow-on to bug #412032. If qemu
was made setuid root, then the env needed to be restored to get the right
behavior. If there is now another way of accomplishing setuid capability
via binfmt, and is suggested in #412032, then this part of the fix is
most likely not needed, so closing it is fine.
This has been fixed quite long time ago, in version 0.11.1-1, when
qemu package in debian registered with binfmt_misc subsystem:

qemu (0.11.1-1) unstable; urgency=low

  [ Aurelien Jarno ]
  * qemu-user-static: register QEMU with binfmt mecanism. Closes:
    #306637.

 -- Aurelien Jarno <[email protected]>  Sun, 27 Dec 2009 12:09:11 +0100


Closing this bug report finally.

Thanks,

/mjt

--- End Message ---

Reply via email to