Hello community, here is the log from the commit of package qemu for openSUSE:Factory checked in at 2014-07-11 20:05:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qemu (Old) and /work/SRC/openSUSE:Factory/.qemu.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qemu" Changes: -------- --- /work/SRC/openSUSE:Factory/qemu/qemu.changes 2014-06-18 10:59:09.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.qemu.new/qemu.changes 2014-07-11 20:05:27.000000000 +0200 @@ -1,0 +2,10 @@ +Wed Jun 23 21:42:31 UTC 2014 - [email protected] + +- Move block-curl.so to new qemu-block-curl package, avoiding a + dependency of qemu-tools on qemu for Xen (bnc#882008) +* Avoid the reported error message about missing modules + 0071-module-Simplify-module_load.patch + 0072-module-Don-t-complain-when-a-module.patch +- Improve update_git.sh performance (backport from SLE12) + +------------------------------------------------------------------- New: ---- 0071-module-Simplify-module_load.patch 0072-module-Don-t-complain-when-a-module.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qemu-linux-user.spec ++++++ --- /var/tmp/diff_new_pack.0A0CbW/_old 2014-07-11 20:05:29.000000000 +0200 +++ /var/tmp/diff_new_pack.0A0CbW/_new 2014-07-11 20:05:29.000000000 +0200 @@ -95,6 +95,8 @@ Patch0068: 0068-virtio-net-out-of-bounds-buffer-wri.patch Patch0069: 0069-virtio-validate-config_len-on-load.patch Patch0070: 0070-virtio-allow-mapping-up-to-max-queu.patch +Patch0071: 0071-module-Simplify-module_load.patch +Patch0072: 0072-module-Don-t-complain-when-a-module.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: rpmlintrc @@ -218,6 +220,8 @@ %patch0068 -p1 %patch0069 -p1 %patch0070 -p1 +%patch0071 -p1 +%patch0072 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ ++++++ qemu.spec ++++++ --- /var/tmp/diff_new_pack.0A0CbW/_old 2014-07-11 20:05:29.000000000 +0200 +++ /var/tmp/diff_new_pack.0A0CbW/_new 2014-07-11 20:05:29.000000000 +0200 @@ -124,6 +124,8 @@ Patch0068: 0068-virtio-net-out-of-bounds-buffer-wri.patch Patch0069: 0069-virtio-validate-config_len-on-load.patch Patch0070: 0070-virtio-allow-mapping-up-to-max-queu.patch +Patch0071: 0071-module-Simplify-module_load.patch +Patch0072: 0072-module-Don-t-complain-when-a-module.patch # Please do not add patches manually here, run update_git.sh. # roms/ipxe patches @@ -221,6 +223,7 @@ Requires: /usr/sbin/groupadd Requires: pwdutils Requires: timezone +Recommends: qemu-block-curl Recommends: qemu-tools Recommends: qemu-x86 %ifarch ppc ppc64 ppc64le @@ -368,6 +371,26 @@ This sub-package contains translations. +%package block-curl +Summary: Universal CPU emulator -- cURL block support +Group: System/Emulators/PC +Provides: qemu:%_libdir/%name/block-curl.so +# Needs to match {qemu-system-*,qemu-img} >= 2.0.0, but is optional. +Conflicts: qemu < %version +Conflicts: qemu > %version +Conflicts: qemu-tools < %version +Conflicts: qemu-tools > %version + +%description block-curl +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 a module for accessing network-based image files +over a network connection from qemu-img tool and QEMU system emulation. + %package tools Summary: Universal CPU emulator -- Tools Group: System/Emulators/PC @@ -375,6 +398,7 @@ Obsoletes: libcacard <= 0.1.2 Provides: libcacard PreReq: permissions +Recommends: qemu-block-curl %description tools QEMU is an extremely well-performing CPU emulator that allows you to @@ -573,6 +597,8 @@ %patch0068 -p1 %patch0069 -p1 %patch0070 -p1 +%patch0071 -p1 +%patch0072 -p1 %patch1000 -p1 %patch1001 -p1 @@ -740,7 +766,6 @@ %files %defattr(-, root, root) %dir %_libdir/%name -%_libdir/%name/block-curl.so %doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html %doc %_mandir/man1/qemu.1.gz %_datadir/%name @@ -864,6 +889,11 @@ %_mandir/man1/qemu-kvm.1.gz %endif +%files block-curl +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-curl.so + %files lang -f %name.lang %defattr(-, root, root) ++++++ 0071-module-Simplify-module_load.patch ++++++ >From 212b80fa19390023a809068c5d282e2994bd98bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <[email protected]> Date: Fri, 20 Jun 2014 16:46:50 +0200 Subject: [PATCH] module: Simplify module_load() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file path is not used for error reporting, so we can free it directly after use. Signed-off-by: Andreas Färber <[email protected]> --- util/module.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/module.c b/util/module.c index 214effb..9fd3030 100644 --- a/util/module.c +++ b/util/module.c @@ -202,18 +202,16 @@ static void module_load(module_init_type type) for (i = 0; i < ARRAY_SIZE(dirs); i++) { fname = g_strdup_printf("%s/%s%s", dirs[i], *mp, HOST_DSOSUF); ret = module_load_file(fname); + g_free(fname); + fname = NULL; /* Try loading until loaded a module file */ if (!ret) { break; } - g_free(fname); - fname = NULL; } if (ret == -ENOENT) { fprintf(stderr, "Can't find module: %s\n", *mp); } - - g_free(fname); } for (i = 0; i < ARRAY_SIZE(dirs); i++) { ++++++ 0072-module-Don-t-complain-when-a-module.patch ++++++ >From 14cd25c73de420d01acd3f0691e1d663dcf3eca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <[email protected]> Date: Fri, 20 Jun 2014 17:54:51 +0200 Subject: [PATCH] module: Don't complain when a module is absent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current implementation depends on a configure-time generated list of block modules. When any of them is absent, module_load() emits a warning. This is suboptimal because extracting code to modules was mainly done to allow separate packaging of modules with intrusive dependencies. Absence of optional packages then leads to absence of modules and an error message, which users may recognize as new and report as error. Cc: Fam Zheng <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Michael Tokarev <[email protected]> Signed-off-by: Andreas Färber <[email protected]> --- util/module.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/util/module.c b/util/module.c index 9fd3030..4bd4a94 100644 --- a/util/module.c +++ b/util/module.c @@ -209,9 +209,6 @@ static void module_load(module_init_type type) break; } } - if (ret == -ENOENT) { - fprintf(stderr, "Can't find module: %s\n", *mp); - } } for (i = 0; i < ARRAY_SIZE(dirs); i++) { ++++++ qemu.spec.in ++++++ --- /var/tmp/diff_new_pack.0A0CbW/_old 2014-07-11 20:05:30.000000000 +0200 +++ /var/tmp/diff_new_pack.0A0CbW/_new 2014-07-11 20:05:30.000000000 +0200 @@ -152,6 +152,7 @@ Requires: /usr/sbin/groupadd Requires: pwdutils Requires: timezone +Recommends: qemu-block-curl Recommends: qemu-tools Recommends: qemu-x86 %ifarch ppc ppc64 ppc64le @@ -299,6 +300,26 @@ This sub-package contains translations. +%package block-curl +Summary: Universal CPU emulator -- cURL block support +Group: System/Emulators/PC +Provides: qemu:%_libdir/%name/block-curl.so +# Needs to match {qemu-system-*,qemu-img} >= 2.0.0, but is optional. +Conflicts: qemu < %version +Conflicts: qemu > %version +Conflicts: qemu-tools < %version +Conflicts: qemu-tools > %version + +%description block-curl +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 a module for accessing network-based image files +over a network connection from qemu-img tool and QEMU system emulation. + %package tools Summary: Universal CPU emulator -- Tools Group: System/Emulators/PC @@ -306,6 +327,7 @@ Obsoletes: libcacard <= 0.1.2 Provides: libcacard PreReq: permissions +Recommends: qemu-block-curl %description tools QEMU is an extremely well-performing CPU emulator that allows you to @@ -602,7 +624,6 @@ %files %defattr(-, root, root) %dir %_libdir/%name -%_libdir/%name/block-curl.so %doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html %doc %_mandir/man1/qemu.1.gz %_datadir/%name @@ -726,6 +747,11 @@ %_mandir/man1/qemu-kvm.1.gz %endif +%files block-curl +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-curl.so + %files lang -f %name.lang %defattr(-, root, root) ++++++ update_git.sh ++++++ --- /var/tmp/diff_new_pack.0A0CbW/_old 2014-07-11 20:05:30.000000000 +0200 +++ /var/tmp/diff_new_pack.0A0CbW/_new 2014-07-11 20:05:30.000000000 +0200 @@ -1,8 +1,7 @@ #!/bin/bash -e # -# While updating versions of QEMU to 1.0 I got fed up with the -# quilt workflow and just put up a git tree that contains all -# the commits on top of a stable tarball. +# Instead of a quilt workflow, we use a git tree that contains +# all the commits on top of a stable tarball. # # When updating this package, just either update the git tree # below (use rebase!) or change the tree path and use your own @@ -14,92 +13,110 @@ GIT_LOCAL_TREE=~/git/qemu-opensuse GIT_BRANCH=opensuse-2.0 GIT_UPSTREAM_TAG=v2.0.0 -QEMU_TMP=/dev/shm/qemu-tmp +GIT_DIR=/dev/shm/qemu-factory-git-dir +CMP_DIR=/dev/shm/qemu-factory-cmp-dir -restore_file_to_package() { -# If the processed file matches the previous one, move the previous -# one back in place, otherwise add the processed file. - - if cmp -s "$1" saved."$1"; then - osc mv --force saved."$1" "$1" - else - osc add "$1" - fi -} - -# save files in case they remain unchanged -if [ -e 0001-* ]; then - for i in 0*; do - osc mv $i saved.$i - done -fi -osc mv qemu.spec saved.qemu.spec -osc mv qemu-linux-user.spec saved.qemu-linux-user.spec +rm -rf $GIT_DIR +rm -rf $CMP_DIR -# fetch all patches -rm -rf $QEMU_TMP -OSCDIR="$(pwd)" if [ -d "$GIT_LOCAL_TREE" ]; then - git clone -ls $GIT_LOCAL_TREE $QEMU_TMP - cd $QEMU_TMP + echo "Processing $GIT_BRANCH branch of local git tree, using tag:" \ + "$GIT_UPSTREAM_TAG" + if ! (cd $GIT_LOCAL_TREE && git show-branch $GIT_BRANCH &>/dev/null); then + echo "Error: Branch $GIT_BRANCH not found - please create a remote" \ + "tracking branch of origin/$GIT_BRANCH" + exit + fi + git clone -ls $GIT_LOCAL_TREE $GIT_DIR -b $GIT_BRANCH + if ! (cd $GIT_LOCAL_TREE && git remote show upstream &>/dev/null); then + echo "Remote for upstream git tree not found. Next time add remote" \ + "named upstream for git://git.qemu.org/qemu.git and update" + (cd $GIT_DIR && git remote add upstream git://git.qemu-project.org/qemu.git) + (cd $GIT_DIR && git remote update) + fi else - git clone $GIT_TREE $QEMU_TMP - cd $QEMU_TMP - git remote add upstream git://git.qemu.org/qemu.git - git remote update + echo "Processing $GIT_BRANCH branch of remote git tree, using tag:" \ + "$GIT_UPSTREAM_TAG" + echo "(For much fast processing, consider establishing a local git tree" \ + "at $GIT_LOCAL_TREE)" + git clone $GIT_TREE $GIT_DIR -b $GIT_BRANCH + (cd $GIT_DIR && git remote add upstream git://git.qemu-project.org/qemu.git) + (cd $GIT_DIR && git remote update) fi -git checkout $GIT_BRANCH -git format-patch -N $GIT_UPSTREAM_TAG -o "$OSCDIR" -QEMU_VERSION=`cat VERSION` -cd "$OSCDIR" -rm -rf $QEMU_TMP - -# cut off file name after 40 bytes, so we work around git version differences -# while at it, also remove the signature. -for i in 0*; do - PATCHNAME=${i%.patch} - PATCHNAME=${PATCHNAME:0:40}.patch - head -n $(expr $(wc -l $i | cut -d ' ' -f 1) - 3) $i > "$PATCHNAME.tmp" - rm "$i" - mv "$PATCHNAME.tmp" "$PATCHNAME" - restore_file_to_package "$PATCHNAME" -done - -# we have all patches as files now - generate the spec files! -for package in qemu qemu-linux-user; do - while IFS= read -r line; do - if [ "$line" = "PATCH_FILES" ]; then - for i in 0*; do - NUM=${i%%-*} - echo -e "Patch$NUM: $i" - done - elif [ "$line" = "PATCH_EXEC" ]; then - for i in 0*; do - NUM=${i%%-*} - echo "%patch$NUM -p1" - done - elif [ "$line" = "QEMU_VERSION" ]; then - echo "Version: $QEMU_VERSION" - elif [[ "$line" =~ ^Source: ]]; then - QEMU_TARBALL=qemu-`echo "$line" | cut -d '-' -f 2-` - VERSION_FILE=${QEMU_TARBALL%.tar.bz2}/roms/seabios/.version - SEABIOS_VERSION=`tar jxfO "$QEMU_TARBALL" "$VERSION_FILE"` - SEABIOS_VERSION=`echo $SEABIOS_VERSION | cut -d '-' -f 2` - echo "$line" - elif [ "$line" = "SEABIOS_VERSION" ]; then - echo "Version: $SEABIOS_VERSION" - else - echo "$line" - fi - done < $package.spec.in > $package.spec -done +(cd $GIT_DIR && git format-patch -N $GIT_UPSTREAM_TAG --suffix= -o $CMP_DIR >/dev/null) +QEMU_VERSION=`cat $GIT_DIR/VERSION` +echo "QEMU version: $QEMU_VERSION" + +rm -rf $GIT_DIR + +( + CHANGED_COUNT=0 + UNCHANGED_COUNT=0 + DELETED_COUNT=0 + ADDED_COUNT=0 + + shopt -s nullglob + +# Process patches to eliminate useless differences: limit file names to 40 chars +# before extension and remove git signature. ('30' below gets us past dir prefix) + for i in $CMP_DIR/*; do + head -n -3 $i > $CMP_DIR/${i:30:40}.patch + rm $i + done -restore_file_to_package qemu.spec -restore_file_to_package qemu-linux-user.spec + for i in 0???-*.patch; do + if [ -e $CMP_DIR/$i ]; then + if cmp -s $CMP_DIR/$i $i; then + rm $CMP_DIR/$i + let UNCHANGED_COUNT+=1 + else + mv $CMP_DIR/$i . + let CHANGED_COUNT+=1 + fi + else + osc rm --force $i + let DELETED_COUNT+=1 + fi + done -# remove any remaining saved files -files=(saved.*) -if [ -e "${files[0]}" ]; then - osc rm --force saved.* -fi + for i in $CMP_DIR/*; do + mv $i . + osc add ${i##*/} + let ADDED_COUNT+=1 + done + + for package in qemu qemu-linux-user; do + while IFS= read -r line; do + if [ "$line" = "PATCH_FILES" ]; then + for i in 0???-*.patch; do + NUM=${i%%-*} + echo -e "Patch$NUM: $i" + done + elif [ "$line" = "PATCH_EXEC" ]; then + for i in 0???-*.patch; do + NUM=${i%%-*} + echo "%patch$NUM -p1" + done + elif [ "$line" = "QEMU_VERSION" ]; then + echo "Version: $QEMU_VERSION" + elif [[ "$line" =~ ^Source: ]]; then + QEMU_TARBALL=qemu-`echo "$line" | cut -d '-' -f 2-` + VERSION_FILE=${QEMU_TARBALL%.tar.bz2}/roms/seabios/.version + SEABIOS_VERSION=`tar jxfO "$QEMU_TARBALL" "$VERSION_FILE"` + SEABIOS_VERSION=`echo $SEABIOS_VERSION | cut -d '-' -f 2` + echo "$line" + elif [ "$line" = "SEABIOS_VERSION" ]; then + echo "Version: $SEABIOS_VERSION" + else + echo "$line" + fi + done < $package.spec.in > $package.spec + done + echo "git patch summary" + echo " unchanged: $UNCHANGED_COUNT" + echo " changed: $CHANGED_COUNT" + echo " deleted: $DELETED_COUNT" + echo " added: $ADDED_COUNT" +) +rm -rf $CMP_DIR -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
