From 3ab58a229125ec6b93f8b7366421227cfe9f20c535ffb71f2572eadf49ac5ce6 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 18 Sep 2019 08:58:50 +0000 Subject: [PATCH] Accepting request 731688 from home:bfrogers:branches:Virtualization Tweak cross compiler used based. Also clean up commentary in scripts. OBS-URL: https://build.opensuse.org/request/show/731688 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=488 --- README.PACKAGING | 14 +++++++------- bundle2spec.sh | 9 +++++++-- checkbundle.sh | 2 +- config.sh | 5 +---- qemu.spec | 8 ++++++++ qemu.spec.in | 8 ++++++++ 6 files changed, 32 insertions(+), 14 deletions(-) diff --git a/README.PACKAGING b/README.PACKAGING index d56b5bc5..b8525e1f 100644 --- a/README.PACKAGING +++ b/README.PACKAGING @@ -15,11 +15,11 @@ first run pkg2git.sh, in order to get the current patch queue made available in a local git branch named frombundle. (qemu packaging now includes a "bundle of git bundles" stored as a package source file, which contains the "git version" of the package patches.) You will create an altered patch queue in the -$GIT_BRANCH branch (see config.h for actual name), and use the frombundle branch -as a starting point (eg perhaps start by doing git reset frombundle, then cherry --pick upstream patches from there). Once you have the patch queue ready to go -run git2pkg.sh to update the bundle of bundles (bundles.tsr.xz file) as well as -the spec and patch files. +$GIT_BRANCH branch (see config.sh for actual name), and use the frombundle branch +as a starting point (eg perhaps start by doing git reset --hard frombundle, then +cherry-pick upstream patches from there). Once you have the patch queue ready to +go run git2pkg.sh to update the bundle of bundles (bundles.tsr.xz file) as well +as the spec and patch files. Additional Notes: @@ -62,8 +62,8 @@ This will cause the patch application in the spec file to be done as follows: %patch0013 -p1 %endif -A track worth noting is, if a given git tracked patch is to be applied in a way -that can't be done in the normal patching section of the specfile, you can still +A trick worth noting is, if a given git tracked patch is to be applied in a way +that can't be done in the normal patching section of the spec file, you can still include the patch, and use it by name with the patch program elsewhere in the spec file by doing something such as: Include-If: %if 0%{?patch-possibly-applied-elsewhere} diff --git a/bundle2spec.sh b/bundle2spec.sh index 9d655346..3c6edceb 100644 --- a/bundle2spec.sh +++ b/bundle2spec.sh @@ -9,8 +9,13 @@ # That way we can easily rebase against the next stable release # when it comes. -# !!!!!! WARNING - our use of the sort order of our globbing will -# get the patches out of order once they go over 9999!!!!!!!!!!! +# TODO: +# * don't re-create bundles that are the same, and if no change +# don't re-create the bunde-of-bundles +# * somehow for the LATEST case, keep track of the patches which +# have come and gone until we apply the whole set to the changelog +# * also when that update comes, include the Referece: references as +# being included into the update set -e diff --git a/checkbundle.sh b/checkbundle.sh index c88c905c..62aa53f3 100644 --- a/checkbundle.sh +++ b/checkbundle.sh @@ -2,7 +2,7 @@ # # This script simply does some basic checks on the bundle tarball -# NYI: report if the required base commit isn't there - they may need to fetch the latest from upstream +# TODO: report if the required base commit isn't there - they may need to fetch the latest from upstream set -e diff --git a/config.sh b/config.sh index bbb844e0..4d8fbb37 100644 --- a/config.sh +++ b/config.sh @@ -61,10 +61,7 @@ LOCAL_REPO_MAP=( ~/git/qemu-edk2-openssl-krb5 ~/git/qemu-edk2-openssl-pyca-cryptography ) -# Should we instead simply have this stored in bundle somehow? (perhaps have an ordering number, and -# store a patchrange value in this file. Unclear what is best - perhaps once we do a full scripting -# solution the right choice will fall out - what makes sense as to how the project gets initialized -# what is easiest to create (and how) to get packaging working with this workflow? + PATCH_PATH_MAP=( "" "roms/seabios/" diff --git a/qemu.spec b/qemu.spec index b7ecdddf..242e30b9 100644 --- a/qemu.spec +++ b/qemu.spec @@ -249,9 +249,17 @@ BuildRequires: cross-arm-gcc7 %ifnarch %{ix86} x86_64 # We must cross-compile on non-x86* BuildRequires: cross-i386-binutils +%if 0%{?is_opensuse} BuildRequires: cross-i386-gcc9 +%else +BuildRequires: cross-i386-gcc7 +%endif BuildRequires: cross-x86_64-binutils +%if 0%{?is_opensuse} BuildRequires: cross-x86_64-gcc9 +%else +BuildRequires: cross-x86_64-gcc7 +%endif %endif %endif BuildRequires: curl-devel diff --git a/qemu.spec.in b/qemu.spec.in index 87d0a1ae..b0240f1d 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -179,9 +179,17 @@ BuildRequires: cross-arm-gcc7 %ifnarch %{ix86} x86_64 # We must cross-compile on non-x86* BuildRequires: cross-i386-binutils +%if 0%{?is_opensuse} BuildRequires: cross-i386-gcc9 +%else +BuildRequires: cross-i386-gcc7 +%endif BuildRequires: cross-x86_64-binutils +%if 0%{?is_opensuse} BuildRequires: cross-x86_64-gcc9 +%else +BuildRequires: cross-x86_64-gcc7 +%endif %endif %endif BuildRequires: curl-devel