summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorTiago Bortoletto Vaz <tiagovaz@safernet.org.br>2008-08-09 21:38:06 -0300
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:38 +0100
commit2acf0498253ae54c2030952a873ed8a93740e32f (patch)
treee5be90d167ec86a16b35e31dece596f507309f0b /helpers
parentb973d05362f0c2f854fa85a0ae02b895ffc90102 (diff)
downloadvyos-live-build-2acf0498253ae54c2030952a873ed8a93740e32f.tar.gz
vyos-live-build-2acf0498253ae54c2030952a873ed8a93740e32f.zip
Suporting debian-installer distribution choice, which makes possible to build a image using a system-independent debian-installer suite. The config option for this is --debian-installer-distribution CODENAME.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_debian-installer46
-rwxr-xr-xhelpers/lh_config12
2 files changed, 34 insertions, 24 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 512159619..10a721e02 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -86,7 +86,7 @@ case "${LH_BINARY_IMAGES}" in
DESTDIR="binary/install"
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
- if [ "${LH_DISTRIBUTION}" = "etch" ] && [ "${LH_BOOTLOADER}" = "syslinux" ]
+ if [ "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" = "etch" ] && [ "${LH_BOOTLOADER}" = "syslinux" ]
then
DESTDIR="binary"
fi
@@ -149,7 +149,7 @@ case "${LH_ARCHITECTURE}" in
DI_REMOTE_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DI_REMOTE_BASE_GTK="none"
- if [ "${LH_DISTRIBUTION}" = "etch" ]
+ if [ "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" = "etch" ]
then
DI_REMOTE_BASE="cdrom/2.6"
else
@@ -233,7 +233,7 @@ INITRD_GI="gtk/initrd.gz"
DESTDIR_GI="${DESTDIR}/gtk"
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
-if [ "${LH_DISTRIBUTION}" = "etch" ]
+if [ "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" = "etch" ]
then
case "${LH_BINARY_IMAGES}" in
usb-hdd|tar)
@@ -306,7 +306,7 @@ then
;;
esac
else
- URL="${LH_MIRROR_CHROOT}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/"
+ URL="${LH_MIRROR_CHROOT}/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/"
fi
mkdir -p "${DESTDIR_DI}"
@@ -316,7 +316,7 @@ then
# There are no prepared kernel/initrd pairs for sparc netboot so we
# must unpack them from a mini.iso
- if [ "${LH_DISTRIBUTION}" = "etch" ]
+ if [ "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" = "etch" ]
then
Download_file mini.iso ${URL}/combined/2.6/mini.iso
else
@@ -378,7 +378,7 @@ then
sparc)
DI_PACKAGES="linux-image-2.6-sparc64 linux-image-2.6-sparc64-smp silo"
- if [ "${LH_DISTRIBUTION}" = "etch" ]
+ if [ "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" = "etch" ]
then
DI_PACKAGES="${DI_PACKAGES} linux-image-2.6-sparc32"
fi
@@ -387,7 +387,7 @@ then
powerpc)
DI_PACKAGES="linux-image-2.6-powerpc linux-image-2.6-powerpc64 linux-image-2.6-powerpc-smp yaboot" # FIXME bootloader?
- if [ "${LH_DISTRIBUTION}" = "etch" ]
+ if [ "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" = "etch" ]
then
DI_PACKAGES="${DI_PACKAGES} linux-image-2.6-prep"
fi
@@ -441,21 +441,21 @@ then
fi
# Generating deb indices
- mkdir -p binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}
+ mkdir -p binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}
cd binary
- apt-ftparchive packages pool/main > dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages
- gzip -9 -c dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages.gz
+ apt-ftparchive packages pool/main > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages
+ gzip -9 -c dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages.gz
cd "${OLDPWD}"
# Fetching release
- Download_file binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release
+ Download_file binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release "${LH_MIRROR_CHROOT}"/dists/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release
mkdir binary.udeb
cd binary.udeb
# Downloading udeb indices
- Download_file Packages.gz "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz
+ Download_file Packages.gz "${LH_MIRROR_CHROOT}"/dists/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz
gunzip -c Packages.gz > Packages
# Sorting udebs
@@ -503,9 +503,9 @@ then
fi
# Excluding udebs
- grep -v "^#" "${LH_BASE}"/data/debian-cd/"${LH_DISTRIBUTION}"/udeb_exclude > exclude
- grep -v "^#" "${LH_BASE}"/data/debian-cd/"${LH_DISTRIBUTION}"/exclude-udebs >> exclude
- grep -v "^#" "${LH_BASE}"/data/debian-cd/"${LH_DISTRIBUTION}"/exclude-udebs-${LH_ARCHITECTURE} >> exclude
+ grep -v "^#" "${LH_BASE}"/data/debian-cd/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/udeb_exclude > exclude
+ grep -v "^#" "${LH_BASE}"/data/debian-cd/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/exclude-udebs >> exclude
+ grep -v "^#" "${LH_BASE}"/data/debian-cd/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/exclude-udebs-${LH_ARCHITECTURE} >> exclude
# Local exclude file
if [ -e ../config/binary_debian-installer/udeb_exclude ]
@@ -524,7 +524,7 @@ then
done
# Enable live-installer
- if [ "${LH_DEBIAN_INSTALLER}" = "live" ] && [ "${LH_DISTRIBUTION}" != "etch" ]
+ if [ "${LH_DEBIAN_INSTALLER}" = "live" ] && [ "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" != "etch" ]
then
# Remove local udebs
rm -f pool/main/b/base-installer/bootstrap-base_*.udeb
@@ -544,9 +544,9 @@ then
done
# Creating udeb indices
- mkdir -p dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"
- apt-ftparchive packages pool/main > dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages
- gzip -9 -c dists/${LH_DISTRIBUTION}/main/debian-installer/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DISTRIBUTION}/main/debian-installer/binary-${LH_ARCHITECTURE}/Packages.gz
+ mkdir -p dists/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"
+ apt-ftparchive packages pool/main > dists/"${LH_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages
+ gzip -9 -c dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LH_ARCHITECTURE}/Packages > dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LH_ARCHITECTURE}/Packages.gz
rm -f Packages* exclude
find . | cpio -dmpu "${OLDPWD}"/binary
@@ -559,19 +559,19 @@ then
apt-ftparchive \
-o APT::FTPArchive::Release::Origin="Debian" \
-o APT::FTPArchive::Release::Label="Debian" \
- -o APT::FTPArchive::Release::Suite="${LH_DISTRIBUTION}" \
+ -o APT::FTPArchive::Release::Suite="${LH_DEBIAN_INSTALLER_DISTRIBUTION}" \
-o APT::FTPArchive::Release::Version="4.0" \
- -o APT::FTPArchive::Release::Codename="${LH_DISTRIBUTION}" \
+ -o APT::FTPArchive::Release::Codename="${LH_DEBIAN_INSTALLER_DISTRIBUTION}" \
-o APT::FTPArchive::Release::Date="$(date -R)" \
-o APT::FTPArchive::Release::Architectures="${LH_ARCHITECTURE}" \
-o APT::FTPArchive::Release::Components="main" \
-o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \
- release binary/dists/${LH_DISTRIBUTION} > binary/dists/${LH_DISTRIBUTION}/Release
+ release binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION} > binary/dists/${LH_DEBIAN_INSTALLER_DISTRIBUTION}/Release
# Creating dist symlinks
for DISTRIBUTION in frozen stable testing unstable
do
- ln -s ${LH_DISTRIBUTION} binary/dists/${DISTRIBUTION}
+ ln -s ${LH_DEBIAN_INSTALLER_DISTRIBUTION} binary/dists/${DISTRIBUTION}
done
if [ "${LH_BINARY_IMAGES}" != "usb-hdd" ]
diff --git a/helpers/lh_config b/helpers/lh_config
index c69b4d8aa..4b5d70a3c 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -55,6 +55,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--debconf-priority low|medium|high|critical]\n\
\t [--debian-installer enabled|cdrom|netinst|netboot|businesscard|live|disabled]\n\
\t [--debian-installer-daily enabled|disabled]\n\
+\t [--debian-installer-distribution CODENAME]\n\
\t [--debug]\n\
\t [-d|--distribution CODENAME]\n\
\t [-e|--encryption disabled|aes128|aes192|aes256]\n\
@@ -118,7 +119,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
Local_arguments ()
{
- ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,ignore-system-defaults,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
+ ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,debian-installer-distribution:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,ignore-system-defaults,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
if [ "${?}" != "0" ]
then
@@ -474,6 +475,11 @@ Local_arguments ()
shift 2
;;
+ --debian-installer-distribution)
+ LH_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
+ shift 2
+ ;;
+
-e|--encryption)
LH_ENCRYPTION="${2}"
shift 2
@@ -999,6 +1005,10 @@ LH_DEBIAN_INSTALLER="${LH_DEBIAN_INSTALLER}"
# (Default: ${LH_DEBIAN_INSTALLER_DAILY})
LH_DEBIAN_INSTALLER_DAILY="${LH_DEBIAN_INSTALLER_DAILY}"
+# \$LH_DEBIAN_INSTALLER_DISTRIBUTION: set debian-installer suite
+# (Default: empty)
+LH_DEBIAN_INSTALLER_DISTRIBUTION="${LH_DEBIAN_INSTALLER_DISTRIBUTION}"
+
# \$LH_ENCRYPTION: set encrytion
# (Default: ${LH_ENCRYPTION})
LH_ENCRYPTION="${LH_ENCRYPTION}"