Skip to content

Commit ad1c0e7

Browse files
committed
[add]: Don't hardcode packages in build.sh
Move all required packages to base. Test file availability before copying them.
1 parent fdcc142 commit ad1c0e7

3 files changed

Lines changed: 49 additions & 7 deletions

File tree

build.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -638,11 +638,9 @@ make_pacman_conf() {
638638
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${build_pacman_conf} > "${work_dir}/pacman-${arch}.conf"
639639
}
640640

641-
# Base installation, plus needed packages (airootfs)
641+
# Base installation (airootfs)
642642
make_basefs() {
643643
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" init
644-
# ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh efitools" install
645-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "bash haveged intel-ucode amd-ucode mkinitcpio-nfs-utils nbd" install
646644

647645
# Install plymouth.
648646
if [[ "${boot_splash}" = true ]]; then
@@ -964,10 +962,18 @@ make_boot() {
964962

965963
# Add other aditional/extra files to ${install_dir}/boot/
966964
make_boot_extra() {
967-
cp "${work_dir}/${arch}/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/intel_ucode.img"
968-
cp "${work_dir}/${arch}/airootfs/usr/share/licenses/intel-ucode/LICENSE" "${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE"
969-
cp "${work_dir}/${arch}/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/amd_ucode.img"
970-
cp "${work_dir}/${arch}/airootfs/usr/share/licenses/amd-ucode/LICENSE.amd-ucode" "${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE"
965+
if [[ -e "${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.bin" ]]; then
966+
cp "${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.bin" "${work_dir}/iso/${install_dir}/boot/memtest"
967+
cp "${work_dir}/${arch}/airootfs/usr/share/licenses/common/GPL2/license.txt" "${work_dir}/iso/${install_dir}/boot/memtest.COPYING"
968+
fi
969+
if [[ -e "${work_dir}/${arch}/airootfs/boot/intel-ucode.img" ]]; then
970+
cp "${work_dir}/${arch}/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/intel_ucode.img"
971+
cp "${work_dir}/${arch}/airootfs/usr/share/licenses/intel-ucode/LICENSE" "${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE"
972+
fi
973+
if [[ -e "${work_dir}/${arch}/airootfs/boot/amd-ucode.img" ]]; then
974+
cp "${work_dir}/${arch}/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/amd_ucode.img"
975+
cp "${work_dir}/${arch}/airootfs/usr/share/licenses/amd-ucode/LICENSE" "${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE"
976+
fi
971977
}
972978

973979
# Prepare /${install_dir}/boot/syslinux
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Alter Linux package list
3+
#
4+
# Yamada Hayao
5+
# Twitter: @Hayao0819
6+
# Email : hayao@fascode.net
7+
#
8+
# (c) 2019-2020 Fascode Network.
9+
#
10+
# Base packages
11+
12+
bash
13+
haveged
14+
intel-ucode
15+
amd-ucode
16+
mkinitcpio-nfs-utils
17+
nbd
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Alter Linux package list
3+
#
4+
# Yamada Hayao
5+
# Twitter: @Hayao0819
6+
# Email : hayao@fascode.net
7+
#
8+
# (c) 2019-2020 Fascode Network.
9+
#
10+
# Base packages
11+
12+
bash
13+
haveged
14+
intel-ucode
15+
amd-ucode
16+
mkinitcpio-nfs-utils
17+
nbd
18+

0 commit comments

Comments
 (0)