[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC] dist: create separate dist with bundled rom
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH RFC] dist: create separate dist with bundled roms/libs |
Date: |
Tue, 2 May 2017 14:24:56 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Thu, Apr 20, 2017 at 01:16:39PM +0100, Daniel P. Berrange wrote:
> The qemu-XXXX.tar.bz2 currently contains bundled copies of the pixman
> and dtc codebases, as well as pre-built ROM binaries and their sources.
>
> Many OS distros want to build & ship ROMs separately to ensure license
> compliance. Similarly they'll build pixman/dtc code independantly to
> allow sharing with the rest of the distro. Thus they'll never use these
> bundled files. A further complication is that these bundled files create
> extra auditing work for distros when applying for export compliance,
> particularly when the bundled files contain crypto code. This burden
> applies merely by having the files in the tar.bz2, even if they're not
> built into the binaries. If we ever want to include UEFI ROMs for x86
> or AArch64, then the size of the QEMU dist will increase significantly
> more.
>
> The bundled ROMs though are fairly useful to end-users who are building
> QEMU themselves and don't want to worry about figuring out the right
> BIOS bits to build manually, so they shouldn't be dropped entirely.
>
> This change thus alters 'make dist' to generate two release archives
>
> - qemu-XXX.tar.bz2 - minimal archive with only QEMU source code
> - qemu-bundled-XXX.tar.bz2 - QEMU source, plus bundled ROMs & libs
>
> NB1, as it stands this change breaks "make install" since that assumes
> existance of the pre-built ROMs in tree.
It would be good to fix this so that a minimal dist can build and
install successfully.
> NB2, an alternative approach would be:
>
> - qemu-XXX.tar.bz2 - minimal archive with only QEMU source code
> - qemu-roms-XXX.tar.bz2 - only bundled ROMs
>
> and thus never ship a tar.bz2 that contains everything together,
> and stop shipping pixman/dtc entirely.
I'm not familiar with the reasons for the existing dist approach.
Hopefully someone who is will speak up.
The safest solution is to generate a new tarball
qemu-minimal-XXX.tar.bz2. That way existing build processes continue to
work as expected. Anyone who wants the minimal tarball can grab that
instead of the existing dist tarball.
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> Makefile | 5 ++++-
> scripts/make-release | 36 ++++++++++++++++++++++++++++++++----
> 2 files changed, 36 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 6c359b2..78f7c0c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -503,7 +503,10 @@ clean:
>
> VERSION ?= $(shell cat VERSION)
>
> -dist: qemu-$(VERSION).tar.bz2
> +dist: qemu-$(VERSION).tar.bz2 qemu-bundled-$(VERSION).tar.bz2
> +
> +qemu-bundled-%.tar.bz2:
> + $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst
> qemu-bundled-%.tar.bz2,%,$@)" --bundled
>
> qemu-%.tar.bz2:
> $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst
> qemu-%.tar.bz2,%,$@)"
> diff --git a/scripts/make-release b/scripts/make-release
> index fa6323f..8e4a653 100755
> --- a/scripts/make-release
> +++ b/scripts/make-release
> @@ -12,14 +12,42 @@
>
> src="$1"
> version="$2"
> +shift
> +shift
> +bundled=no
> +
> +for opt do
> + case "$opt" in
> + --bundled)
> + bundled=yes
> + ;;
> + *)
> + echo "Unknown arg '$opt'"
> + exit 1
> + esac
> +done
> +
> destination=qemu-${version}
> +if test "$bundled" = "yes"
> +then
> + archive=qemu-bundled-${version}.tar.bz2
> +else
> + archive=qemu-${version}.tar.bz2
> +fi
>
> git clone "${src}" ${destination}
> pushd ${destination}
> git checkout "v${version}"
> -git submodule update --init
> -(cd roms/seabios && git describe --tags --long --dirty > .version)
> -rm -rf .git roms/*/.git dtc/.git pixman/.git
> +if test "$bundled" = "yes"
> +then
> + git submodule update --init
> + (cd roms/seabios && git describe --tags --long --dirty > .version)
> + rm -rf .git roms/*/.git dtc/.git pixman/.git
> +else
> + rm -rf .git roms dtc pixman
> + rm -f pc-bios/*.{rom,bin} pc-bios/{openbios*,u-boot.s500}
> +fi
> +
> popd
> -tar cfj ${destination}.tar.bz2 ${destination}
> +tar cfj ${archive} ${destination}
> rm -rf ${destination}
> --
> 2.9.3
>
>
signature.asc
Description: PGP signature
- Re: [Qemu-devel] [PATCH RFC] dist: create separate dist with bundled roms/libs,
Stefan Hajnoczi <=