Install all packages in one go and don't copy pacman.conf to airootfs
configs/{baseline,releng}/build.sh: Copy custom files to airootfs before installing packages. Instead of calling `mkarchiso init`, list all required packages in packages.x86_64 and install them all at once with `mkarchiso install`. The mkdir command which `mkarchiso init` performs is now done by make_custom_airootfs. configs/releng/build.sh: Don't copy configs/releng/pacman.conf to airootfs, it is only meant to provide a unmodified pacman.conf durring pacstrap. In airootfs, an unmodified /etc/pacman.conf will be installed with the pacman package.
This commit is contained in:
parent
c54a41fb3d
commit
df93289b73
@ -30,9 +30,16 @@ make_pacman_conf() {
|
|||||||
"${script_path}/pacman.conf" > "${work_dir}/pacman.conf"
|
"${script_path}/pacman.conf" > "${work_dir}/pacman.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Base installation (airootfs)
|
# Prepare working directory and copy custom airootfs files (airootfs)
|
||||||
make_basefs() {
|
make_custom_airootfs() {
|
||||||
mkarchiso -v -w "${work_dir}" -D "${install_dir}" init
|
local _airootfs="${work_dir}/airootfs"
|
||||||
|
mkdir -p -- "${_airootfs}"
|
||||||
|
|
||||||
|
if [[ -d "${script_path}/airootfs" ]]; then
|
||||||
|
cp -af --no-preserve=ownership -- "${script_path}/airootfs/." "${_airootfs}"
|
||||||
|
[[ -e "${_airootfs}/etc/shadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/shadow"
|
||||||
|
[[ -e "${_airootfs}/etc/gshadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/gshadow"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Packages (airootfs)
|
# Packages (airootfs)
|
||||||
@ -52,16 +59,6 @@ make_setup_mkinitcpio() {
|
|||||||
-r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' run
|
-r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' run
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prepare working directory and copy custom airootfs files (airootfs)
|
|
||||||
make_custom_airootfs() {
|
|
||||||
local _airootfs="${work_dir}/airootfs"
|
|
||||||
|
|
||||||
if [[ -d "${script_path}/airootfs" ]]; then
|
|
||||||
cp -af --no-preserve=ownership -- "${script_path}/airootfs/." "${_airootfs}"
|
|
||||||
[[ -e "${_airootfs}/etc/shadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/shadow"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prepare ${install_dir}/boot/
|
# Prepare ${install_dir}/boot/
|
||||||
make_boot() {
|
make_boot() {
|
||||||
mkdir -p "${work_dir}/iso/${install_dir}/boot/${arch}"
|
mkdir -p "${work_dir}/iso/${install_dir}/boot/${arch}"
|
||||||
@ -102,11 +99,10 @@ make_iso() {
|
|||||||
"${iso_name}-${iso_version}-${arch}.iso"
|
"${iso_name}-${iso_version}-${arch}.iso"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_once make_custom_airootfs
|
||||||
run_once make_pacman_conf
|
run_once make_pacman_conf
|
||||||
run_once make_basefs
|
|
||||||
run_once make_packages
|
run_once make_packages
|
||||||
run_once make_setup_mkinitcpio
|
run_once make_setup_mkinitcpio
|
||||||
run_once make_custom_airootfs
|
|
||||||
run_once make_boot
|
run_once make_boot
|
||||||
run_once make_syslinux
|
run_once make_syslinux
|
||||||
run_once make_isolinux
|
run_once make_isolinux
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
|
base
|
||||||
linux
|
linux
|
||||||
mkinitcpio
|
mkinitcpio
|
||||||
|
syslinux
|
||||||
|
@ -59,12 +59,17 @@ make_pacman_conf() {
|
|||||||
"${script_path}/pacman.conf" > "${work_dir}/pacman.conf"
|
"${script_path}/pacman.conf" > "${work_dir}/pacman.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Base installation (airootfs)
|
# Prepare working directory and copy custom airootfs files (airootfs)
|
||||||
make_basefs() {
|
make_custom_airootfs() {
|
||||||
if [ -n "${verbose}" ]; then
|
local _airootfs="${work_dir}/x86_64/airootfs"
|
||||||
mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" init
|
mkdir -p -- "${_airootfs}"
|
||||||
else
|
|
||||||
mkarchiso -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" init
|
if [[ -d "${script_path}/airootfs" ]]; then
|
||||||
|
cp -af --no-preserve=ownership -- "${script_path}/airootfs/." "${_airootfs}"
|
||||||
|
|
||||||
|
[[ -e "${_airootfs}/etc/shadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/shadow"
|
||||||
|
[[ -e "${_airootfs}/etc/gshadow" ]] && chmod -f 0400 -- "${_airootfs}/etc/gshadow"
|
||||||
|
[[ -e "${_airootfs}/root" ]] && chmod -f 0750 -- "${_airootfs}/root"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,10 +117,6 @@ make_setup_mkinitcpio() {
|
|||||||
|
|
||||||
# Customize installation (airootfs)
|
# Customize installation (airootfs)
|
||||||
make_customize_airootfs() {
|
make_customize_airootfs() {
|
||||||
cp -af --no-preserve=ownership "${script_path}/airootfs" "${work_dir}/x86_64"
|
|
||||||
|
|
||||||
cp "${script_path}/pacman.conf" "${work_dir}/x86_64/airootfs/etc"
|
|
||||||
|
|
||||||
if [ -n "${verbose}" ]; then
|
if [ -n "${verbose}" ]; then
|
||||||
mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
|
mkarchiso -v -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" \
|
||||||
-r '/root/customize_airootfs.sh' run
|
-r '/root/customize_airootfs.sh' run
|
||||||
@ -124,9 +125,6 @@ make_customize_airootfs() {
|
|||||||
-r '/root/customize_airootfs.sh' run
|
-r '/root/customize_airootfs.sh' run
|
||||||
fi
|
fi
|
||||||
rm "${work_dir}/x86_64/airootfs/root/customize_airootfs.sh"
|
rm "${work_dir}/x86_64/airootfs/root/customize_airootfs.sh"
|
||||||
|
|
||||||
[[ -e "${work_dir}/x86_64/airootfs/etc/shadow" ]] && chmod -f 0400 -- "${work_dir}/x86_64/airootfs/etc/shadow"
|
|
||||||
[[ -e "${work_dir}/x86_64/airootfs/root" ]] && chmod -f 0750 -- "${work_dir}/x86_64/airootfs/root"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prepare kernel/initramfs ${install_dir}/boot/
|
# Prepare kernel/initramfs ${install_dir}/boot/
|
||||||
@ -290,7 +288,7 @@ done
|
|||||||
mkdir -p "${work_dir}"
|
mkdir -p "${work_dir}"
|
||||||
|
|
||||||
run_once make_pacman_conf
|
run_once make_pacman_conf
|
||||||
run_once make_basefs
|
run_once make_custom_airootfs
|
||||||
run_once make_packages
|
run_once make_packages
|
||||||
run_once make_setup_mkinitcpio
|
run_once make_setup_mkinitcpio
|
||||||
run_once make_customize_airootfs
|
run_once make_customize_airootfs
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
amd-ucode
|
amd-ucode
|
||||||
arch-install-scripts
|
arch-install-scripts
|
||||||
b43-fwcutter
|
b43-fwcutter
|
||||||
|
base
|
||||||
bind-tools
|
bind-tools
|
||||||
broadcom-wl
|
broadcom-wl
|
||||||
btrfs-progs
|
btrfs-progs
|
||||||
@ -72,6 +73,7 @@ sdparm
|
|||||||
sg3_utils
|
sg3_utils
|
||||||
smartmontools
|
smartmontools
|
||||||
sudo
|
sudo
|
||||||
|
syslinux
|
||||||
systemd-resolvconf
|
systemd-resolvconf
|
||||||
tcpdump
|
tcpdump
|
||||||
terminus-font
|
terminus-font
|
||||||
|
Loading…
Reference in New Issue
Block a user