2007-09-23 08:04:46 +00:00
#!/bin/sh
2010-09-02 11:12:37 +00:00
## live-build(7) - System Build Scripts
2013-03-10 17:33:05 -01:00
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
2010-09-02 11:12:37 +00:00
##
2012-07-29 23:59:00 +00:00
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
2010-09-02 11:12:37 +00:00
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
2007-09-23 08:04:46 +00:00
2012-12-19 09:21:28 -01:00
New_configuration ( )
{
2012-12-19 10:04:36 -01:00
## Runtime
2012-12-19 09:21:28 -01:00
2012-12-19 10:04:36 -01:00
# Image: Architecture
if [ -x "/usr/bin/dpkg" ]
2012-12-19 09:21:28 -01:00
then
2012-12-19 10:04:36 -01:00
CURRENT_IMAGE_ARCHITECTURE = " $( dpkg --print-architecture) "
else
case " $( uname -m) " in
x86_64)
CURRENT_IMAGE_ARCHITECTURE = "amd64"
; ;
2012-12-19 09:21:28 -01:00
2012-12-19 10:04:36 -01:00
i?86)
CURRENT_IMAGE_ARCHITECTURE = "i386"
; ;
*)
Echo_warning " Unable to determine current architecture, using ${ CURRENT_IMAGE_ARCHITECTURE } "
; ;
esac
fi
2012-12-19 10:07:10 -01:00
## Configuration
# Configuration-Version
2013-04-06 08:46:04 +00:00
LIVE_CONFIGURATION_VERSION = " ${ LIVE_CONFIGURATION_VERSION :- $( Get_configuration config/build Configuration-Version) } "
2012-12-19 10:07:10 -01:00
LIVE_CONFIGURATION_VERSION = " ${ LIVE_CONFIGURATION_VERSION :- ${ LIVE_BUILD_VERSION } } "
export LIVE_CONFIGURATION_VERSION
2012-12-19 19:42:26 -01:00
# Image: Name
2013-04-06 08:46:04 +00:00
LIVE_IMAGE_NAME = " ${ LIVE_IMAGE_NAME :- $( Get_configuration config/build Name) } "
2012-12-19 11:03:52 -01:00
LIVE_IMAGE_NAME = " ${ LIVE_IMAGE_NAME :- live -image } "
2012-12-19 10:21:09 -01:00
export LIVE_IMAGE_NAME
2012-12-19 10:07:10 -01:00
# Image: Architecture (FIXME: Support and default to 'any')
2013-04-06 08:46:04 +00:00
LIVE_IMAGE_ARCHITECTURE = " ${ LIVE_IMAGE_ARCHITECTURE :- $( Get_configuration config/build Architecture) } "
2012-12-19 10:07:10 -01:00
LIVE_IMAGE_ARCHITECTURE = " ${ LIVE_IMAGE_ARCHITECTURE :- ${ CURRENT_IMAGE_ARCHITECTURE } } "
export LIVE_IMAGE_ARCHITECTURE
2012-12-19 19:41:25 -01:00
# Image: Archive Areas
2013-04-06 08:46:04 +00:00
LIVE_IMAGE_ARCHIVE_AREAS = " ${ LIVE_IMAGE_ARCHIVE_AREAS :- $( Get_configuration config/build Archive-Areas) } "
2012-12-19 19:41:25 -01:00
case " ${ LB_MODE } " in
progress-linux)
LIVE_IMAGE_ARCHIVE_AREAS = " ${ LIVE_IMAGE_ARCHIVE_AREAS :- main contrib non-free } "
; ;
ubuntu)
LIVE_IMAGE_ARCHIVE_AREAS = " ${ LIVE_IMAGE_ARCHIVE_AREAS :- main restricted } "
; ;
*)
LIVE_IMAGE_ARCHIVE_AREAS = " ${ LIVE_IMAGE_ARCHIVE_AREAS :- main } "
; ;
esac
export LIVE_IMAGE_ARCHIVE_AREAS
2012-12-19 19:48:49 -01:00
# Image: Archive Areas
2013-04-06 08:46:04 +00:00
LIVE_IMAGE_PARENT_ARCHIVE_AREAS = " ${ LIVE_IMAGE_PARENT_ARCHIVE_AREAS :- $( Get_configuration config/build Parent-Archive-Areas) } "
2012-12-19 19:48:49 -01:00
LIVE_IMAGE_PARENT_ARCHIVE_AREAS = " ${ LIVE_IMAGE_PARENT_ARCHIVE_AREAS :- ${ LIVE_IMAGE_ARCHIVE_AREAS } } "
export LIVE_IMAGE_PARENT_ARCHIVE_AREAS
2012-12-19 10:07:10 -01:00
# Image: Type
2013-04-06 08:46:04 +00:00
LIVE_IMAGE_TYPE = " ${ LIVE_IMAGE_TYPE :- $( Get_configuration config/build Type) } "
2012-12-19 10:07:10 -01:00
LIVE_IMAGE_TYPE = " ${ LIVE_IMAGE_TYPE :- iso -hybrid } "
export LIVE_IMAGE_TYPE
2012-12-19 09:21:28 -01:00
}
2007-09-23 08:04:46 +00:00
Set_defaults ( )
{
2012-12-19 09:21:28 -01:00
# FIXME
New_configuration
2007-09-23 08:04:46 +00:00
## config/common
2011-09-01 07:27:16 +00:00
if [ -e local/live-build ]
then
2012-07-19 17:37:26 +00:00
LIVE_BUILD = " ${ LIVE_BUILD :- ${ PWD } /local/live-build } "
2012-08-27 12:55:15 +00:00
export LIVE_BUILD
2011-09-01 07:27:16 +00:00
fi
2009-11-21 08:16:58 -01:00
2011-09-29 22:56:49 +00:00
# Setting system type
2011-10-13 17:50:48 +00:00
LB_SYSTEM = " ${ LB_SYSTEM :- live } "
2011-09-29 22:56:49 +00:00
2013-03-21 15:37:16 -01:00
# Setting mode (currently: debian, progress-linux, and ubuntu)
2012-01-23 11:42:47 -01:00
if [ -x /usr/bin/lsb_release ]
then
2013-03-22 12:06:30 -01:00
_DISTRIBUTOR = " $( lsb_release -is | tr "[A-Z]" "[a-z]" ) "
2012-01-23 11:42:47 -01:00
case " ${ _DISTRIBUTOR } " in
2012-10-25 11:36:12 +00:00
debian| progress-linux| ubuntu)
2012-01-23 11:42:47 -01:00
LB_MODE = " ${ LB_MODE :- ${ _DISTRIBUTOR } } "
; ;
*)
LB_MODE = " ${ LB_MODE :- debian } "
; ;
esac
else
2012-10-25 11:36:12 +00:00
if [ -e /etc/progress-linux_version ]
2012-01-23 11:42:47 -01:00
then
2012-10-25 11:36:12 +00:00
LB_MODE = " ${ LB_MODE :- progress -linux } "
2012-01-23 11:42:47 -01:00
elif [ -e /etc/ubuntu_version ]
then
LB_MODE = " ${ LB_MODE :- ubuntu } "
2012-02-16 19:39:52 -01:00
else
LB_MODE = " ${ LB_MODE :- debian } "
2012-01-23 11:42:47 -01:00
fi
fi
2007-09-23 08:04:49 +00:00
2007-09-23 08:05:13 +00:00
# Setting distribution name
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2012-08-27 14:23:27 +00:00
LB_DISTRIBUTION = " ${ LB_DISTRIBUTION :- baureo } "
2011-02-14 12:32:10 -01:00
LB_DERIVATIVE = "true"
2011-01-01 22:45:08 -01:00
; ;
2012-12-17 11:48:54 -01:00
ubuntu)
2013-02-18 07:25:55 -01:00
LB_DISTRIBUTION = " ${ LB_DISTRIBUTION :- quantal } "
2011-02-14 12:32:10 -01:00
LB_DERIVATIVE = "false"
2010-12-27 16:12:36 -01:00
; ;
2009-04-15 20:07:26 +00:00
2010-12-27 16:12:36 -01:00
*)
2011-06-15 19:14:23 +00:00
LB_DISTRIBUTION = " ${ LB_DISTRIBUTION :- wheezy } "
2011-02-14 12:32:10 -01:00
LB_DERIVATIVE = "false"
2011-01-08 09:05:19 -01:00
; ;
esac
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2011-01-08 09:05:19 -01:00
case " ${ LB_DISTRIBUTION } " in
2012-08-29 13:58:42 +00:00
baureo| baureo-backports)
2012-07-27 21:29:19 +00:00
LB_PARENT_DISTRIBUTION = " ${ LB_PARENT_DISTRIBUTION :- wheezy } "
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION = " ${ LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION :- ${ LB_PARENT_DISTRIBUTION } } "
; ;
2012-08-29 13:58:42 +00:00
charon| charon-backports)
2011-01-08 09:05:19 -01:00
LB_PARENT_DISTRIBUTION = " ${ LB_PARENT_DISTRIBUTION :- sid } "
2011-02-14 10:29:25 -01:00
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION = " ${ LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION :- ${ LB_PARENT_DISTRIBUTION } } "
2011-01-08 09:05:19 -01:00
; ;
esac
2012-02-04 20:05:36 -01:00
LB_BACKPORTS = " ${ LB_BACKPORTS :- true } "
2011-01-08 09:05:19 -01:00
; ;
*)
LB_PARENT_DISTRIBUTION = " ${ LB_PARENT_DISTRIBUTION :- ${ LB_DISTRIBUTION } } "
2011-02-14 10:29:25 -01:00
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION = " ${ LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION :- ${ LB_PARENT_DISTRIBUTION } } "
2012-02-04 20:05:36 -01:00
LB_BACKPORTS = " ${ LB_BACKPORTS :- false } "
2010-12-27 16:12:36 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:11 +00:00
# Setting package manager
2010-09-07 13:11:20 +00:00
LB_APT = " ${ LB_APT :- apt } "
2007-09-23 08:05:11 +00:00
2007-09-23 08:04:46 +00:00
# Setting apt ftp proxy
2012-05-31 11:12:13 +00:00
LB_APT_FTP_PROXY = " ${ LB_APT_FTP_PROXY } "
2007-09-23 08:04:46 +00:00
# Setting apt http proxy
2012-05-31 11:12:13 +00:00
LB_APT_HTTP_PROXY = " ${ LB_APT_HTTP_PROXY } "
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:11 +00:00
# Setting apt pipeline
2010-09-07 13:11:20 +00:00
# LB_APT_PIPELINE
2007-09-23 08:04:46 +00:00
2008-02-21 18:03:57 -01:00
APT_OPTIONS = " ${ APT_OPTIONS :- --yes } "
APTITUDE_OPTIONS = " ${ APTITUDE_OPTIONS :- --assume-yes } "
2011-07-21 15:48:17 +00:00
BZIP2_OPTIONS = " ${ BZIP2_OPTIONS :- -6 } "
2011-01-01 22:36:20 -01:00
2011-07-21 15:48:17 +00:00
GZIP_OPTIONS = " ${ GZIP_OPTIONS :- -6 } "
2009-09-11 07:39:13 +00:00
2010-06-21 20:26:11 +00:00
if gzip --help | grep -qs "\-\-rsyncable"
2009-09-11 07:39:13 +00:00
then
2010-06-21 20:26:11 +00:00
GZIP_OPTIONS = " $( echo ${ GZIP_OPTIONS } | sed -e 's|--rsyncable||' ) --rsyncable "
2009-09-11 07:39:13 +00:00
fi
2011-07-21 15:48:17 +00:00
LZIP_OPTIONS = " ${ LZIP_OPTIONS :- -6 } "
2011-01-01 22:36:20 -01:00
2011-07-21 15:48:17 +00:00
LZMA_OPTIONS = " ${ LZMA_OPTIONS :- -6 } "
2011-06-13 18:38:44 +00:00
2012-07-18 17:44:00 +00:00
XZ_OPTIONS = " ${ XZ_OPTIONS :- -6 } "
2007-09-23 08:04:46 +00:00
# Setting apt recommends
2010-09-07 13:11:20 +00:00
case " ${ LB_MODE } " in
2013-03-21 15:37:16 -01:00
progress-linux)
2010-09-07 13:11:20 +00:00
LB_APT_RECOMMENDS = " ${ LB_APT_RECOMMENDS :- false } "
2008-12-08 10:24:11 -01:00
; ;
2010-12-27 16:12:36 -01:00
*)
LB_APT_RECOMMENDS = " ${ LB_APT_RECOMMENDS :- true } "
; ;
2007-09-23 08:05:17 +00:00
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:04:48 +00:00
# Setting apt secure
2010-09-07 13:11:20 +00:00
LB_APT_SECURE = " ${ LB_APT_SECURE :- true } "
2007-09-23 08:04:48 +00:00
2011-08-24 18:34:01 +00:00
# Setting apt source
2011-08-24 20:59:46 +00:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2011-08-24 21:30:22 +00:00
LB_APT_SOURCE_ARCHIVES = " ${ LB_APT_SOURCE_ARCHIVES :- false } "
2011-08-24 20:59:46 +00:00
; ;
*)
2011-08-24 21:30:22 +00:00
LB_APT_SOURCE_ARCHIVES = " ${ LB_APT_SOURCE_ARCHIVES :- true } "
2011-08-24 20:59:46 +00:00
; ;
esac
2011-08-24 18:34:01 +00:00
2007-09-23 08:04:46 +00:00
# Setting bootstrap program
2010-09-07 13:11:20 +00:00
if [ -z " ${ LB_BOOTSTRAP } " ] || ( [ ! -x " $( which ${ LB_BOOTSTRAP } 2>/dev/null) " ] && [ " ${ LB_BOOTSTRAP } " != "copy" ] )
2007-09-23 08:04:46 +00:00
then
2007-10-19 10:45:57 +00:00
if [ -x "/usr/sbin/debootstrap" ]
then
2010-09-07 13:11:20 +00:00
LB_BOOTSTRAP = "debootstrap"
2007-10-19 10:45:57 +00:00
elif [ -x "/usr/bin/cdebootstrap" ]
then
2010-09-07 13:11:20 +00:00
LB_BOOTSTRAP = "cdebootstrap"
2007-10-19 10:45:57 +00:00
fi
2007-09-23 08:04:46 +00:00
fi
# Setting cache option
2010-09-07 13:11:20 +00:00
LB_CACHE = " ${ LB_CACHE :- true } "
LB_CACHE_INDICES = " ${ LB_CACHE_INDICES :- false } "
LB_CACHE_PACKAGES = " ${ LB_CACHE_PACKAGES :- true } "
LB_CACHE_STAGES = " ${ LB_CACHE_STAGES :- bootstrap } "
2007-09-23 08:04:46 +00:00
# Setting debconf frontend
2010-09-07 13:11:20 +00:00
LB_DEBCONF_FRONTEND = " ${ LB_DEBCONF_FRONTEND :- noninteractive } "
LB_DEBCONF_PRIORITY = " ${ LB_DEBCONF_PRIORITY :- critical } "
2007-09-23 08:04:50 +00:00
2007-09-23 08:05:10 +00:00
# Setting initramfs hook
2012-10-08 18:00:41 +00:00
case " ${ LB_SYSTEM } " in
live)
2010-09-07 13:11:20 +00:00
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
ubuntu)
2012-10-08 18:00:41 +00:00
LB_INITRAMFS = " ${ LB_INITRAMFS :- casper } "
2009-04-15 20:07:26 +00:00
; ;
2008-12-08 10:24:11 -01:00
*)
2012-10-08 18:00:41 +00:00
LB_INITRAMFS = " ${ LB_INITRAMFS :- live -boot } "
2008-12-08 10:24:11 -01:00
; ;
2007-09-23 08:05:17 +00:00
esac
2010-12-27 16:12:36 -01:00
; ;
2012-10-08 18:00:41 +00:00
normal)
LB_INITRAMFS = " ${ LB_INITRAMFS :- none } "
2010-12-27 16:12:36 -01:00
; ;
esac
2007-09-23 08:05:10 +00:00
2011-06-13 18:38:44 +00:00
LB_INITRAMFS_COMPRESSION = " ${ LB_INITRAMFS_COMPRESSION :- gzip } "
2011-02-09 09:37:21 -01:00
# Setting initsystem
2011-02-10 21:31:21 -01:00
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
ubuntu)
2011-02-10 21:44:40 -01:00
case " ${ LB_INITRAMFS } " in
live-boot)
LB_INITSYSTEM = " ${ LB_INITSYSTEM :- upstart } "
; ;
esac
2011-02-10 21:31:21 -01:00
; ;
2011-02-14 14:04:16 -01:00
2012-10-28 09:42:57 -01:00
progress-linux)
2013-09-06 18:05:07 +00:00
case " ${ LB_DISTRIBUTION } " in
chairon*)
LB_INITSYSTEM = " ${ LB_INITSYSTEM :- systemd } "
; ;
*)
LB_INITSYSTEM = " ${ LB_INITSYSTEM :- sysvinit } "
; ;
esac
2012-10-28 09:42:57 -01:00
; ;
2011-02-14 14:04:16 -01:00
*)
2011-09-29 22:56:49 +00:00
case " ${ LB_SYSTEM } " in
live)
LB_INITSYSTEM = " ${ LB_INITSYSTEM :- sysvinit } "
; ;
normal)
LB_INITSYSTEM = " ${ LB_INITSYSTEM :- none } "
; ;
esac
2011-02-14 14:04:16 -01:00
; ;
2011-02-10 21:31:21 -01:00
esac
2011-02-09 09:37:21 -01:00
2007-11-12 20:43:28 -01:00
# Setting fdisk
2010-09-07 13:11:20 +00:00
if [ -z " ${ LB_FDISK } " ] || [ ! -x " ${ LB_FDISK } " ]
2007-11-12 20:43:28 -01:00
then
# Workaround for gnu-fdisk divertion
# (gnu-fdisk is buggy, #445304).
if [ -x /sbin/fdisk.distrib ]
then
2010-09-07 13:11:20 +00:00
LB_FDISK = "fdisk.distrib"
2007-11-12 20:43:28 -01:00
elif [ -x /sbin/fdisk ]
then
2010-09-07 13:11:20 +00:00
LB_FDISK = "fdisk"
2007-11-12 20:43:28 -01:00
else
2008-08-12 21:29:14 +00:00
Echo_error "Can't process file /sbin/fdisk"
2007-11-12 20:43:28 -01:00
fi
fi
2007-09-23 08:04:47 +00:00
# Setting losetup
2010-09-07 13:11:20 +00:00
if [ -z " ${ LB_LOSETUP } " ] || [ " ${ LB_LOSETUP } " != "/sbin/losetup.orig" ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:05:10 +00:00
# Workaround for loop-aes-utils divertion
2007-11-12 20:43:28 -01:00
# (loop-aes-utils' losetup lacks features).
2007-09-23 08:04:47 +00:00
if [ -x /sbin/losetup.orig ]
then
2010-09-07 13:11:20 +00:00
LB_LOSETUP = "losetup.orig"
2007-09-23 08:04:47 +00:00
elif [ -x /sbin/losetup ]
then
2010-09-07 13:11:20 +00:00
LB_LOSETUP = "losetup"
2007-09-23 08:04:47 +00:00
else
2008-08-12 20:36:48 +00:00
Echo_error "Can't process file /sbin/losetup"
2007-09-23 08:04:47 +00:00
fi
2007-09-23 08:04:46 +00:00
fi
2012-12-19 10:04:36 -01:00
if [ " ${ LIVE_IMAGE_ARCHITECTURE } " = "i386" ] && [ " ${ CURRENT_IMAGE_ARCHITECTURE } " = "amd64" ]
2011-07-20 06:54:54 +00:00
then
2012-12-19 10:04:36 -01:00
# Use linux32 when building amd64 images on i386
2011-07-20 16:10:39 +00:00
_LINUX32 = "linux32"
else
_LINUX32 = ""
2011-07-20 06:54:54 +00:00
fi
2007-09-23 08:05:10 +00:00
# Setting tasksel
2013-05-06 12:48:46 +00:00
LB_TASKSEL = " ${ LB_TASKSEL :- apt } "
2007-09-23 08:04:52 +00:00
2007-09-23 08:04:47 +00:00
# Setting root directory
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2011-01-01 22:45:08 -01:00
LB_ROOT = " ${ LB_ROOT :- progress -linux } "
; ;
2010-12-27 16:12:36 -01:00
*)
LB_ROOT = " ${ LB_ROOT :- ${ LB_MODE } -live } "
; ;
esac
2007-09-23 08:04:49 +00:00
2007-09-23 08:04:52 +00:00
# Setting templates
2013-01-18 02:31:48 -01:00
if [ -n " ${ LIVE_BUILD } " ]
2012-07-19 17:37:26 +00:00
then
LB_TEMPLATES = " ${ LB_TEMPLATES :- ${ LIVE_BUILD } /templates } "
else
LB_TEMPLATES = " ${ LB_TEMPLATES :- /usr/share/live/build/templates } "
fi
2007-09-23 08:04:52 +00:00
2010-09-13 19:49:20 +00:00
# Setting live build options
2009-12-13 19:17:45 -01:00
_BREAKPOINTS = " ${ _BREAKPOINTS :- false } "
2009-01-10 13:42:47 -01:00
_COLOR = " ${ _COLOR :- false } "
2009-12-13 19:17:45 -01:00
_DEBUG = " ${ _DEBUG :- false } "
_FORCE = " ${ _FORCE :- false } "
_QUIET = " ${ _QUIET :- false } "
_VERBOSE = " ${ _VERBOSE :- false } "
2007-09-23 08:04:46 +00:00
## config/bootstrap
2007-09-23 08:04:48 +00:00
# Setting mirror to fetch packages from
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2011-01-07 19:18:27 -01:00
debian)
2012-03-04 19:05:37 -01:00
LB_MIRROR_BOOTSTRAP = " ${ LB_MIRROR_BOOTSTRAP :- http : //ftp.debian.org/debian/ } "
2012-01-12 11:19:20 -01:00
LB_PARENT_MIRROR_BOOTSTRAP = " ${ LB_PARENT_MIRROR_BOOTSTRAP :- ${ LB_MIRROR_BOOTSTRAP } } "
2010-12-27 16:12:36 -01:00
; ;
2008-12-08 10:24:11 -01:00
2012-10-25 11:36:12 +00:00
progress-linux)
2011-09-14 19:18:15 +00:00
LB_PARENT_MIRROR_BOOTSTRAP = " ${ LB_PARENT_MIRROR_BOOTSTRAP :- http : //ftp.debian.org/debian/ } "
2013-04-19 08:35:13 +00:00
LB_MIRROR_BOOTSTRAP = " ${ LB_MIRROR_BOOTSTRAP :- http : //cdn.archive.progress-linux.org/packages/ } "
2011-01-07 19:18:27 -01:00
; ;
2012-12-17 11:48:54 -01:00
ubuntu)
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2010-12-27 16:12:36 -01:00
amd64| i386)
2012-01-12 11:19:20 -01:00
LB_MIRROR_BOOTSTRAP = " ${ LB_MIRROR_BOOTSTRAP :- http : //archive.ubuntu.com/ubuntu/ } "
2010-12-27 16:12:36 -01:00
; ;
2009-04-15 20:07:26 +00:00
2010-12-27 16:12:36 -01:00
*)
2012-01-12 11:19:20 -01:00
LB_MIRROR_BOOTSTRAP = " ${ LB_MIRROR_BOOTSTRAP :- http : //ports.ubuntu.com/ubuntu-ports/ } "
2010-12-27 16:12:36 -01:00
; ;
esac
2011-02-14 11:48:45 -01:00
2012-01-12 11:19:20 -01:00
LB_PARENT_MIRROR_BOOTSTRAP = " ${ LB_PARENT_MIRROR_BOOTSTRAP :- ${ LB_MIRROR_BOOTSTRAP } } "
2010-12-27 16:12:36 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
2011-02-14 11:11:26 -01:00
LB_PARENT_MIRROR_CHROOT = " ${ LB_PARENT_MIRROR_CHROOT :- ${ LB_PARENT_MIRROR_BOOTSTRAP } } "
2011-02-14 11:48:45 -01:00
LB_MIRROR_CHROOT = " ${ LB_MIRROR_CHROOT :- ${ LB_MIRROR_BOOTSTRAP } } "
2008-02-21 18:52:37 -01:00
2007-09-23 08:04:48 +00:00
# Setting security mirror to fetch packages from
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2011-01-07 19:18:27 -01:00
debian)
2012-01-12 11:19:20 -01:00
LB_MIRROR_CHROOT_SECURITY = " ${ LB_MIRROR_CHROOT_SECURITY :- http : //security.debian.org/ } "
2012-01-22 20:57:45 -01:00
LB_PARENT_MIRROR_CHROOT_SECURITY = " ${ LB_PARENT_MIRROR_CHROOT_SECURITY :- ${ LB_MIRROR_CHROOT_SECURITY } } "
2010-12-27 16:12:36 -01:00
; ;
2008-12-08 10:24:11 -01:00
2012-10-25 11:36:12 +00:00
progress-linux)
2011-09-14 19:18:15 +00:00
LB_PARENT_MIRROR_CHROOT_SECURITY = " ${ LB_PARENT_MIRROR_CHROOT_SECURITY :- http : //security.debian.org/ } "
2011-02-14 11:48:45 -01:00
LB_MIRROR_CHROOT_SECURITY = " ${ LB_MIRROR_CHROOT_SECURITY :- ${ LB_MIRROR_CHROOT } } "
2011-01-07 19:18:27 -01:00
; ;
2012-12-17 11:48:54 -01:00
ubuntu)
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2010-12-27 16:12:36 -01:00
amd64| i386)
2012-01-12 11:19:20 -01:00
LB_MIRROR_CHROOT_SECURITY = " ${ LB_MIRROR_CHROOT_SECURITY :- http : //security.ubuntu.com/ubuntu/ } "
2010-12-27 16:12:36 -01:00
; ;
2009-04-15 20:07:26 +00:00
2010-12-27 16:12:36 -01:00
*)
2012-01-12 11:19:20 -01:00
LB_MIRROR_CHROOT_SECURITY = " ${ LB_MIRROR_CHROOT_SECURITY :- http : //ports.ubuntu.com/ubuntu-ports/ } "
2010-12-27 16:12:36 -01:00
; ;
esac
2011-02-14 11:48:45 -01:00
2012-01-12 11:19:20 -01:00
LB_PARENT_MIRROR_CHROOT_SECURITY = " ${ LB_PARENT_MIRROR_CHROOT_SECURITY :- ${ LB_MIRROR_CHROOT_SECURITY } } "
2010-12-27 16:12:36 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:04:48 +00:00
# Setting mirror which ends up in the image
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2011-02-14 11:48:45 -01:00
debian)
2012-08-14 21:15:25 +00:00
LB_MIRROR_BINARY = " ${ LB_MIRROR_BINARY :- http : //http.debian.net/debian/ } "
2012-01-12 11:19:20 -01:00
LB_PARENT_MIRROR_BINARY = " ${ LB_PARENT_MIRROR_BINARY :- ${ LB_MIRROR_BINARY } } "
2011-02-14 11:48:45 -01:00
; ;
2012-10-25 11:36:12 +00:00
progress-linux)
2011-09-14 19:18:15 +00:00
LB_PARENT_MIRROR_BINARY = " ${ LB_PARENT_MIRROR_BINARY :- http : //ftp.debian.org/debian/ } "
2011-02-14 11:48:45 -01:00
LB_MIRROR_BINARY = " ${ LB_MIRROR_BINARY :- ${ LB_MIRROR_CHROOT } } "
2010-12-27 16:12:36 -01:00
; ;
2009-04-15 20:07:26 +00:00
2012-12-17 11:48:54 -01:00
ubuntu)
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2010-12-27 16:12:36 -01:00
amd64| i386)
2012-01-12 11:19:20 -01:00
LB_MIRROR_BINARY = " ${ LB_MIRROR_BINARY :- http : //archive.ubuntu.com/ubuntu/ } "
2009-04-15 20:07:26 +00:00
; ;
2010-12-27 16:12:36 -01:00
*)
2012-01-12 11:19:20 -01:00
LB_MIRROR_BINARY = " ${ LB_MIRROR_BINARY :- http : //ports.ubuntu.com/ubuntu-ports/ } "
2010-12-27 16:12:36 -01:00
; ;
esac
2011-02-14 11:48:45 -01:00
2012-01-12 11:19:20 -01:00
LB_PARENT_MIRROR_BINARY = " ${ LB_PARENT_MIRROR_BINARY :- ${ LB_MIRROR_BINARY } } "
2010-12-27 16:12:36 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:04:48 +00:00
# Setting security mirror which ends up in the image
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2011-01-07 19:18:27 -01:00
debian)
2012-01-12 11:19:20 -01:00
LB_MIRROR_BINARY_SECURITY = " ${ LB_MIRROR_BINARY_SECURITY :- http : //security.debian.org/ } "
LB_PARENT_MIRROR_BINARY_SECURITY = " ${ LB_PARENT_MIRROR_BINARY_SECURITY :- ${ LB_MIRROR_BINARY_SECURITY } } "
2010-12-27 16:12:36 -01:00
; ;
2008-12-08 10:24:11 -01:00
2012-10-25 11:36:12 +00:00
progress-linux)
2011-09-14 19:18:15 +00:00
LB_PARENT_MIRROR_BINARY_SECURITY = " ${ LB_PARENT_MIRROR_BINARY_SECURITY :- http : //security.debian.org/ } "
2011-02-14 11:48:45 -01:00
LB_MIRROR_BINARY_SECURITY = " ${ LB_MIRROR_BINARY_SECURITY :- ${ LB_MIRROR_CHROOT } } "
2011-01-07 19:18:27 -01:00
; ;
2012-12-17 11:48:54 -01:00
ubuntu)
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2010-12-27 16:12:36 -01:00
amd64| i386)
2012-01-12 11:19:20 -01:00
LB_MIRROR_BINARY_SECURITY = " ${ LB_MIRROR_BINARY_SECURITY :- http : //security.ubuntu.com/ubuntu/ } "
2010-12-27 16:12:36 -01:00
; ;
2009-04-15 20:07:26 +00:00
2010-12-27 16:12:36 -01:00
*)
2012-01-12 11:19:20 -01:00
LB_MIRROR_BINARY_SECURITY = " ${ LB_MIRROR_BINARY_SECURITY :- http : //ports.ubuntu.com/ubuntu-ports/ } "
2010-12-27 16:12:36 -01:00
; ;
esac
2011-02-14 11:48:45 -01:00
2012-01-12 11:19:20 -01:00
LB_PARENT_MIRROR_BINARY_SECURITY = " ${ LB_PARENT_MIRROR_BINARY_SECURITY :- ${ LB_MIRROR_BINARY_SECURITY } } "
2010-12-27 16:12:36 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
2011-02-14 11:48:45 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2011-10-30 06:46:02 -01:00
LB_PARENT_MIRROR_DEBIAN_INSTALLER = " ${ LB_PARENT_MIRROR_DEBIAN_INSTALLER :- ${ LB_MIRROR_CHROOT } } "
2011-02-14 11:48:45 -01:00
LB_MIRROR_DEBIAN_INSTALLER = " ${ LB_MIRROR_DEBIAN_INSTALLER :- ${ LB_MIRROR_CHROOT } } "
; ;
*)
2012-01-12 11:19:20 -01:00
LB_MIRROR_DEBIAN_INSTALLER = " ${ LB_MIRROR_DEBIAN_INSTALLER :- ${ LB_MIRROR_CHROOT } } "
2011-07-21 16:44:22 +00:00
LB_PARENT_MIRROR_DEBIAN_INSTALLER = " ${ LB_PARENT_MIRROR_DEBIAN_INSTALLER :- ${ LB_PARENT_MIRROR_CHROOT } } "
2011-02-14 11:48:45 -01:00
; ;
esac
2010-03-04 11:22:15 -01:00
2007-09-23 08:04:46 +00:00
## config/chroot
2007-09-23 08:05:10 +00:00
# Setting chroot filesystem
2010-09-07 13:11:20 +00:00
LB_CHROOT_FILESYSTEM = " ${ LB_CHROOT_FILESYSTEM :- squashfs } "
2007-09-23 08:05:10 +00:00
2007-10-23 20:56:43 +00:00
# Setting whether to expose root filesystem as read only
2010-09-07 13:11:20 +00:00
LB_EXPOSED_ROOT = " ${ LB_EXPOSED_ROOT :- false } "
2007-10-23 20:56:43 +00:00
2007-09-23 08:05:13 +00:00
# Setting union filesystem
2010-09-07 13:11:20 +00:00
LB_UNION_FILESYSTEM = " ${ LB_UNION_FILESYSTEM :- aufs } "
2007-09-23 08:05:13 +00:00
2011-07-19 09:57:14 +00:00
# Setting distribution hooks
2012-12-16 22:22:33 -01:00
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 \
2013-06-05 20:22:57 +00:00
remove-ssl-cert-snakeoil \
2013-05-06 18:07:09 +00:00
remove-udev-persistent-cd-rules \
2013-05-06 17:40:42 +00:00
remove-udev-persistent-net-rules \
2013-02-08 19:23:11 -01:00
remove-systemd-machine-id \
2012-12-16 22:22:33 -01:00
update-apt-file-cache \
update-apt-xapian-index \
update-glx-alternative \
update-mlocate-database \
update-nvidia-alternative} "
2012-12-19 03:57:29 -01:00
#remove-apt-sources-lists
2007-09-23 08:05:10 +00:00
2007-09-23 08:04:48 +00:00
# Setting interactive shell/X11/Xnest
2010-09-07 13:11:20 +00:00
LB_INTERACTIVE = " ${ LB_INTERACTIVE :- false } "
2007-09-23 08:04:48 +00:00
2007-09-23 08:05:10 +00:00
# Setting keyring packages
2010-09-07 13:11:20 +00:00
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
ubuntu)
2011-02-14 11:48:45 -01:00
LB_KEYRING_PACKAGES = " ${ LB_KEYRING_PACKAGES :- ubuntu -keyring } "
2007-09-23 08:05:17 +00:00
; ;
2008-12-08 10:24:11 -01:00
2011-02-14 11:48:45 -01:00
*)
2010-09-07 13:11:20 +00:00
LB_KEYRING_PACKAGES = " ${ LB_KEYRING_PACKAGES :- debian -archive-keyring } "
2008-12-08 10:24:11 -01:00
; ;
2007-09-23 08:05:17 +00:00
esac
2007-09-23 08:05:10 +00:00
# Setting linux flavour string
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2010-12-27 16:12:36 -01:00
armel)
2011-09-29 19:04:17 +00:00
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
ubuntu)
2011-09-29 19:04:17 +00:00
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- omap } "
; ;
*)
# armel will have special images: one rootfs image and many additional kernel images.
# therefore we default to all available armel flavours
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- iop32x ixp4xx kirkwood orion5x versatile } "
; ;
esac
2010-12-27 16:12:36 -01:00
; ;
2010-02-17 12:57:12 -01:00
2012-01-12 09:42:09 -01:00
armhf)
# armhf will have special images: one rootfs image and many additional kernel images.
# therefore we default to all available armel flavours
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- mx5 omap } "
; ;
2010-12-27 16:12:36 -01:00
amd64)
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
ubuntu)
2010-12-27 16:12:36 -01:00
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- generic } "
; ;
2009-04-15 20:07:26 +00:00
2010-12-27 16:12:36 -01:00
*)
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- amd64 } "
; ;
esac
; ;
2007-09-23 08:04:46 +00:00
2010-12-27 16:12:36 -01:00
i386)
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2013-05-06 12:48:46 +00:00
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- 686 -pae } "
2011-01-01 22:45:08 -01:00
; ;
2012-12-17 11:48:54 -01:00
ubuntu)
2012-09-30 07:28:16 +00:00
case " ${ LB_DISTRIBUTION } " in
precise)
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- generic -pae } "
; ;
2012-11-30 23:55:30 -01:00
2012-09-30 07:28:16 +00:00
*)
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- generic } "
; ;
esac
2010-12-27 16:12:36 -01:00
; ;
2008-09-03 09:02:30 +00:00
2010-12-27 16:12:36 -01:00
*)
2013-02-18 07:19:07 -01:00
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- 486 } "
2010-12-27 16:12:36 -01:00
; ;
esac
; ;
2007-09-23 08:04:46 +00:00
2010-12-27 16:12:36 -01:00
ia64)
2011-01-01 22:45:08 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2012-12-19 09:16:57 -01:00
Echo_error " Architecture ${ LIVE_IMAGE_ARCHITECTURE } not supported in the ${ LB_MODE } mode. "
2011-01-01 22:45:08 -01:00
exit 1
; ;
*)
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- itanium } "
; ;
esac
2010-12-27 16:12:36 -01:00
; ;
2008-09-03 09:02:30 +00:00
2010-12-27 16:12:36 -01:00
powerpc)
2011-01-01 22:45:08 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2012-12-19 09:16:57 -01:00
Echo_error " Architecture ${ LIVE_IMAGE_ARCHITECTURE } not supported in the ${ LB_MODE } mode. "
2011-01-01 22:45:08 -01:00
exit 1
; ;
2007-09-23 08:04:46 +00:00
2012-12-17 11:48:54 -01:00
ubuntu)
2012-11-30 23:50:23 -01:00
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- powerpc -smp powerpc64-smp e500 powerpc-e500mc } "
2011-06-10 13:34:00 +00:00
; ;
2010-12-27 16:12:36 -01:00
*)
2012-12-30 12:41:45 -01:00
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- powerpc64 powerpc } "
2010-12-27 16:12:36 -01:00
; ;
esac
; ;
2009-04-15 20:07:26 +00:00
2010-12-27 16:12:36 -01:00
s390)
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
progress-linux| ubuntu)
2012-12-19 09:16:57 -01:00
Echo_error " Architecture ${ LIVE_IMAGE_ARCHITECTURE } not supported in the ${ LB_MODE } mode. "
2010-12-27 16:12:36 -01:00
exit 1
; ;
2007-09-23 08:04:46 +00:00
2010-12-27 16:12:36 -01:00
*)
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- s390 } "
; ;
esac
; ;
2007-09-23 08:04:46 +00:00
2010-12-27 16:12:36 -01:00
sparc)
2011-01-01 22:45:08 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2012-12-19 09:16:57 -01:00
Echo_error " Architecture ${ LIVE_IMAGE_ARCHITECTURE } not supported in the ${ LB_MODE } mode. "
2011-01-01 22:45:08 -01:00
exit 1
; ;
*)
LB_LINUX_FLAVOURS = " ${ LB_LINUX_FLAVOURS :- sparc64 } "
; ;
esac
2010-12-27 16:12:36 -01:00
; ;
*)
2012-12-19 09:16:57 -01:00
Echo_error " Architecture(s) ${ LIVE_IMAGE_ARCHITECTURE } not yet supported (FIXME) "
2010-12-27 16:12:36 -01:00
exit 1
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Set linux packages
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
ubuntu)
2010-12-27 16:12:36 -01:00
LB_LINUX_PACKAGES = " ${ LB_LINUX_PACKAGES :- linux } "
; ;
2007-09-23 08:04:49 +00:00
2010-12-27 16:12:36 -01:00
*)
2013-05-06 12:48:46 +00:00
LB_LINUX_PACKAGES = " ${ LB_LINUX_PACKAGES :- linux -image } "
2010-12-27 16:12:36 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
# Setting security updates option
2012-07-27 21:29:19 +00:00
case " ${ LB_PARENT_DISTRIBUTION } " in
jessie| sid)
2011-03-21 18:36:50 -01:00
LB_SECURITY = " ${ LB_SECURITY :- false } "
; ;
*)
LB_SECURITY = " ${ LB_SECURITY :- true } "
; ;
esac
2007-09-23 08:04:46 +00:00
2012-09-20 14:53:03 +00:00
# Setting updates updates option
2012-07-27 21:29:19 +00:00
case " ${ LB_PARENT_DISTRIBUTION } " in
2013-04-25 14:39:35 +00:00
jessie| sid)
2012-09-20 14:53:03 +00:00
LB_UPDATES = " ${ LB_UPDATES :- false } "
2011-03-21 18:36:50 -01:00
; ;
*)
2012-09-20 14:53:03 +00:00
LB_UPDATES = " ${ LB_UPDATES :- true } "
2011-03-21 18:36:50 -01:00
; ;
esac
2010-03-06 15:23:59 -01:00
2007-09-23 08:05:10 +00:00
## config/binary
2007-11-16 21:01:03 -01:00
# Setting image filesystem
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2008-06-15 15:27:35 +00:00
sparc)
2011-08-25 21:47:30 +00:00
LB_BINARY_FILESYSTEM = " ${ LB_BINARY_FILESYSTEM :- ext4 } "
2008-06-15 15:27:35 +00:00
; ;
2009-04-15 20:07:26 +00:00
2008-06-15 15:27:35 +00:00
*)
2013-01-24 17:17:40 -01:00
LB_BINARY_FILESYSTEM = " ${ LB_BINARY_FILESYSTEM :- fat32 } "
2008-06-15 15:27:35 +00:00
; ;
esac
2007-11-16 21:01:03 -01:00
2007-09-23 08:05:10 +00:00
# Setting image type
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2010-12-27 16:12:36 -01:00
amd64| i386)
2012-12-19 08:52:13 -01:00
LIVE_IMAGE_TYPE = " ${ LIVE_IMAGE_TYPE :- iso -hybrid } "
2010-02-18 15:34:29 -01:00
; ;
*)
2012-12-19 08:52:13 -01:00
LIVE_IMAGE_TYPE = " ${ LIVE_IMAGE_TYPE :- iso } "
2010-02-18 15:34:29 -01:00
; ;
esac
2007-09-23 08:05:10 +00:00
# Setting apt indices
2011-01-07 20:14:16 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2013-02-19 07:08:16 -01:00
LB_APT_INDICES = " ${ LB_APT_INDICES :- false } "
2011-01-07 20:14:16 -01:00
; ;
*)
2011-08-24 21:16:13 +00:00
LB_APT_INDICES = " ${ LB_APT_INDICES :- true } "
2011-01-07 20:14:16 -01:00
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Setting bootloader
2010-09-07 13:11:20 +00:00
if [ -z " ${ LB_BOOTLOADER } " ]
2007-09-23 08:05:10 +00:00
then
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2009-12-09 19:54:41 -01:00
amd64| i386)
2010-09-07 13:11:20 +00:00
LB_BOOTLOADER = "syslinux"
2007-09-23 08:05:10 +00:00
; ;
esac
fi
2007-11-12 21:00:48 -01:00
# Setting checksums
2013-01-02 08:34:19 -01:00
case " ${ LB_MODE } " in
progress-linux)
LB_CHECKSUMS = " ${ LB_CHECKSUMS :- sha256 } "
; ;
*)
LB_CHECKSUMS = " ${ LB_CHECKSUMS :- md5 } "
; ;
esac
2007-11-12 21:00:48 -01:00
2011-01-01 22:36:20 -01:00
# Setting compression
2012-10-04 18:13:25 +00:00
LB_COMPRESSION = " ${ LB_COMPRESSION :- none } "
2011-01-01 22:36:20 -01:00
2012-07-18 17:09:16 +00:00
# Setting zsync
LB_ZSYNC = " ${ LB_ZSYNC :- true } "
2007-09-23 08:05:15 +00:00
# Setting chroot option
2010-09-07 13:11:20 +00:00
LB_BUILD_WITH_CHROOT = " ${ LB_BUILD_WITH_CHROOT :- true } "
2007-09-23 08:05:15 +00:00
2010-10-28 07:51:55 +00:00
LB_BUILD_WITH_TMPFS = " ${ LB_BUILD_WITH_TMPFS :- false } "
2007-09-23 08:05:10 +00:00
# Setting debian-installer option
2012-12-31 21:59:12 -01:00
LB_DEBIAN_INSTALLER = " ${ LB_DEBIAN_INSTALLER :- false } "
2007-09-23 08:04:48 +00:00
2011-02-14 10:29:25 -01:00
LB_DEBIAN_INSTALLER_DISTRIBUTION = " ${ LB_DEBIAN_INSTALLER_DISTRIBUTION :- ${ LB_DISTRIBUTION } } "
2008-08-10 00:38:06 +00:00
2009-09-02 05:39:13 +00:00
# Setting debian-installer-gui
2010-09-07 13:11:20 +00:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
debian| progress-linux)
2010-09-30 05:04:55 +00:00
LB_DEBIAN_INSTALLER_GUI = " ${ LB_DEBIAN_INSTALLER_GUI :- true } "
2010-09-26 10:38:38 +00:00
; ;
2009-09-02 05:39:13 +00:00
*)
2010-09-07 13:11:20 +00:00
LB_DEBIAN_INSTALLER_GUI = " ${ LB_DEBIAN_INSTALLER_GUI :- false } "
2009-09-02 05:39:13 +00:00
; ;
esac
2008-08-12 20:04:25 +00:00
# Setting debian-installer preseed filename
2010-09-07 13:11:20 +00:00
if [ -z " ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } " ]
2008-08-12 20:04:25 +00:00
then
2012-10-22 18:30:41 +00:00
if Find_files config/debian-installer/preseed.cfg
2008-08-12 20:04:25 +00:00
then
2010-09-07 13:11:20 +00:00
LB_DEBIAN_INSTALLER_PRESEEDFILE = "/preseed.cfg"
2008-08-12 20:04:25 +00:00
fi
2012-10-22 18:30:41 +00:00
if Find_files config/debian-installer/*.cfg && [ ! -e config/debian-installer/preseed.cfg ]
2008-08-12 20:04:25 +00:00
then
2012-10-22 18:30:41 +00:00
Echo_warning "You have placed some preseeding files into config/debian-installer but you didn't specify the default preseeding file through LB_DEBIAN_INSTALLER_PRESEEDFILE. This means that debian-installer will not take up a preseeding file by default."
2008-08-12 20:04:25 +00:00
fi
fi
# Setting boot parameters
2012-10-04 12:26:44 +00:00
case " ${ LB_INITRAMFS } " in
live-boot)
LB_BOOTAPPEND_LIVE = " ${ LB_BOOTAPPEND_LIVE :- boot =live config quiet splash } "
2012-10-08 18:16:40 +00:00
LB_BOOTAPPEND_LIVE_FAILSAFE = " ${ LB_BOOTAPPEND_LIVE_FAILSAFE :- boot =live config memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal } "
2012-10-04 12:26:44 +00:00
; ;
casper)
2012-10-08 18:01:30 +00:00
LB_BOOTAPPEND_LIVE = " ${ LB_BOOTAPPEND_LIVE :- boot =casper quiet splash } "
2012-10-08 18:16:40 +00:00
LB_BOOTAPPEND_LIVE_FAILSAFE = " ${ LB_BOOTAPPEND_LIVE_FAILSAFE :- boot =casper memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal } "
2012-10-04 12:24:36 +00:00
; ;
2012-10-08 18:00:41 +00:00
none)
2012-10-08 18:01:30 +00:00
LB_BOOTAPPEND_LIVE = " ${ LB_BOOTAPPEND_LIVE :- quiet splash } "
2012-10-08 18:16:40 +00:00
LB_BOOTAPPEND_LIVE_FAILSAFE = " ${ LB_BOOTAPPEND_LIVE_FAILSAFE :- memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal } "
2012-10-04 12:24:36 +00:00
; ;
esac
2010-09-07 13:11:20 +00:00
if [ -n " ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } " ]
2008-08-12 20:04:25 +00:00
then
2012-12-19 08:52:13 -01:00
case " ${ LIVE_IMAGE_TYPE } " in
2010-02-18 15:34:29 -01:00
iso*)
2010-09-07 13:11:20 +00:00
_LB_BOOTAPPEND_PRESEED = " file=/cdrom/install/ ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } "
2008-08-12 20:04:25 +00:00
; ;
2011-09-13 07:10:28 +00:00
hdd*)
2011-07-19 08:51:20 +00:00
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
ubuntu)
2011-07-19 08:51:20 +00:00
if [ " ${ LB_DEBIAN_INSTALLER } " = "live" ]
then
_LB_BOOTAPPEND_PRESEED = " file=/cdrom/install/ ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } "
else
_LB_BOOTAPPEND_PRESEED = " file=/hd-media/install/ ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } "
fi
; ;
*)
_LB_BOOTAPPEND_PRESEED = " file=/hd-media/install/ ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } "
; ;
esac
2008-08-12 20:11:18 +00:00
; ;
2012-07-18 17:11:55 +00:00
netboot)
2010-09-07 13:11:20 +00:00
case " ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } " in
2008-08-12 20:21:40 +00:00
*://*)
2010-09-07 13:11:20 +00:00
_LB_BOOTAPPEND_PRESEED = " file= ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } "
2008-08-12 20:21:40 +00:00
; ;
*)
2010-09-07 13:11:20 +00:00
_LB_BOOTAPPEND_PRESEED = " file=/ ${ LB_DEBIAN_INSTALLER_PRESEEDFILE } "
2008-08-12 20:21:40 +00:00
; ;
esac
2008-08-12 20:04:25 +00:00
; ;
esac
fi
2010-09-07 13:11:20 +00:00
if [ -n ${ _LB_BOOTAPPEND_PRESEED } ]
2009-11-13 07:27:00 -01:00
then
2010-09-07 13:11:20 +00:00
LB_BOOTAPPEND_INSTALL = " ${ LB_BOOTAPPEND_INSTALL } ${ _LB_BOOTAPPEND_PRESEED } "
2009-11-13 07:27:00 -01:00
fi
2008-08-12 20:04:25 +00:00
2010-09-07 13:11:20 +00:00
LB_BOOTAPPEND_INSTALL = " $( echo ${ LB_BOOTAPPEND_INSTALL } | sed -e 's/[ \t]*$//' ) "
2010-02-17 10:23:34 -01:00
2007-09-23 08:05:10 +00:00
# Setting grub splash
2010-09-07 13:11:20 +00:00
# LB_GRUB_SPLASH
2007-09-23 08:05:10 +00:00
# Setting iso author
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2011-01-07 19:09:49 -01:00
debian)
2010-12-27 16:12:36 -01:00
LB_ISO_APPLICATION = " ${ LB_ISO_APPLICATION :- Debian Live } "
; ;
2008-12-08 10:24:11 -01:00
2012-10-25 11:36:12 +00:00
progress-linux)
2011-01-01 22:45:08 -01:00
LB_ISO_APPLICATION = " ${ LB_ISO_APPLICATION :- Progress Linux } "
; ;
2010-12-27 16:12:36 -01:00
ubuntu)
LB_ISO_APPLICATION = " ${ LB_ISO_APPLICATION :- Ubuntu Live } "
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Set iso preparer
2013-03-11 04:35:40 -01:00
LB_ISO_PREPARER = " ${ LB_ISO_PREPARER :- live -build \$ VERSION ; http : //live-systems.org/devel/live-build } "
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Set iso publisher
2011-01-01 22:45:08 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2011-01-01 22:45:08 -01:00
LB_ISO_PUBLISHER = " ${ LB_ISO_PUBLISHER :- Progress Linux; http : //www.progress-linux.org/; progress-project@lists.progress-linux.org } "
; ;
*)
2013-03-11 04:35:40 -01:00
LB_ISO_PUBLISHER = " ${ LB_ISO_PUBLISHER :- Live Systems project; http : //live-systems.org/; debian-live@lists.debian.org } "
2011-01-01 22:45:08 -01:00
; ;
esac
2007-09-23 08:04:52 +00:00
2011-09-12 07:19:30 +00:00
# Setting hdd options
case " ${ LB_MODE } " in
debian)
LB_HDD_LABEL = " ${ LB_HDD_LABEL :- DEBIAN_LIVE } "
; ;
2012-10-25 11:36:12 +00:00
progress-linux)
2013-03-22 12:06:30 -01:00
LB_HDD_LABEL = " ${ LB_HDD_LABEL :- PROGRESS_ $( echo ${ LB_DISTRIBUTION } | tr "[a-z]" "[A-Z]" ) } "
2011-09-12 07:19:30 +00:00
; ;
ubuntu)
LB_HDD_LABEL = " ${ LB_HDD_LABEL :- UBUNTU } "
; ;
esac
2011-09-28 09:37:56 +00:00
# Setting hdd size
2013-04-02 11:59:38 +00:00
LB_HDD_SIZE = " ${ LB_HDD_SIZE :- auto } "
2011-09-28 09:37:56 +00:00
2007-09-23 08:04:46 +00:00
# Setting iso volume
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
debian)
LB_ISO_VOLUME = " ${ LB_ISO_VOLUME :- Debian ${ LB_DISTRIBUTION } \$ (date +%Y%m%d-%H : %M) } "
; ;
2008-12-08 10:24:11 -01:00
2012-10-25 11:36:12 +00:00
progress-linux)
2011-01-07 21:25:37 -01:00
LB_ISO_VOLUME = " ${ LB_ISO_VOLUME :- Progress ${ LB_DISTRIBUTION } } "
2011-01-01 22:45:08 -01:00
; ;
2010-12-27 16:12:36 -01:00
ubuntu)
LB_ISO_VOLUME = " ${ LB_ISO_VOLUME :- Ubuntu ${ LB_DISTRIBUTION } \$ (date +%Y%m%d-%H : %M) } "
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Setting memtest option
2013-03-13 19:28:12 -01:00
LB_MEMTEST = " ${ LB_MEMTEST :- none } "
2007-09-23 08:04:46 +00:00
2012-09-29 11:20:21 +00:00
# Setting loadlin option
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
progress-linux| ubuntu)
2012-09-29 11:20:21 +00:00
; ;
*)
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2012-09-29 11:20:21 +00:00
amd64| i386)
if [ " ${ LB_DEBIAN_INSTALLER } " != "false" ]
then
LB_LOADLIN = " ${ LB_LOADLIN :- true } "
else
LB_LOADLIN = " ${ LB_LOADLIN :- false } "
fi
; ;
*)
LB_LOADLIN = " ${ LB_LOADLIN :- false } "
; ;
esac
; ;
esac
2008-08-14 19:33:56 +00:00
# Setting win32-loader option
2010-12-27 16:12:36 -01:00
case " ${ LB_MODE } " in
2012-12-17 11:48:54 -01:00
progress-linux| ubuntu)
2011-01-07 19:56:33 -01:00
2010-12-27 16:12:36 -01:00
; ;
2008-08-14 19:33:56 +00:00
2010-12-27 16:12:36 -01:00
*)
2012-12-19 09:16:57 -01:00
case " ${ LIVE_IMAGE_ARCHITECTURE } " in
2010-12-27 16:12:36 -01:00
amd64| i386)
if [ " ${ LB_DEBIAN_INSTALLER } " != "false" ]
then
LB_WIN32_LOADER = " ${ LB_WIN32_LOADER :- true } "
else
LB_WIN32_LOADER = " ${ LB_WIN32_LOADER :- false } "
fi
; ;
*)
LB_WIN32_LOADER = " ${ LB_WIN32_LOADER :- false } "
; ;
esac
; ;
esac
2008-08-14 19:33:56 +00:00
2007-09-23 08:05:14 +00:00
# Setting netboot filesystem
2010-09-07 13:11:20 +00:00
LB_NET_ROOT_FILESYSTEM = " ${ LB_NET_ROOT_FILESYSTEM :- nfs } "
2007-09-23 08:05:14 +00:00
2007-09-23 08:04:46 +00:00
# Setting netboot server path
2011-01-01 22:45:08 -01:00
case " ${ LB_MODE } " in
2012-10-25 11:36:12 +00:00
progress-linux)
2011-01-01 22:45:08 -01:00
LB_NET_ROOT_PATH = " ${ LB_NET_ROOT_PATH :- /srv/progress-linux } "
; ;
*)
LB_NET_ROOT_PATH = " ${ LB_NET_ROOT_PATH :- /srv/ ${ LB_MODE } -live } "
; ;
esac
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Setting netboot server address
2010-09-07 13:11:20 +00:00
LB_NET_ROOT_SERVER = " ${ LB_NET_ROOT_SERVER :- 192 .168.1.1 } "
2007-10-30 17:17:16 -01:00
# Setting net cow filesystem
2010-09-07 13:11:20 +00:00
LB_NET_COW_FILESYSTEM = " ${ LB_NET_COW_FILESYSTEM :- nfs } "
2007-09-23 08:05:10 +00:00
2008-02-26 17:57:41 -01:00
# Setting net tarball
2011-01-01 22:36:20 -01:00
LB_NET_TARBALL = " ${ LB_NET_TARBALL :- true } "
2008-02-26 17:57:41 -01:00
2012-04-26 17:52:15 +00:00
# Setting firmware option
2012-06-03 06:24:31 +00:00
case " ${ LB_MODE } " in
ubuntu)
LB_FIRMWARE_CHROOT = " ${ LB_FIRMWARE_CHROOT :- false } "
LB_FIRMWARE_BINARY = " ${ LB_FIRMWARE_BINARY :- false } "
; ;
*)
LB_FIRMWARE_CHROOT = " ${ LB_FIRMWARE_CHROOT :- true } "
LB_FIRMWARE_BINARY = " ${ LB_FIRMWARE_BINARY :- true } "
; ;
esac
2012-04-26 17:52:15 +00:00
2011-06-08 10:30:29 +00:00
# Setting swap file
LB_SWAP_FILE_SIZE = " ${ LB_SWAP_FILE_SIZE :- 512 } "
2007-09-23 08:05:10 +00:00
## config/source
2007-09-23 08:04:46 +00:00
# Setting source option
2010-09-07 13:11:20 +00:00
LB_SOURCE = " ${ LB_SOURCE :- false } "
2007-09-23 08:04:46 +00:00
2007-09-23 08:05:10 +00:00
# Setting image type
2010-09-07 13:11:20 +00:00
LB_SOURCE_IMAGES = " ${ LB_SOURCE_IMAGES :- tar } "
2007-09-23 08:04:46 +00:00
}
2007-11-11 12:14:25 -01:00
Check_defaults ( )
{
2012-12-19 09:21:28 -01:00
if [ -n " ${ LIVE_BUILD_VERSION } " ]
2009-10-30 10:29:05 -01:00
then
# We're only checking when we're actually running the checks
# that's why the check for emptyness of the version;
2012-12-19 09:21:28 -01:00
# however, as live-build always declares LIVE_BUILD_VERSION
2009-10-30 10:29:05 -01:00
# internally, this is safe assumption (no cases where it's unset,
# except when bootstrapping the functions/defaults etc.).
2012-12-19 09:21:28 -01:00
CURRENT_CONFIGURATION_VERSION = " $( echo ${ LIVE_CONFIGURATION_VERSION } | awk -F. ' { print $1 }' ) "
2012-12-19 07:49:06 -01:00
if [ -n " ${ CURRENT_CONFIGURATION_VERSION } " ]
2009-10-30 10:29:05 -01:00
then
2012-12-19 09:21:28 -01:00
CORRECT_VERSION = " $( echo ${ LIVE_BUILD_VERSION } | awk -F. '{ print $1 }' ) "
2012-12-19 07:49:06 -01:00
TOO_NEW_VERSION = " $(( ${ CORRECT_VERSION } + 1 )) "
TOO_OLD_VERSION = " $(( ${ CORRECT_VERSION } - 1 )) "
2012-12-17 11:41:11 -01:00
2012-12-19 07:49:06 -01:00
if [ ${ CURRENT_CONFIGURATION_VERSION } -ne ${ CORRECT_VERSION } ]
2012-12-17 11:41:11 -01:00
then
2012-12-19 07:49:06 -01:00
if [ ${ CURRENT_CONFIGURATION_VERSION } -ge ${ TOO_NEW_VERSION } ]
then
Echo_error " This config tree is too new for live-build ( ${ VERSION } ). "
Echo_error "Aborting build, please update live-build."
2012-12-17 11:41:11 -01:00
2012-12-19 07:49:06 -01:00
exit 1
elif [ ${ CURRENT_CONFIGURATION_VERSION } -le ${ TOO_OLD_VERSION } ]
then
Echo_error " This config tree is too old for live-build ( ${ VERSION } ). "
Echo_error "Aborting build, please update the configuration."
exit 1
else
Echo_warning "This configuration does not specify a version or has a unknown version."
Echo_warning "Continuing build, please correct the configuration."
fi
2012-12-17 11:41:11 -01:00
fi
2013-05-06 12:48:46 +00:00
fi
2013-02-15 09:58:14 -01:00
fi
2013-03-13 20:15:47 -01:00
case " ${ LB_BINARY_FILESYSTEM } " in
ntfs)
if [ ! -x " $( which ntfs-3g 2>/dev/null) " ]
then
Echo_error "Using ntfs as the binary filesystem is currently only supported"
Echo_error "if ntfs-3g is installed on the host system."
exit 1
fi
; ;
esac
2013-02-15 09:58:14 -01:00
if echo ${ LB_HDD_LABEL } | grep -qs ' '
then
Echo_error "There are currently no whitespaces supported in hdd labels."
exit 1
fi
2010-09-07 13:11:20 +00:00
if [ " ${ LB_DEBIAN_INSTALLER } " != "false" ]
2008-08-07 19:06:39 +00:00
then
2009-12-13 19:17:45 -01:00
# d-i true, no caching
2010-09-07 13:11:20 +00:00
if ! echo ${ LB_CACHE_STAGES } | grep -qs "bootstrap\b" || [ " ${ LB_CACHE } " != "true" ] || [ " ${ LB_CACHE_PACKAGES } " != "true" ]
2008-08-07 19:06:39 +00:00
then
2010-09-07 13:11:20 +00:00
Echo_warning "You have selected values of LB_CACHE, LB_CACHE_PACKAGES, LB_CACHE_STAGES and LB_DEBIAN_INSTALLER which will result in 'bootstrap' packages not being cached. This configuration is potentially unsafe as the bootstrap packages are re-used when integrating the Debian Installer."
2008-08-07 19:06:39 +00:00
fi
fi
2008-09-07 14:41:36 +00:00
2010-09-07 13:11:20 +00:00
if [ " ${ LB_BOOTLOADER } " = "syslinux" ]
2008-09-07 14:41:36 +00:00
then
2009-01-14 18:26:34 -01:00
# syslinux + fat
2010-09-07 13:11:20 +00:00
case " ${ LB_BINARY_FILESYSTEM } " in
2012-07-18 20:27:30 +00:00
fat*| ntfs)
2008-09-07 14:41:36 +00:00
; ;
*)
2012-07-18 20:27:30 +00:00
Echo_warning "You have selected values of LB_BOOTLOADER and LB_BINARY_FILESYSTEM which are incompatible - syslinux only supports FAT and NTFS filesystems."
2008-09-07 14:41:36 +00:00
; ;
esac
fi
2009-01-14 18:30:21 -01:00
2012-12-19 08:52:13 -01:00
case " ${ LIVE_IMAGE_TYPE } " in
2011-09-13 07:10:28 +00:00
hdd*)
2010-09-07 13:11:20 +00:00
case " ${ LB_BOOTLOADER } " in
2013-02-15 10:13:17 -01:00
grub)
2010-09-02 11:22:22 +00:00
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."
2010-02-18 15:12:59 -01:00
exit 1
; ;
esac
; ;
esac
2009-02-18 17:21:49 -01:00
2011-09-22 19:02:32 +00:00
if [ " $( echo \" ${ LB_ISO_APPLICATION } \" | wc -c) " -gt 128 ]
2009-02-18 17:21:49 -01:00
then
2010-09-07 13:11:20 +00:00
Echo_warning "You have specified a value of LB_ISO_APPLICATION that is too long; the maximum length is 128 characters."
2009-02-18 17:21:49 -01:00
fi
2011-09-22 19:02:32 +00:00
if [ " $( echo \" ${ LB_ISO_PREPARER } \" | wc -c) " -gt 128 ]
2009-02-18 17:21:49 -01:00
then
2010-09-07 13:11:20 +00:00
Echo_warning "You have specified a value of LB_ISO_PREPARER that is too long; the maximum length is 128 characters."
2009-02-18 17:21:49 -01:00
fi
2011-09-22 19:02:32 +00:00
if [ " $( echo \" ${ LB_ISO_PUBLISHER } \" | wc -c) " -gt 128 ]
2009-02-18 17:21:49 -01:00
then
2010-09-07 13:11:20 +00:00
Echo_warning "You have specified a value of LB_ISO_PUBLISHER that is too long; the maximum length is 128 characters."
2009-02-18 17:21:49 -01:00
fi
2011-09-22 19:02:32 +00:00
if [ " $( eval " echo \" ${ LB_ISO_VOLUME } \" " | wc -c) " -gt 32 ]
2009-02-18 17:21:49 -01:00
then
2010-09-07 13:11:20 +00:00
Echo_warning "You have specified a value of LB_ISO_VOLUME that is too long; the maximum length is 32 characters."
2009-02-18 17:21:49 -01:00
fi
2009-05-09 21:36:30 +00:00
2011-09-30 22:24:08 +00:00
# Architectures to use foreign bootstrap for
LB_BOOTSTRAP_QEMU_ARCHITECTURES = " ${ LB_BOOTSTRAP_QEMU_ARCHITECTURES :- } "
# Packages to exclude for the foreign/ports bootstrapping
2012-08-27 12:39:14 +00:00
LB_BOOTSTRAP_QEMU_EXCLUDE = " ${ LB_BOOTSTRAP_QEMU_EXCLUDE :- } "
2011-09-30 22:24:08 +00:00
# Ports using foreign bootstrap need a working qemu-*-system. This is the location it
LB_BOOTSTRAP_QEMU_STATIC = " ${ LB_BOOTSTRAP_QEMU_STATIC :- } "
2007-11-11 12:14:25 -01:00
}