docker lett a build itt is illetve javítva lett a yaru és gdm sddm re lett leváltva

This commit is contained in:
Airmancooma 2025-04-15 18:39:44 +02:00
parent 0b5807ab3f
commit 4195a2a4cf
3475 changed files with 5002 additions and 644 deletions

View file

@ -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 "################################################################"

View file

@ -1 +0,0 @@
custom.db.tar.gz

Binary file not shown.

View file

@ -1 +0,0 @@
custom.files.tar.gz

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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

View 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
View file

@ -0,0 +1,11 @@
To install Arch Linux follow the installation guide:
https://wiki.archlinux.org/title/Installation_guide
For Wi-Fi, authenticate to the wireless network using the iwctl utility.
For mobile broadband (WWAN) modems, connect with the mmcli 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 Installation_guide.
                                          

View 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

View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 681 B

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 B

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 889 B

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 834 B

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Some files were not shown because too many files have changed in this diff Show more