Skip to content

Commit

Permalink
debian: support old stable release
Browse files Browse the repository at this point in the history
  • Loading branch information
sylirre committed Jan 31, 2024
1 parent b6fcb62 commit 1918dba
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 9 deletions.
47 changes: 47 additions & 0 deletions distro-build/debian-oldstable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
dist_name="Debian"
dist_version="bullseye"

bootstrap_distribution() {
sudo rm -f "${ROOTFS_DIR}"/debian-*.tar.xz

for arch in arm64 armhf i386 amd64; do
sudo rm -rf "${WORKDIR}/debian-$(translate_arch "$arch")"
sudo mmdebstrap \
--architectures=${arch} \
--variant=minbase \
--components="main,contrib" \
--include="ca-certificates,locales" \
--format=directory \
"${dist_version}" \
"${WORKDIR}/debian-$(translate_arch "$arch")"
archive_rootfs "${ROOTFS_DIR}/debian-$(translate_arch "$arch")-pd-${CURRENT_VERSION}.tar.xz" \
"debian-$(translate_arch "$arch")"
done
unset arch
}

write_plugin() {
cat <<- EOF > "${PLUGIN_DIR}/debian-oldstable.sh"
# This is a default distribution plug-in.
# Do not modify this file as your changes will be overwritten on next update.
# If you want customize installation, please make a copy.
DISTRO_NAME="Debian"
DISTRO_COMMENT="Old stable release (${dist_version})."
TARBALL_URL['aarch64']="${GIT_RELEASE_URL}/debian-${dist_version}-aarch64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['aarch64']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-aarch64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['arm']="${GIT_RELEASE_URL}/debian-${dist_version}-arm-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['arm']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-arm-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['i686']="${GIT_RELEASE_URL}/debian-${dist_version}-i686-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['i686']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-i686-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['x86_64']="${GIT_RELEASE_URL}/debian-${dist_version}-x86_64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['x86_64']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-x86_64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
distro_setup() {
${TAB}# Configure en_US.UTF-8 locale.
${TAB}sed -i -E 's/#[[:space:]]?(en_US.UTF-8[[:space:]]+UTF-8)/\1/g' ./etc/locale.gen
${TAB}run_proot_cmd DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
}
EOF
}
18 changes: 9 additions & 9 deletions distro-build/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ write_plugin() {
# Do not modify this file as your changes will be overwritten on next update.
# If you want customize installation, please make a copy.
DISTRO_NAME="Debian"
DISTRO_COMMENT="A stable release (${dist_version})."
DISTRO_COMMENT="Stable release (${dist_version})."
TARBALL_URL['aarch64']="${GIT_RELEASE_URL}/debian-aarch64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['aarch64']="$(sha256sum "${ROOTFS_DIR}/debian-aarch64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['arm']="${GIT_RELEASE_URL}/debian-arm-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['arm']="$(sha256sum "${ROOTFS_DIR}/debian-arm-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['i686']="${GIT_RELEASE_URL}/debian-i686-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['i686']="$(sha256sum "${ROOTFS_DIR}/debian-i686-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['x86_64']="${GIT_RELEASE_URL}/debian-x86_64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['x86_64']="$(sha256sum "${ROOTFS_DIR}/debian-x86_64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['aarch64']="${GIT_RELEASE_URL}/debian-${dist_version}-aarch64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['aarch64']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-aarch64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['arm']="${GIT_RELEASE_URL}/debian-${dist_version}-arm-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['arm']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-arm-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['i686']="${GIT_RELEASE_URL}/debian-${dist_version}-i686-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['i686']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-i686-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
TARBALL_URL['x86_64']="${GIT_RELEASE_URL}/debian-${dist_version}-x86_64-pd-${CURRENT_VERSION}.tar.xz"
TARBALL_SHA256['x86_64']="$(sha256sum "${ROOTFS_DIR}/debian-${dist_version}-x86_64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')"
distro_setup() {
${TAB}# Configure en_US.UTF-8 locale.
Expand Down

0 comments on commit 1918dba

Please sign in to comment.