Skip to content

Commit 9a7730f

Browse files
committed
Merge branch 'dev-stable'
2 parents 41b148f + 9fe0707 commit 9a7730f

8 files changed

Lines changed: 96 additions & 5 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Greeter]
2+
background=/usr/share/backgrounds/alter.png
3+
draw-user-backgrounds=false
4+
draw-grid=false
5+
theme-name=Materia-dark-compact
6+
icon-theme-name=Paper
7+
other-monitors-logo=

airootfs/root/customize_airootfs.sh

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ while getopts 'p:bt:l' arg; do
2121
done
2222

2323

24-
24+
# Enable and generate languages.
2525
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
2626
locale-gen
2727

28+
29+
# Setting the time zone.
2830
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
2931

32+
33+
# Creating a root user.
3034
# usermod -s /usr/bin/zsh root
3135
usermod -s /bin/bash root
3236
cp -aT /etc/skel/ /root/
@@ -36,6 +40,7 @@ LANG=C xdg-user-dirs-update
3640
echo -e "${password}\n${password}" | passwd root
3741

3842

43+
# Create alter user.
3944
useradd -m -s /bin/bash alter
4045
groupadd sudo
4146
usermod -G sudo alter
@@ -45,20 +50,27 @@ chmod 700 -R /home/alter
4550
chown alter:alter -R /home/alter
4651
echo -e "${password}\n${password}" | passwd alter
4752

53+
54+
# Set to execute calamares without password as alter user.
4855
cat >> /etc/sudoers << 'EOF'
4956
alter ALL=NOPASSWD: /usr/bin/calamares
5057
alter ALL=NOPASSWD: /usr/bin/calamares_polkit
5158
EOF
5259

5360

61+
# Delete unnecessary files for Manjaro.
5462
[[ -d /usr/share/calamares/branding/manjaro ]] && rm -rf /usr/share/calamares/branding/manjaro
63+
64+
65+
# Replace wallpaper.
5566
if [[ -f /usr/share/backgrounds/xfce/xfce-stripes.png ]]; then
5667
rm /usr/share/backgrounds/xfce/xfce-stripes.png
5768
ln -s /usr/share/backgrounds/alter.png /usr/share/backgrounds/xfce/xfce-stripes.png
5869
fi
5970
[[ -f /usr/share/backgrounds/alter.png ]] && chmod 644 /usr/share/backgrounds/alter.png
6071

6172

73+
# Replace calamares settings when plymouth is enabled.
6274
if [[ $boot_splash = true ]]; then
6375
rm /usr/share/calamares/modules/services.conf
6476
mv /usr/share/calamares/modules/services-plymouth.conf /usr/share/calamares/modules/services.conf
@@ -71,6 +83,8 @@ else
7183
rm /usr/share/calamares/modules/services-plymouth.conf
7284
fi
7385

86+
87+
# Replace calamares settings when lts kernel is enabled.
7488
if [[ ${lts_kernel} = true ]]; then
7589
rm /usr/share/calamares/modules/unpackfs.conf
7690
mv /usr/share/calamares/modules/unpackfs-lts.conf /usr/share/calamares/modules/unpackfs.conf
@@ -81,21 +95,37 @@ else
8195
rm /usr/share/calamares/modules/initcpio-lts.conf
8296
fi
8397

98+
99+
# Enable root login with SSH.
84100
sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
101+
102+
103+
# Enable all mirror lists.
85104
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
105+
106+
107+
# Set to save journal logs only in memory.
86108
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
87109

110+
111+
# Set the operation when each power button is pressed in systemd power management.
88112
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
89113
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
90114
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
91115

92-
# Create Icon Cache
116+
117+
# Create new icon cache
93118
gtk-update-icon-cache -f /usr/share/icons/hicolor
94119

95120

96121
# To disable start up of lightdm.
97122
# If it is enable, Users have to enter password.
98123
systemctl disable lightdm
124+
if [[ ${boot_splash} = true ]]; then
125+
systemctl disable lightdm-plymouth.service
126+
fi
99127
systemctl enable pacman-init.service choose-mirror.service org.cups.cupsd.service
128+
129+
100130
# systemctl set-default multi-user.target
101131
systemctl set-default graphical.target

build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
set -e -u
44

55
# archiso settings
6+
#
7+
# Do not change this variable.
8+
# To change the settings permanently, edit the config file.
9+
610
iso_name=alterlinux
711
iso_label="ALTER_$(date +%Y%m)"
812
iso_publisher="Alter Linux <http://www.archlinux.org>"
@@ -82,13 +86,17 @@ make_basefs() {
8286
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" init
8387
# mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh efitools" install
8488
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "haveged intel-ucode amd-ucode mkinitcpio-nfs-utils nbd efitools" install
89+
90+
# Install plymouth.
8591
if [[ ${boot_splash} = true ]]; then
8692
if [[ -n ${theme_pkg} ]]; then
8793
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "plymouth ${theme_pkg}" install
8894
else
8995
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "plymouth" install
9096
fi
9197
fi
98+
99+
# Install kernel.
92100
if [[ ${lts_kernel} = true ]]; then
93101
mkarchiso ${verbose} -w "${work_dir}/x86_64" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "linux-lts linux-lts-headers" install
94102
else
@@ -149,6 +157,14 @@ make_customize_airootfs() {
149157

150158
# lynx -dump -nolist 'https://wiki.archlinux.org/index.php/Installation_Guide?action=render' >> ${work_dir}/x86_64/airootfs/root/install.txt
151159

160+
161+
# customize_airootfs.sh options
162+
# -p <password> : Set password.
163+
# -b : Enable boot splash.
164+
# -t : Set plymouth theme.
165+
# -l : Enable lts kernel.
166+
167+
152168
local options
153169
if [[ ${boot_splash} = true ]]; then
154170
if [[ -z ${theme_name} ]]; then
@@ -338,6 +354,7 @@ while getopts 'w:o:g:p:c:t:hbl' arg; do
338354
o) out_dir="${OPTARG}" ;;
339355
g) gpg_key="${OPTARG}" ;;
340356
c)
357+
# compression format check.
341358
if [[ ${OPTARG} = "gzip" || ${OPTARG} = "lzma" || ${OPTARG} = "lzo" || ${OPTARG} = "lz4" || ${OPTARG} = "xz" || ${OPTARG} = "zstd" ]]; then
342359
sfs_comp="${OPTARG}"
343360
else
@@ -358,6 +375,7 @@ done
358375

359376
mkdir -p ${work_dir}
360377

378+
# Show Alter Linux build options.
361379
[[ ${boot_splash} = true ]] && echo "Boot splash is enabled."; echo "Theme is used ${theme_name}."
362380
[[ ${lts_kernel} = true ]] && echo "LTS kernel is enabled."
363381
echo "Live user password is ${password}."

config

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
#!/usr/bin/env bash
22

3+
# Alter Linux build config
4+
# The variables here will override the default values.
5+
# This configuration file follows the bash syntax.
6+
7+
iso_name=alterlinux
38
iso_label="ALTER_$(date +%Y%m)"
49
iso_publisher="Alter Linux <http://www.archlinux.org>"
510
iso_application="Alter Linux Live/Rescue CD"
11+
iso_version=$(date +%Y.%m.%d)
12+
install_dir=alter
613
work_dir=work
714
out_dir=out
815
gpg_key=
916

17+
# AlterLinux settings
18+
password=alter
19+
20+
# Set to true to enable plymouth.(-b)
21+
boot_splash=false
22+
23+
# Set to true to build using the lts kernel.(-l)
24+
lts_kernel=false
25+
26+
# Set the theme name of plymouth.
1027
theme_name="alter-logo"
11-
theme_pkg="plymouth-theme-alter-logo-git"
28+
29+
# Set the package name of the plymouth theme.
30+
# Install only if plymouth is enabled.
31+
# If it is not packaged, leave this item empty and place those files in airootfs.
32+
theme_pkg="plymouth-theme-alter-logo-git"
33+
34+
# See the `mksquashfs` help for details on these items.
35+
sfs_comp="zstd"
36+
sfs_comp_opt=""

mkalteriso

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ install_dir="alter"
1717
work_dir="work"
1818
out_dir="out"
1919
sfs_mode="sfs"
20-
sfs_comp="xz"
20+
sfs_comp="zstd"
2121
sfs_comp_opt=""
2222
gpg_key=
2323

@@ -91,6 +91,7 @@ _usage ()
9191
echo " Default: '${sfs_comp}'"
9292
echo " -t <options> Set compressor-specific options. Run 'mksquashfs -h' for more help."
9393
echo " Default: empty"
94+
# Verbose output is forced on.
9495
# echo " -v Enable verbose output"
9596
echo " -h This message"
9697
echo " commands:"

packages.x86_64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ vlc
193193

194194

195195
#-- pacmage management --#
196+
eg-installer
196197
pamac-gtk
197198
yay-bin
198199

pacman.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,15 @@ Include = /etc/pacman.d/mirrorlist
8686
Include = /etc/pacman.d/mirrorlist
8787

8888
[alter-stable]
89+
# The contents of these servers are all common.
8990
Server = https://sereneteam.github.io/alter-repo/alter-stable/$arch
9091
Server = https://ja.osdn.net/projects/serene/storage/repo/alter-stable/$arch
9192
Server = https://h.0u0.biz/repo/alter-stable/$arch
92-
9393
SigLevel = Optional TrustAll
9494

9595
# [hayao]
96+
# This is Yamada Hayao's personal repository.
97+
# It was used early but is now disabled.
9698
# Server = https://hayao0819.github.io/archlinux-repo/repo/$arch
9799
# SigLevel = Optional TrustAll
98100

wizard.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function select_comp_type () {
4646

4747
function set_comp_option () {
4848

49+
# lzmaには詳細なオプションはありません。
4950
if [[ ! ${comp_type} = "lzma" ]]; then
5051
local yn
5152
local details
@@ -155,6 +156,7 @@ function set_password () {
155156
echo
156157
}
157158

159+
# 最終的なbuild.shのオプションを生成
158160
function generate_argument () {
159161
if [[ ${plymouth} = true ]]; then
160162
argument="${argument} -b"
@@ -167,13 +169,15 @@ function generate_argument () {
167169
fi
168170
}
169171

172+
# 上の質問の関数を実行
170173
function ask () {
171174
enable_plymouth
172175
select_comp_type
173176
set_comp_option
174177
set_password
175178
}
176179

180+
# 将来的なビルド用の確認(このスクリプトは将来的には自動でcloneしビルドすることを目指しています。)
177181
function lastcheck () {
178182
echo "以下の設定でビルドを開始します。"
179183
echo
@@ -193,7 +197,10 @@ function lastcheck () {
193197
}
194198

195199

200+
# 関数を実行
196201
ask
197202
lastcheck
198203
generate_argument
204+
205+
# build.shの引数を表示(デバッグ用)
199206
echo ${argument}

0 commit comments

Comments
 (0)