detached b2d4a25

feat(repos): implement Phase 5 with AUR support (yay) and Chaotic-AUR repository

commit
b2d4a255c9dfc28f6420a77eb772819fa7a934db
author
bnema · · 2025-10-19 07:49 UTC
parent
763f191
signature
unsigned
6 files · +124 -12
M Makefile +2 -2
@@ -20,7 +20,7 @@ check-syntax:
2020 @echo "========================================="
2121 @echo "Checking shell script syntax..."
2222 @echo "========================================="
23- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh; do \
23+ @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
2424 if [ -f "$$script" ]; then \
2525 echo "Checking: $$script"; \
2626 bash -n "$$script" || exit 1; \
@@ -39,7 +39,7 @@ check-shellcheck:
3939 echo "Install with: sudo pacman -S shellcheck"; \
4040 exit 0; \
4141 fi
42- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh; do \
42+ @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
4343 if [ -f "$$script" ]; then \
4444 echo ""; \
4545 echo "Checking: $$script"; \
@@ -20,7 +20,7 @@ check-syntax:
20 @echo "========================================="20 @echo "========================================="
21 @echo "Checking shell script syntax..."21 @echo "Checking shell script syntax..."
22 @echo "========================================="22 @echo "========================================="
23- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh; do \23+ @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
24 if [ -f "$$script" ]; then \24 if [ -f "$$script" ]; then \
25 echo "Checking: $$script"; \25 echo "Checking: $$script"; \
26 bash -n "$$script" || exit 1; \26 bash -n "$$script" || exit 1; \
@@ -39,7 +39,7 @@ check-shellcheck:
39 echo "Install with: sudo pacman -S shellcheck"; \39 echo "Install with: sudo pacman -S shellcheck"; \
40 exit 0; \40 exit 0; \
41 fi41 fi
42- @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh; do \42+ @for script in install.sh install/helpers/*.sh install/preflight/*.sh install/partitioning/*.sh install/base/*.sh install/config/*.sh install/boot/*.sh install/repos/*.sh; do \
43 if [ -f "$$script" ]; then \43 if [ -f "$$script" ]; then \
44 echo ""; \44 echo ""; \
45 echo "Checking: $$script"; \45 echo "Checking: $$script"; \
M README.md +10 -6
@@ -9,6 +9,7 @@
99 ✅ **Phase 2: Add btrfs + LUKS Encryption - COMPLETE**
1010 ✅ **Phase 3: Limine Bootloader - COMPLETE**
1111 ✅ **Phase 4: Kernel Selection + Microcode - COMPLETE**
12+✅ **Phase 5: Repository Setup (AUR + Chaotic) - COMPLETE**
1213
1314 ### Completed
1415 - ✅ Project structure created
@@ -29,6 +30,8 @@
2930 - ✅ Kernel selection (linux, linux-lts, linux-zen)
3031 - ✅ Auto-detected CPU microcode (intel-ucode or amd-ucode)
3132 - ✅ AMD P-State driver selection (active/guided/passive)
33+- ✅ Optional AUR support (yay helper installation)
34+- ✅ Optional Chaotic-AUR repository
3235
3336 ### Project Structure
3437 ```
@@ -142,7 +145,9 @@ sudo ./install.sh
142145 9. Installs base packages with pacstrap (kernel + microcode + cryptsetup if encrypted)
143146 10. Configures system (timezone, locale, hostname, user)
144147 11. Installs Limine bootloader (with encryption and AMD tuning if enabled)
145-12. Creates bootable minimal Arch system with btrfs
148+12. Optionally installs yay AUR helper (if user enables AUR support)
149+13. Optionally adds Chaotic-AUR repository (pre-built AUR packages)
150+14. Creates bootable minimal Arch system with btrfs
146151
147152 ## Environment Variables
148153
@@ -152,11 +157,10 @@ sudo ./install.sh
152157
153158 ## Next Steps
154159
155-**Phase 5: Repository Setup (AUR + Chaotic)** (Week 3-4)
156-- [ ] Ask user to enable AUR support (install yay)
157-- [ ] Ask user to enable Chaotic-AUR repository
158-- [ ] Test yay installation from AUR
159-- [ ] Test Chaotic-AUR package installation
160+**Phase 6: Barebone Preset Complete + Testing** (Week 4)
161+- [ ] Add keyboard layout + WiFi migration from ISO
162+- [ ] Test matrix for all combinations
163+- [ ] Production-ready barebone installer
160164
161165 ## Reference
162166
@@ -9,6 +9,7 @@
9 ✅ **Phase 2: Add btrfs + LUKS Encryption - COMPLETE**9 ✅ **Phase 2: Add btrfs + LUKS Encryption - COMPLETE**
10 ✅ **Phase 3: Limine Bootloader - COMPLETE**10 ✅ **Phase 3: Limine Bootloader - COMPLETE**
11 ✅ **Phase 4: Kernel Selection + Microcode - COMPLETE**11 ✅ **Phase 4: Kernel Selection + Microcode - COMPLETE**
12+✅ **Phase 5: Repository Setup (AUR + Chaotic) - COMPLETE**
12 13
13 ### Completed14 ### Completed
14 - ✅ Project structure created15 - ✅ Project structure created
@@ -29,6 +30,8 @@
29 - ✅ Kernel selection (linux, linux-lts, linux-zen)30 - ✅ Kernel selection (linux, linux-lts, linux-zen)
30 - ✅ Auto-detected CPU microcode (intel-ucode or amd-ucode)31 - ✅ Auto-detected CPU microcode (intel-ucode or amd-ucode)
31 - ✅ AMD P-State driver selection (active/guided/passive)32 - ✅ AMD P-State driver selection (active/guided/passive)
33+- ✅ Optional AUR support (yay helper installation)
34+- ✅ Optional Chaotic-AUR repository
32 35
33 ### Project Structure36 ### Project Structure
34 ```37 ```
@@ -142,7 +145,9 @@ sudo ./install.sh
142 9. Installs base packages with pacstrap (kernel + microcode + cryptsetup if encrypted)145 9. Installs base packages with pacstrap (kernel + microcode + cryptsetup if encrypted)
143 10. Configures system (timezone, locale, hostname, user)146 10. Configures system (timezone, locale, hostname, user)
144 11. Installs Limine bootloader (with encryption and AMD tuning if enabled)147 11. Installs Limine bootloader (with encryption and AMD tuning if enabled)
145-12. Creates bootable minimal Arch system with btrfs148+12. Optionally installs yay AUR helper (if user enables AUR support)
149+13. Optionally adds Chaotic-AUR repository (pre-built AUR packages)
150+14. Creates bootable minimal Arch system with btrfs
146 151
147 ## Environment Variables152 ## Environment Variables
148 153
@@ -152,11 +157,10 @@ sudo ./install.sh
152 157
153 ## Next Steps158 ## Next Steps
154 159
155-**Phase 5: Repository Setup (AUR + Chaotic)** (Week 3-4)160+**Phase 6: Barebone Preset Complete + Testing** (Week 4)
156-- [ ] Ask user to enable AUR support (install yay)161+- [ ] Add keyboard layout + WiFi migration from ISO
157-- [ ] Ask user to enable Chaotic-AUR repository162+- [ ] Test matrix for all combinations
158-- [ ] Test yay installation from AUR163+- [ ] Production-ready barebone installer
159-- [ ] Test Chaotic-AUR package installation
160 164
161 ## Reference165 ## Reference
162 166
M install.sh +3 -4
@@ -36,13 +36,12 @@ source "$ARCHUP_INSTALL/config/all.sh"
3636 # Bootloader installation
3737 source "$ARCHUP_INSTALL/boot/all.sh"
3838
39+# Repository setup (AUR + Chaotic)
40+source "$ARCHUP_INSTALL/repos/all.sh"
41+
3942 # ============================================================
4043 # FUTURE PHASES (TO BE IMPLEMENTED)
4144 # ============================================================
42-# Phase 2: Add btrfs + LUKS encryption
43-# Phase 3: Add Limine bootloader option
44-# Phase 4: Kernel selection + microcode
45-# Phase 5: Repository setup (AUR + Chaotic)
4645 # Phase 6: Barebone preset testing
4746 # Phase 7: Default preset (GUI)
4847
@@ -36,13 +36,12 @@ source "$ARCHUP_INSTALL/config/all.sh"
36 # Bootloader installation36 # Bootloader installation
37 source "$ARCHUP_INSTALL/boot/all.sh"37 source "$ARCHUP_INSTALL/boot/all.sh"
38 38
39+# Repository setup (AUR + Chaotic)
40+source "$ARCHUP_INSTALL/repos/all.sh"
41+
39 # ============================================================42 # ============================================================
40 # FUTURE PHASES (TO BE IMPLEMENTED)43 # FUTURE PHASES (TO BE IMPLEMENTED)
41 # ============================================================44 # ============================================================
42-# Phase 2: Add btrfs + LUKS encryption
43-# Phase 3: Add Limine bootloader option
44-# Phase 4: Kernel selection + microcode
45-# Phase 5: Repository setup (AUR + Chaotic)
46 # Phase 6: Barebone preset testing45 # Phase 6: Barebone preset testing
47 # Phase 7: Default preset (GUI)46 # Phase 7: Default preset (GUI)
48 47
A install/repos/all.sh +5 -0
@@ -0,0 +1,5 @@
1+#!/bin/bash
2+# Repository setup phase orchestrator
3+
4+run_logged "$ARCHUP_INSTALL/repos/yay.sh"
5+run_logged "$ARCHUP_INSTALL/repos/chaotic.sh"
@@ -0,0 +1,5 @@
1+#!/bin/bash
2+# Repository setup phase orchestrator
3+
4+run_logged "$ARCHUP_INSTALL/repos/yay.sh"
5+run_logged "$ARCHUP_INSTALL/repos/chaotic.sh"
A install/repos/chaotic.sh +53 -0
@@ -0,0 +1,53 @@
1+#!/bin/bash
2+# Add Chaotic-AUR repository
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Chaotic-AUR Repository"
5+echo
6+
7+# Ask if user wants Chaotic-AUR
8+if ! gum confirm "Enable Chaotic-AUR repository?" --padding "0 0 1 $PADDING_LEFT"; then
9+ gum style --foreground 3 --padding "0 0 1 $PADDING_LEFT" "⊘ Skipping Chaotic-AUR"
10+ echo "Chaotic-AUR: disabled" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
11+ export ARCHUP_CHAOTIC="disabled"
12+ return 0
13+fi
14+
15+export ARCHUP_CHAOTIC="enabled"
16+
17+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Adding Chaotic-AUR repository..."
18+gum style --padding "0 0 1 $PADDING_LEFT" "Installing keyring and mirrorlist..."
19+
20+# Install Chaotic-AUR keyring and mirrorlist
21+arch-chroot /mnt pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
22+arch-chroot /mnt pacman-key --lsign-key 3056513887B78AEB
23+
24+# Install chaotic-keyring and chaotic-mirrorlist
25+arch-chroot /mnt pacman -U --noconfirm \
26+ 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' \
27+ 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
28+
29+# Add Chaotic-AUR to pacman.conf
30+if ! grep -q "\[chaotic-aur\]" /mnt/etc/pacman.conf; then
31+ cat >> /mnt/etc/pacman.conf <<EOF
32+
33+# Chaotic-AUR repository
34+[chaotic-aur]
35+Include = /etc/pacman.d/chaotic-mirrorlist
36+EOF
37+
38+ gum style --foreground 2 --padding "0 0 0 $PADDING_LEFT" "✓ Added Chaotic-AUR to pacman.conf"
39+fi
40+
41+# Update package databases
42+arch-chroot /mnt pacman -Sy
43+
44+# Verify Chaotic-AUR is working
45+if arch-chroot /mnt pacman -Sl chaotic-aur >/dev/null 2>&1; then
46+ gum style --foreground 2 --padding "1 0 1 $PADDING_LEFT" "✓ Chaotic-AUR enabled successfully"
47+ echo "Chaotic-AUR: enabled (repo added to pacman.conf)" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
48+else
49+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "✗ Chaotic-AUR verification failed"
50+ echo "WARNING: Chaotic-AUR verification failed" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
51+ export ARCHUP_CHAOTIC="failed"
52+ return 1
53+fi
@@ -0,0 +1,53 @@
1+#!/bin/bash
2+# Add Chaotic-AUR repository
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Chaotic-AUR Repository"
5+echo
6+
7+# Ask if user wants Chaotic-AUR
8+if ! gum confirm "Enable Chaotic-AUR repository?" --padding "0 0 1 $PADDING_LEFT"; then
9+ gum style --foreground 3 --padding "0 0 1 $PADDING_LEFT" "⊘ Skipping Chaotic-AUR"
10+ echo "Chaotic-AUR: disabled" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
11+ export ARCHUP_CHAOTIC="disabled"
12+ return 0
13+fi
14+
15+export ARCHUP_CHAOTIC="enabled"
16+
17+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Adding Chaotic-AUR repository..."
18+gum style --padding "0 0 1 $PADDING_LEFT" "Installing keyring and mirrorlist..."
19+
20+# Install Chaotic-AUR keyring and mirrorlist
21+arch-chroot /mnt pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
22+arch-chroot /mnt pacman-key --lsign-key 3056513887B78AEB
23+
24+# Install chaotic-keyring and chaotic-mirrorlist
25+arch-chroot /mnt pacman -U --noconfirm \
26+ 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' \
27+ 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
28+
29+# Add Chaotic-AUR to pacman.conf
30+if ! grep -q "\[chaotic-aur\]" /mnt/etc/pacman.conf; then
31+ cat >> /mnt/etc/pacman.conf <<EOF
32+
33+# Chaotic-AUR repository
34+[chaotic-aur]
35+Include = /etc/pacman.d/chaotic-mirrorlist
36+EOF
37+
38+ gum style --foreground 2 --padding "0 0 0 $PADDING_LEFT" "✓ Added Chaotic-AUR to pacman.conf"
39+fi
40+
41+# Update package databases
42+arch-chroot /mnt pacman -Sy
43+
44+# Verify Chaotic-AUR is working
45+if arch-chroot /mnt pacman -Sl chaotic-aur >/dev/null 2>&1; then
46+ gum style --foreground 2 --padding "1 0 1 $PADDING_LEFT" "✓ Chaotic-AUR enabled successfully"
47+ echo "Chaotic-AUR: enabled (repo added to pacman.conf)" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
48+else
49+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "✗ Chaotic-AUR verification failed"
50+ echo "WARNING: Chaotic-AUR verification failed" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
51+ export ARCHUP_CHAOTIC="failed"
52+ return 1
53+fi
A install/repos/yay.sh +51 -0
@@ -0,0 +1,51 @@
1+#!/bin/bash
2+# Install yay AUR helper
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "AUR Support"
5+echo
6+
7+# Ask if user wants AUR support
8+if ! gum confirm "Enable AUR support (install yay)?" --padding "0 0 1 $PADDING_LEFT"; then
9+ gum style --foreground 3 --padding "0 0 1 $PADDING_LEFT" "⊘ Skipping AUR support"
10+ echo "AUR: disabled" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
11+ export ARCHUP_AUR="disabled"
12+ return 0
13+fi
14+
15+export ARCHUP_AUR="enabled"
16+
17+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Installing yay AUR helper..."
18+gum style --padding "0 0 1 $PADDING_LEFT" "This may take a few minutes..."
19+
20+# Install base-devel if not already installed (required for building AUR packages)
21+arch-chroot /mnt pacman -S --noconfirm --needed base-devel git
22+
23+# Get the username created during installation
24+USERNAME=$(arch-chroot /mnt ls /home | head -1)
25+
26+if [ -z "$USERNAME" ]; then
27+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "✗ Error: Could not find user for yay installation"
28+ echo "ERROR: No user found for yay installation" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
29+ export ARCHUP_AUR="failed"
30+ return 1
31+fi
32+
33+# Clone yay-bin from AUR as the user (not root)
34+arch-chroot /mnt su - "$USERNAME" -c "cd /tmp && git clone https://aur.archlinux.org/yay-bin.git"
35+
36+# Build and install yay as the user
37+arch-chroot /mnt su - "$USERNAME" -c "cd /tmp/yay-bin && makepkg -si --noconfirm"
38+
39+# Clean up
40+arch-chroot /mnt rm -rf /tmp/yay-bin
41+
42+# Verify installation
43+if arch-chroot /mnt su - "$USERNAME" -c "yay --version" >/dev/null 2>&1; then
44+ gum style --foreground 2 --padding "1 0 1 $PADDING_LEFT" "✓ yay installed successfully"
45+ echo "AUR: enabled (yay installed for user: $USERNAME)" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
46+else
47+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "✗ yay installation failed"
48+ echo "ERROR: yay installation failed" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
49+ export ARCHUP_AUR="failed"
50+ return 1
51+fi
@@ -0,0 +1,51 @@
1+#!/bin/bash
2+# Install yay AUR helper
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "AUR Support"
5+echo
6+
7+# Ask if user wants AUR support
8+if ! gum confirm "Enable AUR support (install yay)?" --padding "0 0 1 $PADDING_LEFT"; then
9+ gum style --foreground 3 --padding "0 0 1 $PADDING_LEFT" "⊘ Skipping AUR support"
10+ echo "AUR: disabled" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
11+ export ARCHUP_AUR="disabled"
12+ return 0
13+fi
14+
15+export ARCHUP_AUR="enabled"
16+
17+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Installing yay AUR helper..."
18+gum style --padding "0 0 1 $PADDING_LEFT" "This may take a few minutes..."
19+
20+# Install base-devel if not already installed (required for building AUR packages)
21+arch-chroot /mnt pacman -S --noconfirm --needed base-devel git
22+
23+# Get the username created during installation
24+USERNAME=$(arch-chroot /mnt ls /home | head -1)
25+
26+if [ -z "$USERNAME" ]; then
27+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "✗ Error: Could not find user for yay installation"
28+ echo "ERROR: No user found for yay installation" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
29+ export ARCHUP_AUR="failed"
30+ return 1
31+fi
32+
33+# Clone yay-bin from AUR as the user (not root)
34+arch-chroot /mnt su - "$USERNAME" -c "cd /tmp && git clone https://aur.archlinux.org/yay-bin.git"
35+
36+# Build and install yay as the user
37+arch-chroot /mnt su - "$USERNAME" -c "cd /tmp/yay-bin && makepkg -si --noconfirm"
38+
39+# Clean up
40+arch-chroot /mnt rm -rf /tmp/yay-bin
41+
42+# Verify installation
43+if arch-chroot /mnt su - "$USERNAME" -c "yay --version" >/dev/null 2>&1; then
44+ gum style --foreground 2 --padding "1 0 1 $PADDING_LEFT" "✓ yay installed successfully"
45+ echo "AUR: enabled (yay installed for user: $USERNAME)" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
46+else
47+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "✗ yay installation failed"
48+ echo "ERROR: yay installation failed" | tee -a "$ARCHUP_INSTALL_LOG_FILE"
49+ export ARCHUP_AUR="failed"
50+ return 1
51+fi

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close