• R/O
  • HTTP
  • SSH
  • HTTPS

alterlinux: 提交

GitHubのミラーです
https://github.com/FascodeNet/alterlinux


Commit MetaInfo

修订版f37951b847943abe95296db17d8d10270b005c2f (tree)
时间2021-08-19 00:44:54
作者hayao <hayao@fasc...>
Commiterhayao

Log Message

Merge branch 'dev' into dev-stable

更改概述

差异

--- a/Makefile
+++ b/Makefile
@@ -2,26 +2,43 @@
22 ARGS :=
33 BUILD_SCRIPT := build.sh
44 KERNEL := zen
5-SHARE_OPTION := --boot-splash --comp-type "xz" --user "alter" --password "alter" --kernel "${KERNEL}" --debug --noconfirm
5+SHARE_OPTION := --boot-splash --comp-type "xz" --user "alter" --password "alter" --kernel "${KERNEL}" --noconfirm
66 ARCH_x86_64 := --arch x86_64
77 ARCH_i686 := --arch i686
88 FULLBUILD := -d -g -e --noconfirm
9+DEBUG_OPTION := --debug --log
10+DEBUG := false
911 FULL_x86_64 := xfce cinnamon i3 plasma gnome
1012 FULL_i686 := xfce lxde
1113 CURRENT_DIR := ${shell dirname $(dir $(abspath $(lastword $(MAKEFILE_LIST))))}/${shell basename $(dir $(abspath $(lastword $(MAKEFILE_LIST))))}
1214
15+ifeq (${DEBUG},true)
16+ ARGS += ${ARGS} ${DEBUG_OPTION}
17+endif
18+
1319 full:
1420 sudo ${CURRENT_DIR}/tools/fullbuild.sh ${FULLBUILD} -m x86_64 ${FULL_x86_64}
1521 sudo ${CURRENT_DIR}/tools/fullbuild.sh ${FULLBUILD} -m i686 ${FULL_i686}
1622 @make clean
1723
18-basic-64 basic-32 cinnamon-64 cinnamon-32 gnome-64 i3-64 i3-32 lxde-64 lxde-32 plasma-64 releng-32 releng-64 serene-64 serene-32 xfce-64 xfce-32 xfce-pro-64:
24+basic-ja-64 basic-en-64 basic-ja-32 basic-en-32 \
25+cinnamon-ja-64 cinnamon-en-64 cinnamon-ja-32 cinnamon-en-32 \
26+gnome-ja-64 gnome-en-64 gnome-ja-32 gnome-en-32 \
27+i3-ja-64 i3-en-64 i3-ja-32 i3-en-32 \
28+lxde-ja-64 lxde-en-64 lxde-ja-32 lxde-en-32 \
29+plasma-ja-64 plasma-en-64 \
30+releng-ja-64 releng-en-64 releng-ja-32 releng-en-32 \
31+serene-ja-64 serene-en-64 serene-ja-32 serene-en-32 \
32+xfce-ja-64 xfce-en-64 xfce-ja-32 xfce-en-32 \
33+xfce-pro-ja-64 xfce-pro-en-64 \
34+:
1935 @$(eval ARCHITECTURE=${shell echo ${@} | rev | cut -d '-' -f 1 | rev })
20- @$(eval CHANNEL=${shell echo ${@} | sed "s/-${ARCHITECTURE}//g"})
36+ @$(eval LOCALE=${shell echo ${@} | rev | cut -d '-' -f 2 | rev })
37+ @$(eval CHANNEL=${shell echo ${@} | sed "s/-${LOCALE}-${ARCHITECTURE}//g"})
2138 @[[ -z "${CHANNEL}" ]] && echo "Empty Channel" && exit 1 || :
2239 @case ${ARCHITECTURE} in\
23- "32") sudo ${CURRENT_DIR}/${BUILD_SCRIPT} ${ARGS} ${SHARE_OPTION} ${ARCH_i686} ${CHANNEL} ;;\
24- "64") sudo ${CURRENT_DIR}/${BUILD_SCRIPT} ${ARGS} ${SHARE_OPTION} ${ARCH_x86_64} ${CHANNEL};;\
40+ "32") sudo ${CURRENT_DIR}/${BUILD_SCRIPT} ${ARGS} ${SHARE_OPTION} ${ARCH_i686} -l ${LOCALE} ${CHANNEL} ;;\
41+ "64") sudo ${CURRENT_DIR}/${BUILD_SCRIPT} ${ARGS} ${SHARE_OPTION} ${ARCH_x86_64} -l ${LOCALE} ${CHANNEL};;\
2542 * ) echo "Unknown Architecture"; exit 1 ;; \
2643 esac
2744 @make clean
@@ -43,7 +60,7 @@ build_option:
4360 ${CURRENT_DIR}/tools/menuconf-to-alterconf.sh ${CURRENT_DIR}/.build_option
4461
4562 clean:
46- @sudo ${CURRENT_DIR}/${BUILD_SCRIPT} --noconfirm clean
63+ @sudo ${CURRENT_DIR}/${BUILD_SCRIPT} --noconfirm --debug clean
4764
4865 build:build_option
4966 $(eval BUILD_OPTION := $(shell cat ${CURRENT_DIR}/.build_option))
--- a/build.sh
+++ b/build.sh
@@ -34,7 +34,7 @@ norepopkg=()
3434 # Load config file
3535 [[ ! -f "${defaultconfig}" ]] && "${tools_dir}/msg.sh" -a 'build.sh' error "${defaultconfig} was not found." && exit 1
3636 for config in "${defaultconfig}" "${script_path}/custom.conf"; do
37- [[ -f "${config}" ]] && source "${config}"
37+ [[ -f "${config}" ]] && source "${config}" && loaded_files+=("${config}")
3838 done
3939
4040 umask 0022
@@ -109,8 +109,7 @@ _usage () {
109109 for _type in "locale" "kernel"; do
110110 echo " ${_type} for each architecture:"
111111 for _arch in $(find "${script_path}/system/" -maxdepth 1 -mindepth 1 -name "${_type}-*" -print0 | xargs -I{} -0 basename {} | sed "s|${_type}-||g"); do
112- echo -n " ${_arch}$(echo_blank "$(( "${blank}" - "${#_arch}" ))")"
113- "${tools_dir}/${_type}.sh" -a "${_arch}" show
112+ echo " ${_arch}$(echo_blank "$(( "${blank}" - "${#_arch}" ))")$("${tools_dir}/${_type}.sh" -a "${_arch}" show)"
114113 done
115114 echo
116115 done
@@ -132,7 +131,7 @@ _usage () {
132131 echo " -x | --bash-debug Enable bash debug mode(set -xv)"
133132 echo " --channellist Output the channel list and exit"
134133 echo " --config Load additional config file"
135- echo " --gitversion Add Git commit hash to image file version"
134+ echo " --[no]gitversion Add Git commit hash to image file version"
136135 echo " --logpath <file> Set log file path (use with --log)"
137136 echo " --[no]log (No) log ;re-run script with tee"
138137 echo " --msgdebug Enables output debugging"
@@ -151,6 +150,7 @@ _usage () {
151150 echo " --nopkgbuild Ignore PKGBUILD (Use only for debugging)"
152151 echo " --tar-type <comp_type> Set compression type (gzip, lzma, lzo, xz, zstd)"
153152 echo " --tar-opts <option> Set tar command argument (Use with --tarball)"
153+ echo " --add-module <module> Load additional modules (Separated by \",\")"
154154 echo
155155 echo " Many packages are installed from AUR, so specifying --noaur can cause problems."
156156 echo
@@ -158,7 +158,7 @@ _usage () {
158158 }
159159
160160 # Unmount helper Usage: _umount <target>
161-_umount() { if mountpoint -q "${1}"; then umount -lf "${1}"; fi; }
161+_umount() { mountpoint -q "${1}" && umount -lf "${1}"; return 0; }
162162
163163 # Mount helper Usage: _mount <source> <target>
164164 _mount() { ! mountpoint -q "${2}" && [[ -f "${1}" ]] && [[ -d "${2}" ]] && mount "${1}" "${2}"; return 0; }
@@ -180,13 +180,13 @@ mount_airootfs () {
180180
181181 # Helper function to run make_*() only one time.
182182 run_once() {
183- set -eu
184183 if [[ ! -e "${lockfile_dir}/build.${1}" ]]; then
184+ umount_work
185185 msg_debug "Running ${1} ..."
186186 mount_airootfs
187187 eval "${@}"
188188 mkdir -p "${lockfile_dir}"; touch "${lockfile_dir}/build.${1}"
189- umount_work
189+
190190 else
191191 msg_debug "Skipped because ${1} has already been executed."
192192 fi
@@ -246,7 +246,7 @@ _run_with_pacmanconf(){
246246 # コマンドをchrootで実行する
247247 _chroot_run() {
248248 msg_debug "Run command in chroot\nCommand: ${*}"
249- eval -- arch-chroot "${airootfs_dir}" "${@}"
249+ arch-chroot "${airootfs_dir}" "${@}" || return "${?}"
250250 }
251251
252252 _cleanup_common () {
@@ -334,7 +334,7 @@ prepare_env() {
334334 # Load loop kernel module
335335 if [[ "${noloopmod}" = false ]]; then
336336 [[ ! -d "/usr/lib/modules/$(uname -r)" ]] && msg_error "The currently running kernel module could not be found.\nProbably the system kernel has been updated.\nReboot your system to run the latest kernel." "1"
337- lsmod | getclm 1 | grep -x "loop" || modprobe loop
337+ lsmod | getclm 1 | grep -qx "loop" || modprobe loop
338338 fi
339339
340340 # Check work dir
@@ -407,6 +407,9 @@ prepare_build() {
407407 # Load configs
408408 load_config "${channel_dir}/config.any" "${channel_dir}/config.${arch}"
409409
410+ # Additional modules
411+ modules+=("${additional_modules[@]}")
412+
410413 # Legacy mode
411414 if [[ "$(bash "${tools_dir}/channel.sh" --version "${alteriso_version}" ver "${channel_name}")" = "3.0" ]]; then
412415 msg_warn "The module cannot be used because it works with Alter ISO3.0 compatibility."
@@ -416,7 +419,7 @@ prepare_build() {
416419
417420 # Load presets
418421 local _modules=() module_check
419- for_module '[[ -f "${preset_dir}/{}" ]] && readarray -t -O "${#_modules[@]}" _modules < <(cat "${preset_dir}/{}") || _modules+=("{}")'
422+ for_module '[[ -f "${preset_dir}/{}" ]] && readarray -t -O "${#_modules[@]}" _modules < <(grep -h -v ^'#' "${preset_dir}/{}") || _modules+=("{}")'
420423 modules=("${_modules[@]}")
421424 unset _modules
422425
@@ -445,6 +448,7 @@ prepare_build() {
445448 [[ "${customized_password}" = false ]] && password="${defaultpassword}"
446449
447450 # gitversion
451+ [[ ! -d "${script_path}/.git" ]] && [[ "${gitversion}" = true ]] && msg_error "There is no git directory. You need to use git clone to use this feature." "1"
448452 [[ "${gitversion}" = true ]] && iso_version="${iso_version}-${gitrev}"
449453
450454 # Generate tar file name
@@ -578,6 +582,7 @@ make_packages_aur() {
578582
579583 # prepare for yay
580584 cp -rf --preserve=mode "${script_path}/system/aur.sh" "${airootfs_dir}/root/aur.sh"
585+ _pacstrap --asdeps --needed "go" # --asdepsをつけているのでaur.shで削除される --neededをつけているので明示的にインストールされている場合削除されない
581586
582587 # Run aur script
583588 _run_with_pacmanconf _chroot_run "bash" "/root/aur.sh" "${makepkg_script_args[@]}" "${_pkglist_aur[@]}"
@@ -654,10 +659,10 @@ make_customize_airootfs() {
654659 # -k changed in AlterISO3 from passing kernel name to passing kernel configuration.
655660
656661 # Generate options of customize_airootfs.sh.
657- _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}"
658- [[ "${boot_splash}" = true ]] && _airootfs_script_options="${_airootfs_script_options} -b"
659- [[ "${debug}" = true ]] && _airootfs_script_options="${_airootfs_script_options} -d"
660- [[ "${bash_debug}" = true ]] && _airootfs_script_options="${_airootfs_script_options} -x"
662+ _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}")
663+ [[ "${boot_splash}" = true ]] && _airootfs_script_options+=("-b")
664+ [[ "${debug}" = true ]] && _airootfs_script_options+=("-d")
665+ [[ "${bash_debug}" = true ]] && _airootfs_script_options+=("-x")
661666
662667 _main_script="root/customize_airootfs.sh"
663668
@@ -671,7 +676,7 @@ make_customize_airootfs() {
671676 # Create script
672677 for _script in "${_script_list[@]}"; do
673678 if [[ -f "${_script}" ]]; then
674- (echo && cat "${_script}") >> "${airootfs_dir}/${_main_script}"
679+ (echo -e "\n#--$(basename "${_script}")--#\n" && cat "${_script}") >> "${airootfs_dir}/${_main_script}"
675680 remove "${_script}"
676681 else
677682 msg_debug "${_script} was not found."
@@ -679,8 +684,8 @@ make_customize_airootfs() {
679684 done
680685
681686 chmod 755 "${airootfs_dir}/${_main_script}"
682- cp "${airootfs_dir}/${_main_script}" "${build_dir}/$(basename ${_main_script})"
683- _chroot_run "${_main_script} ${_airootfs_script_options}"
687+ cp "${airootfs_dir}/${_main_script}" "${build_dir}/$(basename "${_main_script}")"
688+ _chroot_run "${_main_script}" "${_airootfs_script_options[@]}"
684689 remove "${airootfs_dir}/${_main_script}"
685690
686691 # /root permission https://github.com/archlinux/archiso/commit/d39e2ba41bf556674501062742190c29ee11cd59
@@ -702,17 +707,15 @@ make_setup_mkinitcpio() {
702707 sed -i "s|/usr/lib/initcpio/|/etc/initcpio/|g" "${airootfs_dir}/etc/initcpio/install/archiso_shutdown"
703708 cp "${script_path}/system/initcpio/install/archiso_kms" "${airootfs_dir}/etc/initcpio/install"
704709 cp "${script_path}/system/initcpio/archiso_shutdown" "${airootfs_dir}/etc/initcpio"
705- if [[ "${boot_splash}" = true ]]; then
706- cp "${script_path}/mkinitcpio/mkinitcpio-archiso-plymouth.conf" "${airootfs_dir}/etc/mkinitcpio-archiso.conf"
707- else
708- cp "${script_path}/mkinitcpio/mkinitcpio-archiso.conf" "${airootfs_dir}/etc/mkinitcpio-archiso.conf"
709- fi
710+ cp "${script_path}/mkinitcpio/mkinitcpio-archiso.conf" "${airootfs_dir}/etc/mkinitcpio-archiso.conf"
711+ [[ "${boot_splash}" = true ]] && cp "${script_path}/mkinitcpio/mkinitcpio-archiso-plymouth.conf" "${airootfs_dir}/etc/mkinitcpio-archiso.conf"
712+
710713 if [[ "${gpg_key}" ]]; then
711714 gpg --export "${gpg_key}" >"${build_dir}/gpgkey"
712715 exec 17<>"${build_dir}/gpgkey"
713716 fi
714717
715- _chroot_run "mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/${kernel_filename} -g /boot/archiso.img"
718+ _chroot_run mkinitcpio -c "/etc/mkinitcpio-archiso.conf" -k "/boot/${kernel_filename}" -g "/boot/archiso.img"
716719
717720 [[ "${gpg_key}" ]] && exec 17<&-
718721
@@ -761,9 +764,7 @@ make_syslinux() {
761764 # 一時ディレクトリに設定ファイルをコピー
762765 mkdir -p "${build_dir}/syslinux/"
763766 cp -a "${script_path}/syslinux/"* "${build_dir}/syslinux/"
764- if [[ -d "${channel_dir}/syslinux" ]] && [[ "${customized_syslinux}" = true ]]; then
765- cp -af "${channel_dir}/syslinux"* "${build_dir}/syslinux/"
766- fi
767+ [[ -d "${channel_dir}/syslinux" ]] && [[ "${customized_syslinux}" = true ]] && cp -af "${channel_dir}/syslinux"* "${build_dir}/syslinux/"
767768
768769 # copy all syslinux config to work dir
769770 for _cfg in "${build_dir}/syslinux/"*.cfg; do
@@ -775,13 +776,10 @@ make_syslinux() {
775776 done
776777
777778 # Replace the SYSLINUX configuration file with or without boot splash.
778- local _use_config_name _no_use_config_name _pxe_or_sys
779+ local _use_config_name="nosplash" _no_use_config_name="splash" _pxe_or_sys
779780 if [[ "${boot_splash}" = true ]]; then
780781 _use_config_name=splash
781782 _no_use_config_name=nosplash
782- else
783- _use_config_name=nosplash
784- _no_use_config_name=splash
785783 fi
786784 for _pxe_or_sys in "sys" "pxe"; do
787785 remove "${isofs_dir}/syslinux/archiso_${_pxe_or_sys}_${_no_use_config_name}.cfg"
@@ -789,11 +787,8 @@ make_syslinux() {
789787 done
790788
791789 # Set syslinux wallpaper
792- if [[ -f "${channel_dir}/splash.png" ]]; then
793- cp "${channel_dir}/splash.png" "${isofs_dir}/syslinux"
794- else
795- cp "${script_path}/syslinux/splash.png" "${isofs_dir}/syslinux"
796- fi
790+ cp "${script_path}/syslinux/splash.png" "${isofs_dir}/syslinux"
791+ [[ -f "${channel_dir}/splash.png" ]] && cp -f "${channel_dir}/splash.png" "${isofs_dir}/syslinux"
797792
798793 # remove config
799794 local _remove_config
@@ -998,9 +993,9 @@ make_alteriso_info(){
998993 # iso version info
999994 if [[ "${include_info}" = true ]]; then
1000995 local _info_file="${isofs_dir}/alteriso-info" _version="${iso_version}"
1001- remove "${_info_file}"; touch "${_info_file}"
996+ #remove "${_info_file}"; touch "${_info_file}"
1002997 [[ -d "${script_path}/.git" ]] && [[ "${gitversion}" = false ]] && _version="${iso_version}-${gitrev}"
1003- "${tools_dir}/alteriso-info.sh" -a "${arch}" -b "${boot_splash}" -c "${channel_name%.add}" -d "${iso_publisher}" -k "${kernel}" -o "${os_name}" -p "${password}" -u "${username}" -v "${_version}" > "${_info_file}"
998+ "${tools_dir}/alteriso-info.sh" -a "${arch}" -b "${boot_splash}" -c "${channel_name%.add}" -d "${iso_publisher}" -k "${kernel}" -o "${os_name}" -p "${password}" -u "${username}" -v "${_version}" -m "$(printf "%s," "${modules[@]}")"
1004999 fi
10051000
10061001 return 0
@@ -1055,7 +1050,7 @@ make_iso() {
10551050 # Parse options
10561051 ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}")
10571052 OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "u:" "w:" "x")
1058-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:")
1053+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:" "add-module:" "nogitversion")
10591054 OPT="$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" -- "${ARGUMENT[@]}")" || exit 1
10601055
10611056 eval set -- "${OPT}"
@@ -1064,14 +1059,6 @@ unset OPT OPTS OPTL DEFAULT_ARGUMENT
10641059
10651060 while true; do
10661061 case "${1}" in
1067- -a | --arch)
1068- arch="${2}"
1069- shift 2
1070- ;;
1071- -b | --boot-splash)
1072- boot_splash=true
1073- shift 1
1074- ;;
10751062 -c | --comp-type)
10761063 case "${2}" in
10771064 "gzip" | "lzma" | "lzo" | "lz4" | "xz" | "zstd") sfs_comp="${2}" ;;
@@ -1079,21 +1066,6 @@ while true; do
10791066 esac
10801067 shift 2
10811068 ;;
1082- -d | --debug)
1083- debug=true
1084- shift 1
1085- ;;
1086- -e | --cleaning | --cleanup)
1087- cleaning=true
1088- shift 1
1089- ;;
1090- -g | --gpgkey)
1091- gpg_key="${2}"
1092- shift 2
1093- ;;
1094- -h | --help)
1095- _usage 0
1096- ;;
10971069 -j | --japanese)
10981070 msg_error "This option is obsolete in AlterISO 3. To use Japanese, use \"-l ja\"." "1"
10991071 ;;
@@ -1102,23 +1074,11 @@ while true; do
11021074 kernel="${2}"
11031075 shift 2
11041076 ;;
1105- -l | --lang)
1106- locale_name="${2}"
1107- shift 2
1108- ;;
1109- -o | --out)
1110- out_dir="${2}"
1111- shift 2
1112- ;;
11131077 -p | --password)
11141078 customized_password=true
11151079 password="${2}"
11161080 shift 2
11171081 ;;
1118- -r | --tarball)
1119- tarball=true
1120- shift 1
1121- ;;
11221082 -t | --comp-opts)
11231083 if [[ "${2}" = "reset" ]]; then
11241084 sfs_comp_opt=()
@@ -1132,106 +1092,17 @@ while true; do
11321092 username="$(echo -n "${2}" | sed 's/ //g' | tr '[:upper:]' '[:lower:]')"
11331093 shift 2
11341094 ;;
1135- -w | --work)
1136- work_dir="${2}"
1137- shift 2
1138- ;;
1139- -x | --bash-debug)
1140- debug=true
1141- bash_debug=true
1142- shift 1
1143- ;;
1144- --noconfirm)
1145- noconfirm=true
1146- shift 1
1147- ;;
1148- --confirm)
1149- noconfirm=false
1150- shift 1
1151- ;;
1152- --nodepend)
1153- nodepend=true
1154- shift 1
1155- ;;
1156- --nocolor)
1157- nocolor=true
1158- shift 1
1159- ;;
1160- --gitversion)
1161- if [[ -d "${script_path}/.git" ]]; then
1162- gitversion=true
1163- else
1164- msg_error "There is no git directory. You need to use git clone to use this feature." "1"
1165- fi
1166- shift 1
1167- ;;
1168- --msgdebug)
1169- msgdebug=true;
1170- shift 1
1171- ;;
1172- --noloopmod)
1173- noloopmod=true
1174- shift 1
1175- ;;
1176- --noiso)
1177- noiso=true
1178- shift 1
1179- ;;
1180- --noaur)
1181- noaur=true
1182- shift 1
1183- ;;
1184- --nochkver)
1185- nochkver=true
1186- shift 1
1187- ;;
11881095 --nodebug)
11891096 debug=false
11901097 msgdebug=false
11911098 bash_debug=false
11921099 shift 1
11931100 ;;
1194- --noefi)
1195- noefi=true
1196- shift 1
1197- ;;
1198- --channellist)
1199- show_channel_list
1200- exit 0
1201- ;;
1202- --config)
1203- source "${2}"
1204- shift 2
1205- ;;
1206- --pacman-debug)
1207- pacman_debug=true
1208- shift 1
1209- ;;
1210- --nosigcheck)
1211- nosigcheck=true
1212- shift 1
1213- ;;
1214- --normwork)
1215- normwork=true
1216- shift 1
1217- ;;
1218- --log)
1219- logging=true
1220- shift 1
1221- ;;
12221101 --logpath)
12231102 logging="${2}"
12241103 customized_logpath=true
12251104 shift 2
12261105 ;;
1227- --nolog)
1228- logging=false
1229- shift 1
1230- ;;
1231- --nopkgbuild)
1232- nopkgbuild=true
1233- shift 1
1234- ;;
12351106 --tar-type)
12361107 case "${2}" in
12371108 "gzip" | "lzma" | "lzo" | "lz4" | "xz" | "zstd") tar_comp="${2}" ;;
@@ -1243,10 +1114,43 @@ while true; do
12431114 IFS=" " read -r -a tar_comp_opt <<< "${2}"
12441115 shift 2
12451116 ;;
1246- --)
1247- shift
1248- break
1117+ --add-module)
1118+ readarray -t -O "${#additional_modules[@]}" additional_modules < <(echo "${2}" | tr "," "\n")
1119+ msg_debug "Added modules: ${additional_modules[*]}"
1120+ shift 2
12491121 ;;
1122+ -g | --gpgkey ) gpg_key="${2}" && shift 2 ;;
1123+ -h | --help ) _usage 0 ;;
1124+ -a | --arch ) arch="${2}" && shift 2 ;;
1125+ -d | --debug ) debug=true && shift 1 ;;
1126+ -e | --cleaning | --cleanup ) cleaning=true && shift 1 ;;
1127+ -b | --boot-splash ) boot_splash=true && shift 1 ;;
1128+ -l | --lang ) locale_name="${2}" && shift 2 ;;
1129+ -o | --out ) out_dir="${2}" && shift 2 ;;
1130+ -r | --tarball ) tarball=true && shift 1 ;;
1131+ -w | --work ) work_dir="${2}" && shift 2 ;;
1132+ -x | --bash-debug ) bash_debug=true && shift 1 ;;
1133+ --gitversion ) gitversion=true && shift 1 ;;
1134+ --noconfirm ) noconfirm=true && shift 1 ;;
1135+ --confirm ) noconfirm=false && shift 1 ;;
1136+ --nodepend ) nodepend=true && shift 1 ;;
1137+ --nocolor ) nocolor=true && shift 1 ;;
1138+ --msgdebug ) msgdebug=true && shift 1 ;;
1139+ --noloopmod ) noloopmod=true && shift 1 ;;
1140+ --noiso ) noiso=true && shift 1 ;;
1141+ --noaur ) noaur=true && shift 1 ;;
1142+ --nochkver ) nochkver=true && shift 1 ;;
1143+ --noefi ) noefi=true && shift 1 ;;
1144+ --channellist ) show_channel_list && exit 0 ;;
1145+ --config ) source "${2}" && shift 2 ;;
1146+ --pacman-debug ) pacman_debug=true && shift 1 ;;
1147+ --nosigcheck ) nosigcheck=true && shift 1 ;;
1148+ --normwork ) normwork=true && shift 1 ;;
1149+ --log ) logging=true && shift 1 ;;
1150+ --nolog ) logging=false && shift 1 ;;
1151+ --nopkgbuild ) nopkgbuild=true && shift 1 ;;
1152+ --nogitversion ) gitversion=false && shift 1 ;;
1153+ -- ) shift 1 && break ;;
12501154 *)
12511155 msg_error "Argument exception error '${1}'"
12521156 msg_error "Please report this error to the developer." 1
@@ -1298,7 +1202,6 @@ for _dir in build_dir cache_dir airootfs_dir isofs_dir lockfile_dir out_dir; do
12981202 eval "${_dir}=\"$(realpath "$(eval "echo \$${_dir}")")\""
12991203 done
13001204
1301-
13021205 # Set for special channels
13031206 if [[ -d "${channel_dir}.add" ]]; then
13041207 channel_name="${1}"
@@ -1319,8 +1222,6 @@ if [[ ! "$(bash "${tools_dir}/channel.sh" --version "${alteriso_version}" ver "$
13191222 fi
13201223 fi
13211224
1322-set -eu
1323-
13241225 prepare_env
13251226 prepare_build
13261227 show_settings
--- a/channels/gnome/airootfs.any/etc/dconf/db/local.d/01-alter-gnome
+++ b/channels/gnome/airootfs.any/etc/dconf/db/local.d/01-alter-gnome
@@ -67,25 +67,15 @@ app-picker-view=uint32 0
6767 disabled-extensions=['window-list@gnome-shell-extensions.gcampax.github.com', 'drive-menu@gnome-shell-extensions.gcampax.github.com', 'places-menu@gnome-shell-extensions.gcampax.github.com', 'native-window-placement@gnome-shell-extensions.gcampax.github.com', 'apps-menu@gnome-shell-extensions.gcampax.github.com']
6868 enabled-extensions=['extensions@abteil.org', 'user-theme@gnome-shell-extensions.gcampax.github.com', 'dash-to-panel@jderose9.github.com', 'ding@rastersoft.com', 'CoverflowAltTab@palatis.blogspot.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'windowsNavigator@gnome-shell-extensions.gcampax.github.com', 'horizontal-workspaces@gnome-shell-extensions.gcampax.github.com', 'CoverflowAltTab@dmo60.de', 'arcmenu@arcmenu.com', 'clipboard-indicator@tudmotu.com', 'appindicatorsupport@rgcjonas.gmail.com']
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']
70+welcome-dialog-last-shown-version='999999999'
7071
7172 [org/gnome/shell/extensions/arc-menu]
72-application-shortcuts-list=[['Software', 'system-software-install-symbolic', 'ArcMenu_Software'], ['Settings', 'preferences-system-symbolic', 'gnome-control-center.desktop'], ['Tweaks', 'org.gnome.tweaks-symbolic', 'org.gnome.tweaks.desktop'], ['Terminal', 'utilities-terminal-symbolic', 'org.gnome.Terminal.desktop']]
73-arc-menu-placement='DTD'
7473 button-icon-padding=0
75-custom-menu-button-icon='/usr/share/icons/hicolor/128x128/apps/alter.png'
76-custom-menu-button-icon-size=24.0
77-disable-activities-button=true
78-disable-tooltips=false
7974 dtp-dtd-state=[true, true]
80-enable-custom-arc-menu=false
8175 enable-menu-button-arrow=false
82-menu-button-icon='Custom_Icon'
83-pinned-app-list=['Chromium', 'chromium', 'chromium.desktop', 'LibreOffice', 'libreoffice-startcenter', 'libreoffice-startcenter.desktop', 'VLC Media Player', 'vlc', 'vlc.desktop', 'System Monitor', 'org.gnome.SystemMonitor', 'gnome-system-monitor.desktop', 'Terminal', 'org.gnome.Terminal', 'org.gnome.Terminal.desktop', 'Settings', 'org.gnome.Settings', 'gnome-control-center.desktop']
8476 position-in-panel='Left'
8577 recently-installed-apps=@as []
8678 show-external-devices=true
87-show-lock-button=false
88-show-logout-button=false
8979 show-suspend-button=false
9080
9181 [org/gnome/shell/extensions/arcmenu]
@@ -105,6 +95,7 @@ enable-sub-menus=false
10595 extra-categories=[(0, true), (1, true), (2, true), (3, true), (4, false)]
10696 menu-button-icon='Custom_Icon'
10797 menu-height=550
98+menu-hotkey='Super_L'
10899 menu-layout='Windows'
109100 menu-width=290
110101 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']
@@ -136,23 +127,30 @@ position='Bottom'
136127 switcher-style='Timeline'
137128
138129 [org/gnome/shell/extensions/dash-to-panel]
139-appicon-margin=4
130+animate-appicon-hover-animation-extent={'RIPPLE': 4, 'PLANK': 4, 'SIMPLE': 1}
131+appicon-padding=4
140132 available-monitors=[0]
141133 dot-position='BOTTOM'
142134 group-apps=true
143135 hotkeys-overlay-combo='TEMPORARILY'
144136 intellihide=false
145137 isolate-workspaces=true
146-panel-element-positions='{"0":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}]}'
138+leftbox-padding=-1
139+panel-anchors='{"0":"MIDDLE"}'
140+panel-element-positions='{"0":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"activitiesButton","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}]}'
141+panel-lengths='{"0":100}'
147142 panel-positions='{"0":"BOTTOM"}'
148-panel-size=32
143+panel-sizes='{"0":32}'
149144 secondarymenu-contains-showdetails=true
150145 show-appmenu=false
151146 show-apps-icon-file=''
147+status-icon-padding=-1
152148 stockgs-keep-dash=true
153149 stockgs-keep-top-panel=false
154150 stockgs-panelbtn-click-only=false
155151 taskbar-locked=false
152+tray-padding=-1
153+window-preview-title-position='TOP'
156154
157155 [org/gnome/shell/extensions/ding]
158156 icon-size='small'
--- a/channels/gnome/airootfs.any/root/customize_airootfs_gnome.sh
+++ b/channels/gnome/airootfs.any/root/customize_airootfs_gnome.sh
@@ -26,3 +26,10 @@ function remove_userfile() {
2626 }
2727 remove_userfile "Desktop/calamares.desktop"
2828 #remove_userfile ".config/autostart/genicon.desktop"
29+
30+# Optimize for i686
31+if [[ "${arch}" = "i686" ]]; then
32+ for _file in "/etc/dconf/db/local.d/01-alter-gnome" "/etc/dconf/db/local.d/02-live-installer-panel"; do
33+ sed -i "s|chromium.desktop|firefox.desktop|g; s|Chromium|FireFox|g; s|chromium|firefox|g" "${_file}"
34+ done
35+fi
--- a/channels/gnome/architecture
+++ b/channels/gnome/architecture
@@ -8,3 +8,4 @@
88 # Supported architecture list
99
1010 x86_64
11+i686
--- /dev/null
+++ b/channels/gnome/packages.i686/exclude
@@ -0,0 +1,3 @@
1+xf86-input-synaptics
2+alterlinux-medit-themes
3+medit
--- /dev/null
+++ b/channels/gnome/packages.i686/gedit.i686
@@ -0,0 +1,11 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+
11+gedit
--- /dev/null
+++ b/channels/gnome/packages.i686/gnome-extensions.i686
@@ -0,0 +1,12 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# Gnome extensions
11+
12+gnome-shell-extension-appindicator
--- /dev/null
+++ b/channels/gnome/packages.i686/gnome.i686
@@ -0,0 +1,58 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# Gnome
11+
12+
13+#-- gnome --#
14+gnome-backgrounds
15+gnome-boxes
16+gnome-calculator
17+gnome-calendar
18+gnome-control-center
19+gnome-common
20+gnome-desktop
21+gnome-disk-utility
22+gnome-keyring
23+gnome-logs
24+gnome-menus
25+gnome-remote-desktop
26+gnome-screenshot
27+gnome-session
28+gnome-settings-daemon
29+gnome-shell
30+gnome-shell-extensions
31+gnome-system-monitor
32+gnome-terminal
33+mutter
34+nautilus
35+sushi
36+
37+
38+#-- gnome-extra --#
39+dconf-editor
40+gnome-tweaks
41+
42+
43+#-- Display manager --#
44+gdm
45+
46+#-- other --#
47+gnome-bluetooth
48+gnome-epub-thumbnailer
49+
50+#aur build
51+meson
52+ninja
53+jq
54+oniguruma
55+
56+# libinput
57+xf86-input-libinput
58+
--- /dev/null
+++ b/channels/gnome/packages.i686/gtk-icon-theme.i686
@@ -0,0 +1,16 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# look and feel
11+
12+# icon
13+papirus-icon-theme
14+
15+# theme
16+materia-gtk-theme
--- /dev/null
+++ b/channels/gnome/packages_aur.i686/gnome-extensions.i686
@@ -0,0 +1,20 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# Gnome extensions
11+
12+chrome-gnome-shell
13+
14+gnome-shell-extension-arc-menu
15+gnome-shell-extension-clipboard-indicator
16+gnome-shell-extension-coverflow-alt-tab
17+gnome-shell-extension-dash-to-panel
18+gnome-shell-extension-desktop-icons-ng
19+gnome-shell-extension-extensions
20+#gnome-shell-extension-topicons-redux
--- /dev/null
+++ b/channels/gnome/packages_aur.i686/wallpapers.i686
@@ -0,0 +1,12 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+
11+#-- wallpaper --#
12+alterlinux-wallpapers
--- a/default.conf
+++ b/default.conf
@@ -285,6 +285,11 @@ gitversion=false
285285 # This setting cannot be changed by an argument.
286286 additional_exclude_pkg=()
287287
288+# Additional list of modules to load
289+# Use this array for debugging only
290+# This setting cannot be changed by an argument.
291+additional_modules=()
292+
288293 # Run with tee command
289294 # Set to "false" to disable logging
290295 # If not false, the log will be saved in the specified path.
--- a/docs/README.md
+++ b/docs/README.md
@@ -60,28 +60,35 @@
6060 </b>
6161
6262 <h2>〈Overview〉</h2>
63-
6463 Alter Linux is a new OS developed based on Arch Linux.<br>
6564 Check the <a href="https://github.com/orgs/FascodeNet/projects/2">project board</a> for the latest status of Alter Linux.<br>
6665 Please see the <a href="https://fascode.net/projects/linux/alter/">official website</a> for information on announcements and bugs for users.
6766
67+<h2>〈Download〉</h2>
68+The image file can be downloaded from the official <a href="https://fascode.net/projects/linux/alter/#downloads">website</a>.
69+<br>
70+<b>We are looking for a mirror server provider for repositories and image file distribution.</b>
71+<br>
72+If you would like us to provide a mirror please contact the developer's Twitter.
73+
74+<h2>〈Screenshots〉</h2>
6875 <h3>Xfce</h3>
69-<img src="../images/screenshot/desktop-xfce.png" alt="screenshot">
76+<img src="../images/screenshot/desktop-xfce.png" alt="screenshot" width="50%">
7077
7178 <h3>Plasma</h3>
72-<img src="../images/screenshot/desktop-plasma.png" alt="screenshot">
79+<img src="../images/screenshot/desktop-plasma.png" alt="screenshot" width="50%">
7380
7481 <h3>Lxde</h3>
75-<img src="../images/screenshot/desktop-lxde.png" alt="screenshot">
82+<img src="../images/screenshot/desktop-lxde.png" alt="screenshot" width="50%">
7683
7784 <h3>Gnome</h3>
78-<img src="../images/screenshot/desktop-gnome.png" alt="screenshot">
85+<img src="../images/screenshot/desktop-gnome.png" alt="screenshot" width="50%">
7986
8087 <h3>Cinnamon</h3>
81-<img src="../images/screenshot/desktop-cinnamon.png" alt="screenshot">
88+<img src="../images/screenshot/desktop-cinnamon.png" alt="screenshot" width="50%">
8289
8390 <h3>i3wm</h3>
84-<img src="../images/screenshot/desktop-i3wm.png" alt="screenshot">
91+<img src="../images/screenshot/desktop-i3wm.png" alt="screenshot" width="50%">
8592
8693 <h2>〈Feature〉</h2>
8794 <ul>
@@ -95,13 +102,6 @@ Please see the <a href="https://fascode.net/projects/linux/alter/">official webs
95102 <li>Easy development of derived OS by framework based on archiso</li>
96103 </ul>
97104
98-<h2>〈Download〉</h2>
99-The image file can be downloaded from the official <a href="https://fascode.net/projects/linux/alter/#downloads">website</a>.
100-<br>
101-<b>We are looking for a mirror server provider for repositories and image file distribution.</b>
102-<br>
103-If you would like us to provide a mirror please contact the developer's Twitter.
104-
105105 <h2>〈Branch〉</h2>
106106 These are a list of major branches. Other branches are temporary or used for specific purposes.
107107
--- a/docs/README_jp.md
+++ b/docs/README_jp.md
@@ -57,28 +57,35 @@
5757 </table>
5858
5959 <h2>〈概要〉</h2>
60-
6160 Alter LinuxはArch Linuxをベースに開発されている新しいOSです。<br>
6261 Alter Linuxの最新の開発状況は<a href="https://github.com/orgs/FascodeNet/projects/2">プロジェクトボード</a>を確認してください。<br>
6362 ユーザ向けのアナウンスや不具合等の情報は<a href="https://fascode.net/projects/linux/alter/">公式サイト</a>をご覧ください。
6463
64+<h2>〈ダウンロード〉</h2>
65+イメージファイルは<a href="https://fascode.net/projects/linux/alter/#downloads">公式サイト</a>からダウンロードできます。
66+<br>
67+<b>私達はリポジトリやイメージファイル配布用のミラーサーバ提供者を募集しております。</b>
68+<br>
69+もし私達にミラーを提供して頂ける場合は開発者のTwitterまでお願いします。
70+
71+<h2>〈Screenshots〉</h2>
6572 <h3>Xfce</h3>
66-<img src="../images/screenshot/desktop-xfce.png" alt="screenshot">
73+<img src="../images/screenshot/desktop-xfce.png" alt="screenshot" width="50%">
6774
6875 <h3>Plasma</h3>
69-<img src="../images/screenshot/desktop-plasma.png" alt="screenshot">
76+<img src="../images/screenshot/desktop-plasma.png" alt="screenshot" width="50%">
7077
7178 <h3>Lxde</h3>
72-<img src="../images/screenshot/desktop-lxde.png" alt="screenshot">
79+<img src="../images/screenshot/desktop-lxde.png" alt="screenshot" width="50%">
7380
7481 <h3>Gnome</h3>
75-<img src="../images/screenshot/desktop-gnome.png" alt="screenshot">
82+<img src="../images/screenshot/desktop-gnome.png" alt="screenshot" width="50%">
7683
7784 <h3>Cinnamon</h3>
78-<img src="../images/screenshot/desktop-cinnamon.png" alt="screenshot">
85+<img src="../images/screenshot/desktop-cinnamon.png" alt="screenshot" width="50%">
7986
8087 <h3>i3wm</h3>
81-<img src="../images/screenshot/desktop-i3wm.png" alt="screenshot">
88+<img src="../images/screenshot/desktop-i3wm.png" alt="screenshot" width="50%">
8289
8390 <h2>〈特徴〉</h2>
8491 <ul>
@@ -93,14 +100,6 @@ Alter Linuxの最新の開発状況は<a href="https://github.com/orgs/FascodeNe
93100 <li>archisoをベースとしたフレームワークにより簡単に派生OSを開発できます</li>
94101 </ul>
95102
96-<h2>〈ダウンロード〉</h2>
97-イメージファイルは<a href="https://fascode.net/projects/linux/alter/#downloads">公式サイト</a>からダウンロードできます。
98-<br>
99-<b>私達はリポジトリやイメージファイル配布用のミラーサーバ提供者を募集しております。</b>
100-<br>
101-もし私達にミラーを提供して頂ける場合は開発者のTwitterまでお願いします。
102-
103-
104103 <h2>〈ブランチ〉</h2>
105104 主要なブランチは以下のとおりです。これ以外のブランチは一時的なものや特定の用途で使われているものです。
106105
--- a/modules/gdm/airootfs.any/root/customize_airootfs_gdm.sh
+++ b/modules/gdm/airootfs.any/root/customize_airootfs_gdm.sh
@@ -9,9 +9,10 @@
99
1010 # Enable gdm to auto login
1111 if [[ "${boot_splash}" = true ]]; then
12- systemctl enable gdm-plymouth.service
12+ _safe_systemctl enable gdm-plymouth.service
13+
1314 else
14- systemctl enable gdm.service
15+ _safe_systemctl enable gdm.service
1516 fi
1617
1718
--- /dev/null
+++ b/modules/kmscon/airootfs.any/etc/fonts/conf.d/99-kmscon.conf
@@ -0,0 +1,12 @@
1+<?xml version="1.0"?>
2+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3+<fontconfig>
4+<match>
5+ <test name="family"><string>monospace</string></test>
6+ <edit name="family" mode="prepend" binding="strong">
7+ <string>SauceCodePro Nerd Font Mono</string>
8+ <string>DejaVu Sans Mono</string>
9+ <string>IPAGothic</string>
10+ </edit>
11+</match>
12+</fontconfig>
--- /dev/null
+++ b/modules/kmscon/airootfs.any/root/customize_airootfs_kmscon.sh
@@ -0,0 +1,26 @@
1+#!/usr/bin/env bash
2+#
3+# Yamada Hayao
4+# Twitter: @Hayao0819
5+# Email : hayao@fascode.net
6+#
7+# (c) 2019-2021 Fascode Network.
8+#
9+
10+# Copy config file for getty@.service to kmsconvt@.service
11+if [[ -f "/etc/systemd/system/getty@.service.d/autologin.conf" ]]; then
12+ mkdir -p "/etc/systemd/system/kmsconvt@.service.d/"
13+ cp "/etc/systemd/system/getty@.service.d/autologin.conf" "/etc/systemd/system/kmsconvt@.service.d/autologin.conf"
14+fi
15+
16+# Disable default tty
17+_safe_systemctl disable "getty@tty1.service" "getty@.service"
18+_safe_systemctl enable "kmsconvt@tty1.service"
19+_safe_systemctl enable "kmsconvt@tty2.service"
20+
21+
22+# Do not run setterm
23+remove /etc/profile.d/disable-beep.sh
24+
25+# Run KMSCON for all tty
26+ln -s "/usr/lib/systemd/system/kmsconvt@.service" "/etc/systemd/system/autovt@.service"
--- /dev/null
+++ b/modules/kmscon/alteriso
@@ -0,0 +1 @@
1+alteriso=3.1
--- /dev/null
+++ b/modules/kmscon/architecture
@@ -0,0 +1,10 @@
1+#
2+# Yamada Hayao
3+# Twitter: @Hayao0819
4+# Email : hayao@fascode.net
5+#
6+# (c) 2019-2021 Fascode Network.
7+#
8+# Supported architecture list
9+
10+x86_64
--- /dev/null
+++ b/modules/kmscon/packages.i686/kmscon.x86_64
@@ -0,0 +1,13 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# kmscon packages
11+
12+#-- kmscon --#
13+kmscon
--- /dev/null
+++ b/modules/kmscon/packages.x86_64/kmscon.x86_64
@@ -0,0 +1,13 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# kmscon packages
11+
12+#-- kmscon --#
13+kmscon
--- /dev/null
+++ b/modules/kmscon/packages_aur.i686/kmscon.x86_64
@@ -0,0 +1,13 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# kmscon packages
11+
12+#-- Fonts --#
13+nerd-fonts-source-code-pro
--- /dev/null
+++ b/modules/kmscon/packages_aur.x86_64/kmscon.x86_64
@@ -0,0 +1,13 @@
1+#
2+# Alter Linux package list
3+#
4+# Yamada Hayao
5+# Twitter: @Hayao0819
6+# Email : hayao@fascode.net
7+#
8+# (c) 2019-2021 Fascode Network.
9+#
10+# kmscon packages
11+
12+#-- Fonts --#
13+nerd-fonts-source-code-pro
--- a/modules/pipewire/airootfs.any/root/customize_airootfs_pipewire.sh
+++ b/modules/pipewire/airootfs.any/root/customize_airootfs_pipewire.sh
@@ -1,7 +1,7 @@
11 #!/usr/bin/env bash
22
33 # Pipewire
4-# Do not use _systemd_service because pipewire services are not system but user
4+# Do not use _safe_systemctl because pipewire services are not system but user
55 # Use flag "--user --global"
66 # https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/923
77 for _service in "pipewire.service" "pipewire-pulse.service"; do
--- a/modules/share-extra/airootfs.any/root/customize_airootfs_share-extra.sh
+++ b/modules/share-extra/airootfs.any/root/customize_airootfs_share-extra.sh
@@ -9,23 +9,23 @@
99
1010 # Bluetooth
1111 rfkill unblock all
12-_systemd_service enable bluetooth
12+_safe_systemctl enable bluetooth
1313
1414 # Snap
15-_systemd_service enable snapd.apparmor.service
16-_systemd_service enable apparmor.service
17-_systemd_service enable snapd.socket
18-_systemd_service enable snapd.service
19-_systemd_service enable ufw.service
15+_safe_systemctl enable snapd.apparmor.service
16+_safe_systemctl enable apparmor.service
17+_safe_systemctl enable snapd.socket
18+_safe_systemctl enable snapd.service
19+_safe_systemctl enable ufw.service
2020
2121
2222 # Added autologin group to auto login
23-groupadd autologin
23+_groupadd autologin
2424 usermod -aG autologin ${username}
2525
2626
2727 # ntp
28-_systemd_service enable systemd-timesyncd.service
28+_safe_systemctl enable systemd-timesyncd.service
2929
3030
3131 # Update system datebase
--- a/modules/share-extra/airootfs.i686/etc/pacman.conf
+++ b/modules/share-extra/airootfs.i686/etc/pacman.conf
@@ -37,7 +37,7 @@ Architecture = i686
3737
3838 # Misc options
3939 #UseSyslog
40-#Color
40+Color
4141 #NoProgressBar
4242 CheckSpace
4343 #VerbosePkgLists
--- a/modules/share-extra/airootfs.x86_64/etc/pacman.conf
+++ b/modules/share-extra/airootfs.x86_64/etc/pacman.conf
@@ -37,7 +37,7 @@ Architecture = auto
3737
3838 # Misc options
3939 #UseSyslog
40-#Color
40+Color
4141 #NoProgressBar
4242 CheckSpace
4343 #VerbosePkgLists
--- a/modules/share-extra/packages.i686/disk_management.i686
+++ b/modules/share-extra/packages.i686/disk_management.i686
@@ -9,14 +9,16 @@
99 #
1010 # Disk management
1111
12+#-- GUI --#
13+#baobab
14+#gnome-disk-utility
15+#gparted
1216
13-baobab
17+#-- CLI --#
1418 clonezilla
1519 ddrescue
1620 dmraid
1721 fsarchiver
18-gnome-disk-utility
19-gparted
2022 gptfdisk
2123 hdparm
2224 lvm2
--- a/modules/share-extra/packages.x86_64/disk_management.x86_64
+++ b/modules/share-extra/packages.x86_64/disk_management.x86_64
@@ -9,14 +9,16 @@
99 #
1010 # Disk management
1111
12+#-- GUI --#
13+#baobab
14+#gnome-disk-utility
15+#gparted
1216
13-baobab
17+#-- CLI --#
1418 clonezilla
1519 ddrescue
1620 dmraid
1721 fsarchiver
18-gnome-disk-utility
19-gparted
2022 gptfdisk
2123 hdparm
2224 lvm2
--- a/modules/share/airootfs.any/root/customize_airootfs.sh
+++ b/modules/share/airootfs.any/root/customize_airootfs.sh
@@ -157,19 +157,19 @@ run_additional_command "gtk-update-icon-cache -f /usr/share/icons/hicolor"
157157
158158
159159 # Enable graphical.
160-_systemd_service set-default graphical.target
160+_safe_systemctl set-default graphical.target
161161
162162
163163 # Enable services.
164-_systemd_service enable pacman-init.service
165-_systemd_service enable cups.service
166-_systemd_service enable NetworkManager.service
167-_systemd_service enable alteriso-reflector.service
168-_systemd_service disable reflector.service
164+_safe_systemctl enable pacman-init.service
165+_safe_systemctl enable cups.service
166+_safe_systemctl enable NetworkManager.service
167+_safe_systemctl enable alteriso-reflector.service
168+_safe_systemctl disable reflector.service
169169
170170
171171 # TLP
172172 # See ArchWiki for details.
173-_systemd_service enable tlp.service
174-_systemd_service mask systemd-rfkill.service
175-_systemd_service mask systemd-rfkill.socket
173+_safe_systemctl enable tlp.service
174+_safe_systemctl mask systemd-rfkill.service
175+_safe_systemctl mask systemd-rfkill.socket
--- a/modules/share/airootfs.any/root/functions.sh
+++ b/modules/share/airootfs.any/root/functions.sh
@@ -15,7 +15,7 @@
1515 # Check whether true or false is assigned to the variable.
1616 function check_bool() {
1717 local
18- case $(eval echo '$'${1}) in
18+ case $(eval echo '$'"${1}") in
1919 true | false) : ;;
2020 *) echo "The value ${boot_splash} set is invalid" >&2 ;;
2121 esac
@@ -52,16 +52,16 @@ function installedpkg () {
5252 fi
5353 }
5454
55+# Add group if it does not exist
56+_groupadd(){
57+ cut -d ":" -f 1 < "/etc/group" | grep -qx "${1}" && return 0 || groupadd "${1}"
58+}
59+
5560 # Create a user.
5661 # create_user <username> <password>
5762 function create_user () {
58- local _password
59- local _username
63+ local _username="${1-""}" _password="${2-""}"
6064
61- _username=${1}
62- _password=${2}
63-
64- set +u
6565 if [[ -z "${_username}" ]]; then
6666 echo "User name is not specified." >&2
6767 return 1
@@ -70,32 +70,37 @@ function create_user () {
7070 echo "No password has been specified." >&2
7171 return 1
7272 fi
73- set -u
7473
7574 if ! user_check "${_username}"; then
76- useradd -m -s ${usershell} ${_username}
77- groupadd sudo
78- usermod -U -g ${_username} ${_username}
79- usermod -aG sudo ${_username}
80- usermod -aG storage ${_username}
81- cp -aT /etc/skel/ /home/${_username}/
75+ useradd -m -s "${usershell}" "${_username}"
76+ _groupadd sudo
77+ usermod -U -g "${_username}" "${_username}"
78+ usermod -aG sudo "${_username}"
79+ usermod -aG storage "${_username}"
80+ cp -aT "/etc/skel/" "/home/${_username}/"
8281 fi
83- chmod 700 -R /home/${_username}
84- chown ${_username}:${_username} -R /home/${_username}
85- echo -e "${_password}\n${_password}" | passwd ${_username}
82+ chmod 700 -R "/home/${_username}"
83+ chown "${_username}:${_username}" -R "/home/${_username}"
84+ echo -e "${_password}\n${_password}" | passwd "${_username}"
8685 set -u
8786 }
8887
8988 # systemctl helper
9089 # Execute the subcommand only when the specified unit is available.
91-# Usage: _systemd_service <systemctl subcommand> <service1> <service2> ...
92-_systemd_service(){
90+# Usage: _safe_systemctl <systemctl subcommand> <service1> <service2> ...
91+_safe_systemctl(){
9392 local _service _command="${1}"
9493 shift 1
9594 for _service in "${@}"; do
9695 # https://unix.stackexchange.com/questions/539147/systemctl-check-if-a-unit-service-or-target-exists
9796 if (( "$(systemctl list-unit-files "${_service}" | wc -l)" > 3 )); then
98- systemctl ${_command} "${_service}"
97+ if [[ "${_command}" = "enable" ]]; then
98+ if [[ "$(systemctl is-enabled "${_service}")" = "enabled" ]]; then
99+ systemctl enable "${_service}"
100+ fi
101+ else
102+ systemctl "${_command}" "${_service}"
103+ fi
99104 else
100105 echo "${_service} was not found" >&2
101106 fi
--- a/presets/cli-modules
+++ b/presets/cli-modules
@@ -1,3 +1,4 @@
11 base
22 share
33 zsh-powerline
4+#kmscon
--- a/system/aur.sh
+++ b/system/aur.sh
@@ -90,7 +90,7 @@ if ! pacman -Qq yay 1> /dev/null 2>&1; then
9090
9191 # Install depends
9292 for _pkg in "${yay_depends[@]}"; do
93- if ! pacman -Qq "${_pkg}" | grep -q "${_pkg}"; then
93+ if ! pacman -Qq "${_pkg}" > /dev/null 2>&1 | grep -q "${_pkg}"; then
9494 pacman -S --asdeps --needed "${pacman_args[@]}" "${_pkg}"
9595 remove_list+=("${_pkg}")
9696 fi
--- a/system/pacman-i486.conf
+++ b/system/pacman-i486.conf
@@ -44,7 +44,7 @@ Architecture = i486
4444 #NoProgressBar
4545 CheckSpace
4646 #VerbosePkgLists
47-ParallelDownloads = 5
47+ParallelDownloads = 8
4848
4949 # By default, pacman accepts packages signed by keys that its local keyring
5050 # trusts (see pacman-key and its man page), as well as unsigned packages.
--- a/system/pacman-i686.conf
+++ b/system/pacman-i686.conf
@@ -44,7 +44,7 @@ Architecture = i686
4444 #NoProgressBar
4545 CheckSpace
4646 #VerbosePkgLists
47-ParallelDownloads = 5
47+ParallelDownloads = 8
4848
4949 # By default, pacman accepts packages signed by keys that its local keyring
5050 # trusts (see pacman-key and its man page), as well as unsigned packages.
--- a/system/pacman-x86_64.conf
+++ b/system/pacman-x86_64.conf
@@ -44,7 +44,7 @@ Architecture = auto
4444 #NoProgressBar
4545 CheckSpace
4646 #VerbosePkgLists
47-ParallelDownloads = 5
47+ParallelDownloads = 8
4848
4949 # By default, pacman accepts packages signed by keys that its local keyring
5050 # trusts (see pacman-key and its man page), as well as unsigned packages.
@@ -88,8 +88,8 @@ Server = https://ftp.iij.ad.jp/pub/osdn.jp/storage/g/s/se/serene/repo/$repo/$arc
8888 Server = https://osdn.dl.osdn.net/storage/g/s/se/serene/repo/$repo/$arch
8989 Server = https://fascodenet.github.io/$repo/$arch/
9090
91-[dvzrv]
92-Server = https://pkgbuild.com/~dvzrv/repo/$arch
91+#[dvzrv]
92+#Server = https://pkgbuild.com/~dvzrv/repo/$arch
9393
9494 #[testing]
9595 #Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch
--- a/tools/alteriso-info.sh
+++ b/tools/alteriso-info.sh
@@ -1,6 +1,7 @@
11 #!/usr/bin/env bash
22 script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && cd .. && pwd )"
33 tools_dir="${script_path}/tools"
4+modules=()
45
56 _help() {
67 echo "usage ${0} [options]"
@@ -12,7 +13,8 @@ _help() {
1213 echo " -b | --boot-splash [bool] Set plymouth status (true or false)"
1314 echo " -c | --channel [str] Specify the channel"
1415 echo " -d | --developer [str] Specify the developer"
15- echo " -k | --kernel [srt] Specify the kernel name"
16+ echo " -k | --kernel [str] Specify the kernel name"
17+ echo " -m | --module [str] Specity the module (Separated by \",\")"
1618 echo " -o | --os-name [str] Specify the application name"
1719 echo " -p | --password [str] Specify the user password for livecd"
1820 echo " -u | --username [str] Specify the user name for livecd"
@@ -21,8 +23,8 @@ _help() {
2123 }
2224
2325 # Parse options
24-OPTS="a:b:c:d:k:o:p:u:v:h"
25-OPTL="arch:,boot-splash:,channel:,developer:,kernel:,os-name:,password:,username:,version:,help"
26+OPTS="a:b:c:d:k:m:o:p:u:v:h"
27+OPTL="arch:,boot-splash:,channel:,developer:,kernel:,module:,os-name:,password:,username:,version:,help"
2628 if ! OPT="$(getopt -o "${OPTS}" -l "${OPTL}" -- "${@}")"; then
2729 exit 1
2830 fi
@@ -57,6 +59,10 @@ while true; do
5759 kernel="${2}"
5860 shift 2
5961 ;;
62+ -m | --module)
63+ readarray -t -O "${#modules[@]}" modules < <(echo "${2}" | tr "," "\n")
64+ shift 2
65+ ;;
6066 -o | --os-name)
6167 iso_application="${2}"
6268 shift 2
@@ -85,6 +91,7 @@ while true; do
8591 esac
8692 done
8793
94+# Check values
8895 variable_list=( "arch" "boot_splash" "channel_name" "iso_publisher" "kernel" "iso_application" "password" "username" "iso_version")
8996
9097 error=false
@@ -109,6 +116,7 @@ echo "Live user name : ${username}"
109116 echo "Live user pass : ${password}"
110117 echo "Kernel name : ${kernel}"
111118 echo "Kernel path : ${kernel_filename}"
119+[[ "${#modules[@]}" != 0 ]] && echo "Loaded modules : ${modules[*]}"
112120 if [[ "${boot_splash}" = true ]]; then
113121 echo "Plymouth : Yes"
114122 else
--- a/tools/clean.sh
+++ b/tools/clean.sh
@@ -58,7 +58,8 @@ remove() {
5858 _umount() { if mountpoint -q "${1}"; then umount -lf "${1}"; fi; }
5959
6060 # Unmount chroot dir
61-umount_chroot () { "${tools_dir}/umount.sh" -d "${work_dir}" -m 3 "$([[ "${nocolor}" = true ]] && printf "%s" "--nocolor")"; }
61+#umount_chroot () { "${tools_dir}/umount.sh" -d "${work_dir}" -m 3 "$([[ "${nocolor}" = true ]] && printf "%s" "--nocolor")"; }
62+umount_chroot () { "${tools_dir}/umount.sh" "${work_dir}" -m 3 "$([[ "${nocolor}" = true ]] && printf "%s" "--nocolor")" "$([[ "${debug}" = true ]] && printf "%s" "-d")"; }
6263
6364 # Usage: getclm <number>
6465 # 標準入力から値を受けとり、引数で指定された列を抽出します。
Show on old repository browser