Codebase list live-build / 275178c
Import Debian version 20170213 live-build (1:20170213) unstable; urgency=medium * Drop the versatile kernel flavour on armel. It's no longer built since Linux 4.9. live-build (1:20161216) unstable; urgency=medium * Cleanup binary_loopback_cfg and offer more freedom in overriding the default grub-pc configuration. * Update the manual page with the missiong --bootappend-live-failsafe option. * Keep supporting the former --bootloader (without s). live-build (1:20161202) unstable; urgency=medium [ Raphaël Hertzog ] * Officially adopt the package. Closes: #808048 * Better handle empty package lists. * Drop ixp4xx from available armel flavors, the image has been gone since linux 3.17. * Add symlinks for libgpl.c32 and libmenu.c32 which are required by the "Hardware Detection Tool (HDT)" menu entry that live-build adds in the advanced menu. * Add EFI boot support with grub-efi, thanks to Adrian Gibanel Lopez. Closes: #731709 * Fix usage of config/packages.chroot/*.deb that has been broken by the switch to GnuPG2 by default by no longer using GnuPG but relying on APT's trusted=yes attribute instead. Thus we no longer have remaining key in /etc/apt/trusted.gpg after building. Closes: #816204 * Try to reuse /isolinux/splash.png in default grub configuration. * Drop debian/source/{local-options,options} as they are no longer needed. * Pass components to debootstrap --second-stage. Closes: #806782 Thanks to Sjoerd Simons <[email protected]> for the patch. * Fix behaviour of (undocumented) "#nif" conditional test. Closes: #801379 Thanks to Erik Cumps <[email protected]> for the patch. * Export SOURCE_DATE_EPOCH when running chroot commands. Closes: #832998 Thanks to Chris Lamb <[email protected]> for the patch. * Set xorriso's "modification time" to SOURCE_DATE_EPOCH. Closes: #831379 Thanks to Chris Lamb <[email protected]> for the patch. * Support “lb config --debootstrap-script <script>” to use an alternate bootstrap script when running debootstrap. Thanks to Sjoerd Simons <[email protected]> for the initial patch. Closes: #790033 * Manual pages updates by jnqnfe. Closes: #774730 * Drop left-over translation files for removed lb_testroot command. * Get rid of useless bootstrap_archive-keys script. Closes: #773775 * Drop an optimization in chroot_archives that has undesired side-effects. Thanks to jnqnfe for the patch. Closes: #775989 * Drop gpgv and debian-keyring from Suggests. * Fix Check_installed function when checking against host. Thanks to jnqnfe for the report. Closes: #774807 * Bump debhelper compat level to 10. * Bump Standards-Version to 3.9.8. * Use a grub theme that integrates reasonably well with the current background picture. * Default for LB_UNION_FILESYSTEM is now "overlay" just like in live-boot. * Update the way we generate the version of live-build that is displayed by lb --version. * Instead of renaming kernel for syslinux, create hardlinks. * Simplify grub configuration code to use only long kernel names. Put advanced options in a submenu. Use distro-agnostic labels. [ Kristian Klausen ] * Include ext{3,4} journal size when calculating image size. Closes: #801712 * Switch d-i.debian.org URIs from http to https. Closes: #809699 * Fix typo in binary_syslinux. Closes: #818916 * Correct syslinux/extlinux mbr.bin path. Closes: #773833 Raphaël Hertzog 7 years ago
59 changed file(s) with 1248 addition(s) and 1546 deletion(s). Raw diff Collapse all Expand all
3939 install:
4040 # Installing shared data
4141 mkdir -p $(DESTDIR)/usr/share/live/build
42 cp -r data functions VERSION $(DESTDIR)/usr/share/live/build
42 cp -r data functions $(DESTDIR)/usr/share/live/build
43 sed -e 's/.*(\(.*\)).*/\1/; q' debian/changelog >$(DESTDIR)/usr/share/live/build/VERSION
4344 cp -r share/* $(DESTDIR)/usr/share/live/build
4445
4546 # Installing executables
+0
-1
VERSION less more
0 5.0~a11-1
0 live-build (1:20170213) unstable; urgency=medium
1
2 * Drop the versatile kernel flavour on armel. It's no longer built since
3 Linux 4.9.
4
5 -- Raphaël Hertzog <[email protected]> Mon, 13 Feb 2017 16:58:00 +0100
6
7 live-build (1:20161216) unstable; urgency=medium
8
9 * Cleanup binary_loopback_cfg and offer more freedom in overriding
10 the default grub-pc configuration.
11 * Update the manual page with the missiong --bootappend-live-failsafe
12 option.
13 * Keep supporting the former --bootloader (without s).
14
15 -- Raphaël Hertzog <[email protected]> Fri, 16 Dec 2016 10:05:26 +0100
16
17 live-build (1:20161202) unstable; urgency=medium
18
19 [ Raphaël Hertzog ]
20 * Officially adopt the package. Closes: #808048
21 * Better handle empty package lists.
22 * Drop ixp4xx from available armel flavors, the image has been gone since
23 linux 3.17.
24 * Add symlinks for libgpl.c32 and libmenu.c32 which are required by
25 the "Hardware Detection Tool (HDT)" menu entry that live-build adds
26 in the advanced menu.
27 * Add EFI boot support with grub-efi, thanks to Adrian Gibanel Lopez.
28 Closes: #731709
29 * Fix usage of config/packages.chroot/*.deb that has been broken by the
30 switch to GnuPG2 by default by no longer using GnuPG but relying
31 on APT's trusted=yes attribute instead.
32 Thus we no longer have remaining key in /etc/apt/trusted.gpg
33 after building. Closes: #816204
34 * Try to reuse /isolinux/splash.png in default grub configuration.
35 * Drop debian/source/{local-options,options} as they are no longer needed.
36 * Pass components to debootstrap --second-stage. Closes: #806782
37 Thanks to Sjoerd Simons <[email protected]> for the patch.
38 * Fix behaviour of (undocumented) "#nif" conditional test. Closes: #801379
39 Thanks to Erik Cumps <[email protected]> for the patch.
40 * Export SOURCE_DATE_EPOCH when running chroot commands. Closes: #832998
41 Thanks to Chris Lamb <[email protected]> for the patch.
42 * Set xorriso's "modification time" to SOURCE_DATE_EPOCH. Closes: #831379
43 Thanks to Chris Lamb <[email protected]> for the patch.
44 * Support “lb config --debootstrap-script <script>” to use an alternate
45 bootstrap script when running debootstrap. Thanks to Sjoerd Simons
46 <[email protected]> for the initial patch. Closes: #790033
47 * Manual pages updates by jnqnfe. Closes: #774730
48 * Drop left-over translation files for removed lb_testroot command.
49 * Get rid of useless bootstrap_archive-keys script. Closes: #773775
50 * Drop an optimization in chroot_archives that has undesired side-effects.
51 Thanks to jnqnfe for the patch. Closes: #775989
52 * Drop gpgv and debian-keyring from Suggests.
53 * Fix Check_installed function when checking against host. Thanks to jnqnfe
54 for the report. Closes: #774807
55 * Bump debhelper compat level to 10.
56 * Bump Standards-Version to 3.9.8.
57 * Use a grub theme that integrates reasonably well with the current
58 background picture.
59 * Default for LB_UNION_FILESYSTEM is now "overlay" just like in live-boot.
60 * Update the way we generate the version of live-build that is displayed by
61 lb --version.
62 * Instead of renaming kernel for syslinux, create hardlinks.
63 * Simplify grub configuration code to use only long kernel names. Put
64 advanced options in a submenu. Use distro-agnostic labels.
65
66 [ Kristian Klausen ]
67 * Include ext{3,4} journal size when calculating image size. Closes: #801712
68 * Switch d-i.debian.org URIs from http to https. Closes: #809699
69 * Fix typo in binary_syslinux. Closes: #818916
70 * Correct syslinux/extlinux mbr.bin path. Closes: #773833
71
72 -- Raphaël Hertzog <[email protected]> Fri, 02 Dec 2016 23:33:45 +0100
73
074 live-build (1:20151215) unstable; urgency=medium
175
276 * QA Upload.
00 Source: live-build
11 Section: misc
22 Priority: optional
3 Maintainer: Debian QA Group <[email protected]>
3 Maintainer: Debian Live <[email protected]>
4 Uploaders: Raphaël Hertzog <[email protected]>
45 Build-Depends:
5 debhelper (>= 9),
6 Standards-Version: 3.9.6
6 debhelper (>= 10),
7 Standards-Version: 3.9.8
78 Homepage: https://debian-live.alioth.debian.org/live-build/
89 Vcs-Browser: https://anonscm.debian.org/cgit/debian-live/live-build.git
910 Vcs-Git: https://anonscm.debian.org/git/debian-live/live-build.git
2021 live-config-doc,
2122 live-manual-html | live-manual,
2223 wget,
23 Suggests:
24 debian-keyring,
25 gpgv,
2624 Description: Live System Build Components
2725 The Live Systems project maintains the components to build Debian based Live
2826 systems and the official Debian Live images themselves.
00 #!/usr/bin/make -f
11
2 include /usr/share/dpkg/pkg-info.mk
3
24 %:
3 dh ${@} --parallel
5 dh $@
46
57 override_dh_auto_install:
68 dh_auto_install -- DESTDIR=debian/live-build
79
10 # Update VERSION file
11 echo $(DEB_VERSION) >debian/live-build/usr/share/live/build/VERSION
12
813 # Removing unused files
914 rm -f debian/live-build/usr/share/doc/live-build/COPYING
1015
11 override_dh_builddeb:
12 dh_builddeb -- -Zxz
13
1416 override_dh_link:
15 dh_link
16
17 # workaround dh_link convertion of absolute symlinks to relvative symlinks
18 rm -rf debian/live-build/usr/share/live/build/bootloaders
19 cp -a share/bootloaders debian/live-build/usr/share/live/build/bootloaders
17 # workaround dh_link conversion of absolute symlinks to relative symlinks
18 dh_link -X.c32 -Xisolinux.bin -Xpxelinux.0
0 # Ignore those errors, it's not nice but works currently
1 source-contains-unsafe-symlink share/bootloaders/*
+0
-1
debian/source/options less more
0 compression = xz
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016 Adrian Gibanel Lopez <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9 Is_First_Bootloader ()
10 {
11 EVAL_FIRST_BOOTLOADER="${1}"
12
13 if [ "${LB_FIRST_BOOTLOADER}" = "${EVAL_FIRST_BOOTLOADER}" ]
14 then
15 return 0
16 else
17 return 1
18 fi
19
20 }
21
22 Is_Bootloader ()
23 {
24 EVAL_BOOTLOADER="${1}"
25 OLDIFS="$IFS"
26 IFS=","
27 for BOOTLOADER in ${LB_BOOTLOADERS}
28 do
29 if [ "${BOOTLOADER}" = "${EVAL_BOOTLOADER}" ]
30 then
31 IFS="$OLDIFS"
32 return 0
33 fi
34 done
35 IFS="$OLDIFS"
36 return 1
37 }
38
39 Is_Extra_Bootloader ()
40 {
41 EVAL_EXTRA_BOOTLOADER="${1}"
42
43 if Is_First_Bootloader "${EVAL_EXTRA_BOOTLOADER}"
44 then
45 return 1
46 else
47 if Is_Bootloader "${EVAL_EXTRA_BOOTLOADER}"
48 then
49 return 0
50 fi
51 fi
52 return 1
53
54 }
55
56 Check_Non_First_Bootloader ()
57 {
58 NON_FIRST_BOOTLOADER="${1}"
59
60 if Is_First_Bootloader "${NON_FIRST_BOOTLOADER}"
61 then
62 Echo_error "Bootloader: ${NON_FIRST_BOOTLOADER} not supported as a first bootloader."
63 exit 1
64 else
65 return 0
66 fi
67 }
68
69
70 Check_Non_Extra_Bootloader ()
71 {
72 NON_EXTRA_BOOTLOADER="${1}"
73
74 if Is_Extra_Bootloader "${NON_EXTRA_BOOTLOADER}"
75 then
76 Echo_error "Bootloader: ${NON_EXTRA_BOOTLOADER} not supported as a extra bootloader."
77 exit 1
78 else
79 return 0
80 fi
81 }
82
83 Check_First_Bootloader_Role ()
84 {
85 FIRST_BOOTLOADER_ROLE="${1}"
86 Check_Non_Extra_Bootloader "${FIRST_BOOTLOADER_ROLE}"
87
88 if Is_First_Bootloader "${FIRST_BOOTLOADER_ROLE}"
89 then
90 return 0
91 else
92 exit 0
93 fi
94
95 }
96
97 Check_Extra_Bootloader_Role ()
98 {
99 EXTRA_BOOTLOADER_ROLE="${1}"
100 Check_Non_First_Bootloader "${EXTRA_BOOTLOADER_ROLE}"
101
102 if Is_Extra_Bootloader "${EXTRA_BOOTLOADER_ROLE}"
103 then
104 return 0
105 else
106 exit 0
107 fi
108
109 }
110
111 Check_Any_Bootloader_Role ()
112 {
113 ANY_BOOTLOADER_ROLE="${1}"
114
115 if Is_First_Bootloader "${ANY_BOOTLOADER_ROLE}"
116 then
117 return 0
118 fi
119
120 if Is_Extra_Bootloader "${ANY_BOOTLOADER_ROLE}"
121 then
122 return 0
123 fi
124
125 exit 0
126
127 }
2525 fi
2626 done
2727
28 # Only pass SOURCE_DATE_EPOCH if its already set
29 if [ "${SOURCE_DATE_EPOCH:-}" != "" ]
30 then
31 ENV="${ENV} SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
32 fi
33
2834 ${_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}
2935
3036 return "${?}"
395395 LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
396396
397397 # Setting union filesystem
398 LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-aufs}"
398 LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-overlay}"
399399
400400 # Setting interactive shell/X11/Xnest
401401 LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
412412 armel)
413413 # armel will have special images: one rootfs image and many additional kernel images.
414414 # therefore we default to all available armel flavours
415 LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-ixp4xx kirkwood orion5x versatile}"
415 LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-kirkwood orion5x}"
416416 ;;
417417
418418 armhf)
531531 then
532532 case "${LB_ARCHITECTURES}" in
533533 amd64|i386)
534 LB_BOOTLOADERS="syslinux"
534 LB_BOOTLOADERS="syslinux,grub-efi"
535535 ;;
536536 esac
537537 fi
538
539 LB_FIRST_BOOTLOADER=$(echo "${LB_BOOTLOADERS}" | awk -F, '{ print $1 }')
538540
539541 # Setting checksums
540542 case "${LB_MODE}" in
778780
779781 Check_defaults ()
780782 {
781 if [ -n "${LIVE_BUILD_VERSION}" ]
782 then
783 # We're only checking when we're actually running the checks
784 # that's why the check for emptyness of the version;
785 # however, as live-build always declares LIVE_BUILD_VERSION
786 # internally, this is safe assumption (no cases where it's unset,
787 # except when bootstrapping the functions/defaults etc.).
788
789 CURRENT_CONFIGURATION_VERSION="$(echo ${LIVE_CONFIGURATION_VERSION} | awk -F. ' { print $1 }')"
790
791 if [ -n "${CURRENT_CONFIGURATION_VERSION}" ]
792 then
793 CORRECT_VERSION="$(echo ${LIVE_BUILD_VERSION} | awk -F. '{ print $1 }')"
794 TOO_NEW_VERSION="$((${CORRECT_VERSION} + 1))"
795 TOO_OLD_VERSION="$((${CORRECT_VERSION} - 1))"
796
797 if [ ${CURRENT_CONFIGURATION_VERSION} -ne ${CORRECT_VERSION} ]
798 then
799 if [ ${CURRENT_CONFIGURATION_VERSION} -ge ${TOO_NEW_VERSION} ]
800 then
801 Echo_error "This config tree is too new for live-build (${VERSION})."
802 Echo_error "Aborting build, please update live-build."
803
804 exit 1
805 elif [ ${CURRENT_CONFIGURATION_VERSION} -le ${TOO_OLD_VERSION} ]
806 then
807 Echo_error "This config tree is too old for live-build (${VERSION})."
808 Echo_error "Aborting build, please update the configuration."
809
810 exit 1
811 else
812 Echo_warning "This configuration does not specify a version or has a unknown version."
813 Echo_warning "Continuing build, please correct the configuration."
814 fi
815 fi
816 fi
817 fi
818
819783 case "${LB_BINARY_FILESYSTEM}" in
820784 ntfs)
821785 if [ ! -x "$(which ntfs-3g 2>/dev/null)" ]
844808 fi
845809 fi
846810
847
848 LB_PRIMARY_BOOTLOADER=$(echo "${LB_BOOTLOADERS}" | awk -F, '{ print $1 }')
849
850 if [ "${LB_PRIMARY_BOOTLOADER}" = "syslinux" ]
811 if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
851812 then
852813 # syslinux + fat or ntfs, or extlinux + ext[234] or btrfs
853814 case "${LB_BINARY_FILESYSTEM}" in
854815 fat*|ntfs|ext[234]|btrfs)
855816 ;;
856817 *)
857 Echo_warning "You have selected values of LB_BOOTLOADER and LB_BINARY_FILESYSTEM which are incompatible - the syslinux family only support FAT, NTFS, ext[234] or btrfs filesystems."
818 Echo_warning "You have selected values of LB_BOOTLOADERS and LB_BINARY_FILESYSTEM which are incompatible - the syslinux family only support FAT, NTFS, ext[234] or btrfs filesystems."
858819 ;;
859820 esac
860821 fi
861822
862823 case "${LIVE_IMAGE_TYPE}" in
863824 hdd*)
864 case "${LB_PRIMARY_BOOTLOADER}" in
825 case "${LB_FIRST_BOOTLOADER}" in
865826 grub)
866827 Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-build. Please use either another bootloader or a different image type."
867828 exit 1
6060 fi
6161 }
6262
63 Calculate_partition_size ()
63 # adapted from lib/ext2fs/mkjournal.c, default block size is 4096 bytes (/etc/mke2fs.conf).
64 ext2fs_default_journal_size()
6465 {
65 ORIGINAL_SIZE="${1}"
66 FILESYSTEM="${2}"
66 SIZE="$1"
67 if [ "${SIZE}" -lt "8" ]; then # 2048*4096
68 echo 0
69 elif [ "${SIZE}" -lt "128" ]; then # 32768*4096
70 echo 4
71 elif [ "${SIZE}" -lt "1024" ]; then # 256*1024*4096
72 echo 16
73 elif [ "${SIZE}" -lt "2048" ]; then # 512*1024*4096
74 echo 32
75 elif [ "${SIZE}" -lt "4096" ]; then # 1024*1024*4096
76 echo 64
77 else
78 echo 128
79 fi
80 }
6781
68 case "${FILESYSTEM}" in
82 Calculate_partition_size_without_journal ()
83 {
84 WITHOUT_JOURNAL_ORIGINAL_SIZE="${1}"
85 WITHOUT_JOURNAL_FILESYSTEM="${2}"
86
87 case "${WITHOUT_JOURNAL_FILESYSTEM}" in
6988 ext2|ext3|ext4)
7089 PERCENT="6"
7190 ;;
7493 ;;
7594 esac
7695
77 echo $(expr ${ORIGINAL_SIZE} + ${ORIGINAL_SIZE} \* ${PERCENT} / 100 + 1)
96 echo $(expr ${WITHOUT_JOURNAL_ORIGINAL_SIZE} + ${WITHOUT_JOURNAL_ORIGINAL_SIZE} \* ${PERCENT} / 100 + 1)
7897 }
98
99 Calculate_partition_size ()
100 {
101 ORIGINAL_SIZE="${1}"
102 FILESYSTEM="${2}"
103
104 case "${FILESYSTEM}" in
105 ext3|ext4)
106 NON_JOURNAL_SIZE=$(Calculate_partition_size_without_journal ${ORIGINAL_SIZE} ${FILESYSTEM})
107 PROJECTED_JOURNAL_SIZE=$(ext2fs_default_journal_size ${NON_JOURNAL_SIZE})
108 PROJECTED_PARTITION_SIZE=$(expr ${ORIGINAL_SIZE} + ${PROJECTED_JOURNAL_SIZE})
109 PRE_FINAL_PARTITION_SIZE=$(Calculate_partition_size_without_journal ${PROJECTED_PARTITION_SIZE} ${FILESYSTEM})
110 JOURNAL_SIZE=$(ext2fs_default_journal_size ${PRE_FINAL_PARTITION_SIZE})
111
112 expr $(Calculate_partition_size_without_journal ${ORIGINAL_SIZE} ${FILESYSTEM}) + ${JOURNAL_SIZE}
113 ;;
114 *)
115 Calculate_partition_size_without_journal ${ORIGINAL_SIZE} ${FILESYSTEM}
116 ;;
117 esac
118 }
8888 _LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)"
8989 _LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")"
9090
91 _LB_ENABLED=0
91 _LB_ENABLED=1
9292 for _LB_NEEDLE_PART in ${_LB_NEEDLE}
9393 do
9494 for _LB_HAYSTACK_PART in ${_LB_HAYSTACK}
9595 do
96 if [ "${_LB_NEEDLE_PART}" != "${_LB_HAYSTACK_PART}" ]
96 if [ "${_LB_NEEDLE_PART}" = "${_LB_HAYSTACK_PART}" ]
9797 then
98 _LB_ENABLED=1
98 _LB_ENABLED=0
9999 fi
100100 done
101101 done
8181 else
8282 if which dpkg-query > /dev/null 2>&1
8383 then
84 if Chroot chroot "dpkg-query -s ${PACKAGE}" 2> /dev/null | grep -qs "Status: install"
84 if dpkg-query -s "${PACKAGE}" 2> /dev/null | grep -qs "Status: install"
8585 then
8686 INSTALL_STATUS=0
8787 else
00 .TH LIVE\-BUILD 1 2015\-10\-21 5.0~a11-1 "Live Systems Project"
11
22 .SH NAME
3 \fBlb binary\fR \- Complete the binary stage
3 \fBlb_binary\fR \- Complete the binary stage
44
55 .SH SYNOPSIS
66 \fBlb binary\fR [\fIlive\-build options\fR]
00 .TH LIVE\-BUILD 1 2015\-10\-21 5.0~a11-1 "Live Systems Project"
11
22 .SH NAME
3 \fBlb bootstrap\fR \- Complete the bootstrap stage
3 \fBlb_bootstrap\fR \- Complete the bootstrap stage
44
55 .SH SYNOPSIS
66 \fBlb bootstrap\fR [\fIlive\-build options\fR]
00 .TH LIVE\-BUILD 1 2015\-10\-21 5.0~a11-1 "Live Systems Project"
11
22 .SH NAME
3 \fBlb build\fR \- Complete the bootstrap, chroot, binary, and source stages
3 \fBlb_build\fR \- Complete the bootstrap, chroot, binary, and source stages
44
55 .SH SYNOPSIS
66 \fBlb build\fR [\fIlive\-build options\fR]
00 .TH LIVE\-BUILD 1 2015\-10\-21 5.0~a11-1 "Live Systems Project"
11
22 .SH NAME
3 \fBlb chroot\fR \- Complete the chroot stage
3 \fBlb_chroot\fR \- Complete the chroot stage
44
55 .SH SYNOPSIS
66 \fBlb chroot\fR [\fIlive\-build options\fR]
00 .TH LIVE\-BUILD 1 2015\-10\-21 5.0~a11-1 "Live Systems Project"
11
22 .SH NAME
3 \fBlb clean\fR \- Clean build directory
3 \fBlb_clean\fR \- Clean build directory
44
55 .SH SYNOPSIS
66 \fBlb clean\fR [\fIlive\-build options\fR]
00 .TH LIVE\-BUILD 1 2015\-10\-21 5.0~a11-1 "Live Systems Project"
11
22 .SH NAME
3 \fBlb config\fR \- Create config directory
3 \fBlb_config\fR \- Create config directory
44
55 .SH SYNOPSIS
66 \fBlb config\fR [\fIlive\-build options\fR]
3838 .br
3939 [\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|\fI"PARAMETERS"\fR]
4040 .br
41 [\fB\-\-bootloader\fR grub|grub2|syslinux]
41 [\fB\-\-bootappend\-live\-failsafe\fR \fIPARAMETER\fR|\fI"PARAMETERS"\fR]
42 .br
43 [\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi]
4244 .br
4345 [\fB\-\-cache\fR true|false]
4446 .br
7375 [\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR]
7476 .br
7577 [\fB\-\-debian\-installer\-gui\fR true|false]
78 .br
79 [\fB\-\-debootstrap\-options\fR \fIOPTIONS\fR]
80 .br
81 [\fB\-\-debootstrap\-script\fR \fISCRIPT\fR]
7682 .br
7783 [\fB\-\-debug\fR]
7884 .br
257263 .IP "\-b|\fB\-\-binary\-images\fR iso|iso\-hybrid|netboot|tar|hdd" 4
258264 defines the image type to build. By default, for images using syslinux this is set to iso\-hybrid to build CD/DVD images that may also be used like hdd images, for non\-syslinux images, it defaults to iso.
259265 .IP "\fB\-\-binary\-filesystem\fR fat16|fat32|ext2|ext3|ext4" 4
260 defines the filesystem to be used in the image type. This only has an effect if the selected binary image type does allow to choose a filesystem. For example, when selection iso the resulting CD/DVD has always the filesystem ISO9660. When building hdd images for usb sticks, this is active. Note that it defaults to fat16 on all architectures except sparc where it defaults to ext4. Also note that if you choose fat16 and your resulting binary image gets bigger than 2GB, the binary filesystem automatically gets switched to fat32.
266 defines the filesystem to be used in the image type. This only has an effect if the selected binary image type lets you choose a filesystem. For example, when selection iso the resulting CD/DVD has always the filesystem ISO9660. When building hdd images for usb sticks, this is active. Note that it defaults to fat16 on all architectures except sparc where it defaults to ext4. Also note that if you choose fat16 and your resulting binary image gets bigger than 2GB, the binary filesystem automatically gets switched to fat32.
261267 .IP "\fB\-\-bootappend\-install\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
262268 sets boot parameters specific to debian\-installer, if included.
263269 .IP "\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
264270 sets boot parameters specific to debian\-live. A complete list of boot parameters can be found in the \fIlive\-boot\fR(7) and \fIlive\-config\fR(7) manual pages.
265 .IP "\fB\-\-bootloader\fR grub|grub2|syslinux" 4
266 defines which bootloader is being used in the generated image. This has only an effect if the selected binary image type does allow to choose the bootloader. For example, if you build a iso, always syslinux (or more precise, isolinux) is being used. Also note that some combinations of binary images types and bootloaders may be possible but live\-build does not support them yet. \fBlb config\fR will fail to create such a not yet supported configuration and give a explanation about it. For hdd images on amd64 and i386, the default is syslinux.
271 .IP "\fB\-\-bootappend\-live\-failsafe\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
272 sets boot parameters specific to debian\-live failsafe boot entries. A complete list of boot parameters can be found in the \fIlive\-boot\fR(7) and \fIlive\-config\fR(7) manual pages.
273 .IP "\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi" 4
274 defines which bootloader is being used in the generated image. This has only an effect if the selected binary image type lets you choose the bootloader. For example, if you build a iso, always syslinux (or more precise, isolinux) is being used. Also note that some combinations of binary images types and bootloaders may be possible but live\-build does not support them yet. \fBlb config\fR will fail to create such a not yet supported configuration and give a explanation about it. For hdd images on amd64 and i386, the default is syslinux.
267275 .IP "\fB\-\-cache\fR true|false" 4
268276 defines globally if any cache should be used at all. Different caches can be controlled through the their own options.
269277 .IP "\fB\-\-cache\-indices\fR true|false" 4
270 defines if downloaded package indices and lists should be cached which is false by default. Enabling it would allow to rebuild an image completely offline, however, you would not get updates anymore then.
278 defines if downloaded package indices and lists should be cached which is false by default. Enabling it lets you rebuild an image completely offline, however, you would not get updates anymore then.
271279 .IP "\fB\-\-cache\-packages\fR true|false" 4
272280 defines if downloaded packages files should be cached which is true by default. Disabling it does save space consumption in your build directory, but remember that you will cause much unnecessary traffic if you do a couple of rebuilds. In general you should always leave it true, however, in some particular rare build setups, it can be faster to refetch packages from the local network mirror rather than to utilize the local disk.
273281 .IP "\fB\-\-cache\-stages\fR true|false|\fISTAGE\fR|""\fISTAGES\fR""" 4
277285 .IP "\fB\-\-compression\fR bzip2|gzip|lzip|none" 4
278286 defines the compression program to be used to compress tarballs. Defaults to gzip.
279287 .IP "\fB\-\-config\fR \fIGIT_URL\fR::\fIGIT_ID\fR" 4
280 allows to bootstrap a config tree from a git repositories, optionally appended by a Git Id (branch, commit, tag, etc.).
288 bootstrap the config tree from a git repository, optionally appended by a Git Id (branch, commit, tag, etc.).
281289 .IP "\fB\-\-build\-with\-chroot\fR true|false" 4
282290 defines whether live\-build should use the tools from within the chroot to build the binary image or not by using and including the host system's tools. This is a very dangerous option, using the tools of the host system can lead to tainted and even non-bootable images if the host systems version of the required tools (mainly these are the bootloaders such as syslinux and grub, and the auxiliary tools such as dosfstools, xorriso, squashfs-tools and others) do not \fBexactly\fR match what is present at build-time in the target distribution. Never do disable this option unless you are \fBexactly\fR sure what you are doing and have \fBcompletely\fI understood its consequences.
283291 .IP "\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none" 4
298306 sets the filename or URL for an optionally used and included preseeding file for debian\-installer. If config/binary_debian\-installer/preseed.cfg exists, it will be used by default.
299307 .IP "\fB\-\-debian\-installer\-gui\fR true|false" 4
300308 defines if the debian\-installer graphical GTK interface should be true or not. In Debian mode and for most versions of Ubuntu, this option is true, whereas otherwise false, by default.
309 .IP "\fB\-\-debootstrap\-options\fR \fIOPTIONS\fR" 4
310 passes the given options to debootstrap when setting up the base system.
311 .IP "\fB\-\-debootstrap\-script\fR \fISCRIPT\fR" 4
312 tells debootstrap to use an alternate bootstrap script (last parameter to debootstrap).
301313 .IP "\fB\-\-debug\fR" 4
302314 turn on debugging informational messages.
303315 .IP "\-d|\fB\-\-distribution\fR \fICODENAME\fR" 4
307319 .IP "\-d|\fB\-\-parent\-debian\-installer\-distribution\fR \fICODENAME\fR" 4
308320 defines the parent debian\-installer distribution for derivatives of the resulting live system.
309321 .IP "\fB\-\-dump\fR" 4
310 prepares a report of the currently present live system configuration and the version of live\-build used. This is useful to provide if you submit bug reports, we do get all informations required for us to locate and replicate an error.
322 prepares a report of the currently present live system configuration and the version of live\-build used. This is useful to provide if you submit bug reports, we do get all information required for us to locate and replicate an error.
311323 .IP "\fB\-\-fdisk\fR fdisk|fdisk.dist" 4
312324 sets the filename of the fdisk binary from the host system that should be used. This is autodetected and does generally not need any customization.
313325 .IP "\fB\-\-force\fR" 4
0 .TH LIVE\-BUILD 1 2015\-01\-04 5.0~a1-1 "Live Systems Project"
1
2 .SH NAME
3 \fBlb_installer\fR \- Complete the installer stage
4
5 .SH SYNOPSIS
6 \fBlb installer\fR [\fIlive\-build options\fR]
7
8 .SH DESCRIPTION
9 \fBlb installer\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
10 .PP
11 \fBlb installer\fR calls all necessary live\-build programs in the correct order to complete the installer stage.
12
13 .SH OPTIONS
14 \fBlb installer\fR has no specific options but understands all generic live\-build options. See \fIlive\-build\fR(7) for a complete list of all generic live\-build options.
15
16 .SH FILES
17 .IP "\fBnone\fR" 4
18
19 .SH SEE ALSO
20 \fIlive\-build\fR(7)
21 .PP
22 This program is a part of live\-build.
23
24 .SH HOMEPAGE
25 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
26
27 .SH BUGS
28 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
29
30 .SH AUTHOR
31 live\-build was written by Daniel Baumann <\[email protected]\fR>.
00 .TH LIVE\-BUILD 1 2015\-10\-21 5.0~a11-1 "Live Systems Project"
11
22 .SH NAME
3 \fBlb source\fR \- Complete the source stage
3 \fBlb_source\fR \- Complete the source stage
44
55 .SH SYNOPSIS
66 \fBlb source\fR [\fIlive\-build options\fR]
5454 .\" FIXME
5555 We separate the porcelain commands into the main commands and some ancillary user utilities.
5656 .SS Main porcelain commands
57 .IP "\fBlb_config\fR(1)" 4
58 create configuration for live\-build
59 .IP "\fBlb_bootstrap\fR(1)" 4
60 create the first stage by bootstrapping a basic debian system
61 .IP "\fBlb_chroot\fR(1)" 4
62 create the second stage by customizing the chroot
63 .IP "\fBlb_binary\fR(1)" 4
64 create the third stage by generating a binary image
65 .IP "\fBlb_source\fR(1)" 4
66 create the optional fourth stage by generating a source image
67 .IP "\fBlb_clean\fR(1)" 4
68 clean up system build directories
57 .IP "\fBlb config\fR(1)" 4
58 creates configuration for live\-build
59 .IP "\fBlb bootstrap\fR(1)" 4
60 executes the first build stage, creating (bootstraping) a basic Debian root filesystem
61 .IP "\fBlb chroot\fR(1)" 4
62 executes the second build stage, building the live OS filesystem
63 .IP "\fBlb installer\fR(1)" 4
64 executes the third build stage, obtaining installer components (optional)
65 .IP "\fBlb binary\fR(1)" 4
66 executes the fourth build stage, generating a binary image
67 .IP "\fBlb source\fR(1)" 4
68 executes the fifth build stage, generating a source image (optional)
69 .IP "\fBlb clean\fR(1)" 4
70 cleans up system build directories
6971 .SS Ancillary Commands
7072 .IP "\fBlb\fR(1)" 4
71 generic live\-build wrapper
72 .IP "\fBlb_build\fR(1)" 4
73 alias for all stages
74 .IP "\fBlb_local\fR(1)" 4
75 helper for using a local live\-build
76 .IP "\fBlb_testroot\fR(1)" 4
77 ensure that a system is built as root
78 .\" FIXME
79
80 .SH LOW\-LEVEL COMMANDS (PLUMBING)
73 generic live\-build script execution wrapper
74 .IP "\fBlb build\fR(1)" 4
75 alias for all build stages
76 .\" FIXME
77
78 .SH LOW\-LEVEL COMMANDS (PLUMBING) - BUILD STAGE COMPONENTS
8179 .\" FIXME
8280 The actual work of live\-build is implemented in the low-level commands, called plumbing. They are not supposed to be used by end users, they should stick with porcelains as they ensure that all the different plumbing commands are executed in the right order. However, if you intend to reuse live\-build commands in your own scripts, then the plumbings might be of interest for you.
8381 .PP
8482 Note that the interface (set of options and the semantics) to these low\-level commands are meant to be a lot more stable than Porcelain level commands. The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience.
85 .SS Bootstrap commands
86 .IP "\fBlb_bootstrap_cache\fR(1)" 4
87 cache bootstrap stage
88 .IP "\fBlb_bootstrap_debootstrap\fR(1)" 4
89 bootstrap a Debian system with debootstrap(8)
90 .SS Chroot commands
91 .IP "\fBlb_chroot_apt\fR(1)" 4
92 manage /etc/apt/apt.conf
93 .IP "\fBlb_chroot_cache\fR(1)" 4
94 cache chroot stage
95 .IP "\fBlb_chroot_debianchroot\fR(1)" 4
96 manage /etc/debian_chroot
97 .IP "\fBlb_chroot_devpts\fR(1)" 4
98 mount /dev/pts
99 .IP "\fBlb_chroot_dpkg\fR(1)" 4
100 manage /sbin/dpkg
101 .IP "\fBlb_chroot_hacks\fR(1)" 4
102 execute hacks in chroot
103 .IP "\fBlb_chroot_hostname\fR(1)" 4
104 manage /bin/hostname
105 .IP "\fBlb_chroot_hosts\fR(1)" 4
106 manage /etc/hosts
107 .IP "\fBlb_chroot_install\-packages\fR(1)" 4
108 install queued packages into chroot
109 .IP "\fBlb_chroot_interactive\fR(1)" 4
110 make build interactive
111 .IP "\fBlb_chroot_linux\-image\fR(1)" 4
112 manage /etc/kernel\-img.conf
113 .IP "\fBlb_chroot_hooks\fR(1)" 4
114 execute local hooks in chroot
115 .IP "\fBlb_chroot_local\-includes\fR(1)" 4
116 copy local files into chroot
117 .IP "\fBlb_chroot_packages\fR(1)" 4
118 queue install of packages into chroot
119 .IP "\fBlb_chroot_local\-patches\fR(1)" 4
120 apply local patches against chroot
121 .IP "\fBlb_chroot_local\-preseed\fR(1)" 4
122 use debconf local preseeding file
123 .IP "\fBlb_chroot_packagelists\fR(1)" 4
124 queue install of package lists into chroot
125 .IP "\fBlb_chroot_proc\fR(1)" 4
126 mount /proc
127 .IP "\fBlb_chroot_resolv\fR(1)" 4
128 manage /etc/resolv.conf
129 .IP "\fBlb_chroot_selinuxfs\fR(1)" 4
130 mount /selinux
131 .IP "\fBlb_chroot_archives\fR(1)" 4
132 manage /etc/apt/sources.list
133 .IP "\fBlb_chroot_sysfs\fR(1)" 4
134 mount /sys
135 .IP "\fBlb_chroot_sysv\-rc\fR(1)" 4
136 manage /usr/sbin/policy\-rc.d
137 .IP "\fBlb_chroot_task\-lists\fR(1)" 4
138 install task lists into chroot
139 .SS Binary commands
140 .IP "\fBlb_binary_chroot\fR(1)" 4
141 copy chroot into chroot
142 .IP "\fBlb_binary_debian\-installer\fR(1)" 4
143 install debian\-installer into binary
144 .IP "\fBlb_binary_disk\fR(1)" 4
145 install disk information into binary
146 .IP "\fBlb_binary_grub\fR(1)" 4
147 installs grub into binary
148 .IP "\fBlb_binary_grub2\fR(1)" 4
149 installs grub2 into binary
150 .IP "\fBlb_binary_includes\fR(1)" 4
151 copy files into binary
152 .IP "\fBlb_binary_iso\fR(1)" 4
153 build iso binary image
154 .IP "\fBlb_binary_linux\-image\fR(1)" 4
155 install linux\-image into binary
156 .IP "\fBlb_binary_local\-hooks\fR(1)" 4
157 execute local hooks in binary
158 .IP "\fBlb_binary_local\-includes\fR(1)" 4
159 copy files into binary
160 .IP "\fBlb_binary_local\-packagelists\fR(1)" 4
161 install local package lists into binary
162 .IP "\fBlb_binary_manifest\fR(1)" 4
163 create manifest
164 .IP "\fBlb_binary_checksums\fR(1)" 4
165 create binary checksums (md5, sha1, and/or sha256)
166 .IP "\fBlb_binary_memtest\fR(1)" 4
167 installs a memtest into binary
168 .IP "\fBlb_binary_net\fR(1)" 4
169 build netboot binary image
170 .IP "\fBlb_binary_rootfs\fR(1)" 4
171 build rootfs image
172 .IP "\fBlb_binary_syslinux\fR(1)" 4
173 installs syslinux into binary
174 .IP "\fBlb_binary_tar\fR(1)" 4
175 build harddisk binary image
176 .IP "\fBlb_binary_hdd\fR(1)" 4
177 build binary hdd image
178 .IP "\fBlb_binary_win32\-loader\fR(1)" 4
179 installs win32\-loader into binary
180 .SS Source commands
181 .IP "\fBlb_source_debian\fR(1)" 4
182 download sources
183 .IP "\fBlb_source_debian\-live\fR(1)" 4
184 copy debian\-live config into source
185 .IP "\fBlb_source_disk\fR(1)" 4
186 install disk information into source
187 .IP "\fBlb_source_iso\fR(1)" 4
188 build iso source image
189 .IP "\fBlb_source_checksums\fR(1)" 4
190 create source checksums (md5, sha1, and/or sha256)
191 .IP "\fBlb_source_net\fR(1)" 4
192 build source net image
193 .IP "\fBlb_source_tar\fR(1)" 4
194 build source tarball
195 .IP "\fBlb_source_hdd\fR(1)" 4
196 build source hdd image
83 .SS Bootstrap stage specific commands
84 .IP "\fBlb bootstrap_archives\fR(1)" 4
85 applies apt archive configuration
86 .IP "\fBlb bootstrap_cache\fR(1)" 4
87 in save mode, saves to cache a copy of the generated bootstrap directory, and in restore mode, restores from cache a previously generated copy
88 .IP "\fBlb bootstrap_debootstrap\fR(1)" 4
89 creates (bootstrap) a basic Debian root filesystem using debootstrap(8)
90 .SS Chroot stage specific commands
91 .PP
92 Note: The following chroot_ prefixed commands are used in building the live OS filesystem. Another set of similarly prefixed files are listed separately (see further down).
93 .IP "\fBlb chroot_cache\fR(1)" 4
94 in save mode, saves to cache a copy of the chroot directory, and in restore mode, restores from cache a previously generated copy
95 .IP "\fBlb chroot_firmware\fR(1)" 4
96 compiles a list of firmware packages to be installed in the live OS root filesystem
97 .IP "\fBlb chroot_hacks\fR(1)" 4
98 executes local hacks against the live OS root filesystem, if any are provided
99 .IP "\fBlb chroot_hooks\fR(1)" 4
100 executes local hooks against the live OS root filesystem, if any are provided
101 .IP "\fBlb chroot_includes\fR(1)" 4
102 copies a set of local files from the config directory into the live OS root filesystem, if any are provided
103 .IP "\fBlb chroot_install\-packages\fR(1)" 4
104 installs into the live OS root filesystem any packages listed in local package lists
105 .IP "\fBlb chroot_interactive\fR(1)" 4
106 pauses the build process and starts an interactive shell from the live OS root filesystem, providing an oportunity for manual modifications or testing; note that this is (currently) usually executed with several chroot prep modifications applied (see description of these further down)
107 .IP "\fBlb chroot_linux\-image\fR(1)" 4
108 compiles a list of kernel images to be installed in the live OS root filesystem
109 .IP "\fBlb chroot_live\-packages\fR(1)" 4
110 installs a set of live system specific packages to the live OS root filesystem
111 .IP "\fBlb chroot_package\-lists\fR(1)" 4
112 compiles a list of packages provided in the user\' local config to be installed in the live OS root filesystem
113 .IP "\fBlb chroot_preseed\fR(1)" 4
114 installs pre-configured answers to certain install prompts into the live OS root filesystem
115 .SS Installer stage specific commands
116 .IP "\fBlb installer_debian\-installer\fR(1)" 4
117 obtains and sets up Debian installer(d-i) components
118 .IP "\fBlb installer_preseed\fR(1)" 4
119 installs pre-configured answers to certain install prompts
120 .SS Binary stage specific commands
121 .IP "\fBlb binary_checksums\fR(1)" 4
122 creates checksums (md5, sha1, and/or sha256) for live image content
123 .IP "\fBlb binary_chroot\fR(1)" 4
124 duplicates the chroot directory, to place a copy of what whould be the completed live OS root filesystem to one side, allowing the original to continue to be used in executing certain parts of the remainder of the build process
125 .IP "\fBlb binary_disk\fR(1)" 4
126 creates disk information files to be added to live image
127 .IP "\fBlb binary_grub\fR(1)" 4
128 installs grub into live image to provide image boot capability
129 .IP "\fBlb binary_grub2\fR(1)" 4
130 installs grub2 into live image to provide image boot capability
131 .IP "\fBlb binary_hdd\fR(1)" 4
132 compiles the final live image into an hdd image file
133 .IP "\fBlb binary_hooks\fR(1)" 4
134 executes local hooks against the live image, if any are provided
135 .IP "\fBlb binary_includes\fR(1)" 4
136 copies a set of local files from the config directory into the live image, if any are provided
137 .IP "\fBlb binary_iso\fR(1)" 4
138 compiles the final live image into an iso file
139 .IP "\fBlb binary_linux\-image\fR(1)" 4
140 copies the linux\-image into the live image
141 .IP "\fBlb binary_loadlin\fR(1)" 4
142 bundles a copy of loadlin into the live image
143 .IP "\fBlb binary_manifest\fR(1)" 4
144 creates manifest of packages installed into live OS filesystem, and list of packages to be excluded by a persistence mechanism installing the live OS to disk
145 .IP "\fBlb binary_memtest\fR(1)" 4
146 bundles a copy of memtest into the live image
147 .IP "\fBlb binary_netboot\fR(1)" 4
148 compiles the final live image into a netboot tar archive
149 .IP "\fBlb binary_package\-lists\fR(1)" 4
150 processes local lists of packages to obtain and bundle into image (from which they could later be installed if not already)
151 .IP "\fBlb binary_rootfs\fR(1)" 4
152 wraps up the completed live OS root filesystem into a virtual file system image
153 .IP "\fBlb binary_syslinux\fR(1)" 4
154 installs syslinux into live image to provide image boot capability
155 .IP "\fBlb binary_tar\fR(1)" 4
156 compiles the final live image into a tar archive
157 .IP "\fBlb binary_win32\-loader\fR(1)" 4
158 bundles a copy of win32\-loader into the live image and creates an autorun.inf file
159 .IP "\fBlb binary_zsync\fR(1)" 4
160 builds zsync control files
161 .SS Source stage specific commands
162 .IP "\fBlb source_checksums\fR(1)" 4
163 creates checksums (md5, sha1, and/or sha256) for source image content
164 .IP "\fBlb source_debian\fR(1)" 4
165 downloads source packages for bundling into source image
166 .IP "\fBlb source_disk\fR(1)" 4
167 creates disk information files to be added to source image
168 .IP "\fBlb source_hdd\fR(1)" 4
169 compiles the final source image into an hdd image file
170 .IP "\fBlb source_hooks\fR(1)" 4
171 executes local hooks against the source image, if any are provided
172 .IP "\fBlb source_iso\fR(1)" 4
173 compiles the final source image into an iso file
174 .IP "\fBlb source_live\fR(1)" 4
175 copies live-build config into source
176 .IP "\fBlb source_tar\fR(1)" 4
177 compiles the final source image into a tar archive
178 .\" FIXME
179
180 .SH LOW\-LEVEL COMMANDS (PLUMBING) - CHROOT PREP COMPONENTS
181 .\" FIXME
182 The notes above under the section regarding build-stage specific low-level plumbing commands also apply here.
183 .PP
184 The following chroot_ prefixed commands are used throughout the various primary stages of the build process to apply and remove modifications to a chroot root filesystem. Generally these are used to apply modification that setup the chroot for use (execution of programs within it) during the build process, and later to remove those modification, unmounting things that were mounted, and making the chroot suitable for use as the root filesystem of the live OS to be bundled into the live image.
185 .IP "\fBlb chroot_apt\fR(1)" 4
186 manages apt configuration; in apply mode it applies configuration for use during build process, and in remove mode removes that configuration
187 .IP "\fBlb chroot_archives\fR(1)" 4
188 manages apt archive source lists; in apply mode it applies source list configurations suitable for use of the chroot in the build process, and in remove mode replaces that with a configuration suitable for the final live OS
189 .IP "\fBlb chroot_debianchroot\fR(1)" 4
190 manages a /etc/debian_chroot file
191 .IP "\fBlb chroot_devpts\fR(1)" 4
192 manages mounting of /dev/pts
193 .IP "\fBlb chroot_dpkg\fR(1)" 4
194 manages dpkg; in apply mode disabling things like the start-stop-daemon, and in remove mode enabling them again
195 .IP "\fBlb chroot_hostname\fR(1)" 4
196 manages the hostname configuration
197 .IP "\fBlb chroot_hosts\fR(1)" 4
198 manages the /etc/hosts file
199 .IP "\fBlb chroot_proc\fR(1)" 4
200 manages mounting of /proc
201 .IP "\fBlb chroot_resolv\fR(1)" 4
202 manages configuration of the /etc/resolv.conf file
203 .IP "\fBlb chroot_selinuxfs\fR(1)" 4
204 manages mounting of /sys/fs/selinux
205 .IP "\fBlb chroot_sysfs\fR(1)" 4
206 manages mounting of /sys
207 .IP "\fBlb chroot_sysv\-rc\fR(1)" 4
208 manages the /usr/sbin/policy\-rc.d file
209 .IP "\fBlb chroot_tmpfs\fR(1)" 4
210 manages configuration of dpkg to use a tmpfs filesystem
211 .IP "\fBlb chroot_upstart\fR(1)" 4
212 manages use of upstart /sbin/initctl program; in apply mode blocking execution through a dpkg diversion, and in remove mode enabling execution again
197213 .\" FIXME
198214
199215 .SH CONFIG FILES
200216 .\" FIXME
201217 Many live\-build commands make use of files in the \fIconfig/\fR directory to control what they do. Besides the common \fIconfig/common\fR, which is used by all live\-build commands, some additional files can be used to configure the behavior of specific live\-build commands. These files are typically named config/stage or config/stage_helper (where "stage" of course, is replaced with the name of the stage that they belong to, and "helper" with the name of the helper).
202218 .PP
203 For example, lb_bootstrap_debootstrap uses files named config/bootstrap and config/bootstrap_debootstrap to read the options it will use. See the man pages of individual commands for details about the names and formats of the files they use. Generally, these files contain variables with values assigned, one variable per line. Some programs in live\-build use pairs of values or slightly more complicated variable assignments.
219 For example, lb bootstrap_debootstrap uses files named config/bootstrap and config/bootstrap_debootstrap to read the options it will use. See the man pages of individual commands for details about the names and formats of the files they use. Generally, these files contain variables with values assigned, one variable per line. Some programs in live\-build use pairs of values or slightly more complicated variable assignments.
204220 .PP
205221 Note that live\-build will respect environment variables which are present in the context of the shell it is running. If variables can be read from config files, then they override environment variables, and if command line options are used, they override values from config files. If no value for a given variable can be found and thus is unset, live\-build will automatically set it to the default value.
206222 .PP
+0
-223
manpages/po/fr/lb_testroot.1.po less more
0 # French translation of the live-build manpage
1 # Copyright (C) 2015 Olivier Humbert <[email protected]>.
2 # This file is distributed under the same license as the live-images package.
3 #
4 msgid ""
5 msgstr ""
6 "Project-Id-Version: live-build 4.0~alpha39-1\n"
7 "POT-Creation-Date: 2014-08-27 23:56+0200\n"
8 "PO-Revision-Date: 2015-09-20 14:53+0200\n"
9 "Last-Translator: Olivier Humbert <[email protected]>\n"
10 "Language-Team: none\n"
11 "Language: fr\n"
12 "MIME-Version: 1.0\n"
13 "Content-Type: text/plain; charset=UTF-8\n"
14 "Content-Transfer-Encoding: 8bit\n"
15
16 #. type: TH
17 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
18 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
19 #: en/lb_testroot.1:1 en/live-build.7:1
20 #, no-wrap
21 msgid "LIVE-BUILD"
22 msgstr "LIVE-BUILD"
23
24 #. type: TH
25 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
26 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
27 #: en/lb_testroot.1:1 en/live-build.7:1
28 #, no-wrap
29 msgid "2014-08-27"
30 msgstr "2014-08-27"
31
32 #. type: TH
33 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
34 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
35 #: en/lb_testroot.1:1 en/live-build.7:1
36 #, no-wrap
37 msgid "4.0~alpha39-1"
38 msgstr "4.0~alpha39-1"
39
40 #. type: TH
41 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
42 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
43 #: en/lb_testroot.1:1 en/live-build.7:1
44 #, no-wrap
45 msgid "Live Systems Project"
46 msgstr "Projet Systems Live"
47
48 #. type: SH
49 #: en/lb.1:3 en/lb_binary.1:3 en/lb_bootstrap.1:3 en/lb_build.1:3
50 #: en/lb_chroot.1:3 en/lb_clean.1:3 en/lb_config.1:3 en/lb_source.1:3
51 #: en/lb_testroot.1:3 en/live-build.7:3
52 #, no-wrap
53 msgid "NAME"
54 msgstr "NOM"
55
56 #. type: SH
57 #: en/lb.1:6 en/lb_binary.1:6 en/lb_bootstrap.1:6 en/lb_build.1:6
58 #: en/lb_chroot.1:6 en/lb_clean.1:6 en/lb_config.1:6 en/lb_source.1:6
59 #: en/lb_testroot.1:6 en/live-build.7:6
60 #, no-wrap
61 msgid "SYNOPSIS"
62 msgstr "SYNOPSIS"
63
64 #. type: SH
65 #: en/lb.1:11 en/lb_binary.1:9 en/lb_bootstrap.1:9 en/lb_build.1:9
66 #: en/lb_chroot.1:9 en/lb_clean.1:9 en/lb_config.1:225 en/lb_source.1:9
67 #: en/lb_testroot.1:9 en/live-build.7:11
68 #, no-wrap
69 msgid "DESCRIPTION"
70 msgstr "DESCRIPTION"
71
72 #. type: SH
73 #: en/lb.1:16 en/lb_binary.1:14 en/lb_bootstrap.1:14 en/lb_build.1:14
74 #: en/lb_chroot.1:14 en/lb_clean.1:16 en/lb_config.1:234 en/lb_source.1:14
75 #: en/lb_testroot.1:16 en/live-build.7:20
76 #, no-wrap
77 msgid "OPTIONS"
78 msgstr "OPTIONS"
79
80 #. type: SH
81 #: en/lb.1:19 en/lb_binary.1:17 en/lb_bootstrap.1:17 en/lb_build.1:17
82 #: en/lb_chroot.1:17 en/lb_clean.1:38 en/lb_config.1:466 en/lb_source.1:17
83 #: en/lb_testroot.1:19 en/live-build.7:215
84 #, no-wrap
85 msgid "FILES"
86 msgstr "FILES"
87
88 #. type: IP
89 #: en/lb.1:20 en/lb_binary.1:18 en/lb_bootstrap.1:18 en/lb_chroot.1:18
90 #: en/lb_source.1:18 en/lb_testroot.1:20
91 #, no-wrap
92 msgid "B<none>"
93 msgstr "B<aucun>"
94
95 #. type: SH
96 #: en/lb.1:22 en/lb_binary.1:20 en/lb_bootstrap.1:20 en/lb_build.1:22
97 #: en/lb_chroot.1:20 en/lb_clean.1:43 en/lb_config.1:473 en/lb_source.1:20
98 #: en/lb_testroot.1:22 en/live-build.7:219
99 #, no-wrap
100 msgid "SEE ALSO"
101 msgstr "VOIR AUSSI"
102
103 #. type: Plain text
104 #: en/lb.1:24 en/lb_binary.1:22 en/lb_bootstrap.1:22 en/lb_build.1:24
105 #: en/lb_chroot.1:22 en/lb_clean.1:45 en/lb_config.1:475 en/lb_source.1:22
106 #: en/lb_testroot.1:24
107 msgid "I<live-build>(7)"
108 msgstr "I<live-build>(7)"
109
110 #. type: Plain text
111 #: en/lb.1:26 en/lb_binary.1:24 en/lb_bootstrap.1:24 en/lb_build.1:26
112 #: en/lb_chroot.1:24 en/lb_clean.1:47 en/lb_config.1:481 en/lb_source.1:24
113 #: en/lb_testroot.1:26 en/live-build.7:225
114 msgid "This program is a part of live-build."
115 msgstr "Ce programme est une partie de live-build."
116
117 #. type: SH
118 #: en/lb.1:27 en/lb_binary.1:25 en/lb_bootstrap.1:25 en/lb_build.1:27
119 #: en/lb_chroot.1:25 en/lb_clean.1:48 en/lb_config.1:482 en/lb_source.1:25
120 #: en/lb_testroot.1:27 en/live-build.7:226
121 #, no-wrap
122 msgid "HOMEPAGE"
123 msgstr "PAGE D'ACCUEIL"
124
125 #. type: Plain text
126 #: en/lb.1:29 en/lb_binary.1:27 en/lb_bootstrap.1:27 en/lb_build.1:29
127 #: en/lb_chroot.1:27 en/lb_clean.1:50 en/lb_config.1:484 en/lb_source.1:27
128 #: en/lb_testroot.1:29 en/live-build.7:228
129 msgid ""
130 "More information about live-build and the Live Systems project can be found "
131 "on the homepage at E<lt>I<http://live-systems.org/>E<gt> and in the manual "
132 "at E<lt>I<http://live-systems.org/manual/>E<gt>."
133 msgstr ""
134 "Davantage d'informations à propos de live-build et du projet Live Systems "
135 "peuvent être trouvées sur la page d'accueil à E<lt>I<http://live-systems.org/"
136 ">E<gt> et dans le manuel à E<lt>I<http://live-systems.org/manual/>E<gt>."
137
138 #. type: SH
139 #: en/lb.1:30 en/lb_binary.1:28 en/lb_bootstrap.1:28 en/lb_build.1:30
140 #: en/lb_chroot.1:28 en/lb_clean.1:51 en/lb_config.1:485 en/lb_source.1:28
141 #: en/lb_testroot.1:30 en/live-build.7:229
142 #, no-wrap
143 msgid "BUGS"
144 msgstr "BOGUES"
145
146 #. type: Plain text
147 #: en/lb.1:32 en/lb_binary.1:30 en/lb_bootstrap.1:30 en/lb_build.1:32
148 #: en/lb_chroot.1:30 en/lb_clean.1:53 en/lb_config.1:487 en/lb_source.1:30
149 #: en/lb_testroot.1:32 en/live-build.7:231
150 msgid ""
151 "Bugs can be reported by submitting a bugreport for the live-build package in "
152 "the Bug Tracking System at E<lt>I<http://bugs.debian.org/>E<gt> or by "
153 "writing a mail to the Live Systems mailing list at E<lt>I<debian-live@lists."
154 "debian.org>E<gt>."
155 msgstr ""
156 "Les bogues peuvent être signalés en soumettant un rapport de bogue pour le "
157 "paquet live-build dans le BTS à E<lt>I<http://bugs.debian.org/>E<gt> ou par "
158 "l'écriture d'un courriel à la liste de diffusion Live Systems à "
159 "E<lt>I<[email protected]>E<gt>."
160
161 #. type: SH
162 #: en/lb.1:33 en/lb_binary.1:31 en/lb_bootstrap.1:31 en/lb_build.1:33
163 #: en/lb_chroot.1:31 en/lb_clean.1:54 en/lb_config.1:488 en/lb_source.1:31
164 #: en/lb_testroot.1:33 en/live-build.7:232
165 #, no-wrap
166 msgid "AUTHOR"
167 msgstr "AUTEUR"
168
169 #. type: Plain text
170 #: en/lb.1:34 en/lb_binary.1:32 en/lb_bootstrap.1:32 en/lb_build.1:34
171 #: en/lb_chroot.1:32 en/lb_clean.1:55 en/lb_config.1:489 en/lb_source.1:32
172 #: en/lb_testroot.1:34 en/live-build.7:233
173 msgid ""
174 "live-build was written by Daniel Baumann E<lt>I<[email protected]>E<gt>."
175 msgstr ""
176 "live-images a été écrit par Daniel Baumann E<lt>I<mail@daniel-baumann."
177 "ch>E<gt>."
178
179 #. type: Plain text
180 #: en/lb_testroot.1:5
181 msgid "B<lb testroot> - Ensure that a system is built as root"
182 msgstr ""
183 "B<lb testroot> - s'assure que le système est construit en tant que root"
184
185 #. type: Plain text
186 #: en/lb_testroot.1:8
187 msgid "B<lb testroot> [I<live-build options>]"
188 msgstr "B<lb testroot> [I<live-build options>]"
189
190 #. type: Plain text
191 #: en/lb_testroot.1:11
192 msgid ""
193 "B<lb testroot> is a high-level command (porcelain) of I<live-build>(7), the "
194 "live systems tool suite."
195 msgstr ""
196 "B<lb testroot> est une commande de haut-niveau (porcelaine) de I<live-"
197 "build>(7), la suite d'outils de live-systems."
198
199 #. FIXME
200 #. FIXME
201 #. type: Plain text
202 #: en/lb_testroot.1:15
203 msgid ""
204 "B<lb testroot> simply checks to see if you are root. If not, it exits with "
205 "an error. live system images must currently be built as real root (using "
206 "sudo is fine too)."
207 msgstr ""
208 "B<lb testroot> vérifie simplement si vous êtes administrateur (root). Si vous "
209 "ne l'êtes pas, il s'arrête avec une erreur. Les images live system doivent "
210 "actuellement être construites en qu'administrateur réel (utiliser sudo "
211 "fonctionne également)."
212
213 #. type: Plain text
214 #: en/lb_testroot.1:18
215 msgid ""
216 "B<lb testroot> has no specific options but understands all generic live-"
217 "build options. See I<live-build>(7) for a complete list of all generic live-"
218 "build options."
219 msgstr ""
220 "B<lb chroot> n'a pas d'options spécifiques mais fonctionne avec toutes les "
221 "options génériques de live-build. Voir I<live-build>(7) pour une liste "
222 "complète de toutes les options génériques de live-build options."
+0
-221
manpages/po/ja/lb_testroot.1.po less more
0 # Japanese translations for live-build package
1 # Copyright (C) 2014 victory <[email protected]>
2 # This file is distributed under the same license as the live-build package.
3 #
4 msgid ""
5 msgstr ""
6 "Project-Id-Version: live-build\n"
7 "POT-Creation-Date: 2014-08-27 23:56+0200\n"
8 "PO-Revision-Date: 2014-08-28 02:52+0900\n"
9 "Last-Translator: victory <[email protected]>\n"
10 "Language-Team: none\n"
11 "Language: ja\n"
12 "MIME-Version: 1.0\n"
13 "Content-Type: text/plain; charset=UTF-8\n"
14 "Content-Transfer-Encoding: 8bit\n"
15
16 #. type: TH
17 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
18 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
19 #: en/lb_testroot.1:1 en/live-build.7:1
20 #, no-wrap
21 msgid "LIVE-BUILD"
22 msgstr "LIVE-BUILD"
23
24 #. type: TH
25 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
26 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
27 #: en/lb_testroot.1:1 en/live-build.7:1
28 #, no-wrap
29 msgid "2014-09-12"
30 msgstr ""
31
32 #. type: TH
33 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
34 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
35 #: en/lb_testroot.1:1 en/live-build.7:1
36 #, no-wrap
37 msgid "4.0~alpha39-1"
38 msgstr "4.0~alpha39-1"
39
40 #. type: TH
41 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
42 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
43 #: en/lb_testroot.1:1 en/live-build.7:1
44 #, no-wrap
45 msgid "Live Systems Project"
46 msgstr "Live システムプロジェクト"
47
48 #. type: SH
49 #: en/lb.1:3 en/lb_binary.1:3 en/lb_bootstrap.1:3 en/lb_build.1:3
50 #: en/lb_chroot.1:3 en/lb_clean.1:3 en/lb_config.1:3 en/lb_source.1:3
51 #: en/lb_testroot.1:3 en/live-build.7:3
52 #, no-wrap
53 msgid "NAME"
54 msgstr "名前"
55
56 #. type: SH
57 #: en/lb.1:6 en/lb_binary.1:6 en/lb_bootstrap.1:6 en/lb_build.1:6
58 #: en/lb_chroot.1:6 en/lb_clean.1:6 en/lb_config.1:6 en/lb_source.1:6
59 #: en/lb_testroot.1:6 en/live-build.7:6
60 #, no-wrap
61 msgid "SYNOPSIS"
62 msgstr "概要"
63
64 #. type: SH
65 #: en/lb.1:11 en/lb_binary.1:9 en/lb_bootstrap.1:9 en/lb_build.1:9
66 #: en/lb_chroot.1:9 en/lb_clean.1:9 en/lb_config.1:225 en/lb_source.1:9
67 #: en/lb_testroot.1:9 en/live-build.7:11
68 #, no-wrap
69 msgid "DESCRIPTION"
70 msgstr "説明"
71
72 #. type: SH
73 #: en/lb.1:16 en/lb_binary.1:14 en/lb_bootstrap.1:14 en/lb_build.1:14
74 #: en/lb_chroot.1:14 en/lb_clean.1:16 en/lb_config.1:234 en/lb_source.1:14
75 #: en/lb_testroot.1:16 en/live-build.7:20
76 #, no-wrap
77 msgid "OPTIONS"
78 msgstr "オプション"
79
80 #. type: SH
81 #: en/lb.1:19 en/lb_binary.1:17 en/lb_bootstrap.1:17 en/lb_build.1:17
82 #: en/lb_chroot.1:17 en/lb_clean.1:38 en/lb_config.1:466 en/lb_source.1:17
83 #: en/lb_testroot.1:19 en/live-build.7:215
84 #, no-wrap
85 msgid "FILES"
86 msgstr "ファイル"
87
88 #. type: IP
89 #: en/lb.1:20 en/lb_binary.1:18 en/lb_bootstrap.1:18 en/lb_chroot.1:18
90 #: en/lb_source.1:18 en/lb_testroot.1:20
91 #, no-wrap
92 msgid "B<none>"
93 msgstr "B<無し>"
94
95 #. type: SH
96 #: en/lb.1:22 en/lb_binary.1:20 en/lb_bootstrap.1:20 en/lb_build.1:22
97 #: en/lb_chroot.1:20 en/lb_clean.1:43 en/lb_config.1:473 en/lb_source.1:20
98 #: en/lb_testroot.1:22 en/live-build.7:219
99 #, no-wrap
100 msgid "SEE ALSO"
101 msgstr "関連項目"
102
103 #. type: Plain text
104 #: en/lb.1:24 en/lb_binary.1:22 en/lb_bootstrap.1:22 en/lb_build.1:24
105 #: en/lb_chroot.1:22 en/lb_clean.1:45 en/lb_config.1:475 en/lb_source.1:22
106 #: en/lb_testroot.1:24
107 msgid "I<live-build>(7)"
108 msgstr "I<live-build>(7)"
109
110 #. type: Plain text
111 #: en/lb.1:26 en/lb_binary.1:24 en/lb_bootstrap.1:24 en/lb_build.1:26
112 #: en/lb_chroot.1:24 en/lb_clean.1:47 en/lb_config.1:481 en/lb_source.1:24
113 #: en/lb_testroot.1:26 en/live-build.7:225
114 msgid "This program is a part of live-build."
115 msgstr "このプログラムは live-build の一部です。"
116
117 #. type: SH
118 #: en/lb.1:27 en/lb_binary.1:25 en/lb_bootstrap.1:25 en/lb_build.1:27
119 #: en/lb_chroot.1:25 en/lb_clean.1:48 en/lb_config.1:482 en/lb_source.1:25
120 #: en/lb_testroot.1:27 en/live-build.7:226
121 #, no-wrap
122 msgid "HOMEPAGE"
123 msgstr "ホームページ"
124
125 #. type: Plain text
126 #: en/lb.1:29 en/lb_binary.1:27 en/lb_bootstrap.1:27 en/lb_build.1:29
127 #: en/lb_chroot.1:27 en/lb_clean.1:50 en/lb_config.1:484 en/lb_source.1:27
128 #: en/lb_testroot.1:29 en/live-build.7:228
129 msgid ""
130 "More information about live-build and the Live Systems project can be found "
131 "on the homepage at E<lt>I<http://live-systems.org/>E<gt> and in the manual "
132 "at E<lt>I<http://live-systems.org/manual/>E<gt>."
133 msgstr ""
134 "live-build 及び Live システムプロジェクトについてのさらなる情報は、"
135 "E<lt>I<http://live-systems.org/>E<gt> のホームページや E<lt>I<http://live-"
136 "systems.org/manual/>E<gt> のマニュアルにあります。"
137
138 #. type: SH
139 #: en/lb.1:30 en/lb_binary.1:28 en/lb_bootstrap.1:28 en/lb_build.1:30
140 #: en/lb_chroot.1:28 en/lb_clean.1:51 en/lb_config.1:485 en/lb_source.1:28
141 #: en/lb_testroot.1:30 en/live-build.7:229
142 #, no-wrap
143 msgid "BUGS"
144 msgstr "バグ"
145
146 #. type: Plain text
147 #: en/lb.1:32 en/lb_binary.1:30 en/lb_bootstrap.1:30 en/lb_build.1:32
148 #: en/lb_chroot.1:30 en/lb_clean.1:53 en/lb_config.1:487 en/lb_source.1:30
149 #: en/lb_testroot.1:32 en/live-build.7:231
150 msgid ""
151 "Bugs can be reported by submitting a bugreport for the live-build package in "
152 "the Bug Tracking System at E<lt>I<http://bugs.debian.org/>E<gt> or by "
153 "writing a mail to the Live Systems mailing list at E<lt>I<debian-live@lists."
154 "debian.org>E<gt>."
155 msgstr ""
156 "バグは E<lt>I<http://bugs.debian.org/>E<gt> にあるバグ追跡システムに live-"
157 "build パッケージのバグ報告として提出するか、E<lt>I<[email protected]."
158 "org>E<gt> にある Live システムのメーリングリスト宛てにメールを書くことにより"
159 "報告できます。"
160
161 #. type: SH
162 #: en/lb.1:33 en/lb_binary.1:31 en/lb_bootstrap.1:31 en/lb_build.1:33
163 #: en/lb_chroot.1:31 en/lb_clean.1:54 en/lb_config.1:488 en/lb_source.1:31
164 #: en/lb_testroot.1:33 en/live-build.7:232
165 #, no-wrap
166 msgid "AUTHOR"
167 msgstr "作者"
168
169 #. type: Plain text
170 #: en/lb.1:34 en/lb_binary.1:32 en/lb_bootstrap.1:32 en/lb_build.1:34
171 #: en/lb_chroot.1:32 en/lb_clean.1:55 en/lb_config.1:489 en/lb_source.1:32
172 #: en/lb_testroot.1:34 en/live-build.7:233
173 msgid ""
174 "live-build was written by Daniel Baumann E<lt>I<[email protected]>E<gt>."
175 msgstr ""
176 "live-build は Daniel Baumann さん E<lt>I<[email protected]>E<gt> により"
177 "書かれました。"
178
179 #. type: Plain text
180 #: en/lb_testroot.1:5
181 msgid "B<lb testroot> - Ensure that a system is built as root"
182 msgstr "B<lb testroot> - システムが root により構成されていることを確認します"
183
184 #. type: Plain text
185 #: en/lb_testroot.1:8
186 msgid "B<lb testroot> [I<live-build options>]"
187 msgstr "B<lb testroot> [I<live-build オプション>]"
188
189 #. type: Plain text
190 #: en/lb_testroot.1:11
191 msgid ""
192 "B<lb testroot> is a high-level command (porcelain) of I<live-build>(7), the "
193 "live systems tool suite."
194 msgstr ""
195 "B<lb testroot> は Live システムツール集 I<live-build>(7) の高レベルコマンド "
196 "(porcelain) です。"
197
198 #. FIXME
199 #. FIXME
200 #. type: Plain text
201 #: en/lb_testroot.1:15
202 msgid ""
203 "B<lb testroot> simply checks to see if you are root. If not, it exits with "
204 "an error. live system images must currently be built as real root (using "
205 "sudo is fine too)."
206 msgstr ""
207 "B<lb testroot> は単に root で実行しているのか確認します。root でない場合はエ"
208 "ラーを返して終了します。Live システムのイメージは現在実際の root (sudo を使っ"
209 "ても可) でビルドる必要があります。"
210
211 #. type: Plain text
212 #: en/lb_testroot.1:18
213 msgid ""
214 "B<lb testroot> has no specific options but understands all generic live-"
215 "build options. See I<live-build>(7) for a complete list of all generic live-"
216 "build options."
217 msgstr ""
218 "B<lb testroot> には特定のオプションはありませんが、live-build 全般のオプ"
219 "ションを全て理解します。live-build 全般のオプションの全容については I<live-"
220 "build>(7) を見てください。"
+0
-206
manpages/pot/lb_testroot.1.pot less more
0 # SOME DESCRIPTIVE TITLE
1 # Copyright (C) YEAR Free Software Foundation, Inc.
2 # This file is distributed under the same license as the live-build package.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4 #
5 #, fuzzy
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: live-build 4.0~alpha39-1\n"
9 "POT-Creation-Date: 2014-08-27 23:56+0200\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <[email protected]>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=CHARSET\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
20 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
21 #: en/lb_testroot.1:1 en/live-build.7:1
22 #, no-wrap
23 msgid "LIVE-BUILD"
24 msgstr ""
25
26 #. type: TH
27 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
28 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
29 #: en/lb_testroot.1:1 en/live-build.7:1
30 #, no-wrap
31 msgid "2014-08-27"
32 msgstr ""
33
34 #. type: TH
35 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
36 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
37 #: en/lb_testroot.1:1 en/live-build.7:1
38 #, no-wrap
39 msgid "4.0~alpha39-1"
40 msgstr ""
41
42 #. type: TH
43 #: en/lb.1:1 en/lb_binary.1:1 en/lb_bootstrap.1:1 en/lb_build.1:1
44 #: en/lb_chroot.1:1 en/lb_clean.1:1 en/lb_config.1:1 en/lb_source.1:1
45 #: en/lb_testroot.1:1 en/live-build.7:1
46 #, no-wrap
47 msgid "Live Systems Project"
48 msgstr ""
49
50 #. type: SH
51 #: en/lb.1:3 en/lb_binary.1:3 en/lb_bootstrap.1:3 en/lb_build.1:3
52 #: en/lb_chroot.1:3 en/lb_clean.1:3 en/lb_config.1:3 en/lb_source.1:3
53 #: en/lb_testroot.1:3 en/live-build.7:3
54 #, no-wrap
55 msgid "NAME"
56 msgstr ""
57
58 #. type: SH
59 #: en/lb.1:6 en/lb_binary.1:6 en/lb_bootstrap.1:6 en/lb_build.1:6
60 #: en/lb_chroot.1:6 en/lb_clean.1:6 en/lb_config.1:6 en/lb_source.1:6
61 #: en/lb_testroot.1:6 en/live-build.7:6
62 #, no-wrap
63 msgid "SYNOPSIS"
64 msgstr ""
65
66 #. type: SH
67 #: en/lb.1:11 en/lb_binary.1:9 en/lb_bootstrap.1:9 en/lb_build.1:9
68 #: en/lb_chroot.1:9 en/lb_clean.1:9 en/lb_config.1:225 en/lb_source.1:9
69 #: en/lb_testroot.1:9 en/live-build.7:11
70 #, no-wrap
71 msgid "DESCRIPTION"
72 msgstr ""
73
74 #. type: SH
75 #: en/lb.1:16 en/lb_binary.1:14 en/lb_bootstrap.1:14 en/lb_build.1:14
76 #: en/lb_chroot.1:14 en/lb_clean.1:16 en/lb_config.1:234 en/lb_source.1:14
77 #: en/lb_testroot.1:16 en/live-build.7:20
78 #, no-wrap
79 msgid "OPTIONS"
80 msgstr ""
81
82 #. type: SH
83 #: en/lb.1:19 en/lb_binary.1:17 en/lb_bootstrap.1:17 en/lb_build.1:17
84 #: en/lb_chroot.1:17 en/lb_clean.1:38 en/lb_config.1:466 en/lb_source.1:17
85 #: en/lb_testroot.1:19 en/live-build.7:215
86 #, no-wrap
87 msgid "FILES"
88 msgstr ""
89
90 #. type: IP
91 #: en/lb.1:20 en/lb_binary.1:18 en/lb_bootstrap.1:18 en/lb_chroot.1:18
92 #: en/lb_source.1:18 en/lb_testroot.1:20
93 #, no-wrap
94 msgid "B<none>"
95 msgstr ""
96
97 #. type: SH
98 #: en/lb.1:22 en/lb_binary.1:20 en/lb_bootstrap.1:20 en/lb_build.1:22
99 #: en/lb_chroot.1:20 en/lb_clean.1:43 en/lb_config.1:473 en/lb_source.1:20
100 #: en/lb_testroot.1:22 en/live-build.7:219
101 #, no-wrap
102 msgid "SEE ALSO"
103 msgstr ""
104
105 #. type: Plain text
106 #: en/lb.1:24 en/lb_binary.1:22 en/lb_bootstrap.1:22 en/lb_build.1:24
107 #: en/lb_chroot.1:22 en/lb_clean.1:45 en/lb_config.1:475 en/lb_source.1:22
108 #: en/lb_testroot.1:24
109 msgid "I<live-build>(7)"
110 msgstr ""
111
112 #. type: Plain text
113 #: en/lb.1:26 en/lb_binary.1:24 en/lb_bootstrap.1:24 en/lb_build.1:26
114 #: en/lb_chroot.1:24 en/lb_clean.1:47 en/lb_config.1:481 en/lb_source.1:24
115 #: en/lb_testroot.1:26 en/live-build.7:225
116 msgid "This program is a part of live-build."
117 msgstr ""
118
119 #. type: SH
120 #: en/lb.1:27 en/lb_binary.1:25 en/lb_bootstrap.1:25 en/lb_build.1:27
121 #: en/lb_chroot.1:25 en/lb_clean.1:48 en/lb_config.1:482 en/lb_source.1:25
122 #: en/lb_testroot.1:27 en/live-build.7:226
123 #, no-wrap
124 msgid "HOMEPAGE"
125 msgstr ""
126
127 #. type: Plain text
128 #: en/lb.1:29 en/lb_binary.1:27 en/lb_bootstrap.1:27 en/lb_build.1:29
129 #: en/lb_chroot.1:27 en/lb_clean.1:50 en/lb_config.1:484 en/lb_source.1:27
130 #: en/lb_testroot.1:29 en/live-build.7:228
131 msgid ""
132 "More information about live-build and the Live Systems project can be found "
133 "on the homepage at E<lt>I<http://live-systems.org/>E<gt> and in the manual "
134 "at E<lt>I<http://live-systems.org/manual/>E<gt>."
135 msgstr ""
136
137 #. type: SH
138 #: en/lb.1:30 en/lb_binary.1:28 en/lb_bootstrap.1:28 en/lb_build.1:30
139 #: en/lb_chroot.1:28 en/lb_clean.1:51 en/lb_config.1:485 en/lb_source.1:28
140 #: en/lb_testroot.1:30 en/live-build.7:229
141 #, no-wrap
142 msgid "BUGS"
143 msgstr ""
144
145 #. type: Plain text
146 #: en/lb.1:32 en/lb_binary.1:30 en/lb_bootstrap.1:30 en/lb_build.1:32
147 #: en/lb_chroot.1:30 en/lb_clean.1:53 en/lb_config.1:487 en/lb_source.1:30
148 #: en/lb_testroot.1:32 en/live-build.7:231
149 msgid ""
150 "Bugs can be reported by submitting a bugreport for the live-build package in "
151 "the Bug Tracking System at E<lt>I<http://bugs.debian.org/>E<gt> or by "
152 "writing a mail to the Live Systems mailing list at E<lt>I<debian-live@lists."
153 "debian.org>E<gt>."
154 msgstr ""
155
156 #. type: SH
157 #: en/lb.1:33 en/lb_binary.1:31 en/lb_bootstrap.1:31 en/lb_build.1:33
158 #: en/lb_chroot.1:31 en/lb_clean.1:54 en/lb_config.1:488 en/lb_source.1:31
159 #: en/lb_testroot.1:33 en/live-build.7:232
160 #, no-wrap
161 msgid "AUTHOR"
162 msgstr ""
163
164 #. type: Plain text
165 #: en/lb.1:34 en/lb_binary.1:32 en/lb_bootstrap.1:32 en/lb_build.1:34
166 #: en/lb_chroot.1:32 en/lb_clean.1:55 en/lb_config.1:489 en/lb_source.1:32
167 #: en/lb_testroot.1:34 en/live-build.7:233
168 msgid ""
169 "live-build was written by Daniel Baumann E<lt>I<[email protected]>E<gt>."
170 msgstr ""
171
172 #. type: Plain text
173 #: en/lb_testroot.1:5
174 msgid "B<lb testroot> - Ensure that a system is built as root"
175 msgstr ""
176
177 #. type: Plain text
178 #: en/lb_testroot.1:8
179 msgid "B<lb testroot> [I<live-build options>]"
180 msgstr ""
181
182 #. type: Plain text
183 #: en/lb_testroot.1:11
184 msgid ""
185 "B<lb testroot> is a high-level command (porcelain) of I<live-build>(7), the "
186 "live systems tool suite."
187 msgstr ""
188
189 #. FIXME
190 #. FIXME
191 #. type: Plain text
192 #: en/lb_testroot.1:15
193 msgid ""
194 "B<lb testroot> simply checks to see if you are root. If not, it exits with "
195 "an error. live system images must currently be built as real root (using "
196 "sudo is fine too)."
197 msgstr ""
198
199 #. type: Plain text
200 #: en/lb_testroot.1:18
201 msgid ""
202 "B<lb testroot> has no specific options but understands all generic live-"
203 "build options. See I<live-build>(7) for a complete list of all generic live-"
204 "build options."
205 msgstr ""
6868 lb binary_win32-loader ${@}
6969 lb binary_includes ${@}
7070 lb binary_hooks ${@}
71 lb binary_grub-efi ${@}
7172 lb binary_checksums ${@}
7273
7374 if [ "${LB_BUILD_WITH_CHROOT}" != "true" ]
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016 Adrian Gibanel Lopez <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 set -e
11
12 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14
15 # Setting static variables
16 DESCRIPTION="$(Echo 'prepares and installs Grub based EFI support into binary')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
19
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 Check_Any_Bootloader_Role "grub-efi"
27
28 Echo_message "Begin preparing Grub based EFI support..."
29
30 # Requiring stage file
31 Require_stagefile .build/config .build/bootstrap
32
33 # Checking stage file
34 Check_stagefile .build/binary_grub-efi
35
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
41
42 # Check architecture
43 Check_architectures amd64 i386
44 Check_crossarchitectures
45
46 # Checking depends
47 case "${LB_BUILD_WITH_CHROOT}" in
48 true)
49 _CHROOT_DIR=""
50
51 Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin
52 Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin
53 Check_package chroot /usr/bin/grub-mkimage grub-common
54 Check_package chroot /usr/bin/mcopy mtools
55 Check_package chroot /sbin/mkfs.msdos dosfstools
56 ;;
57
58 false)
59 _CHROOT_DIR="chroot"
60
61 if [ ! -e /usr/lib/grub/x86_64-efi ]
62 then
63 # grub-efi-amd64-bin
64 Echo_error "/usr/lib/grub/x86_64-efi - no such directory"
65 exit 1
66 fi
67
68 if [ ! -e /usr/lib/grub/i386-efi ]
69 then
70 # grub-efi-ia32-bin
71 Echo_error "/usr/lib/grub/i386-efi - no such directory"
72 exit 1
73 fi
74
75 if [ ! -e /usr/bin/grub-mkimage ]
76 then
77 # grub-common
78 Echo_error "/usr/bin/grub-mkimage - no such file."
79 exit 1
80 fi
81
82 if [ ! -e /usr/bin/mcopy ]
83 then
84 # mtools
85 Echo_error "/usr/bin/mcopy - no such file."
86 exit 1
87 fi
88
89 if [ ! -e /sbin/mkfs.msdos ]
90 then
91 # dosfstools
92 Echo_error "/sbin/mkfs.msdos - no such file."
93 exit 1
94 fi
95 ;;
96 esac
97
98 # Setting destination directory
99 case "${LIVE_IMAGE_TYPE}" in
100 hdd*|netboot)
101 Echo_warning "Bootloader in this image type not yet supported by live-build."
102 Echo_warning "This would produce a not bootable image, aborting (FIXME)."
103 exit 1
104 ;;
105 esac
106
107 # Restoring cache
108 Restore_cache cache/packages.binary
109
110 # Installing depends
111 Install_package
112
113 # Cleanup files that we generate
114 rm -rf binary/boot/efi.img binary/boot/grub/i386-efi/ binary/boot/grub/x86_64-efi
115
116 # This is workaround till both efi-image and grub-cpmodules are put into a binary package
117 case "${LB_BUILD_WITH_CHROOT}" in
118 true)
119 if [ ! -e "${LIVE_BUILD}" ] ; then
120 LIVE_BUILD_PATH="/usr/lib/live/build"
121 else
122 LIVE_BUILD_PATH="${LIVE_BUILD}/scripts/build"
123 fi
124 mkdir -p chroot/${LIVE_BUILD_PATH}
125 cp "${LIVE_BUILD_PATH}/efi-image" "chroot/${LIVE_BUILD_PATH}"
126 cp "${LIVE_BUILD_PATH}/grub-cpmodules" "chroot/${LIVE_BUILD_PATH}"
127 ;;
128 esac
129 #####
130 cat >binary.sh <<END
131 #!/bin/sh
132
133 set -e
134
135 PRE_EFI_IMAGE_PATH="${PATH}"
136 if [ ! -e "${LIVE_BUILD}" ] ; then
137 LIVE_BUILD_PATH="/usr/lib/live/build"
138 else
139 LIVE_BUILD_PATH="${LIVE_BUILD}/scripts/build"
140 fi
141
142 PATH="${PATH}:\${LIVE_BUILD_PATH}" # Make sure grub-cpmodules is used as if it was installed in the system
143
144 "\${LIVE_BUILD_PATH}/efi-image" "${_CHROOT_DIR}/grub-efi-temp-x86_64-efi/" "x86_64-efi" "x64" "debian-live/amd64"
145 mkdir -p ${_CHROOT_DIR}/grub-efi-temp/efi/boot
146 mcopy -n -i ${_CHROOT_DIR}/grub-efi-temp-x86_64-efi/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/efi/boot
147 cp -r "${_CHROOT_DIR}"/grub-efi-temp-x86_64-efi/* "${_CHROOT_DIR}/grub-efi-temp/"
148
149 "\${LIVE_BUILD_PATH}/efi-image" "${_CHROOT_DIR}/grub-efi-temp-i386-efi/" "i386-efi" "ia32" "debian-live/i386"
150 PATH="\${PRE_EFI_IMAGE_PATH}"
151 mkdir -p ${_CHROOT_DIR}/grub-efi-temp/efi/boot
152 mcopy -n -i ${_CHROOT_DIR}/grub-efi-temp-i386-efi/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/efi/boot
153 cp -r "${_CHROOT_DIR}"/grub-efi-temp-i386-efi/* "${_CHROOT_DIR}/grub-efi-temp/"
154
155 # The code below is adapted from tools/boot/jessie/boot-x86
156 # in debian-cd
157
158 # Stuff the EFI boot files into a FAT filesystem, making it as
159 # small as possible. 24KiB headroom seems to be enough;
160 # (x+31)/32*32 rounds up to multiple of 32.
161 # This is the same as in efi-image, but we need to redo it here in
162 # the case of a multi-arch amd64/i386 image
163
164 size=0
165 for file in ${_CHROOT_DIR}/grub-efi-temp/efi/boot/boot*.efi; do
166 size=\$((\$size + \$(stat -c %s "\$file")))
167 done
168
169 blocks=\$(((\$size / 1024 + 55) / 32 * 32 ))
170
171 rm -f ${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img
172 mkfs.msdos -C "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" \$blocks >/dev/null
173 mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::efi
174 mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::efi/boot
175 mcopy -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp/efi/boot/boot*.efi \
176 "::efi/boot"
177 END
178
179 case "${LB_BUILD_WITH_CHROOT}" in
180 true)
181 mv binary.sh chroot/
182 Chroot chroot "sh binary.sh"
183 rm -f chroot/binary.sh
184
185 # Saving cache
186 Save_cache cache/packages.binary
187
188 # Removing depends
189 Remove_package
190 ;;
191
192 false)
193 sh binary.sh
194 rm -f binary.sh
195 ;;
196 esac
197
198 # Remove unnecessary files
199 rm -f chroot/grub-efi-temp/bootnetia32.efi
200 rm -f chroot/grub-efi-temp/bootnetx64.efi
201
202 mkdir -p binary
203 cp -r chroot/grub-efi-temp/* binary/
204 rm -rf chroot/grub-efi-temp-x86_64-efi
205 rm -rf chroot/grub-efi-temp-i386-efi
206 rm -rf chroot/grub-efi-temp
207
208 # We rely on: binary_loopback_cfg to generate grub.cfg and other configuration files
209
210 # Creating stage file
211 Create_stagefile .build/binary_grub-efi
2323 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
2424 Set_defaults
2525
26 FOUND_MYSELF=""
27 IFS=","
28 for BOOTLOADER in ${LB_BOOTLOADERS}
29 do
30
31 case ${BOOTLOADER} in
32 "grub-legacy" )
33 FOUND_MYSELF="True"
34 break ;;
35 esac
36
37 done
38
39 if [ -z ${FOUND_MYSELF} ] ; then
40 exit 0
41 fi
26 Check_First_Bootloader_Role "grub-legacy"
4227
4328 Echo_message "Begin installing grub-legacy..."
4429
178163 mkdir -p "${DESTDIR_LIVE}"
179164
180165 # Setting boot parameters
181 if [ "${LB_UNION_FILESYSTEM}" != "aufs" ]
166 if [ "${LB_UNION_FILESYSTEM}" != "overlay" ]
182167 then
183168 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
184169 fi
2323 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
2424 Set_defaults
2525
26 FOUND_MYSELF=""
27 OLDIFS="$IFS"
28 IFS=","
29 for BOOTLOADER in ${LB_BOOTLOADERS}
30 do
31
32 case ${BOOTLOADER} in
33 "grub-pc" )
34 FOUND_MYSELF="True"
35 break ;;
36 esac
37
38 done
39 IFS="$OLDIFS"
40
41 if [ -z ${FOUND_MYSELF} ] ; then
42 exit 0
43 fi
26 Check_Any_Bootloader_Role "grub-pc"
4427
4528 Echo_message "Begin installing grub-pc..."
4629
6952 # Installing depends
7053 Install_package
7154
72 # Local functions
73 Grub_live_entry ()
74 {
75 LABEL="${1}"
76 KERNEL="${2}"
77 INITRD="${3}"
78 APPEND="${4}"
79
80 LINUX_LIVE="${LINUX_LIVE}\nmenuentry \"Debian GNU/Linux - ${LABEL}\" {"
81 LINUX_LIVE="${LINUX_LIVE}\nlinux\t\t/${KERNEL} ${INITFS:+boot=${INITFS} }config LB_BOOTAPPEND_LIVE ${APPEND}"
82 LINUX_LIVE="${LINUX_LIVE}\ninitrd\t\t/${INITRD}"
83 LINUX_LIVE="${LINUX_LIVE}\n}"
84 }
85
86 Grub_install_entry ()
87 {
88 LABEL="${1}"
89 KERNEL="${2}"
90 INITRD="${3}"
91 APPEND="${4}"
92
93 if [ "${LABEL}" != "rescue" ] && [ "${LABEL}" != "rescuegui" ]
94 then
95 APPEND="${APPEND} quiet"
96 fi
97
98 LINUX_INSTALL="${LINUX_INSTALL}\nmenuentry \"Debian GNU/Linux - ${LABEL}\" {"
99 LINUX_INSTALL="${LINUX_INSTALL}\nlinux\t\t/${KERNEL} ${APPEND} LB_BOOTAPPEND_INSTALL"
100 LINUX_INSTALL="${LINUX_INSTALL}\ninitrd\t\t/${INITRD}"
101 LINUX_INSTALL="${LINUX_INSTALL}\n}"
102 }
103
104 if [ -e "config/bootloaders/grub-pc" ]
105 then
106 # Internal local copy
107 _SOURCE="config/bootloaders/grub-pc"
108 else
109 # Internal system copy
110 if [ -n "${LIVE_BUILD}" ]
111 then
112 _SOURCE="${LIVE_BUILD}/share/bootloaders/grub-pc"
113 else
114 _SOURCE="/usr/share/live/build/bootloaders/grub-pc"
115 fi
116 fi
117
118 case "${LB_INITRAMFS}" in
119 live-boot)
120 INITFS="live"
121 ;;
122
123 *)
124 INITFS=""
125 ;;
126 esac
127
12855 # Setting destination directory
12956 case "${LIVE_IMAGE_TYPE}" in
130 iso*|tar)
131 case "${LB_INITRAMFS}" in
132 live-boot)
133 DESTDIR_LIVE="binary/live"
134 ;;
135
136 *)
137 DESTDIR_LIVE="binary/live"
138 ;;
139 esac
140
141 DESTDIR_INSTALL="binary/install"
142 ;;
143
14457 hdd*|netboot)
14558 Echo_warning "Bootloader in this image type not yet supported by live-build."
14659 Echo_warning "This would produce a not bootable image, aborting (FIXME)."
15063
15164 Check_multiarchitectures
15265
153 # Creating directory
154 mkdir -p "${DESTDIR_LIVE}"
155
156 # Setting boot parameters
157 if [ "${LB_UNION_FILESYSTEM}" != "aufs" ]
158 then
159 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
160 fi
161
162 if [ -n "${LB_NET_COW_PATH}" ]
163 then
164 Echo_error "Net cow not yet supported on grub"
165 exit 1
166 fi
167
168 LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
169
170 # Assembling kernel configuration
171
172 # Default entries
173 DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
174 DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
175 DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
176
177 Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}"
178
179 if [ "${LB_BOOTAPPEND_FAILSAFE}" != "none" ]
180 then
181 Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
182 fi
183
184 for KERNEL in chroot/boot/vmlinuz-*
185 do
186 VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
187
188 Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}"
189 Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${LB_BOOTAPPEND_FAILSAFE}"
190 done
191
192 LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
193
194 # Assembling debian-installer configuration
195 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
196 then
197 LINUX_LIVE="#\t \"Live\"\n${LINUX_LIVE}"
198 LINUX_INSTALL="#\t \"Installer\"\n"
199
200 VMLINUZ_DI="install/vmlinuz"
201 INITRD_DI="install/initrd.gz"
202 APPEND_DI="vga=normal"
203
204 VMLINUZ_GI="install/gtk/vmlinuz"
205 INITRD_GI="install/gtk/initrd.gz"
206 APPEND_GI="video=vesa:ywrap,mtrr vga=788"
207
208 Grub_install_entry "install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
209 Grub_install_entry "installgui" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
210 Grub_install_entry "expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
211 Grub_install_entry "expertgui" "${VMLINUZ_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}"
212 Grub_install_entry "rescue" "${VMLINUZ_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}"
213 Grub_install_entry "rescuegui" "${VMLINUZ_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}"
214 Grub_install_entry "auto" "${VMLINUZ_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}"
215 Grub_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
216 fi
217
218 LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
219
220 # Assembling memtest configuration
221 if [ -f "${DESTDIR_LIVE}"/memtest ]
222 then
223 MEMTEST="#\t \"Other\"\n"
224 MEMTEST="${MEMTEST}\nmenuentry\t\"${LB_MEMTEST}\" {\nlinux16\t$(basename ${DESTDIR_LIVE})/memtest\n}"
225 MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's|//|/|g')"
226 fi
227
22866 # Copying templates
22967 mkdir -p binary/boot/grub/i386-pc
230 cp -r "${_SOURCE}"/* binary/boot/grub
23168
23269 case ${LIVE_IMAGE_TYPE} in
23370 iso*)
24481 FILES="$(echo ${FILES} | sed -e 's|chroot||g')"
24582 fi
24683
84 # We rely on: binary_loopback_cfg to generate grub.cfg and other configuration files
85
24786 # Copying grub
24887 cp ${FILES} binary/boot/grub/i386-pc
249
250 sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" -e "s|MEMTEST|${MEMTEST}|" binary/boot/grub/grub.cfg
251 sed -i -e "s#LB_BOOTAPPEND_INSTALL#${LB_BOOTAPPEND_INSTALL}#" -e "s#LB_BOOTAPPEND_LIVE#${LB_BOOTAPPEND_LIVE}#" binary/boot/grub/grub.cfg
252
253 sed -i -e 's|\ $||g' binary/boot/grub/grub.cfg
25488
25589 # Saving cache
25690 Save_cache cache/packages.binary
6666 esac
6767 done
6868
69 LB_PRIMARY_BOOTLOADER=$(echo "${LB_BOOTLOADERS}" | awk -F, '{ print $1 }')
70
71 case ${LB_PRIMARY_BOOTLOADER} in
69 case ${LB_FIRST_BOOTLOADER} in
7270 syslinux)
7371 case ${LB_BINARY_FILESYSTEM} in
7472 fat*|ntfs)
183181 Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
184182 Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
185183
186 if [ "${LB_PRIMARY_BOOTLOADER}" = "syslinux" ]
184 if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
187185 then
188 dd if=chroot/usr/lib/SYSLINUX/mbr.bin of=${FREELO} bs=440 count=1
186 dd if=chroot/usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])/mbr.bin of=${FREELO} bs=440 count=1
189187 fi
190188 ;;
191189
203201 parted -s "${FREELO}" set 1 boot on || true
204202 parted -s "${FREELO}" set 1 lba off || true
205203
206 if [ "${LB_PRIMARY_BOOTLOADER}" = "syslinux" ]
204 if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
207205 then
208 dd if=/usr/lib/SYSLINUX/mbr.bin of=${FREELO} bs=440 count=1
206 dd if=/usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])/mbr.bin of=${FREELO} bs=440 count=1
209207 fi
210208 ;;
211209 esac
218216 case "${LB_BINARY_FILESYSTEM}" in
219217 ext2|ext3|ext4)
220218 MKFS="${LB_BINARY_FILESYSTEM}"
221 MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0"
219 MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0 -O ^64bit"
222220 MOUNT_OPTIONS=""
223221 ;;
224222
269267
270268 FIXME()
271269 {
272 if [ "${LB_PRIMARY_BOOTLOADER}" = "grub" ]
270 if [ "${LB_FIRST_BOOTLOADER}" = "grub" ]
273271 then
274272
275273 cat > chroot/grub.sh << EOF
106106 XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
107107 fi
108108
109 LB_PRIMARY_BOOTLOADER=$(echo "${LB_BOOTLOADERS}" | awk -F, '{ print $1 }')
110
111 # Handle xorriso architecture specific options
112 case "${LB_PRIMARY_BOOTLOADER}" in
113 grub)
114 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
115 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito"
116 XORRISO_EXCLUDE="boot/grub/stage2_eltorito"
117 ;;
118
119 grub-pc)
120 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
121 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito -J"
122 XORRISO_EXCLUDE="boot/grub/grub_eltorito"
123 ;;
124
125 syslinux)
126 case "${LB_MODE}" in
127 progress-linux)
128 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/boot.bin -c boot/boot.cat"
129 XORRISO_EXCLUDE="boot/boot.bin"
130 ;;
131
132 *)
133 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat"
134 XORRISO_EXCLUDE="isolinux/isolinux.bin"
135 ;;
136 esac
137
138 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
139 ;;
140
141 *)
142 Echo_warning "Bootloader on your architecture not yet supported by live-build."
143 Echo_warning "This will produce a most likely not bootable image (Continuing in 5 seconds)."
144 sleep 5
145 ;;
146 esac
109 # Set an explicit modification date
110 XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d%H%m%S00)"
111
112 OLDIFS="$IFS"
113 IFS=","
114 BOOTLOADER_NUMBER=0
115 for BOOTLOADER in ${LB_BOOTLOADERS}
116 do
117 BOOTLOADER_NUMBER=$(expr ${BOOTLOADER_NUMBER} + 1)
118 # Handle xorriso architecture specific options
119
120 # If the bootloader number is greater or equal than 2 it means
121 # we are not the first bootloader and thus we need to tell
122 # mkisosfs to add an additional eltorito entry
123 if [ ${BOOTLOADER_NUMBER} -ge 2 ]
124 then
125 XORRISO_OPTIONS="${XORRISO_OPTIONS} -eltorito-alt-boot "
126 fi
127 case "${BOOTLOADER}" in
128 grub)
129 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
130 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito"
131 XORRISO_EXCLUDE="boot/grub/stage2_eltorito"
132 ;;
133
134 grub-pc)
135 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
136 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito -J"
137 XORRISO_EXCLUDE="boot/grub/grub_eltorito"
138 ;;
139
140 syslinux)
141 case "${LB_MODE}" in
142 progress-linux)
143 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/boot.bin -c boot/boot.cat"
144 XORRISO_EXCLUDE="boot/boot.bin"
145 ;;
146
147 *)
148 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat"
149 XORRISO_EXCLUDE="isolinux/isolinux.bin"
150 ;;
151 esac
152
153 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table --hardlinks"
154 ;;
155
156 grub-efi)
157 if [ -e binary/boot/grub/efi.img ]
158 then
159 XORRISO_OPTIONS="${XORRISO_OPTIONS} -e boot/grub/efi.img -no-emul-boot"
160 XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-gpt-basdat -isohybrid-apm-hfsplus"
161 else
162 Echo "No EFI boot code to include in the ISO"
163 fi
164 ;;
165
166 *)
167 Echo_warning "Bootloader on your architecture not yet supported by live-build."
168 Echo_warning "This will produce a most likely not bootable image (Continuing in 5 seconds)."
169 sleep 5
170 ;;
171 esac
172
173 done
174 IFS="$OLDIFS"
147175
148176 #if [ "${LB_DEBIAN_INSTALLER}" != "live" ]
149177 #then
150178 # XORRISO_OPTIONS="${XORRISO_OPTIONS} -m ${XORRISO_EXCLUDE}"
151179 #fi
152180
153 if [ "${LB_PRIMARY_BOOTLOADER}" = "grub-pc" ]
181 if [ "${LB_FIRST_BOOTLOADER}" = "grub-pc" ]
154182 then
155183
156184 cat > binary.sh << EOF
4545 Check_architectures amd64 i386
4646 Check_crossarchitectures
4747
48 # Variable used to embed newlines
49 NL="
50 "
51
4852 # Local functions
49 Grub_live_entry_commands ()
50 {
51 local KERNEL="${1}"
52 local INITRD="${2}"
53 local APPEND="${3}"
54
55 LINUX_LIVE="${LINUX_LIVE}\nlinux\t\t/${KERNEL} ${INITFS:+boot=${INITFS} }config LB_BOOTAPPEND_LIVE ${APPEND}"
56 LINUX_LIVE="${LINUX_LIVE}\ninitrd\t\t/${INITRD}"
53 Grub_menu_entry() {
54 local LABEL="$1"
55 local KERNEL="$2"
56 local INITRD="$3"
57 local APPEND="$4"
58
59 cat <<END
60 menuentry "$LABEL" {
61 linux $KERNEL $APPEND
62 initrd $INITRD
63 }
64 END
5765 }
5866
5967 Grub_live_entry ()
6068 {
61 local LABEL="${1}"
62 local KERNEL="${2}"
63 local INITRD="${3}"
64 local APPEND="${4}"
65
66 LINUX_LIVE="${LINUX_LIVE}\nmenuentry \"Debian GNU/Linux - ${LABEL}\" {"
67 Grub_live_entry_commands "${KERNEL}" "${INITRD}" "${APPEND} findiso=\${iso_path}"
68 LINUX_LIVE="${LINUX_LIVE}\n}"
69 }
70
71 Grub_live_autodetect_entry ()
69 LINUX_LIVE="${LINUX_LIVE}$(Grub_menu_entry "$@")$NL"
70 }
71
72 Grub_install_entry ()
73 {
74 LABEL="${1}"
75 TYPE="${2}"
76 KERNEL="${3}"
77 INITRD="${4}"
78 APPEND="${5}"
79
80 # Drop "quiet" kernel parameter for rescue entries
81 case $TYPE in
82 rescue|rescuegui)
83 APPEND=$(echo "$APPEND" | sed -e 's/ quiet//')
84 ;;
85 esac
86
87 if [ -z "$LINUX_INSTALL" ]; then
88 # First entry recorded in LINUX_INSTALL
89 LINUX_INSTALL="$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL"
90 else
91 # Remaining entries recorded in LINUX_ADVANCED_INSTALL
92 LINUX_ADVANCED_INSTALL="$LINUX_ADVANCED_INSTALL$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL"
93 fi
94 }
95
96 Grub_live_autodetect_menu_entry ()
7297 {
7398 local LABEL="${1}"
7499 local AMD64_KERNEL="${2}"
76101 local _486_KERNEL="${4}"
77102 local _486_INITRD="${5}"
78103 local APPEND="${6}"
79
80 LINUX_LIVE="${LINUX_LIVE}\nmenuentry \"Debian GNU/Linux - ${LABEL}\" {"
81 LINUX_LIVE="${LINUX_LIVE}\nif cpuid -l ; then"
82 Grub_live_entry_commands "${AMD64_KERNEL}" "${AMD64_INITRD}" "${APPEND} findiso=\${iso_path}"
83 LINUX_LIVE="${LINUX_LIVE}\nelse"
84 Grub_live_entry_commands "${_486_KERNEL}" "${_486_INITRD}" "${APPEND} findiso=\${iso_path}"
85 LINUX_LIVE="${LINUX_LIVE}\nfi"
86 LINUX_LIVE="${LINUX_LIVE}\n}"
104 cat <<END
105 # Autodetect if amd64 is supported
106 menuentry "$LABEL" {
107 if cpuid -l; then
108 linux ${AMD64_KERNEL} ${APPEND}
109 initrd ${AMD64_INITRD}
110 else
111 linux ${_486_KERNEL} ${APPEND}
112 initrd ${_486_INITRD}
113 fi
114 }
115 END
116 }
117
118 Grub_live_autodetect_entry ()
119 {
120 LINUX_LIVE="${LINUX_LIVE}$(Grub_live_autodetect_menu_entry "$@")$NL"
121 }
122
123 Grub_memtest_menu_entry ()
124 {
125 cat <<END
126 menuentry "$LB_MEMTEST" {
127 linux16 /${INITFS}/memtest
128 }
129 END
87130 }
88131
89132 if [ -e "config/bootloaders/grub-pc" ]
110153 ;;
111154 esac
112155
113 # Assembling image specifics
114 case "${LIVE_IMAGE_TYPE}" in
115 iso*)
116 _BOOTLOADER="isolinux"
117
118 case "${LB_MODE}" in
119 progress-linux)
120 _TARGET="binary/boot"
121 ;;
122
123 *)
124 _TARGET="binary/isolinux"
125 ;;
126 esac
127 ;;
128
129 netboot)
130 _BOOTLOADER="pxelinux"
131 _TARGET="tftpboot"
132 ;;
133
134 hdd*|*)
135 case ${LB_BINARY_FILESYSTEM} in
136 fat*|ntfs)
137 _BOOTLOADER=syslinux
138
139 case "${LB_MODE}" in
140 progress-linux)
141 _TARGET="binary/boot"
142 ;;
143
144 *)
145 _TARGET="binary/syslinux"
146 ;;
147 esac
148 ;;
149
150 ext[234]|btrfs)
151 _BOOTLOADER=extlinux
152 _TARGET="binary/boot/extlinux"
153 ;;
154 *)
155 Echo_error "syslinux/extlinux doesn't support ${LB_BINARY_FILESYSTEM}"
156 exit 1
157 ;;
158 esac
159 ;;
160 esac
161
162 DESTDIR_LIVE="${_TARGET}"
163
164156 Check_multiarchitectures
165157
166 # Creating directory
167 mkdir -p "${DESTDIR_LIVE}"
168
169158 # Setting boot parameters
170 if [ "${LB_UNION_FILESYSTEM}" != "aufs" ]
159 if [ "${LB_UNION_FILESYSTEM}" != "overlay" ]
171160 then
172161 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
173162 fi
178167 exit 1
179168 fi
180169
181 LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
170 # Default entries
171 DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
172 DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
173 DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
174
175 KERNEL_LIVE="/${INITFS}/${DEFAULT_KERNEL}"
176 INITRD_LIVE="/${INITFS}/${DEFAULT_INITRD}"
177 APPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
182178
183179 # Assembling kernel configuration
184 # If Bootloader is not syslinux that means
185 # binary_syslinux it's not going to rename kernel filenames in a later stage.
186 # We will use binary_grub2 algorithm which does not rename kernel filenames.
187
188 FOUND_SYSLINUX=""
189 OLDIFS="$IFS"
190 IFS=","
191 for BOOTLOADER in ${LB_BOOTLOADERS}
180 _AMD64_486_NUMBER="0"
181
182 for _FLAVOUR in ${LB_LINUX_FLAVOURS}
192183 do
193
194 case ${BOOTLOADER} in
195 "syslinux" )
196 FOUND_SYSLINUX="True"
197 break ;;
198 esac
199
184 if [ "${_FLAVOUR}" = "amd64" -o "${_FLAVOUR}" = "486" ] ; then
185 _AMD64_486_NUMBER="$((${_AMD64_486_NUMBER} + 1))"
186 fi
200187 done
201 IFS="$OLDIFS"
202
203 if [ -z ${FOUND_SYSLINUX} ]
204 then
205
206 _AMD64_486_NUMBER="0"
207
208 for _FLAVOUR in ${LB_LINUX_FLAVOURS}
209 do
210 if [ "${_FLAVOUR}" = "amd64" -o "${_FLAVOUR}" = "486" ] ; then
211 _AMD64_486_NUMBER="$((${_AMD64_486_NUMBER} + 1))"
212 fi
213 done
214
215 if [ "${_AMD64_486_NUMBER}" -ge 2 ] ; then
216 # Default entries
217 AMD64_KERNEL="$(basename chroot/boot/vmlinuz-*amd64)"
218 AMD64_INITRD="initrd.img-$(echo ${AMD64_KERNEL} | sed -e 's|vmlinuz-||')"
219 _486_KERNEL="$(basename chroot/boot/vmlinuz-*486)"
220 _486_INITRD="initrd.img-$(echo ${_486_KERNEL} | sed -e 's|vmlinuz-||')"
221
222 Grub_live_autodetect_entry "live (autodetect)" \
223 "${INITFS}/${AMD64_KERNEL}" \
224 "${INITFS}/${AMD64_INITRD}" \
225 "${INITFS}/${_486_KERNEL}" \
226 "${INITFS}/${_486_INITRD}"
227 fi
228
188
189 if [ "${_AMD64_486_NUMBER}" -ge 2 ] ; then
229190 # Default entries
230 DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
231 DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
232 DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
233
234 Grub_live_entry "live" "${INITFS}/${DEFAULT_KERNEL}" "${INITFS}/${DEFAULT_INITRD}"
235
236 if [ "${LB_BOOTAPPEND_FAILSAFE}" != "none" ]
237 then
238 Grub_live_entry "live (fail-safe mode)" "${INITFS}/${DEFAULT_KERNEL}" "${INITFS}/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
239 fi
240
191 AMD64_KERNEL="$(basename chroot/boot/vmlinuz-*amd64)"
192 AMD64_INITRD="initrd.img-$(echo ${AMD64_KERNEL} | sed -e 's|vmlinuz-||')"
193 _486_KERNEL="$(basename chroot/boot/vmlinuz-*486)"
194 _486_INITRD="initrd.img-$(echo ${_486_KERNEL} | sed -e 's|vmlinuz-||')"
195
196 Grub_live_autodetect_entry "Live system (autodetect)" \
197 "/${INITFS}/${AMD64_KERNEL}" \
198 "/${INITFS}/${AMD64_INITRD}" \
199 "/${INITFS}/${_486_KERNEL}" \
200 "/${INITFS}/${_486_INITRD}" \
201 "$APPEND_LIVE"
202 else
203 Grub_live_entry "Live system" "/${INITFS}/${DEFAULT_KERNEL}" "/${INITFS}/${DEFAULT_INITRD}" "${APPEND_LIVE}"
204 fi
205
206 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]
207 then
208 Grub_live_entry "Live system (fail-safe mode)" "/${INITFS}/${DEFAULT_KERNEL}" "/${INITFS}/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
209 fi
210
211 _COUNT=0
212 for KERNEL in chroot/boot/vmlinuz-*; do
213 _COUNT=$(( $COUNT + 1 ))
214 done
215
216 if [ $_COUNT -gt 1 ]; then
241217 for KERNEL in chroot/boot/vmlinuz-*
242218 do
243219 VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
244220
245 Grub_live_entry "live, kernel ${VERSION}" "${INITFS}/$(basename ${KERNEL})" "${INITFS}/initrd.img-${VERSION}"
246 Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "${INITFS}/$(basename ${KERNEL})" "${INITFS}/initrd.img-${VERSION}" "${LB_BOOTAPPEND_FAILSAFE}"
221 Grub_live_entry "Live system, kernel ${VERSION}" "/${INITFS}/$(basename ${KERNEL})" "/${INITFS}/initrd.img-${VERSION}" "${APPEND_LIVE}"
222
223 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
224 Grub_live_entry "Live system, kernel ${VERSION} (fail-safe mode)" "/${INITFS}/$(basename ${KERNEL})" "/${INITFS}/initrd.img-${VERSION}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
225 fi
247226 done
248 else # LB_BOOTLOADERS does not contain syslinux
249 # If one of the bootloader is syslinux that means
250 # binary_syslinux it's going to rename kernel filenames.
251 # We will use binary_syslinux algorithm but without renaming kernel filenames.
252 # That will ensure binary_syslinux will find the original kernel filenames.
253 #if [ -e "${_TARGET}/live.cfg.in" ]
254 #then
255 # This is all rather suboptimal.. needs prettifying at some point
256 _FLAVOURS="$(echo ${LB_LINUX_FLAVOURS} | wc -w)"
257
258 case "${_FLAVOURS}" in
259 1)
260 Grub_live_entry "live (${LB_LINUX_FLAVOURS})" "${INITFS}/vmlinuz" "${INITFS}/initrd.img" "${LB_BOOTAPPEND_LIVE}"
261 Grub_live_entry "live (${LB_LINUX_FLAVOURS}) (failsafe mode)" "${INITFS}/vmlinuz" "${INITFS}/initrd.img" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
262 ;;
263
264 *)
265 _AMD64_486_NUMBER="0"
266
267 for _FLAVOUR in ${LB_LINUX_FLAVOURS}
268 do
269 if [ "${_FLAVOUR}" = "amd64" -o "${_FLAVOUR}" = "486" ] ; then
270 _AMD64_486_NUMBER="$((${_AMD64_486_NUMBER} + 1))"
271 fi
272 done
273
274 _NUMBER="0"
275 for _FLAVOUR in ${LB_LINUX_FLAVOURS}
276 do
277 _NUMBER="$((${_NUMBER} + 1))"
278 if [ "${_FLAVOUR}" = "amd64" ] ; then
279 AMD64_KERNEL="vmlinuz${_NUMBER}"
280 AMD64_INITRD="initrd${_NUMBER}.img"
281 fi
282
283 if [ "${_FLAVOUR}" = "486" ] ; then
284 _486_KERNEL="vmlinuz${_NUMBER}"
285 _486_INITRD="initrd${_NUMBER}.img"
286 fi
287 done
288
289 _NUMBER="0"
290
291 for _FLAVOUR in ${LB_LINUX_FLAVOURS}
292 do
293 _NUMBER="$((${_NUMBER} + 1))"
294
295 if [ "${_NUMBER}" -gt 1 ]
296 then
297 Grub_live_entry "live (${_FLAVOUR})" "${INITFS}/vmlinuz${_NUMBER}" "${INITFS}/initrd${_NUMBER}.img" "${LB_BOOTAPPEND_LIVE}"
298 Grub_live_entry "live (${_FLAVOUR}) (failsafe mode)" "${INITFS}/vmlinuz${_NUMBER}" "${INITFS}/initrd${_NUMBER}.img" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
299
300 else
301 if [ "${_AMD64_486_NUMBER}" -ge 2 ] ; then
302
303 Grub_live_autodetect_entry "live (autodetect)" \
304 "${INITFS}/${AMD64_KERNEL}" \
305 "${INITFS}/${AMD64_INITRD}" \
306 "${INITFS}/${_486_KERNEL}" \
307 "${INITFS}/${_486_INITRD}"
308 fi
309
310 Grub_live_entry "live (${_FLAVOUR})" "${INITFS}/vmlinuz${_NUMBER}" "${INITFS}/initrd${_NUMBER}.img" "${LB_BOOTAPPEND_LIVE}"
311 Grub_live_entry "live (${_FLAVOUR}) (failsafe mode)" "${INITFS}/vmlinuz${_NUMBER}" "${INITFS}/initrd${_NUMBER}.img" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
312 fi
313
314 done
315
316 ;;
317 esac
318 #fi
319 fi
320 LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
227 fi
228
229 # Assembling debian-installer configuration
230 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
231 then
232 KERNEL_DI="/install/vmlinuz"
233 INITRD_DI="/install/initrd.gz"
234 APPEND_DI="vga=normal quiet ${LB_BOOTAPPEND_INSTALL}"
235
236 KERNEL_GI="/install/gtk/vmlinuz"
237 INITRD_GI="/install/gtk/initrd.gz"
238 APPEND_GI="video=vesa:ywrap,mtrr vga=788 quiet ${LB_BOOTAPPEND_INSTALL}"
239
240 Grub_install_entry "Start installer" "installgui" "${KERNEL_GI}" "${INITRD_GI}" "${APPEND_GI}"
241
242 Grub_install_entry "Install in graphical mode" "installgui" "${KERNEL_GI}" "${INITRD_GI}" "${APPEND_GI}"
243 Grub_install_entry "Install in text mode" "install" "${KERNEL_DI}" "${INITRD_DI}" "${APPEND_DI}"
244 Grub_install_entry "Expert install in graphical mode" "expertgui" "${KERNEL_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}"
245 Grub_install_entry "Expert install in text mode" "expert" "${KERNEL_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
246 Grub_install_entry "Automatic install in graphical mode" "autogui" "${KERNEL_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
247 Grub_install_entry "Automatic install in text mode" "auto" "${KERNEL_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}"
248 Grub_install_entry "Rescue system in graphical mode" "rescuegui" "${KERNEL_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}"
249 Grub_install_entry "Rescue system in text mode" "rescue" "${KERNEL_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}"
250 fi
321251
322252 # Assembling memtest configuration
323 if [ -f "${DESTDIR_LIVE}"/memtest ]
324 then
325 MEMTEST="#\t \"Other\"\n"
326 MEMTEST="${MEMTEST}\nmenuentry\t\"${LB_MEMTEST}\" {\nlinux16\t${INITFS}/memtest\n}"
327 MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's|//|/|g')"
253 if [ -f "binary/${INITFS}/memtest" ]
254 then
255 MEMTEST="$(Grub_memtest_menu_entry)$NL"
328256 fi
329257
330258 # Copying templates
331259 mkdir -p binary/boot/grub
332 cp "${_SOURCE}"/grub.cfg binary/boot/grub/loopback.cfg
333
334 sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL||" -e "s|MEMTEST|${MEMTEST}|" binary/boot/grub/loopback.cfg
335 sed -i -e "s#LB_BOOTAPPEND_INSTALL##" -e "s#LB_BOOTAPPEND_LIVE#${LB_BOOTAPPEND_LIVE}#" binary/boot/grub/loopback.cfg
336
337 sed -i -e 's|\ $||g' binary/boot/grub/loopback.cfg
260 cp -a "${_SOURCE}"/* binary/boot/grub/
261
262 escape_for_sed() {
263 echo -n "$1" | perl -npe 's/\n/\\n/gm'
264 }
265
266 sed -i \
267 -e "s|LINUX_LIVE|$(escape_for_sed "${LINUX_LIVE}")|" \
268 -e "s|LINUX_ADVANCED_INSTALL|$(escape_for_sed "${LINUX_ADVANCED_INSTALL}")|" \
269 -e "s|LINUX_INSTALL|$(escape_for_sed "${LINUX_INSTALL}")|" \
270 -e "s|MEMTEST|$(escape_for_sed "${MEMTEST}")|" \
271 -e "s|KERNEL_GI|$(escape_for_sed "${KERNEL_GI}")|" \
272 -e "s|INITRD_GI|$(escape_for_sed "${INITRD_GI}")|" \
273 -e "s|APPEND_GI|$(escape_for_sed "${APPEND_GI}")|" \
274 -e "s|KERNEL_DI|$(escape_for_sed "${KERNEL_DI}")|" \
275 -e "s|INITRD_DI|$(escape_for_sed "${INITRD_DI}")|" \
276 -e "s|APPEND_DI|$(escape_for_sed "${APPEND_DI}")|" \
277 -e "s|KERNEL_LIVE|$(escape_for_sed "${KERNEL_LIVE}")|" \
278 -e "s|INITRD_LIVE|$(escape_for_sed "${INITRD_LIVE}")|" \
279 -e "s|APPEND_LIVE|$(escape_for_sed "${APPEND_LIVE}")|" \
280 -e "s|LB_BOOTAPPEND_INSTALL|$(escape_for_sed "${LB_BOOTAPPEND_INSTALL}")|" \
281 -e "s|LB_BOOTAPPEND_LIVE_FAILSAFE|$(escape_for_sed "${LB_BOOTAPPEND_LIVE_FAILSAFE}")|" \
282 -e "s|LB_BOOTAPPEND_LIVE|$(escape_for_sed "${LB_BOOTAPPEND_LIVE}")|" \
283 binary/boot/grub/*.cfg
284
285 sed -i -e 's|//|/|g' binary/boot/grub/*.cfg
286 sed -i -e 's|\ $||g' binary/boot/grub/*.cfg
287
288 echo "source /boot/grub/grub.cfg" > binary/boot/grub/loopback.cfg
338289
339290 # Creating stage file
340291 Create_stagefile .build/binary_loopback_cfg
144144
145145 for SECTION in ${POOL}/*
146146 do
147 if [ ! -d "${SECTION}" ]; then
148 break # Do nothing if the package lists were empty...
149 fi
150
147151 SECTION="$(basename ${SECTION})"
148152
149153 mkdir -p ${DISTS}/${LB_PARENT_DISTRIBUTION}/${SECTION}/binary-${LB_ARCHITECTURES}
2323 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
2424 Set_defaults
2525
26 FOUND_MYSELF=""
27 OLDIFS="$IFS"
28 IFS=","
29 for BOOTLOADER in ${LB_BOOTLOADERS}
30 do
31
32 case ${BOOTLOADER} in
33 "syslinux" )
34 FOUND_MYSELF="True"
35 break ;;
36 esac
37
38 done
39 IFS="$OLDIFS"
40
41 if [ -z ${FOUND_MYSELF} ] ; then
42 exit 0
43 fi
26 Check_Any_Bootloader_Role "syslinux"
4427
4528 Echo_message "Begin installing syslinux..."
4629
202185 1)
203186 # If multiple initrd images are being generated (by DKMS packages, etc),
204187 # we likely only want the latest version.
205 mv $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
206 mv $(ls -r1 --sort=version binary/${_INITRAMFS}/initrd.img-* | head -n 1) binary/${_INITRAMFS}/initrd.img
188 ln $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
189 ln $(ls -r1 --sort=version binary/${_INITRAMFS}/initrd.img-* | head -n 1) binary/${_INITRAMFS}/initrd.img
207190
208191 sed -e "s|@FLAVOUR@|${LB_LINUX_FLAVOURS}|g" \
209192 -e "s|@LINUX@|/${_INITRAMFS}/vmlinuz|g" \
220203 do
221204 _NUMBER="$((${_NUMBER} + 1))"
222205
223 mv binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} binary/${_INITRAMFS}/vmlinuz${_NUMBER}
224 mv binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} binary/${_INITRAMFS}/initrd${_NUMBER}.img
206 ln binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} binary/${_INITRAMFS}/vmlinuz${_NUMBER}
207 ln binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} binary/${_INITRAMFS}/initrd${_NUMBER}.img
225208
226209 if [ "${_NUMBER}" -gt 1 ]
227210 then
247230 _VERSION="$(. chroot/etc/os-release && echo ${VERSION_ID})"
248231 fi
249232
250 _VERSION="${VERSION:-none}"
233 _VERSION="${_VERSION:-none}"
251234
252235 _DISTRIBUTION="${LB_DISTRIBUTION}"
253236 _ARCHITECTURE="${LB_ARCHITECTURES}"
324307 rm -f "${_TARGET}/splash.svg"
325308 fi
326309
310 # Tweak the grub theme to reuse the syslinux background image
311 if [ -e binary/boot/grub/live-theme/theme.txt ]; then
312 sed -i -e 's|^desktop-image:.*|desktop-image: "/isolinux/splash.png"|' \
313 -e 's|^title-text:.*|title-text: ""|' \
314 binary/boot/grub/live-theme/theme.txt
315 fi
316
327317 case "${LB_MODE}" in
328318 progress-linux)
329319 for _FILE in "${_TARGET}/isolinux.bin" "${_TARGET}/isolinux.cfg" "${_TARGET}/syslinux.cfg"
3636 # Bootstrapping system
3737 lb bootstrap_cache restore ${@}
3838 lb bootstrap_debootstrap ${@}
39 lb bootstrap_archive-keys ${@}
4039 lb bootstrap_cache save ${@}
4140
4241 # Configuring chroot
+0
-77
scripts/build/bootstrap_archive-keys less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 set -e
11
12 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14
15 # Setting static variables
16 DESCRIPTION="$(Echo 'bootstrap non-Debian archive-signing-keys')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
19
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 # TODO: allow verification against user-specified keyring
27 # For now, we'll only validate against debian-keyring
28
29 # TODO2: use chrooted validation rather than host system based one
30
31 case "${LB_MODE}" in
32 progress-linux)
33 case "${LB_DISTRIBUTION}" in
34 artax*)
35 _KEYS="artax artax-backports"
36 ;;
37
38 baureo*)
39 _KEYS="baureo baureo-backports"
40 ;;
41
42 cairon*)
43 _KEYS="cairon cairon-backports"
44 ;;
45 esac
46
47 _URL="${LB_MIRROR_CHROOT}/project/pgp"
48 ;;
49 esac
50
51 for _KEY in ${_KEYS}
52 do
53 Echo_message "Fetching archive-key ${_KEY}..."
54
55 wget -q "${_URL}/archive-key-${_KEY}.asc" -O chroot/key.asc
56 wget -q "${_URL}/archive-key-${_KEY}.asc.sig" -O chroot/key.asc.sig
57
58 if [ -e /usr/bin/gpgv ] && [ -e /usr/share/keyrings/debian-keyring.gpg ]
59 then
60 Echo_message "Verifying archive-key ${_KEY} against debian-keyring..."
61
62 /usr/bin/gpgv --quiet --keyring /usr/share/keyrings/debian-keyring.gpg chroot/key.asc.sig chroot/key.asc > /dev/null 2>&1 || { Echo_error "archive-key ${_KEY} has invalid signature."; return 1;}
63 else
64 Echo_warning "Skipping archive-key ${_KEY} verification, either gpgv or debian-keyring not available on host system..."
65 fi
66
67 Echo_message "Importing archive-key ${_KEY}..."
68
69 Chroot chroot "apt-key add key.asc"
70 rm -f chroot/key.asc chroot/key.asc.sig
71 done
72
73 Chroot chroot "apt-get update"
74
75 # Creating stage file
76 Create_stagefile .build/bootstrap_archive-keys
6161 then
6262 # Modify archive areas to remove leading/trailing whitespaces and replace other whitepspace with commas
6363 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --components=$(echo ${LB_ARCHIVE_AREAS} | sed -e 's| |,|g')"
64 FOREIGN_DEBOOTSTRAP_OPTIONS="--components=$(echo ${LB_ARCHIVE_AREAS} | sed -e 's| |,|g')"
6465 fi
6566
6667 if [ "${_VERBOSE}" = "true" ]
8687 fi
8788
8889 Echo_breakage "Running debootstrap (download-only)... "
89 debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
90 debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
9091
9192 # Removing old cache
9293 rm -f cache/packages.bootstrap/*.deb
107108 fi
108109
109110 Echo_message "Bootstrap will be foreign"
110 debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
111 debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
111112
112113 Echo_message "Running debootstrap second stage under QEMU"
113114 cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
114 Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage
115 Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
115116 else
116 debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
117 debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
117118 fi
118119
119120 # Deconfiguring debootstrap configurations
2828
2929 # Requiring stage file
3030 Require_stagefile .build/config .build/bootstrap
31
32 _LB_LOCAL_KEY_EMAIL="live-build-local-key@invalid"
3331
3432 case "${LB_DERIVATIVE}" in
3533 true)
279277 -o APT::FTPArchive::Release::Origin=config/packages.chroot \
280278 release . > Release" | Chroot chroot sh
281279
282 if [ "${LB_APT_SECURE}" = "true" ]
283 then
284 if [ -e chroot/root/.gnupg ]
285 then
286 mv chroot/root/.gnupg chroot/root/.gnupg.orig
287 fi
288
289 # Ensure ~/.gnupg exists
290 mkdir -p chroot/root/.gnupg
291
292 # Temporarily replace /dev/random with /dev/urandom so as not
293 # to block automated image builds; we don't care about the
294 # security of this key anyway.
295 if [ -e chroot/dev/random ]
296 then
297 mv chroot/dev/random chroot/dev/random.orig
298 cp -a chroot/dev/urandom chroot/dev/random
299 fi
300
301 if Find_files cache/local-package-keyring.*
302 then
303 cp cache/local-package-keyring.* chroot/root
304 else
305 # Generate temporary key
306 echo "Key-Type: RSA
307 Key-Length: 1024
308 Subkey-Type: ELG-E
309 Subkey-Length: 1024
310 Name-Real: live-build local packages key
311 Name-Email: ${_LB_LOCAL_KEY_EMAIL}
312 Expire-Date: 0
313 %secring /root/local-package-keyring.sec
314 %pubring /root/local-package-keyring.pub
315 %commit" | Chroot chroot "gpg --batch --gen-key" || _LB_RET=${?}
316
317 case "${_LB_RET}" in
318 ""|2)
319 # Gnupg sometimes seems to return with a status of 2 when there was not
320 # enough entropy (and key creation blocks temporarily) even if the
321 # operation was ultimately successful.
322 ;;
323 *)
324 Echo_error "GPG exited with error status %s" "${_LB_RET}"
325 exit ${_LB_RET}
326 ;;
327 esac
328
329 # Save keyrings to avoid regeneration
330 cp chroot/root/local-package-keyring.* cache/
331 fi
332
333 # Sign release
334 Chroot chroot "gpg --no-default-keyring --secret-keyring /root/local-package-keyring.sec \
335 --keyring /root/local-package-keyring.pub -abs -o \
336 /root/packages/Release.gpg /root/packages/Release"
337
338 # Import key
339 Chroot chroot "gpg --no-default-keyring --secret-keyring /root/local-package-keyring.sec \
340 --keyring /root/local-package-keyring.pub --armor \
341 --export ${_LB_LOCAL_KEY_EMAIL}" | Chroot chroot "apt-key add -"
342
343 # Remove temporary keyrings
344 rm chroot/root/local-package-keyring.pub
345 rm chroot/root/local-package-keyring.sec
346
347 # Revert /dev/random
348 if [ -e chroot/dev/random.orig ]
349 then
350 mv chroot/dev/random.orig chroot/dev/random
351 fi
352
353 rm -rf chroot/root/.gnupg
354
355 if [ -e chroot/root/.gnupg.orig ]
356 then
357 mv chroot/root/.gnupg.orig chroot/root/.gnupg
358 fi
359 fi
360
361280 # Add to sources.list.d
362 echo "deb file:/root/packages ./" > chroot/etc/apt/sources.list.d/packages.list
281 echo "deb [ trusted=yes ] file:/root/packages ./" > chroot/etc/apt/sources.list.d/packages.list
363282
364283 # Move top-level sources away, otherwise apt always preferes it (#644148)
365284 if [ -e chroot/etc/apt/sources.list ]
536455 fi
537456
538457 # Configure generic indices
539 # Don't do anything if it's not required
540 if [ "${LB_PARENT_MIRROR_CHROOT}" = "${LB_PARENT_MIRROR_BINARY}" ] && \
541 [ "${LB_PARENT_MIRROR_CHROOT_SECURITY}" = "${LB_PARENT_MIRROR_BINARY_SECURITY}" ] && \
542 [ ! -d chroot/root/packages ]
543 then
544 # Removing stage file
545 rm -f .build/chroot_archives
546
547 exit 0
548 fi
549
550458 # Cleaning apt list cache
551459 rm -rf chroot/var/lib/apt/lists
552460 mkdir -p chroot/var/lib/apt/lists/partial
758666 rm -f chroot/etc/apt/sources.list.d/packages.list
759667 rm -rf chroot/root/packages
760668
761 # Remove local packages key if it exists
762 if Chroot chroot apt-key list | grep -q ${_LB_LOCAL_KEY_EMAIL}
763 then
764 Chroot chroot apt-key del ${_LB_LOCAL_KEY_EMAIL}
765 fi
766
767669 # Removing stage file
768670 rm -f .build/chroot_archives
769671 ;;
3131 \t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
3232 \t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
3333 \t [--bootappend-live-failsafe PARAMETER|\"PARAMETERS\"]\n\
34 \t [--bootloaders grub-legacy|grub-pc|syslinux]\n\
34 \t [--bootloaders grub-legacy|grub-pc|syslinux|grub-efi]\n\
3535 \t [--cache true|false]\n\
3636 \t [--cache-indices true|false]\n\
3737 \t [--cache-packages true|false]\n\
5050 \t [--debian-installer-distribution daily|CODENAME]\n\
5151 \t [--debian-installer-preseedfile FILE|URL]\n\
5252 \t [--debian-installer-gui true|false]\n\
53 \t [--debootstrap-options OPTIONS]\n\
54 \t [--debootstrap-script SCRIPT]\n\
5355 \t [--debug]\n\
5456 \t [-d|--distribution CODENAME]\n\
5557 \t [--parent-distribution CODENAME]\n\
125127
126128 Local_arguments ()
127129 {
128 LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,
130 LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,debootstrap-script:,
129131 apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:,
130132 cache-stages:,debconf-frontend:,debconf-priority:,dump,
131133 initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:,
137139 archive-areas:,parent-archive-areas:,chroot-filesystem:,
138140 gzip-options:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
139141 security:,updates:,backports:,binary-filesystem:,binary-images:,
140 apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloaders:,checksums:,compression:,config:,zsync:,build-with-chroot:,
142 apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloader:,bootloaders:,checksums:,compression:,config:,zsync:,build-with-chroot:,
141143 debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
142144 grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,hdd-partition-start:,iso-application:,iso-preparer:,iso-publisher:,
143145 iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
258260 shift 2
259261 ;;
260262
263 --debootstrap-script)
264 DEBOOTSTRAP_SCRIPT="${2}"
265 shift 2
266 ;;
267
261268 --cache)
262269 LB_CACHE="${2}"
263270 shift 2
491498 shift 2
492499 ;;
493500
494 --bootloaders)
501 --bootloaders|--bootloader)
495502 LB_BOOTLOADERS="${2}"
496503 shift 2
497504 ;;
9951002 APT_OPTIONS="${APT_OPTIONS}"
9961003 APTITUDE_OPTIONS="${APTITUDE_OPTIONS}"
9971004 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS}"
1005 DEBOOTSTRAP_SCRIPT="${DEBOOTSTRAP_SCRIPT}"
9981006 GZIP_OPTIONS="${GZIP_OPTIONS}"
9991007 ISOHYBRID_OPTIONS="${ISOHYBRID_OPTIONS}"
10001008 EOF
0 #! /bin/sh
1 set -e
2
3 # Copyright (C) 2010, 2011 Canonical Ltd.
4 # Author: Colin Watson <[email protected]>
5 #
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by the Free
8 # Software Foundation; either version 2, or (at your option) any later
9 # version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # for more details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19
20 # Make an EFI boot image.
21
22 if [ -z "$1" ] || [ -z "$2" ]; then
23 echo "usage: $0 OUTPUT-DIRECTORY GRUB-PLATFORM EFI-NAME NETBOOT-PREFIX"
24 exit 1
25 fi
26
27 outdir="$1"
28 platform="$2"
29 efi_name="$3"
30 netboot_prefix="$4"
31
32 memdisk_img=
33 workdir=
34
35 cleanup () {
36 [ -z "$memdisk_img" ] || rm -f "$memdisk_img"
37 [ -z "$workdir" ] || rm -rf "$workdir"
38 }
39 trap cleanup EXIT HUP INT QUIT TERM
40
41 rm -rf "$outdir"
42 mkdir -p "$outdir"
43
44 memdisk_img="$(mktemp efi-image.XXXXXX)"
45 workdir="$(mktemp -d efi-image.XXXXXX)"
46
47 # Skeleton configuration file which finds the real boot disk.
48 mkdir -p "$workdir/boot/grub"
49 cat >"$workdir/boot/grub/grub.cfg" <<EOF
50 search --file --set=root /.disk/info
51 set prefix=(\$root)/boot/grub
52 source \$prefix/$platform/grub.cfg
53 EOF
54
55 mkdir -p "$outdir/boot/grub/$platform"
56 (for i in /usr/lib/grub/$platform/part_*.mod; do
57 i=`echo $i | sed 's?^.*/??g;s?\.mod$??g;'`
58 echo "insmod $i"
59 done; \
60 echo "source /boot/grub/grub.cfg") >"$outdir/boot/grub/$platform/grub.cfg"
61
62 # Build the core image.
63 (cd "$workdir"; tar -cf - boot) >"$memdisk_img"
64 grub-mkimage -O "$platform" -m "$memdisk_img" \
65 -o "$workdir/boot$efi_name.efi" -p '(memdisk)/boot/grub' \
66 search iso9660 configfile normal memdisk tar part_msdos part_gpt fat
67
68 grub-mkimage -O "$platform" \
69 -o "$outdir/bootnet$efi_name.efi" -p "$netboot_prefix/grub" \
70 search configfile normal efinet tftp net
71
72 # Stuff it into a FAT filesystem, making it as small as possible. 24KiB
73 # headroom seems to be enough; (x+31)/32*32 rounds up to multiple of 32.
74 mkfs.msdos -C "$outdir/efi.img" \
75 $(( ($(stat -c %s "$workdir/boot$efi_name.efi") / 1024 + 55) \
76 / 32 * 32 ))
77 mmd -i "$outdir/efi.img" ::efi
78 mmd -i "$outdir/efi.img" ::efi/boot
79 mcopy -i "$outdir/efi.img" "$workdir/boot$efi_name.efi" \
80 "::efi/boot/boot$efi_name.efi"
81
82 grub-cpmodules "$outdir" "$platform"
83 cp /usr/share/grub/unicode.pf2 "$outdir/boot/grub/"
84
85 exit 0
0 #! /bin/sh
1 set -e
2
3 # Copyright (C) 2010, 2011 Canonical Ltd.
4 # Author: Colin Watson <[email protected]>
5 #
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by the Free
8 # Software Foundation; either version 2, or (at your option) any later
9 # version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # for more details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19
20 # Copy GRUB modules.
21
22 # TODO: take the modules list as parameter, and only include the needed modules, using moddeps.lst to get dependencies
23
24 if [ -z "$1" ] || [ -z "$2" ]; then
25 echo "usage: $0 OUTPUT-DIRECTORY GRUB-PLATFORM"
26 exit 1
27 fi
28
29 outdir="$1"
30 platform="$2"
31
32 # Copy over GRUB modules, except for those already built in.
33 cp -a "/usr/lib/grub/$platform"/*.lst "$outdir/boot/grub/$platform/"
34 for x in "/usr/lib/grub/$platform"/*.mod; do
35 # TODO: Some of these exclusions are based on knowledge of module
36 # dependencies. It would be nice to have a way to read the module
37 # list directly out of the image.
38 case $(basename "$x" .mod) in
39 configfile|fshelp|iso9660|memdisk|search|search_fs_file|search_fs_uuid|search_label|tar)
40 # included in boot image
41 ;;
42 affs|afs|afs_be|befs|befs_be|minix|nilfs2|sfs|zfs|zfsinfo)
43 # unnecessary filesystem modules
44 ;;
45 example_functional_test|functional_test|hello)
46 # other cruft
47 ;;
48 *)
49 cp -a "$x" "$outdir/boot/grub/$platform/"
50 ;;
51 esac
52 done
53
54 exit 0
247247 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="sid"
248248
249249 # Debian Installer daily builds
250 URL="http://d-i.debian.org/daily-images/${LB_ARCHITECTURES}/daily/"
250 URL="https://d-i.debian.org/daily-images/${LB_ARCHITECTURES}/daily/"
251251 else
252252 URL="${LB_MIRROR_DEBIAN_INSTALLER}/dists/${LB_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
253253 fi
259259 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="sid"
260260
261261 # Debian Installer daily builds
262 URL="http://d-i.debian.org/daily-images/${LB_ARCHITECTURES}/daily/"
262 URL="https://d-i.debian.org/daily-images/${LB_ARCHITECTURES}/daily/"
263263 else
264264 URL="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
265265 fi
103103 case "${LB_BINARY_FILESYSTEM}" in
104104 ext2|ext3|ext4)
105105 MKFS="${LB_BINARY_FILESYSTEM}"
106 MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0"
106 MKFS_OPTIONS="-L ${LB_HDD_LABEL} -m 0 -O ^64bit"
107107 MOUNT_OPTIONS=""
108108 ;;
109109
9797 XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
9898 fi
9999
100 # Set an explicit modification date
101 XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d%H%m%S00)"
102
100103 # Moving image
101104 mv source chroot
102105
0 /usr/lib/syslinux/modules/bios/libgpl.c32
0 /usr/lib/syslinux/modules/bios/libmenu.c32
00 set default=0
11
2 insmod tga
3 background_image ($root)/boot/grub/splash.tga
4 set color_normal=cyan/blue
5 set color_highlight=white/blue
2 loadfont $prefix/dejavu-bold-16.pf2
3 loadfont $prefix/dejavu-bold-14.pf2
4 loadfont $prefix/unicode.pf2
5 set gfxmode=auto
6 insmod all_video
7 insmod gfxterm
8 insmod png
69
10 set color_normal=light-gray/black
11 set color_highlight=white/black
12
13 if [ -e /isolinux/splash.png ]; then
14 # binary_syslinux modifies the theme file to point to the correct
15 # background picture
16 set theme=/boot/grub/live-theme/theme.txt
17 elif [ -e /boot/grub/splash.png ]; then
18 set theme=/boot/grub/live-theme/theme.txt
19 else
20 set menu_color_normal=cyan/blue
21 set menu_color_highlight=white/blue
22 fi
23
24 terminal_output gfxterm
25
26 insmod play
27 play 960 440 1 0 4 440 1
28
29 # Live boot
730 LINUX_LIVE
831
32 # You can add more entries like this
33 # menuentry "Alternate live boot" {
34 # linux KERNEL_LIVE APPEND_LIVE custom options here
35 # initrd INITRD_LIVE
36 # }
37 # menuentry "Alternate graphical installer" {
38 # linux KERNEL_GI APPEND_GI custom options here
39 # initrd INITRD_GI
40 # }
41 # menuentry "Alternate textual installer" {
42 # linux KERNEL_DI APPEND_DI custom options here
43 # initrd INITRD_DI
44 # }
45
46 # Installer (if any)
947 LINUX_INSTALL
1048
49 submenu 'Advanced options...' {
50
51 # More installer entries (if any)
52 LINUX_ADVANCED_INSTALL
53
54 # Memtest (if any)
1155 MEMTEST
56
57 }
0 desktop-image: "../splash.png"
1 title-color: "#ffffff"
2 title-font: "DejaVu Sans Bold 16"
3 title-text: "Live Boot Menu with GRUB"
4 message-font: "Unifont Regular 16"
5 terminal-font: "Unifont Regular 16"
6
7 #help bar at the bottom
8 + label {
9 top = 100%-50
10 left = 0
11 width = 100%
12 height = 20
13 text = "@KEYMAP_SHORT@"
14 align = "center"
15 color = "#ffffff"
16 font = "DejaVu Sans Bold 14"
17 }
18
19 #boot menu
20 + boot_menu {
21 left = 10%
22 width = 80%
23 top = 52%
24 height = 48%-80
25 item_color = "#a8a8a8"
26 item_font = "DejaVu Sans Bold 14"
27 selected_item_color= "#ffffff"
28 selected_item_font = "DejaVu Sans Bold 14"
29 item_height = 16
30 item_padding = 0
31 item_spacing = 4
32 icon_width = 0
33 icon_heigh = 0
34 item_icon_space = 0
35 }
36
37 #progress bar
38 + progress_bar {
39 id = "__timeout__"
40 left = 15%
41 top = 100%-80
42 height = 16
43 width = 70%
44 font = "DejaVu Sans Regular 14"
45 text_color = "#000000"
46 fg_color = "#ffffff"
47 bg_color = "#a8a8a8"
48 border_color = "#ffffff"
49 text = "@TIMEOUT_NOTIFICATION_LONG@"
50 }
share/bootloaders/grub-pc/splash.tga less more
Binary diff not shown
0 /usr/lib/syslinux/modules/bios/libgpl.c32
0 /usr/lib/syslinux/modules/bios/libmenu.c32
0 /usr/lib/syslinux/modules/bios/libgpl.c32
0 /usr/lib/syslinux/modules/bios/libmenu.c32
0 /usr/lib/syslinux/modules/bios/libgpl.c32
0 /usr/lib/syslinux/modules/bios/libmenu.c32