Unverified Commit cce6185d authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Adding upstream version 20161101.


Signed-off-by: default avatarDaniel Baumann <mail@daniel-baumann.ch>
parent e4d9516e
2016-11-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161101.
[ Daniel Baumann ]
* Using references to system-build instead of live-build.
* Using system-boot instead of live-boot.
* Using system-config instead of live-config.
* Dropping references to live-tools.
* Making config check for https in archive list files silent.
[ Chris Lamb ]
* Exposing exposes the SOURCE_DATE_EPOCH variable when running scripts inside the chroot, otherwise the chroot operation resets the environment (Closes: #833118).
[ Daniel Baumann ]
* Removing automatic mode setting.
* Adding workaround for user-setup.
* Setting default debian mirrors to deb.debian.org.
[ Sophie Brun ]
* Handling packages.chroot with an explicitly trusted file:// repository.
2016-07-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20160701.
......
......@@ -26,6 +26,12 @@ Chroot ()
fi
done
# Only pass SOURCE_DATE_EPOCH if its already set
if [ "${SOURCE_DATE_EPOCH:-}" != "" ]
then
ENV="${ENV} SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
fi
${_LINUX32} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" ${ENV} ${COMMANDS}
return "${?}"
......
......@@ -92,28 +92,8 @@ Set_defaults ()
# Setting system type
LB_SYSTEM="${LB_SYSTEM:-live}"
# Setting mode (currently: debian, progress-linux)
if [ -x /usr/bin/lsb_release ]
then
_DISTRIBUTOR="$(lsb_release -is | tr "[A-Z]" "[a-z]")"
case "${_DISTRIBUTOR}" in
debian|progress-linux)
LB_MODE="${LB_MODE:-${_DISTRIBUTOR}}"
;;
*)
LB_MODE="${LB_MODE:-debian}"
;;
esac
else
if [ -e /etc/progress-linux_version ]
then
LB_MODE="${LB_MODE:-progress-linux}"
else
LB_MODE="${LB_MODE:-debian}"
fi
fi
# Setting mode
LB_MODE="${LB_MODE:-debian}"
# Setting distribution name
case "${LB_MODE}" in
......@@ -221,7 +201,7 @@ Set_defaults ()
# Setting initramfs hook
case "${LB_SYSTEM}" in
live)
LB_INITRAMFS="${LB_INITRAMFS:-live-boot}"
LB_INITRAMFS="${LB_INITRAMFS:-system-boot}"
;;
normal)
......@@ -325,12 +305,12 @@ Set_defaults ()
# Setting mirror to fetch packages from
case "${LB_MODE}" in
debian)
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://ftp.debian.org/debian/}"
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://deb.debian.org/debian/}"
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-${LB_MIRROR_BOOTSTRAP}}"
;;
progress-linux)
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://ftp.debian.org/debian/}"
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://deb.debian.org/debian/}"
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://cdn.archive.progress-linux.org/packages/}"
;;
esac
......@@ -354,12 +334,12 @@ Set_defaults ()
# Setting mirror which ends up in the image
case "${LB_MODE}" in
debian)
LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://httpredir.debian.org/debian/}"
LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://deb.debian.org/debian/}"
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-${LB_MIRROR_BINARY}}"
;;
progress-linux)
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://ftp.debian.org/debian/}"
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://deb.debian.org/debian/}"
LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-${LB_MIRROR_CHROOT}}"
;;
esac
......@@ -590,7 +570,7 @@ Set_defaults ()
# Setting boot parameters
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-boot=live components quiet splash}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
;;
......
......@@ -141,7 +141,7 @@ else
fi
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
INITFS="live"
;;
......@@ -154,7 +154,7 @@ esac
case "${LIVE_IMAGE_TYPE}" in
iso*|tar)
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
DESTDIR_LIVE="binary/live"
;;
......
......@@ -117,7 +117,7 @@ else
fi
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
INITFS="live"
;;
......@@ -130,7 +130,7 @@ esac
case "${LIVE_IMAGE_TYPE}" in
iso*|tar)
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
DESTDIR_LIVE="binary/live"
;;
......
......@@ -44,7 +44,7 @@ Check_lockfile .lock
Create_lockfile .lock
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
DESTDIR="binary/live"
;;
......@@ -73,10 +73,10 @@ cp chroot/boot/"${LINUX}"-* "${DESTDIR}"
cp chroot/boot/initrd.img-* "${DESTDIR}"
case "${LB_INITRAMFS}" in
live-boot)
if [ -e chroot/usr/share/doc/live-boot/parameters.txt ]
system-boot)
if ls chroot/usr/share/doc/*system-boot/parameters.txt > /dev/null 2>&1
then
cp chroot/usr/share/doc/live-boot/parameters.txt "${DESTDIR}"/parameters
cp chroot/usr/share/doc/*system-boot/parameters.txt "${DESTDIR}"/parameters
fi
;;
esac
......
......@@ -102,7 +102,7 @@ else
fi
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
INITFS="live"
;;
......
......@@ -44,7 +44,7 @@ Check_lockfile .lock
Create_lockfile .lock
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
INITFS="live"
SUFFIX="packages"
;;
......
......@@ -80,7 +80,7 @@ Install_package
# Setting destination directory
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
DESTDIR="binary/live"
;;
......
......@@ -49,7 +49,7 @@ case "${LB_ARCHITECTURES}" in
esac
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
INITFS="live"
;;
......
......@@ -263,10 +263,9 @@ _SECOND="$(date +%S)"
_LINUX_VERSIONS="$(for _LINUX in chroot/boot/vmlinuz-* ; do chroot chroot apt-cache policy $(basename ${_LINUX} | sed -e 's|vmlinuz-|linux-image-|') | awk '/Installed: / { print $2 }' ; done | sort -Vru | tr "\n" " ")"
_LIVE_BUILD_VERSION="$(lb --version)"
_LIVE_BOOT_VERSION="$(chroot chroot apt-cache policy live-boot | awk '/Installed: / { print $2 }')"
_LIVE_CONFIG_VERSION="$(chroot chroot apt-cache policy live-config | awk '/Installed: / { print $2 }')"
_LIVE_TOOLS_VERSION="$(chroot chroot apt-cache policy live-tools | awk '/Installed: / { print $2 }')"
_SYSTEM_BUILD_VERSION="$(lb --version)"
_SYSTEM_BOOT_VERSION="$(chroot chroot apt-cache policy open-infrastructure-system-boot | awk '/Installed: / { print $2 }')"
_SYSTEM_CONFIG_VERSION="$(chroot chroot apt-cache policy open-infrastructure-system-config | awk '/Installed: / { print $2 }')"
case "${LB_MODE}" in
progress-linux)
......@@ -299,10 +298,9 @@ do
-e "s|@MINUTE@|${_MINUTE}|g" \
-e "s|@SECOND@|${_SECOND}|g" \
-e "s|@LINUX_VERSIONS@|${_LINUX_VERSIONS}|g" \
-e "s|@LIVE_BUILD_VERSION@|${_LIVE_BUILD_VERSION}|g" \
-e "s|@LIVE_BOOT_VERSION@|${_LIVE_BOOT_VERSION}|g" \
-e "s|@LIVE_CONFIG_VERSION@|${_LIVE_CONFIG_VERSION}|g" \
-e "s|@LIVE_TOOLS_VERSION@|${_LIVE_TOOLS_VERSION}|g" \
-e "s|@SYSTEM_BUILD_VERSION@|${_SYSTEM_BUILD_VERSION}|g" \
-e "s|@SYSTEM_BOOT_VERSION@|${_SYSTEM_BOOT_VERSION}|g" \
-e "s|@SYSTEM_CONFIG_VERSION@|${_SYSTEM_CONFIG_VERSION}|g" \
"${_FILE}"
fi
done
......
......@@ -77,7 +77,7 @@ then
fi
# Include apt-transport-https
if grep '^deb https' config/archives/*.list.*
if grep -qs '^deb https' config/archives/*.list.*
then
DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --include=apt-transport-https"
fi
......
......@@ -30,8 +30,6 @@ Set_defaults
# Requiring stage file
Require_stagefile .build/config .build/bootstrap
_LB_LOCAL_KEY_EMAIL="live-build-local-key@invalid"
case "${LB_DERIVATIVE}" in
true)
_PARENT_FILE="sources.list.d/debian.list"
......@@ -280,87 +278,8 @@ EOF
-o APT::FTPArchive::Release::Origin=config/packages.chroot \
release . > Release" | Chroot chroot sh
if [ "${LB_APT_SECURE}" = "true" ]
then
if [ -e chroot/root/.gnupg ]
then
mv chroot/root/.gnupg chroot/root/.gnupg.orig
fi
# Ensure ~/.gnupg exists
mkdir -p chroot/root/.gnupg
# Temporarily replace /dev/random with /dev/urandom so as not
# to block automated image builds; we don't care about the
# security of this key anyway.
if [ -e chroot/dev/random ]
then
mv chroot/dev/random chroot/dev/random.orig
cp -a chroot/dev/urandom chroot/dev/random
fi
if Find_files cache/local-package-keyring.*
then
cp cache/local-package-keyring.* chroot/root
else
# Generate temporary key
echo "Key-Type: RSA
Key-Length: 1024
Subkey-Type: ELG-E
Subkey-Length: 1024
Name-Real: live-build local packages key
Name-Email: ${_LB_LOCAL_KEY_EMAIL}
Expire-Date: 0
%secring /root/local-package-keyring.sec
%pubring /root/local-package-keyring.pub
%commit" | Chroot chroot "gpg --batch --gen-key" || _LB_RET=${?}
case "${_LB_RET}" in
""|2)
# Gnupg sometimes seems to return with a status of 2 when there was not
# enough entropy (and key creation blocks temporarily) even if the
# operation was ultimately successful.
;;
*)
Echo_error "GPG exited with error status %s" "${_LB_RET}"
exit ${_LB_RET}
;;
esac
# Save keyrings to avoid regeneration
cp chroot/root/local-package-keyring.* cache/
fi
# Sign release
Chroot chroot "gpg --no-default-keyring --secret-keyring /root/local-package-keyring.sec \
--keyring /root/local-package-keyring.pub -abs -o \
/root/packages/Release.gpg /root/packages/Release"
# Import key
Chroot chroot "gpg --no-default-keyring --secret-keyring /root/local-package-keyring.sec \
--keyring /root/local-package-keyring.pub --armor \
--export ${_LB_LOCAL_KEY_EMAIL}" | Chroot chroot "apt-key add -"
# Remove temporary keyrings
rm chroot/root/local-package-keyring.pub
rm chroot/root/local-package-keyring.sec
# Revert /dev/random
if [ -e chroot/dev/random.orig ]
then
mv chroot/dev/random.orig chroot/dev/random
fi
rm -rf chroot/root/.gnupg
if [ -e chroot/root/.gnupg.orig ]
then
mv chroot/root/.gnupg.orig chroot/root/.gnupg
fi
fi
# Add to sources.list.d
echo "deb file:/root/packages ./" > chroot/etc/apt/sources.list.d/packages.list
echo "deb [ trusted=yes ] file:/root/packages ./" > chroot/etc/apt/sources.list.d/packages.list
# Move top-level sources away, otherwise apt always preferes it (#644148)
if [ -e chroot/etc/apt/sources.list ]
......@@ -746,12 +665,6 @@ EOF
rm -f chroot/etc/apt/sources.list.d/packages.list
rm -rf chroot/root/packages
# Remove local packages key if it exists
if Chroot chroot apt-key list | grep -q ${_LB_LOCAL_KEY_EMAIL}
then
Chroot chroot apt-key del ${_LB_LOCAL_KEY_EMAIL}
fi
# Removing stage file
rm -f .build/chroot_archives
;;
......
......@@ -46,7 +46,7 @@ Check_package host /usr/bin/wget wget
# Diverting update-initramfs
#case "${LB_INITRAMFS}" in
# live-boot)
# system-boot)
# mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
# ;;
#esac
......
......@@ -65,7 +65,7 @@ esac
# Update initramfs (always, because of udev rules in initrd)
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
#UPDATE_INITRAMFS_OPTIONS="LIVE_GENERATE_UUID=1"
;;
esac
......@@ -100,7 +100,7 @@ case "${LB_INITRAMFS_COMPRESSION}" in
esac
case "${LB_INITRAMFS}" in
live-boot)
system-boot)
ID="1000"
;;
......@@ -114,7 +114,7 @@ rm -f chroot/etc/hosts
if [ "${LB_DEBIAN_INSTALLER}" = "live" ]
then
# This is a temporary hack to get rid of fstab;
# needs cleanup in live-boot first to proper fix.
# needs cleanup in system-boot first to proper fix.
rm -f chroot/etc/fstab
touch chroot/etc/fstab
fi
......
......@@ -43,7 +43,7 @@ Create_lockfile .lock
# Diverting update-initramfs
#case "${LB_INITRAMFS}" in
# live-boot)
# system-boot)
# mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
# ;;
#esac
......
......@@ -36,16 +36,16 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
# Queue installation of live-boot
# Queue installation of system-boot
if [ -n "${LB_INITRAMFS}" ] && [ "${LB_INITRAMFS}" != "none" ]
then
_PACKAGES="${LB_INITRAMFS}"
fi
# Queue installation of live-config
# Queue installation of system-config
if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "none" ]
then
_PACKAGES="${_PACKAGES} live-config live-config-${LB_INITSYSTEM}"
_PACKAGES="${_PACKAGES} system-config"
fi
# Do initsystem specific hacks
......
......@@ -59,7 +59,7 @@ USAGE="${PROGRAM} [--apt-ftp-proxy URL]\n\
\t [--grub-splash FILE]\n\
\t [--gzip-options OPTION|\"OPTIONS\"]\n\
\t [--ignore-system-defaults]\n\
\t [--initramfs auto|none|live-boot]\n\
\t [--initramfs auto|none|system-boot]\n\
\t [--initramfs-compression bzip2|gzip|lzma]\n\
\t [--initsystem sysvinit|systemd|none]\n\
\t [--image-name [NAME]\n\
......@@ -1336,24 +1336,9 @@ then
mkdir -p config/package-lists
case "${LB_INITRAMFS}" in
live-boot)
echo "live-boot" > config/package-lists/live.list.chroot
echo "live-config" >> config/package-lists/live.list.chroot
case "${LB_INITSYSTEM}" in
none)
# do nothing
;;
systemd)
echo "live-config-systemd" >> config/package-lists/live.list.chroot
;;
sysvinit)
echo "live-config-${LB_INITSYSTEM}" >> config/package-lists/live.list.chroot
echo "sysvinit-core" >> config/package-lists/live.list.chroot
;;
esac
system-boot)
echo "system-boot" > config/package-lists/live.list.chroot
echo "system-config" >> config/package-lists/live.list.chroot
;;
*)
......
......@@ -269,26 +269,21 @@
x="190.68135"
sodipodi:role="line"
style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
id="tspan3076">live-build: @LIVE_BUILD_VERSION@</tspan><tspan
id="tspan3076">system-build: @SYSTEM_BUILD_VERSION@</tspan><tspan
y="759.20667"
x="190.68135"
sodipodi:role="line"
style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
id="tspan3068">live-boot: @LIVE_BOOT_VERSION@</tspan><tspan
id="tspan3068">system-boot: @SYSTEM_BOOT_VERSION@</tspan><tspan
y="779.2066"
x="190.68135"
sodipodi:role="line"
style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
id="tspan3070">live-config: @LIVE_CONFIG_VERSION@</tspan><tspan
id="tspan3070">system-config: @SYSTEM_CONFIG_VERSION@</tspan><tspan
y="799.20654"
x="190.68135"
sodipodi:role="line"
style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
id="tspan3012">live-tools: @LIVE_TOOLS_VERSION@</tspan><tspan
y="819.20654"
x="190.68135"
sodipodi:role="line"
style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
id="tspan3066" /></text>
<text
xml:space="preserve"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment