Mailinglist Archive: opensuse-commit (1446 mails)

< Previous Next >
commit qemu for openSUSE:Factory
Hello community,

here is the log from the commit of package qemu for openSUSE:Factory checked in
at 2012-06-16 11:44:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qemu (Old)
and /work/SRC/openSUSE:Factory/.qemu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qemu", Maintainer is "BROGERS@xxxxxxxx"

Changes:
--------
--- /work/SRC/openSUSE:Factory/qemu/qemu.changes 2012-06-10
21:53:04.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.qemu.new/qemu.changes 2012-06-16
11:44:12.000000000 +0200
@@ -1,0 +2,28 @@
+Thu Jun 14 14:39:57 UTC 2012 - afaerber@xxxxxxx
+
+- revert qemu-bridge-helper mode change (cf. BNC#765948)
+
+-------------------------------------------------------------------
+Mon Jun 13 13:44:28 UTC 2012 - brogers@xxxxxxxx
+
+- don't use permissions.d
+
+-------------------------------------------------------------------
+Wed Jun 13 08:19:01 UTC 2012 - agraf@xxxxxxxx
+
+- Add fix for bogus losetup ioctl to not warn us about it
+
+-------------------------------------------------------------------
+Sat Jun 9 19:09:39 UTC 2012 - brogers@xxxxxxxx
+
+- Set up bridge helper as a setuid executable
+
+-------------------------------------------------------------------
+Sat Jun 9 12:17:45 UTC 2012 - afaerber@xxxxxxx
+
+- Add patch for specifying --libexecdir
+* Fixes having to specify the path to qemu-bridge-helper manually
+- Drop superfluous `make qemu-img`
+- Move qemu-bridge-helper to its own subpackage, to share with KVM
+
+-------------------------------------------------------------------

New:
----
0022-use-libexecdir-instead-of-ignoring-.patch
0023-linux-user-Ignore-broken-loop-ioctl.patch
bridge.conf

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qemu.spec ++++++
--- /var/tmp/diff_new_pack.FavsVN/_old 2012-06-16 11:44:14.000000000 +0200
+++ /var/tmp/diff_new_pack.FavsVN/_new 2012-06-16 11:44:14.000000000 +0200
@@ -45,8 +45,11 @@
Patch0019: 0019-linux-user-ARM-Ignore-immediate-val.patch
Patch0020: 0020-linux-user-arm-no-tb_flush-on-reset.patch
Patch0021: 0021-linux-user-fix-multi-threaded-proc-.patch
+Patch0022: 0022-use-libexecdir-instead-of-ignoring-.patch
+Patch0023: 0023-linux-user-Ignore-broken-loop-ioctl.patch
# this is to make lint happy
Source300: rpmlintrc
+Source302: bridge.conf
Source400: update_git.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: SDL-devel
@@ -86,7 +89,11 @@
BuildRequires: fdupes
BuildRequires: glib2-devel
BuildRequires: libvdeplug3-devel
+BuildRequires: pwdutils
BuildRequires: python
+Requires: /usr/sbin/groupadd
+Requires: pwdutils
+Requires: qemu-tools
Requires: timezone
Requires: virt-utils

@@ -97,6 +104,21 @@
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
as PC and PowerMac systems.

+%package tools
+Summary: Universal CPU emulator -- Tools
+Group: System/Emulators/PC
+Provides: qemu:%_libexecdir/qemu-bridge-helper
+PreReq: permissions
+
+%description tools
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains various tools, including a bridge helper.
+
%package linux-user
Summary: Universal CPU emulator -- Linux User binaries
Group: System/Emulators/PC
@@ -109,9 +131,9 @@
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
as PC and PowerMac systems.

-This sub package contains static linked binaries for runnign linux-user
+This sub-package contains statically linked binaries for running linux-user
emulations. This can be used together with the OBS build script to
-run cross architectures builds
+run cross-architecture builds.

%prep
%setup -q
@@ -136,12 +158,15 @@
%patch0019 -p1
%patch0020 -p1
%patch0021 -p1
+%patch0022 -p1
+%patch0023 -p1

%build
# build QEMU
mkdir -p dynamic
# build qemu-system
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --libexecdir=%_libexecdir \
--audio-card-list="ac97 es1370 sb16 cs4231a adlib gus" \
--audio-drv-list="alsa sdl" --enable-mixemu --enable-vde \
--enable-curl \
@@ -156,11 +181,11 @@
--disable-spice
%endif
make %{?jobs:-j%jobs} V=1
-make qemu-img V=1
mv *-softmmu/qemu-system-* qemu-io qemu-bridge-helper dynamic || true
make clean
# build userland emus
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --libexecdir=%_libexecdir \
--enable-linux-user \
--disable-system \
--static --disable-linux-aio \
@@ -172,7 +197,7 @@
make %{?jobs:-j%jobs} V=1

%install
-make install DESTDIR=$RPM_BUILD_ROOT libexecdir=%_libexecdir
+make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%_mandir/man1/qemu-img.1
rm -f $RPM_BUILD_ROOT/%_mandir/man8/qemu-nbd.8
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
@@ -182,6 +207,7 @@
install -m 755 scripts/qemu-binfmt-conf.sh $RPM_BUILD_ROOT/%_sbindir
install -d -m 755 $RPM_BUILD_ROOT/%_libexecdir
install -m 755 dynamic/qemu-bridge-helper $RPM_BUILD_ROOT/%_libexecdir
+install -D -m 644 %{SOURCE302} $RPM_BUILD_ROOT/%{_sysconfdir}/qemu/bridge.conf
%ifnarch %ix86 x86_64
ln -sf ../../../emul/ia32-linux $RPM_BUILD_ROOT/usr/share/qemu/qemu-i386
%endif
@@ -193,12 +219,25 @@
%clean
rm -rf ${RPM_BUILD_ROOT}

+%pre
+%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm
2>/dev/null
+%{_bindir}/getent group qemu >/dev/null || %{_sbindir}/groupadd -r qemu
2>/dev/null
+%{_bindir}/getent passwd qemu >/dev/null || \
+ %{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
+ -c "qemu user" qemu
+
+%if 0%{?suse_version} >= 1130
+%post tools
+%set_permissions %_libexecdir/qemu-bridge-helper
+
+%verifyscript tools
+%verify_permissions %_libexecdir/qemu-bridge-helper
+%endif
+
%files
%defattr(-, root, root)
%doc COPYING COPYING.LIB Changelog README TODO VERSION qemu-doc.html
qemu-tech.html
-%_bindir/qemu-io
%_bindir/qemu-system-*
-%_libexecdir/qemu-bridge-helper
%doc %_mandir/man[18]/qemu*.[18].gz
%_datadir/%name
%ifnarch %ix86 x86_64 ia64
@@ -207,6 +246,12 @@
%dir %_sysconfdir/%name
%config %_sysconfdir/%name/target-x86_64.conf

+%files tools
+%defattr(-, root, root)
+%_bindir/qemu-io
+%verify(not mode) %_libexecdir/qemu-bridge-helper
+%config %_sysconfdir/%name/bridge.conf
+
%files linux-user
%defattr(-, root, root)
%_bindir/qemu-alpha

++++++ 0019-linux-user-ARM-Ignore-immediate-val.patch ++++++
--- /var/tmp/diff_new_pack.FavsVN/_old 2012-06-16 11:44:14.000000000 +0200
+++ /var/tmp/diff_new_pack.FavsVN/_new 2012-06-16 11:44:14.000000000 +0200
@@ -1,8 +1,7 @@
From 8cc5120497695e7ea8dde9b096eb6c8cb9b6ac35 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@xxxxxxx>
Date: Tue, 29 May 2012 17:28:07 +0200
-Subject: [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb
- mode
+Subject: [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb mode

When running in thumb mode, Linux doesn't evaluate the immediate value
of the svc instruction, but instead just always assumes the syscall number

++++++ 0022-use-libexecdir-instead-of-ignoring-.patch ++++++
From 57fd4d50146ef90693d569ee799f7e9e9d606e05 Mon Sep 17 00:00:00 2001
From: Michael Tokarev <mjt@xxxxxxxxxx>
Date: Thu, 7 Jun 2012 01:11:00 +0400
Subject: [PATCH] use --libexecdir instead of ignoring it first and reinventing
it later
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Commit 7b93fadf3a38d1ed65ea5536a52efc2772c6e3b8 "Add basic version
of bridge helper" put the bridge helper executable into a fixed
${prefix}/libexec/ location, instead of using ${libexecdir} for
this. At the same time, --libexecdir is being happily ignored
by ./configure. Even more, the same patch sets unused $libexecdir
variable in the generated config-host.mak, and uses fixed string
(\${prefix}/libexecdir) for the bridge helper binary.

Fix this braindamage by introducing $libexecdir variable, using
it for the bridge helper binary, and recognizing --libexecdir.

This patch is applicable to stable-1.1.

Signed-off-by: Michael Tokarev <mjt@xxxxxxxxxx>
Signed-off-by: Andreas Färber <afaerber@xxxxxxx>
---
configure | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index de92ac2..850821b 100755
--- a/configure
+++ b/configure
@@ -159,6 +159,7 @@ datadir="\${prefix}/share"
qemu_docdir="\${prefix}/share/doc/qemu"
bindir="\${prefix}/bin"
libdir="\${prefix}/lib"
+libexecdir="\${prefix}/libexec"
includedir="\${prefix}/include"
sysconfdir="\${prefix}/etc"
confsuffix="/qemu"
@@ -587,6 +588,8 @@ for opt do
;;
--libdir=*) libdir="$optarg"
;;
+ --libexecdir=*) libexecdir="$optarg"
+ ;;
--includedir=*) includedir="$optarg"
;;
--datadir=*) datadir="$optarg"
@@ -597,7 +600,7 @@ for opt do
;;
--sysconfdir=*) sysconfdir="$optarg"
;;
- --sbindir=*|--libexecdir=*|--sharedstatedir=*|--localstatedir=*|\
+ --sbindir=*|--sharedstatedir=*|--localstatedir=*|\
--oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
--htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
# These switches are silently ignored, for compatibility with
@@ -2945,6 +2948,7 @@ echo "Install prefix $prefix"
echo "BIOS directory `eval echo $qemu_datadir`"
echo "binary directory `eval echo $bindir`"
echo "library directory `eval echo $libdir`"
+echo "libexec directory `eval echo $libexecdir`"
echo "include directory `eval echo $includedir`"
echo "config directory `eval echo $sysconfdir`"
if test "$mingw32" = "no" ; then
@@ -3048,14 +3052,14 @@ echo all: >> $config_host_mak
echo "prefix=$prefix" >> $config_host_mak
echo "bindir=$bindir" >> $config_host_mak
echo "libdir=$libdir" >> $config_host_mak
+echo "libexecdir=$libexecdir" >> $config_host_mak
echo "includedir=$includedir" >> $config_host_mak
echo "mandir=$mandir" >> $config_host_mak
echo "sysconfdir=$sysconfdir" >> $config_host_mak
echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
-echo "libexecdir=\${prefix}/libexec" >> $config_host_mak
-echo "CONFIG_QEMU_HELPERDIR=\"$prefix/libexec\"" >> $config_host_mak
+echo "CONFIG_QEMU_HELPERDIR=\"$libexecdir\"" >> $config_host_mak

echo "ARCH=$ARCH" >> $config_host_mak
if test "$debug_tcg" = "yes" ; then
++++++ 0023-linux-user-Ignore-broken-loop-ioctl.patch ++++++
From fa3ea9d74060806eb6fc0792483d41c3a684e2d0 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@xxxxxxx>
Date: Tue, 12 Jun 2012 04:41:10 +0200
Subject: [PATCH] linux-user: Ignore broken loop ioctl

During invocations of losetup, we run into an ioctl that doesn't
exist. However, because of that we output an error, which then
screws up the kiwi logic around that call.

So let's silently ignore that bogus ioctl.

Signed-off-by: Alexander Graf <agraf@xxxxxxx>
---
linux-user/ioctls.h | 1 +
linux-user/linux_loop.h | 1 +
linux-user/syscall.c | 7 +++++++
linux-user/syscall_defs.h | 1 +
4 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index e8c1c69..97c3f10 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -328,6 +328,7 @@
IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
IOCTL(LOOP_GET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT)
+ IOCTL_SPECIAL(LOOP_BOGUS_CMD, 0, do_ioctl_fail, TYPE_INT)

IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop)))
IOCTL(MTIOCGET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtget)))
diff --git a/linux-user/linux_loop.h b/linux-user/linux_loop.h
index 8974caa..810ae61 100644
--- a/linux-user/linux_loop.h
+++ b/linux-user/linux_loop.h
@@ -91,5 +91,6 @@ struct loop_info64 {
#define LOOP_SET_STATUS64 0x4C04
#define LOOP_GET_STATUS64 0x4C05
#define LOOP_CHANGE_FD 0x4C06
+#define LOOP_BOGUS_CMD 0x4C82

#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 06408bd..46e964b 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3580,6 +3580,13 @@ out:
return ret;
}

+static abi_long do_ioctl_fail(const IOCTLEntry *ie, uint8_t *buf_temp, int fd,
+ abi_long cmd, abi_long arg)
+{
+ /* Fail silently */
+ return -EINVAL;
+}
+
static IOCTLEntry ioctl_entries[] = {
#define IOCTL(cmd, access, ...) \
{ TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } },
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index be8760c..b76f64a 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -968,6 +968,7 @@ struct target_pollfd {
#define TARGET_LOOP_SET_STATUS64 0x4C04
#define TARGET_LOOP_GET_STATUS64 0x4C05
#define TARGET_LOOP_CHANGE_FD 0x4C06
+#define TARGET_LOOP_BOGUS_CMD 0x4C82

/* fb ioctls */
#define TARGET_FBIOGET_VSCREENINFO 0x4600
++++++ bridge.conf ++++++
# Access control file for qemu bridge helper
# Syntax consists of:
# # comment (ignored)
# allow all
# allow <bridge_name>
# deny all
# deny <bridge_name>
# include /path/to/additional/ACL/file
# Users are blacklisted by default and 'deny' takes precedence over 'allow'.
# Including additional ACL files allows file access permissions to be used as
# a component of the policy to allow access or deny access to specific bridges.
++++++ qemu.spec.in ++++++
--- /var/tmp/diff_new_pack.FavsVN/_old 2012-06-16 11:44:14.000000000 +0200
+++ /var/tmp/diff_new_pack.FavsVN/_new 2012-06-16 11:44:14.000000000 +0200
@@ -27,6 +27,7 @@
PATCH_FILES
# this is to make lint happy
Source300: rpmlintrc
+Source302: bridge.conf
Source400: update_git.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: SDL-devel
@@ -66,9 +67,13 @@
BuildRequires: fdupes
BuildRequires: glib2-devel
BuildRequires: libvdeplug3-devel
+BuildRequires: pwdutils
BuildRequires: python
+Requires: pwdutils
+Requires: qemu-tools
Requires: timezone
Requires: virt-utils
+Requires: /usr/sbin/groupadd

%description
QEMU is an extremely well-performing CPU emulator that allows you to
@@ -77,6 +82,21 @@
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
as PC and PowerMac systems.

+%package tools
+Summary: Universal CPU emulator -- Tools
+Group: System/Emulators/PC
+Provides: qemu:%_libexecdir/qemu-bridge-helper
+PreReq: permissions
+
+%description tools
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains various tools, including a bridge helper.
+
%package linux-user
Summary: Universal CPU emulator -- Linux User binaries
Group: System/Emulators/PC
@@ -89,9 +109,9 @@
system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
as PC and PowerMac systems.

-This sub package contains static linked binaries for runnign linux-user
+This sub-package contains statically linked binaries for running linux-user
emulations. This can be used together with the OBS build script to
-run cross architectures builds
+run cross-architecture builds.

%prep
%setup -q
@@ -102,6 +122,7 @@
mkdir -p dynamic
# build qemu-system
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --libexecdir=%_libexecdir \
--audio-card-list="ac97 es1370 sb16 cs4231a adlib gus" \
--audio-drv-list="alsa sdl" --enable-mixemu --enable-vde \
--enable-curl \
@@ -116,11 +137,11 @@
--disable-spice
%endif
make %{?jobs:-j%jobs} V=1
-make qemu-img V=1
mv *-softmmu/qemu-system-* qemu-io qemu-bridge-helper dynamic || true
make clean
# build userland emus
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --libexecdir=%_libexecdir \
--enable-linux-user \
--disable-system \
--static --disable-linux-aio \
@@ -132,7 +153,7 @@
make %{?jobs:-j%jobs} V=1

%install
-make install DESTDIR=$RPM_BUILD_ROOT libexecdir=%_libexecdir
+make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%_mandir/man1/qemu-img.1
rm -f $RPM_BUILD_ROOT/%_mandir/man8/qemu-nbd.8
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
@@ -142,6 +163,7 @@
install -m 755 scripts/qemu-binfmt-conf.sh $RPM_BUILD_ROOT/%_sbindir
install -d -m 755 $RPM_BUILD_ROOT/%_libexecdir
install -m 755 dynamic/qemu-bridge-helper $RPM_BUILD_ROOT/%_libexecdir
+install -D -m 644 %{SOURCE302} $RPM_BUILD_ROOT/%{_sysconfdir}/qemu/bridge.conf
%ifnarch %ix86 x86_64
ln -sf ../../../emul/ia32-linux $RPM_BUILD_ROOT/usr/share/qemu/qemu-i386
%endif
@@ -153,12 +175,25 @@
%clean
rm -rf ${RPM_BUILD_ROOT}

+%pre
+%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm
2>/dev/null
+%{_bindir}/getent group qemu >/dev/null || %{_sbindir}/groupadd -r qemu
2>/dev/null
+%{_bindir}/getent passwd qemu >/dev/null || \
+ %{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \
+ -c "qemu user" qemu
+
+%if 0%{?suse_version} >= 1130
+%post tools
+%set_permissions %_libexecdir/qemu-bridge-helper
+
+%verifyscript tools
+%verify_permissions %_libexecdir/qemu-bridge-helper
+%endif
+
%files
%defattr(-, root, root)
%doc COPYING COPYING.LIB Changelog README TODO VERSION qemu-doc.html
qemu-tech.html
-%_bindir/qemu-io
%_bindir/qemu-system-*
-%_libexecdir/qemu-bridge-helper
%doc %_mandir/man[18]/qemu*.[18].gz
%_datadir/%name
%ifnarch %ix86 x86_64 ia64
@@ -167,6 +202,12 @@
%dir %_sysconfdir/%name
%config %_sysconfdir/%name/target-x86_64.conf

+%files tools
+%defattr(-, root, root)
+%_bindir/qemu-io
+%verify(not mode) %_libexecdir/qemu-bridge-helper
+%config %_sysconfdir/%name/bridge.conf
+
%files linux-user
%defattr(-, root, root)
%_bindir/qemu-alpha

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread