build.sh: stub modprobe in the container; loop autoloads host-side
Some checks failed
image / image (push) Failing after 16s
Some checks failed
image / image (push) Failing after 16s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
24f0b786dc
commit
c2c2e90d3a
1 changed files with 7 additions and 0 deletions
7
build.sh
7
build.sh
|
|
@ -28,6 +28,13 @@ if [ "$(id -u)" = 0 ]; then
|
||||||
apk add -q git sudo openssl python3 py3-pip multipath-tools util-linux
|
apk add -q git sudo openssl python3 py3-pip multipath-tools util-linux
|
||||||
pip install -q --break-system-packages \
|
pip install -q --break-system-packages \
|
||||||
git+https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git@3.11.1
|
git+https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git@3.11.1
|
||||||
|
# The container cannot modprobe (no /lib/modules in here), but it doesn't
|
||||||
|
# need to: the host kernel autoloads the loop driver when losetup opens
|
||||||
|
# the static /dev/loop-control node. Make pmbootstrap's explicit
|
||||||
|
# 'sudo modprobe loop' a no-op (/usr/local/sbin precedes /sbin in sudo's
|
||||||
|
# secure_path).
|
||||||
|
printf '#!/bin/sh\nexit 0\n' > /usr/local/sbin/modprobe
|
||||||
|
chmod +x /usr/local/sbin/modprobe
|
||||||
id build >/dev/null 2>&1 || adduser -D build
|
id build >/dev/null 2>&1 || adduser -D build
|
||||||
echo 'build ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/build
|
echo 'build ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/build
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue