Commit 68ca1cd4 authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Adding upstream version 4.0~alpha29.

parent af92cc7c
......@@ -13,11 +13,8 @@ test:
@for SCRIPT in $(SCRIPTS); \
do \
if ! head -n1 $${SCRIPT} | grep -qs python; \
then \
sh -n $${SCRIPT}; \
echo -n "."; \
fi; \
sh -n $${SCRIPT}; \
echo -n "."; \
done
@echo " done."
......@@ -28,11 +25,8 @@ test:
then \
for SCRIPT in $(SCRIPTS); \
do \
if ! head -n1 $${SCRIPT} | grep -qs python; \
then \
checkbashisms -f -x $${SCRIPT}; \
echo -n "."; \
fi; \
checkbashisms -f -x $${SCRIPT}; \
echo -n "."; \
done; \
else \
echo "WARNING: skipping bashism test - you need to install devscripts."; \
......@@ -55,6 +49,7 @@ install:
mkdir -p $(DESTDIR)/usr/lib/live
cp -a scripts/* $(DESTDIR)/usr/lib/live
cp -a components/* $(DESTDIR)/usr/lib/live/build
# Installing documentation
mkdir -p $(DESTDIR)/usr/share/doc/live-build
......
4.0~alpha28-1
4.0~alpha29-1
#!/usr/bin/python3
## live-build(7) - Live System Build Components
## 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.
import argparse
import configparser
import glob
import os
import shutil
import subprocess
import sys
# TODO:
# * logfile output
# * lockfile handling
# * use gettext for i18n
def main():
## Parsing Arguments
arguments = argparse.ArgumentParser(
prog = 'lb binary_hooks',
usage = '%(prog)s [arguments]',
description = '''live-build contains the components to build a live system from a configuration directory.
The binary_hooks command executes hooks after the binary stage.''',
epilog = 'See \'man lb_binary_hooks\' for more information.',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()
# --verbose
verbose = args.verbose
## Executing hooks
# stagefile
if os.path.isfile('.build/binary_hooks'):
if verbose:
print('I: binary_hooks already done - nothing to do')
sys.exit(0)
# dependencies
if not os.path.isfile('.build/bootstrap'):
print('E: bootstrap stage missing - aborting', file=sys.stderr)
if verbose:
print('I: use \'lb bootstrap\' to bootstrap system')
sys.exit(1)
# hooks
if not glob.glob('config/hooks/*.hook') and not glob.glob('config/hooks/*.hook.binary'):
if verbose:
print ('I: no binary hooks found at config/hooks/*.hook{,.binary} - nothing to do')
sys.exit(0)
# bind mount configuration directory
if verbose:
print('I: Mounting config to binary/live-build/config')
os.makedirs('binary/live-build/config', exist_ok=True)
mount = subprocess.call('mount -o bind config binary/live-build/config', shell=True)
remount = subprocess.call('mount -o remount,ro,bind binary/live-build/config', shell=True)
# process hooks
os.makedirs('binary/live-build', exist_ok=True)
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.binary')
for hook in hooks:
if verbose:
print('I: Copying config/hooks/*.hook.binary to binary/live-build')
shutil.copy(hook, os.path.join('binary/live-build/' + os.path.basename(hook)), follow_symlinks=True)
if verbose:
print('I: Executing \' ' + hook + '\'')
os.chmod(hook, 0o755)
exec_hook = subprocess.call('cd binary && live-build/' + os.path.basename(hook), shell=True)
os.remove('binary/live-build/' + os.path.basename(hook))
# unmount coniguration directory
umount = subprocess.call('umount binary/live-build/config', shell=True)
os.rmdir('binary/live-build/config')
os.rmdir('binary/live-build')
## stagefile
os.makedirs('.build', exist_ok=True)
open('.build/binary_hooks', 'w').close()
if __name__ == '__main__':
main()
......@@ -32,11 +32,11 @@ def main():
description = '''live-build contains the components 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',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--cdebootstrap-options', help='set cdebootstrap(1) options' )
args = arguments.parse_args()
......
......@@ -32,11 +32,11 @@ def main():
description = '''live-build contains the components 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',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--debootstrap-options', help='set debootstrap(8) options' )
args = arguments.parse_args()
......
#!/usr/bin/python3
## live-build(7) - Live System Build Components
## 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.
import argparse
import configparser
import glob
import os
import shutil
import subprocess
import sys
# TODO:
# * logfile output
# * lockfile handling
# * use gettext for i18n
def main():
## Parsing Arguments
arguments = argparse.ArgumentParser(
prog = 'lb bootstrap_hooks',
usage = '%(prog)s [arguments]',
description = '''live-build contains the components to build a live system from a configuration directory.
The bootstrap_hooks command executes hooks after the bootstrap stage.''',
epilog = 'See \'man lb_bootstrap_hooks\' for more information.',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()
# --verbose
verbose = args.verbose
## Executing hooks
# stagefile
if os.path.isfile('.build/bootstrap_hooks'):
if verbose:
print('I: bootstrap_hooks already done - nothing to do')
sys.exit(0)
# dependencies
if not os.path.isfile('.build/bootstrap'):
print('E: bootstrap stage missing - aborting', file=sys.stderr)
if verbose:
print('I: use \'lb bootstrap\' to bootstrap system')
sys.exit(1)
# hooks
if not glob.glob('config/hooks/*.hook') and not glob.glob('config/hooks/*.hook.bootstrap'):
if verbose:
print ('I: no bootstrap hooks found at config/hooks/*.hook{,.bootstrap} - nothing to do')
sys.exit(0)
# bind mount configuration directory
if verbose:
print('I: Mounting config to chroot/live-build/config')
os.makedirs('chroot/live-build/config', exist_ok=True)
mount = subprocess.call('mount -o bind config chroot/live-build/config', shell=True)
remount = subprocess.call('mount -o remount,ro,bind chroot/live-build/config', shell=True)
# process hooks
os.makedirs('chroot/live-build', exist_ok=True)
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.bootstrap')
for hook in hooks:
if verbose:
print('I: Copying config/hooks/*.hook.bootstrap to chroot/live-build')
shutil.copy(hook, os.path.join('chroot/live-build/' + os.path.basename(hook)), follow_symlinks=True)
if verbose:
print('I: Executing \' ' + hook + '\'')
os.chmod(hook, 0o755)
exec_hook = subprocess.call('chroot chroot /live-build/' + os.path.basename(hook), shell=True)
os.remove('chroot/live-build/' + os.path.basename(hook))
# unmount coniguration directory
umount = subprocess.call('umount chroot/live-build/config', shell=True)
os.rmdir('chroot/live-build/config')
os.rmdir('chroot/live-build')
## stagefile
os.makedirs('.build', exist_ok=True)
open('.build/bootstrap_hooks', 'w').close()
if __name__ == '__main__':
main()
#!/usr/bin/python3
## live-build(7) - Live System Build Components
## 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.
import argparse
import configparser
import glob
import os
import shutil
import subprocess
import sys
# TODO:
# * logfile output
# * lockfile handling
# * use gettext for i18n
def main():
## Parsing Arguments
arguments = argparse.ArgumentParser(
prog = 'lb chroot_hooks',
usage = '%(prog)s [arguments]',
description = '''live-build contains the components to build a live system from a configuration directory.
The chroot_hooks command executes hooks after the chroot stage.''',
epilog = 'See \'man lb_chroot_hooks\' for more information.',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()
# --verbose
verbose = args.verbose
## Executing hooks
# stagefile
if os.path.isfile('.build/chroot_hooks'):
if verbose:
print('I: chroot_hooks already done - nothing to do')
sys.exit(0)
# dependencies
if not os.path.isfile('.build/bootstrap'):
print('E: bootstrap stage missing - aborting', file=sys.stderr)
if verbose:
print('I: use \'lb bootstrap\' to bootstrap system')
sys.exit(1)
# hooks
if not glob.glob('config/hooks/*.hook') and not glob.glob('config/hooks/*.hook.chroot'):
if verbose:
print ('I: no chroot hooks found at config/hooks/*.hook{,.chroot} - nothing to do')
sys.exit(0)
# bind mount configuration directory
if verbose:
print('I: Mounting config to chroot/live-build/config')
os.makedirs('chroot/live-build/config', exist_ok=True)
mount = subprocess.call('mount -o bind config chroot/live-build/config', shell=True)
remount = subprocess.call('mount -o remount,ro,bind chroot/live-build/config', shell=True)
# process hooks
os.makedirs('chroot/live-build', exist_ok=True)
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.chroot')
for hook in hooks:
if verbose:
print('I: Copying config/hooks/*.hook.chroot to chroot/live-build')
shutil.copy(hook, os.path.join('chroot/live-build/' + os.path.basename(hook)), follow_symlinks=True)
if verbose:
print('I: Executing \' ' + hook + '\'')
os.chmod(hook, 0o755)
exec_hook = subprocess.call('chroot chroot /live-build/' + os.path.basename(hook), shell=True)
os.remove('chroot/live-build/' + os.path.basename(hook))
# unmount coniguration directory
umount = subprocess.call('umount chroot/live-build/config', shell=True)
os.rmdir('chroot/live-build/config')
os.rmdir('chroot/live-build')
## stagefile
os.makedirs('.build', exist_ok=True)
open('.build/chroot_hooks', 'w').close()
if __name__ == '__main__':
main()
#!/usr/bin/python3
## live-build(7) - Live System Build Components
## 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.
import argparse
import configparser
import glob
import os
import shutil
import subprocess
import sys
# TODO:
# * logfile output
# * lockfile handling
# * use gettext for i18n
def main():
## Parsing Arguments
arguments = argparse.ArgumentParser(
prog = 'lb source_hooks',
usage = '%(prog)s [arguments]',
description = '''live-build contains the components to build a live system from a configuration directory.
The source_hooks command executes hooks after the source stage.''',
epilog = 'See \'man lb_source_hooks\' for more information.',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()
# --verbose
verbose = args.verbose
## Executing hooks
# stagefile
if os.path.isfile('.build/source_hooks'):
if verbose:
print('I: source_hooks already done - nothing to do')
sys.exit(0)
# dependencies
if not os.path.isfile('.build/source'):
print('E: source stage missing - aborting', file=sys.stderr)
if verbose:
print('I: use \'lb source\' to source system')
sys.exit(1)
# hooks
if not glob.glob('config/hooks/*.hook') and not glob.glob('config/hooks/*.hook.source'):
if verbose:
print ('I: no source hooks found at config/hooks/*.hook{,.source} - nothing to do')
sys.exit(0)
# bind mount configuration directory
if verbose:
print('I: Mounting config to source/live-build/config')
os.makedirs('source/live-build/config', exist_ok=True)
mount = subprocess.call('mount -o bind config source/live-build/config', shell=True)
remount = subprocess.call('mount -o remount,ro,bind source/live-build/config', shell=True)
# process hooks
os.makedirs('source/live-build', exist_ok=True)
hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.source')
for hook in hooks:
if verbose:
print('I: Copying config/hooks/*.hook.source to source/live-build')
shutil.copy(hook, os.path.join('source/live-build/' + os.path.basename(hook)), follow_symlinks=True)
if verbose:
print('I: Executing \' ' + hook + '\'')
os.chmod(hook, 0o755)
exec_hook = subprocess.call('cd source && live-build/' + os.path.basename(hook), shell=True)
os.remove('source/live-build/' + os.path.basename(hook))
# unmount coniguration directory
umount = subprocess.call('umount source/live-build/config', shell=True)
os.rmdir('source/live-build/config')
os.rmdir('source/live-build')
## stagefile
os.makedirs('.build', exist_ok=True)
open('.build/source_hooks', 'w').close()
if __name__ == '__main__':
main()
......@@ -501,28 +501,6 @@ Set_defaults ()
# Setting union filesystem
LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-aufs}"
# Setting distribution hooks
LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-disable-kexec-tools \
remove-adjtime-configuration \
remove-backup-files \
remove-dbus-machine-id \
remove-gnome-icon-cache \
remove-log-files \
remove-mdadm-configuration \
remove-openssh-server-host-keys \
remove-python-py \
remove-temporary-files \
remove-ssl-cert-snakeoil \
remove-udev-persistent-cd-rules \
remove-udev-persistent-net-rules \
remove-systemd-machine-id \
update-apt-file-cache \
update-apt-xapian-index \
update-glx-alternative \
update-mlocate-database \
update-nvidia-alternative}"
#remove-apt-sources-lists
# Setting interactive shell/X11/Xnest
LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
......
.\" 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.
.\"
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha29\-1 "Live Systems Projekt"
.SH NAME
\fBlive\-build\fP \- System Build Komponenten
.SH SYNTAX
\fBlb binary_hooks\fP [\-\-verbose]
.PP
\fBlb binary_hooks\fP [\-\-help]
.br
\fBlb binary_hooks\fP [\-\-version]
.
.SH BESCHREIBUNG
live\-build enthält die Komponenten um ein Live System von einem
Konfigurationsverzeichnis zu erstellen.
.PP
Der \fBlb binary_hooks\fP Befehl führt Hooks nach dem Binary Stage aus.
.SH OPTIONEN
.IP \-\-verbose 4
setzt verbose Option für mehr Ausgaben (Standardwert: aus).
.IP "\-h, \-\-help" 4
zeigt Hilfenachricht und beendet sich.
.IP "\-v, \-\-version" 4
zeigt Versionsnummer des Programms und beendet sich.
.SH DATEIEN
.IP \fBconfig/build\fP 4
.IP \fBconfig/hooks/*.hook\fP 4
.IP \fBconfig/hooks/*.hook.binary\fP 4
.IP \fBbinary\fP 4
.SH "SIEHE AUCH"
.IP \fIlb_bootstrap_hooks\fP(1) 4
.IP \fIlb_chroot_hooks\fP(1) 4
.IP \fIlb_source_hooks\fP(1)
.SH HOMEPAGE
Weitere Informationen über live\-build und das Live Systems Projekt können
auf der Homepage unter <\fIhttp://live\-systems.org/\fP> und im Handbuch
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 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>
geschrieben.
......@@ -11,10 +11,10 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BUILD 1 28.10.2013 4.0~alpha27\-1 "Live Systems Projekt"
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha29\-1 "Live Systems Projekt"
.SH NAME
\fBlive\-build\fP \- System Build Skripte
\fBlive\-build\fP \- System Build Komponenten
.SH SYNTAX
\fBlb bootstrap_cdebootstrap\fP
......@@ -25,22 +25,22 @@
\fBlb bootstrap_cdebootstrap\fP [\-\-version]
.
.SH BESCHREIBUNG
live\-build enthält die Skripte um ein Live System von einem
live\-build enthält die Komponenten um ein Live System von einem
Konfigurationsverzeichnis zu erstellen.
.PP
Das \fBlb bootstrap_cdebootstrap\fP Programm erstellt das Chroot System mit
cdebootstrap(1).
Der \fBlb bootstrap_cdebootstrap\fP Befehl erstellt das Chroot System mit