Skip to content

Commit 5d1828b

Browse files
committed
Merge branch 'dev' into dev-stable
2 parents 5b88cd6 + 453111f commit 5d1828b

File tree

335 files changed

+2625
-3049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+2625
-3049
lines changed

build.sh

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,15 @@ _usage () {
190190
echo " --nocolor No output colored output"
191191
echo " --noconfirm No check the settings before building"
192192
echo " --nochkver No check the version of the channel"
193+
echo " --nodebug No debug message"
193194
echo " --noefi No efi boot"
194195
echo " --noloopmod No check and load kernel module automatically"
195196
echo " --nodepend No check package dependencies before building"
196197
echo " --noiso No build iso image (Use with --tarball)"
197198
echo " --shmkalteriso Use the shell script version of mkalteriso"
199+
echo
200+
echo " Many packages are installed from AUR, so specifying --noaur can cause problems."
201+
echo
198202
if [[ -n "${1:-}" ]]; then exit "${1}"; fi
199203
}
200204

@@ -240,6 +244,7 @@ umount_chroot_advance() {
240244

241245
# Helper function to run make_*() only one time.
242246
run_once() {
247+
set -eu
243248
if [[ ! -e "${work_dir}/build.${1}_${arch}" ]]; then
244249
msg_debug "Running $1 ..."
245250
"$1"
@@ -315,26 +320,30 @@ check_bool() {
315320
prepare_env() {
316321
# Check packages
317322
if [[ "${nodepend}" = false ]]; then
318-
local _check_failed=false _pkg _ver
323+
local _check_failed=false _pkg _result
319324
msg_info "Checking dependencies ..."
320325
for _pkg in ${dependence[@]}; do
321326
msg_debug -n "Checking ${_pkg} ..."
322-
_ver="$(pacman -Sp --print-format '%v' ${_pkg} 2> /dev/null; :)"
323-
case "$("${script_path}/tools/package.sh" -s "${_pkg}")" in
327+
_result=( $("${script_path}/tools/package.py" -s "${_pkg}") )
328+
case "${_result[0]}" in
324329
"latest")
325-
[[ ${debug} = true ]] && echo -ne " $(pacman -Q ${_pkg} | getclm 2)\n"
330+
[[ ${debug} = true ]] && echo -ne " ${_result[1]}\n"
326331
;;
327332
"noversion")
328333
echo; msg_warn "Failed to get the latest version of ${_pkg}."
329334
;;
330-
"old")
331-
[[ "${debug}" = true ]] && echo -ne " $(pacman -Q ${_pkg} | getclm 2)\n"
332-
msg_warn "${_pkg} is not the latest package.\nLocal: $(pacman -Q ${_pkg} 2> /dev/null | getclm 2) Latest: ${_ver}"
335+
"nomatch")
336+
[[ "${debug}" = true ]] && echo -ne " ${_result[1]}\n"
337+
msg_warn "The version of ${_pkg} installed in local does not match one of the latest.\nLocal: ${_result[1]} Latest: ${_result[2]}"
333338
;;
334339
"failed")
335340
[[ "${debug}" = true ]] && echo
336341
msg_error "${_pkg} is not installed." ; _check_failed=true
337342
;;
343+
"error")
344+
[[ "${debug}" = true ]] && echo
345+
msg_error "pyalpm is not installed." ; exit 1
346+
;;
338347
esac
339348
done
340349
if [[ "${_check_failed}" = true ]]; then exit 1; fi
@@ -699,7 +708,8 @@ make_packages_aur() {
699708

700709
# prepare for yay
701710
cp -rf --preserve=mode "${script_path}/system/aur.sh" "${airootfs_dir}/root/aur.sh"
702-
cp -f "${work_dir}/pacman-${arch}.conf" "${airootfs_dir}/etc/alteriso-pacman.conf"
711+
#cp -f "${work_dir}/pacman-${arch}.conf" "${airootfs_dir}/etc/alteriso-pacman.conf"
712+
sed "s|https|http|g" "${work_dir}/pacman-${arch}.conf" > "${airootfs_dir}/etc/alteriso-pacman.conf"
703713

704714
# Run aur script
705715
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -D "${install_dir}" -r "/root/aur.sh ${pkglist_aur[*]}" run
@@ -720,9 +730,11 @@ make_customize_airootfs() {
720730

721731
# Replace /etc/mkinitcpio.conf if Plymouth is enabled.
722732
if [[ "${boot_splash}" = true ]]; then
723-
cp "${script_path}/mkinitcpio/mkinitcpio-plymouth.conf" "${airootfs_dir}/etc/mkinitcpio.conf"
733+
cp -f "${script_path}/mkinitcpio/mkinitcpio-plymouth.conf" "${airootfs_dir}/etc/mkinitcpio.conf"
734+
else
735+
cp -f "${script_path}/mkinitcpio/mkinitcpio.conf" "${airootfs_dir}/etc/mkinitcpio.conf"
724736
fi
725-
737+
726738
# customize_airootfs options
727739
# -b : Enable boot splash.
728740
# -d : Enable debug mode.
@@ -938,7 +950,11 @@ make_efi() {
938950
local _efi_shell _efi_shell_arch
939951
for _efi_shell in "${work_dir}"/${arch}/airootfs/usr/share/edk2-shell/*; do
940952
_efi_shell_arch="$(basename ${_efi_shell})"
941-
cp "${_efi_shell}/Shell_Full.efi" "${isofs_dir}/EFI/shell_${_efi_shell_arch}.efi"
953+
if [[ "${_efi_shell_arch}" == 'aarch64' ]]; then
954+
cp "${_efi_shell}/Shell.efi" "${isofs_dir}/EFI/shell_${_efi_shell_arch}.efi"
955+
else
956+
cp "${_efi_shell}/Shell_Full.efi" "${isofs_dir}/EFI/shell_${_efi_shell_arch}.efi"
957+
fi
942958
cat - > "${isofs_dir}/loader/entries/uefi-shell-${_efi_shell_arch}.conf" << EOF
943959
title UEFI Shell ${_efi_shell_arch}
944960
efi /EFI/shell_${_efi_shell_arch}.efi
@@ -969,9 +985,9 @@ make_efiboot() {
969985

970986
# PreLoader.efiがefitoolsのi686版に存在しません。この行を有効化するとi686ビルドに失敗します
971987
# PreLoader.efiの役割がわかりません誰かたすけてください(archiso v43で使用されていた)
972-
#cp "${work_dir}/${arch}/airootfs/usr/share/efitools/efi/PreLoader.efi" "${work_dir}/efiboot/EFI/boot/bootx64.efi"
988+
#cp "${airootfs_dir}/usr/share/efitools/efi/PreLoader.efi" "${work_dir}/efiboot/EFI/boot/bootx64.efi"
973989

974-
cp "${work_dir}/${arch}/airootfs/usr/share/efitools/efi/HashTool.efi" "${work_dir}/efiboot/EFI/boot/"
990+
cp "${airootfs_dir}/usr/share/efitools/efi/HashTool.efi" "${work_dir}/efiboot/EFI/boot/"
975991

976992
local _bootfile="$(basename "$(ls "${airootfs_dir}/usr/lib/systemd/boot/efi/systemd-boot"*".efi" )")"
977993
cp "${airootfs_dir}/usr/lib/systemd/boot/efi/${_bootfile}" "${work_dir}/efiboot/EFI/boot/${_bootfile#systemd-}"
@@ -1064,9 +1080,7 @@ make_prepare() {
10641080
if [[ "${cleaning}" = true ]]; then
10651081
remove "${airootfs_dir}"
10661082
fi
1067-
if [[ "${noaur}" != true ]]; then
1068-
mount "${work_dir}/${arch}/airootfs.img" "${work_dir}/${arch}/airootfs"
1069-
fi
1083+
10701084
# iso version info
10711085
if [[ "${include_info}" = true ]]; then
10721086
local _write_info_file _info_file="${isofs_dir}/alteriso-info"
@@ -1112,10 +1126,6 @@ make_overisofs() {
11121126

11131127
# Build ISO
11141128
make_iso() {
1115-
1116-
if [[ "${noaur}" == false ]]; then
1117-
umount -fl "${work_dir}/${arch}/airootfs"
1118-
fi
11191129
remove "${work_dir}/airootfs"
11201130
${mkalteriso} ${mkalteriso_option} -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -P "${iso_publisher}" -A "${iso_application}" -o "${out_dir}" iso "${iso_filename}"
11211131
msg_info "The password for the live user and root is ${password}."
@@ -1125,7 +1135,7 @@ make_iso() {
11251135
# Parse options
11261136
ARGUMENT="${@}"
11271137
_opt_short="a:bc:deg:hjk:l:o:p:rt:u:w:x"
1128-
_opt_long="arch:,boot-splash,comp-type:,debug,cleaning,cleanup,gpgkey:,help,lang:,japanese,kernel:,out:,password:,comp-opts:,user:,work:,bash-debug,nocolor,noconfirm,nodepend,gitversion,shmkalteriso,msgdebug,noloopmod,tarball,noiso,noaur,nochkver,channellist,config:,noefi"
1138+
_opt_long="arch:,boot-splash,comp-type:,debug,cleaning,cleanup,gpgkey:,help,lang:,japanese,kernel:,out:,password:,comp-opts:,user:,work:,bash-debug,nocolor,noconfirm,nodepend,gitversion,shmkalteriso,msgdebug,noloopmod,tarball,noiso,noaur,nochkver,channellist,config:,noefi,nodebug"
11291139
OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- ${DEFAULT_ARGUMENT} ${ARGUMENT})
11301140
[[ ${?} != 0 ]] && exit 1
11311141

@@ -1257,6 +1267,12 @@ while :; do
12571267
nochkver=true
12581268
shift 1
12591269
;;
1270+
--nodebug)
1271+
debug=false
1272+
msgdebug=false
1273+
bash_debug=false
1274+
shift 1
1275+
;;
12601276
--noefi)
12611277
noefi=true
12621278
shift 1

channels/basic/airootfs.any/root/optimize_for_tarball.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ if [[ -f "/etc/systemd/journald.conf" ]]; then
4242
sed -i 's/Storage=volatile/#Storage=volatile/g' "/etc/systemd/journald.conf"
4343
fi
4444

45-
remove /etc/udev/rules.d/81-dhcpcd.rules
45+
4646
remove /etc/systemd/system/{choose-mirror.service,etc-pacman.d-gnupg.mount,[email protected]}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ if [[ -f /etc/systemd/journald.conf ]]; then
4141
sed -i 's / Storage = volatile /#Storage = auto /' /etc/systemd/journald.conf
4242
fi
4343

44-
remove /etc/udev/rules.d/81-dhcpcd.rules
44+
4545
remove /etc/systemd/system/{choose-mirror.service,[email protected]}

channels/basic/packages.i686/exclude

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
alterlinux-calamares
2-
eg-installer
32
libpwquality
43
noto-fonts
54
noto-fonts-cjk

channels/basic/packages.x86_64/exclude

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
alterlinux-calamares
2-
eg-installer
32
libpwquality
43
noto-fonts
54
noto-fonts-cjk
File renamed without changes.

channels/basic/packages.x86_64/plymouth/theme.x86_64 renamed to channels/basic/packages_aur.x86_64/plymouth/theme.x86_64

File renamed without changes.

channels/cinnamon/airootfs.any/etc/pacman.conf

Lines changed: 0 additions & 124 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[Desktop]
2-
Session=cinnamon
2+
Session=cinnamon2d

channels/cinnamon/airootfs.any/root/optimize_for_tarball.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if [[ -f "/etc/systemd/journald.conf" ]]; then
4242
sed -i 's/Storage=volatile/#Storage=volatile/g' "/etc/systemd/journald.conf"
4343
fi
4444

45-
remove /etc/udev/rules.d/81-dhcpcd.rules
45+
4646
remove /etc/systemd/system/{choose-mirror.service,etc-pacman.d-gnupg.mount,[email protected]}
4747

4848
# Disabled auto login

0 commit comments

Comments
 (0)