packaging/qemu: Build and package completely in the container

Currently QEMU is built inside the container, its tarball pulled to
the host, files removed then packaged again. Instead, let's run all
those steps inside the container and the resulting tarball will
be the final version. For that end, it is introduced the
qemu-build-post.sh script which will remove the uneeded files and
create the tarball.

The patterns for directories on qemu.blacklist had to be changed
to work properly with `find -path`.

Fixes #1168

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
Wainer dos Santos Moschetta
2020-12-01 13:47:06 -05:00
parent 4c3377de3b
commit e5c710e833
6 changed files with 35 additions and 13 deletions

View File

@@ -61,7 +61,3 @@ sudo docker run \
mv "${qemu_destdir}/${qemu_tar}" /share/
sudo chown ${USER}:${USER} "${PWD}/${qemu_tar}"
# Remove blacklisted binaries
gzip -d < "${qemu_tar}" | tar --delete --wildcards -f - ${qemu_black_list[*]} | gzip > "${qemu_tmp_tar}"
mv -f "${qemu_tmp_tar}" "${qemu_tar}"