Codebase list live-build / 2eb621c
Import Debian version 20210407 live-build (1:20210407) unstable; urgency=medium . * Upload to unstable. . live-build (1:20210405) experimental; urgency=medium . * Firmware download: skip architecture if not found (Closes: #986278) * Autopkgtest: build a buster image * Autopkgtest: remove architecture restriction . live-build (1:20210330) unstable; urgency=medium . * security: do not append /updates for Bullseye and newer. (Closes: #986148) . live-build (1:20210329) unstable; urgency=medium . [ Ryan Finnie ] * Use --apt-http-proxy/--apt-ftp-proxy for debootstrap * No mksquashfs progress bar if stdin is not a terminal . [ Unit 193 ] * firmwarelists.sh: Search Contents-all for firmware too. . [ Roland Clobus ] * Support security for bullseye. See https://wiki.debian.org/NewInBullseye. Closes: #964914 * Fixed handling of checksums in combination with the d-i installer. * Removed filesystem.size for squashfs images. Luca Boccassi authored 3 years ago Sophie Brun committed 2 years ago
13 changed file(s) with 138 addition(s) and 61 deletion(s). Raw diff Collapse all Expand all
0 live-build (1:20210329) unstable; urgency=medium
1
2 The 'filesystem.size' file is no longer created and included in the image,
3 as it is often incorrect and variates depending on the build environment,
4 breaking reproducibility. For more information see the following thread:
5 https://lists.debian.org/debian-live/2021/03/msg00008.html
6
7 -- Luca Boccassi <[email protected]> Mon, 29 Mar 2021 10:49:43 +0100
8
09 live-build (1:20180411) unstable; urgency=medium
110
211 The live-boot mount points have been moved from /lib/live/mount to
0 live-build (1:20210407) unstable; urgency=medium
1
2 * Upload to unstable.
3
4 -- Luca Boccassi <[email protected]> Wed, 07 Apr 2021 18:52:50 +0100
5
6 live-build (1:20210405) experimental; urgency=medium
7
8 * Firmware download: skip architecture if not found (Closes: #986278)
9 * Autopkgtest: build a buster image
10 * Autopkgtest: remove architecture restriction
11
12 -- Luca Boccassi <[email protected]> Mon, 05 Apr 2021 13:04:04 +0100
13
14 live-build (1:20210330) unstable; urgency=medium
15
16 * security: do not append /updates for Bullseye and newer.
17 (Closes: #986148)
18
19 -- Luca Boccassi <[email protected]> Tue, 30 Mar 2021 16:17:38 +0100
20
21 live-build (1:20210329) unstable; urgency=medium
22
23 [ Ryan Finnie ]
24 * Use --apt-http-proxy/--apt-ftp-proxy for debootstrap
25 * No mksquashfs progress bar if stdin is not a terminal
26
27 [ Unit 193 ]
28 * firmwarelists.sh: Search Contents-all for firmware too.
29
30 [ Roland Clobus ]
31 * Support security for bullseye. See
32 https://wiki.debian.org/NewInBullseye. Closes: #964914
33 * Fixed handling of checksums in combination with the d-i installer.
34 * Removed filesystem.size for squashfs images.
35
36 -- Luca Boccassi <[email protected]> Mon, 29 Mar 2021 10:49:43 +0100
37
038 live-build (1:20210216) unstable; urgency=medium
139
240 [ Raphaƫl Hertzog ]
0 #!/bin/bash
1
2 set -eu
3 set -o pipefail
4
5 cd "${AUTOPKGTEST_TMP}"
6 lb config --verbose --updates true --security true --distribution buster
7 lb build --verbose
8 ls -l
00 Tests: build-default-image
11 Depends: live-build,
22 Restrictions: needs-root, allow-stderr, needs-internet
3 Architecture: amd64 i386
3
4 Tests: build-stable-image
5 Depends: live-build,
6 Restrictions: needs-root, allow-stderr, needs-internet
47
58 Tests: build-kali-image
69 Depends: live-build, git, ca-certificates, curl, apt-utils, bzip2, cpio, file, wget, xz-utils
710 Restrictions: needs-root, allow-stderr, flaky, needs-internet
8 Architecture: amd64 i386
349349 then
350350 LB_DEBIAN_INSTALLER="netinst"
351351 Echo_warning "A value of 'true' for option LB_DEBIAN_INSTALLER is deprecated, please use 'netinst' in future."
352 fi
353
354 # cdrom-checker in d-i requires a md5 checksum file
355 if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
356 then
357 if [ "${LB_CHECKSUMS}" = "none" ]
358 then
359 LB_CHECKSUMS="md5"
360 else
361 if ! In_list md5 ${LB_CHECKSUMS}; then
362 LB_CHECKSUMS=${LB_CHECKSUMS}" md5"
363 fi
364 fi
352365 fi
353366
354367 LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}"
647660 fi
648661 done
649662
650 if ! In_list "${LB_CHECKSUMS}" md5 sha1 sha224 sha256 sha384 sha512 none; then
651 Echo_error "You have specified an invalid value for LB_CHECKSUMS (--checksums)."
652 exit 1
663 local CHECKSUM
664 if [ "${LB_CHECKSUMS}" != "none" ]; then
665 for CHECKSUM in ${LB_CHECKSUMS}; do
666 if ! In_list "${CHECKSUM}" md5 sha1 sha224 sha256 sha384 sha512; then
667 Echo_error "You have specified an invalid value for LB_CHECKSUMS (--checksums): '%s'" "${CHECKSUM}"
668 exit 1
669 fi
670 done
653671 fi
654672
655673 if ! In_list "${LB_CHROOT_FILESYSTEM}" ext2 ext3 ext4 squashfs jffs2 none; then
2121 local _ARCHIVE_AREA
2222 for _ARCHIVE_AREA in ${ARCHIVE_AREAS}
2323 do
24 local CONTENTS_URL="${MIRROR_CHROOT}/dists/${DISTRO_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURE}.gz"
2524 local CONTENTS_FILEDIR="cache/contents.chroot/${DISTRO_CHROOT}/${_ARCHIVE_AREA}"
26 local CONTENTS_FILE="${CONTENTS_FILEDIR}/contents-${LB_ARCHITECTURE}.gz"
27
2825 mkdir -p "${CONTENTS_FILEDIR}"
2926
30 # Purge from cache if not wanting to use from cache, ensuring fresh copy
31 if [ "${LB_CACHE}" != "true" ]
32 then
33 rm -f "${CONTENTS_FILE}"
34 fi
27 local _ARCH
28 for _ARCH in all ${LB_ARCHITECTURE}
29 do
30 local CONTENTS_URL="${MIRROR_CHROOT}/dists/${DISTRO_CHROOT}/${_ARCHIVE_AREA}/Contents-${_ARCH}.gz"
31 local CONTENTS_FILE="${CONTENTS_FILEDIR}/contents-${_ARCH}.gz"
3532
36 # If not cached, download
37 if [ ! -e "${CONTENTS_FILE}" ]
38 then
39 wget ${WGET_OPTIONS} "${CONTENTS_URL}" -O "${CONTENTS_FILE}"
40 fi
33 # Purge from cache if not wanting to use from cache, ensuring fresh copy
34 if [ "${LB_CACHE}" != "true" ]
35 then
36 rm -f "${CONTENTS_FILE}"
37 fi
4138
42 local PACKAGES
43 PACKAGES="$(gunzip -c "${CONTENTS_FILE}" | awk '/^lib\/firmware/ { print $2 }' | sort -u )"
44 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} ${PACKAGES}"
39 # If not cached, download
40 if [ ! -e "${CONTENTS_FILE}" ]
41 then
42 # Contents-all.gz does not exist in Buster and other older versions
43 if ! wget --quiet --spider ${WGET_OPTIONS} "${CONTENTS_URL}"; then
44 continue
45 fi
46 wget ${WGET_OPTIONS} "${CONTENTS_URL}" -O "${CONTENTS_FILE}"
47 fi
4548
46 # Don't waste disk space, if not making use of caching
47 if [ "${LB_CACHE}" != "true" ]
48 then
49 rm -f "${CONTENTS_FILE}"
50 fi
49 local PACKAGES
50 PACKAGES="$(gunzip -c "${CONTENTS_FILE}" | awk '/^lib\/firmware/ { print $2 }' | sort -u )"
51 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} ${PACKAGES}"
52
53 # Don't waste disk space, if not making use of caching
54 if [ "${LB_CACHE}" != "true" ]
55 then
56 rm -f "${CONTENTS_FILE}"
57 fi
58 done
5159 done
5260 }
8282 # do nothing
8383 ;;
8484
85 *)
85 buster|jessie|stretch)
8686 echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
8787 echo "deb-src ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
88 ;;
89 *)
90 echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
91 echo "deb-src ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
8892 ;;
8993 esac
9094
238238 .IP "\fB\-\-apt\fR apt|apt-get|aptitude" 4
239239 defines if apt\-get or aptitude is used to install packages when building the image. The default is apt.
240240 .IP "\fB\-\-apt\-ftp\-proxy\fR \fIURL\fR" 4
241 sets the FTP proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by apt internally within the chroot, it is not used for anything else.
241 sets the FTP proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by initial debootstrap, and by apt internally within the chroot. It is not used for anything else.
242242 .IP "\fB\-\-apt\-http\-proxy\fR \fIURL\fR" 4
243 sets the HTTP proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by apt internally within the chroot, it is not used for anything else.
243 sets the HTTP proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by initial debootstrap, and by apt internally within the chroot. It is not used for anything else.
244244 .IP "\fB\-\-apt\-indices\fR true|false" 4
245245 defines if the resulting images should have apt indices or not and defaults to true.
246246 .IP "\fB\-\-apt\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
5454 \! -path './boot/grub/stage2_eltorito' \
5555 \! -path './*SUMS' \
5656 \! -path './*sum.txt' \
57 -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUMS}
57 \! -path './*sum.README' \
58 -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS}
5859
59 cat > ${CHECKSUMS} << EOF
60 ## This file contains the list of ${CHECKSUM} checksums of all files on this
61 ## medium.
62 ##
63 ## You can verify them automatically with the 'verify-checksums' boot parameter,
64 ## or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'.
65 ##
66 ##
60 cat > ${CHECKSUM}sum.README << EOF
61 The file ${CHECKSUMS} contains the ${CHECKSUM} checksums of all files on this medium.
62
63 You can verify them automatically with the 'verify-checksums' boot parameter,
64 or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'.
6765 EOF
68
69 cat ../${CHECKSUMS} >> ${CHECKSUMS}
70 rm -f ../${CHECKSUMS}
7166
7267 cd "${OLDPWD}"
7368 done
264264 # Remove stale squashfs image
265265 rm -f chroot/filesystem.squashfs
266266
267 if [ "${_QUIET}" = "true" ]
267 # Do not display progress bar if:
268 # - Run with --quiet, or
269 # - stdin is not a terminal (e.g. in CI, cron, etc)
270 if [ "${_QUIET}" = "true" ] || [ ! -t 0 ]
268271 then
269272 MKSQUASHFS_OPTIONS="-no-progress ${MKSQUASHFS_OPTIONS}"
270273 fi
316319
317320 rm -f chroot/excludes
318321
319 du -B 1 -s chroot/chroot | cut -f1 > binary/${INITFS}/filesystem.size
320
321322 # Move image
322323 mv chroot/filesystem.squashfs binary/${INITFS}
323324 rm -f chroot/squashfs.sort
350351 fi
351352
352353 nice -n 19 mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
353
354 du -B 1 -s chroot | cut -f1 > binary/${INITFS}/filesystem.size
355354 ;;
356355 esac
357356
8585
8686 Print_breakage
8787 Echo_message "Running debootstrap (download-only)..."
88 debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
88 /usr/bin/env http_proxy="${LB_APT_HTTP_PROXY}" ftp_proxy="${LB_APT_FTP_PROXY}" debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
8989
9090 # Removing old cache
9191 rm -f cache/packages.bootstrap/*.deb
962962 # Set package manager
963963 LB_APT="${LB_APT}"
964964
965 # Set apt/aptitude ftp proxy
965 # Set apt/aptitude/debootstrap ftp proxy
966966 LB_APT_FTP_PROXY="${LB_APT_FTP_PROXY}"
967967
968 # Set apt/aptitude http proxy
968 # Set apt/aptitude/debootstrap http proxy
969969 LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
970970
971971 # Set apt/aptitude pipeline depth
5858 find . -type f \
5959 \! -path './*SUMS' \
6060 \! -path './*sum.txt' \
61 -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ../${CHECKSUMS}
61 \! -path './*sum.README' \
62 -print0 | sort -z | xargs -0 ${CHECKSUM}sum > ${CHECKSUMS}
6263
63 cat > ${CHECKSUMS} << EOF
64 ## This file contains the list of ${CHECKSUM} checksums of all files on this
65 ## medium.
66 ##
67 ## You can verify them automatically with the 'verify-checksums' boot parameter,
68 ## or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'.
69 ##
70 ##
64 cat > ${CHECKSUM}sum.README << EOF
65 The file ${CHECKSUMS} contains the ${CHECKSUM} checksums of all files on this medium.
66
67 You can verify them automatically with the 'verify-checksums' boot parameter,
68 or, manually with: '${CHECKSUM}sum -c ${CHECKSUMS}'.
7169 EOF
72
73 cat ../${CHECKSUMS} >> ${CHECKSUMS}
74 rm -f ../${CHECKSUMS}
7570
7671 cd "${OLDPWD}"
7772 done