Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-03-16 01:48:10 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-03-16 02:15:59 -0300
commit3d05bef2b96c84126e6c8921e834f2655a4ec730 (patch)
tree1a76361287507ae1694d11b9e7ed0d0da06d2a83 /configs
parentab5d67fe4386f6fcd1de2bdfa35b2dcb669d39dd (diff)
[archiso] Implement own chroot functions in mkarchiso
* Remove devtools dependency. * Better control over what files are touched inside chroot (root-image). Now: NONE :) * Two new commands: + init: To install {base} group and other needed packages (syslinux for now) + run: If we want to run some command inside chroot (mkinitcpio, locale-gen, useradd, etc etc...) * Renamed command: "created" to "install", says much better what does. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'configs')
-rwxr-xr-xconfigs/baseline/build.sh7
-rwxr-xr-xconfigs/releng/build.sh19
2 files changed, 16 insertions, 10 deletions
diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh
index 1f2251d..f7f7abf 100755
--- a/configs/baseline/build.sh
+++ b/configs/baseline/build.sh
@@ -15,8 +15,7 @@ script_path=$(readlink -f ${0%/*})
# Base installation (root-image)
make_basefs() {
- mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "base" create
- mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "syslinux" create
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" init
}
# Copy mkinitcpio archiso hooks (root-image)
@@ -33,7 +32,9 @@ make_setup_mkinitcpio() {
make_boot() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
mkdir -p ${work_dir}/iso/${install_dir}/boot/${arch}
- mkarchroot -n -r "mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img" ${work_dir}/root-image
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \
+ -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' \
+ run
cp ${work_dir}/root-image/boot/archiso.img ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img
cp ${work_dir}/root-image/boot/vmlinuz-linux ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz
: > ${work_dir}/build.${FUNCNAME}
diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index 42836a9..f206caf 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -15,13 +15,13 @@ script_path=$(readlink -f ${0%/*})
# Base installation (root-image)
make_basefs() {
- mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "base" create
- mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "memtest86+ syslinux mkinitcpio-nfs-utils nbd curl" create
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" init
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install
}
# Additional packages (root-image)
make_packages() {
- mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" create
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install
}
# Copy mkinitcpio archiso hooks (root-image)
@@ -46,7 +46,9 @@ make_boot() {
local _src=${work_dir}/root-image
local _dst_boot=${work_dir}/iso/${install_dir}/boot
mkdir -p ${_dst_boot}/${arch}
- mkarchroot -n -r "mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img" ${_src}
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \
+ -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' \
+ run
mv ${_src}/boot/archiso.img ${_dst_boot}/${arch}/archiso.img
mv ${_src}/boot/vmlinuz-linux ${_dst_boot}/${arch}/vmlinuz
cp ${_src}/boot/memtest86+/memtest.bin ${_dst_boot}/memtest
@@ -90,7 +92,6 @@ make_isolinux() {
}
# Customize installation (root-image)
-# NOTE: mkarchroot should not be executed after this function is executed, otherwise will overwrites some custom files.
make_customize_root_image() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
cp -af ${script_path}/root-image ${work_dir}
@@ -99,8 +100,12 @@ make_customize_root_image() {
mkdir -p ${work_dir}/root-image/etc/pacman.d
wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/all/
sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist
- chroot ${work_dir}/root-image /usr/sbin/locale-gen
- chroot ${work_dir}/root-image /usr/sbin/useradd -m -p "" -g users -G "audio,disk,optical,wheel" arch
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \
+ -r 'locale-gen' \
+ run
+ mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \
+ -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" arch' \
+ run
: > ${work_dir}/build.${FUNCNAME}
fi
}