Update
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.autopep8"
|
||||
},
|
||||
"python.formatting.provider": "none"
|
||||
}
|
|
@ -1,9 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo pacman -Sw --noconfirm --cachedir "/disk/github/active/make_iso/melawy-archiso/airootfs/opt/extra-drivers" r8168
|
||||
sudo pacman -Sw --noconfirm --cachedir "./airootfs/opt/extra-drivers" r8168
|
||||
|
||||
sudo pacman -Sw --noconfirm --cachedir "/disk/github/active/make_iso/melawy-archiso/airootfs/usr/share/packages" dracut \
|
||||
dracut-hook \
|
||||
sudo pacman -Sw --noconfirm --cachedir "./airootfs/usr/share/packages" dracut \
|
||||
grub \
|
||||
kernel-install-for-dracut \
|
||||
libxvmc \
|
||||
|
@ -14,4 +13,5 @@ linux-xanmod-anbox \
|
|||
linux-xanmod-anbox-headers \
|
||||
os-prober \
|
||||
refind \
|
||||
update-grub \
|
||||
xf86-video-intel
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
#qemu-system-x86_64 -boot d -cdrom ./out/melawy-linux-2023.10.02-x86_64.iso -usb -vga virtio -display spice-app -full-screen -net nic -net user -m 8192 -smbios type=0,uefi=on -smp cpus=4 -enable-kvm -bios /usr/share/ovmf/x64/OVMF.fd
|
||||
|
||||
cp -av -- '/usr/share/edk2-ovmf/x64/OVMF_VARS.fd' "./out/"
|
||||
|
||||
qemu-system-x86_64 \
|
||||
-boot order=d,menu=on,reboot-timeout=5000 \
|
||||
-cdrom ./out/melawy-linux-2023.10.02-x86_64.iso \
|
||||
-smbios type=0,uefi=on \
|
||||
-smp cpus=4 \
|
||||
-m 8192 \
|
||||
-usb \
|
||||
-k en-us \
|
||||
-name archiso,process=archiso_0 \
|
||||
-display sdl,gl=on,show-cursor=on,window-close=on \
|
||||
-vga virtio \
|
||||
-full-screen \
|
||||
-audiodev pa,id=snd0 \
|
||||
-device ich9-intel-hda \
|
||||
-device hda-output,audiodev=snd0 \
|
||||
-device virtio-net-pci,romfile=,netdev=net0 -netdev user,id=net0,hostfwd=tcp::60022-:22 \
|
||||
-machine type=q35,smm=on,accel=kvm,usb=on,pcspk-audiodev=snd0 \
|
||||
-global ICH9-LPC.disable_s3=1 \
|
||||
-enable-kvm \
|
||||
-drive "if=pflash,format=raw,unit=0,file=/usr/share/edk2-ovmf/x64/OVMF_CODE.fd,read-only=on" \
|
||||
-drive "if=pflash,format=raw,unit=1,file=./out/OVMF_VARS.fd" \
|
||||
-global "driver=cfi.pflash01,property=secure,value=off" \
|
||||
-serial stdio
|
|
@ -0,0 +1,5 @@
|
|||
# Configuration file for NetworkManager.
|
||||
# See "man 5 NetworkManager.conf" for details.
|
||||
|
||||
[device]
|
||||
wifi.scan-rand-mac-address=no
|
|
@ -0,0 +1,3 @@
|
|||
ISO_RELEASE=08-12-2023
|
||||
ISO_CODENAME=MelawyLinux
|
||||
ISO_BUILD=08-12-2023
|
|
@ -3,7 +3,6 @@
|
|||
#
|
||||
# Syntax: simple "KEY=VAL" pairs on separate lines
|
||||
#
|
||||
#QT_QPA_PLATFORMTHEME=qt5ct
|
||||
#QT_STYLE_OVERRIDE=kvantum
|
||||
BROWSER=firefox
|
||||
EDITOR=nano
|
||||
ZPOOL_VDEV_NAME_PATH=1
|
||||
|
|
|
@ -0,0 +1,122 @@
|
|||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
|
||||
<match target="font">
|
||||
<edit name="autohint" mode="assign">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
<edit mode="assign" name="hintstyle">
|
||||
<const>hintslight</const>
|
||||
</edit>
|
||||
<edit mode="assign" name="lcdfilter">
|
||||
<const>lcddefault</const>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Default sans-serif font -->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>-apple-system</string></test>
|
||||
<!--<test qual="any" name="lang"><string>ja</string></test>-->
|
||||
<edit name="family" mode="prepend" binding="same"><string>Tex Gyre Heros</string></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>Helvetica Neue</string></test>
|
||||
<!--<test qual="any" name="lang"><string>ja</string></test>-->
|
||||
<edit name="family" mode="prepend" binding="same"><string>Tex Gyre Heros</string></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>Helvetica</string></test>
|
||||
<!--<test qual="any" name="lang"><string>ja</string></test>-->
|
||||
<edit name="family" mode="prepend" binding="same"><string>Tex Gyre Heros</string></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>arial</string></test>
|
||||
<!--<test qual="any" name="lang"><string>ja</string></test>-->
|
||||
<edit name="family" mode="prepend" binding="same"><string>Tex Gyre Heros</string></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>sans-serif</string></test>
|
||||
<!--<test qual="any" name="lang"><string>ja</string></test>-->
|
||||
<edit name="family" mode="prepend" binding="same"><string>Tex Gyre Heros</string></edit>
|
||||
</match>
|
||||
|
||||
<!-- Default serif fonts -->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>serif</string></test>
|
||||
<edit name="family" mode="prepend" binding="same"><string>Libertinus Serif</string></edit>
|
||||
<edit name="family" mode="prepend" binding="same"><string>Noto Serif</string></edit>
|
||||
<edit name="family" mode="prepend" binding="same"><string>Noto Color Emoji</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>IPAPMincho</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>HanaMinA</string></edit>
|
||||
</match>
|
||||
|
||||
<!-- Default monospace fonts -->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>SFMono-Regular</string></test>
|
||||
<edit name="family" mode="prepend" binding="same"><string>DM Mono</string></edit>
|
||||
<edit name="family" mode="prepend" binding="same"><string>Space Mono</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>Inconsolatazi4</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>IPAGothic</string></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>Menlo</string></test>
|
||||
<edit name="family" mode="prepend" binding="same"><string>DM Mono</string></edit>
|
||||
<edit name="family" mode="prepend" binding="same"><string>Space Mono</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>Inconsolatazi4</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>IPAGothic</string></edit>
|
||||
</match>
|
||||
<match target="pattern">
|
||||
<test qual="any" name="family"><string>monospace</string></test>
|
||||
<edit name="family" mode="prepend" binding="same"><string>DM Mono</string></edit>
|
||||
<edit name="family" mode="prepend" binding="same"><string>Space Mono</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>Inconsolatazi4</string></edit>
|
||||
<edit name="family" mode="append" binding="same"><string>IPAGothic</string></edit>
|
||||
</match>
|
||||
|
||||
<!-- Fallback fonts preference order -->
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Noto Sans</family>
|
||||
<family>Noto Color Emoji</family>
|
||||
<family>Noto Emoji</family>
|
||||
<family>Open Sans</family>
|
||||
<family>Droid Sans</family>
|
||||
<family>Ubuntu</family>
|
||||
<family>Roboto</family>
|
||||
<family>NotoSansCJK</family>
|
||||
<family>Source Han Sans JP</family>
|
||||
<family>IPAPGothic</family>
|
||||
<family>VL PGothic</family>
|
||||
<family>Koruri</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Noto Serif</family>
|
||||
<family>Noto Color Emoji</family>
|
||||
<family>Noto Emoji</family>
|
||||
<family>Droid Serif</family>
|
||||
<family>Roboto Slab</family>
|
||||
<family>IPAPMincho</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Noto Sans Mono</family>
|
||||
<family>Noto Color Emoji</family>
|
||||
<family>Noto Emoji</family>
|
||||
<family>Inconsolatazi4</family>
|
||||
<family>Ubuntu Mono</family>
|
||||
<family>Droid Sans Mono</family>
|
||||
<family>Roboto Mono</family>
|
||||
<family>IPAGothic</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
|
@ -1,16 +1,17 @@
|
|||
root:x:0:root
|
||||
sys:x:3:bin,liveuser
|
||||
adm:x:4:liveuser
|
||||
wheel:x:10:liveuser
|
||||
uucp:x:14:liveuser
|
||||
network:x:90:liveuser
|
||||
power:x:98:liveuser
|
||||
adm:x:999:liveuser
|
||||
wheel:x:998:liveuser
|
||||
uucp:x:987:liveuser
|
||||
optical:x:990:liveuser
|
||||
rfkill:x:983:liveuser
|
||||
video:x:986:liveuser
|
||||
storage:x:988:liveuser
|
||||
audio:x:995:liveuser
|
||||
users:x:985:liveuser
|
||||
nopasswdlogin:x:966:liveuser
|
||||
autologin:x:967:liveuser
|
||||
liveuser:x:1000:
|
||||
rfkill:x:983:liveuser
|
||||
users:x:985:liveuser
|
||||
video:x:986:liveuser
|
||||
storage:x:988:liveuser
|
||||
optical:x:990:liveuser
|
||||
audio:x:995:liveuser
|
||||
liveuser:x:1000:
|
||||
liveuser:x:1000:liveuser
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
root:::root
|
||||
root:!*::root
|
||||
sys:!!::liveuser
|
||||
network:!!::liveuser
|
||||
power:!!::liveuser
|
||||
adm:!!::liveuser
|
||||
wheel:!!::liveuser
|
||||
uucp:!!::liveuser
|
||||
network:!!::liveuser
|
||||
power:!!::liveuser
|
||||
optical:!!::liveuser
|
||||
rfkill:!!::liveuser
|
||||
video:!!::liveuser
|
||||
|
@ -13,4 +13,4 @@ audio:!!::liveuser
|
|||
users:!!::liveuser
|
||||
nopasswdlogin:!::liveuser
|
||||
autologin:!::liveuser
|
||||
liveuser:!::
|
||||
liveuser:!*::
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Melawy-Linux
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
LANG=ru_RU.UTF-8
|
||||
LC_ADDRESS=ru_RU.UTF-8
|
||||
LC_IDENTIFICATION=ru_RU.UTF-8
|
||||
|
|
|
@ -136,7 +136,7 @@ DBGSRCDIR="/usr/src/debug"
|
|||
#
|
||||
COMPRESSGZ=(gzip -c -f -n)
|
||||
COMPRESSBZ2=(bzip2 -c -f)
|
||||
COMPRESSXZ=(xz -c -z --threads=0 -9 -e -)
|
||||
COMPRESSXZ=(xz -vv -c -z --threads=0 -9 -e -)
|
||||
COMPRESSZST=(zstd -c -z -q -)
|
||||
COMPRESSLRZ=(lrzip -q)
|
||||
COMPRESSLZO=(lzop -q)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
LSB_VERSION=1.4
|
||||
DISTRIB_ID=MelawyLinux
|
||||
DISTRIB_RELEASE=rolling
|
||||
DISTRIB_DESCRIPTION="MelawyLinux"
|
|
@ -3,7 +3,7 @@
|
|||
# The following modules are loaded before any boot hooks are
|
||||
# run. Advanced users may wish to specify all system modules
|
||||
# in this array. For instance:
|
||||
# MODULES=(piix ide_disk reiserfs)
|
||||
# MODULES=(usbhid xhci_hcd piix ide_disk reiserfs)
|
||||
MODULES=(vmd)
|
||||
|
||||
# BINARIES
|
||||
|
@ -49,21 +49,27 @@ FILES=()
|
|||
#
|
||||
## NOTE: If you have /usr on a separate partition, you MUST include the
|
||||
# usr, fsck and shutdown hooks.
|
||||
HOOKS=(base udev modconf kms keyboard keymap consolefont memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs block filesystems plymouth)
|
||||
HOOKS=(base udev modconf kms keymap consolefont memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs block filesystems keyboard plymouth)
|
||||
#HOOKS=(base systemd systemd-tool modconf kms memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs block filesystems keyboard sd-vconsole plymouth sd-shutdown)
|
||||
|
||||
|
||||
# COMPRESSION
|
||||
# Use this to compress the initramfs image. By default, gzip compression
|
||||
# Use this to compress the initramfs image. By default, zstd compression
|
||||
# is used. Use 'cat' to create an uncompressed image.
|
||||
#COMPRESSION="zstd"
|
||||
#COMPRESSION="gzip"
|
||||
#COMPRESSION="bzip2"
|
||||
#COMPRESSION="lzma"
|
||||
#COMPRESSION="xz"
|
||||
#COMPRESSION="lzop"
|
||||
#COMPRESSION="lz4"
|
||||
COMPRESSION="zstd"
|
||||
|
||||
# COMPRESSION_OPTIONS
|
||||
# Additional options for the compressor
|
||||
#COMPRESSION_OPTIONS=()
|
||||
|
||||
# MODULES_DECOMPRESS
|
||||
# Decompress kernel modules during initramfs creation.
|
||||
# Enable to speedup boot process, disable to save RAM
|
||||
# during early userspace. Switch (yes/no).
|
||||
#MODULES_DECOMPRESS="yes"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
options iwlwifi bt_coex_active=0 swcrypto=1 11n_disable=8
|
|
@ -0,0 +1 @@
|
|||
# THIS IS A STUB TO OVERRIDE THE NVIDIA-UTILS PACKAGE, DO NOT TOUCH.
|
|
@ -0,0 +1 @@
|
|||
# THIS IS A STUB TO OVERRIDE THE NVIDIA-UTILS PACKAGE, DO NOT TOUCH.
|
|
@ -0,0 +1 @@
|
|||
zfs
|
|
@ -1,11 +1,29 @@
|
|||
To install [38;2;23;147;209mArch Linux[0m follow the installation guide:
|
||||
https://wiki.archlinux.org/title/Installation_guide
|
||||
This ISO is based on Arch-ISO modified hugely to provide Installation Environment for MelawyOS.
|
||||
https://endeavouros.com
|
||||
|
||||
For Wi-Fi, authenticate to the wireless network using the [35miwctl[0m utility.
|
||||
For mobile broadband (WWAN) modems, connect with the [35mmmcli[0m utility.
|
||||
Ethernet, WLAN and WWAN interfaces using DHCP should work automatically.
|
||||
MelawyOS-archiso Sources:
|
||||
https://github.com/Melawy
|
||||
|
||||
After connecting to the internet, the installation guide can be accessed
|
||||
via the convenience script [35mInstallation_guide[0m.
|
||||
Arch-ISO Source:
|
||||
https://gitlab.archlinux.org/archlinux/archiso
|
||||
|
||||
[41m [41m [41m [40m [44m [40m [41m [46m [45m [41m [46m [43m [41m [44m [45m [40m [44m [40m [41m [44m [41m [41m [46m [42m [41m [44m [43m [41m [45m [40m [40m [44m [40m [41m [44m [42m [41m [46m [44m [41m [46m [47m [0m
|
||||
Calamares as our installer:
|
||||
https://github.com/calamares/calamares
|
||||
|
||||
Live environment will start now and let you install MelawyOS to disk, or tryout KDE-Desktop from Live-Session.
|
||||
|
||||
Bugs can be reported here:
|
||||
https://github.com/Melawy
|
||||
|
||||
Getting help at the forum: https://github.com/Melawy
|
||||
Help-Chat is available on telegram: https://t.me/Melawy_chat
|
||||
News is available on telegram: https://t.me/Melawy_news
|
||||
|
||||
Our journey wouldn't be made possible without the donates:
|
||||
https://www.tinkoff.ru/cf/7OmVoFjdFNI
|
||||
|
||||
Thank you for donating your trust in us!
|
||||
|
||||
Welcome to your Melawy
|
||||
|
||||
------------------
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
NAME="MelawyLinux"
|
||||
PRETTY_NAME="MelawyLinux"
|
||||
ID=MelawyLinux
|
||||
ID_LIKE=arch
|
||||
BUILD_ID=rolling
|
||||
ANSI_COLOR="38;2;23;147;209"
|
||||
HOME_URL="https://melawy.ru/"
|
||||
LOGO=MelawyLinux
|
||||
IMAGE_ID=MelawyLinux
|
||||
IMAGE_VERSION=08-12-2023
|
|
@ -1,67 +1,126 @@
|
|||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
#
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
#
|
||||
[options]
|
||||
# RootDir = /
|
||||
# DBPath = /var/lib/pacman/
|
||||
# CacheDir = /var/cache/pacman/pkg/
|
||||
# LogFile = /var/log/pacman.log
|
||||
# GPGDir = /etc/pacman.d/gnupg/
|
||||
# HookDir = /etc/pacman.d/hooks/
|
||||
HoldPkg = pacman glibc
|
||||
# XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
# XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
# CleanMethod = KeepInstalled
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
#HookDir = /etc/pacman.d/hooks/
|
||||
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
|
||||
# IgnorePkg =
|
||||
# IgnoreGroup =
|
||||
# NoUpgrade =
|
||||
# NoExtract =
|
||||
# UseSyslog
|
||||
# NoProgressBar
|
||||
CheckSpace
|
||||
# VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
# Color
|
||||
ILoveCandy
|
||||
CheckSpace
|
||||
# VerbosePkgLists
|
||||
# DisableDownloadTimeout
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
# RemoteFileSigLevel = Required
|
||||
|
||||
# [testing]
|
||||
# Include = /etc/pacman.d/mirrorlist
|
||||
#IgnorePkg =
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
Color
|
||||
ILoveCandy
|
||||
#NoProgressBar
|
||||
#CheckSpace
|
||||
VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Arch Linux
|
||||
# packagers with `pacman-key --populate archlinux`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
[endeavouros]
|
||||
SigLevel = PackageRequired
|
||||
Include = /etc/pacman.d/endeavouros-mirrorlist
|
||||
|
||||
#[core-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[extra-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# [community-testing]
|
||||
# Include = /etc/pacman.d/mirrorlist
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the multilib repositories as required here.
|
||||
|
||||
[community]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# [multilib-testing]
|
||||
# Include = /etc/pacman.d/mirrorlist
|
||||
#[multilib-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# [custom]
|
||||
# SigLevel = Optional TrustAll
|
||||
# Server = file:///home/custompkgs
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
|
||||
[arcolinux_repo]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/arcolinux-mirrorlist
|
||||
|
||||
[arcolinux_repo_xlarge]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/arcolinux-mirrorlist
|
||||
|
||||
[arcolinux_repo_3party]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/arcolinux-mirrorlist
|
||||
|
||||
[cachyos]
|
||||
Include = /etc/pacman.d/cachyos-mirrorlist
|
||||
|
||||
[garuda]
|
||||
Include = /etc/pacman.d/chaotic-mirrorlist
|
||||
|
||||
[chaotic-aur]
|
||||
Include = /etc/pacman.d/chaotic-mirrorlist
|
||||
|
||||
[melawy]
|
||||
SigLevel = Required DatabaseOptional
|
||||
|
@ -82,36 +141,3 @@ Include = /etc/pacman.d/melawy-linux-mirrorlist
|
|||
[melawy-aur-gui-app]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/melawy-linux-mirrorlist
|
||||
|
||||
[melawy-aur-cargo]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/melawy-linux-mirrorlist
|
||||
|
||||
[arcolinux_repo]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/arcolinux-mirrorlist
|
||||
|
||||
[arcolinux_repo_xlarge]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/arcolinux-mirrorlist
|
||||
|
||||
[arcolinux_repo_3party]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Include = /etc/pacman.d/arcolinux-mirrorlist
|
||||
|
||||
# [endeavouros]
|
||||
# SigLevel = PackageRequired
|
||||
# Include = /etc/pacman.d/endeavouros-mirrorlist
|
||||
|
||||
# [cachyos]
|
||||
# Include = /etc/pacman.d/cachyos-mirrorlist
|
||||
|
||||
# [garuda]
|
||||
# Include = /etc/pacman.d/chaotic-mirrorlist
|
||||
|
||||
# [chaotic-aur]
|
||||
# Include = /etc/pacman.d/chaotic-mirrorlist
|
||||
|
||||
# [local]
|
||||
# SigLevel = Optional TrustAll
|
||||
# Server = file:///disk/repo/$repo/$arch
|
||||
|
|
|
@ -17,7 +17,7 @@ EnableDowngrade
|
|||
#SimpleInstall
|
||||
|
||||
## Allow Pamac to search and install packages from AUR:
|
||||
EnableAUR
|
||||
#EnableAUR
|
||||
|
||||
## Keep built packages from AUR in cache after installation:
|
||||
KeepBuiltPkgs
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
root:x:0:0:root:/root:/usr/bin/zsh
|
||||
root:x:0:0:root:/root:/bin/bash
|
||||
liveuser:x:1000:1000::/home/liveuser:/bin/bash
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Daemon]
|
||||
Theme=melawy-lera-sugar
|
||||
Theme=melawy-nier-a2
|
||||
DeviceScale=1
|
||||
DeviceTimeout=8
|
||||
ShowDelay=0
|
||||
|
|
|
@ -4,8 +4,8 @@ Numlock=on
|
|||
RebootCommand=/usr/bin/systemctl reboot
|
||||
|
||||
[Theme]
|
||||
Current=Melawy-Lera-Sugar
|
||||
CursorTheme=Qogir-dark
|
||||
Current=Melawy-Nier-A2
|
||||
CursorTheme=Melawy-red-light-default-cursors
|
||||
Font=Noto Sans,10,-1,0,50,0,0,0,0,0
|
||||
|
||||
[Users]
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[X11]
|
||||
MinimumVT=7
|
|
@ -0,0 +1 @@
|
|||
net.ipv6.conf.default.use_tempaddr = 2
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=detect intel legacy gpu and install xf86-video-intel
|
||||
Before=graphical.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/bin/bash /usr/bin/GPU-Intel-installer
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -12,7 +12,7 @@
|
|||
# See journald.conf(5) for details.
|
||||
|
||||
[Journal]
|
||||
Storage=volatile
|
||||
Storage=auto
|
||||
#Compress=yes
|
||||
#Seal=yes
|
||||
#SplitMode=uid
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[Journal]
|
||||
Storage=volatile
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
# systemd is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU Lesser General Public License as published by the Free
|
||||
# Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# Entries in this file show the compile time defaults.
|
||||
# You can change settings by editing this file.
|
||||
# Defaults can be restored by simply deleting this file.
|
||||
# Entries in this file show the compile time defaults. Local configuration
|
||||
# should be created by either modifying this file, or by creating "drop-ins" in
|
||||
# the logind.conf.d/ subdirectory. The latter is generally recommended.
|
||||
# Defaults can be restored by simply deleting this file and all drop-ins.
|
||||
#
|
||||
# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config.
|
||||
#
|
||||
# See logind.conf(5) for details.
|
||||
|
||||
|
@ -18,21 +21,29 @@
|
|||
#KillOnlyUsers=
|
||||
#KillExcludeUsers=root
|
||||
#InhibitDelayMaxSec=5
|
||||
#UserStopDelaySec=10
|
||||
#HandlePowerKey=poweroff
|
||||
HandleSuspendKey=ignore
|
||||
HandleHibernateKey=ignore
|
||||
HandleLidSwitch=ignore
|
||||
#HandlePowerKeyLongPress=ignore
|
||||
#HandleRebootKey=reboot
|
||||
#HandleRebootKeyLongPress=poweroff
|
||||
#HandleSuspendKey=suspend
|
||||
#HandleSuspendKeyLongPress=hibernate
|
||||
#HandleHibernateKey=hibernate
|
||||
#HandleHibernateKeyLongPress=ignore
|
||||
#HandleLidSwitch=suspend
|
||||
#HandleLidSwitchExternalPower=suspend
|
||||
#HandleLidSwitchDocked=ignore
|
||||
#PowerKeyIgnoreInhibited=no
|
||||
#SuspendKeyIgnoreInhibited=no
|
||||
#HibernateKeyIgnoreInhibited=no
|
||||
#LidSwitchIgnoreInhibited=yes
|
||||
#RebootKeyIgnoreInhibited=no
|
||||
#HoldoffTimeoutSec=30s
|
||||
#IdleAction=ignore
|
||||
#IdleActionSec=30min
|
||||
#RuntimeDirectorySize=10%
|
||||
#RuntimeDirectoryInodes=400k
|
||||
#RuntimeDirectoryInodesMax=
|
||||
#RemoveIPC=yes
|
||||
#InhibitorsMax=8192
|
||||
#SessionsMax=8192
|
||||
#StopIdleSessionSec=infinity
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[Login]
|
||||
HandleSuspendKey=ignore
|
||||
HandleHibernateKey=ignore
|
||||
HandleLidSwitch=ignore
|
|
@ -0,0 +1,12 @@
|
|||
[Login]
|
||||
HandlePowerKey=poweroff
|
||||
HandlePowerKeyLongPress=ignore
|
||||
HandleRebootKey=reboot
|
||||
HandleRebootKeyLongPress=poweroff
|
||||
HandleSuspendKey=suspend
|
||||
HandleSuspendKeyLongPress=hibernate
|
||||
HandleHibernateKey=hibernate
|
||||
HandleHibernateKeyLongPress=ignore
|
||||
HandleLidSwitch=suspend
|
||||
HandleLidSwitchExternalPower=suspend
|
||||
HandleLidSwitchDocked=ignore
|
|
@ -0,0 +1,2 @@
|
|||
[Network]
|
||||
IPv6PrivacyExtensions=yes
|
|
@ -1,19 +1,11 @@
|
|||
[Match]
|
||||
# Matching with "Type=ether" causes issues with containers because it also matches virtual Ethernet interfaces (veth*).
|
||||
# See https://bugs.archlinux.org/task/70892
|
||||
# Instead match by globbing the network interface name.
|
||||
Name=en*
|
||||
Name=eth*
|
||||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
IPv6PrivacyExtensions=yes
|
||||
MulticastDNS=yes
|
||||
|
||||
# systemd-networkd does not set per-interface-type default route metrics
|
||||
# https://github.com/systemd/systemd/issues/17698
|
||||
# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband.
|
||||
# Use values from NetworkManager. From nm_device_get_route_metric_default in
|
||||
# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c
|
||||
[DHCPv4]
|
||||
RouteMetric=100
|
||||
|
||||
|
|
|
@ -3,13 +3,8 @@ Name=wl*
|
|||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
IPv6PrivacyExtensions=yes
|
||||
MulticastDNS=yes
|
||||
|
||||
# systemd-networkd does not set per-interface-type default route metrics
|
||||
# https://github.com/systemd/systemd/issues/17698
|
||||
# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband.
|
||||
# Use values from NetworkManager. From nm_device_get_route_metric_default in
|
||||
# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c
|
||||
[DHCPv4]
|
||||
RouteMetric=600
|
||||
|
||||
|
|
|
@ -3,13 +3,7 @@ Name=ww*
|
|||
|
||||
[Network]
|
||||
DHCP=yes
|
||||
IPv6PrivacyExtensions=yes
|
||||
|
||||
# systemd-networkd does not set per-interface-type default route metrics
|
||||
# https://github.com/systemd/systemd/issues/17698
|
||||
# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband.
|
||||
# Use values from NetworkManager. From nm_device_get_route_metric_default in
|
||||
# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c
|
||||
[DHCPv4]
|
||||
RouteMetric=700
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Default systemd-resolved configuration for archiso
|
||||
|
||||
[Resolve]
|
||||
MulticastDNS=yes
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/bluetooth.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/wpa_supplicant.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/bluetooth.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/avahi-daemon.service
|
|
@ -2,7 +2,7 @@
|
|||
Description=Temporary /etc/pacman.d/gnupg directory
|
||||
|
||||
[Mount]
|
||||
What=ramfs
|
||||
What=tmpfs
|
||||
Where=/etc/pacman.d/gnupg
|
||||
Type=ramfs
|
||||
Options=mode=0755
|
||||
Type=tmpfs
|
||||
Options=mode=0755,noswap
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[Service]
|
||||
ExecStart=
|
||||
#ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root - $TERM
|
||||
ExecStart=-/sbin/agetty --autologin liveuser --noclear %I 38400 linux
|
||||
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root - $TERM
|
||||
|
|
|
@ -4,7 +4,7 @@ Before=graphical.target
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/bin/bash /usr/bin/GPU-Intel-installer
|
||||
ExecStart=/bin/bash /usr/local/bin/GPU-Intel-installer
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/avahi-daemon.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/bluetooth.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/firewalld.service
|
|
@ -0,0 +1 @@
|
|||
/etc/systemd/system/intel.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/ntpd.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/pamac-cleancache.timer
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/remote-fs.target
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/spice-vdagentd.socket
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/systemd-timesyncd.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/vboxclient.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/virtual-machine-check.service
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/wpa_supplicant.service
|
|
@ -1 +0,0 @@
|
|||
/usr/lib/systemd/system/systemd-networkd-wait-online.service
|
|
@ -1,3 +1,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[Unit]
|
||||
Description=Initializes Pacman keyring
|
||||
Requires=etc-pacman.d-gnupg.mount
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/avahi-daemon.socket
|
|
@ -0,0 +1 @@
|
|||
/usr/lib/systemd/system/pcscd.socket
|
|
@ -240,7 +240,7 @@ SingleMainWindow=true
|
|||
StartupNotify=true
|
||||
Terminal=false
|
||||
TerminalOptions=
|
||||
Exec=/usr/bin/calamares_polkit %f -d -c /etc/calamares/configs/melawy-linux
|
||||
Exec=/usr/bin/calamares_polkit %f -d -c /etc/calamares/
|
||||
Type=Application
|
||||
Version=1.0
|
||||
X-AppStream-Ignore=true
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[General]
|
||||
Name=MelawyLinux
|
||||
LogoPath=/usr/share/logos/melawy.png
|
||||
Website=https://melawy.ru/
|
|
@ -28,7 +28,9 @@
|
|||
|
||||
|
||||
-c CA,FI,FR,DE,IS,IE,IT,JP,KZ,LV,LU,NZ,NO,PL,PT,RU,SG,ES,SE,CH,TW,TH
|
||||
--protocol https,http,rsync
|
||||
--ipv4
|
||||
--ipv6
|
||||
--protocol https
|
||||
--fastest 50
|
||||
--latest 50
|
||||
--sort rate
|
||||
|
|
|
@ -1,22 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
script_cmdline ()
|
||||
{
|
||||
script_cmdline() {
|
||||
local param
|
||||
for param in $(< /proc/cmdline); do
|
||||
for param in $(</proc/cmdline); do
|
||||
case "${param}" in
|
||||
script=*) echo "${param#*=}" ; return 0 ;;
|
||||
script=*)
|
||||
echo "${param#*=}"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
automated_script ()
|
||||
{
|
||||
automated_script() {
|
||||
local script rt
|
||||
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
|
||||
# there's no synchronization for network availability before executing this script
|
||||
printf '%s: waiting for network-online.target\n' "$0"
|
||||
until systemctl --quiet is-active network-online.target; do
|
||||
sleep 1
|
||||
done
|
||||
printf '%s: downloading %s\n' "$0" "${script}"
|
||||
curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script
|
||||
rt=$?
|
||||
else
|
||||
cp "${script}" /tmp/startup_script
|
||||
|
@ -24,6 +31,9 @@ automated_script ()
|
|||
fi
|
||||
if [[ ${rt} -eq 0 ]]; then
|
||||
chmod +x /tmp/startup_script
|
||||
printf '%s: executing automated script\n' "$0"
|
||||
# note that script is executed when other services (like pacman-init) may be still in progress, please
|
||||
# synchronize to "systemctl is-system-running --wait" when your script depends on other services
|
||||
/tmp/startup_script
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
disable-ccid
|
||||
disable-pinpad
|
||||
pcsc-driver /usr/lib/libpcsclite.so
|
||||
pcsc-shared
|
|
@ -1,5 +1,5 @@
|
|||
# fix for screen readers
|
||||
if grep -Fq 'accessibility=' /proc/cmdline &> /dev/null; then
|
||||
if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then
|
||||
setopt SINGLE_LINE_ZLE
|
||||
fi
|
||||
|
||||
|
|
|
@ -2,48 +2,49 @@
|
|||
|
||||
locale-gen
|
||||
|
||||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
|
||||
|
||||
usermod -s /bin/bash root
|
||||
usermod -p "123" -s /bin/bash root
|
||||
cp -aT /etc/skel/ /root/
|
||||
|
||||
useradd -m -p "" -g 'users' -G 'adm,audio,floppy,log,network,nopasswdlogin,optical,power,rfkill,scanner,storage,sys,tty,users,uucp,wheel' -s /bin/bash liveuser
|
||||
usermod -m -p "" -g 'users' -G 'adm,audio,autologin,network,nopasswdlogin,optical,power,rfkill,storage,sys,users,uucp,video,wheel' -s /bin/bash liveuser
|
||||
usermod -m -p "" -g 'users' -G 'adm,audio,autologin,floppy,log,network,nopasswdlogin,optical,power,rfkill,scanner,storage,sys,tty,users,uucp,video,wheel' -s /bin/bash liveuser
|
||||
usermod -p "123" liveuser
|
||||
|
||||
groups="adm audio autologin floppy log network nopasswdlogin optical power rfkill scanner storage sys tty users uucp video wheel"
|
||||
for i in $groups
|
||||
do
|
||||
#usermod -m -d /home/liveuser -p "123" -g 'users' -G $i -s /bin/bash liveuser
|
||||
usermod -G $i liveuser
|
||||
done
|
||||
|
||||
chmod 750 /etc/sudoers.d
|
||||
chmod 440 /etc/sudoers.d/g_wheel
|
||||
chown -R 1000:1000 /home/liveuser
|
||||
|
||||
findstr=$(grep -e 'kdesu' /usr/bin/eos-install-mode-run-calamares)
|
||||
sed -e "s/$findstr//g" -i /usr/bin/eos-install-mode-run-calamares
|
||||
|
||||
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
|
||||
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
|
||||
|
||||
echo -e "[Daemon]\nTheme=melawy-lera-sugar\nDeviceScale=1\nDeviceTimeout=8\nShowDelay=0" > "/usr/share/plymouth/plymouthd.defaults"
|
||||
|
||||
cat "/usr/lib/melawy-linux-release" >> "/etc/motd"
|
||||
echo "------------------" >> "/etc/motd"
|
||||
# cat "/usr/lib/melawy-linux-release" >> "/etc/motd"
|
||||
# echo "------------------" >> "/etc/motd"
|
||||
|
||||
|
||||
mkdir -p "/etc/calamares/configs/melawy-linux/files/"
|
||||
cp "/root/wallpaper.png" "/etc/calamares/configs/melawy-linux/files/melawy-linux-wallpaper.png"
|
||||
chmod 644 "/etc/calamares/configs/melawy-linux/files/"*".png"
|
||||
|
||||
mkdir -p "/usr/share/melawy-linux/backgrounds/"
|
||||
cp "/root/wallpaper.png" "/usr/share/melawy-linux/backgrounds/melawy-linux-wallpaper.png"
|
||||
chmod 644 "/usr/share/melawy-linux/backgrounds/"*".png"
|
||||
chmod 644 "/usr/share/wallpapers/melawy-linux-wallpapers/"*".png"
|
||||
|
||||
cp "/usr/lib/modprobe.d/nvidia-utils.conf" "/etc/calamares/configs/melawy-linux/files/nv-modprobe"
|
||||
cp "/usr/lib/modules-load.d/nvidia-utils.conf" "/etc/calamares/configs/melawy-linux/files/nv-modules-load"
|
||||
|
||||
mv "/usr/lib/modprobe.d/nvidia-utils.conf" "/etc/calamares/configs/melawy-linux/files/nv-modprobe"
|
||||
mv "/usr/lib/modules-load.d/nvidia-utils.conf" "/etc/calamares/configs/melawy-linux/files/nv-modules-load"
|
||||
|
||||
systemctl enable sddm.service
|
||||
systemctl enable ntpd.service
|
||||
systemctl enable NetworkManager.service systemd-timesyncd.service bluetooth.service firewalld.service
|
||||
systemctl enable vboxservice.service vmtoolsd.service vmware-vmblock-fuse.service
|
||||
systemctl enable intel.service
|
||||
systemctl enable pacman-init.service choose-mirror.service
|
||||
#systemctl set-default multi-user.target
|
||||
systemctl set-default graphical.target
|
||||
# systemctl enable sddm.service
|
||||
# systemctl enable ntpd.service
|
||||
# systemctl enable NetworkManager.service systemd-timesyncd.service bluetooth.service firewalld.service
|
||||
# systemctl enable vboxservice.service vmtoolsd.service vmware-vmblock-fuse.service
|
||||
# systemctl enable intel.service
|
||||
# systemctl enable pacman-init.service choose-mirror.service
|
||||
# #systemctl set-default multi-user.target
|
||||
# systemctl set-default graphical.target
|
||||
|
||||
pacman -Qs | grep "/calamares " | cut -c7- > iso_package_versions
|
||||
pacman -Qs | grep "/firefox " | cut -c7- >> iso_package_versions
|
||||
|
@ -55,12 +56,6 @@ mv "iso_package_versions" "/home/liveuser/"
|
|||
|
||||
cd "/root"
|
||||
|
||||
haveged -w 1024
|
||||
pacman-key --init
|
||||
pkill haveged
|
||||
pacman-key --populate archlinux melawy-linux arcolinux
|
||||
pacman-key --updatedb
|
||||
|
||||
tar -xJvf /root/archives/skel.tar.xz -C /etc/skel --strip=1 --overwrite
|
||||
chown -R 0:0 /etc/skel
|
||||
|
||||
|
|
Before Width: | Height: | Size: 671 KiB After Width: | Height: | Size: 5.0 MiB |
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
###############################################################################
|
||||
# Author : Erik Dubois
|
||||
# Website : https://www.erikdubois.be
|
||||
# Website : https://www.arcolinux.info
|
||||
# Website : https://www.arcolinux.com
|
||||
# Website : https://www.arcolinuxd.com
|
||||
# Website : https://www.arcolinuxb.com
|
||||
# Website : https://www.arcolinuxiso.com
|
||||
# Website : https://www.arcolinuxforum.com
|
||||
###############################################################################
|
||||
#
|
||||
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
#if necessary we can use this script too
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
#set -e
|
||||
##################################################################################################################
|
||||
# Author : Valeria Fadeeva
|
||||
# Website : https://valeria.fadeeva.me
|
||||
# Website : https://fadeeva.me
|
||||
# Website : https://melawy.ru
|
||||
##################################################################################################################
|
||||
#
|
||||
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
|
||||
#
|
||||
##################################################################################################################
|
||||
|
||||
numberofcores=$(grep -c ^processor /proc/cpuinfo)
|
||||
|
||||
if [ $numberofcores -gt 1 ]
|
||||
then
|
||||
echo "You have " $numberofcores" cores."
|
||||
echo "Changing the makeflags for "$numberofcores" cores."
|
||||
sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j'$(($numberofcores+1))'"/g' /etc/makepkg.conf;
|
||||
echo "Changing the compression settings for "$numberofcores" cores."
|
||||
sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -z - --threads=0)/g' /etc/makepkg.conf
|
||||
sudo sed -i 's/COMPRESSZST=(zstd -c -z -q -)/COMPRESSZST=(zstd -c -z -q - --threads=0)/g' /etc/makepkg.conf
|
||||
sudo sed -i "s/PKGEXT='.pkg.tar.xz'/PKGEXT='.pkg.tar.zst'/g" /etc/makepkg.conf
|
||||
else
|
||||
echo "No change."
|
||||
fi
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
Main() {
|
||||
local mode=offline
|
||||
local progname=""
|
||||
progname="$(basename "$0")"
|
||||
local log=/home/liveuser/melawy-install.log
|
||||
|
||||
cat <<EOF > $log
|
||||
########## $log by $progname
|
||||
########## Started (UTC): $(date -u "+%x %X")
|
||||
########## Install mode: $mode
|
||||
|
||||
EOF
|
||||
RunInTerminal "tail -f $log" &
|
||||
|
||||
sudo cp /usr/share/calamares/settings_${mode}.conf /etc/calamares/settings.conf
|
||||
sudo -E dbus-launch calamares -D6 >> $log
|
||||
}
|
||||
|
||||
Main "$@"
|
|
@ -0,0 +1,99 @@
|
|||
#!/bin/bash
|
||||
|
||||
FollowFile() {
|
||||
local tailfile="$1"
|
||||
local term_title="$2"
|
||||
|
||||
alacritty -t "$term_title" -e tail -f "$tailfile" &
|
||||
}
|
||||
|
||||
catch_chrooted_pacman_log() {
|
||||
local pacmanlog=""
|
||||
local lockfile="$HOME/.$1.lck"
|
||||
|
||||
# wait until pacman.log is available in the chrooted system, then follow the log in background
|
||||
while true ; do
|
||||
sleep 2
|
||||
pacmanlog="$(/usr/bin/ls -1 /tmp/calamares-root-*/var/log/pacman.log 2>/dev/null | /usr/bin/tail -n 1)"
|
||||
if [ -n "$pacmanlog" ] ; then
|
||||
# pacman.log found
|
||||
[ -r "$lockfile" ] && return
|
||||
/usr/bin/touch "$lockfile"
|
||||
FollowFile "$pacmanlog" "Pacman log" 400 50
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Main() {
|
||||
local progname
|
||||
progname="$(basename "$0")"
|
||||
local log=/home/liveuser/melawy-install.log
|
||||
local mode=""
|
||||
|
||||
case "$progname" in
|
||||
calamares-online.sh) mode=online ;;
|
||||
calamares-offline.sh) mode=offline ;;
|
||||
esac
|
||||
mode=online # keep this line for now!
|
||||
|
||||
local _efi_check_dir="/sys/firmware/efi"
|
||||
local _exitcode=2 # by default use grub
|
||||
|
||||
local SYSTEM=""
|
||||
local BOOTLOADER=""
|
||||
if [ -d "${_efi_check_dir}" ]; then
|
||||
SYSTEM="UEFI SYSTEM"
|
||||
|
||||
# Restrict bootloader selection to only UEFI systems
|
||||
_exitcode=$(yad --width 300 --title "Bootloader" \
|
||||
--image=gnome-shutdown \
|
||||
--button="Grub:2" \
|
||||
--button="Systemd-boot:3" \
|
||||
--button="Refind:4" \
|
||||
--text "Choose Bootloader:" ; echo $?)
|
||||
else
|
||||
SYSTEM="BIOS/MBR SYSTEM"
|
||||
fi
|
||||
|
||||
|
||||
if [[ "${_exitcode}" -eq 2 ]]; then
|
||||
BOOTLOADER="GRUB"
|
||||
echo "USING GRUB!"
|
||||
yes | sudo pacman -R cachyos-calamares-systemd
|
||||
yes | sudo pacman -R cachyos-calamares-grub
|
||||
yes | sudo pacman -R cachyos-calamares-refind
|
||||
yes | sudo pacman -Sy cachyos-calamares-grub
|
||||
elif [[ "${_exitcode}" -eq 3 ]]; then
|
||||
BOOTLOADER="SYSTEMD-BOOT"
|
||||
echo "USING SYSTEMD-BOOT!"
|
||||
yes | sudo pacman -R cachyos-calamares-grub
|
||||
yes | sudo pacman -R cachyos-calamares-refind
|
||||
yes | sudo pacman -Sy cachyos-calamares-systemd
|
||||
elif [[ "${_exitcode}" -eq 4 ]]; then
|
||||
BOOTLOADER="REFIND"
|
||||
echo "USING REFIND!"
|
||||
yes | sudo pacman -R cachyos-calamares-grub
|
||||
yes | sudo pacman -R cachyos-calamares-systemd
|
||||
yes | sudo pacman -Sy cachyos-calamares-refind
|
||||
else
|
||||
exit
|
||||
fi
|
||||
|
||||
cat <<EOF > $log
|
||||
########## $log by $progname
|
||||
########## Started (UTC): $(date -u "+%x %X")
|
||||
########## Install mode: $mode
|
||||
########## System: $SYSTEM
|
||||
########## Bootloader: $BOOTLOADER
|
||||
EOF
|
||||
FollowFile "$log" "Install log" 20 20
|
||||
|
||||
sudo cp /usr/share/calamares/settings_${mode}.conf /etc/calamares/settings.conf
|
||||
sudo -E dbus-launch calamares -D6 >> $log &
|
||||
|
||||
# comment out the following line if pacman.log is not needed:
|
||||
[ "$mode" = "online" ] && catch_chrooted_pacman_log "$progname"
|
||||
}
|
||||
|
||||
Main "$@"
|
|
@ -4,21 +4,22 @@
|
|||
|
||||
get_cmdline() {
|
||||
local param
|
||||
for param in $(< /proc/cmdline); do
|
||||
for param in $(</proc/cmdline); do
|
||||
case "${param}" in
|
||||
$1=*) echo "${param##*=}";
|
||||
return 0
|
||||
;;
|
||||
"${1}="*)
|
||||
echo "${param##*=}"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
mirror=$(get_cmdline mirror)
|
||||
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
|
||||
[[ $mirror ]] || exit 0
|
||||
mirror="$(get_cmdline mirror)"
|
||||
[[ "$mirror" == 'auto' ]] && mirror="$(get_cmdline archiso_http_srv)"
|
||||
[[ -n "$mirror" ]] || exit 0
|
||||
|
||||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
||||
cat >/etc/pacman.d/mirrorlist << EOF
|
||||
cat >/etc/pacman.d/mirrorlist <<EOF
|
||||
#
|
||||
# Arch Linux repository mirrorlist
|
||||
# Generated by archiso
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
###############################################################################
|
||||
# Author : Erik Dubois
|
||||
# Website : https://www.erikdubois.be
|
||||
# Website : https://www.arcolinux.info
|
||||
# Website : https://www.arcolinux.com
|
||||
# Website : https://www.arcolinuxd.com
|
||||
# Website : https://www.arcolinuxb.com
|
||||
# Website : https://www.arcolinuxiso.com
|
||||
# Website : https://www.arcolinuxforum.com
|
||||
###############################################################################
|
||||
#
|
||||
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
package=sddm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/sddm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
package=gdm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/gdm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
package=lxdm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/lxdm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
package=lightdm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/lightdm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
|
@ -1,33 +1,42 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#set -e
|
||||
###############################################################################
|
||||
# Author : Erik Dubois
|
||||
# Website : https://www.erikdubois.be
|
||||
# Website : https://www.arcolinux.info
|
||||
# Website : https://www.arcolinux.com
|
||||
# Website : https://www.arcolinuxd.com
|
||||
# Website : https://www.arcolinuxb.com
|
||||
# Website : https://www.arcolinuxiso.com
|
||||
# Website : https://www.arcolinuxforum.com
|
||||
# Author : Valeria Fadeeva
|
||||
# Website : https://valeria.fadeeva.me
|
||||
# Website : https://fadeeva.me
|
||||
# Website : https://melawy.ru
|
||||
###############################################################################
|
||||
#
|
||||
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
package=ly
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/ly.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
|
||||
package=sddm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/sddm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
|
||||
package=gdm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/gdm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
|
||||
package=lxdm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/lxdm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
|
||||
package=lightdm
|
||||
if pacman -Qs $package > /dev/null ; then
|
||||
ln -sf /usr/lib/systemd/system/lightdm.service /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
|
||||
echo "#################################"
|
||||
echo "End displaymanager-check"
|
||||
echo "#################################"
|
||||
rm /usr/local/bin/dmcheck
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
###############################################################################
|
||||
# Author : Valeria Fadeeva
|
||||
# Website : https://valeria.fadeeva.me
|
||||
# Website : https://fadeeva.me
|
||||
# Website : https://melawy.ru
|
||||
###############################################################################
|
||||
|
||||
if lsblk -f | grep -q "btrfs"; then
|
||||
echo -e "${GREEN}BTRFS partitions found. Removing XFS-Progs.${NC}"
|
||||
echo
|
||||
sudo pacman -Rdd --noconfirm xfsprogs
|
||||
elif lsblk -f | grep -q "xfs"; then
|
||||
echo -e "${RED}XFS partitions found. Removing BTRFS-Progs.${NC}"
|
||||
echo
|
||||
sudo pacman -Rdd --noconfirm btrfs-progs
|
||||
else
|
||||
echo -e "${BLUE}No XFS or BTRFS partitions found. Removing both Progs Packages.${NC}"
|
||||
sudo pacman -Rdd --noconfirm xfsprogs btrfs-progs
|
||||
fi
|
||||
|
||||
rm /usr/local/bin/fsprogschk
|
|
@ -1,51 +0,0 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
##################################################################################################################
|
||||
# Author : Erik Dubois
|
||||
# Website : https://www.erikdubois.be
|
||||
# Website : https://www.alci.online
|
||||
# Website : https://www.arcolinux.info
|
||||
# Website : https://www.arcolinux.com
|
||||
# Website : https://www.arcolinuxd.com
|
||||
# Website : https://www.arcolinuxb.com
|
||||
# Website : https://www.arcolinuxiso.com
|
||||
# Website : https://www.arcolinuxforum.com
|
||||
##################################################################################################################
|
||||
#
|
||||
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
|
||||
#
|
||||
##################################################################################################################
|
||||
#tput setaf 0 = black
|
||||
#tput setaf 1 = red
|
||||
#tput setaf 2 = green
|
||||
#tput setaf 3 = yellow
|
||||
#tput setaf 4 = dark blue
|
||||
#tput setaf 5 = purple
|
||||
#tput setaf 6 = cyan
|
||||
#tput setaf 7 = gray
|
||||
#tput setaf 8 = light blue
|
||||
##################################################################################################################
|
||||
|
||||
#iso=alci-iso-hardened
|
||||
|
||||
echo
|
||||
tput setaf 3
|
||||
echo "################################################################"
|
||||
echo "################### Start clone arcolinux-nemesis"
|
||||
echo "################################################################"
|
||||
tput sgr0
|
||||
echo
|
||||
|
||||
sudo pacman -Sy git --noconfirm --needed
|
||||
|
||||
[ -d $HOME"/DATA" ] || mkdir -p $HOME"/DATA"
|
||||
cd ~/DATA
|
||||
git clone https://github.com/erikdubois/arcolinux-nemesis
|
||||
|
||||
echo
|
||||
tput setaf 3
|
||||
echo "################################################################"
|
||||
echo "################### End clone arcolinux-nemesis"
|
||||
echo "################################################################"
|
||||
tput sgr0
|
||||
echo
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/bash
|
||||
echo
|
||||
echo "#################################"
|
||||
echo "Start melawy-linux-final"
|
||||
echo "#################################"
|
||||
|
||||
echo "Permissions of important folders"
|
||||
echo "#################################"
|
||||
chmod 750 /etc/sudoers.d
|
||||
chmod 750 /etc/polkit-1/rules.d
|
||||
chgrp polkitd /etc/polkit-1/rules.d
|
||||
|
||||
echo "Copy /etc/skel to /root"
|
||||
echo "#################################"
|
||||
cp -aT /etc/skel/ /root/
|
||||
|
||||
echo "Cleanup autologin root"
|
||||
echo "#################################"
|
||||
rm -rf /etc/systemd/system/getty@tty1.service.d
|
||||
|
||||
echo "Setting editor to nano"
|
||||
echo "#################################"
|
||||
echo "EDITOR=nano" >> /etc/profile
|
||||
|
||||
#Original cleanup
|
||||
echo "Cleanup original files"
|
||||
echo "#################################"
|
||||
rm -f /etc/sudoers.d/g_wheel
|
||||
rm -f /etc/polkit-1/rules.d/49-nopasswd_global.rules
|
||||
rm -f /etc/systemd/system/etc-pacman.d-gnupg.mount
|
||||
rm -f /etc/xdg/autostart/welcome.desktop
|
||||
rm /root/{.automated_script.sh,.zlogin}
|
||||
mv /etc/melawy-linux-release /etc/lsb-release
|
||||
|
||||
echo "Permission of root"
|
||||
echo "#################################"
|
||||
chmod -v 750 /root
|
||||
|
||||
echo "Patching System.conf"
|
||||
echo "#################################"
|
||||
sed -i "s/#RebootWatchdogSec=10min/RebootWatchdogSec=30s/g" /etc/systemd/system.conf
|
||||
sed -i "s/#DefaultTimeoutStopSec=90s/DefaultTimeoutStopSec=5s/g" /etc/systemd/system.conf
|
||||
sed -i "s/#DefaultTimeoutStartSec=90s/DefaultTimeoutStartSec=10s/g" /etc/systemd/system.conf
|
||||
|
||||
echo "Setting KGPg Never to start"
|
||||
echo "#################################"
|
||||
sed -i '219 i OnlyShowIn=KDE' /etc/xdg/autostart/org.kde.kgpg.desktop
|
||||
|
||||
echo "Fixing SDDM.conf User"
|
||||
echo "#####################"
|
||||
sed -i "s/User=liveuser/User=/g" /etc/sddm.conf.d/kde_settings.conf
|
||||
|
||||
echo "#################################"
|
||||
echo "End melawy-linux-final"
|
||||
echo "#################################"
|
||||
rm /usr/local/bin/vcheck
|
||||
rm /usr/local/bin/all-cores
|
||||
rm /usr/local/bin/melawy-linux-final
|
||||
rm -rf /home/liveuser/
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# borrowed from manjaro livecd
|
||||
|
||||
xdg=$(xdg-user-dir DESKTOP)
|
||||
src='/usr/share/applications'
|
||||
|
||||
## We don't need .desktop on desktop,
|
||||
## actually we should remove .desktop or fix the .desktop as it is running with pkexec,
|
||||
## and using current calamares config (not even running with script to provide logs).
|
||||
#if [[ -f /usr/bin/calamares ]]; then
|
||||
# install -Dm755 $src/calamares.desktop \
|
||||
# $xdg/calamares.desktop
|
||||
#fi
|
||||
|
||||
# workaround for glib trash bug (https://bugzilla.gnome.org/show_bug.cgi?id=748248)
|
||||
userid=$(id -u $USER)
|
||||
if [ ! -d "/.Trash-$userid" ]; then
|
||||
sudo mkdir -p /.Trash-$userid/{expunged,files,info}
|
||||
sudo chown -R $userid /.Trash-$userid
|
||||
fi
|
||||
|
||||
# mark launchers trusted for XFCE 4.18
|
||||
for f in $(ls $xdg/*desktop); do
|
||||
gio set -t string $f metadata::xfce-exe-checksum "$(sha256sum $f | awk '{print $1}')"
|
||||
done;
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
_remove_pacman_package() {
|
||||
local _pkgname="$1"
|
||||
pacman -Rsnc "$_pkgname" --noconfirm || true
|
||||
}
|
||||
|
||||
# remove pkgs installed for VMs
|
||||
_clean_vm_packages() {
|
||||
|
||||
#remove virtualbox
|
||||
if pacman -Qi virtualbox-guest-utils &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
_remove_pacman_package virtualbox-guest-utils
|
||||
fi
|
||||
|
||||
if pacman -Qi virtualbox-guest-utils-nox &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
_remove_pacman_package virtualbox-guest-utils-nox
|
||||
fi
|
||||
|
||||
#remove vmware
|
||||
if [ -f /etc/xdg/autostart/vmware-user.desktop ]; then
|
||||
rm /etc/xdg/autostart/vmware-user.desktop
|
||||
fi
|
||||
|
||||
if pacman -Qi open-vm-tools &> /dev/null; then
|
||||
systemctl disable vmtoolsd.service
|
||||
_remove_pacman_package open-vm-tools
|
||||
fi
|
||||
|
||||
if [ -f /etc/systemd/system/multi-user.target.wants/vmtoolsd.service ]; then
|
||||
rm /etc/systemd/system/multi-user.target.wants/vmtoolsd.service
|
||||
fi
|
||||
|
||||
#remove qemu
|
||||
if pacman -Qi qemu-guest-agent &> /dev/null; then
|
||||
systemctl disable qemu-guest-agent.service
|
||||
_remove_pacman_package qemu-guest-agent
|
||||
fi
|
||||
}
|
||||
|
||||
_check_not_running_vm="$(systemd-detect-virt | grep -q 'none'; echo $?)"
|
||||
if [[ "${_check_not_running_vm}" -eq 0 ]]; then
|
||||
_clean_vm_packages
|
||||
fi
|
||||
|
||||
# vim:set ft=bash sw=2 sts=2 et:
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
|
||||
_clean_files() {
|
||||
local _files_to_remove=(
|
||||
/etc/modprobe.d/nvidia-utils.conf
|
||||
/etc/modules-load.d/nvidia-utils.conf
|
||||
/usr/local/bin/choose-mirror
|
||||
/usr/local/bin/prepare-live-desktop.sh
|
||||
/usr/local/bin/removeun-online
|
||||
/usr/local/share/livecd-sound
|
||||
)
|
||||
|
||||
local xx
|
||||
for xx in "${_files_to_remove[@]}"; do rm -rf "$xx" || true; done
|
||||
}
|
||||
|
||||
_clean_packages() {
|
||||
local _packages_to_remove=(
|
||||
gparted
|
||||
grsync
|
||||
cachyos-calamares-grub
|
||||
cachyos-calamares-systemd
|
||||
cachyos-calamares-refind
|
||||
cachyos-calamares
|
||||
cachyos-calamares-config
|
||||
edk2-shell
|
||||
boost-libs
|
||||
doxygen
|
||||
expect
|
||||
gpart
|
||||
tcpdump
|
||||
arch-install-scripts
|
||||
squashfs-tools
|
||||
extra-cmake-modules
|
||||
cmake
|
||||
elinks
|
||||
yaml-cpp
|
||||
syslinux
|
||||
clonezilla
|
||||
memtest86+
|
||||
mkinitcpio-archiso
|
||||
)
|
||||
|
||||
local _check_nvidia_card="$(chwd --is_nvidia_card | grep -q 'NVIDIA card found!'; echo $?)"
|
||||
if [[ "${_check_nvidia_card}" -ne 0 ]]; then
|
||||
echo "No NVIDIA card detected. Removing nvidia drivers"
|
||||
_packages_to_remove+=(nvidia-dkms nvidia-utils egl-wayland)
|
||||
fi
|
||||
|
||||
local xx
|
||||
# @ does one by one to avoid errors in the entire process
|
||||
# taken from Erik Dubois script
|
||||
for xx in "${_packages_to_remove[@]}"; do pacman -Rsnc "$xx" --noconfirm; done
|
||||
}
|
||||
|
||||
_clean_packages
|
||||
_clean_files
|
||||
|
||||
# vim:set ft=bash sw=2 sts=2 et:
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
|
||||
_clean_packages() {
|
||||
local _leave_these_packages="base\nbase-devel\ncachyos-keyring\ncachyos-hello\ngrub\nefibootmgr\noctopi\nca-certificates\n"
|
||||
local _leave_these_basepackages="filesystem\ngcc-libs\nglibc\nglib2\nbash\ncoreutils\nfile\nfindutils\ngawk\ngrep\nprocps-ng\nsed\ntar\ngettext\npciutils\npsmisc\nshadow\nutil-linux\nbzip2\ngzip\nxz\nlicenses\npacman\nsystemd\nsystemd-sysvcompat\niputils\niproute2\n"
|
||||
local _packages_to_remove=($(comm -23 <(pacman -Qq | sort) <({ pacman -Qqg base-devel; pacman -Qqg cachyos; printf $_leave_these_packages; printf $_leave_these_basepackages; } | sort -u)))
|
||||
local xx
|
||||
# @ does one by one to avoid errors in the entire process
|
||||
# * can be used to treat all packages in one command
|
||||
for xx in "${_packages_to_remove[@]}"; do pacman -Rs "$xx" --noconfirm; done
|
||||
|
||||
# making sure they are removed
|
||||
# local _toberemoved_str=$'bash-completion\nxorg-xinit\nxorg-xkill\nxorg-xinput\nxorg-xrandr\nxorg-xrdb\nmkinitcpio-openswap\nalacritty\nkonsole\nkwin-scripts-forceblur\nnetworkmanager-vpnc\nnetworkmanager-qt\nnetworkmanager-openvpn\nwireguard-tools\nopenconnect\nopenvpn\nqt5-xmlpatterns\ndoxygen\ntcpdump\ndmidecode\nkparts\npolkit-qt5\nxorg-server\nxorg-apps\nqt5-tools\nzfs-utils\nlinux-cachyos-zfs\nwget\nvirtualbox-guest-utils\nxf86-video-vesa\nxf86-video-amdgpu\nxf86-video-intel\nnvidia-dkms\nnvidia-utils\nlightdm\nlightdm-gtk-greeter\nlightdm-webkit2-greeter\nbase-devel\nlinux-cachyos-headers\nplasma-browser-integration\nplasma-desktop\nplasma-firewall\nplasma-framework\nplasma-integration\nplasma-nm\nplasma-pa\nplasma-systemmonitor\nplasma-thunderbolt\nplasma-workspace\ndiscover\npackagekit-qt5\nxed\nparole\nristretto\ndolphin\ndolphin-plugins\ncapitaine-cursors\ngtk-engine-murrine\ngnome-themes-extra\nadwaita-icon-theme\nfile-roller\nlibwnck3\nnetwork-manager-applet\ngalculator\ncachy-browser\nkvantum-qt5\nqt5ct\nneofetch\nopen-vm-tools\nxf86-input-vmmouse\nxf86-video-vmware\ncachyos-kde-settings\ncachyos-picom-config\ncachyos-rate-mirrors\ncachyos-kernel-manager\nchwd\noctopi\nreflector-simple\nmeld\nparu\nnordic-theme-git\nlightly-git\ncachyos-nord-kde-theme-git\nchar-white'
|
||||
# local _toberemoved_packages
|
||||
# readarray -t _toberemoved_packages <<< "$_toberemoved_str"
|
||||
# local xxx
|
||||
# for xxx in "${_toberemoved_packages[@]}"; do pacman -Rs "$xxx" --noconfirm; done
|
||||
|
||||
rm /etc/sddm.conf || true
|
||||
}
|
||||
|
||||
_pacman_fix() {
|
||||
|
||||
pacman-key --init
|
||||
pacman-key --populate cachyos
|
||||
}
|
||||
|
||||
_try_v3() {
|
||||
/lib/ld-linux-x86-64.so.2 --help | grep "x86-64-v3 (supported, searched)" > /dev/null
|
||||
|
||||
local pacman_conf="/etc/pacman.conf"
|
||||
local pacman_conf_cachyos="/etc/pacman-more.conf"
|
||||
local pacman_conf_path_backup="/etc/pacman.conf.bak"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "x86-64-v3 is supported"
|
||||
|
||||
sed -i 's/Architecture = auto/#Architecture = auto/' $pacman_conf_cachyos
|
||||
sed -i 's/#<disabled_v3>//g' $pacman_conf_cachyos
|
||||
|
||||
echo "backup old config"
|
||||
mv $pacman_conf $pacman_conf_path_backup
|
||||
|
||||
echo "CachyOS -v3 Repo changed"
|
||||
mv $pacman_conf_cachyos $pacman_conf
|
||||
|
||||
else
|
||||
echo "x86-64-v3 is not supported"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
_clean_packages
|
||||
_try_v3
|
||||
_pacman_fix
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
echo
|
||||
echo "#################################"
|
||||
echo "Start Services"
|
||||
echo "#################################"
|
||||
|
||||
echo "Permission of root"
|
||||
echo "#################################"
|
||||
chmod -v 750 /root
|
||||
|
||||
echo "Bluetooth improvements"
|
||||
echo "#################################"
|
||||
sed -i "s/#AutoEnable=false/AutoEnable=true/g" /etc/bluetooth/main.conf
|
||||
echo 'load-module module-switch-on-connect' | sudo tee --append /etc/pulse/default.pa
|
||||
|
||||
echo "#################################"
|
||||
echo "End melawy-linux-final"
|
||||
echo "#################################"
|
||||
rm /usr/local/bin/services
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
echo
|
||||
echo "#################################"
|
||||
echo "Moving content from skel"
|
||||
echo "#################################"
|
||||
|
||||
for i in `ls /home/`; do su -s "/bin/bash" -c "cp -aT /etc/skel/ /home/$i/" $i || exit 0; done
|
||||
rm /usr/local/bin/skel
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
###############################################################################
|
||||
# Author : Valeria Fadeeva
|
||||
# Website : https://valeria.fadeeva.me
|
||||
# Website : https://fadeeva.me
|
||||
# Website : https://melawy.ru
|
||||
###############################################################################
|
||||
|
||||
cpu_vendor=$(cat /proc/cpuinfo | awk '/vendor_id/ {print $3}' | head -n 1)
|
||||
|
||||
if [[ "$cpu_vendor" == "GenuineIntel" ]]; then
|
||||
echo "Intel CPU detected."
|
||||
sudo pacman -Rdd --noconfirm amd-ucode
|
||||
elif [[ "$cpu_vendor" == "AuthenticAMD" ]]; then
|
||||
echo "AMD CPU detected."
|
||||
sudo pacman -Rdd --noconfirm intel-ucode
|
||||
else
|
||||
echo "Unknown CPU vendor: $cpu_vendor"
|
||||
sudo pacman -Rdd --noconfirm intel-ucode amd-ucode
|
||||
fi
|
||||
|
||||
rm /usr/local/bin/ucode
|
|
@ -0,0 +1,151 @@
|
|||
#!/bin/bash
|
||||
#set -e
|
||||
###############################################################################
|
||||
# Author : Valeria Fadeeva
|
||||
# Website : https://valeria.fadeeva.me
|
||||
# Website : https://fadeeva.me
|
||||
# Website : https://melawy.ru
|
||||
###############################################################################
|
||||
#
|
||||
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
result=$(systemd-detect-virt)
|
||||
|
||||
while [ -e "/var/lib/pacman/db.lck" ];
|
||||
do
|
||||
echo 'Pacman is not ready yet. Will try again in 5 seconds.'
|
||||
seconds=$(($seconds + 5))
|
||||
sleep 5
|
||||
if [[ "$seconds" == "30" ]]; then
|
||||
echo 'Warning: removing pacman db.lck!'
|
||||
rm /var/lib/pacman/db.lck
|
||||
fi
|
||||
done
|
||||
|
||||
echo "You are working on "$result
|
||||
|
||||
if [ $result = "oracle" ];
|
||||
then
|
||||
#remove vmware
|
||||
if pacman -Qi open-vm-tools &> /dev/null; then
|
||||
systemctl disable vmtoolsd.service
|
||||
echo "Disabled vmtoolsd.service"
|
||||
pacman -Rns open-vm-tools --noconfirm
|
||||
echo "Removed open-vm-tools"
|
||||
fi
|
||||
|
||||
if pacman -Qi xf86-video-vmware &> /dev/null; then
|
||||
pacman -Rns xf86-video-vmware --noconfirm
|
||||
echo "Removed xf86-video-vmware"
|
||||
fi
|
||||
|
||||
if [ -f /etc/systemd/system/multi-user.target.wants/vmtoolsd.service ]; then
|
||||
rm /etc/systemd/system/multi-user.target.wants/vmtoolsd.service
|
||||
echo "Removed vmtoolsd.service if still exists"
|
||||
fi
|
||||
|
||||
#remove qemu
|
||||
if pacman -Qi qemu-guest-agent &> /dev/null; then
|
||||
systemctl disable qemu-guest-agent.service
|
||||
pacman -Rns qemu-guest-agent --noconfirm
|
||||
echo "Removed qemu-guest-agent"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $result = "kvm" ];
|
||||
then
|
||||
#remove vmware
|
||||
if pacman -Qi open-vm-tools &> /dev/null; then
|
||||
systemctl disable vmtoolsd.service
|
||||
echo "Disabled vmtoolsd.service"
|
||||
pacman -Rns open-vm-tools --noconfirm
|
||||
echo "Removed open-vm-tools"
|
||||
fi
|
||||
|
||||
if pacman -Qi xf86-video-vmware &> /dev/null; then
|
||||
pacman -Rns xf86-video-vmware --noconfirm
|
||||
echo "Removed xf86-video-vmware"
|
||||
fi
|
||||
|
||||
if [ -f /etc/systemd/system/multi-user.target.wants/vmtoolsd.service ]; then
|
||||
rm /etc/systemd/system/multi-user.target.wants/vmtoolsd.service
|
||||
echo "Removed vmtoolsd.service if still exists"
|
||||
fi
|
||||
|
||||
#remove virtualbox
|
||||
if pacman -Qi virtualbox-guest-utils &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
pacman -Rns virtualbox-guest-utils --noconfirm
|
||||
echo "Removed virtualbox-guest-utils"
|
||||
fi
|
||||
if pacman -Qi virtualbox-guest-utils-nox &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
pacman -Rns virtualbox-guest-utils-nox --noconfirm
|
||||
echo "Removed virtualbox-guest-utils-nox"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $result = "vmware" ];
|
||||
then
|
||||
#remove virtualbox
|
||||
if pacman -Qi virtualbox-guest-utils &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
pacman -Rns virtualbox-guest-utils --noconfirm
|
||||
echo "Removed virtualbox-guest-utils"
|
||||
fi
|
||||
if pacman -Qi virtualbox-guest-utils-nox &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
pacman -Rns virtualbox-guest-utils-nox --noconfirm
|
||||
echo "Removed virtualbox-guest-utils-nox"
|
||||
fi
|
||||
|
||||
#remove qemu
|
||||
if pacman -Qi qemu-guest-agent &> /dev/null; then
|
||||
systemctl disable qemu-guest-agent.service
|
||||
pacman -Rns qemu-guest-agent --noconfirm
|
||||
echo "Removed qemu-guest-agent"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $result = "none" ];
|
||||
then
|
||||
#remove virtualbox
|
||||
if pacman -Qi virtualbox-guest-utils &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
pacman -Rns virtualbox-guest-utils --noconfirm
|
||||
echo "Removed virtualbox-guest-utils"
|
||||
fi
|
||||
|
||||
if pacman -Qi virtualbox-guest-utils-nox &> /dev/null; then
|
||||
systemctl disable vboxservice.service
|
||||
pacman -Rns virtualbox-guest-utils-nox --noconfirm
|
||||
echo "Removed virtualbox-guest-utils-nox"
|
||||
fi
|
||||
|
||||
#remove vmware
|
||||
if pacman -Qi open-vm-tools &> /dev/null; then
|
||||
systemctl disable vmtoolsd.service
|
||||
echo "Disabled vmtoolsd.service"
|
||||
pacman -Rns open-vm-tools --noconfirm
|
||||
echo "Removed open-vm-tools"
|
||||
fi
|
||||
|
||||
if pacman -Qi xf86-video-vmware &> /dev/null; then
|
||||
pacman -Rns xf86-video-vmware --noconfirm
|
||||
echo "Removed xf86-video-vmware"
|
||||
fi
|
||||
|
||||
if [ -f /etc/systemd/system/multi-user.target.wants/vmtoolsd.service ]; then
|
||||
rm /etc/systemd/system/multi-user.target.wants/vmtoolsd.service
|
||||
echo "Removed vmtoolsd.service if still exists"
|
||||
fi
|
||||
|
||||
#remove qemu
|
||||
if pacman -Qi qemu-guest-agent &> /dev/null; then
|
||||
systemctl disable qemu-guest-agent.service
|
||||
pacman -Rns qemu-guest-agent --noconfirm
|
||||
echo "Removed qemu-guest-agent"
|
||||
fi
|
||||
fi
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 820 KiB |
After Width: | Height: | Size: 671 KiB |
After Width: | Height: | Size: 5.0 MiB |
After Width: | Height: | Size: 5.0 MiB |
|
@ -29,6 +29,7 @@ gpg_key=""
|
|||
gpg_sender=""
|
||||
iso_name=""
|
||||
iso_label=""
|
||||
iso_uuid=""
|
||||
iso_publisher=""
|
||||
iso_application=""
|
||||
iso_version=""
|
||||
|
@ -38,6 +39,7 @@ pacman_conf=""
|
|||
packages=""
|
||||
bootstrap_packages=""
|
||||
pacstrap_dir=""
|
||||
declare -i rm_work_dir=0
|
||||
buildmodes=()
|
||||
bootmodes=()
|
||||
airootfs_image_type=""
|
||||
|
@ -49,6 +51,7 @@ efiboot_files=()
|
|||
# adapted from GRUB_EARLY_INITRD_LINUX_STOCK in https://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-mkconfig.in
|
||||
readonly ucodes=('intel-uc.img' 'intel-ucode.img' 'amd-uc.img' 'amd-ucode.img' 'early_ucode.cpio' 'microcode.cpio')
|
||||
|
||||
|
||||
# Show an INFO message
|
||||
# $1: message string
|
||||
_msg_info() {
|
||||
|
@ -85,7 +88,7 @@ usage: ${app_name} [options] <profile_dir>
|
|||
Default: '${iso_application}'
|
||||
-C <file> pacman configuration file.
|
||||
Default: '${pacman_conf}'
|
||||
-D <install_dir> Set an install_dir. All files will by located here.
|
||||
-D <install_dir> Set an install_dir. All files will be located here.
|
||||
Default: '${install_dir}'
|
||||
NOTE: Max 8 characters, use only [a-z0-9]
|
||||
-L <label> Set the ISO volume label
|
||||
|
@ -108,6 +111,7 @@ usage: ${app_name} [options] <profile_dir>
|
|||
Default: '${out_dir}'
|
||||
-p [package ..] Package(s) to install.
|
||||
Multiple packages are provided as quoted, space delimited list.
|
||||
-r Delete the working directory at the end.
|
||||
-v Enable verbose output
|
||||
-w <work_dir> Set the working directory
|
||||
Default: '${work_dir}'
|
||||
|
@ -170,9 +174,10 @@ _cleanup_pacstrap_dir() {
|
|||
[[ -d "${pacstrap_dir}/var/tmp" ]] && find "${pacstrap_dir}/var/tmp" -mindepth 1 -delete
|
||||
# Delete package pacman related files.
|
||||
find "${work_dir}" \( -name '*.pacnew' -o -name '*.pacsave' -o -name '*.pacorig' \) -delete
|
||||
# Create an empty /etc/machine-id
|
||||
# Create /etc/machine-id with special value 'uninitialized': the final id is
|
||||
# generated on first boot, systemd's first-boot mechanism applies (see machine-id(5))
|
||||
rm -f -- "${pacstrap_dir}/etc/machine-id"
|
||||
printf '' > "${pacstrap_dir}/etc/machine-id"
|
||||
printf 'uninitialized\n' >"${pacstrap_dir}/etc/machine-id"
|
||||
|
||||
_msg_info "Done!"
|
||||
}
|
||||
|
@ -207,7 +212,7 @@ _mkairootfs_ext4+squashfs() {
|
|||
[[ ! "${quiet}" == "y" ]] || mkfs_ext4_options+=('-q')
|
||||
rm -f -- "${pacstrap_dir}.img"
|
||||
E2FSPROGS_FAKE_TIME="${SOURCE_DATE_EPOCH}" mkfs.ext4 "${mkfs_ext4_options[@]}" -- "${pacstrap_dir}.img" 32G
|
||||
tune2fs -c 0 -i 0 -- "${pacstrap_dir}.img" > /dev/null
|
||||
tune2fs -c 0 -i 0 -- "${pacstrap_dir}.img" >/dev/null
|
||||
_msg_info "Done!"
|
||||
|
||||
install -d -m 0755 -- "${isofs_dir}/${install_dir}/${arch}"
|
||||
|
@ -248,9 +253,9 @@ _mkchecksum() {
|
|||
_msg_info "Creating checksum file for self-test..."
|
||||
cd -- "${isofs_dir}/${install_dir}/${arch}"
|
||||
if [[ -e "${isofs_dir}/${install_dir}/${arch}/airootfs.sfs" ]]; then
|
||||
sha512sum airootfs.sfs > airootfs.sha512
|
||||
sha512sum airootfs.sfs >airootfs.sha512
|
||||
elif [[ -e "${isofs_dir}/${install_dir}/${arch}/airootfs.erofs" ]]; then
|
||||
sha512sum airootfs.erofs > airootfs.sha512
|
||||
sha512sum airootfs.erofs >airootfs.sha512
|
||||
fi
|
||||
cd -- "${OLDPWD}"
|
||||
_msg_info "Done!"
|
||||
|
@ -283,12 +288,12 @@ _run_once() {
|
|||
# Set up custom pacman.conf with custom cache and pacman hook directories.
|
||||
_make_pacman_conf() {
|
||||
local _cache_dirs _system_cache_dirs _profile_cache_dirs
|
||||
_system_cache_dirs="$(pacman-conf CacheDir| tr '\n' ' ')"
|
||||
_profile_cache_dirs="$(pacman-conf --config "${pacman_conf}" CacheDir| tr '\n' ' ')"
|
||||
_system_cache_dirs="$(pacman-conf CacheDir | tr '\n' ' ')"
|
||||
_profile_cache_dirs="$(pacman-conf --config "${pacman_conf}" CacheDir | tr '\n' ' ')"
|
||||
|
||||
# Only use the profile's CacheDir, if it is not the default and not the same as the system cache dir.
|
||||
if [[ "${_profile_cache_dirs}" != "/var/cache/pacman/pkg" ]] && \
|
||||
[[ "${_system_cache_dirs}" != "${_profile_cache_dirs}" ]]; then
|
||||
if [[ "${_profile_cache_dirs}" != "/var/cache/pacman/pkg" ]] \
|
||||
&& [[ "${_system_cache_dirs}" != "${_profile_cache_dirs}" ]]; then
|
||||
_cache_dirs="${_profile_cache_dirs}"
|
||||
else
|
||||
_cache_dirs="${_system_cache_dirs}"
|
||||
|
@ -300,9 +305,9 @@ _make_pacman_conf() {
|
|||
# append CacheDir and HookDir to [options] section
|
||||
# HookDir is *always* set to the airootfs' override directory
|
||||
# see `man 8 pacman` for further info
|
||||
pacman-conf --config "${pacman_conf}" | \
|
||||
sed "/CacheDir/d;/DBPath/d;/HookDir/d;/LogFile/d;/RootDir/d;/\[options\]/a CacheDir = ${_cache_dirs}
|
||||
/\[options\]/a HookDir = ${pacstrap_dir}/etc/pacman.d/hooks/" > "${work_dir}/${buildmode}.pacman.conf"
|
||||
pacman-conf --config "${pacman_conf}" \
|
||||
| sed "/CacheDir/d;/DBPath/d;/HookDir/d;/LogFile/d;/RootDir/d;/\[options\]/a CacheDir = ${_cache_dirs}
|
||||
/\[options\]/a HookDir = ${pacstrap_dir}/etc/pacman.d/hooks/" >"${work_dir}/${buildmode}.pacman.conf"
|
||||
}
|
||||
|
||||
# Prepare working directory and copy custom root file system files.
|
||||
|
@ -317,7 +322,7 @@ _make_custom_airootfs() {
|
|||
cp -af --no-preserve=ownership,mode -- "${profile}/airootfs/." "${pacstrap_dir}"
|
||||
# Set ownership and mode for files and directories
|
||||
for filename in "${!file_permissions[@]}"; do
|
||||
IFS=':' read -ra permissions <<< "${file_permissions["${filename}"]}"
|
||||
IFS=':' read -ra permissions <<<"${file_permissions["${filename}"]}"
|
||||
# Prevent file path traversal outside of $pacstrap_dir
|
||||
if [[ "$(realpath -q -- "${pacstrap_dir}${filename}")" != "${pacstrap_dir}"* ]]; then
|
||||
_msg_error "Failed to set permissions on '${pacstrap_dir}${filename}'. Outside of valid path." 1
|
||||
|
@ -358,7 +363,7 @@ _make_packages() {
|
|||
|
||||
# Unset TMPDIR to work around https://bugs.archlinux.org/task/70580
|
||||
if [[ "${quiet}" = "y" ]]; then
|
||||
env -u TMPDIR pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
|
||||
env -u TMPDIR pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &>/dev/null
|
||||
else
|
||||
env -u TMPDIR pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
|
||||
fi
|
||||
|
@ -396,13 +401,13 @@ _make_customize_airootfs() {
|
|||
if [[ ! -d "${pacstrap_dir}${passwd[5]}" ]]; then
|
||||
install -d -m 0750 -o "${passwd[2]}" -g "${passwd[3]}" -- "${pacstrap_dir}${passwd[5]}"
|
||||
fi
|
||||
cp -dnRT --preserve=mode,timestamps,links -- "${pacstrap_dir}/etc/skel/." "${pacstrap_dir}${passwd[5]}"
|
||||
cp -dRT --update=none --preserve=mode,timestamps,links -- "${pacstrap_dir}/etc/skel/." "${pacstrap_dir}${passwd[5]}"
|
||||
chmod -f 0750 -- "${pacstrap_dir}${passwd[5]}"
|
||||
chown -hR -- "${passwd[2]}:${passwd[3]}" "${pacstrap_dir}${passwd[5]}"
|
||||
else
|
||||
_msg_error "Failed to set permissions on '${pacstrap_dir}${passwd[5]}'. Outside of valid path." 1
|
||||
fi
|
||||
done < "${profile}/airootfs/etc/passwd"
|
||||
done <"${profile}/airootfs/etc/passwd"
|
||||
_msg_info "Done!"
|
||||
fi
|
||||
|
||||
|
@ -423,6 +428,10 @@ _make_bootmodes() {
|
|||
for bootmode in "${bootmodes[@]}"; do
|
||||
_run_once "_make_bootmode_${bootmode}"
|
||||
done
|
||||
|
||||
if [[ "${bootmodes[*]}" != *grub* ]]; then
|
||||
_run_once _make_common_grubenv_and_loopbackcfg
|
||||
fi
|
||||
}
|
||||
|
||||
# Copy kernel and initramfs to ISO 9660
|
||||
|
@ -453,9 +462,10 @@ _make_bootmode_bios.syslinux.mbr() {
|
|||
install -d -m 0755 -- "${isofs_dir}/boot/syslinux"
|
||||
for _cfg in "${profile}/syslinux/"*.cfg; do
|
||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g" \
|
||||
"${_cfg}" > "${isofs_dir}/boot/syslinux/${_cfg##*/}"
|
||||
"${_cfg}" >"${isofs_dir}/boot/syslinux/${_cfg##*/}"
|
||||
done
|
||||
if [[ -e "${profile}/syslinux/splash.png" ]]; then
|
||||
install -m 0644 -- "${profile}/syslinux/splash.png" "${isofs_dir}/boot/syslinux/"
|
||||
|
@ -480,10 +490,8 @@ _make_bootmode_bios.syslinux.mbr() {
|
|||
if [[ -e "${pacstrap_dir}/boot/memtest86+/memtest.bin" ]]; then
|
||||
install -d -m 0755 -- "${isofs_dir}/boot/memtest86+/"
|
||||
# rename for PXE: https://wiki.archlinux.org/title/Syslinux#Using_memtest
|
||||
install -m 0644 -- "${pacstrap_dir}/boot/memtest86+/memtest.bin" \
|
||||
"${isofs_dir}/boot/memtest86+/memtest"
|
||||
install -m 0644 -- "${pacstrap_dir}/usr/share/licenses/common/GPL2/license.txt" \
|
||||
"${isofs_dir}/boot/memtest86+/"
|
||||
install -m 0644 -- "${pacstrap_dir}/boot/memtest86+/memtest.bin" "${isofs_dir}/boot/memtest86+/memtest"
|
||||
install -m 0644 -- "${pacstrap_dir}/usr/share/licenses/common/GPL2/license.txt" "${isofs_dir}/boot/memtest86+/"
|
||||
fi
|
||||
_msg_info "Done! SYSLINUX set up for BIOS booting from a disk successfully."
|
||||
}
|
||||
|
@ -505,8 +513,8 @@ _make_bootmode_bios.syslinux.eltorito() {
|
|||
_make_boot_on_fat() {
|
||||
local ucode_image all_ucode_images=()
|
||||
_msg_info "Preparing kernel and initramfs for the FAT file system..."
|
||||
mmd -i "${efibootimg}" "::/${install_dir}" "::/${install_dir}/boot" \
|
||||
"::/${install_dir}/boot/${arch}"
|
||||
mmd -i "${efibootimg}" \
|
||||
"::/${install_dir}" "::/${install_dir}/boot" "::/${install_dir}/boot/${arch}"
|
||||
mcopy -i "${efibootimg}" "${pacstrap_dir}/boot/vmlinuz-"* \
|
||||
"${pacstrap_dir}/boot/initramfs-"*".img" \
|
||||
"${pacstrap_dir}/boot/linux-"* \
|
||||
|
@ -534,10 +542,11 @@ _make_efibootimg() {
|
|||
fi
|
||||
|
||||
# Convert from bytes to KiB and round up to the next full MiB with an additional MiB for reserved sectors.
|
||||
imgsize_kib="$(awk 'function ceil(x){return int(x)+(x>int(x))}
|
||||
imgsize_kib="$(
|
||||
awk 'function ceil(x){return int(x)+(x>int(x))}
|
||||
function byte_to_kib(x){return x/1024}
|
||||
function mib_to_kib(x){return x*1024}
|
||||
END {print mib_to_kib(ceil((byte_to_kib($1)+1024)/1024))}' <<< "${imgsize_bytes}"
|
||||
END {print mib_to_kib(ceil((byte_to_kib($1)+1024)/1024))}' <<<"${imgsize_bytes}"
|
||||
)"
|
||||
# The FAT image must be created with mkfs.fat not mformat, as some systems have issues with mformat made images:
|
||||
# https://lists.gnu.org/archive/html/grub-devel/2019-04/msg00099.html
|
||||
|
@ -546,7 +555,7 @@ _make_efibootimg() {
|
|||
if [[ "${quiet}" == "y" ]]; then
|
||||
# mkfs.fat does not have a -q/--quiet option, so redirect stdout to /dev/null instead
|
||||
# https://github.com/dosfstools/dosfstools/issues/103
|
||||
mkfs.fat -C -n ARCHISO_EFI "${efibootimg}" "${imgsize_kib}" > /dev/null
|
||||
mkfs.fat -C -n ARCHISO_EFI "${efibootimg}" "${imgsize_kib}" >/dev/null
|
||||
else
|
||||
mkfs.fat -C -n ARCHISO_EFI "${efibootimg}" "${imgsize_kib}"
|
||||
fi
|
||||
|
@ -555,41 +564,38 @@ _make_efibootimg() {
|
|||
mmd -i "${efibootimg}" ::/EFI ::/EFI/BOOT
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Copy GRUB files to ISO 9660 which is used by both IA32 UEFI and x64 UEFI
|
||||
_make_common_bootmode_grub_copy_to_isofs() {
|
||||
local files_to_copy=()
|
||||
|
||||
files_to_copy+=("${work_dir}/grub/"*)
|
||||
if compgen -G "${profile}/grub/!(*.cfg)" &> /dev/null; then
|
||||
if compgen -G "${profile}/grub/!(*.cfg)" &>/dev/null; then
|
||||
files_to_copy+=("${profile}/grub/"!(*.cfg))
|
||||
fi
|
||||
install -d -m 0755 -- "${isofs_dir}/boot/grub"
|
||||
install -m 0644 -- "${files_to_copy[@]}" "${isofs_dir}/boot/grub/"
|
||||
cp -r --remove-destination -- "${files_to_copy[@]}" "${isofs_dir}/boot/grub/"
|
||||
}
|
||||
|
||||
# Prepare GRUB configuration files
|
||||
_make_common_bootmode_grub_cfg(){
|
||||
local _cfg archiso_uuid search_filename
|
||||
_make_common_bootmode_grub_cfg() {
|
||||
local _cfg search_filename
|
||||
|
||||
install -d -- "${work_dir}/grub"
|
||||
|
||||
# Precalculate the ISO's modification date in UTC, i.e. its "UUID"
|
||||
TZ=UTC printf -v archiso_uuid '%(%F-%H-%M-%S-00)T' "$SOURCE_DATE_EPOCH"
|
||||
# Create a /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid file on ISO 9660. GRUB will search for it to find the ISO
|
||||
# volume. This is similar to what grub-mkrescue does, except it places the file in /.disk/, but we opt to use a
|
||||
# directory that does not start with a dot to avoid it being accidentally missed when copying the ISO's contents.
|
||||
: > "${work_dir}/grub/${archiso_uuid}.uuid"
|
||||
search_filename="/boot/grub/${archiso_uuid}.uuid"
|
||||
: >"${work_dir}/grub/${iso_uuid}.uuid"
|
||||
search_filename="/boot/grub/${iso_uuid}.uuid"
|
||||
|
||||
# Fill GRUB configuration files
|
||||
for _cfg in "${profile}/grub/"*'.cfg'; do
|
||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g;
|
||||
s|%ARCHISO_SEARCH_FILENAME%|${search_filename}|g" \
|
||||
"${_cfg}" > "${work_dir}/grub/${_cfg##*/}"
|
||||
"${_cfg}" >"${work_dir}/grub/${_cfg##*/}"
|
||||
done
|
||||
|
||||
# Prepare grub.cfg that will be embedded inside the GRUB binaries
|
||||
|
@ -632,7 +638,7 @@ else
|
|||
fi
|
||||
EOF
|
||||
grubembedcfg="${grubembedcfg//'%ARCHISO_SEARCH_FILENAME%'/"${search_filename}"}"
|
||||
printf '%s\n' "$grubembedcfg" > "${work_dir}/grub-embed.cfg"
|
||||
printf '%s\n' "$grubembedcfg" >"${work_dir}/grub-embed.cfg"
|
||||
|
||||
# Write grubenv
|
||||
printf '%.1024s' \
|
||||
|
@ -644,7 +650,41 @@ EOF
|
|||
"${arch}" \
|
||||
"${search_filename}" \
|
||||
"$(printf '%0.1s' "#"{1..1024})")" \
|
||||
> "${work_dir}/grub/grubenv"
|
||||
>"${work_dir}/grub/grubenv"
|
||||
}
|
||||
|
||||
# Create GRUB specific configuration files when GRUB is not used as a boot loader
|
||||
_make_common_grubenv_and_loopbackcfg() {
|
||||
local search_filename
|
||||
|
||||
install -d -m 0755 -- "${isofs_dir}/boot/grub"
|
||||
# Create a /boot/grub/YYYY-mm-dd-HH-MM-SS-00.uuid file on ISO 9660. GRUB will search for it to find the ISO
|
||||
# volume. This is similar to what grub-mkrescue does, except it places the file in /.disk/, but we opt to use a
|
||||
# directory that does not start with a dot to avoid it being accidentally missed when copying the ISO's contents.
|
||||
search_filename="/boot/grub/${iso_uuid}.uuid"
|
||||
: >"${isofs_dir}/${search_filename}"
|
||||
|
||||
# Write grubenv
|
||||
printf '%.1024s' \
|
||||
"$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\nARCHISO_LABEL=%s\nINSTALL_DIR=%s\nARCH=%s\nARCHISO_SEARCH_FILENAME=%s\n%s' \
|
||||
"${iso_name}" \
|
||||
"${iso_version}" \
|
||||
"${iso_label}" \
|
||||
"${install_dir}" \
|
||||
"${arch}" \
|
||||
"${search_filename}" \
|
||||
"$(printf '%0.1s' "#"{1..1024})")" \
|
||||
>"${isofs_dir}/boot/grub/grubenv"
|
||||
|
||||
# Copy loopback.cfg to /boot/grub/ on ISO 9660
|
||||
if [[ -e "${profile}/grub/loopback.cfg" ]]; then
|
||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g;
|
||||
s|%ARCHISO_SEARCH_FILENAME%|${search_filename}|g" \
|
||||
"${profile}/grub/loopback.cfg" >"${isofs_dir}/boot/grub/loopback.cfg"
|
||||
fi
|
||||
}
|
||||
|
||||
_make_bootmode_uefi-ia32.grub.esp() {
|
||||
|
@ -661,12 +701,12 @@ _make_bootmode_uefi-ia32.grub.esp() {
|
|||
search_fs_file search_fs_uuid search_label serial sleep tpm udf usb usbserial_common usbserial_ftdi \
|
||||
usbserial_pl2303 usbserial_usbdebug video xfs zstd)
|
||||
grub-mkstandalone -O i386-efi \
|
||||
--modules="${grubmodules[*]}" \
|
||||
--locales="en@quot" \
|
||||
--themes="" \
|
||||
--sbat=/usr/share/grub/sbat.csv \
|
||||
--disable-shim-lock \
|
||||
-o "${work_dir}/BOOTIA32.EFI" "boot/grub/grub.cfg=${work_dir}/grub-embed.cfg"
|
||||
--modules="${grubmodules[*]}" \
|
||||
--locales="en@quot" \
|
||||
--themes="" \
|
||||
--sbat=/usr/share/grub/sbat.csv \
|
||||
--disable-shim-lock \
|
||||
-o "${work_dir}/BOOTIA32.EFI" "boot/grub/grub.cfg=${work_dir}/grub-embed.cfg"
|
||||
# Add GRUB to the list of files used to calculate the required FAT image size.
|
||||
efiboot_files+=("${work_dir}/BOOTIA32.EFI"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
||||
|
@ -738,12 +778,12 @@ _make_bootmode_uefi-x64.grub.esp() {
|
|||
search_fs_file search_fs_uuid search_label serial sleep tpm udf usb usbserial_common usbserial_ftdi \
|
||||
usbserial_pl2303 usbserial_usbdebug video xfs zstd)
|
||||
grub-mkstandalone -O x86_64-efi \
|
||||
--modules="${grubmodules[*]}" \
|
||||
--locales="en@quot" \
|
||||
--themes="" \
|
||||
--sbat=/usr/share/grub/sbat.csv \
|
||||
--disable-shim-lock \
|
||||
-o "${work_dir}/BOOTx64.EFI" "boot/grub/grub.cfg=${work_dir}/grub-embed.cfg"
|
||||
--modules="${grubmodules[*]}" \
|
||||
--locales="en@quot" \
|
||||
--themes="" \
|
||||
--sbat=/usr/share/grub/sbat.csv \
|
||||
--disable-shim-lock \
|
||||
-o "${work_dir}/BOOTx64.EFI" "boot/grub/grub.cfg=${work_dir}/grub-embed.cfg"
|
||||
# Add GRUB to the list of files used to calculate the required FAT image size.
|
||||
efiboot_files+=("${work_dir}/BOOTx64.EFI"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi")
|
||||
|
@ -802,11 +842,9 @@ _make_bootmode_uefi-x64.grub.eltorito() {
|
|||
_msg_info "Done!"
|
||||
}
|
||||
|
||||
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
||||
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
_make_common_bootmode_systemd-boot() {
|
||||
local _file efiboot_imgsize
|
||||
local _available_ucodes=()
|
||||
_msg_info "Setting up systemd-boot for UEFI booting..."
|
||||
|
||||
for _file in "${ucodes[@]}"; do
|
||||
if [[ -e "${pacstrap_dir}/boot/${_file}" ]]; then
|
||||
|
@ -814,31 +852,67 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
|||
fi
|
||||
done
|
||||
# Calculate the required FAT image size in bytes
|
||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi"
|
||||
"${profile}/efiboot/"
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.esp ' || " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' ]]; then
|
||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi")
|
||||
fi
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.systemd-boot.esp ' || " ${bootmodes[*]} " =~ ' uefi-ia32.systemd-boot.eltorito ' ]]; then
|
||||
efiboot_files+=("${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi"
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi")
|
||||
fi
|
||||
efiboot_files+=("${profile}/efiboot/"
|
||||
"${pacstrap_dir}/boot/vmlinuz-"*
|
||||
"${pacstrap_dir}/boot/initramfs-"*".img"
|
||||
"${pacstrap_dir}/boot/linux-"*
|
||||
"${_available_ucodes[@]}")
|
||||
efiboot_imgsize="$(du -bcs -- "${efiboot_files[@]}" \
|
||||
2>/dev/null | awk 'END { print $1 }')"
|
||||
efiboot_imgsize="$(du -bcs -- "${efiboot_files[@]}" 2>/dev/null | awk 'END { print $1 }')"
|
||||
# Create a FAT image for the EFI system partition
|
||||
_make_efibootimg "$efiboot_imgsize"
|
||||
}
|
||||
|
||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" ::/EFI/BOOT/BOOTx64.EFI
|
||||
_make_common_bootmode_systemd-boot_conf.isofs() {
|
||||
local _conf
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
install -d -m 0755 -- "${isofs_dir}/loader/entries"
|
||||
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
|
||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g" \
|
||||
"${_conf}" >"${isofs_dir}/loader/entries/${_conf##*/}"
|
||||
done
|
||||
}
|
||||
|
||||
_make_common_bootmode_systemd-boot_conf.esp() {
|
||||
local _conf
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
mmd -i "${efibootimg}" ::/loader ::/loader/entries
|
||||
mcopy -i "${efibootimg}" "${profile}/efiboot/loader/loader.conf" ::/loader/
|
||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%ARCHISO_UUID%|${iso_uuid}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g" \
|
||||
"${_conf}" | mcopy -i "${efibootimg}" - "::/loader/entries/${_conf##*/}"
|
||||
done
|
||||
}
|
||||
|
||||
# Prepare systemd-boot for booting when written to a disk (isohybrid)
|
||||
_make_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
_msg_info "Setting up systemd-boot for x64 UEFI booting..."
|
||||
|
||||
_run_once _make_common_bootmode_systemd-boot
|
||||
|
||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootx64.efi" ::/EFI/BOOT/BOOTx64.EFI
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.esp
|
||||
|
||||
# shellx64.efi is picked up automatically when on /
|
||||
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/x64/Shell_Full.efi" ]]; then
|
||||
|
@ -848,9 +922,9 @@ _make_bootmode_uefi-x64.systemd-boot.esp() {
|
|||
|
||||
# Copy kernel and initramfs to FAT image.
|
||||
# systemd-boot can only access files from the EFI system partition it was launched from.
|
||||
_make_boot_on_fat
|
||||
_run_once _make_boot_on_fat
|
||||
|
||||
_msg_info "Done! systemd-boot set up for UEFI booting successfully."
|
||||
_msg_info "Done! systemd-boot set up for x64 UEFI booting successfully."
|
||||
}
|
||||
|
||||
# Prepare systemd-boot for El Torito booting
|
||||
|
@ -870,14 +944,7 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
|||
"${isofs_dir}/EFI/BOOT/BOOTx64.EFI"
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
install -d -m 0755 -- "${isofs_dir}/loader/entries"
|
||||
install -m 0644 -- "${profile}/efiboot/loader/loader.conf" "${isofs_dir}/loader/"
|
||||
for _conf in "${profile}/efiboot/loader/entries/"*".conf"; do
|
||||
sed "s|%ARCHISO_LABEL%|${iso_label}|g;
|
||||
s|%INSTALL_DIR%|${install_dir}|g;
|
||||
s|%ARCH%|${arch}|g" \
|
||||
"${_conf}" > "${isofs_dir}/loader/entries/${_conf##*/}"
|
||||
done
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.isofs
|
||||
|
||||
# edk2-shell based UEFI shell
|
||||
# shellx64.efi is picked up automatically when on /
|
||||
|
@ -888,6 +955,58 @@ _make_bootmode_uefi-x64.systemd-boot.eltorito() {
|
|||
_msg_info "Done!"
|
||||
}
|
||||
|
||||
_make_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||
_msg_info "Setting up systemd-boot for IA32 UEFI booting..."
|
||||
|
||||
_run_once _make_common_bootmode_systemd-boot
|
||||
|
||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi" ::/EFI/BOOT/BOOTIA32.EFI
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.esp
|
||||
|
||||
# shellia32.efi is picked up automatically when on /
|
||||
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
|
||||
mcopy -i "${efibootimg}" \
|
||||
"${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ::/shellia32.efi
|
||||
fi
|
||||
|
||||
# Copy kernel and initramfs to FAT image.
|
||||
# systemd-boot can only access files from the EFI system partition it was launched from.
|
||||
_run_once _make_boot_on_fat
|
||||
|
||||
_msg_info "Done! systemd-boot set up for IA32 UEFI booting successfully."
|
||||
}
|
||||
|
||||
_make_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
||||
# El Torito UEFI boot requires an image containing the EFI system partition.
|
||||
# uefi-ia32.systemd-boot.eltorito has the same requirements as uefi-ia32.systemd-boot.esp
|
||||
_run_once _make_bootmode_uefi-ia32.systemd-boot.esp
|
||||
|
||||
# Additionally set up systemd-boot in ISO 9660. This allows creating a medium for the live environment by using
|
||||
# manual partitioning and simply copying the ISO 9660 file system contents.
|
||||
# This is not related to El Torito booting and no firmware uses these files.
|
||||
_msg_info "Preparing an /EFI directory for the ISO 9660 file system..."
|
||||
install -d -m 0755 -- "${isofs_dir}/EFI/BOOT"
|
||||
|
||||
# Copy systemd-boot EFI binary to the default/fallback boot path
|
||||
install -m 0644 -- "${pacstrap_dir}/usr/lib/systemd/boot/efi/systemd-bootia32.efi" \
|
||||
"${isofs_dir}/EFI/BOOT/BOOTIA32.EFI"
|
||||
|
||||
# Copy systemd-boot configuration files
|
||||
_run_once _make_common_bootmode_systemd-boot_conf.isofs
|
||||
|
||||
# edk2-shell based UEFI shell
|
||||
# shellia32.efi is picked up automatically when on /
|
||||
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
|
||||
install -m 0644 -- "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" "${isofs_dir}/shellia32.efi"
|
||||
fi
|
||||
|
||||
_msg_info "Done!"
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_bios.syslinux.mbr() {
|
||||
# bios.syslinux.mbr requires bios.syslinux.eltorito
|
||||
# shellcheck disable=SC2076
|
||||
|
@ -931,20 +1050,15 @@ _validate_requirements_bootmode_bios.syslinux.eltorito() {
|
|||
_validate_requirements_bootmode_bios.syslinux.mbr
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.esp ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-x64.grub.esp!" 0
|
||||
fi
|
||||
|
||||
_validate_requirements_common_systemd-boot() {
|
||||
# Check if mkfs.fat is available
|
||||
if ! command -v mkfs.fat &> /dev/null; then
|
||||
if ! command -v mkfs.fat &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${bootmode}': mkfs.fat is not available on this host. Install 'dosfstools'!" 0
|
||||
fi
|
||||
|
||||
# Check if mmd and mcopy are available
|
||||
if ! { command -v mmd &> /dev/null && command -v mcopy &> /dev/null; }; then
|
||||
if ! { command -v mmd &>/dev/null && command -v mcopy &>/dev/null; }; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${bootmode}': mmd and/or mcopy are not available on this host. Install 'mtools'!" 0
|
||||
fi
|
||||
|
@ -976,6 +1090,14 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
|
|||
fi
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.esp ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-x64.grub.esp!" 0
|
||||
fi
|
||||
_validate_requirements_common_systemd-boot
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-x64.grub.eltorito ' ]]; then
|
||||
|
@ -986,9 +1108,28 @@ _validate_requirements_bootmode_uefi-x64.systemd-boot.eltorito() {
|
|||
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-ia32.systemd-boot.esp() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.grub.esp ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-ia32.grub.esp!" 0
|
||||
fi
|
||||
|
||||
_validate_requirements_common_systemd-boot
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-ia32.systemd-boot.eltorito() {
|
||||
# shellcheck disable=SC2076
|
||||
if [[ " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
|
||||
_msg_error "Validating '${bootmode}': cannot be used with bootmode uefi-ia32.grub.eltorito!" 0
|
||||
fi
|
||||
|
||||
# uefi-ia32.systemd-boot.eltorito has the exact same requirements as uefi-ia32.systemd-boot.esp
|
||||
_validate_requirements_bootmode_uefi-x64.systemd-boot.esp
|
||||
}
|
||||
|
||||
_validate_requirements_bootmode_uefi-ia32.grub.esp() {
|
||||
# Check if GRUB is available
|
||||
if ! command -v grub-mkstandalone &> /dev/null; then
|
||||
if ! command -v grub-mkstandalone &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${bootmode}': grub-install is not available on this host. Install 'grub'!" 0
|
||||
fi
|
||||
|
@ -1015,19 +1156,19 @@ _validate_requirements_bootmode_uefi-x64.grub.esp() {
|
|||
fi
|
||||
|
||||
# Check if GRUB is available
|
||||
if ! command -v grub-mkstandalone &> /dev/null; then
|
||||
if ! command -v grub-mkstandalone &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${bootmode}': grub-install is not available on this host. Install 'grub'!" 0
|
||||
fi
|
||||
|
||||
# Check if mkfs.fat is available
|
||||
if ! command -v mkfs.fat &> /dev/null; then
|
||||
if ! command -v mkfs.fat &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${bootmode}': mkfs.fat is not available on this host. Install 'dosfstools'!" 0
|
||||
fi
|
||||
|
||||
# Check if mmd and mcopy are available
|
||||
if ! { command -v mmd &> /dev/null && command -v mcopy &> /dev/null; }; then
|
||||
if ! { command -v mmd &>/dev/null && command -v mcopy &>/dev/null; }; then
|
||||
_msg_error "Validating '${bootmode}': mmd and/or mcopy are not available on this host. Install 'mtools'!" 0
|
||||
fi
|
||||
|
||||
|
@ -1156,14 +1297,14 @@ _sign_netboot_artifacts() {
|
|||
}
|
||||
|
||||
_validate_requirements_airootfs_image_type_squashfs() {
|
||||
if ! command -v mksquashfs &> /dev/null; then
|
||||
if ! command -v mksquashfs &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${airootfs_image_type}': mksquashfs is not available on this host. Install 'squashfs-tools'!" 0
|
||||
fi
|
||||
}
|
||||
|
||||
_validate_requirements_airootfs_image_type_ext4+squashfs() {
|
||||
if ! { command -v mkfs.ext4 &> /dev/null && command -v tune2fs &> /dev/null; }; then
|
||||
if ! { command -v mkfs.ext4 &>/dev/null && command -v tune2fs &>/dev/null; }; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${airootfs_image_type}': mkfs.ext4 and/or tune2fs is not available on this host. Install 'e2fsprogs'!" 0
|
||||
fi
|
||||
|
@ -1171,22 +1312,22 @@ _validate_requirements_airootfs_image_type_ext4+squashfs() {
|
|||
}
|
||||
|
||||
_validate_requirements_airootfs_image_type_erofs() {
|
||||
if ! command -v mkfs.erofs &> /dev/null; then
|
||||
if ! command -v mkfs.erofs &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating '${airootfs_image_type}': mkfs.erofs is not available on this host. Install 'erofs-utils'!" 0
|
||||
fi
|
||||
}
|
||||
|
||||
_validate_common_requirements_buildmode_all() {
|
||||
if ! command -v pacman &> /dev/null; then
|
||||
if ! command -v pacman &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating build mode '${_buildmode}': pacman is not available on this host. Install 'pacman'!" 0
|
||||
fi
|
||||
if ! command -v find &> /dev/null; then
|
||||
if ! command -v find &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating build mode '${_buildmode}': find is not available on this host. Install 'findutils'!" 0
|
||||
fi
|
||||
if ! command -v gzip &> /dev/null; then
|
||||
if ! command -v gzip &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating build mode '${_buildmode}': gzip is not available on this host. Install 'gzip'!" 0
|
||||
fi
|
||||
|
@ -1210,7 +1351,7 @@ _validate_requirements_buildmode_bootstrap() {
|
|||
fi
|
||||
|
||||
_validate_common_requirements_buildmode_all
|
||||
if ! command -v bsdtar &> /dev/null; then
|
||||
if ! command -v bsdtar &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating build mode '${_buildmode}': bsdtar is not available on this host. Install 'libarchive'!" 0
|
||||
fi
|
||||
|
@ -1247,15 +1388,15 @@ _validate_common_requirements_buildmode_iso_netboot() {
|
|||
_msg_error "Two certificates are required for codesigning netboot artifacts, but '${cert_list[*]}' is provided." 0
|
||||
fi
|
||||
|
||||
if ! command -v openssl &> /dev/null; then
|
||||
if ! command -v openssl &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating build mode '${_buildmode}': openssl is not available on this host. Install 'openssl'!" 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if the specified airootfs_image_type is supported
|
||||
if typeset -f "_mkairootfs_${airootfs_image_type}" &> /dev/null; then
|
||||
if typeset -f "_validate_requirements_airootfs_image_type_${airootfs_image_type}" &> /dev/null; then
|
||||
if typeset -f "_mkairootfs_${airootfs_image_type}" &>/dev/null; then
|
||||
if typeset -f "_validate_requirements_airootfs_image_type_${airootfs_image_type}" &>/dev/null; then
|
||||
"_validate_requirements_airootfs_image_type_${airootfs_image_type}"
|
||||
else
|
||||
_msg_warning "Function '_validate_requirements_airootfs_image_type_${airootfs_image_type}' does not exist. Validating the requirements of '${airootfs_image_type}' airootfs image type will not be possible."
|
||||
|
@ -1275,8 +1416,8 @@ _validate_requirements_buildmode_iso() {
|
|||
_msg_error "No boot modes specified in '${profile}/profiledef.sh'." 0
|
||||
fi
|
||||
for bootmode in "${bootmodes[@]}"; do
|
||||
if typeset -f "_make_bootmode_${bootmode}" &> /dev/null; then
|
||||
if typeset -f "_validate_requirements_bootmode_${bootmode}" &> /dev/null; then
|
||||
if typeset -f "_make_bootmode_${bootmode}" &>/dev/null; then
|
||||
if typeset -f "_validate_requirements_bootmode_${bootmode}" &>/dev/null; then
|
||||
"_validate_requirements_bootmode_${bootmode}"
|
||||
else
|
||||
_msg_warning "Function '_validate_requirements_bootmode_${bootmode}' does not exist. Validating the requirements of '${bootmode}' boot mode will not be possible."
|
||||
|
@ -1287,7 +1428,7 @@ _validate_requirements_buildmode_iso() {
|
|||
fi
|
||||
done
|
||||
|
||||
if ! command -v awk &> /dev/null; then
|
||||
if ! command -v awk &>/dev/null; then
|
||||
(( validation_error=validation_error+1 ))
|
||||
_msg_error "Validating build mode '${_buildmode}': awk is not available on this host. Install 'awk'!" 0
|
||||
fi
|
||||
|
@ -1360,7 +1501,7 @@ _add_xorrisofs_options_uefi-x64.systemd-boot.esp() {
|
|||
# A valid GPT prevents BIOS booting on some systems, instead use an invalid GPT (without a protective MBR).
|
||||
# The attached partition will have the EFI system partition type code in MBR, but in the invalid GPT it will
|
||||
# have a Microsoft basic partition type code.
|
||||
if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' && ! " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
|
||||
if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.systemd-boot.eltorito ' && ! " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
|
||||
# If '-isohybrid-gpt-basdat' is specified before '-e', then the appended EFI system partition will have the
|
||||
# EFI system partition type ID/GUID in both MBR and GPT. If '-isohybrid-gpt-basdat' is specified after '-e',
|
||||
# the appended EFI system partition will have the Microsoft basic data type GUID in GPT.
|
||||
|
@ -1431,7 +1572,7 @@ _add_xorrisofs_options_uefi-x64.grub.esp() {
|
|||
# A valid GPT prevents BIOS booting on some systems, instead use an invalid GPT (without a protective MBR).
|
||||
# The attached partition will have the EFI system partition type code in MBR, but in the invalid GPT it will
|
||||
# have a Microsoft basic partition type code.
|
||||
if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.grub.eltorito ' && ! " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
|
||||
if [[ ! " ${bootmodes[*]} " =~ ' uefi-x64.grub.eltorito ' && ! " ${bootmodes[*]} " =~ ' uefi-ia32.grub.eltorito ' ]]; then
|
||||
# If '-isohybrid-gpt-basdat' is specified before '-e', then the appended EFI system partition will have the
|
||||
# EFI system partition type ID/GUID in both MBR and GPT. If '-isohybrid-gpt-basdat' is specified after '-e',
|
||||
# the appended EFI system partition will have the Microsoft basic data type GUID in GPT.
|
||||
|
@ -1498,7 +1639,7 @@ _build_bootstrap_image() {
|
|||
cd -- "${_bootstrap_parent}"
|
||||
|
||||
_msg_info "Creating bootstrap image..."
|
||||
bsdtar -cf - "root.${arch}" | gzip -cn9 > "${out_dir}/${image_name}"
|
||||
bsdtar -cf - "root.${arch}" | gzip -cn9 >"${out_dir}/${image_name}"
|
||||
_msg_info "Done!"
|
||||
du -h -- "${out_dir}/${image_name}"
|
||||
cd -- "${OLDPWD}"
|
||||
|
@ -1511,33 +1652,38 @@ _build_iso_image() {
|
|||
|
||||
[[ -d "${out_dir}" ]] || install -d -- "${out_dir}"
|
||||
|
||||
# Do not read xorriso startup files to prevent interference and unintended behavior.
|
||||
# For it to work, -no_rc must be the first argument passed to xorriso.
|
||||
xorriso_options=('-no_rc')
|
||||
|
||||
|
||||
if [[ "${quiet}" == "y" ]]; then
|
||||
# The when xorriso is run in mkisofs compatibility mode (xorrisofs), the mkisofs option -quiet is interpreted
|
||||
# too late (e.g. messages about SOURCE_DATE_EPOCH still get shown).
|
||||
# Instead use native xorriso option to silence the output.
|
||||
xorriso_options=('-report_about' 'SORRY' "${xorriso_options[@]}")
|
||||
xorriso_options+=('-report_about' 'SORRY')
|
||||
fi
|
||||
|
||||
# Add required xorrisofs options for each boot mode
|
||||
for bootmode in "${bootmodes[@]}"; do
|
||||
typeset -f "_add_xorrisofs_options_${bootmode}" &> /dev/null && "_add_xorrisofs_options_${bootmode}"
|
||||
typeset -f "_add_xorrisofs_options_${bootmode}" &>/dev/null && "_add_xorrisofs_options_${bootmode}"
|
||||
done
|
||||
|
||||
rm -f -- "${out_dir}/${image_name}"
|
||||
_msg_info "Creating ISO image..."
|
||||
xorriso "${xorriso_options[@]}" -as mkisofs \
|
||||
-iso-level 3 \
|
||||
-full-iso9660-filenames \
|
||||
-joliet \
|
||||
-joliet-long \
|
||||
-rational-rock \
|
||||
-volid "${iso_label}" \
|
||||
-appid "${iso_application}" \
|
||||
-publisher "${iso_publisher}" \
|
||||
-preparer "prepared by ${app_name}" \
|
||||
"${xorrisofs_options[@]}" \
|
||||
-output "${out_dir}/${image_name}" \
|
||||
"${isofs_dir}/"
|
||||
-iso-level 3 \
|
||||
-full-iso9660-filenames \
|
||||
-joliet \
|
||||
-joliet-long \
|
||||
-rational-rock \
|
||||
-volid "${iso_label}" \
|
||||
-appid "${iso_application}" \
|
||||
-publisher "${iso_publisher}" \
|
||||
-preparer "prepared by ${app_name}" \
|
||||
"${xorrisofs_options[@]}" \
|
||||
-output "${out_dir}/${image_name}" \
|
||||
"${isofs_dir}/"
|
||||
_msg_info "Done!"
|
||||
du -h -- "${out_dir}/${image_name}"
|
||||
}
|
||||
|
@ -1597,8 +1743,8 @@ _validate_options() {
|
|||
|
||||
# Check if the specified buildmodes are supported
|
||||
for _buildmode in "${buildmodes[@]}"; do
|
||||
if typeset -f "_build_buildmode_${_buildmode}" &> /dev/null; then
|
||||
if typeset -f "_validate_requirements_buildmode_${_buildmode}" &> /dev/null; then
|
||||
if typeset -f "_build_buildmode_${_buildmode}" &>/dev/null; then
|
||||
if typeset -f "_validate_requirements_buildmode_${_buildmode}" &>/dev/null; then
|
||||
"_validate_requirements_buildmode_${_buildmode}"
|
||||
else
|
||||
_msg_warning "Function '_validate_requirements_buildmode_${_buildmode}' does not exist. Validating the requirements of '${_buildmode}' build mode will not be possible."
|
||||
|
@ -1670,10 +1816,15 @@ _set_overrides() {
|
|||
elif [[ -z "$quiet" ]]; then
|
||||
quiet="y"
|
||||
fi
|
||||
if [[ -v override_rm_work_dir ]]; then
|
||||
rm_work_dir="$override_rm_work_dir"
|
||||
fi
|
||||
|
||||
# Set variables that do not have overrides
|
||||
[[ -n "$airootfs_image_type" ]] || airootfs_image_type="squashfs"
|
||||
[[ -n "$iso_name" ]] || iso_name="${app_name}"
|
||||
# Precalculate the ISO's modification date in UTC, i.e. its "UUID"
|
||||
TZ=UTC printf -v iso_uuid '%(%F-%H-%M-%S-00)T' "$SOURCE_DATE_EPOCH"
|
||||
}
|
||||
|
||||
_export_gpg_publickey() {
|
||||
|
@ -1689,22 +1840,23 @@ _make_version() {
|
|||
_msg_info "Creating version files..."
|
||||
# Write version file to system installation dir
|
||||
rm -f -- "${pacstrap_dir}/version"
|
||||
printf '%s\n' "${iso_version}" > "${pacstrap_dir}/version"
|
||||
printf '%s\n' "${iso_version}" >"${pacstrap_dir}/version"
|
||||
|
||||
if [[ "${buildmode}" == @("iso"|"netboot") ]]; then
|
||||
install -d -m 0755 -- "${isofs_dir}/${install_dir}"
|
||||
# Write version file to ISO 9660
|
||||
printf '%s\n' "${iso_version}" > "${isofs_dir}/${install_dir}/version"
|
||||
printf '%s\n' "${iso_version}" >"${isofs_dir}/${install_dir}/version"
|
||||
|
||||
fi
|
||||
if [[ "${buildmode}" == "iso" ]]; then
|
||||
# Write grubenv with version information to ISO 9660
|
||||
# TODO: after sufficient time has passed, do not create this file anymore when GRUB boot modes are used.
|
||||
# _make_common_bootmode_grub_cfg already creates ${isofs_dir}/boot/grub/grubenv
|
||||
# TODO: after sufficient time has passed, do not create this file anymore.
|
||||
# _make_common_bootmode_grub_cfg and _make_common_grubenv_and_loopbackcfg already create a
|
||||
# ${isofs_dir}/boot/grub/grubenv file
|
||||
rm -f -- "${isofs_dir}/${install_dir}/grubenv"
|
||||
printf '%.1024s' "$(printf '# GRUB Environment Block\nNAME=%s\nVERSION=%s\n%s' \
|
||||
"${iso_name}" "${iso_version}" "$(printf '%0.1s' "#"{1..1024})")" \
|
||||
> "${isofs_dir}/${install_dir}/grubenv"
|
||||
>"${isofs_dir}/${install_dir}/grubenv"
|
||||
fi
|
||||
|
||||
# Append IMAGE_ID & IMAGE_VERSION to os-release
|
||||
|
@ -1716,7 +1868,7 @@ _make_version() {
|
|||
_msg_warning "os-release file '${_os_release}' is outside of valid path."
|
||||
else
|
||||
[[ ! -e "${_os_release}" ]] || sed -i '/^IMAGE_ID=/d;/^IMAGE_VERSION=/d' "${_os_release}"
|
||||
printf 'IMAGE_ID=%s\nIMAGE_VERSION=%s\n' "${iso_name}" "${iso_version}" >> "${_os_release}"
|
||||
printf 'IMAGE_ID=%s\nIMAGE_VERSION=%s\n' "${iso_name}" "${iso_version}" >>"${_os_release}"
|
||||
fi
|
||||
|
||||
# Touch /usr/lib/clock-epoch to give another hint on date and time
|
||||
|
@ -1730,16 +1882,26 @@ _make_pkglist() {
|
|||
_msg_info "Creating a list of installed packages on live-enviroment..."
|
||||
case "${buildmode}" in
|
||||
"bootstrap")
|
||||
pacman -Q --sysroot "${pacstrap_dir}" > "${pacstrap_dir}/pkglist.${arch}.txt"
|
||||
pacman -Q --sysroot "${pacstrap_dir}" >"${pacstrap_dir}/pkglist.${arch}.txt"
|
||||
;;
|
||||
"iso"|"netboot")
|
||||
install -d -m 0755 -- "${isofs_dir}/${install_dir}"
|
||||
pacman -Q --sysroot "${pacstrap_dir}" > "${isofs_dir}/${install_dir}/pkglist.${arch}.txt"
|
||||
pacman -Q --sysroot "${pacstrap_dir}" >"${isofs_dir}/${install_dir}/pkglist.${arch}.txt"
|
||||
;;
|
||||
esac
|
||||
_msg_info "Done!"
|
||||
}
|
||||
|
||||
# Create working directory
|
||||
_make_work_dir() {
|
||||
if [[ ! -d "${work_dir}" ]]; then
|
||||
install -d -- "${work_dir}"
|
||||
elif (( rm_work_dir )); then
|
||||
rm_work_dir=0
|
||||
_msg_warning "Working directory removal requested, but '${work_dir}' already exists. It will not be removed!" 0
|
||||
fi
|
||||
}
|
||||
|
||||
# build the base for an ISO and/or a netboot target
|
||||
_build_iso_base() {
|
||||
local run_once_mode="base"
|
||||
|
@ -1751,13 +1913,9 @@ _build_iso_base() {
|
|||
isofs_dir="${work_dir}/iso"
|
||||
|
||||
# Create working directory
|
||||
[[ -d "${work_dir}" ]] || install -d -- "${work_dir}"
|
||||
# Write build date to file or if the file exists, read it from there
|
||||
if [[ -e "${work_dir}/build_date" ]]; then
|
||||
SOURCE_DATE_EPOCH="$(<"${work_dir}/build_date")"
|
||||
else
|
||||
printf '%s\n' "$SOURCE_DATE_EPOCH" > "${work_dir}/build_date"
|
||||
fi
|
||||
_run_once _make_work_dir
|
||||
# Write build date to file if it does not exist already
|
||||
[[ -e "${work_dir}/build_date" ]] || printf '%s\n' "$SOURCE_DATE_EPOCH" >"${work_dir}/build_date"
|
||||
|
||||
[[ "${quiet}" == "y" ]] || _show_config
|
||||
_run_once _make_pacman_conf
|
||||
|
@ -1812,7 +1970,6 @@ _build_buildmode_netboot() {
|
|||
|
||||
if [[ -v cert_list ]]; then
|
||||
_run_once _sign_netboot_artifacts
|
||||
_cms_sign_artifact "${airootfs_image_filename}"
|
||||
fi
|
||||
_run_once _export_netboot_artifacts
|
||||
}
|
||||
|
@ -1834,23 +1991,29 @@ _build() {
|
|||
for buildmode in "${buildmodes[@]}"; do
|
||||
_run_once "_build_buildmode_${buildmode}"
|
||||
done
|
||||
if (( rm_work_dir )); then
|
||||
_msg_info 'Removing the working directory...'
|
||||
rm -rf -- "${work_dir:?}/"
|
||||
_msg_info 'Done!'
|
||||
fi
|
||||
}
|
||||
|
||||
while getopts 'c:p:C:L:P:A:D:w:m:o:g:G:vh?' arg; do
|
||||
while getopts 'c:p:C:L:P:A:D:w:m:o:g:G:vrh?' arg; do
|
||||
case "${arg}" in
|
||||
p) read -r -a override_pkg_list <<< "${OPTARG}" ;;
|
||||
p) read -r -a override_pkg_list <<<"${OPTARG}" ;;
|
||||
C) override_pacman_conf="${OPTARG}" ;;
|
||||
L) override_iso_label="${OPTARG}" ;;
|
||||
P) override_iso_publisher="${OPTARG}" ;;
|
||||
A) override_iso_application="${OPTARG}" ;;
|
||||
D) override_install_dir="${OPTARG}" ;;
|
||||
c) read -r -a override_cert_list <<< "${OPTARG}" ;;
|
||||
c) read -r -a override_cert_list <<<"${OPTARG}" ;;
|
||||
w) override_work_dir="${OPTARG}" ;;
|
||||
m) read -r -a override_buildmodes <<< "${OPTARG}" ;;
|
||||
m) read -r -a override_buildmodes <<<"${OPTARG}" ;;
|
||||
o) override_out_dir="${OPTARG}" ;;
|
||||
g) override_gpg_key="${OPTARG}" ;;
|
||||
G) override_gpg_sender="${OPTARG}" ;;
|
||||
v) override_quiet="n" ;;
|
||||
r) declare -i override_rm_work_dir=1 ;;
|
||||
h|?) _usage 0 ;;
|
||||
*)
|
||||
_msg_error "Invalid argument '${arg}'" 0
|
||||
|
@ -1873,6 +2036,13 @@ fi
|
|||
# get the absolute path representation of the first non-option argument
|
||||
profile="$(realpath -- "${1}")"
|
||||
|
||||
# Read SOURCE_DATE_EPOCH from file early
|
||||
build_date_file="$(realpath -q -- "${override_work_dir:-./work}/build_date")" || :
|
||||
if [[ -f "$build_date_file" ]]; then
|
||||
SOURCE_DATE_EPOCH="$(<"$build_date_file")"
|
||||
fi
|
||||
unset build_date_file
|
||||
|
||||
_read_profile
|
||||
_set_overrides
|
||||
_validate_options
|
||||
|
|
1893
packages.x86_64
|
@ -3,7 +3,7 @@
|
|||
|
||||
iso_name="melawy-linux"
|
||||
iso_label="Melawy-Linux-$(date +%Y%m)"
|
||||
iso_publisher="Melawy Linux <https://github.com/Melawy>"
|
||||
iso_publisher="Melawy Linux <https://melawy.ru>"
|
||||
iso_application="Melawy Linux Live/Rescue CD"
|
||||
iso_version="$(date +%Y.%m.%d)"
|
||||
install_dir="arch"
|
||||
|
@ -22,19 +22,33 @@ pacman_conf="airootfs/etc/pacman.conf"
|
|||
airootfs_image_type="squashfs"
|
||||
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
|
||||
file_permissions=(
|
||||
["/etc/shadow"]="0:0:400"
|
||||
["/etc/gshadow"]="0:0:400"
|
||||
["/root"]="0:0:750"
|
||||
["/root/.automated_script.sh"]="0:0:755"
|
||||
["/usr/local/bin/choose-mirror"]="0:0:755"
|
||||
["/usr/local/bin/Installation_guide"]="0:0:755"
|
||||
["/usr/local/bin/livecd-sound"]="0:0:755"
|
||||
["/etc/polkit-1/rules.d"]="0:0:750"
|
||||
["/etc/shadow"]="0:0:400"
|
||||
["/etc/sudoers.d"]="0:0:750"
|
||||
["/etc/sudoers.d/g_wheel"]="0:0:440"
|
||||
["/usr/local/bin/displaymanager-check"]="0:0:755"
|
||||
["/root"]="0:0:750"
|
||||
["/root/.automated_script.sh"]="0:0:755"
|
||||
["/root/.gnupg"]="0:0:700"
|
||||
["/usr/local/bin/GPU-Intel-installer"]="0:0:755"
|
||||
["/usr/local/bin/Installation_guide"]="0:0:755"
|
||||
["/usr/local/bin/all-cores"]="0:0:755"
|
||||
["/usr/local/bin/calamares-offline.sh"]="0:0:755"
|
||||
["/usr/local/bin/calamares-online.sh"]="0:0:755"
|
||||
["/usr/local/bin/choose-mirror"]="0:0:755"
|
||||
["/usr/local/bin/device-info"]="0:0:755"
|
||||
["/usr/local/bin/dmcheck"]="0:0:755"
|
||||
["/usr/local/bin/fix-keys"]="0:0:755"
|
||||
["/usr/bin/GPU-Intel-installer"]="0:0:755"
|
||||
["/usr/bin/device-info"]="0:0:755"
|
||||
["/usr/bin/melawy-linux-connection-checker"]="0:0:755"
|
||||
)
|
||||
["/usr/local/bin/fsprogschk"]="0:0:755"
|
||||
["/usr/local/bin/livecd-sound"]="0:0:755"
|
||||
["/usr/local/bin/melawy-linux-connection-checker"]="0:0:755"
|
||||
["/usr/local/bin/melawy-linux-final"]="0:0:755"
|
||||
["/usr/local/bin/prepare-live-desktop.sh"]="0:0:755"
|
||||
["/usr/local/bin/remove-nvidia"]="0:0:755"
|
||||
["/usr/local/bin/removeun"]="0:0:755"
|
||||
["/usr/local/bin/removeun-online"]="0:0:755"
|
||||
["/usr/local/bin/services"]="0:0:755"
|
||||
["/usr/local/bin/skel"]="0:0:755"
|
||||
["/usr/local/bin/ucode"]="0:0:755"
|
||||
["/usr/local/bin/vcheck"]="0:0:755"
|
||||
)
|
||||
|
|