summaryrefslogtreecommitdiff
path: root/auto
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2012-10-11 07:59:51 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2012-10-11 08:31:29 +0200
commit48f3cfe728c1ffe44629c792380d4d47466ee38f (patch)
tree537c2506f0b0c2a8006ba8ea983a24338effa335 /auto
parent797ee5a8cf5bb066143582a7fb042285f2f220e3 (diff)
downloadkanotix-48f3cfe728c1ffe44629c792380d4d47466ee38f.zip
kanotix-48f3cfe728c1ffe44629c792380d4d47466ee38f.tar.gz
compat update for latest live-build version
Diffstat (limited to 'auto')
-rwxr-xr-xauto/build1
-rwxr-xr-xauto/clean2
-rw-r--r--auto/compat2
-rwxr-xr-xauto/config4
-rw-r--r--auto/functions/compat42
-rw-r--r--auto/functions/debpool-hook6
-rw-r--r--auto/functions/livebuild-hacks36
7 files changed, 69 insertions, 24 deletions
diff --git a/auto/build b/auto/build
index 22da40e..f054d5c 100755
--- a/auto/build
+++ b/auto/build
@@ -55,6 +55,7 @@ postbuild()
{
[ -d cache/stages_bootstrap ] && mv cache/stages_bootstrap cache/stages_bootstrap$bit
[ -f binary-hybrid.iso ] && mv -f binary-hybrid.iso kanotix$bit.iso
+ [ -f binary.hybrid.iso ] && mv -f binary.hybrid.iso kanotix$bit.iso
}
if [ "$LB_KANOTIX_TMPFS" = "true" ]; then
diff --git a/auto/clean b/auto/clean
index 9f7f66f..9e95855 100755
--- a/auto/clean
+++ b/auto/clean
@@ -5,6 +5,8 @@ rm -f build.log
# Remove generated files
rm -f config/binary config/bootstrap config/chroot config/common config/source \
config/kanotix config/chroot_local-includes/root/build.conf config/chroot_local-packageslists/kanotix-flavours.list
+rm -f config/package-lists/compat.list.chroot
+rmdir --ignore-fail-on-non-empty config/package-lists
if [ -f config/all ]; then
sed -i '/^. config\/kanotix/d' config/all
[ ! -s config/all ] && rm -f config/all
diff --git a/auto/compat b/auto/compat
index 3cbcf91..7625a89 100644
--- a/auto/compat
+++ b/auto/compat
@@ -3,7 +3,7 @@
Expand_packagelist ()
{
. "${LB_BASE}"/functions/packagelists.sh
- Expand_packagelist "$@" config/lists
+ Expand_packagelist "$@" config/lists config/package-lists
. auto/compat
}
diff --git a/auto/config b/auto/config
index 3b13ca8..5bb2033 100755
--- a/auto/config
+++ b/auto/config
@@ -86,7 +86,5 @@ lb config noauto --linux-packages "$LB_LINUX_PACKAGES" --linux-flavours "$LB_LIN
# Fetch kanotix-scripts if necessary
mkdir -p config/chroot_local-includes/usr/local/bin
grep -oe '^[^ #]*' scripts.urls | wget -i- -N -q -P config/chroot_local-includes/usr/local/bin
-chmod 755 config/chroot_local-includes/usr/local/bin/*.sh
-chmod 755 config/chroot_local-includes/usr/local/bin/*.bash
+chmod 755 config/chroot_local-includes/usr/local/bin/*sh || :
-exit 1
diff --git a/auto/functions/compat b/auto/functions/compat
index 250402d..9bb8438 100644
--- a/auto/functions/compat
+++ b/auto/functions/compat
@@ -1,5 +1,8 @@
#!/bin/bash
export LB_VERSION=$VERSION
+export LB_BASE="${LB_BASE:-/usr/share/live/build}"
+
+current_script="$(basename "$0"|sed 's/^lb_//')"
Compat_arguments ()
{
@@ -10,11 +13,11 @@ Compat_arguments ()
case "$arg" in
-r|--repositories) arg="--archives";;
--architecture) arg="--architectures";;
- --packages-lists) arg="--package-lists";;
--syslinux-theme) ;;
# ignore other unsupported arguments
--syslinux-*|--bootstrap-config|-e|--encryption|-l|--language) shift; continue;;
--binary-indices|--packages|--symlinks|--sysvinit|--tasks|--virtual-root-size) shift; continue;;
+ --packages-lists|--package-list|-p) Compat_packagelists $1; shift; continue;;
esac
echo -n "$arg$IFS"
done
@@ -41,6 +44,7 @@ Compat_dir ()
dir3="$2"
ext2="$3"
ext3="$4"
+ [ ! -e "config/$dir2" ] && return 0
if [ -z "$ext2$ext3" ]; then
rm -r "config/$dir3"
ln -s "$(basename "$dir2")" "config/$dir3"
@@ -61,6 +65,19 @@ Compat_dir ()
touch config/$dir3.compat
}
+Compat_packagelists()
+{
+ mkdir -p config/package-lists
+ (
+ echo '# AUTOGENERATED from "lb config -p" option - DO NOT CHANGE'
+ IFS=" "
+ for packagelist in $1
+ do
+ echo "#include <$packagelist>"
+ done
+ ) > config/package-lists/compat.list.chroot
+}
+
Compat_clean()
{
for i in config/*.compat
@@ -75,8 +92,13 @@ Compat_clean()
case "$LB_VERSION" in
3*)
- case "$(basename "$0")" in
- lb_config)
+ case "$current_script" in
+ config)
+ if [ -z "$LB_COMPAT_CONFIG_AUTO" ]; then
+ export LB_COMPAT_CONFIG_AUTO=1
+ auto/config "$@"
+ exit $?
+ fi
OIFS="$IFS"; IFS="$(printf \\a)"
set -- $(Compat_arguments "$@")
IFS="$OIFS"
@@ -88,10 +110,10 @@ case "$LB_VERSION" in
LB_ARCHITECTURE="$LB_ARCHITECTURES"
trap Compat_config EXIT
;;
- lb_chroot_apt)
+ chroot_apt)
Compat_dir chroot_local-packages packages.chroot
;;
- lb_chroot_archives)
+ chroot_archives)
mkdir -p config/archives
touch config/archives.compat
. config/bootstrap
@@ -109,19 +131,19 @@ case "$LB_VERSION" in
done
done
;;
- lb_chroot_preseed)
+ chroot_preseed)
Compat_dir chroot_local-preseed preseed .cfg .preseed
;;
- lb_chroot_includes)
+ chroot_includes)
Compat_dir chroot_local-includes includes.chroot
;;
- lb_chroot_hooks)
+ chroot_hooks)
Compat_dir chroot_local-hooks hooks - .chroot
;;
- lb_binary_hooks)
+ binary_hooks)
Compat_dir binary_local-hooks hooks - .binary
;;
- lb_build|lb_clean)
+ build|clean)
trap Compat_clean EXIT
;;
esac
diff --git a/auto/functions/debpool-hook b/auto/functions/debpool-hook
index c86a065..e56df34 100644
--- a/auto/functions/debpool-hook
+++ b/auto/functions/debpool-hook
@@ -1,6 +1,8 @@
#!/bin/bash
-if [ "$(basename "$0")" = "lb_chroot_local-hooks" ]; then
+current_script="$(basename "$0"|sed 's/^lb_//')"
+
+if [ "$current_script" = "chroot_local-hooks" ]; then
echo "HOOK: debpool@chroot_local-hooks"
if [ -e config/chroot_debpool ]; then
mkdir -p chroot/live
@@ -8,7 +10,7 @@ if [ "$(basename "$0")" = "lb_chroot_local-hooks" ]; then
fi
fi
-if [ "$(basename "$0")" = "lb_binary_rootfs" ]; then
+if [ "$current_script" = "binary_rootfs" ]; then
echo "HOOK: debpool@binary-rootfs"
for dir in chroot/chroot/live chroot/live
do
diff --git a/auto/functions/livebuild-hacks b/auto/functions/livebuild-hacks
index 6dd0cdc..3fc2fac 100644
--- a/auto/functions/livebuild-hacks
+++ b/auto/functions/livebuild-hacks
@@ -1,17 +1,16 @@
#!/bin/sh
# Hacks to inject code into various live-build functions
+current_script="$(basename "$0"|sed 's/^lb_//')"
+
# ISO sorting
-if [ "$(basename "$0")" = "lb_binary_iso" ]; then
+if [ "$current_script" = "binary_iso" ]; then
echo "HOOK: livebuild-hacks@binary_iso"
- In_list ()
+ Genisoimage_options_hack ()
{
- . "${LB_BASE}"/functions/aliases.sh
- In_list "$@"
- RC=$?
if [ -f config/binary_iso/isoimage.sort ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -sort isoimage.sort"
+ echo " -sort isoimage.sort"
case "${LB_BUILD_WITH_CHROOT}" in
true)
@@ -23,17 +22,38 @@ if [ "$(basename "$0")" = "lb_binary_iso" ]; then
;;
esac
fi
+ Genisoimage_options_hack () { true; } # only once -> overload
+ }
+ In_list ()
+ {
+ . "${LB_BASE}"/functions/aliases.sh
+ In_list "$@"
+ RC=$?
+ GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS}$(Genisoimage_options_hack)"
case "$LB_BOOTLOADER" in
grub2|burg)
LB_BINARY_IMAGES=iso
;;
esac
- return $rc
+ return $RC
+ }
+ Install_package ()
+ {
+ . "${LB_BASE}"/functions/packages.sh
+ Install_package "$@"
+ RC=$?
+ LB_ISO_APPLICATION="${LB_ISO_APPLICATION}\"$(Genisoimage_options_hack)\""
+ case "$LB_BOOTLOADER" in
+ grub2|burg)
+ LB_BINARY_IMAGES=iso
+ ;;
+ esac
+ return $RC
}
fi
# Grub2: Do not number the default kernel / initrd files.
-if [ "$(basename "$0")" = "lb_binary_grub2" ]; then
+if [ "$current_script" = "binary_grub2" ]; then
echo "HOOK: livebuild-hacks@binary_grub2"
Overload_Grub_live_entry ()
{