Commit eda8fac1 authored by amnesia's avatar amnesia

Remove dependency on live-build functions in chroot_local-hooks.

This makes the build environment more robust and less dependent on
live-build internals.
parent 8ca0cc00
......@@ -21,6 +21,7 @@
/config/chroot_local-includes/etc/amnesia/version
/config/chroot_local-includes/home/amnesia/.gnome2/nautilus-scripts
/config/chroot_local-includes/usr/share/amnesia/readahead-list
/config/chroot_local-includes/usr/share/amnesia/build/variables
/config/chroot_local-includes/usr/share/doc/Changelog
/config/chroot_local-includes/usr/share/doc/amnesia/Changelog
/config/chroot_local-includes/usr/share/doc/amnesia/amnesia.asc
......
......@@ -15,7 +15,7 @@ rm -rf cache/stages_rootfs
# get LB_BINARY_IMAGES
. config/binary
# get LB_ARCHITECTURE
# get LB_ARCHITECTURE and LB_DISTRIBUTION
. config/bootstrap
# build the doc wiki
......@@ -24,6 +24,9 @@ rm -rf cache/stages_rootfs
# refresh translations of our programs
./refresh-translations
# save variables that are needed by chroot_local-hooks
echo "LB_DISTRIBUTION=${LB_DISTRIBUTION}" >> config/chroot_local-includes/usr/share/amnesia/build/variables
# fix permissions on some source files that will be copied as is to the chroot.
# they may be wrong, e.g. if the Git repository was cloned with a strict umask.
chmod -R go+rX config/binary_local-includes/
......
......@@ -5,18 +5,6 @@
# We run htpdate as this user, so that we can whitelist its
# non-Torified outgoing packets.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'creating the htp user')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "creating the htp user"
echo "creating the htp user"
adduser --system --quiet --group --no-create-home htp || :
......@@ -2,18 +2,6 @@
# Remove pdnsd's resolvconf hook.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing pdnsd resolvconf hook')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "removing pdnsd resolvconf hook"
echo "removing pdnsd resolvconf hook"
rm -f /etc/resolvconf/update.d/pdnsd
......@@ -3,19 +3,7 @@
# Remove pidgin's (libpurple's) MSN support, that is affected by
# security issues far too often.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing pidgin MSN support')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "removing pidgin MSN support"
echo "removing pidgin MSN support"
dpkg -L libpurple0 | grep '/libmsn.so$' | xargs rm -f
......@@ -2,19 +2,7 @@
# Remove unwanted iceweasel search plugins.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing unwanted iceweasel search plugins')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "removing unwanted iceweasel search plugins"
echo "removing unwanted iceweasel search plugins"
UNWANTED_SEARCHPLUGINS='amazondotcom answers eBay yahoo'
for plugin in $UNWANTED_SEARCHPLUGINS ; do
......
......@@ -2,19 +2,7 @@
# Build binary sqlite iceweasel files from plain text SQL files.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'building iceweasel sqlite files')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "building iceweasel sqlite files"
echo "building iceweasel sqlite files"
INSTALLED_PACKAGES="sqlite3"
SQL_SRC_DIR=/usr/share/amnesia/iceweasel/sql
......
......@@ -2,19 +2,7 @@
# Set the correct firegpg version in /etc/iceweasel/profile/user.js
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'recording firegpg version')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "recording firegpg version"
echo "recording firegpg version"
PACKAGE_NAME='xul-ext-firegpg'
USER_PREFS_FILE=/etc/iceweasel/profile/user.js
......
......@@ -2,19 +2,7 @@
# Load GConf settings.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'load GConf settings')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "Loading GConf settings"
echo "Loading GConf settings"
gct() {
gconftool-2 \
......
#!/bin/sh
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
echo "Adding cpufreq modules to /etc/modules"
# Setting static variables
DESCRIPTION="$(Echo 'add modules to /etc/modules')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "Adding cpufreq modules to /etc/modules"
for module in acpi-cpufreq cpufreq_powersave cpufreq_ondemand ; do
echo "${module}" >> /etc/modules
done
#!/bin/sh
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'building VirtualBox guest modules')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
echo "Building VirtualBox guest modules"
hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" != i386 -a "$hw_arch" != amd64 ]; then
exit 0
fi
Echo_message "Building VirtualBox guest modules"
# Get version information for the (newest) installed kernel.
KERNEL="`/bin/ls -1 /boot/vmlinuz-* | tail -n 1`"
KERNEL_VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
......
......@@ -2,17 +2,7 @@
# Install modules managed by module-assistant
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'installing modules managed by module-assistant')"
HELP=""
USAGE="${PROGRAM}"
Set_defaults
Echo_message "installing modules managed by module-assistant"
echo "installing modules managed by module-assistant"
MODULES=""
MA="module-assistant --text-mode --non-inter"
......
#!/bin/sh
# Manage initscripts
echo "managing initscripts"
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Get LB_DISTRIBUTION
Read_conffiles config/bootstrap
# Setting static variables
DESCRIPTION="$(Echo 'managing initscripts')"
HELP=""
USAGE="${PROGRAM}"
Set_defaults
Echo_message "managing initscripts"
. /usr/share/amnesia/build/variables
disable_service () {
local INITSCRIPT="$1"
......
#!/bin/sh
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'removing development packages')"
HELP=""
USAGE="${PROGRAM}"
# Reading configuration files
Read_conffiles config/all config/common config/chroot
Set_defaults
Echo_message "Removing development packages"
echo "Removing development packages"
# use apt-get as aptitude doesn't know about globs
apt-get --purge remove --yes \
......
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