Skip to content

Commit bcca55e

Browse files
committed
Merge branch 'dev' into dev-stable
2 parents d88b8f4 + 32be6e4 commit bcca55e

39 files changed

Lines changed: 179 additions & 143 deletions

File tree

build.sh

Lines changed: 17 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ _usage () {
239239
for list in ${script_path}/system/kernel_list-* ; do
240240
echo " ${list#${script_path}/system/kernel_list-}:"
241241
echo -n " "
242-
for kernel in $(grep -h -v ^'#' ${list}); do
242+
for kernel in $(grep -h -v ^'#' ${list} | sed "/^$/d"); do
243243
echo -n "${kernel} "
244244
done
245245
echo
@@ -642,7 +642,7 @@ make_pacman_conf() {
642642
make_basefs() {
643643
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" init
644644
# ${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 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
646646

647647
# Install plymouth.
648648
if [[ "${boot_splash}" = true ]]; then
@@ -705,7 +705,7 @@ make_packages() {
705705
# Read the file and remove comments starting with # and add it to the list of packages to install.
706706
for _file in ${_loadfilelist[@]}; do
707707
_msg_debug "Loaded package file ${_file}"
708-
pkglist=( ${pkglist[@]} "$(grep -h -v ^'#' ${_file})" )
708+
pkglist=( ${pkglist[@]} "$(grep -h -v ^'#' ${_file} | sed ':a;N;$!ba;s/\n/ /g')" )
709709
done
710710
if [[ ${debug} = true ]]; then
711711
sleep 3
@@ -714,7 +714,7 @@ make_packages() {
714714
# Exclude packages from the share exclusion list
715715
excludefile="${script_path}/channels/share/packages.${arch}/exclude"
716716
if [[ -f "${excludefile}" ]]; then
717-
excludelist=( $(grep -h -v ^'#' "${excludefile}") )
717+
excludelist=( $(grep -h -v ^'#' "${excludefile}" | sed ':a;N;$!ba;s/\n/ /g') )
718718

719719
# 現在のpkglistをコピーする
720720
_pkglist=(${pkglist[@]})
@@ -735,7 +735,7 @@ make_packages() {
735735
# Exclude packages from the exclusion list for each channel
736736
excludefile="${script_path}/channels/${channel_name}/packages.${arch}/exclude"
737737
if [[ -f "${excludefile}" ]]; then
738-
excludelist=( $(grep -h -v ^'#' "${excludefile}") )
738+
excludelist=( $(grep -h -v ^'#' "${excludefile}" | sed ':a;N;$!ba;s/\n/ /g') )
739739

740740
# 現在のpkglistをコピーする
741741
_pkglist=(${pkglist[@]})
@@ -774,7 +774,7 @@ make_packages() {
774774
done
775775

776776
# Install packages on airootfs
777-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "${pkglist[@]}" install
777+
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "${pkglist[*]}" install
778778
}
779779

780780
# Customize installation (airootfs)
@@ -787,7 +787,7 @@ make_customize_airootfs() {
787787
for i in "${@}"; do
788788
local _dir="${i%/}"
789789
if [[ -d "${_dir}" ]]; then
790-
cp -af "${_dir}"/* "${work_dir}/${arch}/airootfs"
790+
cp -af --no-preserve=ownership "${_dir}"/* "${work_dir}/${arch}/airootfs"
791791
fi
792792
done
793793
}
@@ -802,34 +802,6 @@ make_customize_airootfs() {
802802
cp "${script_path}/mkinitcpio/mkinitcpio-plymouth.conf" "${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf"
803803
fi
804804

805-
# Code to use common pacman.conf in archiso.
806-
# cp "${script_path}/pacman.conf" "${work_dir}/${arch}/airootfs/etc"
807-
# cp "${build_pacman_conf}" "${work_dir}/${arch}/airootfs/etc"
808-
809-
# Get the optimal mirror list.
810-
local mirrorlisturl mirrorlisturl_all mirrorlisturl_jp
811-
812-
case "${arch}" in
813-
"x86_64")
814-
mirrorlisturl_jp='https://www.archlinux.org/mirrorlist/?country=JP'
815-
mirrorlisturl_all='https://www.archlinux.org/mirrorlist/?country=all'
816-
;;
817-
"i686")
818-
mirrorlisturl_jp='https://archlinux32.org/mirrorlist/?country=jp'
819-
mirrorlisturl_all='https://archlinux32.org/mirrorlist/?country=all'
820-
;;
821-
esac
822-
823-
if [[ "${japanese}" = true ]]; then
824-
mirrorlisturl="${mirrorlisturl_jp}"
825-
else
826-
mirrorlisturl="${mirrorlisturl_all}"
827-
fi
828-
curl -o "${work_dir}/${arch}/airootfs/etc/pacman.d/mirrorlist" "${mirrorlisturl}"
829-
830-
# Add install guide to /root (disabled)
831-
# lynx -dump -nolist 'https://wiki.archlinux.org/index.php/Installation_Guide?action=render' >> ${work_dir}/${arch}/airootfs/root/install.txt
832-
833805

834806
# customize_airootfs.sh options
835807
# -b : Enable boot splash.
@@ -1058,25 +1030,19 @@ make_isolinux() {
10581030
# Prepare /EFI
10591031
make_efi() {
10601032
mkdir -p "${work_dir}/iso/EFI/boot"
1061-
cp "${work_dir}/${arch}/airootfs/usr/share/efitools/efi/HashTool.efi" "${work_dir}/iso/EFI/boot/"
1062-
if [[ "${arch}" = "x86_64" ]]; then
1063-
cp "${work_dir}/${arch}/airootfs/usr/share/efitools/efi/PreLoader.efi" "${work_dir}/iso/EFI/boot/bootx64.efi"
1064-
cp "${work_dir}/${arch}/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" "${work_dir}/iso/EFI/boot/loader.efi"
1065-
fi
1033+
cp "${work_dir}/${arch}/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" "${work_dir}/iso/EFI/boot/bootx64.efi"
10661034

10671035
mkdir -p "${work_dir}/iso/loader/entries"
10681036
cp "${script_path}/efiboot/loader/loader.conf" "${work_dir}/iso/loader/"
1069-
cp "${script_path}/efiboot/loader/entries/uefi-shell-x86_64.conf" "${work_dir}/iso/loader/entries/"
1070-
cp "${script_path}/efiboot/loader/entries/uefi-shell-full-x86_64.conf" "${work_dir}/iso/loader/entries/"
10711037

10721038
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
10731039
s|%OS_NAME%|${os_name}|g;
10741040
s|%INSTALL_DIR%|${install_dir}|g" \
10751041
"${script_path}/efiboot/loader/entries/usb/archiso-x86_64-usb-${kernel}.conf" > "${work_dir}/iso/loader/entries/archiso-x86_64.conf"
10761042

10771043
# edk2-shell based UEFI shell
1078-
cp /usr/share/edk2-shell/x64/Shell.efi ${work_dir}/iso/EFI/Shell_x64.efi
1079-
cp /usr/share/edk2-shell/x64/Shell_Full.efi ${work_dir}/iso/EFI/Shell_Full_x64.efi
1044+
# shellx64.efi is picked up automatically when on /
1045+
cp "/usr/share/edk2-shell/x64/Shell_Full.efi" "${work_dir}/iso/shellx64.efi"
10801046
}
10811047

10821048
# Prepare efiboot.img::/EFI for "El Torito" EFI boot mode
@@ -1102,26 +1068,19 @@ make_efiboot() {
11021068
cp "${work_dir}/iso/${install_dir}/boot/amd_ucode.img" "${work_dir}/efiboot/EFI/archiso/amd_ucode.img"
11031069

11041070
mkdir -p "${work_dir}/efiboot/EFI/boot"
1105-
cp "${work_dir}/${arch}/airootfs/usr/share/efitools/efi/HashTool.efi" "${work_dir}/efiboot/EFI/boot/"
1106-
1107-
if [[ "${arch}" = "x86_64" ]]; then
1108-
cp "${work_dir}/${arch}/airootfs/usr/share/efitools/efi/PreLoader.efi" "${work_dir}/efiboot/EFI/boot/bootx64.efi"
1109-
cp "${work_dir}/${arch}/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" "${work_dir}/efiboot/EFI/boot/loader.efi"
1110-
fi
1071+
cp "${work_dir}/${arch}/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" "${work_dir}/efiboot/EFI/boot/bootx64.efi"
11111072

11121073
mkdir -p "${work_dir}/efiboot/loader/entries"
11131074
cp "${script_path}/efiboot/loader/loader.conf" "${work_dir}/efiboot/loader/"
1114-
cp "${script_path}/efiboot/loader/entries/uefi-shell-x86_64.conf" "${work_dir}/efiboot/loader/entries/"
1115-
cp "${script_path}/efiboot/loader/entries/uefi-shell-full-x86_64.conf" "${work_dir}/efiboot/loader/entries/"
11161075

11171076

11181077
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
11191078
s|%OS_NAME%|${os_name}|g;
11201079
s|%INSTALL_DIR%|${install_dir}|g" \
11211080
"${script_path}/efiboot/loader/entries/cd/archiso-x86_64-cd-${kernel}.conf" > "${work_dir}/efiboot/loader/entries/archiso-x86_64.conf"
11221081

1123-
cp "${work_dir}/iso/EFI/Shell_x64.efi" "${work_dir}/efiboot/EFI/"
1124-
cp "${work_dir}/iso/EFI/Shell_Full_x64.efi" "${work_dir}/efiboot/EFI/"
1082+
# shellx64.efi is picked up automatically when on /
1083+
cp "${work_dir}/iso/shellx64.efi" "${work_dir}/efiboot/"
11251084

11261085
umount -d "${work_dir}/efiboot"
11271086
}
@@ -1192,7 +1151,7 @@ while :; do
11921151
shift 1
11931152
;;
11941153
-k | --kernel)
1195-
if [[ -n $(cat ${script_path}/system/kernel_list-${arch} | grep -h -v ^'#' | grep -x "${2}") ]]; then
1154+
if [[ -n $(cat ${script_path}/system/kernel_list-${arch} | grep -h -v ^'#' | sed "/^$/d" | grep -x "${2}") ]]; then
11961155
kernel="${2}"
11971156
else
11981157
_msg_error "Invalid kernel ${2}" "1"
@@ -1305,7 +1264,7 @@ if [[ "${bash_debug}" = true ]]; then
13051264
fi
13061265

13071266
# Pacman configuration file used only when building
1308-
build_pacman_conf=${script_path}/system/pacman-${arch}.conf
1267+
build_pacman_conf="${script_path}/system/pacman-${arch}.conf"
13091268

13101269
# Set rebuild config file
13111270
rebuildfile="${work_dir}/build_options"
@@ -1377,13 +1336,13 @@ fi
13771336
# Check architecture and kernel for each channel
13781337
if [[ ! "${channel_name}" = "rebuild" ]] && [[ ! "${channel_name}" = "clean" ]]; then
13791338
# architecture
1380-
if [[ -z $(cat "${script_path}/channels/${channel_name}/architecture" | grep -h -v ^'#' | grep -x "${arch}") ]]; then
1339+
if [[ -z $(cat "${script_path}/channels/${channel_name}/architecture" | grep -h -v ^'#' | sed "/^$/d" | grep -x "${arch}") ]]; then
13811340
_msg_error "${channel_name} channel does not support current architecture (${arch})." "1"
13821341
fi
13831342

13841343
# kernel
13851344
if [[ -f "${script_path}/channels/${channel_name}/kernel_list-${arch}" ]]; then
1386-
if [[ -z $(cat "${script_path}/channels/${channel_name}/kernel_list-${arch}" | grep -h -v ^'#' | grep -x "${kernel}") ]]; then
1345+
if [[ -z $(cat "${script_path}/channels/${channel_name}/kernel_list-${arch}" | grep -h -v ^'#' | sed "/^$/d" | grep -x "${kernel}") ]]; then
13871346
_msg_error "This kernel is currently not supported on this channel." "1"
13881347
fi
13891348
fi

channels/cinnamon/airootfs.any/usr/share/calamares/final-process

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ remove /root/.automated_script.sh
3939
remove /etc/mkinitcpio-archiso.conf
4040
remove /etc/initcpio
4141

42-
if [[ -f /etc/systemd/journald.conf ]]; then
43-
sed -i 's/Storage=volatile/#Storage=auto/' /etc/systemd/journald.conf
44-
fi
42+
remove /etc/systemd/journald.conf.d/volatile-storage.conf
43+
remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
4544

4645
remove /etc/udev/rules.d/81-dhcpcd.rules
4746
remove /etc/systemd/system/{choose-mirror.service,getty@tty1.service.d}

channels/cinnamon/packages.i686/disk_management.i686

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ gptfdisk
2121
hdparm
2222
lvm2
2323
mdadm
24+
nvme-cli
2425
partclone
2526
parted
2627
partimage

channels/cinnamon/packages.x86_64/disk_management.x86_64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ gptfdisk
2121
hdparm
2222
lvm2
2323
mdadm
24+
nvme-cli
2425
partclone
2526
parted
2627
partimage

channels/i3/airootfs.any/etc/skel/.zshrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,7 @@ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
109109
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
110110

111111
# Alias
112-
[[ -f .aliases ]] && source .aliases
112+
[[ -f .aliases ]] && source .aliases
113+
114+
# Set default terminal
115+
export TERMINAL=/usr/bin/sakura
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
# Disk management
11+
12+
13+
baobab
14+
clonezilla
15+
ddrescue
16+
dmraid
17+
fsarchiver
18+
gnome-disk-utility
19+
gparted
20+
gptfdisk
21+
hdparm
22+
lvm2
23+
mdadm
24+
nvme-cli
25+
partclone
26+
parted
27+
partimage
28+
sdparm
29+
smartmontools
30+
testdisk

channels/i3/packages.i686/packages.i686

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ partimage
2727
sdparm
2828
smartmontools
2929
testdisk
30-
vi
3130
vim-minimal
3231
grub-theme-vimix
3332
gvfs-smb
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
# Disk management
11+
12+
13+
baobab
14+
clonezilla
15+
ddrescue
16+
dmraid
17+
fsarchiver
18+
gnome-disk-utility
19+
gparted
20+
gptfdisk
21+
hdparm
22+
lvm2
23+
mdadm
24+
nvme-cli
25+
partclone
26+
parted
27+
partimage
28+
sdparm
29+
smartmontools
30+
testdisk

channels/i3/packages.x86_64/packages.x86_64

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ partimage
2727
sdparm
2828
smartmontools
2929
testdisk
30-
vi
3130
vim-minimal
3231
grub-theme-vimix
3332
gvfs-smb

channels/lxde/airootfs.any/usr/share/calamares/final-process

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ remove /root/.automated_script.sh
3939
remove /etc/mkinitcpio-archiso.conf
4040
remove /etc/initcpio
4141

42-
if [[ -f /etc/systemd/journald.conf ]]; then
43-
sed -i 's/Storage=volatile/#Storage=auto/' /etc/systemd/journald.conf
44-
fi
42+
remove /etc/systemd/journald.conf.d/volatile-storage.conf
43+
remove /airootfs.any/etc/systemd/logind.conf.d/do-not-suspend.conf
4544

4645
remove /etc/udev/rules.d/81-dhcpcd.rules
4746
remove /etc/systemd/system/{choose-mirror.service,getty@tty1.service.d}

0 commit comments

Comments
 (0)