From 046095cffa06c76406e6cd7321ccbf789d09063a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Sep 2011 15:16:23 +0200 Subject: Renaming lb_chroot_local-includes into lb_chroot_includes and check for includes in config/includes.chroot. --- scripts/build/lb_chroot | 2 +- scripts/build/lb_chroot_hostname | 6 ++-- scripts/build/lb_chroot_hosts | 4 +-- scripts/build/lb_chroot_includes | 50 ++++++++++++++++++++++++++++++++++ scripts/build/lb_chroot_local-includes | 50 ---------------------------------- scripts/build/lb_chroot_resolv | 4 +-- scripts/build/lb_config | 2 +- 7 files changed, 59 insertions(+), 59 deletions(-) create mode 100755 scripts/build/lb_chroot_includes delete mode 100755 scripts/build/lb_chroot_local-includes diff --git a/scripts/build/lb_chroot b/scripts/build/lb_chroot index e459c6cb9..5677a68a0 100755 --- a/scripts/build/lb_chroot +++ b/scripts/build/lb_chroot @@ -69,7 +69,7 @@ do done lb chroot_live-packages ${*} -lb chroot_local-includes ${*} +lb chroot_includes ${*} lb chroot_local-patches ${*} lb chroot_hooks ${*} lb chroot_hacks ${*} diff --git a/scripts/build/lb_chroot_hostname b/scripts/build/lb_chroot_hostname index 81bf4c3f4..4da8602f0 100755 --- a/scripts/build/lb_chroot_hostname +++ b/scripts/build/lb_chroot_hostname @@ -71,10 +71,10 @@ EOF # Creating lock file Create_lockfile .lock - # Copying hostname from local-includes, if existing - if [ -e config/chroot_local-includes/etc/hostname ] + # Copying hostname from includes, if existing + if [ -e config/includes.chroot/etc/hostname ] then - cp -a config/chroot_local-includes/etc/hostname chroot/etc/hostname + cp -a config/includes.chroot/etc/hostname chroot/etc/hostname fi Echo_message "Deconfiguring file /bin/hostname" diff --git a/scripts/build/lb_chroot_hosts b/scripts/build/lb_chroot_hosts index f246b5351..65e85fa2e 100755 --- a/scripts/build/lb_chroot_hosts +++ b/scripts/build/lb_chroot_hosts @@ -73,10 +73,10 @@ EOF # Creating lock file Create_lockfile .lock - if [ -e config/chroot_local-includes/etc/hosts ] + if [ -e config/includes.chroot/etc/hosts ] then # Copying local hosts - cp -a config/chroot_local-includes/etc/hosts chroot/etc/hosts + cp -a config/includes.chroot/etc/hosts chroot/etc/hosts rm -f chroot/etc/hosts.orig elif [ -f chroot/etc/hosts.orig ] then diff --git a/scripts/build/lb_chroot_includes b/scripts/build/lb_chroot_includes new file mode 100755 index 000000000..0d08dd947 --- /dev/null +++ b/scripts/build/lb_chroot_includes @@ -0,0 +1,50 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2011 Daniel Baumann +## +## live-build 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. + + +set -e + +# Including common functions +. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh + +# Setting static variables +DESCRIPTION="$(Echo 'copy files into chroot')" +HELP="" +USAGE="${PROGRAM} [--force]" + +Arguments "${@}" + +# Reading configuration files +Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source +Set_defaults + +Echo_message "Begin copying chroot includes..." + +# Requiring stage file +Require_stagefile .stage/config .stage/bootstrap + +# Checking stage file +Check_stagefile .stage/includes.chroot + +# Checking lock file +Check_lockfile .lock + +# Creating lock file +Create_lockfile .lock + +if Find_files config/includes.chroot/ +then + # Copying includes + cd config/includes.chroot + find . | cpio -dmpu --no-preserve-owner "${OLDPWD}"/chroot + cd "${OLDPWD}" + + # Creating stage file + Create_stagefile .stage/chroot_includes +fi diff --git a/scripts/build/lb_chroot_local-includes b/scripts/build/lb_chroot_local-includes deleted file mode 100755 index d2c0f8a2f..000000000 --- a/scripts/build/lb_chroot_local-includes +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2011 Daniel Baumann -## -## live-build 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. - - -set -e - -# Including common functions -. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh - -# Setting static variables -DESCRIPTION="$(Echo 'copy local files into chroot')" -HELP="" -USAGE="${PROGRAM} [--force]" - -Arguments "${@}" - -# Reading configuration files -Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source -Set_defaults - -Echo_message "Begin copying chroot local includes..." - -# Requiring stage file -Require_stagefile .stage/config .stage/bootstrap - -# Checking stage file -Check_stagefile .stage/chroot_local-includes - -# Checking lock file -Check_lockfile .lock - -# Creating lock file -Create_lockfile .lock - -if Find_files config/chroot_local-includes/ -then - # Copying includes - cd config/chroot_local-includes - find . | cpio -dmpu --no-preserve-owner "${OLDPWD}"/chroot - cd "${OLDPWD}" - - # Creating stage file - Create_stagefile .stage/chroot_local-includes -fi diff --git a/scripts/build/lb_chroot_resolv b/scripts/build/lb_chroot_resolv index 1e705dcfc..e32bdc669 100755 --- a/scripts/build/lb_chroot_resolv +++ b/scripts/build/lb_chroot_resolv @@ -72,10 +72,10 @@ case "${1}" in # Creating lock file Create_lockfile .lock - if [ -e config/chroot_local-includes/etc/resolv.conf ] + if [ -e config/includes.chroot/etc/resolv.conf ] then # Copying local resolv.conf - cp -a config/chroot_local-includes/etc/resolv.conf chroot/etc/resolv.conf + cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf rm -f chroot/etc/resolv.conf.orig elif [ -e chroot/etc/resolv.conf.orig ] then diff --git a/scripts/build/lb_config b/scripts/build/lb_config index ff14b431d..7ac14c5f7 100755 --- a/scripts/build/lb_config +++ b/scripts/build/lb_config @@ -1161,7 +1161,7 @@ EOF mkdir -p config/archives mkdir -p config/chroot_apt mkdir -p config/hooks -mkdir -p config/chroot_local-includes +mkdir -p config/local.chroot mkdir -p config/chroot_local-patches mkdir -p config/chroot_packages mkdir -p config/package-lists -- cgit v1.2.3