[PATCH v5 0/1] Cleanup of the configscripts

1 view
Skip to first unread message

claudius....@siemens.com

unread,
May 24, 2018, 10:21:16 AM5/24/18
to isar-...@googlegroups.com, Claudius Heine
From: Claudius Heine <c...@denx.de>

Hi,

here is the new version of the qemu-*-static removal patch.

Now the qemu-*-static binaries should only be removed if the
qemu-user-static package was not installed. I detected its installation
state via the /usr/share/doc/qemu-user-static directory.

Claudius

Changes on v4:
- Removed merged patch 1 (meta-isar/isar-image-base: remove
uncesessary cmd lines from cfg scripts)
- Only remove qemu-*-static if qemu-user-static is not installed on
image

Changes on v3:
- Moved qemu-*-static removal to isar-image-base

Changes on v2:
- Added removal of qemu-*-static command to debian-configscript.sh

Changes on v1:
- Added removal of qemu-arm-static command to raspbian-configscript.sh

Claudius Heine (1):
meta-isar/isar-image-base: added removal of qemu-*-static binaries

meta-isar/recipes-core/images/isar-image-base.bb | 3 +++
1 file changed, 3 insertions(+)

--
2.17.0

claudius....@siemens.com

unread,
May 24, 2018, 10:21:17 AM5/24/18
to isar-...@googlegroups.com, Claudius Heine
From: Claudius Heine <c...@denx.de>

After the image has finished building, the qemu-*-static binaries that
are installed by quemu-debootstrap can be removed because they are no
longer needed.

If this binary is overwritten by installing qemu-user-static into the
image, then this binary is not removed. (This is possible if the
binfmt_misc entry for this architecture has the 'F' flag. In that case
qemu-*-static shouldn't even be deployed by qemu-debootstrap.)

Reported-by: Henning Schild <henning...@siemens.com>
Signed-off-by: Claudius Heine <c...@denx.de>
---
meta-isar/recipes-core/images/isar-image-base.bb | 3 +++
1 file changed, 3 insertions(+)

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 5ad6df3..1239f72 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -41,6 +41,9 @@ do_rootfs() {
# Cleanup
sudo rm "${IMAGE_ROOTFS}/${DISTRO_CONFIG_SCRIPT}"
sudo rm "${IMAGE_ROOTFS}/etc/apt/sources.list.d/isar-apt.list"
+ test ! -e "${IMAGE_ROOTFS}/usr/share/doc/qemu-user-static" && \
+ sudo find "${IMAGE_ROOTFS}/usr/bin" \
+ -maxdepth 1 -name 'qemu-*-static' -type f -delete
sudo umount -l ${IMAGE_ROOTFS}/isar-apt
sudo rmdir ${IMAGE_ROOTFS}/isar-apt
sudo umount -l ${IMAGE_ROOTFS}/dev
--
2.17.0

Henning Schild

unread,
May 24, 2018, 10:28:52 AM5/24/18
to [ext] claudius.heine.ext@siemens.com, isar-...@googlegroups.com, Claudius Heine
LGTM

Am Thu, 24 May 2018 16:21:12 +0200
schrieb "[ext] claudius....@siemens.com"
<claudius....@siemens.com>:

Alexander Smirnov

unread,
May 28, 2018, 6:41:53 AM5/28/18
to claudius....@siemens.com, isar-...@googlegroups.com, Claudius Heine

claudius....@siemens.com 24 мая 2018 г. 17:21:26 написал:

> From: Claudius Heine <c...@denx.de>
>
> After the image has finished building, the qemu-*-static binaries that
> are installed by quemu-debootstrap can be removed because they are no
> longer needed.
>
> If this binary is overwritten by installing qemu-user-static into the
> image, then this binary is not removed. (This is possible if the
> binfmt_misc entry for this architecture has the 'F' flag. In that case
> qemu-*-static shouldn't even be deployed by qemu-debootstrap.)
>
> Reported-by: Henning Schild <henning...@siemens.com>
> Signed-off-by: Claudius Heine <c...@denx.de>


Applied to next, thanks.

Alex

> ---
> meta-isar/recipes-core/images/isar-image-base.bb | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb
> b/meta-isar/recipes-core/images/isar-image-base.bb
> index 5ad6df3..1239f72 100644
> --- a/meta-isar/recipes-core/images/isar-image-base.bb
> +++ b/meta-isar/recipes-core/images/isar-image-base.bb
> @@ -41,6 +41,9 @@ do_rootfs() {
> # Cleanup
> sudo rm "${IMAGE_ROOTFS}/${DISTRO_CONFIG_SCRIPT}"
> sudo rm "${IMAGE_ROOTFS}/etc/apt/sources.list.d/isar-apt.list"
> + test ! -e "${IMAGE_ROOTFS}/usr/share/doc/qemu-user-static" && \
> + sudo find "${IMAGE_ROOTFS}/usr/bin" \
> + -maxdepth 1 -name 'qemu-*-static' -type f -delete
> sudo umount -l ${IMAGE_ROOTFS}/isar-apt
> sudo rmdir ${IMAGE_ROOTFS}/isar-apt
> sudo umount -l ${IMAGE_ROOTFS}/dev
> --
> 2.17.0
>
> --
> You received this message because you are subscribed to the Google Groups
> "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to isar-users+...@googlegroups.com.
> To post to this group, send email to isar-...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/isar-users/20180524142112.5679-2-claudius.heine.ext%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.



Reply all
Reply to author
Forward
0 new messages