Commit 97560dca authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Adding upstream version 4.0~alpha31.

parent 6ed737c9
...@@ -6,3 +6,16 @@ interconnection between them. ...@@ -6,3 +6,16 @@ interconnection between them.
Once done, the newly Python sources will be shaped into modules and Once done, the newly Python sources will be shaped into modules and
subcommands properly. subcommands properly.
---
Some notes on coding style:
* live-build commands should be *prefixed* with the stage:
chroot-includes, not includes-chroot; -> tab-completion
* directories/files in the config directory should be *suffixed* with the stage:
includes.chroot, not chroot.includes; -> sort-order
* cli arguments should be *suffixed* with the stage:
--mirror-bootstrap, not --bootstrap-mirror; -> tab-completion
4.0~alpha30-1 4.0~alpha31-1
...@@ -81,16 +81,12 @@ def main(): ...@@ -81,16 +81,12 @@ def main():
# process includes # process includes
if glob.glob('config/includes/*') or glob.glob('config/includes/.*'): if glob.glob('config/includes/*') or glob.glob('config/includes/.*'):
hooks = glob.glob('config/includes/*') + glob.glob('config/includes/.*')
if verbose: if verbose:
print('I: Copying config/includes to binary') print('I: Copying config/includes to binary')
cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../binary', shell=True) cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../binary', shell=True)
if glob.glob('config/includes.binary/*') and not glob.glob('config/includes.binary/.*'): if glob.glob('config/includes.binary/*') or glob.glob('config/includes.binary/.*'):
hooks = glob.glob('config/includes.binary/*') + glob.glob('config/includes.binary/.*')
if verbose: if verbose:
print('I: Copying config/includes.binary to binary') print('I: Copying config/includes.binary to binary')
......
...@@ -17,7 +17,7 @@ import subprocess ...@@ -17,7 +17,7 @@ import subprocess
import sys import sys
# TODOs: # TODO:
# * logfile output # * logfile output
# * lockfile handling # * lockfile handling
# * use gettext for i18n # * use gettext for i18n
......
...@@ -80,16 +80,12 @@ def main(): ...@@ -80,16 +80,12 @@ def main():
# process includes # process includes
if glob.glob('config/includes/*') or glob.glob('config/includes/.*'): if glob.glob('config/includes/*') or glob.glob('config/includes/.*'):
hooks = glob.glob('config/includes/*') + glob.glob('config/includes/.*')
if verbose: if verbose:
print('I: Copying config/includes to chroot') print('I: Copying config/includes to chroot')
cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../chroot', shell=True) cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../chroot', shell=True)
if glob.glob('config/includes.bootstrap/*') and not glob.glob('config/includes.bootstrap/.*'): if glob.glob('config/includes.bootstrap/*') or glob.glob('config/includes.bootstrap/.*'):
hooks = glob.glob('config/includes.bootstrap/*') + glob.glob('config/includes.bootstrap/.*')
if verbose: if verbose:
print('I: Copying config/includes.bootstrap to chroot') print('I: Copying config/includes.bootstrap to chroot')
......
...@@ -80,16 +80,12 @@ def main(): ...@@ -80,16 +80,12 @@ def main():
# process includes # process includes
if glob.glob('config/includes/*') or glob.glob('config/includes/.*'): if glob.glob('config/includes/*') or glob.glob('config/includes/.*'):
hooks = glob.glob('config/includes/*') + glob.glob('config/includes/.*')
if verbose: if verbose:
print('I: Copying config/includes to chroot') print('I: Copying config/includes to chroot')
cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../chroot', shell=True) cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../chroot', shell=True)
if glob.glob('config/includes.chroot/*') and not glob.glob('config/includes.chroot/.*'): if glob.glob('config/includes.chroot/*') or glob.glob('config/includes.chroot/.*'):
hooks = glob.glob('config/includes.chroot/*') + glob.glob('config/includes.chroot/.*')
if verbose: if verbose:
print('I: Copying config/includes.chroot to chroot') print('I: Copying config/includes.chroot to chroot')
......
#!/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
import urllib.request
# TODO:
# * logfile output
# * lockfile handling
# * use gettext for i18n
def main():
## Parsing Arguments
arguments = argparse.ArgumentParser(
prog = 'lb init',
usage = '%(prog)s [arguments]',
description = '''live-build contains the components to build a live system from a configuration directory.
The init command creates an empty configuration directory or reinitialize an existing one.''',
epilog = 'See \'man lb-init\' 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')
arguments.add_argument('--distribution', help='set default distribution')
arguments.add_argument('--project', help='set project defaults')
args = arguments.parse_args()
# --verbose
verbose = args.verbose
# --distribution
distribution = args.distribution
# --project
project = args.project
## Setting defaults
if not project:
# FIXME: hardcoded project information
project = 'debian'
if not distribution:
# FIXME hardcoded release information
default_distribution = { 'debian' : 'wheezy',
'progress-linux' : 'baureo',
}
distribution = default_distribution[project]
## Creating configuration directory
# stagefile
if os.path.isdir('.build'):
if verbose:
print('I: configuration directory already initialized - nothing to do')
# Notes:
# * until further tests, we do not allow to re-run lb init on an already initialized directory.
sys.exit(0)
# Print warning about live-build development version
print('WARNING: THIS VERSION OF LIVE-BUILD IS EXPERIMENTAL\n')
print('IT IS UNFINISHED AND CHANGES HEAVILY WITHOUT PRIOR NOTICE.')
print('USER DISCRETION IS ADVISED.\n')
print('Please also note that you are running a live-build development version')
print('and that we are only supporting the newest development version.\n')
print('Make sure you are using the newest version at all times.')
# Configuring default archive-keys
if (project == 'progress-linux'):
# dependencies
if not os.path.isfile('/usr/bin/gpgv'):
print('E: /usr/bin/gpgv - no such file', file=sys.stderr)
if verbose:
print('I: gnupg can be obtained from:\n'
'I: http://www.gnupg.org/\n'
'I: On Debian based systems, gnupg can be installed with:\n'
'I: # sudo apt-get install gnupg')
sys.exit(1)
os.makedirs('config/archives', exist_ok=True)
# FIXME hardcoded release information
archive_keys_url = 'http://cdn.archive.progress-linux.org/packages/project/keys/'
archive_keys = { 'artax' : [ 'archive-key-1-artax.asc' , 'archive-key-1+-artax-backports.asc' ],
'artax-backports' : [ 'archive-key-1-artax.asc' , 'archive-key-1+-artax-backports.asc' ],
'baureo' : [ 'archive-key-2-baureo.asc' , 'archive-key-2+-baureo-backports.asc' ],
'baureo-backports' : [ 'archive-key-2-baureo.asc' , 'archive-key-2+-baureo-backports.asc' ],
'cairon' : [ 'archive-key-3-cairon.asc' , 'archive-key-3+-cairon-backports.asc' ],
'cairon-backports' : [ 'archive-key-3-cairon.asc' , 'archive-key-3+-cairon-backports.asc' ],
}
keys = archive_keys[distribution]
for key in keys:
url = archive_keys_url + key
target = os.path.splitext(os.path.basename(key))
if verbose:
print('I: Downloading ' + url)
r = urllib.request.urlopen(url)
f = open('config/archives/' + target[0] + '.key', 'w')
f.write(r.read())
# FIXME: download signatures and verify them against debian-keyring
# Configuring default hooks
os.makedirs('config/hooks', exist_ok=True)
for hook in glob.glob('/usr/share/live/build/hooks/*.hook*'):
os.symlink(hook, os.path.join('config/hooks/' + os.path.basename(hook)))
# Configuring default includes
os.makedirs('config/includes', exist_ok=True)
os.makedirs('config/includes.bootstrap', exist_ok=True)
os.makedirs('config/includes.chroot', exist_ok=True)
os.makedirs('config/includes.binary', exist_ok=True)
os.makedirs('config/includes.source', exist_ok=True)
# Configuring default package lists
os.makedirs('config/package-lists', exist_ok=True)
f = open('config/package-lists/live.list.chroot', 'w')
f.write('live-boot\nlive-config\nlive-config-sysvinit\n')
f.close()
## stagefile
os.makedirs('.build', exist_ok=True)
if __name__ == '__main__':
main()
...@@ -81,16 +81,12 @@ def main(): ...@@ -81,16 +81,12 @@ def main():
# process includes # process includes
if glob.glob('config/includes/*') or glob.glob('config/includes/.*'): if glob.glob('config/includes/*') or glob.glob('config/includes/.*'):
hooks = glob.glob('config/includes/*') + glob.glob('config/includes/.*')
if verbose: if verbose:
print('I: Copying config/includes to source') print('I: Copying config/includes to source')
cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../source', shell=True) cpio = subprocess.call('cd config/includes && find . | cpio -dmpu --no-preserve-owner ../../source', shell=True)
if glob.glob('config/includes.source/*') and not glob.glob('config/includes.source/.*'): if glob.glob('config/includes.source/*') or glob.glob('config/includes.source/.*'):
hooks = glob.glob('config/includes.source/*') + glob.glob('config/includes.source/.*')
if verbose: if verbose:
print('I: Copying config/includes.source to source') print('I: Copying config/includes.source to source')
......
...@@ -5,6 +5,7 @@ binary*.tar* ...@@ -5,6 +5,7 @@ binary*.tar*
binary*.contents binary*.contents
binary*.packages binary*.packages
binary*.zsync binary*.zsync
live-image-*
.build/ .build/
build.log build.log
...@@ -13,6 +14,7 @@ cache/ ...@@ -13,6 +14,7 @@ cache/
chroot/ chroot/
chroot.packages.* chroot.packages.*
chroot.files
config/binary config/binary
config/bootstrap config/bootstrap
......
...@@ -28,7 +28,7 @@ build: po4a.cfg ...@@ -28,7 +28,7 @@ build: po4a.cfg
exit 1; \ exit 1; \
fi fi
po4a --keep 0 --no-backups --package-name live-build po4a.cfg po4a --keep 0 --package-name live-build po4a.cfg
clean: clean:
rm -f po/*/*.po~ rm -f po/*/*.po~
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
.\" 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 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME
\fBlive\-build\fP \- System Build Komponenten
.SH SYNTAX
\fBlb init\fP [\-\-distribution \fIDISTRIBUTION\fP] [\-\-project \fIPROJEKT\fP]
[\-\-verbose]
.PP
\fBlb init\fP [\-\-help]
.br
\fBlb init\fP [\-\-version]
.
.SH BESCHREIBUNG
live\-build enthält die Komponenten um ein Live System von einem
Konfigurationsverzeichnis zu erstellen.
.PP
Das \fBlb init\fP Kommando erstellt ein leeres Konfigurationsverzeichnis oder
re\-initialisiert ein bestehendes.
.SH OPTIONEN
.IP \fB\-\-distribution\fP 4
sets die Standard Distribution.
.IP \fB\-\-project\fP 4
setzt das Projeckt von dem die internen Standardwerte abgeleitet
werden. Momentan gültige Projekte sind 'debian' und 'progress\-linux'
(Standardwert: debian).
.IP \fB\-\-verbose\fP 4
setzt verbose Option für mehr Ausgaben (Standardwert: aus).
.IP "\fB\-h, \-\-help\fP" 4
zeigt Hilfenachricht und beendet sich.
.IP \fB\-\-version\fP 4
zeigt Versionsnummer des Programms und beendet sich.
.SH DATEIEN
.IP \fBconfig\fP: 4
Konfigurationsverzeichnis.
.IP \fB.build\fP: 4
Konfigurationsverzeichnis für Meta\-Informationen.
.SH "SIEHE AUCH"
.\" FIXME
.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,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" This file was generated with po4a. Translate the source file. .\" This file was generated with po4a. Translate the source file.
.\" .\"
.\"******************************************************************* .\"*******************************************************************
.TH LIVE\-BUILD 1 04.11.2013 4.0~alpha30\-1 "Live Systems Projekt" .TH LIVE\-BUILD 1 07.01.2014 4.0~alpha31\-1 "Live Systems Projekt"
.SH NAME .SH NAME
\fBlive\-build\fP \- System Build Komponenten \fBlive\-build\fP \- System Build Komponenten
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment