Your message dated Tue, 1 Aug 2017 11:12:00 +0300
with message-id <[email protected]>
and subject line Re: Bug#870329: qemu-user-static: please make it support a 
configuration file for QEMU_CPU etc
has caused the Debian Bug report #870329,
regarding qemu-user-static: please make it support a configuration file for 
QEMU_CPU etc
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.)


-- 
870329: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870329
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: qemu-user-static
Version: 1:2.8+dfsg-6
Severity: normal

When /usr/bin/qemu-arm-static is run by default it emulates armv7l.  I want to
emulate armv5tel so I need to set QEMU_CPU=pxa250 before running
/usr/bin/qemu-arm-static.  This is OK when I want to run a single process
or chroot shell.  But when I want to have a full environment running with
systemd-nspawn and ssh to it things don't work.

I wrote the following wrapper to /usr/bin/qemu-arm-static as a hack to work
around this, but it is annoying to deploy.  It would be much easier if
/usr/bin/qemu-arm-static would read /etc/qemu/arm.conf or something to get
configuration for such things.

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
  if(setenv("QEMU_CPU", "pxa250", 1))
  {
    printf("Can't set $QEMU_CPU\n");
    return 1;
  }
  execv("/usr/bin/qemu-arm-static.orig", argv);
  printf("Can't execute \"%s\" because of qemu failure\n", argv[0]);
  return 1;
}

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE= 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

qemu-user-static depends on no packages.

Versions of packages qemu-user-static recommends:
ii  binfmt-support  2.1.7-1

Versions of packages qemu-user-static suggests:
ii  sudo  1.8.20p2-1

-- no debconf information

--- End Message ---
--- Begin Message ---
01.08.2017 09:42, Russell Coker wrote:
> Package: qemu-user-static
> Version: 1:2.8+dfsg-6
> Severity: normal
> 
> When /usr/bin/qemu-arm-static is run by default it emulates armv7l.  I want to
> emulate armv5tel so I need to set QEMU_CPU=pxa250 before running
> /usr/bin/qemu-arm-static.  This is OK when I want to run a single process
> or chroot shell.  But when I want to have a full environment running with
> systemd-nspawn and ssh to it things don't work.
> 
> I wrote the following wrapper to /usr/bin/qemu-arm-static as a hack to work
> around this, but it is annoying to deploy.  It would be much easier if
> /usr/bin/qemu-arm-static would read /etc/qemu/arm.conf or something to get
> configuration for such things.

I think using a conff file here is wrong, since it will also be global, but
it smells like the cpu type should be per-instance, local to this environment.

Can't systemd-nspawn systemd unit set environment variables?  I dunno but I
thought it can.

At any rate, if you disagree, please bring this upstream. I definitely wont
add this feature to be specific to debian, it should be either upstream or
not implemented. I think, anyway.

Thanks,

/mjt

--- End Message ---

Reply via email to