Apply ceos_install_todo.md fixes

- df -kP: POSIX mode prevents LVM line-wrap false WARNs (all tier scripts)
- 11_wiki: glow from @testing on x86_64; CE repo path kept for ARM
- 12_access: ly from @testing on x86_64+aarch64; MANUAL stub for armhf;
  post-install: rc-update add ly default + comment tty2 getty in inittab
- 05_fonts: nerd-fonts-all from v3.23 stable community (no @edge tag)
- ce-common: add ohiod_address()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
John A. Hoeven 2026-06-12 01:32:07 +02:00
commit e4ab10ef56
7 changed files with 42 additions and 26 deletions

View file

@ -35,7 +35,7 @@ phase_preflight() {
run_test "bash >= 4" '[[ "${BASH_VERSINFO[0]}" -ge 4 ]]' fail
run_test "arch detected" '[[ -n "${ARCH}" ]]' fail
run_test "apk available" 'command -v apk >/dev/null 2>&1' fail
run_test "disk >= 500MB" '[[ $(df -k / | awk "NR==2{print \$4}") -ge 512000 ]]' warn
run_test "disk >= 500MB" '[[ $(df -kP / | awk "NR==2{print \$4}") -ge 512000 ]]' warn
run_test "internet reachable" \
'curl --silent --max-time 10 --output /dev/null https://dl-cdn.alpinelinux.org' warn
log_info "Arch: ${ARCH}"

View file

@ -40,7 +40,7 @@ phase_preflight() {
run_test "community repo enabled" 'grep -q "^[^#].*community" /etc/apk/repositories' fail
run_test "internet reachable" \
'curl --silent --max-time 10 --output /dev/null https://dl-cdn.alpinelinux.org' warn
run_test "disk >= 2GB" '[[ $(df -k / | awk "NR==2{print \$4}") -ge 2097152 ]]' warn
run_test "disk >= 2GB" '[[ $(df -kP / | awk "NR==2{print \$4}") -ge 2097152 ]]' warn
log_info "Arch: ${ARCH}"
log_info "Pre-flight complete"
}

View file

@ -40,7 +40,7 @@ phase_preflight() {
run_test "community repo enabled" 'grep -q "^[^#].*community" /etc/apk/repositories' fail
run_test "internet reachable" \
'curl --silent --max-time 10 --output /dev/null https://dl-cdn.alpinelinux.org' warn
run_test "disk >= 1GB" '[[ $(df -k / | awk "NR==2{print \$4}") -ge 1048576 ]]' warn
run_test "disk >= 1GB" '[[ $(df -kP / | awk "NR==2{print \$4}") -ge 1048576 ]]' warn
log_info "Arch: ${ARCH}"
log_info "Pre-flight complete"
}

View file

@ -18,16 +18,8 @@ install_basic_fonts() {
install_pkg "figlet"
run_test "figlet present" 'command -v figlet >/dev/null 2>&1' warn
# nerd-fonts-all — edge/community; 'nerd-fonts' meta-package blocks install by design
ensure_edge_repo
log_info "Installing nerd-fonts-all from @edge/community..."
if install_pkg_edge "nerd-fonts-all"; then
log_info "nerd-fonts-all installed"
else
log_warn "nerd-fonts-all@edge not available — skipping gracefully"
MANUAL_PKGS+=("nerd-fonts: edge install failed — check pkgs.alpinelinux.org/packages?name=nerd-fonts-all&branch=edge")
fi
# nerd-fonts-all — v3.23 stable community; no tag needed
install_pkg "nerd-fonts-all"
}
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then

View file

@ -14,6 +14,12 @@
[[ -n "${CE_COMMON_LOADED:-}" ]] && return 0
CE_COMMON_LOADED=1
# ohiod_address — address the Organic Humanoid I/O Device by unit ID
ohiod_address() {
local unit_id="${SUDO_USER:-${USER}}"
echo "Organic Humanoid I/O Device unit ID ${unit_id}"
}
# Architecture detection
ARCH="$(uname -m)"

View file

@ -13,9 +13,7 @@
# Defines install_minimal_wiki().
# ---------------------------------------------------------------------------
install_minimal_wiki() {
log_info "--- minimal/11_wiki: glow (CE repo) ---"
install_minimal_wiki_ce_repo() {
local CE_REPO_HOST="https://cervelloelettrico.it/bin"
local CE_REPO="${CE_REPO_HOST}/${ARCH}/alpine"
local INSTALL_DIR="${HOME}/.local/bin"
@ -24,7 +22,6 @@ install_minimal_wiki() {
mkdir -p "${INSTALL_DIR}"
# Abort cleanly if CE repo unreachable
if ! curl --silent --max-time 10 --output /dev/null "${CE_REPO}/glow"; then
log_warn "CE repo unreachable (${CE_REPO}) — skipping glow"
FAILED_PKGS+=("glow (CE repo unreachable)")
@ -34,9 +31,9 @@ install_minimal_wiki() {
log_info "Downloading glow, sha256, and sig from CE repo..."
local ok=1
curl --silent --max-time 30 -o "${TEMP_DIR}/glow" "${CE_REPO}/glow" || ok=0
curl --silent --max-time 30 -o "${TEMP_DIR}/glow" "${CE_REPO}/glow" || ok=0
curl --silent --max-time 10 -o "${TEMP_DIR}/glow.sha256" "${CE_REPO}/glow.sha256" || ok=0
curl --silent --max-time 10 -o "${TEMP_DIR}/glow.sig" "${CE_REPO}/glow.sig" || ok=0
curl --silent --max-time 10 -o "${TEMP_DIR}/glow.sig" "${CE_REPO}/glow.sig" || ok=0
if [[ "${ok}" -eq 0 ]]; then
log_warn "glow download incomplete — skipping install"
@ -45,7 +42,6 @@ install_minimal_wiki() {
return 0
fi
# SHA256 verification
local expected actual
expected="$(awk '{print $1}' "${TEMP_DIR}/glow.sha256")"
actual="$(sha256sum "${TEMP_DIR}/glow" | awk '{print $1}')"
@ -57,7 +53,6 @@ install_minimal_wiki() {
fi
log_info "glow SHA256 verified"
# GPG signature verification (gnupg available from 04_vcs)
if command -v gpg >/dev/null 2>&1; then
if gpg --verify "${TEMP_DIR}/glow.sig" "${TEMP_DIR}/glow" >> "${LOG_FILE}" 2>&1; then
log_info "glow GPG signature verified"
@ -74,11 +69,24 @@ install_minimal_wiki() {
chmod +x "${TEMP_DIR}/glow"
cp "${TEMP_DIR}/glow" "${INSTALL_DIR}/glow"
rm -rf "${TEMP_DIR}"
run_test "glow installed" 'command -v glow >/dev/null 2>&1' warn
log_info "glow installed to ${INSTALL_DIR}/glow"
}
install_minimal_wiki() {
log_info "--- minimal/11_wiki: glow ---"
if [[ "${ARCH}" == "x86_64" ]]; then
# glow available in Alpine edge/testing for x86_64
ensure_testing_repo
install_pkg_testing "glow"
run_test "glow installed" 'command -v glow >/dev/null 2>&1' warn
else
# ARM: pull binary from CE repo (TODO: populate Forgejo bin/ tree per arch)
install_minimal_wiki_ce_repo
fi
}
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
SCRIPT_NAME="11_wiki"

View file

@ -36,10 +36,20 @@ install_minimal_access() {
ensure_edge_repo
install_pkg_edge "speech-dispatcher"
# ly login manager — CE repo, aarch64 only — skip on x86-64
if [[ "${ARCH}" == "x86_64" ]]; then
log_info "NOTICE: ly login manager — CE repo aarch64 only, not available for x86-64 — skipped"
MANUAL_PKGS+=("ly: aarch64 CE repo only — not available for x86-64 (${ARCH})")
# ly login manager — testing for x86_64 + aarch64; armhf needs CE repo source build
if [[ "${ARCH}" == "armhf" ]]; then
log_warn "ly: not in Alpine testing for armhf — requires CE repo source build"
MANUAL_PKGS+=("ly: not in Alpine testing for armhf — CE repo source build required")
else
ensure_testing_repo
install_pkg_testing "ly"
if command -v ly >/dev/null 2>&1; then
doas rc-update add ly default >> "${LOG_FILE}" 2>&1 \
|| log_warn "ly: rc-update add failed — enable manually"
doas sed -i 's|^tty2::respawn:|#tty2::respawn:|' /etc/inittab >> "${LOG_FILE}" 2>&1 \
|| log_warn "ly: could not comment out tty2 getty in /etc/inittab — check manually"
log_info "ly installed and enabled on default runlevel"
fi
fi
}