qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC] dist: create separate dist with bundled roms/libs
Date: Tue, 2 May 2017 14:24:56 +0100	[thread overview]
Message-ID: <20170502132456.GD22502@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170420121639.32685-1-berrange@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4253 bytes --]

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 <berrange@redhat.com>
> ---
>  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
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  parent reply	other threads:[~2017-05-02 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20 12:16 [Qemu-devel] [PATCH RFC] dist: create separate dist with bundled roms/libs Daniel P. Berrange
2017-04-20 12:57 ` no-reply
2017-05-02 13:24 ` Stefan Hajnoczi [this message]
2017-05-02 14:02   ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170502132456.GD22502@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).