treewide: stop calling or recommending doas

With the switch to sudo-rs, v26.06 and edge installs do not have
doas by default. Along with this, we installed doas on old installs
with doas-sudo-shim, so the call to sudo also works there. Therefore,
recommending and calling sudo is the correct option here.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8873>
This commit is contained in:
Aster Boese 2026-06-20 17:58:31 +02:00 committed by The Friendly Meow (merge) Bot
parent 6347ed4510
commit 4db7d49d53
No known key found for this signature in database
5 changed files with 19 additions and 19 deletions

View file

@ -2,7 +2,7 @@
maintainer="Clayton Craft <clayton@craftyguy.net>"
pkgname=device-apple-mac-aarch64
pkgdesc="Apple M-series Macs"
pkgver=8
pkgver=9
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@ -82,5 +82,5 @@ sha512sums="
f111ddc0484f079af23520dcc9b4d909b55da327aec91545921a4ceafc52b21d88f37fbdb702e51ca1e49440b6afc2011ada8b681c1801f572bddc9cd34c9d9e initramfs_copy_vendorfw.sh
11d5d6af50ed73e7e6940f7d56730f94a1bb42990d5dba9a798522060e7717c410c025b12def0345b4f43c97da268dabcb484c3004d23c1ac39b1eeaaefd2967 initramfs_setup_vendorfw.sh
da0da9f07bb6f05d2275fc58c1ef0e3c3895def53dbc8247e73806b6e9ab88f005efae01f9fb8f5f8c7bdcc5f4d734900c634d804ea0f154f511ca0ef7f4c9a1 modules-initfs
7b9a75b2d471be7eef06d4f4b6bff64a2164fd23332311388e1a1962a63b18dfed4d2252a910302313f556c84030ef92cdca4f853f9076874776db070b1c09cc os-installer-deploy.sh
a34b81824d0aa402562d2e578dbe4963486152dbdbaa0cd88df6895f4f2ce7552c619e9fd598d9dfb13401a8abc753ad6643b4118ba70eac1c90854fc3bcf447 os-installer-deploy.sh
"

View file

@ -29,22 +29,22 @@ fi
cleanup() {
# Unmount ESP and image ESP if mounted
if mountpoint -q /mnt/esp 2>/dev/null; then
doas umount /mnt/esp
sudo umount /mnt/esp
fi
if mountpoint -q /mnt/image-esp 2>/dev/null; then
doas umount /mnt/image-esp
sudo umount /mnt/image-esp
fi
# Detach loop device
if [ -n "$LOOP_DEV" ] && [ -e "$LOOP_DEV" ]; then
doas losetup -d "$LOOP_DEV"
sudo losetup -d "$LOOP_DEV"
fi
}
trap cleanup EXIT INT TERM
# Set up loop device to access image partitions
LOOP_DEV=$(doas losetup --find --show --partscan "$IMAGE_PATH")
LOOP_DEV=$(sudo losetup --find --show --partscan "$IMAGE_PATH")
# TODO: Don't hardcode partition layout assumptions
# Currently assuming: p1=ESP/boot, p2=root partition
@ -55,7 +55,7 @@ IMG_ROOT_PART="${LOOP_DEV}p2"
# set the ESP's filesystem UUID to the UUID of the image's ESP. This saves us
# from having to mount (and optionally decrypt) the image's rootfs to change
# fstab...
IMG_ESP_UUID=$(doas blkid -s UUID -o value "$IMG_ESP_PART")
IMG_ESP_UUID=$(sudo blkid -s UUID -o value "$IMG_ESP_PART")
if [ -z "$IMG_ESP_UUID" ]; then
echo "ERROR: Could not get ESP UUID from image!"
exit 1
@ -64,12 +64,12 @@ fi
# Convert FAT32 UUID format (1234-5678) to 8-digit hex vol. ID (12345678)
IMG_ESP_VOL_ID=$(echo "$IMG_ESP_UUID" | tr -d '-')
echo "Setting target ESP serial to match image: $IMG_ESP_VOL_ID"
doas fatlabel -i "$ESP_PART_DEV" "$IMG_ESP_VOL_ID"
sudo fatlabel -i "$ESP_PART_DEV" "$IMG_ESP_VOL_ID"
# Generate repart config and use CopyBlocks for block-level copy, which should
# preserve filesystem UUID, and (optional) luks
doas mkdir -p /run/repart.d
doas tee /run/repart.d/70-pmos-root.conf > /dev/null <<EOF
sudo mkdir -p /run/repart.d
sudo tee /run/repart.d/70-pmos-root.conf > /dev/null <<EOF
[Partition]
Type=root
CopyBlocks=${IMG_ROOT_PART}
@ -77,10 +77,10 @@ SizeMinBytes=5G
EOF
# Create the rootfs on target device
doas systemd-repart --dry-run=no "$OSI_DEVICE_PATH"
sudo systemd-repart --dry-run=no "$OSI_DEVICE_PATH"
# Mount ESP partitions and copy contents
doas mkdir -p /mnt/esp /mnt/image-esp
doas mount "$ESP_PART_DEV" /mnt/esp
doas mount "$IMG_ESP_PART" /mnt/image-esp
doas cp -a /mnt/image-esp/* /mnt/esp/
sudo mkdir -p /mnt/esp /mnt/image-esp
sudo mount "$ESP_PART_DEV" /mnt/esp
sudo mount "$IMG_ESP_PART" /mnt/image-esp
sudo cp -a /mnt/image-esp/* /mnt/esp/

View file

@ -51,7 +51,7 @@ Users and system administrators can override kernel command line configuration b
To add parameters, create a config file:
```
doas $EDITOR /etc/kernel-cmdline.d/custom.conf
sudo $EDITOR /etc/kernel-cmdline.d/custom.conf
```
To remove a parameter that was set by distro or device config, prefix it with `-`:

View file

@ -1,7 +1,7 @@
# Co-Maintainer: Achill Gilgenast <achill@achill.org>
maintainer="Clayton Craft <clayton@craftyguy.net>"
pkgname=postmarketos-base
pkgver=63
pkgver=64
pkgrel=0
pkgdesc="Meta package for minimal postmarketOS base"
url="https://postmarketos.org"

View file

@ -21,8 +21,8 @@ if [ -d /bin -a ! -L /bin ] || \
echo "* ERROR: The /usr merge was not attempted due to filesystem"
echo "* conflicts. Your installation might have deviated from stock in"
echo "* unsupported ways. If you can resolve the conflicts yourself,"
echo "* you can try running 'doas merge-usr --dryrun', and if there are"
echo "* no more conflicts, 'doas merge-usr'. Otherwise, feel free to"
echo "* you can try running 'sudo merge-usr --dryrun', and if there are"
echo "* no more conflicts, 'sudo merge-usr'. Otherwise, feel free to"
echo "* ask for help commenting in"
echo "* https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6389"
exit 1