Skip to content

Commit 0cdba57

Browse files
committed
Merge branch 'alteriso-3-mainline' into alteriso-3-stable
2 parents 0158df8 + 73a87a8 commit 0cdba57

13 files changed

Lines changed: 238 additions & 38 deletions

File tree

build.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,9 @@ prepare_build() {
554554
_save_var shmkalteriso
555555
_save_var mkalteriso_option
556556
_save_var tarball
557+
558+
_write_rebuild_file "\n# depend package"
559+
_write_rebuild_file "dependence=(${dependence[@]})"
557560
else
558561
# Load rebuild file
559562
load_config "${rebuildfile}"
@@ -572,6 +575,7 @@ prepare_build() {
572575
check_bool tarball
573576
check_bool noiso
574577
check_bool noaur
578+
check_bool customized_syslinux
575579

576580
# Check architecture for each channel
577581
if [[ -z $(cat "${script_path}/channels/${channel_name}/architecture" | grep -h -v ^'#' | grep -x "${arch}") ]]; then
@@ -611,7 +615,7 @@ prepare_build() {
611615
for __pkg in $(seq 0 $(( ${#_installed_pkg[@]} - 1 ))); do
612616
# パッケージがインストールされているかどうか
613617
if [[ "${_installed_pkg[${__pkg}]}" = ${1} ]]; then
614-
__ver=$(pacman -Sp --print-format '%v' --config ${build_pacman_conf} ${1} 2> /dev/null)
618+
__ver="$(pacman -Sp --print-format '%v' --config ${build_pacman_conf} ${1} 2> /dev/null; :)"
615619
if [[ "${_installed_ver[${__pkg}]}" = "${__ver}" ]]; then
616620
# パッケージが最新の場合
617621
[[ ${debug} = true ]] && echo -ne " $(pacman -Q ${1} | awk '{print $2}')\n"
@@ -667,7 +671,7 @@ prepare_build() {
667671
msg_error "Probably the system kernel has been updated."
668672
msg_error "Reboot your system to run the latest kernel." "1"
669673
fi
670-
[[ -z "$(lsmod | awk '{print $1}' | grep -x "loop")" ]] && modprobe loop
674+
if [[ -z "$(lsmod | awk '{print $1}' | grep -x "loop")" ]]; then modprobe loop; fi
671675
fi
672676
}
673677

@@ -1070,9 +1074,16 @@ make_boot_extra() {
10701074
make_syslinux() {
10711075
_uname_r="$(file -b ${work_dir}/${arch}/airootfs/boot/${kernel_filename} | awk 'f{print;f=0} /version/{f=1}' RS=' ')"
10721076
mkdir -p "${work_dir}/iso/${install_dir}/boot/syslinux"
1077+
1078+
# 一時ディレクトリに設定ファイルをコピー
1079+
mkdir -p "${work_dir}/${arch}/syslinux/"
1080+
cp -a "${script_path}/syslinux/${arch}/"* "$work_dir/${arch}/syslinux/"
1081+
if [[ -d "${script_path}/channels/${channel_name}/syslinux.${arch}" ]] && [[ "${customized_syslinux}" = true ]]; then
1082+
cp -af "${script_path}/channels/${channel_name}/syslinux.${arch}/"* "$work_dir/${arch}/syslinux/"
1083+
fi
10731084

10741085
# copy all syslinux config to work dir
1075-
for _cfg in ${script_path}/syslinux/${arch}/*.cfg; do
1086+
for _cfg in $work_dir/${arch}/syslinux/*.cfg; do
10761087
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
10771088
s|%OS_NAME%|${os_name}|g;
10781089
s|%KERNEL_FILENAME%|${kernel_filename}|g;

channels/cinnamon/airootfs.any/etc/skel/Desktop/welcome-to-alter.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Desktop Entry]
22
Encoding=UTF-8
33
Version=1.0
4-
Icon=/usr/share/icons/hicolor/scalable/alter.svg
4+
Icon=/usr/share/icons/hicolor/scalable/apps/alter.svg
55
Exec=/usr/bin/alterlinux-welcome-page
66
Type=Application
77
StartupNotify=false
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Yamada Hayao
4+
# Twitter: @Hayao0819
5+
# Email : hayao@fascone.net
6+
#
7+
# (c) 2019-2020 Fascode Network.
8+
#
9+
10+
set -e -u
11+
12+
13+
# Default value
14+
# All values can be changed by arguments.
15+
password=alter
16+
boot_splash=false
17+
kernel_config_line=("zen" "linux-zen" "linux-zen-beaders" "vmlinuz-linux-zen" "linux-zen")
18+
theme_name=alter-logo
19+
rebuild=false
20+
username='alter'
21+
os_name="Alter Linux"
22+
install_dir="alter"
23+
usershell="/bin/bash"
24+
debug=false
25+
timezone="UTC"
26+
localegen="en_US\\.UTF-8\\"
27+
language="en"
28+
29+
30+
# Parse arguments
31+
while getopts 'p:bt:k:rxu:o:i:s:da:g:z:l:' arg; do
32+
case "${arg}" in
33+
p) password="${OPTARG}" ;;
34+
b) boot_splash=true ;;
35+
t) theme_name="${OPTARG}" ;;
36+
k) kernel_config_line=(${OPTARG}) ;;
37+
r) rebuild=true ;;
38+
u) username="${OPTARG}" ;;
39+
o) os_name="${OPTARG}" ;;
40+
i) install_dir="${OPTARG}" ;;
41+
s) usershell="${OPTARG}" ;;
42+
d) debug=true ;;
43+
x) debug=true; set -xv ;;
44+
a) arch="${OPTARG}" ;;
45+
g) localegen="${OPTARG/./\\.}\\" ;;
46+
z) timezone="${OPTARG}" ;;
47+
l) language="${OPTARG}" ;;
48+
esac
49+
done
50+
51+
52+
# Parse kernel
53+
kernel="${kernel_config_line[0]}"
54+
kernel_package="${kernel_config_line[1]}"
55+
kernel_headers_packages="${kernel_config_line[2]}"
56+
kernel_filename="${kernel_config_line[3]}"
57+
kernel_mkinitcpio_profile="${kernel_config_line[4]}"
58+
59+
60+
# Delete file only if file exists
61+
# remove <file1> <file2> ...
62+
function remove () {
63+
local _list
64+
local _file
65+
_list=($(echo "$@"))
66+
for _file in "${_list[@]}"; do
67+
if [[ -f ${_file} ]]; then
68+
rm -f "${_file}"
69+
elif [[ -d ${_file} ]]; then
70+
rm -rf "${_file}"
71+
fi
72+
echo "${_file} was deleted."
73+
done
74+
}
75+
76+
77+
# Replace wallpaper.
78+
if [[ -f /usr/share/backgrounds/deepin/desktop.jpg ]]; then
79+
remove /usr/share/backgrounds/deepin/desktop.jpg
80+
ln -s /usr/share/backgrounds/alter.png /usr/share/backgrounds/deepin/desktop.jpg
81+
fi
82+
[[ -f /usr/share/backgrounds/alter.png ]] && chmod 644 /usr/share/backgrounds/alter.png
83+
84+
85+
# Bluetooth
86+
rfkill unblock all
87+
systemctl enable bluetooth
88+
89+
90+
# Update system datebase
91+
dconf update
92+
93+
# Added autologin group to auto login
94+
groupadd autologin
95+
usermod -aG autologin ${username}
96+
97+
98+
# Enable LightDM to auto login
99+
if [[ "${boot_splash}" = true ]]; then
100+
systemctl enable lightdm-plymouth.service
101+
else
102+
systemctl enable lightdm.service
103+
fi
104+
105+
# Added autologin group to auto login
106+
if [[ -z "$(cut -d: -f1 /etc/group | grep -x "autologin")" ]]; then
107+
groupadd autologin
108+
fi
109+
usermod -aG autologin ${username}
110+
111+
# ntp
112+
systemctl enable systemd-timesyncd.service
113+
114+
# Replace auto login user
115+
sed -i s/%USERNAME%/${username}/g /etc/lightdm/lightdm.conf

channels/lxde/airootfs.any/etc/skel/Desktop/welcome-to-alter.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Desktop Entry]
22
Encoding=UTF-8
33
Version=1.0
4-
Icon=/usr/share/icons/hicolor/scalable/alter.svg
4+
Icon=/usr/share/icons/hicolor/scalable/apps/alter.svg
55
Exec=/usr/bin/alterlinux-welcome-page
66
Type=Application
77
StartupNotify=false

channels/plasma/airootfs.any/etc/skel/.config/plasma-org.kde.plasma.desktop-appletsrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DialogWidth=720
3838

3939
[Containments][2][Applets][3][Configuration][General]
4040
favoritesPortedToKAstats=true
41-
icon=/usr/share/icons/hicolor/scalable/alter.svg
41+
icon=/usr/share/icons/hicolor/scalable/apps/alter.svg
4242

4343
[Containments][2][Applets][3][Configuration][Shortcuts]
4444
global=Alt+F1

channels/plasma/airootfs.any/etc/skel/Desktop/welcome-to-alter.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Desktop Entry]
22
Encoding=UTF-8
33
Version=1.0
4-
Icon=/usr/share/icons/hicolor/scalable/alter.svg
4+
Icon=/usr/share/icons/hicolor/scalable/apps/alter.svg
55
Exec=/usr/bin/alterlinux-welcome-page
66
Type=Application
77
StartupNotify=false

channels/releng/airootfs.any/root/customize_airootfs.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function remove () {
7777
remove /etc/skel/Desktop
7878
remove /root/Desktop
7979

80-
if [[ ${arch} = "i686" ]]; then
80+
if [[ "${arch}" = "i686" ]]; then
8181
ln -s /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist32
8282
fi
8383

@@ -91,13 +91,11 @@ cp -aT /etc/skel/ /root/
9191

9292
sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
9393
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
94-
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
9594

96-
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
97-
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
98-
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
99-
100-
systemctl enable pacman-init.service choose-mirror.service
95+
# Enable services.
96+
systemctl enable pacman-init.service
97+
systemctl enable alteriso-reflector.service
98+
systemctl disable reflector.service
10199
systemctl set-default multi-user.target
102100

103101
remove /etc/arch-release
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Yamada Hayao
2+
# Twitter: @Hayao0819
3+
# Email : hayao@fascode.net
4+
#
5+
# (c) 2019-2020 Fascode Network.
6+
#
7+
8+
DEFAULT arch32
9+
TIMEOUT 100
10+
11+
LABEL arch32
12+
TEXT HELP
13+
Boot the %OS_NAME% (i686) live medium.
14+
It allows you to install %OS_NAME% or perform system maintenance.
15+
ENDTEXT
16+
MENU LABEL Boot %OS_NAME% (i686)
17+
LINUX boot/i686/%KERNEL_FILENAME%
18+
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/i686/archiso.img
19+
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Yamada Hayao
2+
# Twitter: @Hayao0819
3+
# Email : hayao@fascode.net
4+
#
5+
# (c) 2019-2020 Fascode Network.
6+
#
7+
8+
DEFAULT arch64
9+
TIMEOUT 100
10+
11+
LABEL arch64
12+
TEXT HELP
13+
Boot the %OS_NAME% (x86_64) live medium.
14+
It allows you to install %OS_NAME% or perform system maintenance.
15+
ENDTEXT
16+
MENU LABEL Boot %OS_NAME% (x86_64)
17+
LINUX boot/x86_64/%KERNEL_FILENAME%
18+
INITRD boot/intel_ucode.img,boot/amd_ucode.img,boot/x86_64/archiso.img
19+
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%

channels/xfce-pro/airootfs.any/etc/skel/Desktop/welcome-to-alter.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Desktop Entry]
22
Encoding=UTF-8
33
Version=1.0
4-
Icon=Icon=/usr/share/icons/hicolor/scalable/alter.svg
4+
Icon=Icon=/usr/share/icons/hicolor/scalable/apps/alter.svg
55
Exec=/usr/bin/alterlinux-welcome-page
66
Type=Application
77
StartupNotify=false

0 commit comments

Comments
 (0)