Skip to content

Commit 9f21f37

Browse files
Merge pull request #108 from Githubguy132010/dev
Major refactor
2 parents a47b188 + 3a9dbaa commit 9f21f37

File tree

15 files changed

+402
-32
lines changed

15 files changed

+402
-32
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ jobs:
8585
rm -rf workdir/ out/
8686
mkdir -p out/
8787
88+
# Fix the profiledef.sh file to ensure correct SquashFS options
89+
sed -i 's/-threads/-Xcompression-threads/' profiledef.sh || true
90+
91+
# Verify SquashFS options
92+
echo '=== Checking SquashFS options in profiledef.sh ==='
93+
grep 'airootfs_image_tool_options' profiledef.sh
94+
8895
# Build the ISO with verbose output
8996
mkarchiso -v -w workdir/ -o out/ . 2>&1 | tee build.log || {
9097
echo '::error::ISO build failed!'

.github/workflows/dockerfile-check.yaml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,57 @@ on:
66
workflow_dispatch:
77
schedule:
88
# Run the workflow on the 1st of every month at midnight
9-
- cron: 0 0 * * *
9+
- cron: '0 0 1 * *'
1010

1111
jobs:
1212
build:
13-
runs-on: ubuntu-latest # Use a standard runner
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 120 # Add a timeout to prevent hung builds
1415

1516
steps:
1617
- name: Checkout Repository
1718
uses: actions/checkout@v4
1819

19-
- name: Build and Run Docker container
20+
- name: Set up Environment
2021
run: |
21-
set -e # Exit immediately if a command exits with a non-zero status
22-
docker build -t arch-iso-builder . || { echo "Docker build failed"; exit 1; }
23-
docker run --rm --privileged -v "$(pwd)":/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ." || { echo "ISO creation failed"; exit 1; }
22+
echo "Setting up environment..."
23+
mkdir -p out
24+
chmod +x scripts/entrypoint.sh
25+
chmod +x scripts/select-mirrors.sh
26+
chmod +x profiledef.sh
27+
28+
- name: Build Docker Image
29+
run: |
30+
echo "Building Docker image..."
31+
docker build -t arch-iso-builder . || {
32+
echo "::error::Docker build failed"
33+
exit 1
34+
}
35+
36+
- name: Validate Configuration
37+
run: |
38+
echo "Validating configuration..."
39+
docker run --rm -v "$(pwd)":/workdir arch-iso-builder validate || {
40+
echo "::error::Configuration validation failed"
41+
exit 1
42+
}
43+
44+
- name: Build ISO
45+
run: |
46+
echo "Building ISO..."
47+
# Create a small-scale test build with output to verify the process works
48+
docker run --rm --privileged \
49+
-v "$(pwd)":/workdir \
50+
arch-iso-builder build out work || {
51+
echo "::error::ISO build failed"
52+
exit 1
53+
}
54+
55+
# Verify that output directory contains files
56+
if [ ! -d "out" ] || [ -z "$(ls -A out 2>/dev/null)" ]; then
57+
echo "::error::Output directory is empty or does not exist"
58+
exit 1
59+
else
60+
echo "ISO build process completed successfully!"
61+
ls -la out
62+
fi

airootfs/etc/inputrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Disable all bell sounds in readline applications
2+
set bell-style none
3+
4+
# Make Tab autocomplete regardless of filename case
5+
set completion-ignore-case on
6+
7+
# Show all autocomplete results at once
8+
set page-completions off
9+
10+
# If there are more than 200 possible completions for a word, ask to show them all
11+
set completion-query-items 200
12+
13+
# Show extra file information when completing, like `ls -F` does
14+
set visible-stats on
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Performance optimizations for mkinitcpio
2+
# Use all available CPU cores for compression
3+
COMPRESSION_OPTIONS=(-T0)
4+
5+
# Use faster zstd compression with good ratio
6+
COMPRESSION="zstd"
7+
8+
# Use better hooks order for faster boot
9+
HOOKS=(base udev autodetect modconf block filesystems keyboard)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Disable PC speaker beeps through ALSA
2+
options snd_hda_intel beep_mode=0
3+
options snd_hda_core beep_mode=0
4+
# Some hardware may require this as well
5+
options snd-pcsp index=-2
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Disable PC Speaker
2+
blacklist pcspkr
3+
blacklist snd_pcsp
4+
5+
# Disable additional beep modules
6+
blacklist hpilo
7+
blacklist ipmi_si
8+
blacklist hpwdt
9+
blacklist toshiba_acpi
10+
11+
# PC speaker options if module is loaded anyway
12+
options pcspkr enable=0
13+
options snd_pcsp enable=0
14+
15+
# Explicitly install the dummy module instead
16+
install pcspkr /bin/true
17+
install snd_pcsp /bin/true

airootfs/etc/skel/.bashrc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# ~/.bashrc: executed by bash for non-login shells
2+
3+
# Disable terminal bell in bash
4+
bind 'set bell-style none'
5+
6+
# If not running interactively, don't do anything else
7+
[[ $- != *i* ]] && return
8+
9+
# Color prompt
10+
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
11+
12+
# Enable color support
13+
alias ls='ls --color=auto'
14+
alias grep='grep --color=auto'
15+
alias fgrep='fgrep --color=auto'
16+
alias egrep='egrep --color=auto'
17+
18+
# Add useful aliases
19+
alias ll='ls -l'
20+
alias la='ls -la'
21+
22+
# History settings
23+
HISTCONTROL=ignoreboth
24+
HISTSIZE=1000
25+
HISTFILESIZE=2000
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[Unit]
2+
Description=Disable system beeps
3+
Documentation=https://github.com/Githubguy132010/Arch-Linux-without-the-beeps
4+
DefaultDependencies=no
5+
Before=sysinit.target
6+
After=local-fs.target
7+
8+
[Service]
9+
Type=oneshot
10+
RemainAfterExit=yes
11+
ExecStart=/bin/bash -c "rmmod pcspkr snd_pcsp 2>/dev/null || true"
12+
ExecStart=/bin/bash -c "echo 'blacklist pcspkr' > /etc/modprobe.d/nobeep.conf"
13+
ExecStart=/bin/bash -c "echo 'blacklist snd_pcsp' >> /etc/modprobe.d/nobeep.conf"
14+
ExecStart=/bin/bash -c "if [ -f /sys/module/i8042/parameters/nopnp ]; then echo 1 > /sys/module/i8042/parameters/nopnp; fi"
15+
16+
[Install]
17+
WantedBy=sysinit.target
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/systemd/system/no-beep.service

dockerfile

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
1-
FROM archlinux:latest
1+
FROM archlinux:latest AS builder
22

3-
# Install necessary packages
3+
# Set up parallel downloads and other optimizations
4+
COPY pacman.conf /etc/pacman.conf
5+
6+
# Update system and install necessary packages
47
RUN pacman -Syu --noconfirm && \
5-
pacman -S --noconfirm git archiso grub
8+
pacman -S --noconfirm --needed \
9+
git \
10+
archiso \
11+
grub \
12+
base-devel \
13+
&& pacman -Scc --noconfirm
14+
15+
# Set the working directory
16+
WORKDIR /build
17+
18+
# Copy only necessary files for package installation
19+
COPY packages.x86_64 bootstrap_packages.x86_64 profiledef.sh ./
20+
21+
# Create a new final image
22+
FROM builder AS final
623

724
# Set the working directory
825
WORKDIR /workdir
926

10-
# Copy files into the container
27+
# Copy the rest of the files
1128
COPY . .
1229

13-
# Instead of running mkarchiso here, we leave it for later execution
14-
# Create an entrypoint or leave it to manual execution
15-
CMD ["/bin/bash"]
30+
# Use an entrypoint script for better flexibility
31+
COPY ./scripts/entrypoint.sh /entrypoint.sh
32+
RUN chmod +x /entrypoint.sh
33+
34+
ENTRYPOINT ["/entrypoint.sh"]
35+
CMD ["build"]

0 commit comments

Comments
 (0)