summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-02-14 13:48:45 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:43 +0100
commitff807068b95f0b116338ee94a5da94823799e2aa (patch)
tree0507e7bbab14c5dc3af07af6ef69adc658ec6d4f /functions
parent3047936fb5e4bc024b4d1902a762e24d57205e20 (diff)
downloadvyos-live-build-ff807068b95f0b116338ee94a5da94823799e2aa.tar.gz
vyos-live-build-ff807068b95f0b116338ee94a5da94823799e2aa.zip
Adding mirror option handling for derivatives.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/defaults.sh91
1 files changed, 70 insertions, 21 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 0415e6e3b..93f724f01 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -295,14 +295,17 @@ Set_defaults ()
case "${LB_MODE}" in
debian)
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://ftp.de.debian.org/debian/}"
+ LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
;;
emdebian)
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://buildd.emdebian.org/grip/}"
+ LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
;;
progress)
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://cdn.debian.net/debian/}"
+ LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://archive.progress-linux.org/progress/}"
;;
ubuntu)
@@ -315,23 +318,29 @@ Set_defaults ()
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://ports.ubuntu.com/}"
;;
esac
+
+ LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
;;
esac
LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
+ LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}"
# Setting security mirror to fetch packages from
case "${LB_MODE}" in
debian)
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-http://security.debian.org/}"
+ LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-${LB_PARENT_MIRROR_CHROOT_SECURITY}}"
;;
emdebian)
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-none}"
+ LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-${LB_PARENT_MIRROR_CHROOT_SECURITY}}"
;;
progress)
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-http://cdn.debian.net/debian-security/}"
+ LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT}}"
;;
ubuntu)
@@ -344,13 +353,21 @@ Set_defaults ()
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-http://ports.ubuntu.com/}"
;;
esac
+
+ LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-${LB_PARENT_MIRROR_CHROOT_SECURITY}}"
;;
esac
# Setting volatile mirror to fetch packages from
case "${LB_MODE}" in
- debian|progress)
+ debian)
+ LB_PARENT_MIRROR_CHROOT_VOLATILE="${LB_PARENT_MIRROR_CHROOT_VOLATILE:-${LB_PARENT_MIRROR_CHROOT}}"
+ LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE:-${LB_PARENT_MIRROR_CHROOT}}"
+ ;;
+
+ progress)
LB_PARENT_MIRROR_CHROOT_VOLATILE="${LB_PARENT_MIRROR_CHROOT_VOLATILE:-${LB_PARENT_MIRROR_CHROOT}}"
+ LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE:-${LB_MIRROR_CHROOT}}"
;;
ubuntu)
@@ -363,10 +380,13 @@ Set_defaults ()
LB_PARENT_MIRROR_CHROOT_VOLATILE="${LB_PARENT_MIRROR_CHROOT_VOLATILE:-http://ports.ubuntu.com/}"
;;
esac
+
+ LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE:-${LB_PARENT_MIRROR_CHROOT}}"
;;
*)
LB_PARENT_MIRROR_CHROOT_VOLATILE="${LB_PARENT_MIRROR_CHROOT_VOLATILE:-none}"
+ LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE:-none}"
;;
esac
@@ -374,21 +394,34 @@ Set_defaults ()
case "${LB_MODE}" in
debian)
LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS:-http://backports.debian.org/debian-backports/}"
+ LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS:-${LB_PARENT_MIRROR_CHROOT_BACKPORTS}}"
+ ;;
+
+ progress)
+ LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS:-${LB_MIRROR_CHROOT}}"
;;
*)
LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS:-none}"
+ LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS:-none}"
;;
esac
# Setting mirror which ends up in the image
case "${LB_MODE}" in
- debian|progress)
+ debian)
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://cdn.debian.net/debian/}"
+ LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-${LB_PARENT_MIRROR_BINARY}}"
+ ;;
+
+ progress)
+ LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://cdn.debian.net/debian/}"
+ LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-${LB_MIRROR_CHROOT}}"
;;
emdebian)
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://buildd.emdebian.org/grip/}"
+ LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-${LB_PARENT_MIRROR_BINARY}}"
;;
ubuntu)
@@ -401,6 +434,8 @@ Set_defaults ()
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://ports.ubuntu.com/}"
;;
esac
+
+ LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-${LB_PARENT_MIRROR_BINARY}}"
;;
esac
@@ -408,14 +443,17 @@ Set_defaults ()
case "${LB_MODE}" in
debian)
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-http://security.debian.org/}"
+ LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-${LB_PARENT_MIRROR_BINARY_SECURITY}}"
;;
emdebian)
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-none}"
+ LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-${LB_PARENT_MIRROR_BINARY_SECURITY}}"
;;
progress)
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-http://cdn.debian.net/debian-security/}"
+ LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-${LB_MIRROR_CHROOT}}"
;;
ubuntu)
@@ -428,13 +466,21 @@ Set_defaults ()
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-http://ports.ubuntu.com/}"
;;
esac
+
+ LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-${LB_PARENT_MIRROR_BINARY_SECURITY}}"
;;
esac
# Setting volatile mirror which ends up in the image
case "${LB_MODE}" in
- debian|progress)
+ debian)
+ LB_PARENT_MIRROR_BINARY_VOLATILE="${LB_PARENT_MIRROR_BINARY_VOLATILE:-${LB_PARENT_MIRROR_BINARY}}"
+ LB_MIRROR_BINARY_VOLATILE="${LB_MIRROR_BINARY_VOLATILE:-${LB_PARENT_MIRROR_BINARY}}"
+ ;;
+
+ progress)
LB_PARENT_MIRROR_BINARY_VOLATILE="${LB_PARENT_MIRROR_BINARY_VOLATILE:-${LB_PARENT_MIRROR_BINARY}}"
+ LB_MIRROR_BINARY_VOLATILE="${LB_MIRROR_BINARY_VOLATILE:-none}"
;;
ubuntu)
@@ -458,14 +504,31 @@ Set_defaults ()
case "${LB_MODE}" in
debian)
LB_PARENT_MIRROR_BINARY_BACKPORTS="${LB_PARENT_MIRROR_BINARY_BACKPORTS:-http://backports.debian.org/debian-backports/}"
+ LB_MIRROR_BINARY_BACKPORTS="${LB_MIRROR_BINARY_BACKPORTS:-${LB_PARENT_MIRROR_BINARY_BACKPORTS}}"
+ ;;
+
+ progress)
+ LB_PARENT_MIRROR_BINARY_BACKPORTS="${LB_PARENT_MIRROR_BINARY_BACKPORTS:-none}"
+ LB_MIRROR_BINARY_BACKPORTS="${LB_MIRROR_BINARY_BACKPORTS:-${LB_MIRROR_CHROOT}}"
;;
*)
LB_PARENT_MIRROR_BINARY_BACKPORTS="${LB_PARENT_MIRROR_BINARY_BACKPORTS:-none}"
+ LB_MIRROR_BINARY_BACKPORTS="${LB_MIRROR_BINARY_BACKPORTS:-${LB_PARENT_MIRROR_BINARY_BACKPORTS}}"
;;
esac
- LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
+ case "${LB_MODE}" in
+ progress)
+ LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
+ LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
+ ;;
+
+ *)
+ LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
+ LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_DEBIAN_INSTALLER}}"
+ ;;
+ esac
if [ -z "${LB_REPOSITORIES}" ]
then
@@ -508,17 +571,13 @@ Set_defaults ()
# Setting keyring packages
case "${LB_MODE}" in
- debian)
- LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
+ ubuntu)
+ LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-ubuntu-keyring}"
;;
- emdebian)
+ *)
LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
;;
-
- ubuntu)
- LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-ubuntu-keyring}"
- ;;
esac
# Setting language string
@@ -710,19 +769,9 @@ Set_defaults ()
LB_TASKS="$(echo ${LB_TASKS} | sed -e 's| ||g')"
# Setting security updates option
- if [ "${LB_PARENT_MIRROR_CHROOT_SECURITY}" = "none" ] || [ "${LB_PARENT_MIRROR_BINARY_SECURITY}" = "none" ]
- then
- LB_SECURITY="false"
- fi
-
LB_SECURITY="${LB_SECURITY:-true}"
# Setting volatile updates option
- if [ "${LB_PARENT_MIRROR_CHROOT_VOLATILE}" = "none" ] || [ "${LB_PARENT_MIRROR_BINARY_VOLATILE}" = "none" ]
- then
- LB_VOLATILE="false"
- fi
-
LB_VOLATILE="${LB_VOLATILE:-true}"
## config/binary