Commit 670d0358 authored by amnesia's avatar amnesia

Convert build system to live-build 2.0.1.

parent 2da24d1b
......@@ -12,10 +12,10 @@ fi
# a clean starting point
rm -rf cache/stages_rootfs
# get LH_BINARY_IMAGES
# get LB_BINARY_IMAGES
. config/binary
# get LH_ARCHITECTURE
# get LB_ARCHITECTURE
. config/bootstrap
# build the doc wiki
......@@ -39,7 +39,7 @@ chmod -R go+rX config/chroot_sources
# build the image
case "$LH_BINARY_IMAGES" in
case "$LB_BINARY_IMAGES" in
iso|iso-hybrid)
BUILD_FILENAME_EXT=iso
BUILD_FILENAME=binary-hybrid
......@@ -53,25 +53,25 @@ case "$LH_BINARY_IMAGES" in
BUILD_FILENAME=binary
;;
*)
echo "Image type ${LH_BINARY_IMAGES} is not supported." >&2
echo "Image type ${LB_BINARY_IMAGES} is not supported." >&2
exit 1
;;
esac
BUILD_BASENAME="tails-${LH_ARCHITECTURE}-${LH_DISTRIBUTION}-${AMNESIA_VERSION}-${AMNESIA_TODAY}"
BUILD_BASENAME="tails-${LB_ARCHITECTURE}-${LB_DISTRIBUTION}-${AMNESIA_VERSION}-${AMNESIA_TODAY}"
BUILD_DEST_FILENAME="${BUILD_BASENAME}.${BUILD_FILENAME_EXT}"
BUILD_MANIFEST="${BUILD_DEST_FILENAME}.list"
BUILD_PACKAGES="${BUILD_DEST_FILENAME}.packages"
BUILD_LOG="${BUILD_DEST_FILENAME}.buildlog"
echo "Building $LH_BINARY_IMAGES image ${BUILD_BASENAME}..."
echo "Building $LB_BINARY_IMAGES image ${BUILD_BASENAME}..."
set -o pipefail
if time lh build noauto ${@} 2>&1 | tee "${BUILD_LOG}" ; then
if time lb build noauto ${@} 2>&1 | tee "${BUILD_LOG}" ; then
echo "Image was successfully created"
echo "Renaming generated files..."
mv -i "${BUILD_FILENAME}.${BUILD_FILENAME_EXT}" "${BUILD_DEST_FILENAME}"
mv -i binary.list "${BUILD_MANIFEST}"
mv -i binary.packages "${BUILD_PACKAGES}"
else
echo "lh build failed." >&2
echo "lb build failed." >&2
exit 1
fi
......@@ -6,7 +6,7 @@ for dir in chroot/{dev/pts,proc,sys} ; do
fi
done
lh clean noauto ${@}
lb clean noauto ${@}
# rm -f build-*.log
......
#! /bin/sh
# automatically run by "lh config"
# automatically run by "lb config"
. config/amnesia
if [ -e config/amnesia.local ] ; then
......@@ -7,13 +7,13 @@ if [ -e config/amnesia.local ] ; then
fi
# init variables
RUN_LH_CONFIG="lh config noauto"
RUN_LB_CONFIG="lb config noauto"
# init config/ with defaults for the target distribution
$RUN_LH_CONFIG --distribution lenny ${@}
$RUN_LB_CONFIG --distribution lenny ${@}
# set Amnesia's general options
$RUN_LH_CONFIG \
$RUN_LB_CONFIG \
--apt-recommends false \
--binary-images iso-hybrid \
--isohybrid-options "$AMNESIA_ISOHYBRID_OPTS" \
......@@ -32,13 +32,13 @@ $RUN_LH_CONFIG \
# build i386 images on amd64 as well, include only 686 kernel
hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" = i386 -o "$hw_arch" = amd64 ]; then
$RUN_LH_CONFIG \
$RUN_LB_CONFIG \
--architecture i386 \
--linux-flavours 686 \
${@}
# build powerpc images on powerpc64 as well, include only powerpc kernel
elif [ "$hw_arch" = powerpc -o "$hw_arch" = powerpc64 ]; then
$RUN_LH_CONFIG \
$RUN_LB_CONFIG \
--architecture powerpc \
--linux-flavours powerpc \
${@}
......
......@@ -10,7 +10,7 @@
# These configuration files are actually shell scripts, and are
# sourced by various other scripts.
# Base for the string that will be passed to "lh config --bootappend-live"
# Base for the string that will be passed to "lb config --bootappend-live"
AMNESIA_APPEND="quiet splash vga=788 live-media=removable nopersistent noprompt=usb"
# Options passed to isohybrid
......
#!/bin/bash
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing buggy syslinux help')"
......@@ -12,7 +12,7 @@ USAGE="${PROGRAM}"
Read_conffiles config/all config/common config/binary
Set_defaults
if [ "${LH_BOOTLOADER}" != "syslinux" ]
if [ "${LB_BOOTLOADER}" != "syslinux" ]
then
exit 0
fi
......@@ -20,7 +20,7 @@ fi
Echo_message "removing buggy syslinux help"
# Setting boot method specific variables
case "${LH_BINARY_IMAGES}" in
case "${LB_BINARY_IMAGES}" in
iso|iso-hybrid)
SYSLINUX_PATH="binary/isolinux"
;;
......
#!/bin/bash
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'internationalizing the syslinux menu')"
......@@ -12,7 +12,7 @@ USAGE="${PROGRAM}"
Read_conffiles config/all config/common config/binary
Set_defaults
if [ "${LH_BOOTLOADER}" != "syslinux" ]
if [ "${LB_BOOTLOADER}" != "syslinux" ]
then
exit 0
fi
......@@ -26,7 +26,7 @@ if [ -e config/amnesia.local ] ; then
fi
# Setting boot method specific variables
case "${LH_BINARY_IMAGES}" in
case "${LB_BINARY_IMAGES}" in
iso|iso-hybrid)
SYSLINUX_PATH="binary/isolinux"
;;
......
......@@ -123,7 +123,7 @@ Pin: release a=lenny-backports
Pin-Priority: 999
Package: live-build
Pin: release o=chroot_local-packages
Pin: release a=testing
Pin-Priority: 999
Package: live-config
......@@ -135,7 +135,7 @@ Pin: origin live.debian.net
Pin-Priority: 999
Package: live-helper
Pin: release o=chroot_local-packages
Pin: release a=testing
Pin-Priority: 999
Package: live-initramfs
......
......@@ -6,7 +6,7 @@
# non-Torified outgoing packets.
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'creating the htp user')"
......
......@@ -3,7 +3,7 @@
# Remove pdnsd's resolvconf hook.
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing pdnsd resolvconf hook')"
......
......@@ -4,7 +4,7 @@
# security issues far too often.
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing pidgin MSN support')"
......
......@@ -3,7 +3,7 @@
# Remove unwanted iceweasel search plugins.
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing unwanted iceweasel search plugins')"
......
......@@ -3,7 +3,7 @@
# Build binary sqlite iceweasel files from plain text SQL files.
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'building iceweasel sqlite files')"
......
......@@ -3,7 +3,7 @@
# Set the correct firegpg version in /etc/iceweasel/profile/user.js
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'recording firegpg version')"
......
......@@ -3,7 +3,7 @@
# Load GConf settings.
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'load GConf settings')"
......
#!/bin/sh
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'add modules to /etc/modules')"
......
#!/bin/sh
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'building VirtualBox guest modules')"
......
......@@ -3,7 +3,7 @@
# Install modules managed by module-assistant
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installing modules managed by module-assistant')"
......
......@@ -3,9 +3,9 @@
# Manage initscripts
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Get LH_DISTRIBUTION
# Get LB_DISTRIBUTION
Read_conffiles config/bootstrap
# Setting static variables
......@@ -19,7 +19,7 @@ Echo_message "managing initscripts"
disable_service () {
local INITSCRIPT="$1"
case "${LH_DISTRIBUTION}" in
case "${LB_DISTRIBUTION}" in
squeeze|sid)
update-rc.d ${INITSCRIPT} disable
;;
......
#!/bin/sh
# Including common functions
. "${LH_BASE:-/usr/share/live-helper}"/scripts/build.sh
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing development packages')"
......
......@@ -6,7 +6,7 @@ Hercules eCAFÉ™ EC-800
Linux kernel
------------
`lh config --linux-flavours 486`
`lb config --linux-flavours 486`
X.Org
-----
......
......@@ -25,7 +25,7 @@ libdatetime-format-dateparse-perl
# needed by readahead
pv
# needed by our chroot_local-hooks
live-helper
live-build
### Software
......@@ -68,7 +68,7 @@ gobby
gobby-infinote
#endif
gparted
## breaks lh because of desktop-base.postinst (see Debian bug #467620)
## breaks lb because of desktop-base.postinst (see Debian bug #467620)
#if ARCHITECTURE i386 amd64
# grub
#endif
......
......@@ -11,7 +11,7 @@ Vcs-Git: git://git.immerda.ch/amnesia.git
Package: tails
Architecture: all
Depends: ${misc:Depends}, live-build (>= 2.0~a21-1),
Depends: ${misc:Depends}, live-build (>= 2.0.1-1),
syslinux (>= 2:4.01+dfsg-1), dpkg-dev, ikiwiki, po4a, gettext
Description: a Tor-ified, amnesic Live System
The (Amnesic) Incognito Live System is aimed at preserving its users' privacy:
......
......@@ -10,13 +10,13 @@ For the impatient ones:
$ git clone git://git.immerda.ch/amnesia.git
$ cd amnesia
$ sudo su
# lh config
# lh build
# lb config
# lb build
Dependencies
============
* `live-build` 2.0~a21; T(A)ILS code is usually tested
* `live-build` 2.0.1-1; T(A)ILS code is usually tested
against Squeeze's live-build, but a Debian Live snapshot package
can sometimes be needed during a development cycle: see the [Debian
Live manual](http://live.debian.net/manual/html/) for details.
......@@ -32,10 +32,10 @@ Dependencies
Build process
=============
Initialize the Live system's configuration with `lh config`.
Most `lh config` options are supported, have a look to the `lh_config`
Initialize the Live system's configuration with `lb config`.
Most `lb config` options are supported, have a look to the `lb_config`
manpage for details.
You can then use the standard live-build commands as root to build
the image (`lh build`) and to cleanup the build directory (`lh
the image (`lb build`) and to cleanup the build directory (`lb
clean`).
......@@ -11,7 +11,7 @@ command-line. Then, 30 seconds after `iceweasel` has been loaded, the sort
file can be retrieved from `/var/log/boot-profile`.
It must then be copied to `config/binary_rootfs/squashfs.sort`. This file is
automatically used by `lh_binary_rootfs` to tell `mksquashfs` to use the
automatically used by `lb_binary_rootfs` to tell `mksquashfs` to use the
provided *sort list*.
Left to be done
......@@ -64,7 +64,7 @@ The `end-profile` script will wait and start iceweasel before automatically
killing the `boot-profile` daemon.
The file list `/usr/share/amnesia/readahead-list` used by `00readahead` is
generated by `scripts/config` (called by `lh config`).
generated by `scripts/config` (called by `lb config`).
Further
=======
......
Markdown is supported
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