docker lett a build itt is illetve javítva lett a yaru és gdm sddm re lett leváltva
|
@ -1,67 +1,166 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
##################################################################################################################
|
||||
# Custom Arch ISO Builder Script
|
||||
# Custom Arch ISO Builder Script (Linux Version)
|
||||
##################################################################################################################
|
||||
|
||||
# Get absolute path of script directory
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Check if running on btrfs
|
||||
if lsblk -f | grep btrfs > /dev/null 2>&1; then
|
||||
echo "Warning: Building on BTRFS filesystem. Make backups before continuing."
|
||||
read -p "Press Enter to continue... CTRL + C to stop"
|
||||
fi
|
||||
|
||||
# Setting general parameters
|
||||
buildFolder="$SCRIPT_DIR/build"
|
||||
outFolder="$SCRIPT_DIR/out"
|
||||
dockerImageName="arch-iso-builder-gnome"
|
||||
dockerContainerName="arch-iso-builder-gnome-container"
|
||||
|
||||
# Get current user ID and group ID
|
||||
HOST_UID=$(id -u)
|
||||
HOST_GID=$(id -g)
|
||||
|
||||
# Check if Docker is installed
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "Docker is not installed. Installing Docker..."
|
||||
sudo pacman -S --noconfirm docker
|
||||
|
||||
# Start and enable Docker service
|
||||
echo "Starting Docker service..."
|
||||
sudo systemctl start docker
|
||||
sudo systemctl enable docker
|
||||
|
||||
# Add current user to docker group to avoid using sudo
|
||||
echo "Adding current user to docker group..."
|
||||
sudo usermod -aG docker $(whoami)
|
||||
|
||||
echo "Docker installation completed. You may need to log out and back in for group changes to take effect."
|
||||
echo "Continuing with Docker as root for now..."
|
||||
fi
|
||||
|
||||
# Check if Docker daemon is running
|
||||
if ! docker info &> /dev/null; then
|
||||
echo "Docker daemon is not running. Starting Docker service..."
|
||||
sudo systemctl start docker
|
||||
|
||||
# Wait for Docker daemon to start (with timeout)
|
||||
echo "Waiting for Docker daemon to start..."
|
||||
max_attempts=10
|
||||
attempt=1
|
||||
while ! docker info &> /dev/null; do
|
||||
if [ $attempt -gt $max_attempts ]; then
|
||||
echo "Error: Docker daemon failed to start after $max_attempts attempts."
|
||||
echo "Please try starting it manually with: sudo systemctl start docker"
|
||||
exit 1
|
||||
fi
|
||||
echo "Attempt $attempt/$max_attempts: Docker daemon not ready yet. Waiting 2 seconds..."
|
||||
sleep 2
|
||||
attempt=$((attempt+1))
|
||||
done
|
||||
echo "Docker daemon is now running."
|
||||
fi
|
||||
|
||||
echo "################################################################"
|
||||
echo "Build folder: $buildFolder"
|
||||
echo "Out folder : $outFolder"
|
||||
echo "################################################################"
|
||||
echo "Building in Docker - using all CPU cores"
|
||||
echo "################################################################"
|
||||
|
||||
# Check if archiso is installed
|
||||
if ! pacman -Qi archiso &> /dev/null; then
|
||||
echo "Installing archiso..."
|
||||
sudo pacman -S --noconfirm archiso
|
||||
# Create Docker image if it doesn't exist
|
||||
if ! docker image inspect "$dockerImageName" &>/dev/null; then
|
||||
echo "Creating Docker image: $dockerImageName..."
|
||||
# Create temporary Dockerfile
|
||||
cat > "$SCRIPT_DIR/Dockerfile" << EOF
|
||||
FROM archlinux:latest
|
||||
|
||||
# Update system and install required packages
|
||||
RUN pacman -Syu --noconfirm && \
|
||||
pacman -S --noconfirm archiso base-devel git sudo
|
||||
|
||||
# Create a build user with same UID as host user
|
||||
RUN useradd -m -G wheel -u $HOST_UID builder && \
|
||||
echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
# Set up working directory
|
||||
WORKDIR /build
|
||||
|
||||
# Keep container running for reuse
|
||||
CMD ["/bin/bash"]
|
||||
EOF
|
||||
|
||||
# Build Docker image
|
||||
docker build -t "$dockerImageName" -f "$SCRIPT_DIR/Dockerfile" "$SCRIPT_DIR"
|
||||
|
||||
# Remove temporary Dockerfile
|
||||
rm "$SCRIPT_DIR/Dockerfile"
|
||||
fi
|
||||
|
||||
# Make mkarchiso verbose
|
||||
sudo sed -i 's/quiet="y"/quiet="n"/g' /usr/bin/mkarchiso
|
||||
# Check if container exists
|
||||
if docker container inspect "$dockerContainerName" &>/dev/null; then
|
||||
# Container exists, check if it's running
|
||||
if [ "$(docker container inspect -f '{{.State.Running}}' "$dockerContainerName")" != "true" ]; then
|
||||
echo "Starting existing Docker container: $dockerContainerName..."
|
||||
docker start "$dockerContainerName"
|
||||
else
|
||||
echo "Using existing running Docker container: $dockerContainerName..."
|
||||
fi
|
||||
else
|
||||
# Container doesn't exist, create and start it
|
||||
echo "Creating and starting Docker container: $dockerContainerName..."
|
||||
docker run -d \
|
||||
--name "$dockerContainerName" \
|
||||
--privileged \
|
||||
--cpus="$(nproc)" \
|
||||
-v "$SCRIPT_DIR:/build" \
|
||||
"$dockerImageName" \
|
||||
tail -f /dev/null
|
||||
fi
|
||||
|
||||
echo "Cleaning build environment..."
|
||||
[ -d "$buildFolder" ] && sudo rm -rf "$buildFolder"
|
||||
mkdir -p "$buildFolder"
|
||||
# Create required directories
|
||||
mkdir -p "$buildFolder" "$outFolder"
|
||||
|
||||
echo "Copying releng folder to build directory..."
|
||||
cp -r "$SCRIPT_DIR/releng" "$buildFolder/"
|
||||
|
||||
#echo "Cleaning pacman cache..."
|
||||
#yes | sudo pacman -Scc
|
||||
|
||||
echo "Creating output directory..."
|
||||
mkdir -p "$outFolder"
|
||||
|
||||
echo "Building ISO..."
|
||||
cd "$buildFolder/releng"
|
||||
sudo mkarchiso -v -w "$buildFolder" -o "$outFolder" "$PWD"
|
||||
|
||||
# Save package list
|
||||
echo "Saving package list..."
|
||||
rename=$(date +%Y-%m-%d)
|
||||
cp "$buildFolder/iso/arch/pkglist.x86_64.txt" "$outFolder/archlinux-$rename-pkglist.txt"
|
||||
|
||||
echo "Cleaning build environment..."
|
||||
[ -d "$buildFolder" ] && sudo rm -rf "$buildFolder"
|
||||
|
||||
sudo chown -R $USER:$GROUP "$outFolder"
|
||||
# Run the build process inside Docker
|
||||
echo "Building ISO in Docker container..."
|
||||
docker exec -it "$dockerContainerName" bash -c "
|
||||
cd /build && \
|
||||
# Make mkarchiso verbose
|
||||
sudo sed -i 's/quiet=\"y\"/quiet=\"n\"/g' /usr/bin/mkarchiso && \
|
||||
# Clean build environment
|
||||
[ -d \"/build/build\" ] && sudo rm -rf \"/build/build\" && \
|
||||
mkdir -p \"/build/build\" && \
|
||||
# Copy releng folder
|
||||
cp -r \"/build/releng\" \"/build/build/\" && \
|
||||
# Copy pkgs folder (if it exists), then generate repo db
|
||||
if [ -d \"/build/pkgs\" ]; then
|
||||
cp -r \"/build/pkgs\" \"/build/build/\" && \
|
||||
echo \"Copied pkgs folder to build directory\" && \
|
||||
if ls /build/build/pkgs/*.pkg.tar.* 1>/dev/null 2>&1; then
|
||||
echo \"Generating local repository database (repo-add custom.db.tar.gz) ...\" && \
|
||||
sudo repo-add /build/build/pkgs/custom.db.tar.gz /build/build/pkgs/*.pkg.tar.* && \
|
||||
echo \"Local repo database created.\"
|
||||
else
|
||||
echo \"No .pkg.tar.* files found in pkgs. Skipping repo-add.\"
|
||||
fi
|
||||
else
|
||||
echo \"Warning: pkgs folder not found in \$SCRIPT_DIR\"
|
||||
fi && \
|
||||
# Create output directory
|
||||
mkdir -p \"/build/out\" && \
|
||||
# Build ISO
|
||||
cd \"/build/build/releng\" && \
|
||||
sudo mkarchiso -v -w \"/build/build\" -o \"/build/out\" \"\$PWD\" && \
|
||||
# Save package list
|
||||
rename=\$(date +%Y-%m-%d) && \
|
||||
if [ -f \"/build/build/iso/arch/pkglist.x86_64.txt\" ]; then
|
||||
sudo cp \"/build/build/iso/arch/pkglist.x86_64.txt\" \"/build/out/archlinux-\$rename-pkglist.txt\"
|
||||
fi && \
|
||||
# Clean build environment
|
||||
sudo rm -rf \"/build/build\" && \
|
||||
# Fix permissions on out folder
|
||||
sudo chown -R $HOST_UID:$HOST_GID \"/build/out\"
|
||||
"
|
||||
|
||||
echo "################################################################"
|
||||
echo "DONE"
|
||||
echo "Check your out folder: $outFolder"
|
||||
echo "################################################################"
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
custom.db.tar.gz
|
|
@ -1 +0,0 @@
|
|||
custom.files.tar.gz
|
BIN
pkgs/yaru-gnome-shell-theme-25.04.1-1-any.pkg.tar.zst
Normal file
BIN
pkgs/yaru-gtk-theme-25.04.1-1-any.pkg.tar.zst
Normal file
BIN
pkgs/yaru-gtksourceview-theme-25.04.1-1-any.pkg.tar.zst
Normal file
BIN
pkgs/yaru-session-25.04.1-1-any.pkg.tar.zst
Normal file
|
@ -243,6 +243,8 @@ running-indicator-dominant-color=true
|
|||
running-indicator-style='DOTS'
|
||||
shift-click-action='minimize'
|
||||
shift-middle-click-action='launch'
|
||||
show-icons-emblems=false
|
||||
show-icons-notifications-counter=false
|
||||
show-mounts=false
|
||||
show-show-apps-button=true
|
||||
show-trash=false
|
||||
|
|
8
releng/airootfs/etc/mkinitcpio.d/linux.preset
Normal file
|
@ -0,0 +1,8 @@
|
|||
# mkinitcpio preset file for the 'linux' package on archiso
|
||||
|
||||
PRESETS=('archiso')
|
||||
|
||||
ALL_kver='/boot/vmlinuz-linux'
|
||||
archiso_config='/etc/mkinitcpio.conf.d/archiso.conf'
|
||||
|
||||
archiso_image="/boot/initramfs-linux.img"
|
11
releng/airootfs/etc/motd
Normal file
|
@ -0,0 +1,11 @@
|
|||
To install [38;2;23;147;209mArch Linux[0m follow the installation guide:
|
||||
https://wiki.archlinux.org/title/Installation_guide
|
||||
|
||||
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.
|
||||
|
||||
After connecting to the internet, the installation guide can be accessed
|
||||
via the convenience script [35mInstallation_guide[0m.
|
||||
|
||||
[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
|
38
releng/airootfs/etc/sddm.conf
Normal file
|
@ -0,0 +1,38 @@
|
|||
[General]
|
||||
InputMethod=
|
||||
Namespaces=
|
||||
Numlock=on
|
||||
|
||||
[Theme]
|
||||
DisableAvatarsThreshold=7
|
||||
EnableAvatars=true
|
||||
FacesDir=/usr/share/sddm/faces
|
||||
ThemeDir=/usr/share/sddm/themes
|
||||
|
||||
[Users]
|
||||
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
|
||||
HideShells=
|
||||
HideUsers=
|
||||
RememberLastSession=true
|
||||
RememberLastUser=true
|
||||
ReuseSession=true
|
||||
|
||||
[Wayland]
|
||||
EnableHiDPI=true
|
||||
SessionCommand=/usr/share/sddm/scripts/wayland-session
|
||||
SessionDir=/usr/share/wayland-sessions
|
||||
SessionLogFile=.local/share/sddm/wayland-session.log
|
||||
|
||||
[X11]
|
||||
DisplayCommand=/usr/share/sddm/scripts/Xsetup
|
||||
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
|
||||
EnableHiDPI=true
|
||||
MinimumVT=1
|
||||
ServerArguments=-nolisten tcp
|
||||
ServerPath=/usr/bin/X
|
||||
SessionCommand=/usr/share/sddm/scripts/Xsession
|
||||
SessionDir=/usr/share/xsessions
|
||||
SessionLogFile=.local/share/sddm/xorg-session.log
|
||||
UserAuthFile=.Xauthority
|
||||
XauthPath=/usr/bin/xauth
|
||||
XephyrPath=/usr/bin/Xephyr
|
17
releng/airootfs/etc/sddm.conf.d/kde_settings.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Autologin]
|
||||
Relogin=false
|
||||
User=liveuser
|
||||
Session=
|
||||
|
||||
[General]
|
||||
HaltCommand=/usr/bin/systemctl poweroff
|
||||
RebootCommand=/usr/bin/systemctl reboot
|
||||
|
||||
[Theme]
|
||||
Current=raveos-sddm
|
||||
CursorTheme=Yaru
|
||||
Font=
|
||||
|
||||
[Users]
|
||||
MaximumUid=60513
|
||||
MinimumUid=1000
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 435 B |
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 419 B |
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 898 B After Width: | Height: | Size: 903 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 848 B |
Before Width: | Height: | Size: 873 B After Width: | Height: | Size: 870 B |
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 760 B |
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 842 B |
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 896 B |
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 883 B After Width: | Height: | Size: 887 B |
Before Width: | Height: | Size: 875 B After Width: | Height: | Size: 882 B |
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 889 B After Width: | Height: | Size: 884 B |
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 900 B After Width: | Height: | Size: 898 B |
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 748 B After Width: | Height: | Size: 758 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 758 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 651 B |
Before Width: | Height: | Size: 809 B After Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 496 B |
Before Width: | Height: | Size: 494 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 895 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |