Merge branch 'master' into arraybolt3/chroot_local-repos

This commit is contained in:
Aaron Rainbolt 2024-10-15 19:07:34 -05:00
commit e745cbb6ac
No known key found for this signature in database
GPG Key ID: A709160D73C79109
5 changed files with 78 additions and 9 deletions

1
debian/control vendored
View File

@ -34,6 +34,7 @@ Recommends:
xz-utils,
Suggests:
e2fsprogs,
git,
parted,
mtd-utils,
Description: Live System Build Components

49
debian/gitlab-ci.yml vendored
View File

@ -2,3 +2,52 @@
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
variables:
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
.lb-build:
stage: test
script:
- apt-get update
- apt-get install -y "$(find . -type f -name '*.deb')"
- lb --version
# We need to stay within the maximum limit for artifacts on Salsa (250M),
# so disable a few things
- lb config --apt-indices false --apt-recommends false --firmware-chroot false --source false --distribution sid --updates false --debootstrap-options "--variant=minbase" --bootloaders grub-efi
# But do install user-setup and sudo to have a usable image
- echo "user-setup sudo" > config/package-lists/recommends.list.chroot
# xz compresses initrds much better than zstd
- echo xz-utils >> config/package-lists/live.list.chroot
- mkdir -p config/includes.chroot_after_packages/etc/initramfs-tools/conf.d/
- printf 'COMPRESS=xz\nCOMPRESSLEVEL=9\n' > config/includes.chroot_after_packages/etc/initramfs-tools/conf.d/compress
# Remove stuff not really needed to boot
- echo 'rm -rf /usr/share/doc/* /usr/share/i18n/* /usr/share/man/* /usr/share/locale/*' >> config/hooks/normal/9020-remove-man-cache.hook.chroot
# Build the ISO
- lb build
- ls -lh
- cp live-image-${BUILD_ARCH}.contents ${WORKING_DIR}
- cp live-image-${BUILD_ARCH}.hybrid.iso ${WORKING_DIR}
artifacts:
when: always
paths:
- ${WORKING_DIR}/live-image-${BUILD_ARCH}.contents
- ${WORKING_DIR}/live-image-${BUILD_ARCH}.hybrid.iso
needs:
- job: build
artifacts: true
ISO amd64:
extends:
- .lb-build
variables:
BUILD_ARCH: 'amd64'
ISO arm64:
extends:
- .lb-build
variables:
BUILD_ARCH: 'arm64'
tags:
- $SALSA_CI_ARM_RUNNER_TAG

View File

@ -280,20 +280,14 @@ Prepare_config ()
case "${LB_PARENT_DISTRIBUTION_BINARY}" in
sid|unstable)
LB_SECURITY="${LB_SECURITY:-false}"
LB_UPDATES="${LB_UPDATES:-false}"
LB_PROPOSED_UPDATES="${LB_PROPOSED_UPDATES:-false}"
;;
*)
LB_SECURITY="${LB_SECURITY:-true}"
;;
esac
case "${LB_PARENT_DISTRIBUTION_BINARY}" in
sid|unstable)
LB_UPDATES="${LB_UPDATES:-false}"
;;
*)
LB_UPDATES="${LB_UPDATES:-true}"
LB_PROPOSED_UPDATES="${LB_PROPOSED_UPDATES:-false}"
;;
esac
@ -568,6 +562,10 @@ Validate_config_permitted_values ()
Echo_error "Value for LB_ONIE (--onie) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_PROPOSED_UPDATES}" != "true" ] && [ "${LB_PROPOSED_UPDATES}" != "false" ]; then
Echo_error "Value for LB_PROPOSED_UPDATES (--proposed-updates) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_SECURITY}" != "true" ] && [ "${LB_SECURITY}" != "false" ]; then
Echo_error "Value for LB_SECURITY (--security) can only be 'true' or 'false'!"
exit 1

View File

@ -112,6 +112,17 @@ Create_apt_sources_list ()
fi
fi
# Set proposed-updates repo
if [ "${LB_PROPOSED_UPDATES}" = "true" ]; then
echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-proposed-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-proposed-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
if [ "${LB_DERIVATIVE}" = "true" ]; then
echo "deb ${MIRROR} ${_DISTRIBUTION}-proposed-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
echo "deb-src ${MIRROR} ${_DISTRIBUTION}-proposed-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
fi
fi
# Set backports repo
if [ "${LB_BACKPORTS}" = "true" ]; then
case "${LB_MODE}" in

View File

@ -115,6 +115,7 @@ USAGE="${PROGRAM} [--apt apt|apt-get|aptitude]\n\
\t [--parent-mirror-chroot URL]\n\
\t [--parent-mirror-chroot-security URL]\n\
\t [--parent-mirror-debian-installer URL]\n\
\t [--proposed-updates true|false]\n\
\t [--quiet]\n\
\t [--security true|false]\n\
\t [--source true|false]\n\
@ -171,6 +172,7 @@ Local_arguments ()
parent-mirror-binary-security:,parent-mirror-bootstrap:,
parent-mirror-chroot:,parent-mirror-chroot-security:,
parent-mirror-debian-installer:,
proposed-updates:,
quiet,
security:,source:,source-images:,swap-file-path:,swap-file-size:,system:,
tasksel:,
@ -781,6 +783,11 @@ Local_arguments ()
shift 2
;;
--proposed-updates)
LB_PROPOSED_UPDATES="${2}"
shift 2
;;
--security)
LB_SECURITY="${2}"
shift 2
@ -1195,6 +1202,9 @@ LB_UPDATES="${LB_UPDATES}"
# Enable backports updates
LB_BACKPORTS="${LB_BACKPORTS}"
# Enable proposed updates
LB_PROPOSED_UPDATES="${LB_PROPOSED_UPDATES}"
# Set path to one or more local deb repositories
LB_LOCALREPOS="${LB_LOCALREPOS}"
EOF