changed debian/source/format to native

This commit is contained in:
openKylinBot 2022-05-25 18:22:01 +08:00
parent 595ae759fe
commit c4100bd770
44 changed files with 1 additions and 1684 deletions

View File

@ -1,57 +0,0 @@
From 52908422880f8d5cfa18c577d4138d5449af37f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>
Date: Fri, 27 Jul 2018 09:46:55 +0200
Subject: [PATCH] Handle includes.chroot files installed over symlinked
directories
With the merged /usr feature now enabled in debootstrap, we have
/bin and /lib which are symlinks to /usr/bin and /usr/lib. If
the live-build configuration provides files in
config/includes.chroot/lib/ or config/includes.chroot/bin/ then
lb chroot_includes will replace the /lib or /bin symlink with real
directories having only the content provided in chroot.includes and
problems will follow... the build will usually fail later with a
cryptic error message (for example a hook failing to execute
/usr/bin/env).
Work around the issue by creating a tarball of the files to install
and by unpacking that tarball from within the chroot with appropriate
options.
---
xnox: adapted for Ubuntu's livebuild
scripts/build/chroot_includes | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/scripts/build/lb_binary_includes
+++ b/scripts/build/lb_binary_includes
@@ -42,8 +42,12 @@
then
# Copying includes
cd config/includes.binary
- find . | cpio -dmpu --no-preserve-owner "${OLDPWD}"/binary
+ Echo_message "Creating a tarball with files from includes.binary..."
+ tar cf "${OLDPWD}"/binary/includes.binary.tar .
cd "${OLDPWD}"
+ Echo_message "Extracting the tarball in the chroot..."
+ tar -C binary -xvf binary/includes.binary.tar --no-same-owner --keep-directory-symlink --overwrite
+ rm binary/includes.binary.tar
# Removing symlinks
case "${LB_BINARY_IMAGES}" in
--- a/scripts/build/lb_chroot_includes
+++ b/scripts/build/lb_chroot_includes
@@ -42,8 +42,12 @@
then
# Copying includes
cd config/includes.chroot
- find . | cpio -dmpu --no-preserve-owner "${OLDPWD}"/chroot
+ Echo_message "Creating a tarball with files from includes.chroot..."
+ tar cf "${OLDPWD}"/chroot/includes.chroot.tar .
cd "${OLDPWD}"
+ Echo_message "Extracting the tarball in the chroot..."
+ Chroot chroot "tar -xvf includes.chroot.tar --no-same-owner --keep-directory-symlink --overwrite"
+ rm chroot/includes.chroot.tar
# Creating stage file
Create_stagefile .build/chroot_includes

View File

@ -1,88 +0,0 @@
Adds a new chroot_early hook type allowing actions prior to package
installation. This is required by Ubuntu Touch and possibly other
system-image type images where we want to force a pre-defined user/group
sets.
--- live-build-3.0~a57.orig/scripts/build/lb_chroot
+++ live-build-3.0~a57/scripts/build/lb_chroot
@@ -54,6 +54,7 @@ lb chroot_archives chroot install ${*}
# Customizing chroot
lb chroot_linux-image ${*}
lb chroot_preseed ${*}
+lb chroot_early_hooks ${*}
for _PASS in install live
do
--- /dev/null
+++ live-build-3.0~a57/scripts/build/lb_chroot_early_hooks
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+## live-build(7) - System Build Scripts
+## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
+##
+## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+set -e
+
+# Including common functions
+( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
+
+# Setting static variables
+DESCRIPTION="$(Echo 'execute hooks in chroot (early stage)')"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
+# Reading configuration files
+Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
+Set_defaults
+
+Echo_message "Begin executing early chroot hooks..."
+
+# Requiring stage file
+Require_stagefile .build/config .build/bootstrap
+
+# Checking stage file
+Check_stagefile .build/chroot_early_hooks
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+## Processing local hooks
+if Find_files config/hooks/*.chroot_early
+then
+ # Restoring cache
+ Restore_cache cache/packages.chroot
+
+ for _HOOK in config/hooks/*.chroot_early
+ do
+ # Copying hook
+ cp "${_HOOK}" chroot/root
+
+ # Making hook executable
+ if [ ! -x chroot/root/"$(basename ${_HOOK})" ]
+ then
+ chmod +x chroot/root/"$(basename ${_HOOK})"
+ fi
+
+ # Executing hook
+ Chroot chroot "/root/$(basename ${_HOOK})" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
+
+ # Removing hook
+ rm -f chroot/root/"$(basename ${_HOOK})"
+ done
+
+ # Saving cache
+ Save_cache cache/packages.chroot
+
+ # Creating stage file
+ Create_stagefile .build/chroot_early_hooks
+fi

View File

@ -1,24 +0,0 @@
Description: Allow symlinks for config/includes.chroot/etc/resolv.conf
Backport from the 4.0 branch to allow symlinks for
config/includes.chroot/etc/resolv.conf so that a image can have a
symlink to /run/resolvconf/resolv.conf
Author: Michael Vogt <michael.vogt@ubuntu.com>
---
Origin: vendor
Forwarded: not-needed
Last-Update: 2014-10-29
Index: live-build-3.0~a57/scripts/build/lb_chroot_resolv
===================================================================
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_resolv
+++ live-build-3.0~a57/scripts/build/lb_chroot_resolv
@@ -76,7 +76,7 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- if [ -e config/includes.chroot/etc/resolv.conf ]
+ if [ -e config/includes.chroot/etc/resolv.conf ] || [ -L config/includes.chroot/etc/resolv.conf ];
then
# Copying local resolv.conf
cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf

View File

@ -1,57 +0,0 @@
commit 20f042f923d25772cb87515a184308e2d2dec084
Author: Daniel Baumann <mail@daniel-baumann.ch>
Date: Mon Mar 11 09:26:37 2013 +0100
Using dpkg-divert in chroot_upstart script to handle upgrades of upstart during the build (Closes: #702537).
diff --git a/scripts/build/chroot_upstart b/scripts/build/chroot_upstart
index 47d68c2..88dc3b2 100755
--- a/scripts/build/lb_chroot_upstart
+++ b/scripts/build/lb_chroot_upstart
@@ -27,6 +27,12 @@ Set_defaults
# Requiring stage file
Require_stagefile .build/config .build/bootstrap
+# Check if system uses upstart
+if [ ! -e chroot/sbin/initctl ]
+then
+ exit 0
+fi
+
case "${1}" in
install)
Echo_message "Configuring file /sbin/initctl"
@@ -40,13 +46,9 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- if [ -f chroot/sbin/initctl ]
- then
- # Save initctl file
- mv chroot/sbin/initctl chroot/sbin/initctl.orig
- fi
+ # Create custom initctl file
+ Chroot chroot dpkg-divert --rename --quiet --add /sbin/initctl
- # Create initctl file
cat > chroot/sbin/initctl << EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
@@ -68,14 +70,9 @@ EOF
# Creating lock file
Create_lockfile .lock
- if [ -f chroot/sbin/initctl.orig ]
- then
- # Restore initctl file
- mv chroot/sbin/initctl.orig chroot/sbin/initctl
- else
- # Remove initctl file
- rm -f chroot/sbin/initctl
- fi
+ # Remove custom initctl file
+ rm -f chroot/sbin/initctl
+ Chroot chroot dpkg-divert --rename --quiet --remove /sbin/initctl
# Removing stage file
rm -f .build/chroot_upstart

View File

@ -1,122 +0,0 @@
commit 5a00aa44827cd477e13470b4ce417b7b6fff62f9
Author: Daniel Baumann <mail@daniel-baumann.ch>
Date: Mon Mar 11 09:49:07 2013 +0100
Using dpkg-divert for other diversions too to handle upgrades of the diverted stuff during build.
diff --git a/scripts/build/chroot_dpkg b/scripts/build/chroot_dpkg
index b199cdf..07ef966 100755
--- a/scripts/build/lb_chroot_dpkg
+++ b/scripts/build/lb_chroot_dpkg
@@ -40,10 +40,8 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- # Save start-stop-daemon program
- mv chroot/sbin/start-stop-daemon chroot/sbin/start-stop-daemon.orig
-
- # Create start-stop-daemon program
+ # Create custom start-stop-daemon program
+ Chroot chroot dpkg-divert --rename --quiet --add /sbin/start-stop-daemon
cat > chroot/sbin/start-stop-daemon << EOF
#!/bin/sh
@@ -103,11 +101,9 @@ EOF
rmdir --ignore-fail-on-non-empty /var/state/samhain || true
fi
- # Restore start-stop-daemon program
- if [ -e chroot/sbin/start-stop-daemon.orig ]
- then
- mv chroot/sbin/start-stop-daemon.orig chroot/sbin/start-stop-daemon
- fi
+ # Remove custom start-stop-daemon program
+ rm -f chroot/sbin/start-stop-daemon
+ Chroot chroot dpkg-divert --rename --quiet --remove /sbin/start-stop-daemon
# Remove dpkg sync configuration
rm -f chroot/etc/dpkg/dpkg.cfg.d/live-build
diff --git a/scripts/build/chroot_hostname b/scripts/build/chroot_hostname
index edc38a1..c42b1a7 100755
--- a/scripts/build/lb_chroot_hostname
+++ b/scripts/build/lb_chroot_hostname
@@ -29,8 +29,6 @@ Require_stagefile .build/config .build/bootstrap
case "${1}" in
install)
- Echo_message "Configuring file /etc/hostname"
-
# Checking stage file
Check_stagefile .build/chroot_hostname
@@ -40,15 +38,15 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- # Save hostname
- mv chroot/bin/hostname chroot/bin/hostname.orig
-
# Create hostname file
+ Echo_message "Configuring file /etc/hostname"
+
echo "localhost.localdomain" > chroot/etc/hostname
+ # Create custom hostname
Echo_message "Configuring file /bin/hostname"
- # Create hostname program
+ Chroot chroot dpkg-divert --rename --quiet --add /bin/hostname
cat > chroot/bin/hostname << EOF
#!/bin/sh
@@ -79,11 +77,9 @@ EOF
Echo_message "Deconfiguring file /bin/hostname"
- # Restore hostname file
- if [ -e chroot/bin/hostname.orig ]
- then
- mv chroot/bin/hostname.orig chroot/bin/hostname
- fi
+ # Remove custom hostname
+ rm -f chroot/bin/hostname
+ Chroot chroot dpkg-divert --rename --quiet --remove /bin/hostname
# Removing stage file
rm -f .build/chroot_hostname
diff --git a/scripts/build/chroot_sysv-rc b/scripts/build/chroot_sysv-rc
index 247290e..4dea100 100755
--- a/scripts/build/lb_chroot_sysv-rc
+++ b/scripts/build/lb_chroot_sysv-rc
@@ -40,10 +40,10 @@ case "${1}" in
# Creating lock file
Create_lockfile .lock
- if [ -f chroot/usr/sbin/policy-rc.d ]
+ if [ -e chroot/usr/sbin/policy-rc.d ]
then
# Save policy-rc.d file
- mv chroot/usr/sbin/policy-rc.d chroot/usr/sbin/policy-rc.d.orig
+ Chroot chroot dpkg-divert --rename --quiet --add /usr/sbin/policy-rc.d
fi
# Create policy-rc.d file
@@ -68,13 +68,13 @@ EOF
# Creating lock file
Create_lockfile .lock
- if [ -f chroot/usr/sbin/policy-rc.d.orig ]
+ # Remove custom policy-rc.d file
+ rm -f chroot/usr/sbin/policy-rc.d
+
+ if [ -e chroot/usr/sbin/policy-rc.d.distrib ]
then
# Restore policy-rc.d file
- mv chroot/usr/sbin/policy-rc.d.orig chroot/usr/sbin/policy-rc.d
- else
- # Remove policy-rc.d file
- rm -f chroot/usr/sbin/policy-rc.d
+ Chroot chroot dpkg-divert --rename --quiet --remove /usr/sbin/policy-rc.d
fi
# Removing stage file

View File

@ -1,20 +0,0 @@
Description:
* Stop setting LB_INITRAMFS_COMPRESSION default, and instead fallback to
using initramfs-tools default. LB_INITRAMFS_COMPRESSION is now only to
override whatever initramfs-tools' default compression is. This thus
makes live-build default to lz4. LP: #1831736
Author: Dimitri John Ledkov <xnox@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1831736
--- live-build-3.0~a57.orig/functions/defaults.sh
+++ live-build-3.0~a57/functions/defaults.sh
@@ -220,8 +220,6 @@ Set_defaults ()
;;
esac
- LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION:-gzip}"
-
# Setting initsystem
case "${LB_MODE}" in
ubuntu|kubuntu)

View File

@ -1,25 +0,0 @@
Description: Fix copying apt preferences snippets into chroots
Author: Adam Conrad <adconrad@ubuntu.com>
Index: live-build-3.0~a57/scripts/build/lb_chroot_archives
===================================================================
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_archives
+++ live-build-3.0~a57/scripts/build/lb_chroot_archives
@@ -291,7 +291,7 @@ EOF
do
if [ -e "${FILE}" ]
then
- cp config/archives/$(basename ${_FILE} .chroot) chroot/etc/apt/preferences.d
+ cp ${FILE} chroot/etc/apt/preferences.d/$(basename ${FILE} .chroot)
fi
done
fi
@@ -846,7 +846,7 @@ EOF
do
if [ -e "${FILE}" ]
then
- cp config/archives/$(basename ${_FILE} .binary) chroot/etc/apt/preferences.d
+ cp ${FILE} chroot/etc/apt/preferences.d/$(basename ${FILE} .binary)
fi
done
fi

View File

@ -1,22 +0,0 @@
Description: Handle late installation of systemd/resolvconf gracefully, by not
reverting /etc/resolv.conf symlink to a backup of the backup.
Author: Dimitri John Ledkov <xnox@ubuntu.com>
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_resolv
+++ live-build-3.0~a57/scripts/build/lb_chroot_resolv
@@ -81,6 +81,15 @@ case "${1}" in
# Copying local resolv.conf
cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf
rm -f chroot/etc/resolv.conf.orig
+ elif [ -L chroot/etc/resolv.conf ] && [ -e chroot/etc/resolv.conf.orig ]
+ then
+ # After debootstrap (which copied resolv.conf from
+ # the host) and after we backed that up, something
+ # converted /etc/resolv.conf into a
+ # symlink. E.g. a late installation of
+ # systemd-resolved or resolvconf. Do not touch the
+ # new symlink, but do clean up our backup.
+ rm -f chroot/etc/resolv.conf.orig
elif [ -e chroot/etc/resolv.conf.orig ] || [ -L chroot/etc/resolv.conf.orig ]
then
# Restoring resolv file or symlink

View File

@ -1,45 +0,0 @@
Description: Stop using apt-key to setup secure apt, and instead copy the gpg key snippet.
Author: Dimitri John Ledkov <xnox@ubuntu.com>
Index: live-build-3.0~a57/scripts/build/lb_chroot_archives
===================================================================
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_archives
+++ live-build-3.0~a57/scripts/build/lb_chroot_archives
@@ -249,10 +249,10 @@ EOF
# Adding archive signing keys (chroot)
if [ -e "${_BASE}/archives/${REPOSITORY}.key.chroot" ]
then
- cat "${_BASE}/archives/${REPOSITORY}.key.chroot" | Chroot chroot "apt-key add -"
+ cp "${_BASE}/archives/${REPOSITORY}.key.chroot" chroot/etc/apt/trusted.gpg.d/${REPOSITORY}.gpg
elif [ -e "${_BASE}/archives/${REPOSITORY}.key" ]
then
- cat "${_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -"
+ cp "${_BASE}/archives/${REPOSITORY}.key" chroot/etc/apt/trusted.gpg.d/${REPOSITORY}.gpg
fi
fi
done
@@ -516,9 +516,7 @@ EOF
do
if [ -e "${FILE}" ]
then
- cp ${FILE} chroot/root
- Chroot chroot "apt-key add /root/$(basename ${FILE})"
- rm -f chroot/root/$(basename ${FILE})
+ cp ${FILE} chroot/etc/apt/trusted.gpg.d/$(basename ${FILE}).gpg
fi
done
fi
@@ -804,10 +802,10 @@ EOF
# Adding archive signing keys (binary)
if [ -e "${_BASE}/archives/${REPOSITORY}.key.binary" ]
then
- cat "${_BASE}/archives/${REPOSITORY}.key.binary" | Chroot chroot "apt-key add -"
+ cp "${_BASE}/archives/${REPOSITORY}.key.binary" chroot/etc/apt/trusted.gpg.d/${REPOSITORY}.gpg
elif [ -e "${_BASE}/archives/${REPOSITORY}.key" ]
then
- cat "${_BASE}/archives/${REPOSITORY}.key" | Chroot chroot "apt-key add -"
+ cat "${_BASE}/archives/${REPOSITORY}.key" chroot/etc/apt/trusted.gpg.d/${REPOSITORY}.gpg
fi
fi
done

View File

@ -1,20 +0,0 @@
Description: Truncate /etc/machine-id (in addition to /var/lib/dbus/machine-id)
Systemd is using a /etc/machine-id file that needs to be unique to the
local system. Just like we remove /var/lib/dbus/machine-id we truncate
/etc/machine-id. This will make systemd generate a new one on each boot.
Author: Michael Vogt <michael.vogt@ubuntu.com>
---
Origin: vendor
Forwarded: no
Last-Update: 2014-10-29
--- live-build-3.0~a57.orig/share/hooks/004-remove-dbus-machine-id.chroot
+++ live-build-3.0~a57/share/hooks/004-remove-dbus-machine-id.chroot
@@ -7,3 +7,6 @@ set -e
# This removes dbus machine id that cache that makes each system unique.
rm -f /var/lib/dbus/machine-id
+
+# truncate, do not remove otherwise systemd is unhappy
+printf "" > /etc/machine-id

42
debian/patches/series vendored
View File

@ -1,42 +0,0 @@
ubuntu-build-wubildr.patch
ubuntu-casper-normalisation.patch
ubuntu-ext-inodes.patch
ubuntu-wubi-initramfs-framebuffer.patch
ubuntu-i386-generic-pae.patch
ubuntu-resolvconf.patch
ubuntu-powerpc-smp.patch
ubuntu-kernel-img-conf.patch
ubuntu-chroot_headers_tidy.patch
ubuntu-package-lists-without-chroot.patch
ubuntu-fix-hooks.patch
ubuntu-parent-mirror-binary-volatile.patch
ubuntu-debootstrap-variants.patch
ubuntu-fix-binary-hooks.patch
ubuntu-no-xz-squashfs.patch
ubuntu-add-raring-version.patch
ubuntu-no-adjtime.patch
ubuntu-arm64-support.patch
ubuntu-pt_chown.patch
ubuntu-ppc64el-support.patch
ubuntu-add-saucy-trusty-version.patch
add-chroot-early
remove-etc-machineid
chroot-resolv-conf-allow-symlinks
ubuntu-pack-bootlogo.patch
fix-preferences-copying
ubuntu-allow-downgrades
ubuntu-label-disks.patch
ubuntu-chroot-fs-opts.patch
dpkg-divert-initctl
dpkg-divert-others
upstart-not-in-bootstrap
ubuntu-s390x-support.patch
ubuntu-initramfs-compression-symlinks.patch
ubuntu-no-sysvinit-fixups.patch
skip-missing-initrd.patch
ubuntu-no-gnupg-hardcode.patch
no-apt-key.patch
late-resolv.conf-symlink.patch
ubuntu-initramfs-handling.patch
0001-Handle-includes.chroot-files-installed-over-symlinke.patch
drop-default-initramfs-compression-override.patch

View File

@ -1,20 +0,0 @@
Description: Skip installing missing initrd
... instead of failing.
.
Author: Balint Reczey <rbalint@ubuntu.com>
Bug-Ubuntu: https://launchpad.net/bugs/1720217
Forwarded: no
Last-Update: 2017-09-28
--- live-build-3.0~a57.orig/scripts/build/lb_binary_linux-image
+++ live-build-3.0~a57/scripts/build/lb_binary_linux-image
@@ -76,7 +76,7 @@ mkdir -p "${DESTDIR}"
if [ "${LB_LINUX_PACKAGES}" != "none" ]
then
cp chroot/boot/"${LINUX}"-* "${DESTDIR}"
- cp chroot/boot/initrd.img-* "${DESTDIR}"
+ cp chroot/boot/initrd.img-* "${DESTDIR}" 2>&1 || Echo_message "Skipped installing missing initrd."
fi
case "${LB_INITRAMFS}" in

View File

@ -1,14 +0,0 @@
Description: add raring version number as a known release
Origin: backport, http://live.debian.net/gitweb/?p=live-build.git;a=commit;h=d766063e128b6f51df58e90956f462343ca3808d
Bug-Ubuntu: https://launchpad.net/bugs/1174791
Forwarded: not-needed
---
Index: live-build-3.0~a57/functions/releases.sh
===================================================================
--- live-build-3.0~a57.orig/functions/releases.sh 2012-08-09 20:32:51.000000000 +0900
+++ live-build-3.0~a57/functions/releases.sh 2013-05-01 00:42:31.044073697 +0900
@@ -26,3 +26,4 @@
RELEASE_oneiric="11.10" # 2013-04-01
RELEASE_precise="12.04" # LTS: 2017-04-01
RELEASE_quantal="12.10" # 2014-04-01
+RELEASE_raring="13.04" # 2014-01-01

View File

@ -1,15 +0,0 @@
Description: add saucy and trusty version number as a known release
Author: Paolo Sammicheli <xdatap1@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1300400
Forwarded: not-needed
---
Index: live-build-3.0~a57/functions/releases.sh
===================================================================
--- live-build-3.0~a57.orig/functions/releases.sh
+++ live-build-3.0~a57/functions/releases.sh
@@ -27,3 +27,5 @@ RELEASE_oneiric="11.10" # 2013-04-01
RELEASE_precise="12.04" # LTS: 2017-04-01
RELEASE_quantal="12.10" # 2014-04-01
RELEASE_raring="13.04" # 2014-01-01
+RELEASE_saucy="13.10" # 2014-07-01
+RELEASE_trusty="14.04" # LTS: 2019-04-01

View File

@ -1,16 +0,0 @@
Description: Allow base system downgrades.
Author: Adam Conrad <adconrad@ubuntu.com>
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_archives
+++ live-build-3.0~a57/scripts/build/lb_chroot_archives
@@ -564,8 +564,8 @@ EOF
rm -rf chroot/var/cache/apt/*.bin
Apt chroot update
- Apt chroot "upgrade"
- Apt chroot "dist-upgrade"
+ Apt chroot "--force-yes" "upgrade"
+ Apt chroot "--force-yes" "dist-upgrade"
if [ "${LB_CACHE_INDICES}" = "true" ]
then

View File

@ -1,16 +0,0 @@
Description: Add skeleton arm64 support, so that ubuntu-core can build.
Author: Adam Conrad <adconrad@ubuntu.com>
--- live-build-3.0~a57.orig/functions/defaults.sh
+++ live-build-3.0~a57/functions/defaults.sh
@@ -702,6 +702,10 @@ Set_defaults ()
# Setting linux flavour string
case "${LB_ARCHITECTURES}" in
+ arm64)
+ # Assume we'll have a generic kernel for arm64 some day:
+ LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-generic}"
+ ;;
armel)
case "${LB_MODE}" in
ubuntu|kubuntu)

View File

@ -1,45 +0,0 @@
Description: Build the wubildr bootloader for Wubi
Author: Evan Dandrea <ev@ubuntu.com>
Last-Update: 2012-08-20
Index: b/share/hooks/100-build-wubildr.binary
===================================================================
--- /dev/null
+++ b/share/hooks/100-build-wubildr.binary
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+set -e
+
+# Build the wubildr bootloader for Wubi.
+
+cd ..
+CHROOT="$(mktemp -d)"
+# grub-mkimage needs to be able to find the source file of the loopback image
+# in the location that losetup knows it is; however, in a chroot this file wont
+# be present, so we need to make it so by the magic of bind mounts:
+mkdir -p "ubuntu/disks"
+# FIXME: swap these next two lines around when the buildds can handle ext4:
+# mv "binary/boot/filesystem.ext4" "ubuntu/disks/root.disk"
+mv "binary/boot/filesystem.ext3" "ubuntu/disks/root.disk"
+mount -o loop "ubuntu/disks/root.disk" "$CHROOT"
+# Save the directory structure mkdir created, so that it can be removed later.
+REMOVE="$(mkdir -pv "$CHROOT$PWD" | head -n1 | sed "s,.*\`\(.*\)',\1,")"
+mount -o bind "$PWD" "$CHROOT$PWD"
+chroot "$CHROOT" mount -t proc proc /proc
+# Expected to already exist.
+touch wubildr
+# grub-install cries unless you point it at something.
+chroot "$CHROOT" grub-install /dev/null
+umount "$CHROOT/proc"
+umount "$CHROOT$PWD"
+rm -rf "$REMOVE"
+# /host is normally created by partman-auto-loop.
+mkdir "$CHROOT/host"
+umount "$CHROOT"
+mv wubildr binary/boot
+# Link output files somewhere BuildLiveCD will be able to find them.
+PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
+mv ubuntu/disks/root.disk binary/boot/root.disk
+rmdir -p ubuntu/disks
+tar cf - -C binary/boot root.disk wubildr | xz -9 > "$PREFIX.tar.xz"

View File

@ -1,25 +0,0 @@
Description: Fixup live.cfg for casper
Author: Reinhard Tartler <siretart@tauware.de>
Last-Update: 2012-08-20
live.cfg from the themes package include a 'boot=live' parameter, which works only
for live-config. casper OTOH requires 'boot=casper'
Index: b/scripts/build/lb_binary_syslinux
===================================================================
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -254,6 +254,13 @@
sed -i -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
-e "s|@LB_BOOTAPPEND_FAILSAFE@|${LB_BOOTAPPEND_FAILSAFE}|g" \
${_TARGET}/live.cfg
+
+ case "${LB_INITRAMFS}" in
+ casper)
+ sed -i -e "s|boot=live|boot=casper|" \
+ ${_SUFFIX}/live.cfg
+ ;;
+ esac
fi
if [ -e ${_TARGET}/install.cfg ]

View File

@ -1,99 +0,0 @@
Description: Add options to tune the EXT FS produced in lb_binary_rootfs
Adds --ext-block-size, --ext-resize-blocks and --ext-fudge-factor to
enable building filesystem images with 4K blocks that can be
online-resized to a configurable length.
Author: Daniel Watkins <daniel.watkins@canonical.com>
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -129,7 +129,7 @@
FAKE_MTAB="true"
fi
- Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 -L ${LB_HDD_LABEL} filesystem.${LB_CHROOT_FILESYSTEM}"
+ Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b ${LB_EXT_BLOCKSIZE:-1024} -i 8192 -m 0 -L ${LB_HDD_LABEL} ${LB_EXT_RESIZEBLOCKS:+-E resize=${LB_EXT_RESIZEBLOCKS}} filesystem.${LB_CHROOT_FILESYSTEM}"
mkdir -p filesystem.tmp
${LB_ROOT_COMMAND} mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
@@ -199,7 +199,7 @@
false)
dd if=/dev/zero of=binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} bs=1024k count=0 seek=${REAL_DIM}
- mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 -L ${LB_HDD_LABEL} binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
+ mkfs.${LB_CHROOT_FILESYSTEM} -F -b ${LB_EXT_BLOCKSIZE:-1024} -i 8192 -m 0 -L ${LB_HDD_LABEL} ${LB_EXT_RESIZEBLOCKS:+-E resize=${LB_EXT_RESIZEBLOCKS}} binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
mkdir -p filesystem.tmp
${LB_ROOT_COMMAND} mount -o loop binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -57,6 +57,9 @@
\t [--debian-installer-gui true|false]\n\
\t [--debug]\n\
\t [-d|--distribution CODENAME]\n\
+\t [--ext-block-size 1024|2048|4096]\n\
+\t [--ext-resize-blocks N]\n\
+\t [--ext-fudge-factor PERCENTAGE]\n\
\t [--parent-distribution CODENAME]\n\
\t [--parent-debian-installer-distribution CODENAME]\n\
\t [--dump]\n\
@@ -157,7 +160,7 @@
apt-indices:,bootappend-install:,bootappend-live:,bootappend-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:,
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,iso-application:,iso-preparer:,iso-publisher:,
- iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
+ iso-volume:,jffs2-eraseblock:,ext-block-size:,ext-resize-blocks:,ext-fudge-factor:,memtest:,net-root-filesystem:,net-root-mountoptions:,
net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
net-cow-server:,net-tarball:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:,syslinux-theme:,
win32-loader:,source:,source-images:,breakpoints,conffile:,debug,force,
@@ -683,6 +686,21 @@
shift 2
;;
+ --ext-block-size)
+ LB_EXT_BLOCKSIZE="${2}"
+ shift 2
+ ;;
+
+ --ext-resize-blocks)
+ LB_EXT_RESIZEBLOCKS="${2}"
+ shift 2
+ ;;
+
+ --ext-fudge-factor)
+ LB_EXT_FUDGEFACTOR="${2}"
+ shift 2
+ ;;
+
--jffs2-eraseblock)
LB_JFFS2_ERASEBLOCK="${2}"
shift 2
@@ -1392,6 +1410,18 @@
# (Default: ${LB_ISO_VOLUME})
LB_ISO_VOLUME="${LB_ISO_VOLUME}"
+# \$LB_EXT_BLOCKSIZE: set EXT block size
+# (Default: unset)
+LB_EXT_BLOCKSIZE="${LB_EXT_BLOCKSIZE}"
+
+# \$LB_EXT_RESIZEBLOCKS: set EXT resize parameter
+# (Default: unset)
+LB_EXT_RESIZEBLOCKS="${LB_EXT_RESIZEBLOCKS}"
+
+# \$LB_EXT_FUDGEFACTOR: set extra size of EXT images (in %)
+# (Default: unset)
+LB_EXT_FUDGEFACTOR="${LB_EXT_FUDGEFACTOR}"
+
# \$LB_JFFS2_ERASEBLOCK: set jffs2 eraseblock size
# (Default: unset)
LB_JFFS2_ERASEBLOCK=""
--- a/functions/losetup.sh
+++ b/functions/losetup.sh
@@ -68,7 +68,7 @@
case "${FILESYSTEM}" in
ext2|ext3|ext4)
- PERCENT="5"
+ PERCENT="${LB_EXT_FUDGEFACTOR:-5}"
;;
*)
PERCENT="3"

View File

@ -1,37 +0,0 @@
Description: Tidy up linux-headers installation and duplication
ubuntu-chroot_headers_tidy.patch: Mark all the linux-headers-$(ABI)
packages as autoinstalled, and then autoremove cruft (LP: #1029556)
Author: Adam Conrad <adconrad@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1029556
Forwarded: no
Last-Update: 2012-08-20
Index: b/scripts/build/lb_chroot
===================================================================
--- a/scripts/build/lb_chroot
+++ b/scripts/build/lb_chroot
@@ -62,6 +62,12 @@
if [ "${_PASS}" = install ]
then
+ Chroot chroot "dpkg -l linux-headers-3* linux-headers-4*" 2>/dev/null \
+ | awk '/^i/ {print $2}' > chroot.headers
+ for i in $(cat chroot.headers); do
+ Chroot chroot "apt-mark auto $i"
+ done
+ Chroot chroot "apt-get --purge -y autoremove"
Chroot chroot "dpkg-query -W" > chroot.packages.install
fi
done
Index: b/scripts/build/lb_clean
===================================================================
--- a/scripts/build/lb_clean
+++ b/scripts/build/lb_clean
@@ -88,6 +88,7 @@
${LB_ROOT_COMMAND} rm -rf chroot chroot.tmp
rm -f chroot.packages.live chroot.packages.install
+ rm -f chroot.headers
rm -f .build/chroot*
;;

View File

@ -1,29 +0,0 @@
Description: Fix handling of --bootstrap-flavour with debootstrap
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Debian: http://bugs.debian.org/685675
Last-Update: 2012-08-23
Index: b/scripts/build/lb_bootstrap_debootstrap
===================================================================
--- a/scripts/build/lb_bootstrap_debootstrap
+++ b/scripts/build/lb_bootstrap_debootstrap
@@ -84,7 +84,18 @@
false)
if [ -n "${LB_BOOTSTRAP_FLAVOUR}" ]
then
- DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --variant=${LB_BOOTSTRAP_FLAVOUR}"
+ case "${LB_BOOTSTRAP_FLAVOUR}" in
+ minimal)
+ DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --variant=minbase"
+ ;;
+
+ standard)
+ ;;
+
+ *)
+ DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --variant=${LB_BOOTSTRAP_FLAVOUR}"
+ ;;
+ esac
fi
;;
esac

View File

@ -1,33 +0,0 @@
Description: Upstream changes introduced in version 3.0~a24-1ubuntu13
.
* Mimic livecd-rootfs's handling of inodes on ext* filesystems to
reduce the pain of resizing preinstalled images. (LP: #836810)
.
* This patch is a dirty hack, and needs some TLC and generalisation
before it's reasonably upstreamable.
Author: Adam Conrad <adconrad@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/836810
Last-Update: 2012-08-20
Index: b/scripts/build/lb_binary_rootfs
===================================================================
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -129,7 +129,7 @@
FAKE_MTAB="true"
fi
- Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -N ${REAL_INODES} -m 0 filesystem.${LB_CHROOT_FILESYSTEM}"
+ Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 filesystem.${LB_CHROOT_FILESYSTEM}"
mkdir -p filesystem.tmp
${LB_ROOT_COMMAND} mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
@@ -199,7 +199,7 @@
false)
dd if=/dev/zero of=binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} bs=1024k count=0 seek=${REAL_DIM}
- mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -N ${REAL_INODES} -m 0 binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
+ mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
mkdir -p filesystem.tmp
${LB_ROOT_COMMAND} mount -o loop binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp

View File

@ -1,17 +0,0 @@
Description: Fix execution of binary hooks
Author: Colin Watson <cjwatson@ubuntu.com>
Last-Update: 2012-08-24
Index: b/scripts/build/lb_binary_hooks
===================================================================
--- a/scripts/build/lb_binary_hooks
+++ b/scripts/build/lb_binary_hooks
@@ -50,7 +50,7 @@
if [ -e "${FILE}" ]
then
cd binary
- ./"${FILE}" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
+ "${FILE}" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
cd "${OLDPWD}"
fi
done

View File

@ -1,58 +0,0 @@
Description: Fix hook execution
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685534
Last-Update: 2012-08-21
Index: b/scripts/build/lb_chroot_hooks
===================================================================
--- a/scripts/build/lb_chroot_hooks
+++ b/scripts/build/lb_chroot_hooks
@@ -54,12 +54,14 @@
do
for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
do
- if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
- then
- mkdir -p chroot/root/lb_chroot_hooks
- cp "${LOCATION}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks
- continue
- fi
+ for FILE in "${LOCATION}"/???-"${_HOOK}".chroot
+ do
+ if [ -e "${FILE}" ]
+ then
+ mkdir -p chroot/root/lb_chroot_hooks
+ cp "${FILE}" chroot/root/lb_chroot_hooks
+ fi
+ done
done
done
Index: b/scripts/build/lb_binary_hooks
===================================================================
--- a/scripts/build/lb_binary_hooks
+++ b/scripts/build/lb_binary_hooks
@@ -43,17 +43,18 @@
# Running hooks
for _HOOK in ${LB_BINARY_HOOKS}
do
- for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
+ for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
+ do
+ for FILE in "${LOCATION}"/???-"${_HOOK}".binary
do
- if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
+ if [ -e "${FILE}" ]
then
cd binary
- ./"${LOCATION}/hooks/???-${_HOOK}.binary" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
+ ./"${FILE}" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
cd "${OLDPWD}"
-
- continue
fi
done
+ done
done
## Processing local hooks

View File

@ -1,46 +0,0 @@
Description: Use i386 -generic-pae kernel flavour on Ubuntu precise
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/897786
Forwarded: no
Last-Update: 2012-08-20
Index: b/functions/defaults.sh
===================================================================
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -748,7 +748,14 @@
;;
ubuntu|kubuntu)
- LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-generic}"
+ case "${LB_DISTRIBUTION}" in
+ precise)
+ LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-generic-pae}"
+ ;;
+ *)
+ LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-generic}"
+ ;;
+ esac
;;
*)
Index: b/scripts/build/lb_binary_debian-installer
===================================================================
--- a/scripts/build/lb_binary_debian-installer
+++ b/scripts/build/lb_binary_debian-installer
@@ -362,7 +362,14 @@
case "${LB_MODE}" in
ubuntu|kubuntu)
- DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic"
+ case "${LB_DISTRIBUTION}" in
+ precise)
+ DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic-pae"
+ ;;
+ *)
+ DI_PACKAGES="${DI_REQ_PACKAGES} linux-generic"
+ ;;
+ esac
;;
*)

View File

@ -1,28 +0,0 @@
Description: Avoid recompressing initrd.img symlinks
Author: Colin Watson <cjwatson@ubuntu.com>
Forwarded: no
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1539157
Last-Update: 2016-06-28
Index: b/scripts/build/lb_chroot_hacks
===================================================================
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -195,7 +195,7 @@
;;
bzip2)
- for INITRAMFS in $(find chroot/boot -name 'initrd*'); do
+ for INITRAMFS in $(find chroot/boot -name 'initrd*' -not -type l); do
zcat "${INITRAMFS}" | bzip2 -c ${BZIP2_OPTIONS} > "${INITRAMFS}.new"
mv "${INITRAMFS}.new" "${INITRAMFS}"
done
@@ -205,7 +205,7 @@
# We probably ought to use COMPRESS= in a temporary file in
# /etc/initramfs-tools/conf.d/ instead, but it's hard to
# pass options that way.
- for INITRAMFS in $(find chroot/boot -name 'initrd*'); do
+ for INITRAMFS in $(find chroot/boot -name 'initrd*' -not -type l); do
zcat "${INITRAMFS}" | lzma -c ${LZMA_OPTIONS} > "${INITRAMFS}.new"
mv "${INITRAMFS}.new" "${INITRAMFS}"
done

View File

@ -1,79 +0,0 @@
Description: Use initramfs-tools to work with initrds instead of being silly.
Author: Adam Conrad <adconrad@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1778811
Last-Update: 2018-06-26
--- live-build-3.0~a57.orig/scripts/build/lb_binary_disk
+++ live-build-3.0~a57/scripts/build/lb_binary_disk
@@ -97,24 +97,14 @@ case "${LB_INITRAMFS}" in
do
mkdir -p binary/uuid
cd binary/uuid
-
- case "${LB_INITRAMFS_COMPRESSION}" in
- gzip)
- zcat "../../${INITRD}" | cpio --quiet -id conf/uuid.conf
- ;;
-
- bzip2)
- bzcat "../../${INITRD}" | cpio --quiet -id conf/uuid.conf
- ;;
-
- lzma)
- lzcat -S "" "../../${INITRD}" | cpio --quiet -id conf/uuid.conf
- ;;
- esac
-
+ unmkinitramfs "../../${INITRD}" .
if [ -e conf/uuid.conf ]
then
mv conf/uuid.conf "../.disk/casper-uuid${INITRD#binary/casper/initrd.img}"
+ # Multipart gets extracted as early/main:
+ elif [ -e main/conf/uuid.conf ]
+ then
+ mv main/conf/uuid.conf "../.disk/casper-uuid${INITRD#binary/casper/initrd.img}"
else
Echo_warning "Failed to find casper uuid.conf in '${INITRD}'"
fi
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_hacks
+++ live-build-3.0~a57/scripts/build/lb_chroot_hacks
@@ -184,34 +184,14 @@ esac
if [ "${LB_INITRAMFS}" != "none" ]
then
+ if [ -n "${LB_INITRAMFS_COMPRESSION}" ]; then
+ echo "COMPRESS=${LB_INITRAMFS_COMPRESSION}" \
+ > chroot/etc/initramfs-tools/conf.d/live-build.conf
+ fi
Chroot chroot "${UPDATE_INITRAMFS_OPTIONS} update-initramfs -k all -t -u"
+ rm -f chroot//etc/initramfs-tools/conf.d/live-build.conf
fi
-# We probably ought to use COMPRESS= in a temporary file in
-# /etc/initramfs-tools/conf.d/ instead, but it's hard to pass options that
-# way.
-case "${LB_INITRAMFS_COMPRESSION}" in
- gzip)
- ;;
-
- bzip2)
- for INITRAMFS in $(find chroot/boot -name 'initrd*' -not -type l); do
- zcat "${INITRAMFS}" | bzip2 -c ${BZIP2_OPTIONS} > "${INITRAMFS}.new"
- mv "${INITRAMFS}.new" "${INITRAMFS}"
- done
- ;;
-
- lzma)
- # We probably ought to use COMPRESS= in a temporary file in
- # /etc/initramfs-tools/conf.d/ instead, but it's hard to
- # pass options that way.
- for INITRAMFS in $(find chroot/boot -name 'initrd*' -not -type l); do
- zcat "${INITRAMFS}" | lzma -c ${LZMA_OPTIONS} > "${INITRAMFS}.new"
- mv "${INITRAMFS}.new" "${INITRAMFS}"
- done
- ;;
-esac
-
# Ensure readable permissions on initramfs. loop-aes-utils sets umask to
# protect GPG keys, which live-build does not support.
# Note: Use find rather than chmod on the wildcard, one never knows what

View File

@ -1,36 +0,0 @@
Description: Put kernel symlinks in /boot on some architectures
This matches base-installer/library.sh more closely.
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/958839
Forwarded: no
Last-Update: 2012-04-18
Index: b/scripts/build/lb_chroot_linux-image
===================================================================
--- a/scripts/build/lb_chroot_linux-image
+++ b/scripts/build/lb_chroot_linux-image
@@ -118,6 +118,24 @@
fi
+ cat > chroot/etc/kernel-img.conf << EOF
+# Kernel Image management overrides
+# See kernel-img.conf(5) for details
+do_symlinks = yes
+do_bootloader = no
+EOF
+
+ case "${LB_ARCHITECTURES}" in
+ alpha|amd64|hppa|i386|ia64|m68k|mips|mipsel)
+ ;;
+
+ *)
+ cat >> chroot/etc/kernel-img.conf << EOF
+link_in_boot = yes
+EOF
+ ;;
+ esac
+
# Creating stage file
Create_stagefile .build/chroot_linux-image
fi

View File

@ -1,23 +0,0 @@
Description: Apply LB_HDD_LABEL to disks produced in lb_binary_rootfs.
Author: Daniel Watkins <daniel.watkins@canonical.com>
--- live-build-3.0~a57.orig/scripts/build/lb_binary_rootfs
+++ live-build-3.0~a57/scripts/build/lb_binary_rootfs
@@ -129,7 +129,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
FAKE_MTAB="true"
fi
- Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 filesystem.${LB_CHROOT_FILESYSTEM}"
+ Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 -L ${LB_HDD_LABEL} filesystem.${LB_CHROOT_FILESYSTEM}"
mkdir -p filesystem.tmp
${LB_ROOT_COMMAND} mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
@@ -199,7 +199,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
false)
dd if=/dev/zero of=binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} bs=1024k count=0 seek=${REAL_DIM}
- mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
+ mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -i 8192 -m 0 -L ${LB_HDD_LABEL} binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM}
mkdir -p filesystem.tmp
${LB_ROOT_COMMAND} mount -o loop binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp

View File

@ -1,35 +0,0 @@
Description: Drop etc/adjtime from scripts/build/lb_chroot_hacks.
/etc/adjtime is not needed and should not be used in Ubuntu.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Forwarded: no
Last-Update: 2013-09-27
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_hacks
+++ live-build-3.0~a57/scripts/build/lb_chroot_hacks
@@ -218,9 +218,6 @@ esac
# people might do in local hooks, and there might be no initrds at all.
find chroot/boot -name 'initrd*' -print0 | xargs -r -0 chmod go+r
-# Remove build systems clock drift
-echo "0.0 0 0.0" > chroot/etc/adjtime
-
# Remove cruft
rm -f chroot/boot/initrd*bak*
rm -f chroot/etc/apt/trusted.gpg~
@@ -229,6 +226,7 @@ rm -f chroot/etc/gshadow- chroot/etc/sha
rm -f chroot/var/cache/debconf/*-old
rm -f chroot/var/lib/dpkg/*-old
rm -f chroot/var/log/apt/term.log
+rm -f chroot/etc/adjtime
# Delete and re-create temporary directories
TEMP_DIRS="/tmp /var/tmp"
@@ -277,7 +275,7 @@ then
done
# Config files which need to be RW
- COW_FILES="/etc/adjtime /etc/fstab /etc/hostname /etc/hosts /etc/live.conf /etc/network/interfaces /etc/resolv.conf /etc/udev/rules.d/*persistent-net.rules /etc/udev/rules.d/*persistent-cd.rules /etc/X11/xorg.conf"
+ COW_FILES="/etc/fstab /etc/hostname /etc/hosts /etc/live.conf /etc/network/interfaces /etc/resolv.conf /etc/udev/rules.d/*persistent-net.rules /etc/udev/rules.d/*persistent-cd.rules /etc/X11/xorg.conf"
# Where we will store RW config files
RW_DIRECTORY="/var/lib/live"

View File

@ -1,24 +0,0 @@
Description: Don't force inclusion of gnupg in debootstrap
gnupg is now a metapackage depending on large numbers of extraneous
libraries. It should not be pulled into the base system; we should only
be pulling in the gpgv package instead.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Last-Update: 2018-03-02
--- live-build-3.0~a57.orig/functions/defaults.sh
+++ live-build-3.0~a57/functions/defaults.sh
@@ -377,14 +377,6 @@ Set_defaults ()
fi
fi
- # Include packages on base
- case "${LB_MODE}" in
- ubuntu|kubuntu)
- LB_BOOTSTRAP_INCLUDE="${LB_BOOTSTRAP_INCLUDE:-gnupg}"
- ;;
-
- esac
-
# Exclude packages on base
# LB_BOOTSTRAP_EXCLUDE

View File

@ -1,30 +0,0 @@
Description: Drop fix-up code for sysvinit
SysVinit has not been essential in Ubuntu in a decade, and now it's
sufficiently gone that dpkg-query fails.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Forwarded: not-needed
Last-Update: 2017-08-08
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_live-packages
+++ live-build-3.0~a57/scripts/build/lb_chroot_live-packages
@@ -48,20 +48,6 @@ then
_PACKAGES="${_PACKAGES} live-config live-config-${LB_INITSYSTEM}"
fi
-# Do initsystem specific hacks
-if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "sysvinit" ]
-then
- # lets see if we still need the squeeze's "pre init system policy discussion" hack:
- IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
- RC="$?"
-
- if [ "${IS_SYSVINIT_ESSENTIAL}" != "no" ] && [ "${RC}" = "0" ]
- then
- # sysvinit is both installed and essential, ugly hack to remove it
- Chroot chroot dpkg --force-remove-essential --remove sysvinit || true
- fi
-fi
-
# Install live packages
if [ -n "${_PACKAGES}" ]
then

View File

@ -1,25 +0,0 @@
Description: Don't turn on xz compression in mksquashfs for ubuntu builds.
Author: Adam Conrad <adconrad@ubuntu.com>
Forwarded: no
Last-Update: 2012-08-24
--- live-build-3.0~a57.orig/scripts/build/lb_binary_rootfs
+++ live-build-3.0~a57/scripts/build/lb_binary_rootfs
@@ -363,8 +363,15 @@ case "${LB_CHROOT_FILESYSTEM}" in
;;
*)
- # FIXME: artax-backports too, once d-i has catched up
- MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz"
+ case "${LB_MODE}" in
+ ubuntu|kubuntu)
+
+ ;;
+ *)
+ # FIXME: artax-backports too, once d-i has catched up
+ MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz"
+ ;;
+ esac
;;
esac

View File

@ -1,38 +0,0 @@
Description: carry over hack from ubuntu-cdimage to update bootlogo with contents
New gfxboot in utopic does no longer support loading assets from outside the
bootlogo archive, so we pack everything together and update bootlogo as part of the
syslinux build part.
Author: Harald Sitter <apachelogger@kubuntu.org>
Origin: vendor
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/live-build/+bug/1387709
Forwarded: no
Reviewed-by: Rohan Garg <rohangarg@kubuntu.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: live-build-3.0~a57/scripts/build/lb_binary_syslinux
===================================================================
--- live-build-3.0~a57.orig/scripts/build/lb_binary_syslinux
+++ live-build-3.0~a57/scripts/build/lb_binary_syslinux
@@ -359,6 +359,22 @@ case "${LB_MODE}" in
;;
esac
+# Hack around the removal of support in gfxboot for reading from outside
+# the bootlogo archive. This makes customisation harder and is not ideal.
+tmpdir="$(mktemp -d)"
+(cd "$tmpdir" && cpio -i) < ${_TARGET}/bootlogo
+cp -a -f ${_TARGET}/*.fnt \
+ ${_TARGET}/*.hlp \
+ ${_TARGET}/*.jpg \
+ ${_TARGET}/*.pcx \
+ ${_TARGET}/*.tr \
+ ${_TARGET}/*.cfg \
+ $(test -e ${_TARGET}/lang && echo ${_TARGET}/lang) \
+ ${_TARGET}/langlist \
+ "$tmpdir/" || true
+(cd "$tmpdir" && ls -1 | cpio --quiet -o) > ${_TARGET}/bootlogo
+rm -rf "$tmpdir"
+
case "${LB_BUILD_WITH_CHROOT}" in
true)
# Saving cache

View File

@ -1,161 +0,0 @@
Description: If --build-with-chroot is false, run ! lines in package-lists in the host system
Author: Colin Watson <cjwatson@ubuntu.com>
Last-Update: 2012-08-21
Index: b/functions/packagelists.sh
===================================================================
--- a/functions/packagelists.sh
+++ b/functions/packagelists.sh
@@ -43,7 +43,15 @@
\!*)
_EXEC="$(echo ${_LB_LINE} | sed -e 's|^!||')"
- chroot chroot ${_EXEC}
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ chroot chroot sh -c "${_EXEC}"
+ ;;
+
+ false)
+ eval ${_EXEC}
+ ;;
+ esac
;;
\#if\ *)
Index: b/scripts/build/lb_binary_package-lists
===================================================================
--- a/scripts/build/lb_binary_package-lists
+++ b/scripts/build/lb_binary_package-lists
@@ -41,15 +41,33 @@
if ls config/package-lists/*.list > /dev/null 2>&1 || \
ls config/package-lists/*.list.binary > /dev/null 2>&1
then
- # Restoring cache
- Restore_cache cache/packages.chroot
-
- # Check depends
- Check_package chroot/usr/bin/apt-ftparchive apt-utils
- Check_package chroot/usr/bin/grep-aptavail dctrl-tools
-
- # Installing depends
- Install_package
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ # Restoring cache
+ Restore_cache cache/packages.chroot
+
+ # Check depends
+ Check_package chroot/usr/bin/apt-ftparchive apt-utils
+ Check_package chroot/usr/bin/grep-aptavail dctrl-tools
+
+ # Installing depends
+ Install_package
+ ;;
+
+ false)
+ if [ ! -e /usr/bin/apt-ftparchive ]; then
+ # apt-utils
+ Echo_error "/usr/bin/apt-ftparchive - no such file."
+ exit 1
+ fi
+
+ if [ ! -e /usr/bin/grep-aptavail ]; then
+ # dctrl-tools
+ Echo_error "/usr/bin/grep-aptavail - no such file."
+ exit 1
+ fi
+ ;;
+ esac
if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
then
@@ -133,11 +151,15 @@
rm -rf chroot/binary.deb
mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status
- # Removing depends
- Remove_package
-
- # Saving cache
- Save_cache cache/packages.chroot
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ # Removing depends
+ Remove_package
+
+ # Saving cache
+ Save_cache cache/packages.chroot
+ ;;
+ esac
# Creating stage file
Create_stagefile .build/binary_package-lists
Index: b/scripts/build/lb_chroot_package-lists
===================================================================
--- a/scripts/build/lb_chroot_package-lists
+++ b/scripts/build/lb_chroot_package-lists
@@ -46,14 +46,26 @@
ls config/package-lists/*.list.chroot > /dev/null 2>&1 || \
ls config/package-lists/*.list.chroot_${_PASS} > /dev/null 2>&1
then
- # Checking depends
- Check_package chroot/usr/bin/grep-aptavail dctrl-tools
-
- # Restoring cache
- Restore_cache cache/packages.chroot
-
- # Installing depends
- Install_package
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ # Checking depends
+ Check_package chroot/usr/bin/grep-aptavail dctrl-tools
+
+ # Restoring cache
+ Restore_cache cache/packages.chroot
+
+ # Installing depends
+ Install_package
+ ;;
+
+ false)
+ if [ ! -e /usr/bin/grep-aptavail ]; then
+ # dctrl-tools
+ Echo_error "/usr/bin/grep-aptavail - no such file."
+ exit 1
+ fi
+ ;;
+ esac
if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
then
@@ -76,15 +88,19 @@
rm -f chroot/bin/Packages
- # Removing dctrl-tools again if the user has not installed it
- if ! grep -qs dctrl-tools chroot/root/packages.chroot
- then
- # Removing depends
- Remove_package
- fi
-
- # Saving cache
- Save_cache cache/packages.binary
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ # Removing dctrl-tools again if the user has not installed it
+ if ! grep -qs dctrl-tools chroot/root/packages.chroot
+ then
+ # Removing depends
+ Remove_package
+ fi
+
+ # Saving cache
+ Save_cache cache/packages.binary
+ ;;
+ esac
# Creating stage file
Create_stagefile .build/chroot_package-lists.${_PASS}

View File

@ -1,18 +0,0 @@
Description: Fix default for LB_PARENT_MIRROR_BINARY_VOLATILE
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Debian: http://bugs.debian.org/685669
Last-Update: 2012-08-23
Index: b/functions/defaults.sh
===================================================================
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -596,7 +596,7 @@
;;
esac
- LB_PARENT_MIRROR_BINARY_VOLATILE="${LB_PARENT_MIRROR_BINARY_VOLATILE:-${LB_PARENT_MIRROR}}"
+ LB_PARENT_MIRROR_BINARY_VOLATILE="${LB_PARENT_MIRROR_BINARY_VOLATILE:-${LB_PARENT_MIRROR_BINARY}}"
;;
*)

View File

@ -1,35 +0,0 @@
Description: Switch Ubuntu from powerpc to powerpc-smp kernel
Author: Adam Conrad <adconrad@ubuntu.com>
Forwarded: no
Index: b/scripts/build/lb_binary_debian-installer
===================================================================
--- a/scripts/build/lb_binary_debian-installer
+++ b/scripts/build/lb_binary_debian-installer
@@ -395,7 +395,7 @@
DI_REQ_PACKAGES="yaboot"
case "${LB_MODE}" in
ubuntu|kubuntu)
- DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-powerpc linux-image-powerpc64-smp"
+ DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-powerpc-smp linux-image-generic"
;;
*)
Index: b/functions/defaults.sh
===================================================================
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -803,11 +803,11 @@
ubuntu|kubuntu)
case "${LIST}" in
stripped|minimal)
- LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-powerpc}"
+ LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-powerpc-smp}"
;;
*)
- LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-powerpc powerpc64-smp}"
+ LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-powerpc-smp generic}"
;;
esac
;;

View File

@ -1,47 +0,0 @@
Description: Add basic ppc64el support
Author: Colin Watson <cjwatson@ubuntu.com>
Author: Daniel Watkins <daniel.watkins@canonical.com>
Forwarded: no
Last-Update: 2015-10-26
Index: b/functions/defaults.sh
===================================================================
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -830,6 +830,10 @@
esac
;;
+ ppc64el)
+ LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-generic}"
+ ;;
+
s390)
case "${LB_MODE}" in
progress|ubuntu|kubuntu)
Index: b/scripts/build/lb_binary_linux-image
===================================================================
--- a/scripts/build/lb_binary_linux-image
+++ b/scripts/build/lb_binary_linux-image
@@ -58,7 +58,7 @@
esac
case "${LB_ARCHITECTURES}" in
- powerpc)
+ powerpc|ppc64el)
LINUX="vmlinux"
;;
Index: b/scripts/build/lb_binary_rootfs
===================================================================
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -43,7 +43,7 @@
LINUX="vmlinuz"
;;
- powerpc)
+ powerpc|ppc64el)
LINUX="vmlinux"
;;
esac

View File

@ -1,14 +0,0 @@
Description: Mount devpts with gid=5,mode=620 to work without pt_chown.
Author: Adam Conrad <adconrad@ubuntu.com>
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_devpts
+++ live-build-3.0~a57/scripts/build/lb_chroot_devpts
@@ -49,7 +49,7 @@ case "${1}" in
mkdir -p chroot/dev/pts
# Mounting /dev/pts
- ${LB_ROOT_COMMAND} mount devpts-live -t devpts chroot/dev/pts || true
+ ${LB_ROOT_COMMAND} mount devpts-live -t devpts -o gid=5,mode=620 chroot/dev/pts || true
fi
# Creating stage file

View File

@ -1,24 +0,0 @@
Description: Remove resolvconf artifacts
If chroot/etc/resolvconf/resolv.conf.d exists, tidy up the original and
tail files, which are artifacts of the build (and leak the host system's
resolv.conf).
Author: Adam Conrad <adconrad@ubuntu.com>
Last-Update: 2012-08-20
Index: b/scripts/build/lb_chroot_resolv
===================================================================
--- a/scripts/build/lb_chroot_resolv
+++ b/scripts/build/lb_chroot_resolv
@@ -90,6 +90,12 @@
Truncate chroot/etc/resolv.conf
fi
+ # Clean up resolvconf's pollution
+ if [ -d chroot/etc/resolvconf/resolv.conf.d ]; then
+ rm -f chroot/etc/resolvconf/resolv.conf.d/original
+ rm -f chroot/etc/resolvconf/resolv.conf.d/tail
+ fi
+
# Removing stage file
rm -f .build/chroot_resolv
;;

View File

@ -1,16 +0,0 @@
Description: attempt s390x builds
Author: Dimitri John Ledkov <xnox@ubuntu.com>
--- live-build-3.0~a57.orig/functions/defaults.sh
+++ live-build-3.0~a57/functions/defaults.sh
@@ -834,6 +834,10 @@ Set_defaults ()
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-generic}"
;;
+ s390x)
+ LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-generic}"
+ ;;
+
s390)
case "${LB_MODE}" in
progress|ubuntu|kubuntu)

View File

@ -1,22 +0,0 @@
Description: Use a framebuffer in the initramfs
Wubi disk image installs do a fair amount of work in the initramfs.
Author: Evan Dandrea <ev@ubuntu.com>
Last-Update: 2012-08-20
Index: b/scripts/build/lb_chroot_hacks
===================================================================
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -176,6 +176,12 @@
;;
esac
+case "${SUBPROJECT}" in
+ wubi)
+ UPDATE_INITRAMFS_OPTIONS="$UPDATE_INITRAMFS_OPTIONS FRAMEBUFFER=y"
+ ;;
+esac
+
if [ "${LB_INITRAMFS}" != "none" ]
then
Chroot chroot "${UPDATE_INITRAMFS_OPTIONS} update-initramfs -k all -t -u"

View File

@ -1,36 +0,0 @@
Description: Fix lb_chroot_upstart to work when upstart's not in bootstrap
Author: Adam Conrad <adconrad@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1477051
--- live-build-3.0~a57.orig/scripts/build/lb_chroot_upstart
+++ live-build-3.0~a57/scripts/build/lb_chroot_upstart
@@ -27,12 +27,6 @@ Set_defaults
# Requiring stage file
Require_stagefile .build/config .build/bootstrap
-# Check if system uses upstart
-if [ ! -e chroot/sbin/initctl ]
-then
- exit 0
-fi
-
case "${1}" in
install)
Echo_message "Configuring file /sbin/initctl"
@@ -49,6 +43,8 @@ case "${1}" in
# Create custom initctl file
Chroot chroot dpkg-divert --rename --quiet --add /sbin/initctl
+ # Only create stub if we actually diverted something
+ if [ -e chroot/sbin/initctl.distrib ]; then
cat > chroot/sbin/initctl << EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
@@ -56,6 +52,7 @@ exit 101
EOF
chmod 0755 chroot/sbin/initctl
+ fi
# Creating stage file
Create_stagefile .build/chroot_upstart

View File

@ -1 +1 @@
3.0 (quilt)
3.0 (native)