diff --git a/Makefile b/Makefile index e86eef0e6..600de45a2 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,8 @@ ARCH_Pen4 := --arch pen4 FULLBUILD := -d -g -e -r 5 --noconfirm DEBUG_OPTION := --debug --log DEBUG := false -FULL_x86_64 := xfce cinnamon i3 plasma gnome +#FULL_x86_64 := xfce cinnamon i3 plasma gnome +FULL_x86_64 := xfce i3 plasma FULL_i686 := xfce lxde FULL_Pen4 := xfce lxde diff --git a/build.sh b/build.sh index 0d4f84f27..1d88fe7ed 100755 --- a/build.sh +++ b/build.sh @@ -77,6 +77,16 @@ echo_blank(){ yes " " 2> /dev/null | head -n "${1}" | tr -d "\n"; } # cpコマンドのラッパー _cp(){ cp -af --no-preserve=ownership,mode -- "${@}"; } +# gitコマンドのラッパー +# https://stackoverflow.com/questions/71901632/fatal-unsafe-repository-home-repon-is-owned-by-someone-else +# https://qiita.com/megane42/items/5375b54ea3570506e296 +git(){ + command git config --global safe.directory "$script_path" + command git "$@" + command git config --global --unset safe.directory "$script_path" +} + + _usage () { cat "${script_path}/docs/build.sh/help.1" local blank="29" _arch _dirname _type _output _first @@ -370,6 +380,12 @@ prepare_build() { modules=("${_modules[@]}") unset _modules + # Ignore modules + local _m + for _m in "${exclude_modules[@]}"; do + readarray -t modules < <(printf "%s\n" "${modules[@]}" | grep -xv "${_m}") + done + # Check modules module_check(){ msg_debug -n "Checking ${1} module ... " @@ -668,8 +684,8 @@ make_setup_mkinitcpio() { [[ "${boot_splash}" = true ]] && cp "${script_path}/mkinitcpio/mkinitcpio-archiso-plymouth.conf" "${airootfs_dir}/etc/mkinitcpio-archiso.conf" if [[ "${gpg_key}" ]]; then - gpg --export "${gpg_key}" >"${build_dir}/gpgkey" - exec 17<>"${build_dir}/gpgkey" + gpg --export "${gpg_key}" >"${build_dir}/gpgkey" + exec 17<>"${build_dir}/gpgkey" fi _chroot_run mkinitcpio -c "/etc/mkinitcpio-archiso.conf" -k "/boot/${kernel_filename}" -g "/boot/archiso.img" @@ -726,10 +742,10 @@ make_syslinux() { # copy all syslinux config to work dir for _cfg in "${build_dir}/syslinux/"*.cfg; do sed "s|%ARCHISO_LABEL%|${iso_label}|g; - s|%OS_NAME%|${os_name}|g; - s|%KERNEL_FILENAME%|${kernel_filename}|g; - s|%ARCH%|${arch}|g; - s|%INSTALL_DIR%|${install_dir}|g" "${_cfg}" > "${isofs_dir}/syslinux/${_cfg##*/}" + s|%OS_NAME%|${os_name}|g; + s|%KERNEL_FILENAME%|${kernel_filename}|g; + s|%ARCH%|${arch}|g; + s|%INSTALL_DIR%|${install_dir}|g" "${_cfg}" > "${isofs_dir}/syslinux/${_cfg##*/}" done # Replace the SYSLINUX configuration file with or without boot splash. @@ -1149,7 +1165,8 @@ else fi # Set vars -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" +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" preset_dir="${script_path}/presets" +gitrev="$(cd "${script_path}"; git rev-parse --short HEAD)" # Create dir for _dir in build_dir cache_dir airootfs_dir isofs_dir lockfile_dir out_dir; do @@ -1163,7 +1180,7 @@ if [[ -d "${channel_dir}.add" ]]; then channel_name="${1}" channel_dir="${channel_dir}.add" elif [[ "${channel_name}" = "clean" ]]; then - _run_cleansh + _run_cleansh exit 0 fi diff --git 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 index cc343ff7c..435dd7d7c 100644 --- 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 @@ -66,7 +66,7 @@ hinting='slight' app-picker-view=uint32 0 disabled-extensions=['window-list@gnome-shell-extensions.gcampax.github.com', 'windowsNavigator@gnome-shell-extensions.gcampax.github.com', 'screenshot-window-sizer@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', 'launch-new-instance@gnome-shell-extensions.gcampax.github.com', 'auto-move-windows@gnome-shell-extensions.gcampax.github.com', 'apps-menu@gnome-shell-extensions.gcampax.github.com'] enabled-extensions=['appindicatorsupport@rgcjonas.gmail.com', 'arcmenu@arcmenu.com', 'CoverflowAltTab@dmo60.de', 'dash-to-panel@jderose9.github.com', 'ding@rastersoft.com', 'pamac-updates@manjaro.org', 'user-theme@gnome-shell-extensions.gcampax.github.com', 'clipboard-indicator@tudmotu.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com'] -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'] +favorite-apps=['chromium.desktop', 'org.gnome.Nautilus.desktop', 'thunderbird.desktop', 'libreoffice-startcenter.desktop', 'vlc.desktop', 'org.gnome.Screenshot.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Extensions.desktop', 'gnome-control-center.desktop'] [org/gnome/shell/extensions/arcmenu] 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']] @@ -89,7 +89,7 @@ menu-hotkey='Super_L' menu-layout='Windows' menu-width=290 multi-monitor=true -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'] +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'] prefs-visible-page=0 right-panel-width=205 searchbar-default-bottom-location='Bottom' diff --git a/channels/gnome/packages.i686/exclude b/channels/gnome/packages.i686/exclude index 3400aad36..22b7dbe5a 100644 --- a/channels/gnome/packages.i686/exclude +++ b/channels/gnome/packages.i686/exclude @@ -1,3 +1 @@ xf86-input-synaptics -alterlinux-medit-themes -medit diff --git a/channels/gnome/packages.pen4/exclude b/channels/gnome/packages.pen4/exclude index 3400aad36..22b7dbe5a 100644 --- a/channels/gnome/packages.pen4/exclude +++ b/channels/gnome/packages.pen4/exclude @@ -1,3 +1 @@ xf86-input-synaptics -alterlinux-medit-themes -medit diff --git a/channels/gnome/packages.x86_64/exclude b/channels/gnome/packages.x86_64/exclude index 3400aad36..21189e01c 100644 --- a/channels/gnome/packages.x86_64/exclude +++ b/channels/gnome/packages.x86_64/exclude @@ -1,3 +1,2 @@ xf86-input-synaptics -alterlinux-medit-themes -medit + diff --git a/channels/i3/airootfs.any/root/customize_airootfs_i3.sh b/channels/i3/airootfs.any/root/customize_airootfs_i3.sh index 5ae915953..3c6ad578e 100755 --- a/channels/i3/airootfs.any/root/customize_airootfs_i3.sh +++ b/channels/i3/airootfs.any/root/customize_airootfs_i3.sh @@ -42,6 +42,8 @@ for _dir in "/etc/skel/" "/home/${username}/"; do done done +chmod 755 "/usr/bin/alter-system-menu" + # disable light-locker on live sed -i "/light/s/^/# /g" "/home/${username}/.config/i3/config" diff --git a/channels/i3/packages.i686/i3.i686 b/channels/i3/packages.i686/i3.i686 index e13378d35..ac194fc1f 100644 --- a/channels/i3/packages.i686/i3.i686 +++ b/channels/i3/packages.i686/i3.i686 @@ -21,9 +21,6 @@ conky # launcher rofi -# terminal emulator -sakura - # theme manager alterlinux-i3-manager diff --git a/channels/i3/packages.x86_64/i3.x86_64 b/channels/i3/packages.x86_64/i3.x86_64 index e13378d35..ac194fc1f 100644 --- a/channels/i3/packages.x86_64/i3.x86_64 +++ b/channels/i3/packages.x86_64/i3.x86_64 @@ -21,9 +21,6 @@ conky # launcher rofi -# terminal emulator -sakura - # theme manager alterlinux-i3-manager diff --git a/channels/i3/packages_aur.i686/i3.i686 b/channels/i3/packages_aur.i686/i3.i686 index 83cef71d4..f35238e98 100644 --- a/channels/i3/packages_aur.i686/i3.i686 +++ b/channels/i3/packages_aur.i686/i3.i686 @@ -11,3 +11,6 @@ # i3wm polybar + +# terminal emulator +sakura diff --git a/channels/i3/packages_aur.x86_64/i3.x86_64 b/channels/i3/packages_aur.x86_64/i3.x86_64 index 83cef71d4..f35238e98 100644 --- a/channels/i3/packages_aur.x86_64/i3.x86_64 +++ b/channels/i3/packages_aur.x86_64/i3.x86_64 @@ -11,3 +11,6 @@ # i3wm polybar + +# terminal emulator +sakura diff --git a/channels/releng/airootfs.any/etc/systemd/system/getty@tty1.service.d/autologin.conf b/channels/releng/airootfs.any/etc/systemd/system/getty@tty1.service.d/autologin.conf index d1d8474c3..b9d22eb85 100644 --- a/channels/releng/airootfs.any/etc/systemd/system/getty@tty1.service.d/autologin.conf +++ b/channels/releng/airootfs.any/etc/systemd/system/getty@tty1.service.d/autologin.conf @@ -1,3 +1,3 @@ [Service] ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux +ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root - $TERM diff --git a/channels/releng/airootfs.any/etc/systemd/system/pacman-init.service b/channels/releng/airootfs.any/etc/systemd/system/pacman-init.service deleted file mode 100644 index e110380c0..000000000 --- a/channels/releng/airootfs.any/etc/systemd/system/pacman-init.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Initializes Pacman keyring -#Wants=haveged.service -#After=haveged.service -Requires=etc-pacman.d-gnupg.mount -After=etc-pacman.d-gnupg.mount - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/pacman-key --init -ExecStart=/usr/bin/pacman-key --populate archlinux - -[Install] -WantedBy=multi-user.target diff --git a/channels/releng/airootfs.any/root/customize_airootfs.sh b/channels/releng/airootfs.any/root/customize_airootfs.sh index f75d92600..45b13876b 100755 --- a/channels/releng/airootfs.any/root/customize_airootfs.sh +++ b/channels/releng/airootfs.any/root/customize_airootfs.sh @@ -81,6 +81,10 @@ cp -aT /etc/skel/ /root/ sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist +if [[ -e "/root/.automated_script.sh" ]]; then + chmod 755 "/root/.automated_script.sh" +fi + # Enable services. systemctl enable NetworkManager systemctl enable pacman-init.service diff --git a/channels/releng/alteriso b/channels/releng/alteriso index 867cb0f90..9e793f364 100644 --- a/channels/releng/alteriso +++ b/channels/releng/alteriso @@ -1 +1 @@ -alteriso=3.0 +alteriso=3.1 diff --git a/channels/releng/config.any b/channels/releng/config.any index e6e1a8926..8d19bdcbe 100644 --- a/channels/releng/config.any +++ b/channels/releng/config.any @@ -76,23 +76,12 @@ nochname=true # List of packages required for build # The following packages are checked to see if they are installed before running build.sh # Also, wizard.sh will install it automatically. -dependence=( -# "alterlinux-keyring" -# "archiso" - "arch-install-scripts" - "curl" - "dosfstools" - "edk2-shell" - "git" - "libburn" - "libisofs" - "lz4" - "lzo" - "make" - "squashfs-tools" - "libisoburn" - # "lynx" - "xz" - "zlib" - "zstd" +readarray -t dependence < <(printf "%s\n" "${dependence[@]}" | grep -xv "alterlinux-keyring") + +# Modules to include +# An array of module directory names to include. +# This setting cannot be changed by an argument. +modules=( + base + share ) diff --git a/channels/releng/pacman-i686.conf b/channels/releng/pacman-i686.conf index 38e4d7a10..fb4645b79 100644 --- a/channels/releng/pacman-i686.conf +++ b/channels/releng/pacman-i686.conf @@ -19,7 +19,7 @@ HoldPkg = pacman glibc #XferCommand = /usr/bin/curl -L -C - -f -o %o %u #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled -Architecture = i486 +Architecture = i686 # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup #IgnorePkg = diff --git a/channels/releng/pacman-x86_64.conf b/channels/releng/pacman-x86_64.conf index 3e9608ec0..0aaa0237f 100644 --- a/channels/releng/pacman-x86_64.conf +++ b/channels/releng/pacman-x86_64.conf @@ -19,7 +19,7 @@ HoldPkg = pacman glibc #XferCommand = /usr/bin/curl -L -C - -f -o %o %u #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled -Architecture = i486 +Architecture = x86_64 # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup #IgnorePkg = @@ -70,70 +70,56 @@ LocalFileSigLevel = Optional # after the header, and they will be used before the default mirrors. #[testing] -#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -#Server = http://mirror.archlinux.jp/$repo/os/$arch -#Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch #Server = http://mirrors.cat.net/archlinux/$repo/os/$arch #Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -#Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +#Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch [core] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch -Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch - -[extra] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch + +[extra] Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch #[community-testing] -#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -#Server = http://mirror.archlinux.jp/$repo/os/$arch -#Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch #Server = http://mirrors.cat.net/archlinux/$repo/os/$arch #Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -#Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +#Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch [community] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch -Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch # If you want to run 32 bit applications on your x86_64 system, # enable the multilib repositories as required here. #[multilib-testing] -#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -#Server = http://mirror.archlinux.jp/$repo/os/$arch -#Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch #Server = http://mirrors.cat.net/archlinux/$repo/os/$arch #Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -#Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +##Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch [multilib] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch -Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch # This is Yamada Hayao's personal repository. # It was used early but is now disabled. diff --git a/channels/serene/airootfs.any/etc/skel/.config/mimeapps.list b/channels/serene/airootfs.any/etc/skel/.config/mimeapps.list deleted file mode 100644 index 744366084..000000000 --- a/channels/serene/airootfs.any/etc/skel/.config/mimeapps.list +++ /dev/null @@ -1,64 +0,0 @@ -[Added Associations] -x-scheme-handler/http=exo-web-browser.desktop -x-scheme-handler/https=exo-web-browser.desktop -image/png=viewnior.desktop;gpicview.desktop; -application/vnd.debian.binary-package=gdebi.desktop; -application/x-desktop=medit.desktop; -application/xml=medit.desktop; -text/x-scheme=medit.desktop; -text/plain=medit.desktop;libreoffice-calc.desktop;libreoffice-writer.desktop;libreoffice-impress.desktop; -text/x-readme=medit.desktop; -text/html=chromium-browser.desktop;firefox.desktop; -application/x-cd-image=mount-archive.desktop; -application/x-shellscript=medit.desktop; -text/x-matlab=medit.desktop; -image/bmp=viewnior.desktop; -image/gif=viewnior.desktop; -image/jpeg=viewnior.desktop; -image/svg+xml=viewnior.desktop; -image/tiff=viewnior.desktop; -image/vnd.zbrush.pcx=viewnior.desktop; -image/x-adobe-dng=gimp.desktop;viewnior.desktop; -image/x-canon-cr2=gimp.desktop;viewnior.desktop; -image/x-kodak-dcr=gimp.desktop;viewnior.desktop; -image/x-kodak-k25=gimp.desktop;viewnior.desktop; -image/x-kodak-kdc=gimp.desktop;viewnior.desktop; -image/x-nikon-nef=gimp.desktop;viewnior.desktop; -image/x-pentax-pef=gimp.desktop;viewnior.desktop; -image/x-portable-anymap=viewnior.desktop; -image/x-portable-bitmap=viewnior.desktop; -image/x-portable-graymap=viewnior.desktop; -image/x-portable-pixmap=viewnior.desktop; -image/x-sony-arw=gimp.desktop;viewnior.desktop; -image/x-sony-sr2=gimp.desktop;viewnior.desktop; -image/x-sony-srf=gimp.desktop;viewnior.desktop; -image/x-tiff-multipage=gimp.desktop;viewnior.desktop; -image/x-xbitmap=viewnior.desktop; -image/x-xpixmap=viewnior.desktop; - -[Default Applications] -image/png=viewnior.desktop -text/plain=medit.desktop -image/bmp=viewnior.desktop -image/gif=viewnior.desktop -image/jpeg=viewnior.desktop -image/svg+xml=viewnior.desktop -image/tiff=viewnior.desktop -image/vnd.zbrush.pcx=viewnior.desktop -image/x-adobe-dng=viewnior.desktop -image/x-canon-cr2=viewnior.desktop -image/x-kodak-dcr=viewnior.desktop -image/x-kodak-k25=viewnior.desktop -image/x-kodak-kdc=viewnior.desktop -image/x-nikon-nef=viewnior.desktop -image/x-pentax-pef=viewnior.desktop -image/x-portable-anymap=viewnior.desktop -image/x-portable-bitmap=viewnior.desktop -image/x-portable-graymap=viewnior.desktop -image/x-portable-pixmap=viewnior.desktop -image/x-sony-arw=viewnior.desktop -image/x-sony-sr2=viewnior.desktop -image/x-sony-srf=viewnior.desktop -image/x-tiff-multipage=viewnior.desktop -image/x-xbitmap=viewnior.desktop -image/x-xpixmap=viewnior.desktop diff --git a/channels/serene/airootfs.any/etc/skel/.config/xfce4/panel/launcher-24/15578330976.desktop b/channels/serene/airootfs.any/etc/skel/.config/xfce4/panel/launcher-24/15578330976.desktop deleted file mode 100644 index 81505eb72..000000000 --- a/channels/serene/airootfs.any/etc/skel/.config/xfce4/panel/launcher-24/15578330976.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=medit -Comment=Text editor -Exec=medit %F -Terminal=false -Type=Application -StartupNotify=true -MimeType=text/plain; -Icon=medit -Categories=Utility;TextEditor; -Keywords=editor;texteditor;text -X-XFCE-Source=file:///usr/share/applications/medit.desktop diff --git a/channels/serene/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc b/channels/serene/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc index 2d6715e37..c72dab0ee 100644 --- a/channels/serene/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc +++ b/channels/serene/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc @@ -1,2 +1,2 @@ [user] -pinned=/usr/share/applications/firefox.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/medit.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; +pinned=/usr/share/applications/firefox.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; diff --git a/channels/xfce-pro/airootfs.any/etc/dconf/db/local.d/01-guake-terminal b/channels/xfce-pro/airootfs.any/etc/dconf/db/local.d/01-guake-terminal index c6abc6cbe..0070d40f2 100644 --- a/channels/xfce-pro/airootfs.any/etc/dconf/db/local.d/01-guake-terminal +++ b/channels/xfce-pro/airootfs.any/etc/dconf/db/local.d/01-guake-terminal @@ -12,7 +12,6 @@ max-tab-name-length=100 mouse-display=false open-tab-cwd=true prompt-on-quit=true -quick-open-command-line='medit -t %(file_path)s' quick-open-enable=true restore-tabs-notify=true restore-tabs-startup=false diff --git a/channels/xfce-pro/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc b/channels/xfce-pro/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc index cae5c563b..f895c2193 100644 --- a/channels/xfce-pro/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc +++ b/channels/xfce-pro/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc @@ -1,5 +1,5 @@ [user] -pinned=/usr/share/applications/chromium.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/medit.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; +pinned=/usr/share/applications/chromium.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; indicatorStyle=1 forceIconSize=false iconSize=32 diff --git a/channels/xfce/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc b/channels/xfce/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc index 86a82ed50..4623e0e31 100644 --- a/channels/xfce/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc +++ b/channels/xfce/airootfs.any/etc/skel/.config/xfce4/panel/docklike-2.rc @@ -1,5 +1,5 @@ [user] -pinned=/usr/share/applications/chromium.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/medit.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; +pinned=/usr/share/applications/chromium.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; indicatorStyle=1 forceIconSize=false iconSize=32 diff --git a/channels/xfce/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc b/channels/xfce/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc index 4a4aeb7b9..dfd77c030 100644 --- a/channels/xfce/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc +++ b/channels/xfce/airootfs.i686/etc/skel/.config/xfce4/panel/docklike-2.rc @@ -1,5 +1,5 @@ [user] -pinned=/usr/share/applications/firefox.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/medit.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; +pinned=/usr/share/applications/firefox.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; indicatorStyle=1 forceIconSize=false iconSize=32 diff --git a/channels/xfce/airootfs.pen4/etc/skel/.config/xfce4/panel/docklike-2.rc b/channels/xfce/airootfs.pen4/etc/skel/.config/xfce4/panel/docklike-2.rc index 4a4aeb7b9..dfd77c030 100644 --- a/channels/xfce/airootfs.pen4/etc/skel/.config/xfce4/panel/docklike-2.rc +++ b/channels/xfce/airootfs.pen4/etc/skel/.config/xfce4/panel/docklike-2.rc @@ -1,5 +1,5 @@ [user] -pinned=/usr/share/applications/firefox.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/medit.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; +pinned=/usr/share/applications/firefox.desktop;/usr/share/applications/thunar.desktop;/usr/share/applications/thunderbird.desktop;/usr/share/applications/vlc.desktop;/usr/share/applications/xfce4-screenshooter.desktop;/usr/share/applications/xfce4-terminal.desktop;/usr/share/applications/xfce-settings-manager.desktop; indicatorStyle=1 forceIconSize=false iconSize=32 diff --git a/default.conf b/default.conf index c291eed2f..c8aa79694 100644 --- a/default.conf +++ b/default.conf @@ -306,6 +306,10 @@ additional_exclude_pkg=() # This array is not available in the configuration files in the channel. additional_modules=() + +# Module list +exclude_modules=() + # Run with tee command # Set to "false" to disable logging # If not false, the log will be saved in the specified path. diff --git a/modules/base/config.i686 b/modules/base/config.i686 index 671a98f54..de4e0cb45 100644 --- a/modules/base/config.i686 +++ b/modules/base/config.i686 @@ -9,66 +9,81 @@ # Config files for all i686 channel # +# この設定ファイルだけで使える変数 +UNSETVAR=false +if [[ -z "${AURHELPER-""}" ]]; then + AURHELPER="paru" + UNSETVAR=true +fi -#-- Use trizen --# -#aur_helper_command="trizen" -#aur_helper_package="trizen" -#aur_helper_depends=( -# 'git' -# 'pacutils' -# 'perl' -# 'perl-libwww' -# 'perl-term-ui' -# 'pacman' -# 'perl-json' -# 'perl-data-dump' -# 'perl-lwp-protocol-https' -# 'perl-term-readline-gnu' -# 'highlight' -#) -#aur_helper_args=( -# #--mflags "-AcC,--skippgpcheck" -# --aur -# --noedit -#) +case "$AURHELPER" in + "trizen") + #-- Use trizen --# + aur_helper_command="trizen" + aur_helper_package="trizen" + aur_helper_depends=( + 'git' + 'pacutils' + 'perl' + 'perl-libwww' + 'perl-term-ui' + 'pacman' + 'perl-json' + 'perl-data-dump' + 'perl-lwp-protocol-https' + 'perl-term-readline-gnu' + 'highlight' + ) + aur_helper_args=( + #--mflags "-AcC,--skippgpcheck" + --aur + --noedit + ) + ;; + "wfa") + #-- Use wfa --# + aur_helper_package="wfa-git" + aur_helper_command="wfa" + aur_helper_depends=('sudo' 'pacman' 'jq' 'python3' 'curl' 'pyalpm' 'python-srcinfo') + aur_helper_args=( + --mflags "-AcC" + --mflags "--skippgpcheck" + --aur + ) + ;; + "paru") + #-- Use paru --# + aur_helper_package="paru" + aur_helper_command="paru" + aur_helper_depends=("cargo" "asp" "bat") + aur_helper_args=( + --useask + --mflags "-AcC" + --mflags "--skippgpcheck" + --aur + --skipreview + --noupgrademenu + --removemake + ) + ;; + "pikaur") + #-- Use pikaur --# + aur_helper_package="pikaur" + aur_helper_command="pikaur" + aur_helper_depends=('pyalpm' 'git' 'python-commonmark') + aur_helper_args=( + "--aur" + "--noedit" + "--rebuild" + "--pikaur-debug" + ) + ;; + *) + echo "module/base/config.i686: Unknown AUR Helper name \"$AURHELPER\"" >&2 + exit 1 + ;; +esac +msg_debug "Use AUR helper $AURHELPER" >&2 -#-- Use wfa --# -#aur_helper_package="wfa-git" -#aur_helper_command="wfa" -#aur_helper_depends=('sudo' 'pacman' 'jq' 'python3' 'curl' 'pyalpm' 'python-srcinfo') -#aur_helper_args=( -# --mflags "-AcC" -# --mflags "--skippgpcheck" -# --aur -#) - -#-- Use pikaur --# -#aur_helper_package="pikaur" -#aur_helper_command="pikaur" -#aur_helper_depends=("pyalpm" "asp" "python-commonmark") -#aur_helper_args=( -# --aur -# --noedit -# --noconfirm -# --nodiff -# --rebuild -# --mflags="-AcC,--skippgpcheck" -#) - -#-- Use paru --# -aur_helper_package="paru" -aur_helper_command="paru" -aur_helper_depends=("cargo" "asp" "bat") -aur_helper_args=( - --useask - --mflags "-AcC" - --mflags "--skippgpcheck" - --aur -# --nocleanmenu -# --nodiffmenu - --skipreview -# --noeditmenu - --noupgrademenu - --removemake -) +[[ "$UNSETVAR" = false ]] || unset AURHELPER diff --git a/modules/base/packages.i486/init.i486 b/modules/base/packages.i486/init.i486 index 347114578..26ff8ca51 100644 --- a/modules/base/packages.i486/init.i486 +++ b/modules/base/packages.i486/init.i486 @@ -11,3 +11,4 @@ base syslinux +pv diff --git a/modules/base/packages.i686/init.i686 b/modules/base/packages.i686/init.i686 index 347114578..26ff8ca51 100644 --- a/modules/base/packages.i686/init.i686 +++ b/modules/base/packages.i686/init.i686 @@ -11,3 +11,4 @@ base syslinux +pv diff --git a/modules/base/packages.pen4/init.pen4 b/modules/base/packages.pen4/init.pen4 index 347114578..26ff8ca51 100644 --- a/modules/base/packages.pen4/init.pen4 +++ b/modules/base/packages.pen4/init.pen4 @@ -11,3 +11,4 @@ base syslinux +pv diff --git a/modules/base/packages.x86_64/init.x86_64 b/modules/base/packages.x86_64/init.x86_64 index 347114578..26ff8ca51 100644 --- a/modules/base/packages.x86_64/init.x86_64 +++ b/modules/base/packages.x86_64/init.x86_64 @@ -11,3 +11,4 @@ base syslinux +pv diff --git a/modules/share-extra/packages_aur.i686/medit.i686 b/modules/medit/packages_aur.i686/medit.i686 similarity index 100% rename from modules/share-extra/packages_aur.i686/medit.i686 rename to modules/medit/packages_aur.i686/medit.i686 diff --git a/modules/share-extra/packages_aur.pen4/medit.pen4 b/modules/medit/packages_aur.pen4/medit.pen4 similarity index 100% rename from modules/share-extra/packages_aur.pen4/medit.pen4 rename to modules/medit/packages_aur.pen4/medit.pen4 diff --git a/modules/share-extra/packages_aur.x86_64/medit.x86_64 b/modules/medit/packages_aur.x86_64/medit.x86_64 similarity index 100% rename from modules/share-extra/packages_aur.x86_64/medit.x86_64 rename to modules/medit/packages_aur.x86_64/medit.x86_64 diff --git a/modules/share/airootfs.any/etc/systemd/system/getty@.service.d/autologin.conf b/modules/share/airootfs.any/etc/systemd/system/getty@.service.d/autologin.conf index 61229384f..f3d76be54 100644 --- a/modules/share/airootfs.any/etc/systemd/system/getty@.service.d/autologin.conf +++ b/modules/share/airootfs.any/etc/systemd/system/getty@.service.d/autologin.conf @@ -1,3 +1,3 @@ [Service] ExecStart= -ExecStart=-/sbin/agetty --autologin %USERNAME% --noclear %I 38400 linux +ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin %USERNAME% - $TERM diff --git a/modules/share/airootfs.any/etc/systemd/system/pacman-init.service b/modules/share/airootfs.any/etc/systemd/system/pacman-init.service index daab1de57..f35e7cc8e 100644 --- a/modules/share/airootfs.any/etc/systemd/system/pacman-init.service +++ b/modules/share/airootfs.any/etc/systemd/system/pacman-init.service @@ -9,8 +9,7 @@ After=etc-pacman.d-gnupg.mount Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/pacman-key --init -ExecStart=/usr/bin/pacman-key --populate archlinux -ExecStart=/usr/bin/pacman-key --populate alterlinux +ExecStart=/usr/bin/pacman-key --populate [Install] WantedBy=multi-user.target diff --git a/modules/share/airootfs.any/etc/systemd/system/reflector.service b/modules/share/airootfs.any/etc/systemd/system/reflector.service index c860e0311..f74f62d91 100644 --- a/modules/share/airootfs.any/etc/systemd/system/reflector.service +++ b/modules/share/airootfs.any/etc/systemd/system/reflector.service @@ -3,4 +3,4 @@ Description=Pacman mirrorlist update [Service] Type=oneshot -ExecStart=/usr/bin/reflector --protocol https --latest 30 --number 20 --sort rate --save /etc/pacman.d/mirrorlist +ExecStart=/usr/bin/reflector --protocol https --latest 20 --number 20 --sort rate --save /etc/pacman.d/mirrorlist diff --git a/modules/share/airootfs.any/root/.automated_script.sh b/modules/share/airootfs.any/root/.automated_script.sh index 332d9449a..52c47e6a0 100755 --- a/modules/share/airootfs.any/root/.automated_script.sh +++ b/modules/share/airootfs.any/root/.automated_script.sh @@ -1,11 +1,4 @@ #!/usr/bin/env bash -# -# Yamada Hayao -# Twitter: @Hayao0819 -# Email : hayao@fascode.net -# -# (c) 2019-2021 Fascode Network. -# script_cmdline () { @@ -23,7 +16,7 @@ automated_script () script="$(script_cmdline)" if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then - curl "${script}" --retry-connrefused -s -o /tmp/startup_script >/dev/null + curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script >/dev/null rt=$? else cp "${script}" /tmp/startup_script @@ -36,6 +29,6 @@ automated_script () fi } -if [[ "$(tty)" = "/dev/tty1" ]]; then +if [[ $(tty) == "/dev/tty1" ]]; then automated_script fi diff --git a/modules/share/packages.i486/hardware.i486 b/modules/share/packages.i486/hardware.i486 index 2aee136c2..771ce98e2 100644 --- a/modules/share/packages.i486/hardware.i486 +++ b/modules/share/packages.i486/hardware.i486 @@ -15,7 +15,7 @@ b43-fwcutter ipw2100-fw ipw2200-fw - +sof-firmware #-- interface support --# lsscsi diff --git a/modules/share/packages.i486/other.i486 b/modules/share/packages.i486/other.i486 index 79550d019..f686bb9d2 100644 --- a/modules/share/packages.i486/other.i486 +++ b/modules/share/packages.i486/other.i486 @@ -28,6 +28,7 @@ xdg-user-dirs #-- linux --# linux-atm linux-firmware +linux-firmware-marvell #-- man --# diff --git a/modules/share/packages.i686/hardware.i686 b/modules/share/packages.i686/hardware.i686 index 2aee136c2..771ce98e2 100644 --- a/modules/share/packages.i686/hardware.i686 +++ b/modules/share/packages.i686/hardware.i686 @@ -15,7 +15,7 @@ b43-fwcutter ipw2100-fw ipw2200-fw - +sof-firmware #-- interface support --# lsscsi diff --git a/modules/share/packages.i686/other.i686 b/modules/share/packages.i686/other.i686 index 15fee952d..14b79776f 100644 --- a/modules/share/packages.i686/other.i686 +++ b/modules/share/packages.i686/other.i686 @@ -29,6 +29,7 @@ xdg-user-dirs #-- linux --# linux-atm linux-firmware +linux-firmware-marvell #-- man --# diff --git a/modules/share/packages.pen4/hardware.pen4 b/modules/share/packages.pen4/hardware.pen4 index 2aee136c2..771ce98e2 100644 --- a/modules/share/packages.pen4/hardware.pen4 +++ b/modules/share/packages.pen4/hardware.pen4 @@ -15,7 +15,7 @@ b43-fwcutter ipw2100-fw ipw2200-fw - +sof-firmware #-- interface support --# lsscsi diff --git a/modules/share/packages.pen4/other.pen4 b/modules/share/packages.pen4/other.pen4 index 15fee952d..14b79776f 100644 --- a/modules/share/packages.pen4/other.pen4 +++ b/modules/share/packages.pen4/other.pen4 @@ -29,6 +29,7 @@ xdg-user-dirs #-- linux --# linux-atm linux-firmware +linux-firmware-marvell #-- man --# diff --git a/modules/share/packages.x86_64/hardware.x86_64 b/modules/share/packages.x86_64/hardware.x86_64 index 2aee136c2..771ce98e2 100644 --- a/modules/share/packages.x86_64/hardware.x86_64 +++ b/modules/share/packages.x86_64/hardware.x86_64 @@ -15,7 +15,7 @@ b43-fwcutter ipw2100-fw ipw2200-fw - +sof-firmware #-- interface support --# lsscsi diff --git a/modules/share/packages.x86_64/other.x86_64 b/modules/share/packages.x86_64/other.x86_64 index 15fee952d..14b79776f 100644 --- a/modules/share/packages.x86_64/other.x86_64 +++ b/modules/share/packages.x86_64/other.x86_64 @@ -29,6 +29,7 @@ xdg-user-dirs #-- linux --# linux-atm linux-firmware +linux-firmware-marvell #-- man --# diff --git a/syslinux/archiso_head.cfg b/syslinux/archiso_head.cfg index 9e8b6266c..a9444a471 100644 --- a/syslinux/archiso_head.cfg +++ b/syslinux/archiso_head.cfg @@ -5,7 +5,7 @@ # (c) 2019-2021 Fascode Network. # -SERIAL 0 38400 +SERIAL 0 115200 UI syslinux/vesamenu.c32 MENU TITLE %OS_NAME% MENU BACKGROUND syslinux/splash.png @@ -31,4 +31,4 @@ MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std MENU COLOR msg07 37;40 #90ffffff #a0000000 std MENU COLOR tabmsg 31;40 #30ffffff #00000000 std -MENU CLEAR \ No newline at end of file +MENU CLEAR diff --git a/system/aur.sh b/system/aur.sh index f1aa6747b..91c7ed142 100755 --- a/system/aur.sh +++ b/system/aur.sh @@ -71,70 +71,11 @@ remove() { } # user_check -function user_check () { +user_check () { if [[ ! -v 1 ]]; then return 2; fi getent passwd "${1}" > /dev/null } -# Creating a aur user. -if ! user_check "${aur_username}"; then - useradd -m -d "/aurbuild_temp" "${aur_username}" -fi -mkdir -p "/aurbuild_temp" -chmod 700 -R "/aurbuild_temp" -chown "${aur_username}:${aur_username}" -R "/aurbuild_temp" -echo "${aur_username} ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/aurbuild" - -# Setup keyring -pacman-key --init -pacman-key --populate - -# Un comment the mirror list. -#sed -i "s/#Server/Server/g" "/etc/pacman.d/mirrorlist" - -# Set pacman args -pacman_args=("--config" "/etc/alteriso-pacman.conf" "--noconfirm") -if [[ "${pacman_debug}" = true ]]; then - pacman_args+=("--debug") -fi - -# Install -if ! pacman -Qq "${aur_helper_package}" 1> /dev/null 2>&1; then - _oldpwd="$(pwd)" - - # Install depends - for _pkg in "${aur_helper_depends[@]}"; do - if ! pacman -Qq "${_pkg}" > /dev/null 2>&1 | grep -q "${_pkg}"; then - # --asdepsをつけているのでaur.shで削除される --neededをつけているので明示的にインストールされている場合削除されない - pacman -S --asdeps --needed "${pacman_args[@]}" "${_pkg}" - #remove_list+=("${_pkg}") - fi - done - - # Build - sudo -u "${aur_username}" git clone "https://aur.archlinux.org/${aur_helper_package}.git" "/tmp/${aur_helper_package}" - cd "/tmp/${aur_helper_package}" - sudo -u "${aur_username}" makepkg --ignorearch --clean --cleanbuild --force --skippgpcheck --noconfirm --syncdeps - - # Install - for _pkg in $(cd "/tmp/${aur_helper_package}"; sudo -u "${aur_username}" makepkg --packagelist); do - pacman "${pacman_args[@]}" -U "${_pkg}" - done - - # Remove debtis - cd .. - remove "/tmp/${aur_helper_package}" - cd "${_oldpwd}" -fi - -if ! type -p "${aur_helper_command}" > /dev/null; then - echo "Failed to install ${aur_helper_package}" - exit 1 -fi - -# Update database -pacman -Syy "${pacman_args[@]}" - installpkg(){ yes | sudo -u "${aur_username}" \ "${aur_helper_command}" -S \ @@ -146,37 +87,113 @@ installpkg(){ } -# Build and install -chmod +s /usr/bin/sudo -for _pkg in "${@}"; do - pacman -Qq "${_pkg}" > /dev/null 2>&1 && continue - installpkg "${_pkg}" +#-- main funtions --# +prepare_env(){ + # Creating a aur user. + if ! user_check "${aur_username}"; then + useradd -m -d "/aurbuild_temp" "${aur_username}" + fi + mkdir -p "/aurbuild_temp" + chmod 700 -R "/aurbuild_temp" + chown "${aur_username}:${aur_username}" -R "/aurbuild_temp" + echo "${aur_username} ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/aurbuild" + + # Setup keyring + pacman-key --init + pacman-key --populate + + # Un comment the mirror list. + #sed -i "s/#Server/Server/g" "/etc/pacman.d/mirrorlist" + - if ! pacman -Qq "${_pkg}" > /dev/null 2>&1; then - echo -e "\n[aur.sh] Failed to install ${_pkg}\n" - failedpkg+=("${_pkg}") + # Set pacman args + pacman_args=("--config" "/etc/alteriso-pacman.conf" "--noconfirm") + if [[ "${pacman_debug}" = true ]]; then + pacman_args+=("--debug") fi -done +} -# Reinstall failed package -for _pkg in "${failedpkg[@]}"; do - installpkg "${_pkg}" - if ! pacman -Qq "${_pkg}" > /dev/null 2>&1; then - echo -e "\n[aur.sh] Failed to install ${_pkg}\n" +install_aur_helper(){ + # Install + if ! pacman -Qq "${aur_helper_package}" 1> /dev/null 2>&1; then + _oldpwd="$(pwd)" + + # Install depends + for _pkg in "${aur_helper_depends[@]}"; do + if ! pacman -Qq "${_pkg}" > /dev/null 2>&1 | grep -q "${_pkg}"; then + # --asdepsをつけているのでaur.shで削除される --neededをつけているので明示的にインストールされている場合削除されない + pacman -S --asdeps --needed "${pacman_args[@]}" "${_pkg}" + #remove_list+=("${_pkg}") + fi + done + + # Build + sudo -u "${aur_username}" git clone "https://aur.archlinux.org/${aur_helper_package}.git" "/tmp/${aur_helper_package}" + cd "/tmp/${aur_helper_package}" + sudo -u "${aur_username}" makepkg --ignorearch --clean --cleanbuild --force --skippgpcheck --noconfirm --syncdeps + + # Install + for _pkg in $(cd "/tmp/${aur_helper_package}"; sudo -u "${aur_username}" makepkg --packagelist); do + pacman "${pacman_args[@]}" -U "${_pkg}" + done + + # Remove debtis + cd .. + remove "/tmp/${aur_helper_package}" + cd "${_oldpwd}" + fi + + if ! type -p "${aur_helper_command}" > /dev/null; then + echo "Failed to install ${aur_helper_package}" exit 1 fi -done +} + +install_aur_pkgs(){ + # Update database + pacman -Syy "${pacman_args[@]}" + + # Build and install + chmod +s /usr/bin/sudo + for _pkg in "${@}"; do + pacman -Qq "${_pkg}" > /dev/null 2>&1 && continue + installpkg "${_pkg}" + + if ! pacman -Qq "${_pkg}" > /dev/null 2>&1; then + echo -e "\n[aur.sh] Failed to install ${_pkg}\n" + failedpkg+=("${_pkg}") + fi + done + + # Reinstall failed package + for _pkg in "${failedpkg[@]}"; do + installpkg "${_pkg}" + if ! pacman -Qq "${_pkg}" > /dev/null 2>&1; then + echo -e "\n[aur.sh] Failed to install ${_pkg}\n" + exit 1 + fi + done +} + +cleanup(){ + # Remove packages + readarray -t -O "${#remove_list[@]}" remove_list < <(pacman -Qttdq) + (( "${#remove_list[@]}" != 0 )) && pacman -Rsnc "${remove_list[@]}" "${pacman_args[@]}" + + # Clean up + "${aur_helper_command}" -Sccc "${pacman_args[@]}" || true + + # remove user and file + userdel "${aur_username}" + remove /aurbuild_temp + remove /etc/sudoers.d/aurbuild + remove "/etc/alteriso-pacman.conf" + remove "/var/cache/pacman/pkg/" +} -# Remove packages -readarray -t -O "${#remove_list[@]}" remove_list < <(pacman -Qttdq) -(( "${#remove_list[@]}" != 0 )) && pacman -Rsnc "${remove_list[@]}" "${pacman_args[@]}" -# Clean up -"${aur_helper_command}" -Sccc "${pacman_args[@]}" +prepare_env +install_aur_helper +install_aur_pkgs "$@" +cleanup -# remove user and file -userdel "${aur_username}" -remove /aurbuild_temp -remove /etc/sudoers.d/aurbuild -remove "/etc/alteriso-pacman.conf" -remove "/var/cache/pacman/pkg/" diff --git a/system/initcpio/hooks/archiso b/system/initcpio/hooks/archiso index 9935906bb..a1d43b5dd 100644 --- a/system/initcpio/hooks/archiso +++ b/system/initcpio/hooks/archiso @@ -13,7 +13,6 @@ _mnt_dmsnapshot() { local ro_dev ro_dev_size rw_dev ro_dev="$(losetup --find --show --read-only -- "${img}")" - printf '%s\n' "${ro_dev}" >>/run/archiso/used_block_devices ro_dev_size="$(blockdev --getsz "${ro_dev}")" if [ "${cow_persistent}" = "P" ]; then @@ -33,7 +32,6 @@ _mnt_dmsnapshot() { fi rw_dev="$(losetup --find --show "/run/archiso/cowspace/${cow_directory}/${img_name}.cow")" - printf '%s\n' "${rw_dev}" >>/run/archiso/used_block_devices dmsetup create "${dm_snap_name}" --table \ "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev} ${cow_persistent} ${cow_chunksize}" @@ -43,7 +41,6 @@ _mnt_dmsnapshot() { fi _mnt_dev "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" "-w" "defaults" - readlink -f "/dev/mapper/${dm_snap_name}" >>/run/archiso/used_block_devices } # args: source, newroot, mountpoint @@ -58,16 +55,16 @@ _mnt_overlayfs() { } # args: /path/to/image_file, mountpoint -_mnt_sfs() { +_mnt_fs() { local img="${1}" local mnt="${2}" local img_fullname="${img##*/}" - local sfs_dev + local img_loopdev # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() if [ "${copytoram}" = "y" ]; then - msg -n ":: Copying squashfs image to RAM..." + msg -n ":: Copying rootfs image to RAM..." # in case we have pv use it to display copy progress feedback otherwise # fallback to using plain cp @@ -88,32 +85,8 @@ _mnt_sfs() { img="/run/archiso/copytoram/${img_fullname}" msg "done." fi - sfs_dev="$(losetup --find --show --read-only -- "${img}")" - echo "${sfs_dev}" >>/run/archiso/used_block_devices - _mnt_dev "${sfs_dev}" "${mnt}" "-r" "defaults" -} - -# args: /path/to/image_file, mountpoint -_mnt_erofs() { - local img="${1}" - local mnt="${2}" - local img_fullname="${img##*/}" - local erofs_dev - - # shellcheck disable=SC2154 - # defined via initcpio's parse_cmdline() - if [ "${copytoram}" = "y" ]; then - msg -n ":: Copying EROFS image to RAM..." - if ! cp -- "${img}" "/run/archiso/copytoram/${img_fullname}"; then - echo "ERROR: while copy '${img}' to '/run/archiso/copytoram/${img_fullname}'" - launch_interactive_shell - fi - img="/run/archiso/copytoram/${img_fullname}" - msg "done." - fi - erofs_dev="$(losetup --find --show --read-only -- "${img}")" - echo "${erofs_dev}" >>/run/archiso/used_block_devices - _mnt_dev "${erofs_dev}" "${mnt}" "-r" "defaults" "erofs" + img_loopdev="$(losetup --find --show --read-only -- "${img}")" + _mnt_dev "${img_loopdev}" "${mnt}" "-r" "defaults" } # args: device, mountpoint, flags, opts @@ -122,7 +95,6 @@ _mnt_dev() { local mnt="${2}" local flg="${3}" local opts="${4}" - local fstype="${5:-auto}" mkdir -p "${mnt}" @@ -135,7 +107,7 @@ _mnt_dev() { launch_interactive_shell done - if mount -t "${fstype}" -o "${opts}" "${flg}" "${dev}" "${mnt}"; then + if mount -o "${opts}" "${flg}" "${dev}" "${mnt}"; then msg ":: Device '${dev}' mounted successfully." else echo "ERROR; Failed to mount '${dev}'" @@ -158,7 +130,7 @@ _verify_signature() { local _status local sigfile="${1}" cd "/run/archiso/bootmnt/${archisobasedir}/${arch}" || exit 1 - gpg --homedir /gpg --status-fd 1 --verify "${sigfile}" 2>/dev/null | grep -qE '^\[GNUPG:\] GOODSIG' + gpg --homedir /gpg --status-fd 1 --verify "${sigfile}" 2>/dev/null | grep -E '^\[GNUPG:\] GOODSIG' _status=$? cd -- "${OLDPWD}" || exit 1 return ${_status} @@ -197,22 +169,19 @@ run_hook() { # args: /path/to/newroot archiso_mount_handler() { local newroot="${1}" - local sigfile + local sigfile fs_img if ! mountpoint -q "/run/archiso/bootmnt"; then _mnt_dev "${archisodevice}" "/run/archiso/bootmnt" "-r" "defaults" - if [ "${copytoram}" != "y" ]; then - readlink -f "${archisodevice}" >>/run/archiso/used_block_devices - fi fi # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() if [ "${checksum}" = "y" ]; then if [ -f "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sha512" ]; then - msg -n ":: Self-test requested, please wait..." + msg ":: Self-test requested, please wait..." if _verify_checksum; then - msg "done. Checksum is OK, continue booting." + msg "Checksum is OK, continue booting." else echo "ERROR: one or more files are corrupted" echo "see /tmp/checksum.log for details" @@ -233,9 +202,9 @@ archiso_mount_handler() { sigfile="airootfs.erofs.sig" fi if [ -n "${sigfile}" ]; then - msg -n ":: Signature verification requested, please wait..." + msg ":: Signature verification requested, please wait..." if _verify_signature "${sigfile}"; then - msg "done. Signature is OK, continue booting." + msg "Signature is OK, continue booting." else echo "ERROR: one or more files are corrupted" launch_interactive_shell @@ -253,8 +222,9 @@ archiso_mount_handler() { fi if [ -n "${cow_device}" ]; then + # Mount cow_device read-only at first and remount it read-write right after. This prevents errors when the + # device is already mounted read-only somewhere else (e.g. if cow_device and archisodevice are the same). _mnt_dev "${cow_device}" "/run/archiso/cowspace" "-r" "${cow_flags}" - readlink -f "${cow_device}" >>/run/archiso/used_block_devices mount -o remount,rw "/run/archiso/cowspace" else msg ":: Mounting /run/archiso/cowspace (tmpfs) filesystem, size=${cow_spacesize}..." @@ -265,10 +235,14 @@ archiso_mount_handler() { chmod 0700 "/run/archiso/cowspace/${cow_directory}" if [ -f "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" ]; then - _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" "/run/archiso/airootfs" + fs_img="/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs" elif [ -f "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.erofs" ]; then - _mnt_erofs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.erofs" "/run/archiso/airootfs" + fs_img="/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.erofs" + else + echo "ERROR: no root file system image found" + launch_interactive_shell fi + _mnt_fs "${fs_img}" "/run/archiso/airootfs" if [ -f "/run/archiso/airootfs/airootfs.img" ]; then _mnt_dmsnapshot "/run/archiso/airootfs/airootfs.img" "${newroot}" "/" else diff --git a/system/initcpio/hooks/archiso_loop_mnt b/system/initcpio/hooks/archiso_loop_mnt index a5a71e89a..05dc05605 100644 --- a/system/initcpio/hooks/archiso_loop_mnt +++ b/system/initcpio/hooks/archiso_loop_mnt @@ -21,11 +21,6 @@ archiso_loop_mount_handler() { msg ":: Setup a loop device from ${img_loop} located at device ${img_dev}" _mnt_dev "${img_dev}" "/run/archiso/img_dev" "-r" "${img_flags}" - # shellcheck disable=SC2154 - # defined via initcpio's parse_cmdline() - if [ "${copytoram}" != "y" ]; then - readlink -f "${img_dev}" >>/run/archiso/used_block_devices - fi if _dev_loop=$(losetup --find --show --read-only "/run/archiso/img_dev/${img_loop}"); then export archisodevice="${_dev_loop}" @@ -36,6 +31,8 @@ archiso_loop_mount_handler() { archiso_mount_handler "${newroot}" + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${copytoram}" = "y" ]; then losetup -d "${_dev_loop}" 2>/dev/null umount /run/archiso/img_dev diff --git a/system/initcpio/hooks/archiso_pxe_common b/system/initcpio/hooks/archiso_pxe_common index 6cadc3478..3c4126bbf 100644 --- a/system/initcpio/hooks/archiso_pxe_common +++ b/system/initcpio/hooks/archiso_pxe_common @@ -32,7 +32,9 @@ run_hook() { fi # setup network and save some values - if ! ipconfig -t 20 "ip=${ip}"; then + # Timeout is set to 60 by default to avoid issues with STP default values + # (15 second listening, 15 seconds learning and 20 seconds for max age) + if ! ipconfig -t 60 "ip=${ip}"; then echo "ERROR; Failed to configure network" echo " Falling back to interactive prompt" echo " You can try to fix the problem manually, log out when you are finished" diff --git a/system/pacman-x86_64.conf b/system/pacman-x86_64.conf index 571b8be44..4df280fc4 100644 --- a/system/pacman-x86_64.conf +++ b/system/pacman-x86_64.conf @@ -29,7 +29,7 @@ HoldPkg = pacman glibc #XferCommand = /usr/bin/curl -L -C - -f -o %o %u #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled -Architecture = auto +Architecture = x86_64 # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup #IgnorePkg = @@ -98,40 +98,32 @@ Server = https://osdn.dl.osdn.net/storage/g/s/se/serene/repo/$repo/$arch #Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch [core] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch -Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch - -[extra] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch + +[extra] Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch #[community-testing] -#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -#Server = http://mirror.archlinux.jp/$repo/os/$arch -#Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch #Server = http://mirrors.cat.net/archlinux/$repo/os/$arch #Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -#Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +#Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch [community] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch -Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch # If you want to run 32 bit applications on your x86_64 system, # enable the multilib repositories as required here. @@ -146,13 +138,11 @@ Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch #Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch [multilib] -Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch -Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -Server = http://mirror.archlinux.jp/$repo/os/$arch -Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch Server = http://mirrors.cat.net/archlinux/$repo/os/$arch Server = https://mirrors.cat.net/archlinux/$repo/os/$arch -Server = https://jpn.mirror.pkgbuild.com/$repo/os/$arch +Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch +Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch +Server = https://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch # This is Yamada Hayao's personal repository. # It was used early but is now disabled.