The package auto-update runs in a scheduled pipeline, it should be
the only job that runs however a discrepency in the rules for the
deploy-docs job results in it running as well.
To mitigate this, add an additional rule to never run the job in a
scheduled pipeline.
Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7457>
Add a generic device target which can boot on any of the Qualcomm
RB3/5/3Gen2 boards via systemd-boot. The boards are expected to have
U-Boot flashed as per the U-Boot documentation.
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6650
[ci:skip-build]: already built successfully in CI
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 letting users know about this at least.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6239
Introduce some basic infrastructure to allow running per-package unit
test jobs, as well as a library to support unit-testing shell scripts.
Packages can provide their own unit tests by adding a tests/
subdirectory to the package, this should contain a .gitlab-ci.yml file
with jobs that extend the .package-test job template as well as any
supporting data and scripts.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
These two functions echo their output, requiring the use of a subshell
to capture it. However they also attempt to cache the output in global
variables.
Unfortunately, we can't do both. Variables set in the subshell aren't
reflected in the parent shell.
Rework these functions so they take a variable to set as a parameter
(like the "read" command). This avoids spawning a subshell and enables
the caching functionality that was added previously.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
The iptables frontend for nftables seems to not play nice. Since we use
nftables in postmarketOS anyway, tell tailscale to use it directly. This
fixes routing not working and the following error seen in tailscale status
- adding [-i tailscale0 -j MARK --set-mark 0x40000/0xff0000] in v4/filter/ts-forward: running [/usr/sbin/iptables -t filter -A ts-forward -i tailscale0 -j MARK --set-mark 0x40000/0xff0000 --wait]: exit status 2: Warning: Extension MARK revision 0 not supported, missing kernel module?
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6344
What we want is to reload services that need to be reloaded after
upgrade (those that are marked with needs-reload or needs-restart), to
handle systemctl daemon-reload too, and to reload udev, sysusers,
tmpfiles, etc.
This all needs to be done in a particular order, which we would ideally
do with different triggers (and triggers with consistent ordering!), but
apk can't do that so instead we have this inefficient solution which
will probably do a bunch of useless processing. ah well
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
Currently the initramfs is littered with various code snippets which
read /proc/cmdline. This is error prone and results in more complicated
code especially as we want to standardise all the pmos specific cmdline
arguments, and where some arguments have the same behaviour as
deviceinfo variables.
Let's do the parsing correctly, once, and set global variables to
enable/disable/configure parts of the initramfs. At the same time
introduce namespaced and standard versions of the remaining arguments
which haven't been standardised yet.
Now (for example) to check if the splash is disabled, rather than
grepping /proc/cmdline for PMOS_NOSPLASH AND checking if
deviceinfo_no_framebuffer is true, you can just check if "$nosplash" =
"y".
This will drastically simplify the process of adding additional
configuration options in the future.
Most of the code here was taken from the Arch Linux initramfs and
simplified/adjusted to better fix our use case.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
Get dbus building in edge again. This regressed due to the cross-native2
work in pmb which stopped using abuild to install makedepends and does
it in pmb instead. But pmbootstrap's parsing logic can't handle
conditions in the APKBUILD.
Related: issue 3604
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:skip-build]: already built successfully in CI
PMEM aka persistent memory enables a region of memory to be treated as a
block device. This is particularly useful as a way for EFI bootloaders
to retrieve a full OS image (via HTTP) and make it accessible to the OS.
Support for this is making its way to U-Boot: https://lore.kernel.org/u-boot/20250203105912.196654-1-sughosh.ganu@linaro.org/
Let's enable this in postmarketOS so we can enable HTTP booting images
directly from postmarketOS.org.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:skip-build]: already built successfully in CI
Run e2fsck before resizing the root partition so that resize2fs will
actually succeed
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Tweaked-by: Oliver Smith <ollieparanoid@postmarketos.org>
[ci:skip-build]: already built successfully in CI
The null TTY driver provides a proper (dummy) TTY interface when
console=null is set on the kernel cmdline. This fixes certain
applications which don't correctly handle read() immediately returning
with 0 bytes (e.g. busybox syslogd).
Most normal EFI devices don't boot with console=null and as such there
are various foot-guns littered all over Linux userspace and even in our
own initramfs. However some android devices even enforce console=null,
so it's something we have to deal with.
NULL_TTY should reduce the chance of folks running into strange problems
because of this.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
when stdin is /dev/null (e.g. when console=null is on the kernel
cmdline) syslogd will call read() over and over and never handle the
SIGTERM we send it, pinning a CPU core on every boot.
Hooking up syslogd std I/O to /dev/zero prevents this.
Co-authored-by: Richard Acayan <mailingradian@gmail.com>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
[ci:skip-build]: already built successfully in CI
This tool is similar to msm-firmware-loader or droid-juicer, except it
copies firmware from Windows instead.
Currently when the ADSP loads the new firmware it causes a usb reset
which breaks booting from USB. For now ask people to run this manually
and ensure the adsp firmware isn't available on the USB.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Extend existing X1 Elite support with the modules needed to bring up the
Lenovo Yoga Slim 7x.
We could use the EFI framebuffer in the initramfs, however the
regulators are turned off before we get there so it goes blank. Pull in
all the bits for proper display/panel support.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
We actually want usr/lib/udevd here, not lib/udevd. This fixes the
initramfs not building and some other weirdness.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This is a hack to configure utilisation clamping for gnome-shell. It
works by telling the scheduler that the gnome-shell process should run
with a much higher performance level. This improve animation performance
and general UI smoothness. A proper solution to have gnome-shell manage
this itself is in the works upstream.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
For systemd (and our own sanity) we need to do the /usr merge. This fork
of apk-tools includes the logic to support alpine packages like tar
which install the main tar binary to /bin and then a symlink to
/usr/bin/...
We should find a way to implement this in upstream apk-tools, and
continue pushing Alpine to also adopt the merged /usr model.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
alpine-base hard depends on openrc... Fork it to drop this.
We should eventually upstream this by having alpine-base depend on a
virtual pid1 or init-system subpackage which openrc and systemd can both
provide.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
When enabling new options in kconfigcheck, it's likely that some kernels
in pmaports will fail, but often undesirable to rebuild all the kernels
particularly when the options being enabled are for quality of life.
Adjust the rules for the kconfig check job in CI so that it will fail
with a warning in this case, but still fail with an error when an
updated kernel package doesn't pass.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:skip-build]: already built successfully in CI
It's possible that additional sources have been made to an APKBUILD
which are unstaged, but if the hunks adding those sources haven't been
staged either then it doesn't make sense to fail on this.
Use git show to get only the staged hunks for the APKBUILD.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Many parts of the Linux desktop (apps, tools, scripts, etc) all expect
xdg-open and friends to be installed.
Since these utilities are tiny and (usually) ubiquitous, let's make sure
our UIs all depend on them.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
The project access token disappeared (maybe expired?), let's avoid
hardcoding this and put it in a CI variable instead.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This module is necessary for cpu frequency scaling on Qualcomm
platforms, let's make it available earlier so we have cpu frequency
scaling up sooner.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
importing all udev rules doesn't make sense here. Only add the needed
ones.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
[ci:ignore-count]
[ci:skip-build]: already built successfully in CI
Drop the fork, nothing depends on it and we can use the new multi-stage
initramfs instead
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:ignore-count]
[ci:skip-vercheck]
Make use of the new multi-stage initramfs rather than the minimal
variant, and inform mkinitfs that the initramfs-extra archive should be
created to save space.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:ignore-count]
We previously forked the initramfs into a minimal variant for highly
space constrained devices, to allow the normal variant to gain
additional functionality like the debug-shell (With OSK). Initially the
hope was that only a handful of devices would need the minimal variant,
but in practise this has not been the case.
Trying to maintain two diverging forks of the initramfs is absoutely
unsustainable and (to be frank) a bit silly.
Based on discussion with craftyguy and newbyte, let's re-architect the
initramfs to run in two stages, with the second stage being part of
initramfs-extra. By itself this doesn't make a lot of sense, since
requiring the boot partition be mounted for the debug-shell to be useful
is a major downgrade.
However this can be used in tandem with pending support for a new
deviceinfo_create_initfs_extra variable, this is default false in
mkinitfs which finally gets rid of initramfs-extra entirely for devices
that don't need it.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>