From fe7102be0cfa4b23ac583055dfdfc6241fd61179 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 10:04:23 +0200 Subject: Adding live-package 0.99.9-1. --- src/config | 22 ++++++++++++++++++++++ src/lists/minimal | 2 +- src/main.sh | 11 ++++++++--- src/scripts/11bootstrap.sh | 11 +++++++++++ src/scripts/14chroot.sh | 16 ++++++++++++++++ src/scripts/21image.sh | 20 ++++++++++++++++++++ 6 files changed, 78 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/config b/src/config index a039aefd0..a319ada71 100644 --- a/src/config +++ b/src/config @@ -63,6 +63,28 @@ # Chroots http_proxy (Default: empty) #LIVE_PROXY_HTTP="" +# Custom repositories (Default: none) +#LIVE_REPOSITORIES="" + +# Custom repository list +LIVE_REPOSITORY_bpo="http://www.backports.org/debian/" +LIVE_REPOSITORY_KEY_bpo="http://backports.org/debian/archive.key" +LIVE_REPOSITORY_KEYRING_bpo="" +LIVE_REPOSITORY_DISTRIBUTION="" +LIVE_REPOSITORY_SECTIONS_bpo="main contrib non-free" + +LIVE_REPOSITORY_edu="http://ftp.skolelinux.org/skolelinux/" +LIVE_REPOSITORY_KEY_edu="" +LIVE_REPOSITORY_KEYRING_edu="debian-edu-archive-keyring" +LIVE_REPOSITORY_DISTRIBUTION_edu="etch-test" +LIVE_REPOSITORY_SECTIONS_edu="local" + +LIVE_REPOSITORY_duo="http://ftp.debian-unofficial.org/debian/" +LIVE_REPOSITORY_KEY_duo="http://ftp-master.debian-unofficial.org/key_2006.asc" +LIVE_REPOSITORY_KEYRING_duo="" +LIVE_REPOSITORY_DISTRIBUTION="" +LIVE_REPOSITORY_SECTIONS_duo="main contrib non-free restricted" + # Debian section (Default: main) #LIVE_SECTION="main" diff --git a/src/lists/minimal b/src/lists/minimal index d57bbc249..b6c29c06e 100644 --- a/src/lists/minimal +++ b/src/lists/minimal @@ -1,4 +1,4 @@ # /usr/share/make-live/lists/minimal - package list for make-live(8) # Minimal -eject nvi sudo +eject vim-tiny sudo diff --git a/src/main.sh b/src/main.sh index a6ccf8589..aa2e246f4 100755 --- a/src/main.sh +++ b/src/main.sh @@ -28,7 +28,7 @@ set -e BASE="/usr/share/make-live" CONFIG="/etc/make-live.conf" PROGRAM="`basename ${0}`" -VERSION="0.99.8" +VERSION="0.99.9" CODENAME_OLDSTABLE="woody" CODENAME_STABLE="sarge" @@ -41,7 +41,7 @@ do . "${SCRIPT}" done -USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--disable-generic-indices] [--enable-generic-indices] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--proxy-ftp URL] [--proxy-http URL] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]" +USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--disable-generic-indices] [--enable-generic-indices] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--proxy-ftp URL] [--proxy-http URL] [--repositories NAME] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]" Help () { @@ -81,6 +81,7 @@ Help () echo " --mirror-security: specifies debian security mirror." echo " --packages: specifies aditional packages." echo " -p, --package-list: specifies additonal package list." + echo " --repositories: specifies custom repositories." echo " -r, --root: specifies build root." echo " --proxy-ftp: specifies \${ftp_proxy}." echo " --proxy-http: specifies \${http_proxy}." @@ -158,7 +159,7 @@ Configuration () Main () { - ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,config:,chroot:,distribution:,filesystem:,flavour:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,proxy-http:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" + ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,config:,chroot:,distribution:,filesystem:,flavour:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" if [ "${?}" != "0" ] then @@ -254,6 +255,10 @@ Main () LIVE_PROXY_HTTP="${2}"; shift 2 ;; + --repositories) + LIVE_REPOSITORIES="${2}"; shift 2 + ;; + -s|--section) LIVE_SECTION="${2}"; shift 2 ;; diff --git a/src/scripts/11bootstrap.sh b/src/scripts/11bootstrap.sh index f0a671563..f2f6c0ae7 100644 --- a/src/scripts/11bootstrap.sh +++ b/src/scripts/11bootstrap.sh @@ -13,6 +13,17 @@ Bootstrap () { if [ ! -f "${LIVE_ROOT}"/.stage/bootstrap ] then + # Use proxy + if [ -n "${LIVE_PROXY_FTP}" ] && [ -z "${ftp_proxy}" ] + then + export ftp_proxy="${LIVE_PROXY_FTP}" + fi + + if [ -n "${LIVE_PROXY_HTTP}" ] && [ -z "${http_proxy}" ] + then + export http_proxy="${LIVE_PROXY_HTTP}" + fi + # Create chroot directory if [ ! -d "${LIVE_CHROOT}" ] then diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh index 356c1a2ec..e264128e0 100644 --- a/src/scripts/14chroot.sh +++ b/src/scripts/14chroot.sh @@ -36,6 +36,22 @@ Chroot () if [ "${LIVE_FLAVOUR}" != "minimal" ] then Chroot_exec "apt-get install --yes --force-yes debian-archive-keyring" + + for NAME in ${LIVE_REPOSITORIES} + do + eval REPOSITORY_KEY="$`echo LIVE_REPOSITORY_KEY_$NAME`" + eval REPOSITORY_KEYRING="$`echo LIVE_REPOSITORY_KEYRING_$NAME`" + + if [ -n "${REPOSITORY_KEYRING}" ] + then + Chroot_exec "apt-get install ${REPOSITORY_KEYRING}" + elif [ -n "${REPOSITORY_KEY}" ] + then + Chroot_exec "wget ${REPOSITORY_KEY}" + Chroot_exec "apt-key add `basename ${REPOSITORY_KEY}`" + Chroot_exec "rm -f `basename ${REPOSITORY_KEY}`" + fi + done fi fi diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh index 7258b6af1..1bab3e1fa 100644 --- a/src/scripts/21image.sh +++ b/src/scripts/21image.sh @@ -93,6 +93,25 @@ EOF ;; esac + # Add custom repositories + echo "" >> "${LIVE_CHROOT}"/etc/apt/sources.list + echo "# Custom repositories" >> "${LIVE_CHROOT}"/etc/apt/sources.list + + for NAME in ${LIVE_REPOSITORIES} + do + eval REPOSITORY="$`echo LIVE_REPOSITORY_$NAME`" + eval REPOSITORY_DISTRIBUTION="$`echo LIVE_REPOSITORY_DISTRIBUTION_$NAME`" + eval REPOSITORY_SECTIONS="$`echo LIVE_REPOSITORY_SECTIONS_$NAME`" + + # Configure /etc/apt/sources.list + if [ -n "${REPOSITORY_DISTRIBUTION}" ] + then + echo "deb ${REPOSITORY} ${REPOSITORY_DISTRIBUTION} ${REPOSITORY_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + else + echo "deb ${REPOSITORY} ${LIVE_DISTRIBUTION} ${REPOSITORY_SECTIONS}" >> "${LIVE_CHROOT}"/etc/apt/sources.list + fi + done + # Update indices Chroot_exec "apt-get update" @@ -192,6 +211,7 @@ Linuximage () then mv "${LIVE_CHROOT}"/boot/vmlinuz-* "${LIVE_ROOT}"/binary/isolinux/vmlinuz mv "${LIVE_CHROOT}"/boot/initrd.img-* "${LIVE_ROOT}"/binary/isolinux/initrd.gz + rm -f "${LIVE_CHROOT}"/vmlinuz "${LIVE_CHROOT}"/initrd.img else cp "${LIVE_CHROOT}"/boot/vmlinuz-* "${LIVE_ROOT}"/binary/isolinux/vmlinuz cp "${LIVE_CHROOT}"/boot/initrd.img-* "${LIVE_ROOT}"/binary/isolinux/initrd.gz -- cgit v1.2.3