public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 00/19] ubely/sbuild: rework handling of DSC files
@ 2022-03-14 14:59 Felix Moessbauer
  2022-03-14 14:59 ` [PATCH 19/19] fix: support build of packages with epoch version Felix Moessbauer
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Moessbauer @ 2022-03-14 14:59 UTC (permalink / raw)
  To: isar-users; +Cc: ubely, jan.kiszka, Felix Moessbauer

This is an addition to the ubely/sbuild branch.
It makes the generation of the DSC file used for the sbuild more robust.

Note: I'm just sending the additional patch.

Best regards,
Felix

Anton Mikanovich (1):
  dpkg: Build packages with sbuild

Felix Moessbauer (1):
  fix: support build of packages with epoch version

Uladzimir Bely (17):
  dpkg-gbp: Use separate command to export tarball
  dpkg-gbp: Use host tools for dsc preparation
  sbuild: Add recipes for host and target rootfs to run sbuild
  sbuild: Introduce a class for another build method
  sbuild: support of DEB_BUILD_PROFILES
  sbuild: support of shell exports from dpkg_runbuild_prepend
  dpkg: Remove builddeps install task.
  sbuild: add ccache support
  dpkg-base: Switch devshell to use schroot
  dpkg-base: Switch apt_fetch and apt_unpack to use schroot
  doc: Add sbuild-related documentation
  sbuild: Use .dsc file instead of source directory.
  sbuild: rework DEB_BUILD_PROFILES
  sbuild: fix proxy support
  sbuild: Fix repro_test fail
  sbuild: Protect sbuild ccache setup by lock
  Run only repro test with leaving build results

 doc/user_manual.md                            |  22 +-
 meta/classes/dpkg-base.bbclass                |  78 +++----
 meta/classes/dpkg-gbp.bbclass                 |  26 +--
 meta/classes/dpkg.bbclass                     | 102 ++++++---
 meta/classes/sbuild.bbclass                   | 202 ++++++++++++++++++
 meta/conf/bitbake.conf                        |   2 +
 .../sbuild-chroot/sbuild-chroot-host.bb       |  13 ++
 .../sbuild-chroot/sbuild-chroot-target.bb     |  10 +
 .../sbuild-chroot/sbuild-chroot.inc           |  39 ++++
 scripts/ci_build.sh                           |   2 +-
 testsuite/build_test/cibase.py                |   2 +-
 11 files changed, 415 insertions(+), 83 deletions(-)
 create mode 100644 meta/classes/sbuild.bbclass
 create mode 100644 meta/recipes-devtools/sbuild-chroot/sbuild-chroot-host.bb
 create mode 100644 meta/recipes-devtools/sbuild-chroot/sbuild-chroot-target.bb
 create mode 100644 meta/recipes-devtools/sbuild-chroot/sbuild-chroot.inc

-- 
2.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 19/19] fix: support build of packages with epoch version
  2022-03-14 14:59 [PATCH 00/19] ubely/sbuild: rework handling of DSC files Felix Moessbauer
@ 2022-03-14 14:59 ` Felix Moessbauer
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Moessbauer @ 2022-03-14 14:59 UTC (permalink / raw)
  To: isar-users; +Cc: ubely, jan.kiszka, Felix Moessbauer

This patch reworks the logic how the DSC file for building
with sbuild is located.
By that, we do not rely on implementation details of dpkg-source
regarding the name of the generated .dsc file.
Instead, we remove all <package>*.dsc files in advance, let dpkg-source
generate the file and use a find to locate the generated one.

By that, package versions with epochs (e.g. "1:1.0.0") are
supported.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/dpkg.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 126a4ee4..ae3430ab 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -76,8 +76,10 @@ dpkg_runbuild() {
     echo '$apt_keep_downloaded_packages = 1;' >> ${SBUILD_CONFIG}
 
     # Create a .dsc file from source directory to use it with sbuild
+    DEB_SOURCE_NAME=$(dpkg-parsechangelog --show-field Source --file ${WORKDIR}/${PPS}/debian/changelog)
+    find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -delete
     sh -c "cd ${WORKDIR}; dpkg-source -q -b ${PPS}"
-    DSC=$(head -n1 ${WORKDIR}/${PPS}/debian/changelog | awk '{gsub(/[()]/,""); printf "%s_%s.dsc", $1, $2}')
+    DSC_FILE=$(find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -print)
 
     sbuild -A -n -c ${SBUILD_CHROOT} --extra-repository="${ISAR_APT_REPO}" \
         --host=${PACKAGE_ARCH} --build=${SBUILD_HOST_ARCH} ${profiles} \
@@ -86,7 +88,7 @@ dpkg_runbuild() {
         --finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \
         --finished-build-commands="cp -n --no-preserve=owner ${deb_dir}/*.deb -t ${ext_deb_dir}/ || :" \
         --debbuildopts="--source-option=-I" \
-        --build-dir=${WORKDIR} --dist="isar" ${WORKDIR}/${DSC}
+        --build-dir=${WORKDIR} --dist="isar" ${DSC_FILE}
 
     deb_dl_dir_export "${WORKDIR}/rootfs" "${distro}"
 }
-- 
2.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-14 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 14:59 [PATCH 00/19] ubely/sbuild: rework handling of DSC files Felix Moessbauer
2022-03-14 14:59 ` [PATCH 19/19] fix: support build of packages with epoch version Felix Moessbauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox