main/postmarketos-ui-os-installer: don't run os-installer and pmbootstrap as root

I'm not sure what the original motivation for doing this was, I would
guess just to get a minimal viable product working as soon as possible.
But based on my current testing, with these changes along with an
earlier commit that disabled the password requirement for privilege
escalation with doas, it is unnecessary and also solves at least one bug.

Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3848

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6787
[ci:skip-build]: already built successfully in CI
This commit is contained in:
Stefan Hansson 2025-07-16 12:36:32 +02:00
parent 9962707c1e
commit 4456501395
No known key found for this signature in database
GPG key ID: ACD854892B38D898
3 changed files with 5 additions and 11 deletions

View file

@ -1,7 +1,7 @@
# Reference: https://postmarketos.org/uipkg
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-ui-os-installer
pkgver=2
pkgver=3
pkgrel=0
pkgdesc="UI for installing postmarketOS"
url="https://gitlab.gnome.org/p3732/os-installer"
@ -94,7 +94,7 @@ package() {
}
sha512sums="
7f0c1ad22753524f022696e14243bca776d0d3e5a2ea9652eb448bac1c3be8e04d6418fdcca9ebe8d6e3123c36b2bb7937ac0d1a42c9f0d6bd8512c8ef8c8e5d rootfs-etc-doas.d-os-installer.conf
ebbff3d4c55d631e5c75c7de77852ea77cf0bae67349536ae7714616dbe2baf7762dd71578779670fc97d286ab8b26834e2b857bb843da421a5a4e81d96b3c37 rootfs-etc-xdg-autostart-org.postmarketOS.os-installer.desktop
e1068808d7bd7a3aab92951bbad0a3d2d7051d39410777dc879ad832c5db725ba9a80ddb2dc1cd968fb4ef451f68593ee6428b3c20a54924e0dbd1096385e7ad rootfs-etc-xdg-autostart-org.postmarketOS.os-installer.desktop
e51733f5c75649206ec99b96486fc33419541dd8ff6fe2ccd9eb8cba0920a004c6190362342ecd943c99f6d6e7c5e41e1992dbe4f3f42180dfab08fa06436911 rootfs-etc-gdm-custom.conf
5d43fcfbbcda66497067eb665537b2e38e77f335ba58989e6a24af35f10e07cf1d10ba47cd7536de87bcf60fdb5c8582c7a84b7ffaa0c47c964b0b7ae6c95cae rootfs-usr-lib-sysusers.d-os-installer.conf
1d3268d5eed453a31bcdea1a9d6525a2a6f2172c7a54bdf0fbe6f01d6dbec4d4e793e5cabb03f97e80ae98a6a6712fc0391a2a1f0c19cf59f0bf698c06b10ac7 rootfs-usr-lib-tmpfiles.d-os-installer.conf
@ -104,5 +104,5 @@ e51733f5c75649206ec99b96486fc33419541dd8ff6fe2ccd9eb8cba0920a004c6190362342ecd94
48736338cb0ead62b394812455742ef162dcc4000a4059408c21d8b3881891d54d57c01c21d65c40134b1b394b943cd53732e6b437aa60aa596599783f09f025 rootfs-etc-os-installer-desktops-gnome.jpg
302261b7e63e259d70a77a9280a7e0abd909c0d389c7e5b873bfab96d87feb46768bc3feaf1a65e0820b9c25675d98ec34c990458f1c5aa0b273c9b754ade013 rootfs-etc-os-installer-desktops-kde.png
41528fc57c6df41440923f11d6c43ff179d437c2591406a75b38f47165d3a11f278032c449044f08cb4d335bb37be4fc42ec3998a59af9ad061449c375ce0433 rootfs-etc-os-installer-desktops-xfce.png
9299b7c55c1dd26447cadd9ab2deae635db56abee6731e1e195a7d376e0bcf97f829d3f355f713fd028a2ed7c0b267b8906bddba7b45771299dd58aac33a04ed rootfs-usr-bin-pmos_setup.sh
2a3503c8d91866a85954163a761937aab1595cde7e894e98b693f2426d11ab35b9e302284e09b35fce48aca14e1da71cec3a93e33a053628010d379e734ad22f rootfs-usr-bin-pmos_setup.sh
"

View file

@ -1,7 +1,7 @@
[Desktop Entry]
Name=Install postmarketOS
Icon=preferences-system
Exec=doas /usr/bin/os-installer
Exec=/usr/bin/os-installer
Terminal=false
Type=Application
StartupNotify=true

View file

@ -2,13 +2,7 @@
set -eu
# FIXME: Don't run this as root...
pmb="pmbootstrap --as-root -y"
if [ "$(id -u)" -ne 0 ]; then
echo "must be run as root! (FIXME)"
exit 1
fi
pmb="pmbootstrap -y"
do_prepare() {
yes '' | $pmb init