313 Commits
Author SHA1 Message Date
Oliver Smith 8a3b3e8092 CI: add test_systemd_stage0_version
Add a test that ensures systemd-stage0 and systemd have the same pkgver.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440
[ci:skip-build]: already built successfully in CI
2025-06-04 20:34:23 +02:00
knuxify 6cf560614a ci: fix wiki CI script detecting non-packaged devices as non-booting
Since non-booting and non-packaged devices were merged into one list, any
device that was listed as booting but wasn't packaged would get detected
as non-booting. That created a loop where to pass CI one would have to set
packaged = yes, which they shouldn't do until the port has actually been
merged, which they can't do unless it passes CI...

Now the section has been split into two sub-sections, thus the non-booting
section is separate once again. This fixes the issue, but we need to tell
the CI script to use that section name.

This effectively reverts commit e9d2ac8021.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6579
[ci:skip-build]: already built successfully in CI
2025-05-30 22:21:09 +02:00
knuxify e9d2ac8021 ci: fix wiki script after device page change
The script looks for the section with non-booting devices; it just got
renamed to "Non-booting and unavailable devices". Update the script
accordingly.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6570
[ci:skip-build]: already built successfully in CI
2025-05-29 23:24:26 +02:00
Luca Weiss 63b64868c4 CI: directory-structure: add new downstream device category
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6519
2025-05-22 23:06:10 +02:00
Clayton Craft ed19fab2a3 ci/test_provides: make exception for provides with valid versions hardcoded
The APKBUILD reference seems to suggest that versioned provides= can
have any valid version string (e.g. 0.12-r3) in the `provides=` var, and
that it doesn't have to match `$pkgver-r$pkgrel` for the APKBUILD. IIRC
this test intends to catch typos like `provides=foo=$pkgver-$pkgrel`, so
this makes it pass when any valid version string is given.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
[ci:skip-build]: already built successfully in CI
2025-05-15 10:22:04 +02:00
Samuel Dionne-Riel 2533d06c90 ci: Always add build jobs, but disable by default
This sounds counter-productive and counter-intuitive, but hear me out:
this allows using `needs` to depend on those jobs, without further
templating downstream jobs.

In turn, those jobs depending on a disabled jobs, while they still exist
in the “graph” of the pipeline, are also transitively disabled.

This change, for all intents and purpose, is a no-op regarding the
amounts of jobs being sent to CI runners.

Also updates the comment for the placeholder job, since the wording
could lead to think that *having jobs* is sufficient. In reality, having
jobs that ran succesfully is necessary for the child pipeline to be
successful.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6399
2025-05-13 09:34:45 -07:00
Rudraksha Gupta 341d88e8fe .ci/lib: ignore pkgrel checks for linux-next
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6133
2025-05-13 03:51:00 -07:00
Affe Null 48bad75444 CI: deviceinfo: add manufacturer exception for Jolla
Some phones sold under the Jolla brand are manufactured by a partner,
e.g. the Jolla C2 is manufactured by Reeder. Although these phones
usually have another name given to them by the manufacturer, the name
used by Jolla is more recognizable. Allow specifying a name that
starts with "Jolla" instead of the manufacturer name.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6426
2025-04-24 18:12:29 +02:00
Oliver Smith a2ccee27f6 Revert "ci/pytest: make sure tests run on correct branch (MR 6418)"
The wrong branch was not only used for pytest, but for all CI tests that
used pmbootstrap. I've fixed the bug in pmbootstrap now and added a
generic check to ensure we would catch a similar bug if we had one in
the future.

This reverts commit 7fd9e01f7f.

Related: pmaports issue 3674
Related: pmbootstrap MR 2586
Related: ci-common MR 14

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6439
2025-04-21 19:59:37 +02:00
Alexey Minnekhanov c4ae7b17f0 CI: fix test_device_unmaintained -> test_device_archived
The pmbootstrap commit https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/commit/0df75422b4c6984ee6e0df23d8feec963ef449c9
renamed few things around, but pmaports CI scripts were forgotten.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6438
2025-04-21 14:27:10 +03:00
Clayton Craft 225bb4696e ci: don't run test_kernel on linux-pam-pmos (MR 6418)
The pkg name changed a while back in d3545fc941.

[ci:skip-build]: already built successfully in CI
2025-04-15 14:05:27 -07:00
Clayton Craft 7fd9e01f7f ci/pytest: make sure tests run on correct branch (MR 6418)
This works around a situation where pmbootstrap init checks out the
wrong branch and we end up executing the wrong version of the tests.

For context:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6418#note_477266
2025-04-15 14:05:27 -07:00
Clayton Craft 2d77fa6662 ci: verify_checksums: support packages in systemd repos
In 65038ce26a the logic for also checksum checking pkgs in the systemd
repo was dropped when the logic was moved from build_changed_aports.py,
this re-introduces that logic so that checksums for packages in the
systemd repo are also checked.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6404
2025-04-12 09:17:19 -07:00
Pablo Correa GómezandClayton Craft 218d0b1745 ci: build packages in a child pipeline instead of in the main one (MR 6366)
Following Alpine's example. This allows some optimizations:
* Don't start one job per architecture simply to skip them after
  rebase and before merge
* If there are no packages, don't start the jobs at all (not true,
  gitlab bug)
* Avoid creating jobs for architectures that don't have changed
  packages, thus further reducing the unnecessary
  jobs and possibly reducing transient failures

Co-authored-by: Clayton Craft <clayton@craftyguy.net>
2025-04-11 12:26:20 -07:00
Pablo Correa Gómez 65038ce26a ci: split verifying package checksums into its own job (MR 6366)
This simplifies the build_changed_aports job, and makes it a lot
easier to use dynamic pipelines in the future
2025-04-11 12:02:24 -07:00
Caleb Connolly 959786494a postmarketos-initramfs: add unit tests
Introduce some initial unit tests for the initramfs.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:31 -07:00
Caleb Connolly 2e37d40f84 CI: ignore unreferenced tests/ subdir in packages
These are used for unit testing

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:31 -07:00
Caleb Connolly 1e7fe0c4f7 CI: introduce shell unit-test infra
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
2025-04-08 13:35:31 -07:00
Caleb Connolly 036c802769 CI: shellcheck: allow informative checks to fail
There are lots of informative checks which are safe to ignore but happen
a lot especially with unit testing scripts. Adjust shellcheck to only
fail on warning or above.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:30 -07:00
Sicelo A. Mhlongo 9b19e3e248 main/postmarketos-base: drop udev-based firmware loading
udev no longer supports using userspace to service kernel requests for
firmware. While the kernel can be configured to send such requests to
userspace, udev will not do anything about them.

Reference: https://github.com/eudev-project/eudev/commit/3b717594600fa717cdf9bcfd0c7c1b703b245482

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6332
[ci:skip-build]: already built successfully in CI
2025-04-03 10:50:28 +02:00
Samuel Dionne-Riel 1463902dac CI: Remove vestigial shell function wrapper
This shell function exists only within the scope of the shell. The
python script is entirely unaware of it.

(Introduced in da52dace85).

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6330
[ci:skip-build]: already built successfully in CI
2025-03-19 15:59:43 +01:00
Stefan Hansson 543f67353b CI: Check all commit messages for string (MR 6301)
This way you can add e.g. [ci:skip-vercheck] to the commit it actually
belongs to instead of having to add it to the last one in the series,
which is unintuitive. It still doesn't only run the check on commits
that contain the message, which might be a nice future improvement.
2025-03-09 14:01:22 +01:00
Stefan Hansson 22d6f312e1 CI: Break out base commit logic from get_changed_files() (MR 6301)
This makes the code more self-documenting and allows re-using this logic
in other parts of the code.
2025-03-09 14:01:18 +01:00
Pablo Correa Gómez eb18caefb5 Update APKBUILDS to use Maintainer and Co-Maintainer instead of CODEOWNERS (MR 6272)
We now have a bot that reads those lines from APKBUILD files, instead
of using a proprietary gitlab feature. Relevant changes:

* Change @ollieparanoid for @Newbyte as maintainer for GNOME packages
  where Oliver was listed.
* Don't add @craftyguy as Librem5 maintainer, as he dropped it long
  ago
* Remove entries referencing archived ports
* Don't touch jenneron's maintainership. That's a task for another day
* Don't add "balejk" as maintainer. We have tried pinging them, but
  seem to be currently idle
  person is. Help figuring it out would be welcomed.
* Don't add "binarycraft" as maintainer. Last contribution was years
  ago: https://gitlab.com/binarycraft
* Don't add more maintainers to linux-postmarketos-qcom-msm8953, as it
  would have ended up with 7, which might be a bit too much
* Don't add more maintainers to the PinePhone. The current ones seem
  to actually be the most active
* Don't add Danct12 to N900. Sicelo has been single-handedly managing
  it for a long while
* Update maintainer emails for Nikita Travkin, Alexey Minnekhanov, and
  Barnabás Czémán

[ci:skip-vercheck] Co-Maintainer changes require no pkgrel updates
since the names do not make it to the package itself

[ci:ignore-count]

Fixes #3530
[ci:skip-build]: already built successfully in CI
2025-03-04 12:50:09 +01:00
Clayton Craft 65b913b5b1 ci: drop CODEOWNERS check (MR 6189)
This is really annoying to fight with, especially since it's going to be
going away soon in https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3530

[ci:ignore-count]
[ci:skip-build]: already built successfully in CI
2025-02-19 08:13:25 -08:00
Clayton Craft bd4c139c4d soc-qcom: new aport (MR 6189)
This is basically a copy of soc-qcom-sdm845, which many things (even
non-sdm845 stuff) were depending on.
2025-02-19 08:13:22 -08:00
VaporGame d9bfb7f301 i9105p: add wifi support and correct vc-firmware path (MR 6110)
[ci:skip-build]: already built successfully in CI
2025-02-14 10:43:38 -08:00
Clayton Craft b395936171 ci/build_changed_aports: fix systemd build testing (MR 6214)
copypasta failure on my part :(

fixes 2238b8e734

[ci:skip-build]: already built successfully in CI
2025-02-13 14:17:44 -08:00
Clayton Craft 2238b8e734 ci/build_changed_aports: skip building systemd pkgs when there are none for the arch (MR 6197)
[ci:skip-build]: already built successfully in CI
2025-02-13 11:42:01 -08:00
Alexey Minnekhanov 04c1456e7b CI: check for enabled arch for extra-repos/systemd too (MR 6162)
This check is present for "normal" packages, duplicate it for
ones that are thrown into "retry build with systemd later" list.

We need to explicitly pass with_extra_repos="enabled" arg to
find() to avoid getting cached "package not found in repos" result.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
[ci:skip-build]: already built successfully in CI
2025-02-10 07:54:55 -08:00
fossddandLuca Weiss f3f0f96513 CI: autoupdate: get latest next tag from git.kernel.org (MR 6012)
Co-Authored-By: Luca Weiss <luca@lucaweiss.eu>

[ci:skip-build]: already built successfully in CI
2025-02-08 09:38:48 -08:00
fossdd 371671f676 .ci/autoupdate.sh: reset pkgrel on update (MR 6014)
pkgrel's are resetted to zero once the pkgver is bumped
2025-01-16 21:24:24 +09:00
Alexey Min 102863b3c7 ci: always zap chroots before doing pkg build testing in systemd context (MR 6051)
Signed-off-by: Alexey Min <alexey.min@gmail.com>

[ci:skip-build]: already built successfully in CI
2025-01-15 08:00:33 -08:00
bjorn3 55a89d949c main/msm-firmware-loader: add systemd unit files (MR 5964) (MR 5563)
[ci:skip-build]: already built successfully in CI
2025-01-10 13:02:37 +01:00
Oliver Smith af660ec0dd CI: test_kernel: skip linux-pam (MR 5070) (MR 5563)
The linux-pam package is not a linux kernel :)
2025-01-10 13:02:31 +01:00
Oliver Smith 97917f060f CI: directory-structure: add extra-repos/systemd (MR 5070) (MR 5563) 2025-01-10 13:02:31 +01:00
Stephan Gerhold ce05d2d8ff main/postmarketos-initramfs: unify setup_usb_storage (MR 5912)
Right now we have two similar implementations of setting up a USB mass
storage gadget, in init_functions.sh and as separate script for the
debug-shell. Given that init_functions.sh is available in debug-shell
anyway, unify both in a common setup_usb_storage_configfs() function.

Having this included in the initramfs debug-shell by default (without
installing postmarketos-mkinitfs-hook-debug-shell) also simplifies
recovery, since you can set up the USB storage for repairing the flashed
postmarketOS installation in case of boot failures. The size overhead is
minimal, since this has no extra dependencies.
2024-12-17 23:24:15 +03:00
Anri Dellal b22ec1522a .ci/testcases/test_device.py: fix TypeError errors (MR 5863)
Fix TypeError when RuntimeError is thrown

Example:
FAILED testcases/test_device.py::test_aports_device -
	TypeError: can only concatenate str (not "PosixPath") to str
2024-12-06 23:11:16 -08:00
methanal ecb1c7fa21 CI: deviceinfo: allow inline comments (MR 5766)
The current test script disallows these kinds of comments:
  deviceinfo_some_variable="some_value" # an inline comment

Since deviceinfo is essentially a shell script, it does make sense to
allow inline comments. It is relatively simple to implement as well, by
adjusting the regex.
[ci:skip-build]: already built successfully in CI
2024-11-21 13:19:09 +01:00
Caleb Connolly 0b78805c8d CI: autoupdate: update access token bot email (MR 5834)
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>
2024-11-20 20:19:01 +01:00
Oliver Smith 4432b6f54d CI: build_changd_aports: fix systemd pkgs in print (MR 5684)
Fix that in the checksum / build messages for systemd packages it would
print the wrong package list.
2024-11-13 17:04:30 +01:00
Clayton Craft a64120a3d0 ci: also account for extra-repos when only verifying checksums (MR 5684) 2024-11-13 16:59:14 +01:00
Clayton Craft 5c42195870 ci: build_changed_aports: Don't exit prematurely if pkg list is empty (MR 5684)
This should check for packages in other repos that need to be built,
even if the main repo pkg list is empty.

fixes !5576
2024-11-13 16:59:02 +01:00
Clayton Craft e61bf69138 ci/grep: fail if device pkg uses console=null (MR 5752) 2024-11-06 13:15:12 -08:00
Oliver Smith a6f188af10 CI: common.run_pmbootstrap: use simple check=True (MR 5633)
Use check=True instead of running check_returncode() afterwards, it has
the same effect and is shorter.
2024-10-23 13:24:10 +02:00
Oliver Smith 4ef0a4e9ad CI: apkbuild_linting: fix missing output (MR 5633)
pmbootstrap used to exit with 0 if "pmbootstrap lint" failed. This was
the case in 2.3.x too, but I assumed this was a regression and fixed it
recently in pmbootstrap MR 2398.

It turns out that the CI code relied on this assumption, it captured the
output of "pmbootstrap lint", and only after it is done it checks if the
output wasn't empty and prints it in that case followed by exit 1.

Now that pmbootstrap actually exits with 1, CI already fails at
"common.run_pmbootstrap" and doesn't get to the part where it would be
printed.

I think "exit 1" on error is actually the right thing to do in
pmbootstrap, so I'll leave that in. Adjust CI to just run "pmbootstrap
lint", removing the additional output capture logic that isn't used
anywhere besides here. This also has the advantage that we get the
output "live", without buffering it completely first.
2024-10-23 13:24:06 +02:00
Caleb Connolly a79aaf0136 CI: fix autoupdate bot and don't enable it for local CI (MR 5724)
Update the bot email address, and don't enable the script for local CI
since it relies on protected GitLab CI variables. This could be fixed in
the future by safely handling these not being available.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-10-22 13:55:47 +02:00
Clayton Craft f37c93ed7e ci: common: fix typo when printing upstream branch sha (MR 5718)
I was confused for a while about why the SHA printed by CI differed from
the actual upstream/master SHA:

     commit upstream/master: f822b7ee0d06f05ff6d2eb37bcf4a1825569be692
     real upstream/master: 822b7ee0d0
2024-10-19 14:07:24 +02:00
Pablo Correa Gómez 8e1d778ecc ci: fix paths to point to gitlab.postmarketos.org (MR 5696) 2024-10-07 12:57:38 +02:00
Clayton Craft a44590ec47 ci: build_changed_aports: fix building changed aports in extra-repos/systemd (MR 5576)
With this change, the build test will only build changed aports when
they are in an enabled repo. It will also detect when a changed aport is
in extra-repos/systemd, and build it later with systemd support enabled.

[ci:skip-build]: already built successfully in CI
2024-10-04 12:07:26 -07:00