Message ID | 20231009115344.746642-3-felix.moessbauer@siemens.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | make compatible with latest ISAR revision | expand |
On 09.10.23 13:53, Felix Moessbauer wrote: > This includes the following changes: > > - make deploy-ovmf compatible with schroot imaging > - make swupdate class compatible with schroot imaging > - avoid use of sudo when creating squashfs Seems the last change didn't make it into this patch. Jan > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > --- > classes/swupdate.bbclass | 5 +++-- > kas-cip.yml | 2 +- > recipes-core/images/deploy-ovmf.inc | 10 ++++++---- > 3 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass > index aedaf02..55dad32 100644 > --- a/classes/swupdate.bbclass > +++ b/classes/swupdate.bbclass > @@ -106,7 +106,7 @@ IMAGE_CMD:swu() { > # Prepare for signing > export sign='${@'x' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}' > > - sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \ > + imager_run -p -d ${PP_WORK} <<'EOIMAGER' > # Fill in file check sums > for file in ${SWU_ADDITIONAL_FILES}; do > sed -i "s:$file-sha256:$(sha256sum "${PP_WORK}/swu/"$file | cut -f 1 -d " "):g" \ > @@ -138,7 +138,8 @@ IMAGE_CMD:swu() { > fi > echo "$file.${SWU_SIGNATURE_EXT}" > fi > - done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"' > + done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}" > +EOIMAGER > } > > python do_check_swu_partition_uuids() { > diff --git a/kas-cip.yml b/kas-cip.yml > index c329248..84b7441 100644 > --- a/kas-cip.yml > +++ b/kas-cip.yml > @@ -22,7 +22,7 @@ repos: > > isar: > url: https://github.com/ilbers/isar.git > - commit: bf9c9fdd99bf26dca25fdf9e63b7eb5b053d962f > + commit: dff8ad504b54a4e292a1b986cdc74ebc9e6e177a > layers: > meta: > > diff --git a/recipes-core/images/deploy-ovmf.inc b/recipes-core/images/deploy-ovmf.inc > index 0ec8762..d2b8a27 100644 > --- a/recipes-core/images/deploy-ovmf.inc > +++ b/recipes-core/images/deploy-ovmf.inc > @@ -11,11 +11,13 @@ > # This recipe deploys the OVMF binaries to run the image in QEMU > # Note: x86 only > > -IMAGER_INSTALL += "ovmf" > +INSTALL_deploy_ovmf_binaries += "ovmf" > > +do_deploy_ovmf_binaries[network] += "${TASK_USE_SUDO}" > do_deploy_ovmf_binaries[cleandirs] += "${DEPLOY_DIR_IMAGE}/OVMF" > +do_deploy_ovmf_binaries[depends] += "${SCHROOT_DEP}" > do_deploy_ovmf_binaries() { > - cp -v ${BUILDCHROOT_DIR}/usr/share/OVMF/*.fd ${DEPLOY_DIR_IMAGE}/OVMF > + imager_run -p -d ${PP_WORK} -- \ > + /bin/bash -c "cp -v /usr/share/OVMF/*.fd ${PP_DEPLOY}/OVMF/" > } > - > -addtask deploy_ovmf_binaries after do_install_imager_deps before do_image > +addtask deploy_ovmf_binaries after do_rootfs_install before do_image
On Mon, 2023-10-09 at 14:13 +0200, Jan Kiszka wrote: > On 09.10.23 13:53, Felix Moessbauer wrote: > > This includes the following changes: > > > > - make deploy-ovmf compatible with schroot imaging > > - make swupdate class compatible with schroot imaging > > - avoid use of sudo when creating squashfs > > Seems the last change didn't make it into this patch. Actually the last change needed to be reverted as this led to the permission error when creating the squashfs. I just forgot to update the commit message. Feel free to just remove the "avoid use of sudo when creating squashfs" from the message when applying the patch. Felix > > Jan > > > > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > > --- > > classes/swupdate.bbclass | 5 +++-- > > kas-cip.yml | 2 +- > > recipes-core/images/deploy-ovmf.inc | 10 ++++++---- > > 3 files changed, 10 insertions(+), 7 deletions(-) > > > > diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass > > index aedaf02..55dad32 100644 > > --- a/classes/swupdate.bbclass > > +++ b/classes/swupdate.bbclass > > @@ -106,7 +106,7 @@ IMAGE_CMD:swu() { > > # Prepare for signing > > export sign='${@'x' if > > bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}' > > > > - sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \ > > + imager_run -p -d ${PP_WORK} <<'EOIMAGER' > > # Fill in file check sums > > for file in ${SWU_ADDITIONAL_FILES}; do > > sed -i "s:$file-sha256:$(sha256sum > > "${PP_WORK}/swu/"$file | cut -f 1 -d " "):g" \ > > @@ -138,7 +138,8 @@ IMAGE_CMD:swu() { > > fi > > echo "$file.${SWU_SIGNATURE_EXT}" > > fi > > - done | cpio -ovL --reproducible -H crc > > > "${SWU_BUILDCHROOT_IMAGE_FILE}"' > > + done | cpio -ovL --reproducible -H crc > > > "${SWU_BUILDCHROOT_IMAGE_FILE}" > > +EOIMAGER > > } > > > > python do_check_swu_partition_uuids() { > > diff --git a/kas-cip.yml b/kas-cip.yml > > index c329248..84b7441 100644 > > --- a/kas-cip.yml > > +++ b/kas-cip.yml > > @@ -22,7 +22,7 @@ repos: > > > > isar: > > url: https://github.com/ilbers/isar.git > > - commit: bf9c9fdd99bf26dca25fdf9e63b7eb5b053d962f > > + commit: dff8ad504b54a4e292a1b986cdc74ebc9e6e177a > > layers: > > meta: > > > > diff --git a/recipes-core/images/deploy-ovmf.inc b/recipes- > > core/images/deploy-ovmf.inc > > index 0ec8762..d2b8a27 100644 > > --- a/recipes-core/images/deploy-ovmf.inc > > +++ b/recipes-core/images/deploy-ovmf.inc > > @@ -11,11 +11,13 @@ > > # This recipe deploys the OVMF binaries to run the image in QEMU > > # Note: x86 only > > > > -IMAGER_INSTALL += "ovmf" > > +INSTALL_deploy_ovmf_binaries += "ovmf" > > > > +do_deploy_ovmf_binaries[network] += "${TASK_USE_SUDO}" > > do_deploy_ovmf_binaries[cleandirs] += "${DEPLOY_DIR_IMAGE}/OVMF" > > +do_deploy_ovmf_binaries[depends] += "${SCHROOT_DEP}" > > do_deploy_ovmf_binaries() { > > - cp -v ${BUILDCHROOT_DIR}/usr/share/OVMF/*.fd > > ${DEPLOY_DIR_IMAGE}/OVMF > > + imager_run -p -d ${PP_WORK} -- \ > > + /bin/bash -c "cp -v /usr/share/OVMF/*.fd > > ${PP_DEPLOY}/OVMF/" > > } > > - > > -addtask deploy_ovmf_binaries after do_install_imager_deps before > > do_image > > +addtask deploy_ovmf_binaries after do_rootfs_install before > > do_image >
On 09.10.23 13:53, Felix Moessbauer wrote: > This includes the following changes: > > - make deploy-ovmf compatible with schroot imaging > - make swupdate class compatible with schroot imaging > - avoid use of sudo when creating squashfs Dropped the last line. > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > --- > classes/swupdate.bbclass | 5 +++-- > kas-cip.yml | 2 +- > recipes-core/images/deploy-ovmf.inc | 10 ++++++---- > 3 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass > index aedaf02..55dad32 100644 > --- a/classes/swupdate.bbclass > +++ b/classes/swupdate.bbclass > @@ -106,7 +106,7 @@ IMAGE_CMD:swu() { > # Prepare for signing > export sign='${@'x' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}' > > - sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \ > + imager_run -p -d ${PP_WORK} <<'EOIMAGER' > # Fill in file check sums > for file in ${SWU_ADDITIONAL_FILES}; do > sed -i "s:$file-sha256:$(sha256sum "${PP_WORK}/swu/"$file | cut -f 1 -d " "):g" \ > @@ -138,7 +138,8 @@ IMAGE_CMD:swu() { > fi > echo "$file.${SWU_SIGNATURE_EXT}" > fi > - done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"' > + done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}" > +EOIMAGER > } > > python do_check_swu_partition_uuids() { > diff --git a/kas-cip.yml b/kas-cip.yml > index c329248..84b7441 100644 > --- a/kas-cip.yml > +++ b/kas-cip.yml > @@ -22,7 +22,7 @@ repos: > > isar: > url: https://github.com/ilbers/isar.git > - commit: bf9c9fdd99bf26dca25fdf9e63b7eb5b053d962f > + commit: dff8ad504b54a4e292a1b986cdc74ebc9e6e177a > layers: > meta: > > diff --git a/recipes-core/images/deploy-ovmf.inc b/recipes-core/images/deploy-ovmf.inc > index 0ec8762..d2b8a27 100644 > --- a/recipes-core/images/deploy-ovmf.inc > +++ b/recipes-core/images/deploy-ovmf.inc > @@ -11,11 +11,13 @@ > # This recipe deploys the OVMF binaries to run the image in QEMU > # Note: x86 only > > -IMAGER_INSTALL += "ovmf" > +INSTALL_deploy_ovmf_binaries += "ovmf" > > +do_deploy_ovmf_binaries[network] += "${TASK_USE_SUDO}" > do_deploy_ovmf_binaries[cleandirs] += "${DEPLOY_DIR_IMAGE}/OVMF" > +do_deploy_ovmf_binaries[depends] += "${SCHROOT_DEP}" > do_deploy_ovmf_binaries() { > - cp -v ${BUILDCHROOT_DIR}/usr/share/OVMF/*.fd ${DEPLOY_DIR_IMAGE}/OVMF > + imager_run -p -d ${PP_WORK} -- \ > + /bin/bash -c "cp -v /usr/share/OVMF/*.fd ${PP_DEPLOY}/OVMF/" There is no reason to use bash here, unifying to "sh -c '...'" therefore. > } > - > -addtask deploy_ovmf_binaries after do_install_imager_deps before do_image > +addtask deploy_ovmf_binaries after do_rootfs_install before do_image Merged into next, also patch 1. Thanks, Jan
diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass index aedaf02..55dad32 100644 --- a/classes/swupdate.bbclass +++ b/classes/swupdate.bbclass @@ -106,7 +106,7 @@ IMAGE_CMD:swu() { # Prepare for signing export sign='${@'x' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}' - sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \ + imager_run -p -d ${PP_WORK} <<'EOIMAGER' # Fill in file check sums for file in ${SWU_ADDITIONAL_FILES}; do sed -i "s:$file-sha256:$(sha256sum "${PP_WORK}/swu/"$file | cut -f 1 -d " "):g" \ @@ -138,7 +138,8 @@ IMAGE_CMD:swu() { fi echo "$file.${SWU_SIGNATURE_EXT}" fi - done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"' + done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}" +EOIMAGER } python do_check_swu_partition_uuids() { diff --git a/kas-cip.yml b/kas-cip.yml index c329248..84b7441 100644 --- a/kas-cip.yml +++ b/kas-cip.yml @@ -22,7 +22,7 @@ repos: isar: url: https://github.com/ilbers/isar.git - commit: bf9c9fdd99bf26dca25fdf9e63b7eb5b053d962f + commit: dff8ad504b54a4e292a1b986cdc74ebc9e6e177a layers: meta: diff --git a/recipes-core/images/deploy-ovmf.inc b/recipes-core/images/deploy-ovmf.inc index 0ec8762..d2b8a27 100644 --- a/recipes-core/images/deploy-ovmf.inc +++ b/recipes-core/images/deploy-ovmf.inc @@ -11,11 +11,13 @@ # This recipe deploys the OVMF binaries to run the image in QEMU # Note: x86 only -IMAGER_INSTALL += "ovmf" +INSTALL_deploy_ovmf_binaries += "ovmf" +do_deploy_ovmf_binaries[network] += "${TASK_USE_SUDO}" do_deploy_ovmf_binaries[cleandirs] += "${DEPLOY_DIR_IMAGE}/OVMF" +do_deploy_ovmf_binaries[depends] += "${SCHROOT_DEP}" do_deploy_ovmf_binaries() { - cp -v ${BUILDCHROOT_DIR}/usr/share/OVMF/*.fd ${DEPLOY_DIR_IMAGE}/OVMF + imager_run -p -d ${PP_WORK} -- \ + /bin/bash -c "cp -v /usr/share/OVMF/*.fd ${PP_DEPLOY}/OVMF/" } - -addtask deploy_ovmf_binaries after do_install_imager_deps before do_image +addtask deploy_ovmf_binaries after do_rootfs_install before do_image
This includes the following changes: - make deploy-ovmf compatible with schroot imaging - make swupdate class compatible with schroot imaging - avoid use of sudo when creating squashfs Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- classes/swupdate.bbclass | 5 +++-- kas-cip.yml | 2 +- recipes-core/images/deploy-ovmf.inc | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-)