summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-09-16 14:15:30 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:23 +0100
commitc1bd2bed0dd7105db22bdae086e993ff9dfee5fc (patch)
treecd46400352167bec82b18024b54f4fdcf7138469 /scripts/build
parent3bec92e921e8176698757ebbca09a62ce44a7f30 (diff)
downloadvyos-live-build-c1bd2bed0dd7105db22bdae086e993ff9dfee5fc.tar.gz
vyos-live-build-c1bd2bed0dd7105db22bdae086e993ff9dfee5fc.zip
Adding support for inclusion of the debian-backports repository.
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/lb_chroot_sources34
-rwxr-xr-xscripts/build/lb_config36
2 files changed, 67 insertions, 3 deletions
diff --git a/scripts/build/lb_chroot_sources b/scripts/build/lb_chroot_sources
index 6c95967d0..d5dfeea19 100755
--- a/scripts/build/lb_chroot_sources
+++ b/scripts/build/lb_chroot_sources
@@ -110,6 +110,23 @@ EOF
esac
fi
+ if [ "${LB_BACKPORTS}" = "true" ]
+ then
+ case "${LB_MODE}" in
+ debian|debian-release)
+ if [ "${LB_DISTRIBUTION}" != "sid" ] && [ "${LB_DISTRIBUTION}" != "unstable" ]
+ then
+ echo "deb ${LB_MIRROR_CHROOT_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+
+ if [ "${LB_SOURCE}" = "true" ]
+ then
+ echo "deb-src ${LB_MIRROR_CHROOT_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ fi
+ fi
+ ;;
+ esac
+ fi
+
# Check local sources.list
if Find_files config/chroot_sources/*.chroot
then
@@ -507,6 +524,23 @@ EOF
esac
fi
+ if [ "${LB_BACKPORTS}" = "true" ]
+ then
+ case "${LB_MODE}" in
+ debian|debian-release)
+ if [ "${LB_DISTRIBUTION}" != "sid" ] && [ "${LB_DISTRIBUTION}" != "unstable" ]
+ then
+ echo "deb ${LB_MIRROR_BINARY_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+
+ if [ "${LB_SOURCE}" = "true" ]
+ then
+ echo "deb-src ${LB_MIRROR_BINARY_BACKPORTS} ${LB_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list
+ fi
+ fi
+ ;;
+ esac
+ fi
+
# Configure third-party repositories
if [ -n "${LB_REPOSITORIES}" ]
then
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index a6007cc9d..05bb60cd0 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -95,9 +95,11 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--mirror-chroot URL]\n\
\t [--mirror-chroot-security URL]\n\
\t [--mirror-chroot-volatile URL]\n\
+\t [--mirror-chroot-backports URL]\n\
\t [--mirror-binary URL]\n\
\t [--mirror-binary-security URL]\n\
\t [--mirror-binary-volatile URL]\n\
+\t [--mirror-binary-backports URL]\n\
\t [--mirror-debian-installer URL]\n\
\t [--mode debian|emdebian]\n\
\t [--net-root-filesystem nfs|cfs]\n\
@@ -129,6 +131,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--templates PATH]\n\
\t [--virtual-root-size MB]\n\
\t [--volatile true|false]\n\
+\t [--backports true|false]\n\
\t [--exposed-root true|false]\n\
\t [--username NAME]\n\
\t [--verbose]\n\
@@ -141,10 +144,10 @@ Local_arguments ()
cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,dump,
initramfs:,fdisk:,losetup:,mode:,repositories:,root-command:,use-fakeroot:,tasksel:,includes:,
templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,clean,
- distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-chroot-volatile:,mirror-binary:,
- mirror-binary-security:,mirror-binary-volatile:,mirror-debian-installer:,archive-areas:,chroot-filesystem:,exposed-root:,virtual-root-size:,
+ distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-chroot-volatile:,mirror-chroot-backports:,mirror-binary:,
+ mirror-binary-security:,mirror-binary-volatile:,mirror-binary-backports:,mirror-debian-installer:,archive-areas:,chroot-filesystem:,exposed-root:,virtual-root-size:,
gzip-options:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,
- packages:,packages-lists:,tasks:,security:,volatile:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,
+ packages:,packages-lists:,tasks:,security:,volatile:,backports:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,
binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,build-with-chroot:,
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
encryption:,grub-splash:,hostname:,isohybrid-options:,iso-application:,iso-preparer:,iso-publisher:,
@@ -403,6 +406,11 @@ Local_arguments ()
shift 2
;;
+ --mirror-chroot-backports)
+ LB_MIRROR_CHROOT_BACKPORTS="${2}"
+ shift 2
+ ;;
+
--mirror-binary)
LB_MIRROR_BINARY="${2}"
shift 2
@@ -418,6 +426,11 @@ Local_arguments ()
shift 2
;;
+ --mirror-binary-backports)
+ LB_MIRROR_BINARY_BACKPORTS="${2}"
+ shift 2
+ ;;
+
--mirror-debian-installer)
LB_MIRROR_DEBIAN_INSTALLER="${2}"
shift 2
@@ -504,6 +517,11 @@ Local_arguments ()
shift 2
;;
+ --backports)
+ LB_BACKPORTS="${2}"
+ shift 2
+ ;;
+
--symlinks)
LB_SYMLINKS="${2}"
shift 2
@@ -994,6 +1012,10 @@ LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY}"
# (Default: ${LB_MIRROR_CHROOT_VOLATILE})
LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE}"
+# \$LB_MIRROR_CHROOT_BACKPORTS: set backports mirror to fetch packages from
+# (Default: ${LB_MIRROR_CHROOT_BACKPORTS})
+LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS}"
+
# \$LB_MIRROR_BINARY: set mirror which ends up in the image
# (Default: ${LB_MIRROR_BINARY})
LB_MIRROR_BINARY="${LB_MIRROR_BINARY}"
@@ -1006,6 +1028,10 @@ LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY}"
# (Default: ${LB_MIRROR_BINARY_VOLATILE})
LB_MIRROR_BINARY_VOLATILE="${LB_MIRROR_BINARY_VOLATILE}"
+# \$LB_MIRROR_BINARY_BACKPORTS: set backports mirror which ends up in the image
+# (Default: ${LB_MIRROR_BINARY_BACKPORTS})
+LB_MIRROR_BINARY_BACKPORTS="${LB_MIRROR_BINARY_BACKPORTS}"
+
# \$LB_MIRROR_DEBIAN_INSTALLER: set debian-installer mirror
# (Default: ${LB_MIRROR_BOOTSTRAP})
LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER}"
@@ -1092,6 +1118,10 @@ LB_SECURITY="${LB_SECURITY}"
# (Default: ${LB_VOLATILE})
LB_VOLATILE="${LB_VOLATILE}"
+# \$LB_BACKPORTS: enable backports updates
+# (Default: ${LB_BACKPORTS})
+LB_BACKPORTS="${LB_BACKPORTS}"
+
# \$LB_SYMLINKS: enable symlink convertion
# (Default: ${LB_SYMLINKS})
LB_SYMLINKS="${LB_SYMLINKS}"