diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2023-03-06 00:31:09 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2023-03-06 00:31:09 +0100 |
commit | f35e7ab6965d4da9779e948de71d23892954c1c7 (patch) | |
tree | ab2d9dd46478aaeddd9dba4b3c6453c832c86f2d /build-aux | |
parent | ff492791059ff4dc7257131b5f9eebf2e3f825d4 (diff) | |
download | blogc-master.tar.gz blogc-master.tar.bz2 blogc-master.zip |
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/build-debian.sh | 51 |
1 files changed, 16 insertions, 35 deletions
diff --git a/build-aux/build-debian.sh b/build-aux/build-debian.sh index 44e9869..5b90c36 100755 --- a/build-aux/build-debian.sh +++ b/build-aux/build-debian.sh @@ -6,53 +6,35 @@ export DEBEMAIL="rafael+deb@rafaelmartins.eng.br" export DEBFULLNAME="Automatic Builder (github-actions)" export DEB_BUILD_OPTIONS="noddebs" -export DIST="$(echo "${TARGET}" | cut -d- -f2)" +PBUILDER_CHROOTS_VERSION="202303052042" +PBUILDER_CHROOTS_BASE_URL="https://github.com/rafaelmartins/pbuilder-chroots/releases/download/pbuilder-chroots-amd64-${PBUILDER_CHROOTS_VERSION}" MY_P="${PN}_${PV}" +DIST="$(echo "${TARGET}" | cut -d- -f2)" ARCH="$(echo "${TARGET}" | cut -d- -f3)" +DISTRO="$(wget -q -O- "${PBUILDER_CHROOTS_BASE_URL}/DISTROS" | grep "${DIST}")" +DEB_VERSION="$(echo "${DISTRO}" | cut -d_ -f3)" +REV="1~" +if [[ x${DEB_VERSION} != x ]]; then + REV="${REV}${DEB_VERSION}" +fi +REV="${REV}${DIST}" -REV= case ${DIST} in - bullseye) - REV="1~11bullseye" - ;; - bookworm) - REV="1~12bookworm" - DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS} nocheck" - ;; - sid) - REV="1~sid" + bookworm|sid|kinetic) DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS} nocheck" ;; - focal) - REV="1~11.0focal" - ;; - jammy) - REV="1~12.0jammy" - ;; - kinetic) - REV="1~12.1kinetic" - DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS} nocheck" - ;; - *) - echo "error: unsupported dist: ${DIST}" - exit 1 - ;; esac download_pbuilder_chroot() { - local index="$(wget -q -O- https://distfiles.rgm.io/pbuilder-chroots/LATEST/)" - local archive="$(echo "${index}" | sed -n "s/.*\(pbuilder-chroot-${DIST}-${ARCH}-.*\)\.sha512.*/\1/p" | head -n 1)" - local p="$(echo "${index}" | sed -n "s/.*pbuilder-chroot-${DIST}-${ARCH}-\(.*\)\.tar.*\.sha512.*/pbuilder-chroots-\1/p" | head -n 1)" - pushd "${SRCDIR}" > /dev/null - wget -c "https://distfiles.rgm.io/pbuilder-chroots/${p}/${archive}"{,.sha512} - sha512sum --check --status "${archive}.sha512" + wget -c "${PBUILDER_CHROOTS_BASE_URL}/pbuilder-chroot-${DISTRO}-${ARCH}-${PBUILDER_CHROOTS_VERSION}.tar.xz"{,.sha512} + sha512sum --check --status "pbuilder-chroot-${DISTRO}-${ARCH}-${PBUILDER_CHROOTS_VERSION}.tar.xz.sha512" sudo rm -rf /tmp/pbuilder - mkdir /tmp/pbuilder - fakeroot tar --checkpoint=1000 -xf "${archive}" -C /tmp/pbuilder + mkdir -p "/tmp/pbuilder/${DIST}-${ARCH}" + fakeroot tar --checkpoint=1000 -xf "pbuilder-chroot-${DISTRO}-${ARCH}-${PBUILDER_CHROOTS_VERSION}.tar.xz" -C "/tmp/pbuilder/${DIST}-${ARCH}" popd > /dev/null } @@ -97,6 +79,7 @@ create_reprepro_conf() { echo } +download_pbuilder_chroot download_orig rm -rf "${BUILDDIR}/${P}" @@ -114,8 +97,6 @@ then exit 0 fi -download_pbuilder_chroot - sudo cowbuilder \ --update \ --basepath "/tmp/pbuilder/${DIST}-${ARCH}/base.cow" |