Skip to content

Commit 55a8261

Browse files
committed
Merge branch 'dev' into dev-stable
2 parents 37962bb + cfdbedc commit 55a8261

File tree

48 files changed

+350
-379
lines changed

Some content is hidden

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

48 files changed

+350
-379
lines changed

.github/workflows/shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
- name: Run ShellCheck
3030
uses: ludeeus/action-shellcheck@master
3131
with:
32-
severity: error
32+
severity: warning
3333
env:
3434
SHELLCHECK_OPTS: --shell=bash

build.sh

Lines changed: 35 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -90,53 +90,48 @@ _usage () {
9090
echo " General options:"
9191
echo " -b | --boot-splash Enable boot splash"
9292
echo " -e | --cleanup | --cleaning Enable post-build cleaning"
93-
echo " --tarball Build rootfs in tar.xz format"
93+
echo " -r | --tarball Build rootfs in tar.xz format"
9494
echo " -h | --help This help message and exit"
9595
echo
9696
echo " -a | --arch <arch> Set iso architecture"
97-
echo " Default: ${arch}"
9897
echo " -c | --comp-type <comp_type> Set SquashFS compression type (gzip, lzma, lzo, xz, zstd)"
99-
echo " Default: ${sfs_comp}"
10098
echo " -g | --gpgkey <key> Set gpg key"
101-
echo " Default: ${gpg_key}"
10299
echo " -l | --lang <lang> Specifies the default language for the live environment"
103-
echo " Default: ${locale_name}"
104-
echo " -k | --kernel <kernel> Set special kernel type.See below for available kernels"
105-
echo " Default: ${defaultkernel}"
100+
echo " -k | --kernel <kernel> Set special kernel type. See below for available kernels"
106101
echo " -o | --out <out_dir> Set the output directory"
107-
echo " Default: ${out_dir}"
108102
echo " -p | --password <password> Set a live user password"
109-
echo " Default: ${password}"
110103
echo " -t | --comp-opts <options> Set compressor-specific options."
111-
echo " Default: empty"
112104
echo " -u | --user <username> Set user name"
113-
echo " Default: ${username}"
114105
echo " -w | --work <work_dir> Set the working directory"
115-
echo " Default: ${work_dir}"
116106
echo
117107

118-
local blank="33" _arch _dirname _type
119-
108+
local blank="29" _arch _dirname _type _output _first
120109
for _type in "locale" "kernel"; do
121110
echo " ${_type} for each architecture:"
122111
for _arch in $(find "${script_path}/system/" -maxdepth 1 -mindepth 1 -name "${_type}-*" -print0 | xargs -I{} -0 basename {} | sed "s|${_type}-||g"); do
123-
echo -n " ${_arch}$(echo_blank "$(( "${blank}" - 4 - "${#_arch}" ))")"
112+
echo -n " ${_arch}$(echo_blank "$(( "${blank}" - "${#_arch}" ))")"
124113
"${tools_dir}/${_type}.sh" -a "${_arch}" show
125114
done
126115
echo
127116
done
128117

129118
echo " Channel:"
130119
for _dirname in $(bash "${tools_dir}/channel.sh" --version "${alteriso_version}" -d -b -n --line show | sed "s|.add$||g"); do
131-
echo -ne " ${_dirname}$(echo_blank "$(( "${blank}" - 4 - "${#_dirname}" ))")"
132-
"${tools_dir}/channel.sh" --version "${alteriso_version}" --nocheck desc "${_dirname}"
120+
readarray -t _output < <("${tools_dir}/channel.sh" --version "${alteriso_version}" --nocheck desc "${_dirname}")
121+
_first=true
122+
echo -n " ${_dirname}"
123+
for _out in "${_output[@]}"; do
124+
"${_first}" && echo -e " $(echo_blank "$(( "${blank}" - 4 - "${#_dirname}" ))")${_out}" || echo -e " $(echo_blank "$(( "${blank}" + 5 - "${#_dirname}" ))")${_out}"
125+
_first=false
126+
done
133127
done
134128

135129
echo
136130
echo " Debug options: Please use at your own risk."
137131
echo " -d | --debug Enable debug messages"
138132
echo " -x | --bash-debug Enable bash debug mode(set -xv)"
139133
echo " --channellist Output the channel list and exit"
134+
echo " --config Load additional config file"
140135
echo " --gitversion Add Git commit hash to image file version"
141136
echo " --logpath <file> Set log file path (use with --log)"
142137
echo " --[no]log (No) log ;re-run script with tee"
@@ -145,11 +140,12 @@ _usage () {
145140
echo " --nocolor No output colored output"
146141
echo " --[no]confirm (No) check the settings before building"
147142
echo " --nochkver No check the version of the channel"
148-
echo " --nodebug No debug message"
143+
echo " --nodebug Disable all debug messages"
149144
echo " --noefi No efi boot (Use only for debugging)"
150145
echo " --noloopmod No check and load kernel module automatically"
151146
echo " --nodepend No check package dependencies before building"
152147
echo " --noiso No build iso image (Use with --tarball)"
148+
echo " --nosigcheck No pacman signature check"
153149
echo " --pacman-debug Enable pacman debug mode"
154150
echo " --normwork No remove working dir"
155151
echo " --nopkgbuild Ignore PKGBUILD (Use only for debugging)"
@@ -228,10 +224,7 @@ show_channel_list() {
228224

229225
# Execute command for each module. It will be executed with {} replaced with the module name.
230226
# for_module <command>
231-
for_module(){
232-
local module
233-
for module in "${modules[@]}"; do eval "${@//"{}"/${module}}"; done
234-
}
227+
for_module(){ local module && for module in "${modules[@]}"; do eval "${@//"{}"/${module}}"; done; }
235228

236229
# pacstrapを実行
237230
_pacstrap(){
@@ -390,6 +383,7 @@ show_settings() {
390383
msg_info "The compression method of squashfs is ${sfs_comp}."
391384
msg_info "Use the ${channel_name%.add} channel."
392385
msg_info "Build with architecture ${arch}."
386+
(( "${#additional_exclude_pkg[@]}" != 0 )) && msg_info "Excluded packages: ${additional_exclude_pkg[*]}"
393387
if [[ "${noconfirm}" = false ]]; then
394388
echo -e "\nPress Enter to continue or Ctrl + C to cancel."
395389
read -r
@@ -404,41 +398,37 @@ show_settings() {
404398

405399
# Preparation for build
406400
prepare_build() {
401+
# Debug mode
402+
[[ "${bash_debug}" = true ]] && set -x -v
403+
407404
# Show alteriso version
408-
if [[ -d "${script_path}/.git" ]]; then
409-
cd "${script_path}"
410-
msg_debug "The version of alteriso is $(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')."
411-
cd "${OLDPWD}"
412-
fi
405+
[[ -n "${gitrev-""}" ]] && msg_debug "The version of alteriso is ${gitrev}"
413406

414407
# Load configs
415408
load_config "${channel_dir}/config.any" "${channel_dir}/config.${arch}"
416409

417-
# Debug mode
418-
if [[ "${bash_debug}" = true ]]; then
419-
set -x -v
420-
fi
421-
422410
# Legacy mode
423411
if [[ "$(bash "${tools_dir}/channel.sh" --version "${alteriso_version}" ver "${channel_name}")" = "3.0" ]]; then
424412
msg_warn "The module cannot be used because it works with Alter ISO3.0 compatibility."
425-
case "${include_extra-"unset"}" in
426-
"true")
427-
modules=("base" "share" "share-extra" "gtk-tools" "pamac" "calamares" "zsh-powerline")
428-
;;
429-
"false" | "unset")
430-
modules=("base" "share")
431-
;;
432-
esac
413+
modules=("legacy")
414+
[[ "${include_extra-"unset"}" = true ]] && modules=("legacy-extra")
433415
fi
434416

435-
local module_check
417+
# Load presets
418+
local _modules=() module_check
419+
for_module '[[ -f "${preset_dir}/{}" ]] && readarray -t -O "${#_modules[@]}" _modules < <(cat "${preset_dir}/{}") || _modules+=("{}")'
420+
modules=("${_modules[@]}")
421+
unset _modules
422+
423+
# Check modules
436424
module_check(){
437425
msg_debug "Checking ${1} module ..."
438426
bash "${tools_dir}/module.sh" check "${1}" || msg_error "Module ${1} is not available." "1";
439427
}
440428
readarray -t modules < <(printf "%s\n" "${modules[@]}" | awk '!a[$0]++')
441429
for_module "module_check {}"
430+
431+
# Load modules
442432
for_module load_config "${module_dir}/{}/config.any" "${module_dir}/{}/config.${arch}"
443433
msg_debug "Loaded modules: ${modules[*]}"
444434
! printf "%s\n" "${modules[@]}" | grep -x "share" >/dev/null 2>&1 && msg_warn "The share module is not loaded."
@@ -478,9 +468,7 @@ prepare_build() {
478468
# Check architecture for each channel
479469
local _exit=0
480470
bash "${tools_dir}/channel.sh" --version "${alteriso_version}" -a "${arch}" -n -b check "${channel_name}" || _exit="${?}"
481-
if (( "${_exit}" != 0 )) && (( "${_exit}" != 1 )); then
482-
msg_error "${channel_name} channel does not support current architecture (${arch})." "1"
483-
fi
471+
( (( "${_exit}" != 0 )) && (( "${_exit}" != 1 )) ) && msg_error "${channel_name} channel does not support current architecture (${arch})." "1"
484472

485473
# Run with tee
486474
if [[ ! "${logging}" = false ]]; then
@@ -1034,9 +1022,7 @@ make_overisofs() {
10341022
make_iso() {
10351023
local _iso_efi_boot_args=()
10361024
# If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image.
1037-
if [[ -f "${build_dir}/efiboot.img" ]]; then
1038-
_iso_efi_boot_args=(-append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B "${build_dir}/efiboot.img" -appended_part_as_gpt -eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot -isohybrid-gpt-basdat)
1039-
fi
1025+
[[ -f "${build_dir}/efiboot.img" ]] && _iso_efi_boot_args=(-append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B "${build_dir}/efiboot.img" -appended_part_as_gpt -eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot -isohybrid-gpt-basdat)
10401026

10411027
mkdir -p -- "${out_dir}"
10421028
msg_info "Creating ISO image..."
@@ -1070,13 +1056,8 @@ make_iso() {
10701056
ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}")
10711057
OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "u:" "w:" "x")
10721058
OPTL=("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" "msgdebug" "noloopmod" "tarball" "noiso" "noaur" "nochkver" "channellist" "config:" "noefi" "nodebug" "nosigcheck" "normwork" "log" "logpath:" "nolog" "nopkgbuild" "pacman-debug" "confirm" "tar-type:" "tar-opts:")
1073-
if ! OPT=$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}"); then
1074-
#if ! readarray OPT < <(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}"); then
1075-
exit 1
1076-
fi
1059+
OPT="$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}")" || exit 1
10771060

1078-
#eval set -- "${OPT[@]}"4
1079-
#msg_debug "Argument: ${OPT[@]}"
10801061
eval set -- "${OPT}"
10811062
msg_debug "Argument: ${OPT}"
10821063
unset OPT OPTS OPTL DEFAULT_ARGUMENT
@@ -1308,12 +1289,7 @@ else
13081289
fi
13091290

13101291
# Set vars
1311-
build_dir="${work_dir}/build/${arch}"
1312-
cache_dir="${work_dir}/cache/${arch}"
1313-
airootfs_dir="${build_dir}/airootfs"
1314-
isofs_dir="${build_dir}/iso"
1315-
lockfile_dir="${build_dir}/lockfile"
1316-
gitrev="$(cd "${script_path}"; git rev-parse --short HEAD)"
1292+
build_dir="${work_dir}/build/${arch}" cache_dir="${work_dir}/cache/${arch}" airootfs_dir="${build_dir}/airootfs" isofs_dir="${build_dir}/iso" lockfile_dir="${build_dir}/lockfile" gitrev="$(cd "${script_path}"; git rev-parse --short HEAD)" preset_dir="${script_path}/presets"
13171293

13181294
# Create dir
13191295
for _dir in build_dir cache_dir airootfs_dir isofs_dir lockfile_dir out_dir; do

channels/basic/config.any

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ usershell="/bin/zsh"
2323
# An array of module directory names to include.
2424
# This setting cannot be changed by an argument.
2525
modules=(
26-
"base"
27-
"share"
28-
"zsh-powerline"
26+
"cli-modules"
2927
"share-extra"
28+
"pipewire"
3029
"gtk-tools"
3130
#"lightdm"
3231
)

channels/basic/description.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
A template for channels that use share-extra
2-
Do not build this channel alone
1+
A template for channels that use share-extra\nDo not build this channel alone

channels/cinnamon/config.any

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ usershell="/bin/zsh"
1919
# An array of module directory names to include.
2020
# This setting cannot be changed by an argument.
2121
modules=(
22-
"base"
23-
"share"
24-
"share-extra"
25-
"gtk-tools"
26-
"zsh-powerline"
27-
"lightdm"
28-
"alter-lightdm"
29-
"qtongtk"
30-
"calamares"
22+
"cli-modules"
23+
"lightdm-modules"
24+
"gtk-modules"
3125
)

channels/gnome/airootfs.any/etc/dconf/db/local.d/01-alter-gnome

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ clock-show-weekday=false
1212
enable-animations=false
1313
enable-hot-corners=false
1414
gtk-im-module='gtk-im-context-simple'
15-
gtk-theme='Adapta-Blue-Nokto-Eta'
15+
gtk-theme='Materia-dark-compact'
1616
icon-theme='Papirus-Dark'
1717
show-battery-percentage=true
1818

@@ -64,7 +64,7 @@ hinting='slight'
6464

6565
[org/gnome/shell]
6666
app-picker-view=uint32 0
67-
disabled-extensions=['[email protected]', '[email protected]', '[email protected]', 'native-window-placement@gnome-shell-extensions.gcampax.github.com', '[email protected]' ]
67+
disabled-extensions=['[email protected]', '[email protected]', '[email protected]', 'native-window-placement@gnome-shell-extensions.gcampax.github.com', '[email protected]']
6868
6969
favorite-apps=['chromium.desktop', 'org.gnome.Nautilus.desktop', 'thunderbird.desktop', 'libreoffice-startcenter.desktop', 'medit.desktop', 'vlc.desktop', 'org.gnome.Screenshot.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Extensions.desktop', 'gnome-control-center.desktop']
7070

@@ -108,6 +108,7 @@ menu-height=550
108108
menu-layout='Windows'
109109
menu-width=290
110110
pinned-app-list=['Chromium', '', 'chromium.desktop', 'Thunderbird', '', 'thunderbird.desktop', 'LibreOffice Writer', '', 'libreoffice-writer.desktop', 'LibreOffice Impress', '', 'libreoffice-impress.desktop', 'LibreOffice Calc', '', 'libreoffice-calc.desktop', 'System Monitor', '', 'gnome-system-monitor.desktop', 'Extensions', '', 'org.gnome.Extensions.desktop', 'VLC media player', '', 'vlc.desktop', 'medit', '', 'medit.desktop']
111+
prefs-visible-page=0
111112
right-panel-width=205
112113
searchbar-default-bottom-location='Bottom'
113114
searchbar-default-top-location='Bottom'
@@ -160,13 +161,13 @@ show-network-volumes=false
160161
show-volumes=false
161162

162163
[org/gnome/shell/extensions/user-theme]
163-
name='Adapta-Blue-Nokto'
164+
name='Materia-dark-compact'
164165

165166
[org/gnome/shell/keybindings]
166167
toggle-overview=@as []
167168

168169
[org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
169-
background-color='rgb(19,25,28)'
170+
background-color='rgb(18,18,18)'
170171
default-size-columns=80
171172
font='SauceCodePro Nerd Font 10'
172173
foreground-color='rgb(208,207,204)'

channels/gnome/config.any

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ noaur=false
2222
# An array of module directory names to include.
2323
# This setting cannot be changed by an argument.
2424
modules=(
25-
"base"
26-
"share"
27-
"share-extra"
28-
"gtk-tools"
29-
"zsh-powerline"
25+
"cli-modules"
3026
"gdm"
31-
"qtongtk"
32-
"calamares"
27+
"gtk-modules"
3328
)

channels/gnome/packages_aur.x86_64/gnome-extensions.x86_64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
chrome-gnome-shell
1313

14-
gnome-shell-extension-arc-menu-bin
14+
gnome-shell-extension-arc-menu
1515
gnome-shell-extension-clipboard-indicator
1616
gnome-shell-extension-coverflow-alt-tab
1717
gnome-shell-extension-dash-to-panel

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919

2020
#-- Completion --#
21+
# shellcheck disable=SC2206
2122
[ -e /usr/local/share/zsh-completions ] && fpath=(/usr/local/share/zsh-completions $fpath)
2223
autoload -U compinit
2324
compinit -u
@@ -99,7 +100,7 @@ colors
99100

100101

101102
#-- Pass to the path --#
102-
[[ -d ~/.bin ]] && export PATH="~/.bin:${PATH}"
103+
[[ -d ~/.bin ]] && export PATH="${HOME}/.bin:${PATH}"
103104

104105

105106
#-- PROMPT --#

channels/i3/config.any

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ usershell="/bin/zsh"
1919
# An array of module directory names to include.
2020
# This setting cannot be changed by an argument.
2121
modules=(
22-
"base"
23-
"share"
24-
"share-extra"
25-
"gtk-tools"
26-
"zsh-powerline"
27-
"lightdm"
28-
"alter-lightdm"
29-
"qtongtk"
30-
"calamares"
22+
"cli-modules"
23+
"lightdm-modules"
24+
"gtk-modules"
3125
)

0 commit comments

Comments
 (0)