[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#929271: backports customizations are not enabled for live-build



Package: live-build
Version: 1:20170213
Severity: important
Tags: patch

when try to build live jessie image using strecht i got those errors

lb config: unrecognized option '--mirror-chroot-updates'
lb config: unrecognized option '--parent-mirror-binary-updates'
lb config: unrecognized option '--parent-mirror-chroot-updates'

i bypass these options due main debian repositories have not jessie backports..

in any case.. when try to build any live flavor.. it failds and the
option are documented.

the attached patch i provides could solve if ...


Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
Description: rollback the drop of the backports customizations due now merged in main repo
Author: PICCORO Lenz McKAY <mckaygerhard@gmail.com>

---
Origin: https://salsa.debian.org/live-team/live-build/commit/dd15ade8bbdc6360816ed858253e7aaa68e4c9c2

--- live-build-4.0.4.orig/functions/defaults.sh
+++ live-build-4.0.4/functions/defaults.sh
@@ -435,6 +435,31 @@ Set_defaults ()
 			;;
 	esac
 
+	# Setting backports mirror to fetch packages from
+	case "${LB_MODE}" in
+		debian)
+			_DISTRIBUTOR="$(lsb_release -sc)"
+			case "${_DISTRIBUTOR}" in
+				jessie|wheeze)
+					LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS:-http://archive.debian.org/debian-backports/}";
+					LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS:-${LB_MIRROR_CHROOT_BACKPORTS}}"
+					;;
+				*)
+					LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS:-http://backports.debian.org/debian-backports/}";
+					LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS:-${LB_MIRROR_CHROOT_BACKPORTS}}"
+					;;
+			esac
+			;;
+
+		progress-linux)
+			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)
@@ -489,6 +514,30 @@ Set_defaults ()
 			;;
 	esac
 
+	# Setting backports mirror which ends up in the image
+	case "${LB_MODE}" in
+		debian)
+			_DISTRIBUTOR="$(lsb_release -sc)"
+			case "${_DISTRIBUTOR}" in
+				jessie|wheeze)
+					LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS:-http://archive.debian.org/debian-backports/}";
+					LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS:-${LB_MIRROR_CHROOT_BACKPORTS}}"
+					;;
+				*)
+					LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS:-http://ftp.de.debian.org/debian-backports/}";
+					LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS:-${LB_MIRROR_CHROOT_BACKPORTS}}"
+					;;
+			esac
+			;;
+		progress-linux)
+			LB_MIRROR_BINARY_BACKPORTS="${LB_MIRROR_BINARY_BACKPORTS:-${LB_MIRROR_BINARY}}"
+			;;
+		*)
+			LB_PARENT_MIRROR_BINARY_BACKPORTS="${LB_PARENT_MIRROR_BINARY_BACKPORTS:-none}"
+			LB_MIRROR_BINARY_BACKPORTS="${LB_MIRROR_BINARY_BACKPORTS:-none}"
+			;;
+	esac
+
 	case "${LB_MODE}" in
 		progress-linux)
 			LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
--- live-build-4.0.4.orig/scripts/build/chroot_archives
+++ live-build-4.0.4/scripts/build/chroot_archives
@@ -160,11 +160,11 @@ EOF
 				debian)
 					if [ "${LB_PARENT_DISTRIBUTION}" != "sid" ]
 					then
-						echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
+						echo "deb ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
 
 						if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
 						then
-							echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
+							echo "deb-src ${LB_PARENT_MIRROR_CHROOT_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
 						fi
 					fi
 					;;
@@ -172,11 +172,11 @@ EOF
 
 			if [ "${LB_DERIVATIVE}" = "true" ]
 			then
-				echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
+				echo "deb ${LB_MIRROR_CHROOT_BACKPORTS} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
 
 				if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
 				then
-					echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
+					echo "deb-src ${LB_MIRROR_CHROOT_BACKPORTS} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
 				fi
 			fi
 		fi
@@ -652,11 +652,11 @@ EOF
 				debian)
 					if [ "${LB_PARENT_DISTRIBUTION}" != "sid" ]
 					then
-						echo "deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
+						echo "deb ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
 
 						if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
 						then
-							echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
+							echo "deb-src ${LB_PARENT_MIRROR_BINARY_BACKPORTS} ${LB_PARENT_DISTRIBUTION}-backports ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
 						fi
 					fi
 					;;
@@ -664,11 +664,11 @@ EOF
 
 			if [ "${LB_DERIVATIVE}" = "true" ]
 			then
-				echo "deb ${LB_MIRROR_BINARY} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
+				echo "deb ${LB_MIRROR_BINARY_BACKPORTS} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
 
 				if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
 				then
-					echo "deb-src ${LB_MIRROR_BINARY} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
+					echo "deb-src ${LB_MIRROR_BINARY_BACKPORTS} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
 				fi
 			fi
 		fi
--- live-build-4.0.4.orig/scripts/build/config
+++ live-build-4.0.4/scripts/build/config
@@ -83,14 +83,18 @@ USAGE="${PROGRAM}   [--apt apt|aptitude]
 \t    [-m|--parent-mirror-bootstrap URL]\n\
 \t    [--parent-mirror-chroot URL]\n\
 \t    [--parent-mirror-chroot-security URL]\n\
+\t    [--parent-mirror-chroot-backports URL]\n\
 \t    [--parent-mirror-binary URL]\n\
 \t    [--parent-mirror-binary-security URL]\n\
+\t    [--parent-mirror-binary-backports URL]\n\
 \t    [--parent-mirror-debian-installer URL]\n\
 \t    [--mirror-bootstrap URL]\n\
 \t    [--mirror-chroot URL]\n\
 \t    [--mirror-chroot-security URL]\n\
+\t    [--mirror-chroot-backports URL]\n\
 \t    [--mirror-binary URL]\n\
 \t    [--mirror-binary-security URL]\n\
+\t    [--mirror-binary-backportsURL]\n\
 \t    [--mirror-debian-installer URL]\n\
 \t    [--mode debian|ubuntu]\n\
 \t    [--system live|normal]\n\
@@ -132,10 +136,10 @@ Local_arguments ()
 		cache-stages:,debconf-frontend:,debconf-priority:,dump,
 		initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:,
 		templates:,architectures:,clean,
-		distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-
mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-binary:,
-		parent-mirror-binary-security:,parent-mirror-debian-installer:,
-		mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,
-		mirror-binary-security:,mirror-debian-installer:,
+		distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-
mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-chroot-backports:,parent-mirror-binary:,
+		parent-mirror-binary-security:,parent-mirror-binary-backports:,parent-mirror-debian-installer:,
+		mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-chroot-backports:,mirror-binary:,
+		mirror-binary-security:,mirror-binary-backports:,mirror-debian-installer:,
 		archive-areas:,parent-archive-areas:,chroot-filesystem:,
 		gzip-options:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
 		security:,updates:,backports:,binary-filesystem:,binary-images:,
@@ -376,6 +380,11 @@ Local_arguments ()
 				shift 2
 				;;
 
+			--parent-mirror-chroot-backports)
+				LB_PARENT_MIRROR_CHROOT_BACKPORTS="${2}"
+				shift 2
+				;;
+
 			--parent-mirror-binary)
 				LB_PARENT_MIRROR_BINARY="${2}"
 				shift 2
@@ -386,6 +395,11 @@ Local_arguments ()
 				shift 2
 				;;
 
+			--parent-mirror-binary-backports)
+				LB_PARENT_MIRROR_BINARY_BACKPORTS="${2}"
+				shift 2
+				;;
+
 			--parent-mirror-debian-installer)
 				LB_PARENT_MIRROR_DEBIAN_INSTALLER="${2}"
 				shift 2
@@ -406,6 +420,11 @@ Local_arguments ()
 				shift 2
 				;;
 
+			--mirror-chroot-backports)
+				LB_MIRROR_CHROOT_BACKPORTS="${2}"
+				shift 2
+				;;
+
 			--mirror-binary)
 				LB_MIRROR_BINARY="${2}"
 				shift 2
@@ -416,6 +435,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
@@ -1048,6 +1072,10 @@ LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIR
 # (Default: ${LB_PARENT_MIRROR_CHROOT_SECURITY})
 LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY}"
 
+# \$LB_PARENT_MIRROR_CHROOT_BACKPORTS: set backports parent mirror to fetch packages from
+# (Default: ${LB_PARENT_MIRROR_CHROOT_BACKPORTS})
+LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS}"
+
 # \$LB_PARENT_MIRROR_BINARY: set parent mirror which ends up in the image
 # (Default: ${LB_PARENT_MIRROR_BINARY})
+				LB_MIRROR_BINARY_BACKPORTS="${2}"
+				shift 2
+				;;
+
 			--mirror-debian-installer)
 				LB_MIRROR_DEBIAN_INSTALLER="${2}"
 				shift 2
@@ -1048,6 +1072,10 @@ LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIR
 # (Default: ${LB_PARENT_MIRROR_CHROOT_SECURITY})
 LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY}"
 
+# \$LB_PARENT_MIRROR_CHROOT_BACKPORTS: set backports parent mirror to fetch packages from
+# (Default: ${LB_PARENT_MIRROR_CHROOT_BACKPORTS})
+LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS}"
+
 # \$LB_PARENT_MIRROR_BINARY: set parent mirror which ends up in the image
 # (Default: ${LB_PARENT_MIRROR_BINARY})
 LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY}"
@@ -1056,6 +1084,10 @@ LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIR
 # (Default: ${LB_PARENT_MIRROR_BINARY_SECURITY})
 LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY}"
 
+# \$LB_PARENT_MIRROR_BINARY_BACKPORTS: set backports parent mirror which ends up in the image
+# (Default: ${LB_PARENT_MIRROR_BINARY_BACKPORTS})
+LB_PARENT_MIRROR_BINARY_BACKPORTS="${LB_PARENT_MIRROR_BINARY_BACKPORTS}"
+
 # \$LB_PARENT_MIRROR_DEBIAN_INSTALLER: set debian-installer parent mirror
 # (Default: ${LB_PARENT_MIRROR_BOOTSTRAP})
 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}"
@@ -1072,6 +1104,10 @@ LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT}"
 # (Default: ${LB_MIRROR_CHROOT_SECURITY})
 LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY}"
 
+# \$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}"
@@ -1080,6 +1116,10 @@ LB_MIRROR_BINARY="${LB_MIRROR_BINARY}"
 # (Default: ${LB_MIRROR_BINARY_SECURITY})
 LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY}"
 
+# \$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}"


Reply to: