Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
live-build
Commits
e422a68c
Commit
e422a68c
authored
Oct 18, 2013
by
Daniel Baumann
Browse files
Adding upstream version 4.0~alpha27.
parent
cfcdd3e6
Changes
23
Hide whitespace changes
Inline
Side-by-side
VERSION
View file @
e422a68c
4.0~alpha2
6
-1
4.0~alpha2
7
-1
functions/defaults.sh
View file @
e422a68c
...
...
@@ -627,7 +627,7 @@ Set_defaults ()
esac
;;
s390
)
s390
x
)
case
"
${
LB_MODE
}
"
in
progress-linux|ubuntu
)
Echo_error
"Architecture
${
LIVE_IMAGE_ARCHITECTURE
}
not supported in the
${
LB_MODE
}
mode."
...
...
@@ -635,7 +635,7 @@ Set_defaults ()
;;
*
)
LB_LINUX_FLAVOURS
=
"
${
LB_LINUX_FLAVOURS
:-
s390
}
"
LB_LINUX_FLAVOURS
=
"
${
LB_LINUX_FLAVOURS
:-
s390
x
}
"
;;
esac
;;
...
...
manpages/bin/update-version.sh
View file @
e422a68c
#!/bin/sh
## live-build(7) - System Build
Scrip
ts
## live-build(7) -
Live
System Build
Componen
ts
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
...
...
manpages/de/lb_bootstrap_cdebootstrap.de.1
View file @
e422a68c
...
...
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BUILD 1 1
9.09
.2013 4.0~alpha2
6
\-1 "Live Systems Projekt"
.TH LIVE\-BUILD 1 1
8.10
.2013 4.0~alpha2
7
\-1 "Live Systems Projekt"
.SH NAME
\fBlive\-build\fP \- System Build Skripte
...
...
@@ -59,10 +59,10 @@ unter <\fIhttp://live\-systems.org/manual/\fP> gefunden werden.
.SH FEHLER
Fehler können durch Einreichen eines Fehlerberichtes für das live\-build
Paket im
Debian
Bug Tracking System unter
<\fIhttp://bugs.debian.org/\fP> oder
durch Senden einer E\-Mail an die
Debian Live Mailing Liste unter
<\fIdebian\-live@lists.debian.org\fP>
(englischsprachig) mitgeteilt
werden.
Paket im Bug Tracking System unter
<\fIhttp://bugs.debian.org/\fP> oder
durch Senden einer E\-Mail an die
Live Systems Mailing Liste unter
<\fIdebian\-live@lists.debian.org\fP>
(englischsprachig) mitgeteilt
werden.
.SH AUTOR
live\-build wurde von Daniel Baumann <\fImail@daniel\-baumann.ch\fP>
...
...
manpages/de/lb_bootstrap_debootstrap.de.1
View file @
e422a68c
...
...
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BUILD 1 1
9.09
.2013 4.0~alpha2
6
\-1 "Live Systems Projekt"
.TH LIVE\-BUILD 1 1
8.10
.2013 4.0~alpha2
7
\-1 "Live Systems Projekt"
.SH NAME
\fBlive\-build\fP \- System Build Skripte
...
...
@@ -59,10 +59,10 @@ unter <\fIhttp://live\-systems.org/manual/\fP> gefunden werden.
.SH FEHLER
Fehler können durch Einreichen eines Fehlerberichtes für das live\-build
Paket im
Debian
Bug Tracking System unter
<\fIhttp://bugs.debian.org/\fP> oder
durch Senden einer E\-Mail an die
Debian Live Mailing Liste unter
<\fIdebian\-live@lists.debian.org\fP>
(englischsprachig) mitgeteilt
werden.
Paket im Bug Tracking System unter
<\fIhttp://bugs.debian.org/\fP> oder
durch Senden einer E\-Mail an die
Live Systems Mailing Liste unter
<\fIdebian\-live@lists.debian.org\fP>
(englischsprachig) mitgeteilt
werden.
.SH AUTOR
live\-build wurde von Daniel Baumann <\fImail@daniel\-baumann.ch\fP>
...
...
manpages/en/lb_bootstrap_cdebootstrap.1
View file @
e422a68c
...
...
@@ -6,7 +6,7 @@
.\" under certain conditions; see COPYING for details.
.\"
.\"
.TH LIVE\-BUILD 1 2013\-0
9
\-1
9
4.0~alpha2
6
-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2013\-
1
0\-1
8
4.0~alpha2
7
-1 "Live Systems Project"
.SH NAME
\fBlive\-build\fR \- System Build Scripts
...
...
manpages/en/lb_bootstrap_debootstrap.1
View file @
e422a68c
...
...
@@ -6,7 +6,7 @@
.\" under certain conditions; see COPYING for details.
.\"
.\"
.TH LIVE\-BUILD 1 2013\-0
9
\-1
9
4.0~alpha2
6
-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2013\-
1
0\-1
8
4.0~alpha2
7
-1 "Live Systems Project"
.SH NAME
\fBlive\-build\fR \- System Build Scripts
...
...
manpages/es/lb_bootstrap_cdebootstrap.es.1
View file @
e422a68c
...
...
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BUILD 1 1
9.09
.2013 4.0~alpha2
6
\-1 "Proyecto Live Systems"
.TH LIVE\-BUILD 1 1
8.10
.2013 4.0~alpha2
7
\-1 "Proyecto Live Systems"
.SH NOMBRE
\fBlive\-build\fP \- Scripts de Creación del Sistema
...
...
manpages/es/lb_bootstrap_debootstrap.es.1
View file @
e422a68c
...
...
@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BUILD 1 1
9.09
.2013 4.0~alpha2
6
\-1 "Proyecto Live Systems"
.TH LIVE\-BUILD 1 1
8.10
.2013 4.0~alpha2
7
\-1 "Proyecto Live Systems"
.SH NOMBRE
\fBlive\-build\fP \- Scripts de Creación del Sistema
...
...
manpages/po/de/lb_bootstrap_cdebootstrap.1.po
View file @
e422a68c
...
...
@@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
"Project-Id-Version: live-build 4.0~alpha2
6
-1\n"
"POT-Creation-Date: 2013-0
9
-1
9
09:
09
+0300\n"
"Project-Id-Version: live-build 4.0~alpha2
7
-1\n"
"POT-Creation-Date: 2013-
1
0-1
8
09:
45
+0300\n"
"PO-Revision-Date: 2010-05-24 09:59+0300\n"
"Last-Translator: Daniel Baumann <mail@daniel-baumann.ch>\n"
"Language-Team: none\n"
...
...
@@ -24,14 +24,14 @@ msgstr "LIVE-BUILD"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "2013-0
9
-1
9
"
msgstr "1
9.09
.2013"
msgid "2013-
1
0-1
8
"
msgstr "1
8.10
.2013"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "4.0~alpha2
6
-1"
msgstr "4.0~alpha2
6
-1"
msgid "4.0~alpha2
7
-1"
msgstr "4.0~alpha2
7
-1"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
...
...
@@ -232,8 +232,8 @@ msgid ""
"debian.org>E<gt>."
msgstr ""
"Fehler können durch Einreichen eines Fehlerberichtes für das live-build "
"Paket im
Debian
Bug Tracking System unter E<lt>I<http://bugs.debian.org/"
"
>E<gt> oder
durch Senden einer E-Mail an die
Debian Live
Mailing Liste unter "
"Paket im Bug Tracking System unter E<lt>I<http://bugs.debian.org/
>E<gt> oder
"
"durch Senden einer E-Mail an die
Live Systems
Mailing Liste unter "
"E<lt>I<debian-live@lists.debian.org>E<gt> (englischsprachig) mitgeteilt "
"werden."
...
...
manpages/po/de/lb_bootstrap_debootstrap.1.po
View file @
e422a68c
...
...
@@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
"Project-Id-Version: live-build 4.0~alpha2
6
-1\n"
"POT-Creation-Date: 2013-0
9
-1
9
09:
09
+0300\n"
"Project-Id-Version: live-build 4.0~alpha2
7
-1\n"
"POT-Creation-Date: 2013-
1
0-1
8
09:
45
+0300\n"
"PO-Revision-Date: 2010-05-24 09:59+0300\n"
"Last-Translator: Daniel Baumann <mail@daniel-baumann.ch>\n"
"Language-Team: none\n"
...
...
@@ -24,14 +24,14 @@ msgstr "LIVE-BUILD"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "2013-0
9
-1
9
"
msgstr "1
9.09
.2013"
msgid "2013-
1
0-1
8
"
msgstr "1
8.10
.2013"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "4.0~alpha2
6
-1"
msgstr "4.0~alpha2
6
-1"
msgid "4.0~alpha2
7
-1"
msgstr "4.0~alpha2
7
-1"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
...
...
@@ -184,8 +184,8 @@ msgid ""
"debian.org>E<gt>."
msgstr ""
"Fehler können durch Einreichen eines Fehlerberichtes für das live-build "
"Paket im
Debian
Bug Tracking System unter E<lt>I<http://bugs.debian.org/"
"
>E<gt> oder
durch Senden einer E-Mail an die
Debian Live
Mailing Liste unter "
"Paket im Bug Tracking System unter E<lt>I<http://bugs.debian.org/
>E<gt> oder
"
"durch Senden einer E-Mail an die
Live Systems
Mailing Liste unter "
"E<lt>I<debian-live@lists.debian.org>E<gt> (englischsprachig) mitgeteilt "
"werden."
...
...
manpages/po/es/lb_bootstrap_cdebootstrap.1.po
View file @
e422a68c
...
...
@@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
"Project-Id-Version: live-build 4.0~alpha2
6
-1\n"
"POT-Creation-Date: 2013-0
9
-1
9
09:
09
+0300\n"
"Project-Id-Version: live-build 4.0~alpha2
7
-1\n"
"POT-Creation-Date: 2013-
1
0-1
8
09:
45
+0300\n"
"PO-Revision-Date: 2010-05-24 09:59+0300\n"
"Last-Translator: Carlos Zuferri <chals@altorricon.com>\n"
"Language-Team: none\n"
...
...
@@ -23,14 +23,14 @@ msgstr "LIVE-BUILD"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "2013-0
9
-1
9
"
msgstr "1
9.09
.2013"
msgid "2013-
1
0-1
8
"
msgstr "1
8.10
.2013"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "4.0~alpha2
6
-1"
msgstr "4.0~alpha2
6
-1"
msgid "4.0~alpha2
7
-1"
msgstr "4.0~alpha2
7
-1"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
...
...
manpages/po/es/lb_bootstrap_debootstrap.1.po
View file @
e422a68c
...
...
@@ -4,8 +4,8 @@
#
msgid ""
msgstr ""
"Project-Id-Version: live-build 4.0~alpha2
6
-1\n"
"POT-Creation-Date: 2013-0
9
-1
9
09:
09
+0300\n"
"Project-Id-Version: live-build 4.0~alpha2
7
-1\n"
"POT-Creation-Date: 2013-
1
0-1
8
09:
45
+0300\n"
"PO-Revision-Date: 2010-05-24 09:59+0300\n"
"Last-Translator: Carlos Zuferri <chals@altorricon.com>\n"
"Language-Team: none\n"
...
...
@@ -23,14 +23,14 @@ msgstr "LIVE-BUILD"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "2013-0
9
-1
9
"
msgstr "1
9.09
.2013"
msgid "2013-
1
0-1
8
"
msgstr "1
8.10
.2013"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "4.0~alpha2
6
-1"
msgstr "4.0~alpha2
6
-1"
msgid "4.0~alpha2
7
-1"
msgstr "4.0~alpha2
7
-1"
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
...
...
manpages/pot/lb_bootstrap_cdebootstrap.1.pot
View file @
e422a68c
...
...
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-build VERSION\n"
"POT-Creation-Date: 2013-0
9
-1
9
09:
09
+0300\n"
"POT-Creation-Date: 2013-
1
0-1
8
09:
45
+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -25,13 +25,13 @@ msgstr ""
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "2013-0
9
-1
9
"
msgid "2013-
1
0-1
8
"
msgstr ""
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "4.0~alpha2
6
-1"
msgid "4.0~alpha2
7
-1"
msgstr ""
#. type: TH
...
...
manpages/pot/lb_bootstrap_debootstrap.1.pot
View file @
e422a68c
...
...
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-build VERSION\n"
"POT-Creation-Date: 2013-0
9
-1
9
09:
09
+0300\n"
"POT-Creation-Date: 2013-
1
0-1
8
09:
45
+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -25,13 +25,13 @@ msgstr ""
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "2013-0
9
-1
9
"
msgid "2013-
1
0-1
8
"
msgstr ""
#. type: TH
#: en/lb_bootstrap_cdebootstrap.1:9 en/lb_bootstrap_debootstrap.1:9
#, no-wrap
msgid "4.0~alpha2
6
-1"
msgid "4.0~alpha2
7
-1"
msgstr ""
#. type: TH
...
...
scripts/build/binary_hdd
View file @
e422a68c
...
...
@@ -173,7 +173,7 @@ esac
case
"
${
LB_BUILD_WITH_CHROOT
}
"
in
true
)
Chroot
chroot
"parted -s
${
FREELO
}
mklabel
${
PARTITION_TABLE_TYPE
}
"
||
true
Chroot
chroot
"parted -s
${
FREELO
}
mkpart primary
${
PARTITION_TYPE
}
0% 100%"
||
true
Chroot
chroot
"parted
-a optimal
-s
${
FREELO
}
mkpart primary
${
PARTITION_TYPE
}
0% 100%"
||
true
Chroot
chroot
"parted -s
${
FREELO
}
set 1 boot on"
||
true
Chroot
chroot
"parted -s
${
FREELO
}
set 1 lba off"
||
true
...
...
@@ -185,7 +185,7 @@ case "${LB_BUILD_WITH_CHROOT}" in
false
)
parted
-s
${
FREELO
}
mklabel
${
PARTITION_TABLE_TYPE
}
||
true
parted
-s
${
FREELO
}
mkpart primary
${
PARTITION_TYPE
}
0% 100%
||
true
parted
-a
optimal
-s
${
FREELO
}
mkpart primary
${
PARTITION_TYPE
}
0% 100%
||
true
parted
-s
"
${
FREELO
}
"
set
1 boot on
||
true
parted
-s
"
${
FREELO
}
"
set
1 lba off
||
true
...
...
scripts/build/bootstrap
View file @
e422a68c
...
...
@@ -55,6 +55,7 @@ lb chroot_apt install ${@}
lb bootstrap_archive-keys
${
@
}
lb bootstrap_archives binary
${
@
}
lb bootstrap_hooks
${
@
}
# Deconfiguring chroot
lb chroot_apt remove
${
@
}
...
...
scripts/build/bootstrap_cdebootstrap
View file @
e422a68c
#!/usr/bin/python
3.3
#!/usr/bin/python
## live-build(7) - System Build
Scrip
ts
## live-build(7) -
Live
System Build
Componen
ts
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
...
...
@@ -17,21 +17,22 @@ import subprocess
import
sys
# TODO:
# - lockfile handling
# - cdebootstrap-options from config
# - use gettext for i18n
# - take mirrors from config/archives/debian.{bootstrap,chroot}
# TODOs:
# * logfile output
# * lockfile handling
# * use gettext for i18n
# * cdebootstrap-options from config
# * take mirrors from config/archives/debian.{bootstrap,chroot}
def
main
():
## Parsing Arguments
arguments
=
argparse
.
ArgumentParser
(
prog
=
'lb bootstrap_cdebootstrap'
,
usage
=
'%(prog)s [arguments]'
,
description
=
'''live-build contains the
program
s to build a live system from a configuration directory.
The
lb
bootstrap_cdebootstrap
program
bootstraps the chroot system with cdebootstrap.'''
,
description
=
'''live-build contains the
component
s to build a live system from a configuration directory.
The bootstrap_cdebootstrap
command
bootstraps the chroot system with cdebootstrap.'''
,
epilog
=
'See
\'
man lb_bootstrap_cdebootstrap
\'
for more information.'
,
version
=
'live-build 4
.0
'
,
version
=
'live-build 4'
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
)
...
...
@@ -109,7 +110,8 @@ def main():
if
verbose
:
print
(
'I: Copying cache/packages.bootstrap/*.deb to chroot/var/cache/bootstrap/*.deb'
)
# Note: copy instead of move to make cache survive incomplete build
# Notes:
# * copy instead of move to make cache survive incomplete build
os
.
makedirs
(
'chroot/var/cache/bootstrap'
,
exist_ok
=
True
)
for
package
in
glob
.
glob
(
'cache/packages.bootstrap/*.deb'
):
...
...
@@ -119,9 +121,10 @@ def main():
if
verbose
:
print
(
'I: Calling
\'
/usr/bin/debootstrap --download-only '
+
cdebootstrap_options
+
'
\'
'
)
# Note: calling cdebootstrap twice:
# - to use already downloaded /var/cache/bootstrap/*.deb on incomplete builds
# - to use /var/cache/boottrap/*.deb for debian-installer
# Notes:
# * calling cdebootstrap twice:
# - to use already downloaded /var/cache/bootstrap/*.deb on incomplete builds
# - to use /var/cache/boottrap/*.deb for debian-installer
cdebootstrap
=
subprocess
.
call
(
'/usr/bin/cdebootstrap --download-only '
+
cdebootstrap_options
,
shell
=
True
)
# package cache
...
...
@@ -129,8 +132,9 @@ def main():
if
verbose
:
print
(
'I: Copying chroot/var/cache/bootstrap/*.deb to cache/packages.bootstrap'
)
# Notes: - remove first to keep cache minimal
# - remove files instead of directory to work with symlinked directory
# Notes:
# * remove first to keep cache minimal
# * remove files instead of directory to work with symlinked directory
for
package
in
glob
.
glob
(
'cache/packages.bootstrap/*.deb'
):
os
.
remove
(
package
)
...
...
scripts/build/bootstrap_debootstrap
View file @
e422a68c
#!/usr/bin/python
3.3
#!/usr/bin/python
## live-build(7) - System Build
Scrip
ts
## live-build(7) -
Live
System Build
Componen
ts
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
...
...
@@ -18,20 +18,21 @@ import sys
# TODO:
# - lockfile handling
# - debootstrap-options from config
# - use gettext for i18n
# - take mirrors from config/archives/debian.{bootstrap,chroot}
# * logfile output
# * lockfile handling
# * use gettext for i18n
# * debootstrap-options from config
# * take mirrors from config/archives/debian.{bootstrap,chroot}
def
main
():
## Parsing Arguments
arguments
=
argparse
.
ArgumentParser
(
prog
=
'lb bootstrap_debootstrap'
,
usage
=
'%(prog)s [arguments]'
,
description
=
'''live-build contains the
program
s to build a live system from a configuration directory.
The
lb
bootstrap_debootstrap
program
bootstraps the chroot system with debootstrap.'''
,
description
=
'''live-build contains the
component
s to build a live system from a configuration directory.
The bootstrap_debootstrap
command
bootstraps the chroot system with debootstrap.'''
,
epilog
=
'See
\'
man lb_bootstrap_debootstrap
\'
for more information.'
,
version
=
'live-build 4
.0
'
,
version
=
'live-build 4'
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
)
...
...
@@ -114,7 +115,8 @@ def main():
if
verbose
:
print
(
'I: Copying cache/packages.bootstrap/*.deb to chroot/var/cache/apt/archives/*.deb'
)
# Note: copy instead of move to make cache survive incomplete build
# Notes:
# * copy instead of move to make cache survive incomplete build
os
.
makedirs
(
'chroot/var/cache/apt/archives'
,
exist_ok
=
True
)
for
package
in
glob
.
glob
(
'cache/packages.bootstrap/*.deb'
):
...
...
@@ -132,14 +134,16 @@ def main():
if
verbose
:
print
(
'I: Copying chroot/var/cache/apt/archives/*.deb to cache/packages.bootstrap'
)
# Note: remove first to keep cache minimal,
# remove files instead of directory to work with symlinked directory
# Notes:
# * remove first to keep cache minimal,
# * remove files instead of directory to work with symlinked directory
for
package
in
glob
.
glob
(
'cache/packages.bootstrap/*.deb'
):
os
.
remove
(
package
)
os
.
makedirs
(
'cache/packages.bootstrap'
,
exist_ok
=
True
)
# Note: move instead of copy to keep stage minimal
# Notes:
# * move instead of copy to keep stage minimal
for
package
in
glob
.
glob
(
'chroot/var/cache/apt/archives/*.deb'
):
shutil
.
move
(
package
,
'cache/packages.bootstrap'
)
...
...
scripts/build/bootstrap_hooks
0 → 100755
View file @
e422a68c
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
set
-e
# Including common functions
[
-e
"
${
LIVE_BUILD
}
/scripts/build.sh"
]
&&
.
"
${
LIVE_BUILD
}
/scripts/build.sh"
||
.
/usr/lib/live/build.sh
# Setting static variables
DESCRIPTION
=
"
$(
Echo
'execute hooks in bootstrap'
)
"
HELP
=
""
USAGE
=
"
${
PROGRAM
}
[--force]"
Arguments
"
${
@
}
"
# Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
Echo_message
"Begin executing hooks..."
# Requiring stage file
Require_stagefile .build/config .build/bootstrap
# Checking stage file
Check_stagefile .build/bootstrap_hooks
# Checking lock file
Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
## Processing distribution hooks
# Make build config available to bootstrap hooks. First, make the bind
# mount and then make it read-only. This can't happen in one mount
# command, then the resulting mount will be rw (see mount(8)). Making it
# ro prevents modifications and prevents accidentally removing the
# contents of the config directory when removing the chroot.
mkdir
-p
chroot
/root/config
mount
-o
bind
config
chroot
/root/config
mount
-o
remount,ro,bind config
chroot
/root/config
if
Find_files config/hooks/
*
.bootstrap
then
for
_HOOK
in
config/hooks/
*
.bootstrap
do
# Copying hook
cp
"
${
_HOOK
}
"
chroot
/root
# Making hook executable
if
[
!
-x
chroot
/root/
"
$(
basename
${
_HOOK
}
)
"
]
then
chmod
+x
chroot
/root/
"
$(
basename
${
_HOOK
}
)
"
fi
# Executing hook
Chroot
chroot
"/root/
$(
basename
${
_HOOK
}
)
"
||
{
Echo_error
"
${
_HOOK
}
failed (exit non-zero). You should check for errors."
;
exit
1
;
}
# Removing hook
rm
-f
chroot
/root/
"
$(
basename
${
_HOOK
}
)
"
done
# Creating stage file
Create_stagefile .build/bootstrap_hooks
fi
# Remove bind mount of build config inside chroot.
umount
chroot
/root/config
rmdir chroot
/root/config
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment