...
 
Commits (11)
......@@ -116,6 +116,8 @@ export KEYRING
export KERNELVERSION
export LOCALUDEBDIR
export SOURCE_DATE_EPOCH
export USE_UDEBS_BACKPORTS_FROM
export BACKPORTED_SOURCES
ifneq ($(shell id -u),0)
ROOTCMD ?= fakeroot
......@@ -328,7 +330,7 @@ ifdef TRANSSTATUS
# Do this first to make possible warnings more visible.
@echo; \
if [ -f "$(TRANSSTATUS)" ]; then \
if [ "$(USE_PROPOSED_UPDATES)" != 1 ]; then \
if [ "$(USE_PROPOSED_UPDATES)" != 1 -a -z "$(USE_UDEBS_BACKPORTS_FROM)" ]; then \
olddate=$$(grep "^# Generated on:" $(TRANSSTATUS) | sed "s/.*: //"); \
if [ "$$olddate" ]; then \
if [ $$(( $$(date -u "+%s") - \
......@@ -486,6 +488,9 @@ ifndef OMIT_RELEASE_INFO
mkdir -p $(TREE)/etc/
echo $(DEBIAN_RELEASE) >$(TREE)/etc/default-release
echo $(USE_UDEBS_FROM) >$(TREE)/etc/udebs-source
ifdef USE_UDEBS_BACKPORTS_FROM
echo $(USE_UDEBS_BACKPORTS_FROM) >$(TREE)/etc/udebs-backports-source
endif
endif
# Create a dev tree.
......@@ -667,7 +672,7 @@ sources.list.udeb:
echo "deb $(MIRROR) unreleased $(UDEB_COMPONENTS)"; \
fi \
else \
gen-sources.list.udeb "$(SYSTEM_SOURCES_LIST)" $(USE_UDEBS_FROM) $(UDEB_COMPONENTS) $(USE_PROPOSED_UPDATES); \
gen-sources.list.udeb "$(SYSTEM_SOURCES_LIST)" $(USE_UDEBS_FROM) $(UDEB_COMPONENTS) $(USE_PROPOSED_UPDATES) $(USE_UDEBS_BACKPORTS_FROM); \
if [ "$(USE_UNRELEASED)" = 1 ]; then \
gen-sources.list.udeb "$(SYSTEM_SOURCES_LIST)" unreleased $(UDEB_COMPONENTS); \
fi \
......@@ -683,6 +688,10 @@ sources.list.udeb:
echo "ERROR: no valid source for $(USE_UDEBS_FROM)-proposed-updates"; \
exit 1; \
fi
@if [ -n "$(USE_UDEBS_BACKPORTS_FROM)" ] && ! grep -q "$(USE_UDEBS_BACKPORTS_FROM)" $@; then \
echo "ERROR: no valid source for backports ($(USE_UDEBS_BACKPORTS_FROM))"; \
exit 1; \
fi
# Font generation.
#
......
......@@ -363,6 +363,17 @@ USE_PROPOSED_UPDATES
make USE_PROPOSED_UPDATES=1 all_build
If no valid source for proposed updates is found, the build will fail.
USE_UDEBS_BACKPORTS_FROM
Set to <suite>-backports if it shall be used as an overlay suite when
building an image. The resulting image should be able to install some
components from backports (e.g. a newer kernel). Defaults to an empty string
meaning no backports support.
Included in /etc/udebs-backports-source in most initrds.
BACKPORTED_SOURCES
When USE_UDEBS_BACKPORTS_FROM is set, set up APT pinning during the build to
prefer packages built from those source packages.
OMIT_RELEASE_INFO
Can be used to suppress the inclusion of the files /etc/default-release and
/etc/udebs-source in some targets (like boot floppies).
......
......@@ -11,7 +11,7 @@
# Default kernel ABI version to use. Append a kernel flavour to
# produce KERNELVERSION.
LINUX_KERNEL_ABI ?= 4.17.0-1
LINUX_KERNEL_ABI ?= 4.17.0-0.bpo.1
# Always "di" these days
KERNEL_FLAVOUR ?= di
......@@ -44,22 +44,32 @@ MKLIBS = mklibs-copy
DPKG_UNPACK_OPTIONS = --force-overwrite
# The codename of the Debian release that should be installed by default.
DEBIAN_RELEASE = buster
DEBIAN_RELEASE = stretch
# The version (number and codename) of the Debian release targeted by the
# installation images. (Only the codename is used while the version number
# has not yet been determined.)
DEBIAN_VERSION = 10 (buster)
DEBIAN_VERSION ?= buster
DEBIAN_VERSION = 9 (stretch+backports)
DEBIAN_VERSION ?= stretch
# Define here from what release (codename!) components (udebs) should be taken
# to build debian-installer. By default this is set to 'unstable' for building
# daily images. For official builds this is overruled in debian/rules.
USE_UDEBS_FROM ?= unstable
# Define which backports suite to use, if any:
USE_UDEBS_BACKPORTS_FROM ?=
# Define source packages for which binaries from backports are to be
# preferred during the build, thanks to some APT pinning:
BACKPORTED_SOURCES ?= linux
# Archive components from which to fetch debian-installer modules.
UDEB_COMPONENTS ?= main/debian-installer
# Whether to enable <suite>-proposed-updates:
USE_PROPOSED_UPDATES ?= 0
# The date the installer is built.
BUILD_DATE ?= $(shell date -u '+%Y%m%d-%H:%M')
# The date the installer source was last changed; we prefer that the
......
......@@ -8,7 +8,8 @@ NL="
SOURCES_LIST=$1
SUITE=$2
UDEB_COMPONENTS=$3
USE_PROPOSED_UPDATES=$4 # optional
USE_PROPOSED_UPDATES=$4
USE_UDEBS_BACKPORTS_FROM=$5 # optional
# Set to 1 or 2 to see increasing debug info about mirror tests
# Use 0 for quiet (normal) operation
......@@ -89,6 +90,12 @@ for mirror in $MIRRORS; do
echo "$mirror $SUITE-proposed-updates $UDEB_COMPONENTS"
echo "INFO: using '$tmirror' for $SUITE-proposed-updates" >&2
fi
if [ -n "$USE_UDEBS_BACKPORTS_FROM" ] &&
test_url $tmirror/dists/$USE_UDEBS_BACKPORTS_FROM/Release; then
echo "$mirror $USE_UDEBS_BACKPORTS_FROM $UDEB_COMPONENTS"
echo "INFO: using '$tmirror' for backports ($USE_UDEBS_BACKPORTS_FROM)" >&2
fi
else
echo "$mirror $SUITE $UDEB_COMPONENTS"
if [ "$USE_PROPOSED_UPDATES" = 1 ]; then
......
......@@ -178,6 +178,24 @@ if [ "$KERNELVERSION" ]; then
trap cleanup EXIT HUP INT QUIT TERM
fi
# Prepare preferences file if needed:
if [ -n "$BACKPORTED_SOURCES" ]; then
rm -f "preferences.$TYPE.local"
for source in $BACKPORTED_SOURCES; do
binaries=$(grep-dctrl -s Package -F Source $source $APTDIR/state/lists/*${USE_UDEBS_BACKPORTS_FROM}*Packages | awk '{print $2}' | xargs)
printf "Checking for source $source: "
if [ -n "$binaries" ]; then
echo "$binaries"
echo "Package: $binaries" >> "preferences.$TYPE.local"
echo "Pin: release n=${USE_UDEBS_BACKPORTS_FROM}" >> "preferences.$TYPE.local"
echo "Pin-Priority: 900" >> "preferences.$TYPE.local"
echo "" >> "preferences.$TYPE.local"
else
echo "(nothing)"
fi
done
fi
# Get udebs.
if [ "$DEBUG" = y ]; then
mkdir -p $DEBUGUDEBDIR
......
......@@ -17,6 +17,26 @@ debian-installer (20180622) UNRELEASED; urgency=medium
* Add missing build dependency on debian-ports-archive-keyring for alpha,
hppa, ia64, m68k, powerpc, powerpcspe, ppc64, riscv64 and x32.
[ Cyril Brulebois (DEBAMAX) ]
* Prepare building d-i with bits from backports. Based on:
https://lists.debian.org/debian-boot/2014/01/msg00407.html
* debian/rules: Improve readability.
* config/common: Add USE_PROPOSED_UPDATES ?= 0. Having an explicit
default setting makes it possible to pass extra parameters to the
gen-sources.list.udeb script.
* Add support for a new USE_UDEBS_BACKPORTS_FROM variable, which can be used
to set an extra entry in sources.list
* When USE_UDEBS_BACKPORTS_FROM is set, generate /etc/udebs-backports-source
so that the running d-i knows that backports support is requested. This
* Add support for a new BACKPORTED_SOURCES variable, which can be used
to specify which binaries should be picked from the backports suite
(instead of the base suite). Source packages are specified, for
brevity (hello, linux!).
* Build against stretch, using stretch-pu and stretch-backports udebs.
* Update configuration for codename and version.
* Set linux ABI to 4.17.0-0.bpo.1 (stretch-backports).
* Set BACKPORTED_SOURCES to include linux only for now.
-- Andreas B. Mundt <andi@debian.org> Fri, 22 Jun 2018 17:25:42 +0200
debian-installer (20180610) unstable; urgency=medium
......
......@@ -8,21 +8,22 @@ SUITE=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Distribution: | cut -d ' ' -f
# Daily builds vs. uploads to unstable:
ifeq (${SUITE},UNRELEASED)
USE_UDEBS_FROM=unstable
TRANSSTATUS=
BOOTMENU_BEEP=n
USE_UDEBS_FROM=unstable
TRANSSTATUS=
BOOTMENU_BEEP=n
else
USE_UDEBS_FROM=buster
USE_PROPOSED_UPDATES=0
TRANSSTATUS=translation-status
BOOTMENU_BEEP=y
USE_UDEBS_FROM=stretch
USE_UDEBS_BACKPORTS_FROM=stretch-backports
USE_PROPOSED_UPDATES=1
TRANSSTATUS=translation-status
BOOTMENU_BEEP=y
endif
# Adjust for non-released ports if needed:
RELEASE_ARCHES=amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x
ifeq (,$(filter $(ARCH), $(RELEASE_ARCHES)))
USE_UNRELEASED=1
USE_UDEBS_FROM=unstable
USE_UNRELEASED=1
USE_UDEBS_FROM=unstable
endif
ARCHIVEDIR=debian/tmp/installer-$(ARCH)
......@@ -44,6 +45,7 @@ clean:
build-images:
$(MAKE) -C build all_build stats release \
USE_UDEBS_FROM=$(USE_UDEBS_FROM) BUILD_DATE=$(DATE) \
USE_UDEBS_BACKPORTS_FROM=$(USE_UDEBS_BACKPORTS_FROM) \
USE_PROPOSED_UPDATES=$(USE_PROPOSED_UPDATES) \
USE_UNRELEASED=$(USE_UNRELEASED) \
TRANSSTATUS=$(TRANSSTATUS) BOOTMENU_BEEP=$(BOOTMENU_BEEP)
......