Skip to content

Commit 965f99e

Browse files
committed
Merge branch 'alteriso-3-mainline' into alteriso-3-stable
2 parents 43ac5bf + 10333b0 commit 965f99e

62 files changed

Lines changed: 332 additions & 274 deletions

File tree

Some content is hidden

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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ RUN pacman-key --init
77
COPY . /alterlinux
88
WORKDIR /alterlinux
99
RUN git checkout dev
10-
RUN ./keyring.sh -a
10+
RUN ./tools/keyring.sh -a
1111
CMD ["./build.sh", "-b"]

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARCH_i686 = -a i686
99

1010

1111
full:mkalteriso
12-
@sudo ./fullbuild.sh
12+
@sudo ./tools/fullbuild.sh
1313
@make clean
1414

1515
xfce-64:mkalteriso
@@ -63,7 +63,7 @@ mkalteriso:
6363

6464
menuconfig:menuconfig/build/mconf menuconfig-script/kernel_choice
6565
menuconfig/build/mconf menuconfig-script/rootconf
66-
menuconfig-script/kernel_choice:system/kernel_list-x86_64 system/kernel_list-i686
66+
menuconfig-script/kernel_choice:system/kernel-x86_64 system/kernel-i686
6767
./kernel-choice-conf-gen.sh
6868
build_option:
6969
if [ -f .config ];\
@@ -79,4 +79,4 @@ build:build_option mkalteriso
7979
$(eval BUILD_OPTION := $(shell cat ./.build_option))
8080
sudo ./${BUILD_SCRIPT} ${BUILD_OPTION}
8181
keyring::
82-
sudo ./keyring.sh --alter-add --arch-add
82+
sudo ./tools/keyring.sh --alter-add --arch-add

build.sh

Lines changed: 49 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -245,35 +245,28 @@ _usage () {
245245
for _list in ${script_path}/system/kernel-* ; do
246246
_arch="${_list#${script_path}/system/kernel-}"
247247
echo -n " ${_arch} "
248-
for i in $( seq 1 $(( ${blank} - 5 - ${#_arch} )) ); do
249-
echo -ne " "
250-
done
251-
for kernel in $(grep -h -v ^'#' ${_list} | awk '{print $1}'); do
252-
echo -n "${kernel} "
253-
done
248+
for i in $( seq 1 $(( ${blank} - 5 - ${#_arch} )) ); do echo -ne " "; done
249+
for kernel in $(grep -h -v ^'#' ${_list} | awk '{print $1}'); do echo -n "${kernel} "; done
254250
echo
255251
done
256252

257253
echo
258254
echo " Channel:"
259-
for _dirname in $(ls -l "${script_path}"/channels/ | awk '$1 ~ /d/ {print $9}'); do
260-
if [[ -n $(ls "${script_path}"/channels/${_dirname}) ]] && [[ ! ${_dirname} = "share" ]]; then
261-
if [[ $(echo "${_dirname}" | sed 's/^.*\.\([^\.]*\)$/\1/') = "add" ]]; then
262-
_channel="$(echo ${_dirname} | sed 's/\.[^\.]*$//')"
263-
elif [[ ! -d "${script_path}/channels/${_dirname}.add" ]]; then
264-
_channel="${_dirname}"
265-
else
266-
continue
267-
fi
268-
echo -ne " ${_channel}"
269-
for _b in $( seq 1 $(( ${blank} - 4 - ${#_channel} )) ); do echo -ne " "; done
270-
if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" == "alteriso=3.0" ]] && [[ "${nochkver}" = false ]]; then
271-
echo -ne "$( echo_color -t '31' 'ERROR:') Not compatible with AlterISO3\n"
272-
elif [[ -f "${script_path}/channels/${_dirname}/description.txt" ]]; then
273-
echo -ne "$(cat "${script_path}/channels/${_dirname}/description.txt")\n"
274-
else
275-
echo -ne "$( echo_color -t '33' 'WARN :') This channel does not have a description.txt.\n"
276-
fi
255+
#for _dirname in $(if [[ "${nochkver}" = true ]]; then bash "${script_path}/tools/channel.sh" -d -b -n show; else bash "${script_path}/tools/channel.sh" -d -b show; fi); do
256+
for _dirname in $(bash "${script_path}/tools/channel.sh" -d -b -n show); do
257+
if [[ $(echo "${_dirname}" | sed 's/^.*\.\([^\.]*\)$/\1/') = "add" ]]; then
258+
_channel="$(echo ${_dirname} | sed 's/\.[^\.]*$//')"
259+
else
260+
_channel="${_dirname}"
261+
fi
262+
echo -ne " ${_channel}"
263+
for _b in $( seq 1 $(( ${blank} - 4 - ${#_channel} )) ); do echo -ne " "; done
264+
if [[ ! "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" == "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
265+
echo -ne "$( echo_color -t '31' 'ERROR:') Not compatible with AlterISO3\n"
266+
elif [[ -f "${script_path}/channels/${_dirname}/description.txt" ]]; then
267+
echo -ne "$(cat "${script_path}/channels/${_dirname}/description.txt")\n"
268+
else
269+
echo -ne "$( echo_color -t '33' 'WARN :') This channel does not have a description.txt.\n"
277270
fi
278271
done
279272
echo -ne " rebuild"
@@ -295,9 +288,7 @@ _usage () {
295288
echo " --nodepend No check package dependencies before building"
296289
echo " --noiso No build iso image (Use with --tarball)"
297290
echo " --shmkalteriso Use the shell script version of mkalteriso"
298-
if [[ -n "${1:-}" ]]; then
299-
exit "${1}"
300-
fi
291+
if [[ -n "${1:-}" ]]; then exit "${1}"; fi
301292
}
302293

303294

@@ -368,20 +359,11 @@ remove_work() {
368359

369360
# Display channel list
370361
show_channel_list() {
371-
local _channellist _dirname
372-
for _dirname in $(ls -l "${script_path}"/channels/ | awk '$1 ~ /d/ {print $9}'); do
373-
if [[ -n $(ls "${script_path}"/channels/${_dirname}) && ! ${_dirname} = "share" ]] && [[ "$(cat "${script_path}/channels/${_dirname}/alteriso" 2> /dev/null)" = "alteriso=3.0" ]] || [[ "${nochkver}" = true ]]; then
374-
if [[ $(echo "${_dirname}" | sed 's/^.*\.\([^\.]*\)$/\1/') = "add" ]]; then
375-
_channellist+=("$(echo ${_dirname} | sed 's/\.[^\.]*$//')")
376-
elif [[ ! -d "${script_path}/channels/${_dirname}.add" ]]; then
377-
_channellist+=("${_dirname}")
378-
else
379-
continue
380-
fi
381-
fi
382-
done
383-
_channellist+=("rebuild")
384-
echo "${_channellist[@]}"
362+
if [[ "${nochkver}" = true ]]; then
363+
bash "${script_path}/tools/channel.sh" -v "${alteriso_version}" -n show
364+
else
365+
bash "${script_path}/tools/channel.sh" -v "${alteriso_version}" show
366+
fi
385367
}
386368

387369
# Check the value of a variable that can only be set to true or false.
@@ -393,7 +375,7 @@ check_bool() {
393375
fi
394376
if [[ ! -v "${1}" ]]; then
395377
echo; msg_error "The variable name ${1} is empty." "1"
396-
elif [[ ! "${_value}" = "true" ]] && [[ ! "${_value}" = "false" ]]; then
378+
elif [[ ! "${_value}" = "true" ]] && [[ ! "${_value}" = "false" ]]; then
397379
echo; msg_error "The variable name ${1} is not of bool type." "1"
398380
fi
399381
}
@@ -471,12 +453,7 @@ prepare_build() {
471453
local _save_var
472454
_save_var() {
473455
local out_file="${rebuildfile}" i
474-
for i in ${@}; do
475-
echo -n "${i}=" >> "${out_file}"
476-
echo -n '"' >> "${out_file}"
477-
eval echo -n '$'{${i}} >> "${out_file}"
478-
echo '"' >> "${out_file}"
479-
done
456+
for i in ${@}; do echo "${i}=\"$(eval echo -n '$'${i})\"" >> "${out_file}"; done
480457
}
481458

482459
# Save the value of the variable for use in rebuild.
@@ -509,7 +486,6 @@ prepare_build() {
509486
_write_rebuild_file "\n# Plymouth Info"
510487
_save_var boot_splash
511488
_save_var theme_name
512-
_save_var theme_pkg
513489

514490
_write_rebuild_file "\n# Language Info"
515491
_save_var locale_name
@@ -520,8 +496,6 @@ prepare_build() {
520496

521497
_write_rebuild_file "\n# Kernel Info"
522498
_save_var kernel
523-
_save_var kernel_package
524-
_save_var kernel_headers_packages
525499
_save_var kernel_filename
526500
_save_var kernel_mkinitcpio_profile
527501

@@ -710,24 +684,6 @@ make_pacman_conf() {
710684
# Base installation (airootfs)
711685
make_basefs() {
712686
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" init
713-
714-
# Install plymouth.
715-
if [[ "${boot_splash}" = true ]]; then
716-
if [[ -n "${theme_pkg}" ]]; then
717-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "plymouth ${theme_pkg}" install
718-
else
719-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "plymouth" install
720-
fi
721-
fi
722-
723-
# Install kernel.
724-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "${kernel_package} ${kernel_headers_packages}" install
725-
726-
if [[ "${kernel_package}" = "linux" ]]; then
727-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "broadcom-wl" install
728-
else
729-
${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "broadcom-wl-dkms" install
730-
fi
731687
}
732688

733689
# Additional packages (airootfs)
@@ -738,18 +694,33 @@ make_packages() {
738694
#-- Detect package list to load --#
739695
# Add the files for each channel to the list of files to read.
740696
_loadfilelist=(
741-
$(ls "${script_path}"/channels/${channel_name}/packages.${arch}/*.${arch} 2> /dev/null)
742-
"${script_path}"/channels/${channel_name}/packages.${arch}/lang/${locale_name}.${arch}
697+
# share packages
743698
$(ls "${script_path}"/channels/share/packages.${arch}/*.${arch} 2> /dev/null)
744-
"${script_path}"/channels/share/packages.${arch}/lang/${locale_name}.${arch}
699+
"${script_path}/channels/share/packages.${arch}/lang/${locale_name}.${arch}"
700+
701+
# channel packages
702+
$(ls "${script_path}"/channels/${channel_name}/packages.${arch}/*.${arch} 2> /dev/null)
703+
"${script_path}/channels/${channel_name}/packages.${arch}/lang/${locale_name}.${arch}"
704+
705+
# kernel packages
706+
"${script_path}/channels/share/packages.${arch}/kernel/${kernel}.${arch}"
707+
"${script_path}/channels/${channel_name}/packages.${arch}/kernel/${kernel}.${arch}"
745708
)
746709

710+
# Plymouth package list
711+
if [[ "${boot_splash}" = true ]]; then
712+
_loadfilelist+=(
713+
$(ls "${script_path}"/channels/share/packages.${arch}/plymouth/*.${arch} 2> /dev/null)
714+
$(ls "${script_path}"/channels/${channel_name}/packages.${arch}/plymouth/*.${arch} 2> /dev/null)
715+
)
716+
fi
717+
747718

748719
#-- Read package list --#
749720
# Read the file and remove comments starting with # and add it to the list of packages to install.
750721
for _file in ${_loadfilelist[@]}; do
751722
if [[ -f "${_file}" ]]; then
752-
msg_debug "Loaded package file ${_file}."
723+
msg_debug "Loaded package file ${_file}"
753724
_pkglist=( ${_pkglist[@]} "$(grep -h -v ^'#' ${_file})" )
754725
fi
755726
done
@@ -992,7 +963,7 @@ make_customize_airootfs() {
992963

993964
# Generate options of customize_airootfs.sh.
994965
local _airootfs_script_options
995-
_airootfs_script_options="-p '${password}' -k '${kernel} ${kernel_package} ${kernel_headers_packages} ${kernel_filename} ${kernel_mkinitcpio_profile}' -u '${username}' -o '${os_name}' -i '${install_dir}' -s '${usershell}' -a '${arch}' -g '${locale_gen_name}' -l '${locale_name}' -z '${locale_time}' -t ${theme_name}"
966+
_airootfs_script_options="-p '${password}' -k '${kernel} ${kernel_filename} ${kernel_mkinitcpio_profile}' -u '${username}' -o '${os_name}' -i '${install_dir}' -s '${usershell}' -a '${arch}' -g '${locale_gen_name}' -l '${locale_name}' -z '${locale_time}' -t ${theme_name}"
996967
[[ ${boot_splash} = true ]] && _airootfs_script_options="${_airootfs_script_options} -b"
997968
[[ ${debug} = true ]] && _airootfs_script_options="${_airootfs_script_options} -d"
998969
[[ ${bash_debug} = true ]] && _airootfs_script_options="${_airootfs_script_options} -x"
@@ -1335,10 +1306,8 @@ parse_files() {
13351306
# 抽出された行に書かれた設定をそれぞれの変数に代入
13361307
# ここで定義された変数のみがグローバル変数
13371308
kernel="${_kernel_config_line[0]}"
1338-
kernel_package="${_kernel_config_line[1]}"
1339-
kernel_headers_packages="${_kernel_config_line[2]}"
1340-
kernel_filename="${_kernel_config_line[3]}"
1341-
kernel_mkinitcpio_profile="${_kernel_config_line[4]}"
1309+
kernel_filename="${_kernel_config_line[1]}"
1310+
kernel_mkinitcpio_profile="${_kernel_config_line[2]}"
13421311
}
13431312

13441313

@@ -1521,30 +1490,8 @@ rebuildfile="${work_dir}/alteriso_config"
15211490
set +eu
15221491
[[ -n "${1}" ]] && channel_name="${1}"
15231492

1524-
# check_channel <channel name>
1525-
check_channel() {
1526-
local _channel _return_true
1527-
_return_true(){ echo -n "true"; return 0;}
1528-
1529-
if [[ -d "${script_path}/channels/${channel_name}.add" ]]; then
1530-
_channel="${channel_name}.add"
1531-
elif [[ -d "${script_path}/channels/${channel_name}" ]]; then
1532-
_channel="${channel_name}"
1533-
fi
1534-
1535-
if [[ "${channel_name}" = "rebuild" ]] || [[ "${channel_name}" = "clean" ]]; then
1536-
_return_true
1537-
fi
1538-
if [[ -n $(ls "${script_path}"/channels/${_channel}) ]] && [[ ! "${_channel}" == "share" ]]; then
1539-
_return_true
1540-
fi
1541-
1542-
echo -n "false"
1543-
return 1
1544-
}
1545-
15461493
# Check for a valid channel name
1547-
[[ $(check_channel "${channel_name}") = false ]] && msg_error "Invalid channel ${channel_name}" "1"
1494+
[[ "$(bash "${script_path}/tools/channel.sh" check "${channel_name}")" = false ]] && msg_error "Invalid channel ${channel_name}" "1"
15481495

15491496
# Set for special channels
15501497
if [[ -d "${script_path}/channels/${channel_name}.add" ]]; then
@@ -1569,7 +1516,7 @@ fi
15691516
# Check channel version
15701517
if [[ ! "${channel_name}" == "rebuild" ]]; then
15711518
msg_debug "channel path is ${script_path}/channels/${channel_name}"
1572-
if [[ ! "$(cat "${script_path}/channels/${channel_name}/alteriso" 2> /dev/null)" = "alteriso=3.0" ]] && [[ "${nochkver}" = false ]]; then
1519+
if [[ ! "$(cat "${script_path}/channels/${channel_name}/alteriso" 2> /dev/null)" = "alteriso=${alteriso_version}" ]] && [[ "${nochkver}" = false ]]; then
15731520
msg_error "This channel does not support AlterISO 3." "1"
15741521
fi
15751522
fi

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ set -e -u
1414
# All values can be changed by arguments.
1515
password=alter
1616
boot_splash=false
17-
kernel_config_line=("zen" "linux-zen" "linux-zen-beaders" "vmlinuz-linux-zen" "linux-zen")
18-
kernel_config_line=("zen" "linux-zen" "linux-zen-beaders" "vmlinuz-linux-zen" "linux-zen")
17+
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
1918
theme_name=alter-logo
2019
rebuild=false
2120
username='alter'
@@ -52,11 +51,8 @@ done
5251

5352
# Parse kernel
5453
kernel="${kernel_config_line[0]}"
55-
kernel_package="${kernel_config_line[1]}"
56-
kernel_headers_packages="${kernel_config_line[2]}"
57-
kernel_filename="${kernel_config_line[3]}"
58-
kernel_mkinitcpio_profile="${kernel_config_line[4]}"
59-
54+
kernel_filename="${kernel_config_line[1]}"
55+
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
6056

6157
# Delete file only if file exists
6258
# remove <file1> <file2> ...
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
plymouth-theme-alter-logo-git
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
plymouth-theme-alter-logo-git

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set -e -u
1414
# All values can be changed by arguments.
1515
password=alter
1616
boot_splash=false
17-
kernel_config_line=("zen" "linux-zen" "linux-zen-beaders" "vmlinuz-linux-zen" "linux-zen")
17+
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
1818
theme_name=alter-logo
1919
rebuild=false
2020
username='alter'
@@ -51,10 +51,8 @@ done
5151

5252
# Parse kernel
5353
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]}"
54+
kernel_filename="${kernel_config_line[1]}"
55+
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
5856

5957

6058
# Delete file only if file exists
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
plymouth-theme-alter-logo-git
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
plymouth-theme-alter-logo-git

channels/deepin/airootfs.any/root/customize_airootfs_deepin.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set -e -u
1414
# All values can be changed by arguments.
1515
password=alter
1616
boot_splash=false
17-
kernel_config_line=("zen" "linux-zen" "linux-zen-beaders" "vmlinuz-linux-zen" "linux-zen")
17+
kernel_config_line=("zen" "vmlinuz-linux-zen" "linux-zen")
1818
theme_name=alter-logo
1919
rebuild=false
2020
username='alter'
@@ -51,10 +51,8 @@ done
5151

5252
# Parse kernel
5353
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]}"
54+
kernel_filename="${kernel_config_line[1]}"
55+
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
5856

5957

6058
# Delete file only if file exists

0 commit comments

Comments
 (0)