detached 740acb2

feat(multilib): enable multilib repository on ISO and installed system

commit
740acb2b34f689e8e2cb85a48e4d35b2614d5fc1
author
bnema · · 2025-10-21 16:35 UTC
committer
bnema · · 2025-10-21 20:23 UTC
parent
f63c5c5
signature
unsigned
8 files · +56 -3
M CHANGELOG.md +1 -0
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77 ### Added
88 - **zram swap**: Configured zram-generator for compressed in-memory swap with optimized sysctl parameters
99 - **Broadcom WiFi**: Added broadcom-wl driver to base packages for Broadcom wireless support
10+- **Multilib support**: Enabled multilib repository on ISO and installed system with reusable helper
1011
1112 ### Changed
1213 - **Disk selection**: Enhanced disk listing with model, serial, and vendor information using JSON output
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
7 ### Added7 ### Added
8 - **zram swap**: Configured zram-generator for compressed in-memory swap with optimized sysctl parameters8 - **zram swap**: Configured zram-generator for compressed in-memory swap with optimized sysctl parameters
9 - **Broadcom WiFi**: Added broadcom-wl driver to base packages for Broadcom wireless support9 - **Broadcom WiFi**: Added broadcom-wl driver to base packages for Broadcom wireless support
10+- **Multilib support**: Enabled multilib repository on ISO and installed system with reusable helper
10 11
11 ### Changed12 ### Changed
12 - **Disk selection**: Enhanced disk listing with model, serial, and vendor information using JSON output13 - **Disk selection**: Enhanced disk listing with model, serial, and vendor information using JSON output
M install/base/all.sh +1 -0
@@ -5,6 +5,7 @@ stop_log_output # Stop for interactive prompt
55 source "$ARCHUP_INSTALL/base/kernel.sh" # Interactive (gum choose)
66 start_log_output # Resume after prompt
77
8+run_logged "$ARCHUP_INSTALL/base/enable-multilib.sh" # Enable multilib before pacstrap
89 run_logged "$ARCHUP_INSTALL/base/cachyos-repo.sh" # Configure CachyOS repo if needed
910 run_logged "$ARCHUP_INSTALL/base/pacstrap.sh" # Non-interactive (essential packages only)
1011 run_logged "$ARCHUP_INSTALL/base/fstab.sh" # Non-interactive
@@ -5,6 +5,7 @@ stop_log_output # Stop for interactive prompt
5 source "$ARCHUP_INSTALL/base/kernel.sh" # Interactive (gum choose)5 source "$ARCHUP_INSTALL/base/kernel.sh" # Interactive (gum choose)
6 start_log_output # Resume after prompt6 start_log_output # Resume after prompt
7 7
8+run_logged "$ARCHUP_INSTALL/base/enable-multilib.sh" # Enable multilib before pacstrap
8 run_logged "$ARCHUP_INSTALL/base/cachyos-repo.sh" # Configure CachyOS repo if needed9 run_logged "$ARCHUP_INSTALL/base/cachyos-repo.sh" # Configure CachyOS repo if needed
9 run_logged "$ARCHUP_INSTALL/base/pacstrap.sh" # Non-interactive (essential packages only)10 run_logged "$ARCHUP_INSTALL/base/pacstrap.sh" # Non-interactive (essential packages only)
10 run_logged "$ARCHUP_INSTALL/base/fstab.sh" # Non-interactive11 run_logged "$ARCHUP_INSTALL/base/fstab.sh" # Non-interactive
A install/base/enable-multilib.sh +15 -0
@@ -0,0 +1,15 @@
1+#!/bin/bash
2+# Enable multilib on ISO before pacstrap
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Enabling multilib repository..."
5+
6+# Enable multilib in ISO's pacman.conf
7+enable_multilib "/etc/pacman.conf"
8+
9+# Update package database
10+if ! run_with_spinner "Updating package database..." "pacman -Sy"; then
11+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "[ERROR] Failed to update package database"
12+ exit 1
13+fi
14+
15+gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] Multilib enabled"
@@ -0,0 +1,15 @@
1+#!/bin/bash
2+# Enable multilib on ISO before pacstrap
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Enabling multilib repository..."
5+
6+# Enable multilib in ISO's pacman.conf
7+enable_multilib "/etc/pacman.conf"
8+
9+# Update package database
10+if ! run_with_spinner "Updating package database..." "pacman -Sy"; then
11+ gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "[ERROR] Failed to update package database"
12+ exit 1
13+fi
14+
15+gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] Multilib enabled"
M install/helpers/all.sh +1 -0
@@ -7,3 +7,4 @@ source "$ARCHUP_INSTALL/helpers/presentation.sh"
77 source "$ARCHUP_INSTALL/helpers/logging.sh"
88 source "$ARCHUP_INSTALL/helpers/errors.sh"
99 source "$ARCHUP_INSTALL/helpers/chroot.sh"
10+source "$ARCHUP_INSTALL/helpers/multilib.sh"
@@ -7,3 +7,4 @@ source "$ARCHUP_INSTALL/helpers/presentation.sh"
7 source "$ARCHUP_INSTALL/helpers/logging.sh"7 source "$ARCHUP_INSTALL/helpers/logging.sh"
8 source "$ARCHUP_INSTALL/helpers/errors.sh"8 source "$ARCHUP_INSTALL/helpers/errors.sh"
9 source "$ARCHUP_INSTALL/helpers/chroot.sh"9 source "$ARCHUP_INSTALL/helpers/chroot.sh"
10+source "$ARCHUP_INSTALL/helpers/multilib.sh"
M install/helpers/download.sh +3 -3
@@ -30,7 +30,7 @@ download_archup_files() {
3030
3131 # Helpers
3232 download_section "Downloading helpers..." "helpers" \
33- all.sh config.sh logging.sh errors.sh presentation.sh chroot.sh cleanup.sh
33+ all.sh config.sh logging.sh errors.sh presentation.sh chroot.sh cleanup.sh multilib.sh
3434
3535 # Preflight
3636 download_section "Downloading preflight checks..." "preflight" \
@@ -42,7 +42,7 @@ download_archup_files() {
4242
4343 # Base system
4444 download_section "Downloading base system scripts..." "base" \
45- all.sh kernel.sh pacstrap.sh fstab.sh
45+ all.sh kernel.sh enable-multilib.sh cachyos-repo.sh pacstrap.sh fstab.sh
4646
4747 # Configuration
4848 download_section "Downloading config scripts..." "config" \
@@ -54,7 +54,7 @@ download_archup_files() {
5454
5555 # Repositories
5656 download_section "Downloading repository setup..." "repos" \
57- all.sh aur.sh chaotic.sh
57+ all.sh multilib.sh aur.sh chaotic.sh
5858
5959 # Post-install
6060 download_section "Downloading post-install scripts..." "post-install" \
@@ -30,7 +30,7 @@ download_archup_files() {
30 30
31 # Helpers31 # Helpers
32 download_section "Downloading helpers..." "helpers" \32 download_section "Downloading helpers..." "helpers" \
33- all.sh config.sh logging.sh errors.sh presentation.sh chroot.sh cleanup.sh33+ all.sh config.sh logging.sh errors.sh presentation.sh chroot.sh cleanup.sh multilib.sh
34 34
35 # Preflight35 # Preflight
36 download_section "Downloading preflight checks..." "preflight" \36 download_section "Downloading preflight checks..." "preflight" \
@@ -42,7 +42,7 @@ download_archup_files() {
42 42
43 # Base system43 # Base system
44 download_section "Downloading base system scripts..." "base" \44 download_section "Downloading base system scripts..." "base" \
45- all.sh kernel.sh pacstrap.sh fstab.sh45+ all.sh kernel.sh enable-multilib.sh cachyos-repo.sh pacstrap.sh fstab.sh
46 46
47 # Configuration47 # Configuration
48 download_section "Downloading config scripts..." "config" \48 download_section "Downloading config scripts..." "config" \
@@ -54,7 +54,7 @@ download_archup_files() {
54 54
55 # Repositories55 # Repositories
56 download_section "Downloading repository setup..." "repos" \56 download_section "Downloading repository setup..." "repos" \
57- all.sh aur.sh chaotic.sh57+ all.sh multilib.sh aur.sh chaotic.sh
58 58
59 # Post-install59 # Post-install
60 download_section "Downloading post-install scripts..." "post-install" \60 download_section "Downloading post-install scripts..." "post-install" \
A install/helpers/multilib.sh +25 -0
@@ -0,0 +1,25 @@
1+#!/bin/bash
2+# Helper function to enable multilib repository
3+
4+#######################################
5+# Description: Enable multilib in pacman.conf
6+# Arguments:
7+# $1 - Path to pacman.conf (optional, defaults to /etc/pacman.conf)
8+# Returns:
9+# 0 if successful, 1 on error
10+#######################################
11+enable_multilib() {
12+ local pacman_conf="${1:-/etc/pacman.conf}"
13+
14+ # Check if multilib is already enabled
15+ if grep -q "^\[multilib\]" "$pacman_conf"; then
16+ echo "Multilib already enabled in $pacman_conf" >> "$ARCHUP_INSTALL_LOG_FILE"
17+ return 0
18+ fi
19+
20+ # Uncomment multilib section
21+ sed -i '/^#\[multilib\]/,/^#Include = \/etc\/pacman.d\/mirrorlist/ s/^#//' "$pacman_conf"
22+
23+ echo "Multilib enabled in $pacman_conf" >> "$ARCHUP_INSTALL_LOG_FILE"
24+ return 0
25+}
@@ -0,0 +1,25 @@
1+#!/bin/bash
2+# Helper function to enable multilib repository
3+
4+#######################################
5+# Description: Enable multilib in pacman.conf
6+# Arguments:
7+# $1 - Path to pacman.conf (optional, defaults to /etc/pacman.conf)
8+# Returns:
9+# 0 if successful, 1 on error
10+#######################################
11+enable_multilib() {
12+ local pacman_conf="${1:-/etc/pacman.conf}"
13+
14+ # Check if multilib is already enabled
15+ if grep -q "^\[multilib\]" "$pacman_conf"; then
16+ echo "Multilib already enabled in $pacman_conf" >> "$ARCHUP_INSTALL_LOG_FILE"
17+ return 0
18+ fi
19+
20+ # Uncomment multilib section
21+ sed -i '/^#\[multilib\]/,/^#Include = \/etc\/pacman.d\/mirrorlist/ s/^#//' "$pacman_conf"
22+
23+ echo "Multilib enabled in $pacman_conf" >> "$ARCHUP_INSTALL_LOG_FILE"
24+ return 0
25+}
M install/repos/all.sh +1 -0
@@ -3,6 +3,7 @@
33
44 stop_log_output # Stop for interactive prompts
55
6+run_logged "$ARCHUP_INSTALL/repos/multilib.sh" # Non-interactive - Enable multilib first
67 source "$ARCHUP_INSTALL/repos/chaotic.sh" # Interactive (gum confirm) - MUST be before AUR
78 source "$ARCHUP_INSTALL/repos/aur.sh" # Interactive (gum confirm + choose)
89
@@ -3,6 +3,7 @@
3 3
4 stop_log_output # Stop for interactive prompts4 stop_log_output # Stop for interactive prompts
5 5
6+run_logged "$ARCHUP_INSTALL/repos/multilib.sh" # Non-interactive - Enable multilib first
6 source "$ARCHUP_INSTALL/repos/chaotic.sh" # Interactive (gum confirm) - MUST be before AUR7 source "$ARCHUP_INSTALL/repos/chaotic.sh" # Interactive (gum confirm) - MUST be before AUR
7 source "$ARCHUP_INSTALL/repos/aur.sh" # Interactive (gum confirm + choose)8 source "$ARCHUP_INSTALL/repos/aur.sh" # Interactive (gum confirm + choose)
8 9
A install/repos/multilib.sh +9 -0
@@ -0,0 +1,9 @@
1+#!/bin/bash
2+# Enable multilib in installed system
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring multilib repository..."
5+
6+# Enable multilib in installed system's pacman.conf
7+enable_multilib "/mnt/etc/pacman.conf"
8+
9+gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] Multilib configured"
@@ -0,0 +1,9 @@
1+#!/bin/bash
2+# Enable multilib in installed system
3+
4+gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring multilib repository..."
5+
6+# Enable multilib in installed system's pacman.conf
7+enable_multilib "/mnt/etc/pacman.conf"
8+
9+gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] Multilib configured"

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