Skip to content

Draft: Minify trailblazer and ensure we always enable PAM for ssh

Caleb Connolly requested to merge caleb/minify into master
  1. Introduce a new postmarketos-base-ssh subpackage to contain this config file, since we ALWAYS want this when openssh-server-pam is installed, even if we don't have base-ui (e.g. because someone installed openssh on top of a "none" install).

  2. Move a bunch of packages from depends= to recommends= for trailblazer.

None of the devices running trailblazer actually need all these daemons or firmware. Move almost everything to recommends so that users can free up space and so that customised images can be built with --no-recommends.

Since there are some folks already using trailblazer who DO depend on these packages, let's try something new to ensure the packages don't get uninstalled.

This might be unacceptable, but it seems to work nicely in a chroot. I am however worried of the possible effects of killing apk... But it terminates cleanly with SIGTERM, so..?

Here is the full output of running apk upgrade -a with this magic .pre-upgrade script:

/ # apk upgrade -a
WARNING: opening /mnt/pmbootstrap/packages/systemd-edge: No such file or directory
The following packages will be REMOVED:
  bluez-btmgmt bluez-deprecated bootmac bootmac-systemd dtbloader dtbloader-boot-deploy firmware-brcm43752
  firmware-siliconlabs-rs9116 glib libintl libstdc++ linux-firmware-ath10k linux-firmware-ath11k linux-firmware-ath12k
  linux-firmware-qca linux-firmware-qcom linux-firmware-rtw88 pcre2 pd-mapper qbootctl qrtr-libs rmtfs soc-qcom-qbootctl tqftpserv
  woa-firmware-yoinker woa-firmware-yoinker-systemd
The following packages will be upgraded:
  device-postmarketos-trailblazer postmarketos-base
After this operation, 118 MiB of disk space will be freed.
Do you want to continue [Y/n]?
(1/28) Purging bootmac-systemd (0.6.0-r0)
Executing bootmac-systemd-0.6.0-r0.pre-deinstall
(2/28) Purging dtbloader-boot-deploy (1.3.0-r0)
(3/28) Purging woa-firmware-yoinker-systemd (0.0.1-r0)
(4/28) Upgrading postmarketos-base (40-r1 -> 41-r0)
(5/28) Upgrading device-postmarketos-trailblazer (12-r1 -> 12-r3)
Executing device-postmarketos-trailblazer-12-r3.pre-upgrade


ERROR: some packages that your device might need are no longer installed
       automatically. To ensure your device continues to function as expected
       they will be automatically installed for you

       This is done to allow for these packages to become optional without breaking existing
       installations which depend on them being installed via depends=

       APK will automatically re-start after adding the packages
Terminated
/ #

[pmb-recommends] $ apk --wait 3 add linux-firmware-qcom linux-firmware-ath10k linux-firmware-ath11k linux-firmware-ath12k linux-firmware-qca linux-firmware-rtw88 firmware-siliconlabs-rs9116 firmware-brcm43752 soc-qcom-qbootctl rmtfs pd-mapper tqftpserv bootmac woa-firmware-yoinker dtbloader
WARNING: opening /mnt/pmbootstrap/packages/systemd-edge: No such file or directory
OK: 224 MiB in 179 packages
[pmb-recommends] $ apk upgrade -a
WARNING: opening /mnt/pmbootstrap/packages/systemd-edge: No such file or directory
(1/2) Upgrading postmarketos-base (40-r1 -> 41-r0)
(2/2) Upgrading device-postmarketos-trailblazer (12-r1 -> 12-r3)
Executing device-postmarketos-trailblazer-12-r3.pre-upgrade
ERROR: device-postmarketos-trailblazer-12-r3.pre-upgrade: script exited with error 1
Executing busybox-1.37.0-r14.trigger
Executing postmarketos-mkinitfs-2.6.1-r0.trigger
1 error; 224 MiB in 179 packages
[pmb-recommends] $ printf '\n\nNOTE: Errors from device-postmarketos-trailblazer are safe to ignore!\n\n'


NOTE: Errors from device-postmarketos-trailblazer are safe to ignore!

[pmb-recommends] $ apk fix
WARNING: opening /mnt/pmbootstrap/packages/systemd-edge: No such file or directory
(1/1) Reinstalling device-postmarketos-trailblazer (12-r3)
Executing device-postmarketos-trailblazer-12-r3.pre-upgrade
Executing postmarketos-mkinitfs-2.6.1-r0.trigger
OK: 224 MiB in 179 packages
[pmb-recommends] $ set +x

The following packages were moved from depends= to recommends= and were automatically installed.
You may remove them if you do not need them:
 * linux-firmware-qcom
 * linux-firmware-ath10k
 * linux-firmware-ath11k
 * linux-firmware-ath12k
 * linux-firmware-qca
 * linux-firmware-rtw88
 * firmware-siliconlabs-rs9116
 * firmware-brcm43752
 * soc-qcom-qbootctl
 * rmtfs
 * pd-mapper
 * tqftpserv
 * bootmac
 * woa-firmware-yoinker
 * dtbloader

/ #
Edited by Caleb Connolly

Merge request reports

Loading