Changes the nonfree-firmware check to check all APKBUILDs outside
of 'archived' to align better with the other checks. This is now
possible now that no package uses the old nonfree-firmware logic
outside of 'archived'.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9086>
As per the apk-tools and abuild source code, 0 is a perfectly valid integer
for provider_priority, but our Python tests currently fail with a priority of 0
because 0 and None are the same in the if statement that checks priority.
Changes the if statement that checks priority to fail if the priority is
explicitly None.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8973>
The original disallowing of these subpackages happened in 2024.
It was expected that device packages would be voluntarily migrated
by the maintainers to reflect this new rule. But, this never happened.
Thus, enforcing this on all new and changed packages will force
the fixing of these packages.
This is not a treewide because so many packages still use the
nonfree-firmware subpackage logic that an MR would be an absolute pain
to handle and rebase. This is also a very easy fix to incorporate into
unrelated changes.
See https://postmarketos.org/edge/2024/02/15/default-nonfree-fw/
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8914>
/etc/local.d/ is reserved entirely for sysadmins for usage with OpenRC.
There was an effort to move this path to *-openrc subpackages in
abuild!484, but it was stalled for this reason. As such, it makes
the most sense to disallow all files in /etc/local.d/ in packaging.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8745>
Previously, we only checked that new or moved kernel APKBUILDs in
testing or above were building the kernel with LLVM. Now that it is also
formally a requirement for testing, we should change this check to also
enforce it when making modifications to a kernel APKBUILD in testing or
above.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8888>
pmb.helpers.package.check_arch with binary=False is a complex way of
fetching the APKBUILD and checking it against
pmb.helpers.pmaports.check_arches. Since we already have the APKBUILD,
just check the arches directly.
Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8854>
Add empty lines around the apkbuild-lint output, so it is easy to spot.
Also note when it is starting and if it was successful (vs. not having
any output on success).
Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8735>
apkbuild-lint only checks the file from the first parameter:
$ apkbuild-lint main/postmarketos-ui-phosh/APKBUILD
IC[AL65]:main/postmarketos-ui-phosh/APKBUILD:66:2:non-local 'install' variable in function 'openrc'. Add install scripts to global install variable instead.
MC[AL49]:main/postmarketos-ui-phosh/APKBUILD:46:1:invalid option 'pmb:drm'
MC[AL49]:main/postmarketos-ui-phosh/APKBUILD:46:1:invalid option 'pmb:systemd'
$ apkbuild-lint main/hello-world/APKBUILD main/postmarketos-ui-phosh/APKBUILD
(empty output!)
Loop over the APKBUILDs we want to lint so all of them get checked.
Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8735>
Because archived is neglected, the sources of packages therein can have
dead links, causing any MR that touches them to fail. Since we don't want
to fix archived packages, just ignore them entirely.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8661>
systemd 261 can now natively detect and mount subpartitions.
Fixes#4544
This also works around an issue where udiskie will prompt for mounting
the /usr partitions on disk, when they are subpartitions. I didn't
file a bug upstream because it's really not clear to me what to blame
(udisks2? udiskie? udev?)
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8660>
Adds an option to ignore grep.sh errors in instances where there may be false
positives due to git weirdness. e.g. git not tracking renames and instead
seeing them as new packages.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8652>
While ideally everyone would be running the latest pmbootstrap version,
in practice people don't always update right away. And even if they want
to, their distribution may not have the latest version packaged yet.
Let's enforce some wiggle room here so distributions have time to catch
up before we require newer versions.
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8550>
Fix that the build-jobs were using Alpine edge. This seems
unintentional, or at least inconsistent. Before this patch we had:
$ git grep alpine:latest
.ci/build-jobs.yaml.j2:image: registry.alpinelinux.org/img/alpine:latest
.gitlab-ci.yml:image: alpine:latest
It turns out that "registry.alpinelinux.org/img/alpine:latest" is
actually alpine edge:
$ docker run --rm registry.alpinelinux.org/img/alpine:latest cat /etc/os-release
Unable to find image 'registry.alpinelinux.org/img/alpine:latest' locally
latest: Pulling from img/alpine
d4a983187cfd: Pull complete
Digest: sha256:47b4a945203d4bad4e0c7840d64044da50a719d0cd0512a50e3ab473240635ea
Status: Downloaded newer image for registry.alpinelinux.org/img/alpine:latest
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.21.0_alpha20240923
PRETTY_NAME="Alpine Linux edge"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
And alpine:latest is stable (when fetched from docker hub, with podman
it could be configured to point at alpine's registry as well, which
means it is edge... but the OSUOSL CI runners use docker):
$ docker run --rm alpine:latest cat /etc/os-release
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
589002ba0eae: Already exists
Digest: sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
Status: Downloaded newer image for alpine:latest
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.23.3
PRETTY_NAME="Alpine Linux v3.23"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
Using stable makes more sense here, so temporary bugs in edge don't
break our CI. It is currently somewhat broken because running
pmbootstrap with python 3.14 and musl results in crashes with "No file
descriptors available" errors in some situations.
Related: https://gitlab.postmarketos.org/postmarketOS/postmarketos/-/work_items/141
Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8340>
This is the main entrypoint to understand what tests each device is
running. Therefore, it avoids one extra level of indirection, and
allows for different devices to run different kind of tests in the
future.
Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7881>