Commit Graph

115 Commits

Author SHA1 Message Date
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
Stefan Hansson
b9be5c36b3
Revert "ci/kconfig.sh: use pmbootstrap v3 (MR 5301)" (MR 5658)
See parent commit.

This reverts commit c8e2ad0b95.
[ci:skip-build]: already built successfully in CI
2024-09-29 16:33:03 +02:00
Clayton Craft
bb7b69d461
CI: lib: update for pmb v3 (MR 5566)
[ci:skip-build]: already built successfully in CI
2024-09-09 12:07:25 -07:00
Caleb Connolly
26f3fec92b
CI: pytest: update for pmb v3 (MR 5566)
Update the testcases to use the new pmb v3 API. Attempt to mostly use
pmb.core.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-09-09 12:07:25 -07:00
jane400
eac503842d
CI: pytest: set pmaports dir via pmbootstrap config (MR 5566)
This works around pmbootstrap always announcing something when using
`--aports`.

It announces this: `Overriding config.aports with [PosixPath('..')]`
2024-09-09 12:07:25 -07:00
Caleb Connolly
b186380e30
CI: autoupdate: pass args to pmb correctly (MR 5507)
The --details-to-stdout flag must come before the subcommand.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:skip-build]: already built successfully in CI
2024-08-18 12:18:21 +02:00
Caleb Connolly
ceb1e1c6b2
CI: autoupdate: log build to stdout (MR 5498)
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-08-15 18:49:20 +02:00
Oliver Smith
9ab02ada2c
CI: kconfig check: use --keep-going (MR 5491)
Use the new --keep-going parameter so the check doesn't stop on first
error. This was recently added in pmbootstrap MR 2384 to make the
default behavior more userfriendly.

[ci:skip-build]: already built successfully in CI
2024-08-13 10:02:43 +02:00
Oliver Smith
315d85a71e
CI: autoupdate: build-test linux-next before push (MR 5481)
Make sure that linux-next actually builds, before pushing the change to
pmaports master. Otherwise it may block publishing other aarch64
packages in bpo.
2024-08-11 14:47:47 +02:00
Oliver Smith
f9ef1ba850
CI: kconfigcheck.toml change: check all kernels (MR 5391)
When the kconfigcheck.toml file changes, let CI check all kernels
against the modified kconfigcheck.toml file.
2024-07-29 19:57:03 +02:00
Oliver Smith
c8e2ad0b95
ci/kconfig.sh: use pmbootstrap v3 (MR 5301)
Use pmbootstrap v3 for kconfig check, which reads kconfigcheck.toml from
the current pmaports branch and uses it.
2024-07-07 15:38:18 +02:00
Oliver Smith
e0453db08f
CI: kconfig check: just run pmbootstrap (MR 5301)
Replace previous code that used internal pmbootstrap code with running
pmbootstrap directly. pmbootstrap doesn't really have a stable API yet,
so calling the internal code is always a bit fragile and now that we
have reworked a lot of its code, this is all broken.

The trade-off is that it is now slower and the output isn't as pretty,
but we can finally use kconfigcheck.toml from the pmaports branch. So it
is worth it!
2024-07-07 15:38:14 +02:00
Stefan Hansson
8cc5cc801d
CI: adapt autoupdate.sh to follow our commit style (MR 5314)
Our commit style (specified in COMMITSTYLE.md) states that "upgrade to"
should be used when increasing the version of a package.
2024-07-03 18:32:45 +02:00
Caleb Connolly
3ed9591e41
treewide: drop PMOS_NO_OUTPUT_REDIRECT (MR 5240)
This cmdline argument is now a no-op. Drop it everywhere and add a new
CI check to enforce this.

Adjust the deprecated "minimal" initramfs variant to use
pmos.debug-shell to enable logging instead. It doesn't /support/
dropping to a shell, so the variable takes on a different meaning. But
that's ok since it's at least more consistent.

[ci:ignore-count]
[ci:skip-vercheck]
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Tweaked-by: Oliver Smith <ollieparanoid@postmarketos.org>
[ci:skip-build]: kernel builds are very likely to go through now
2024-06-23 14:48:20 +02:00
Caleb Connolly
d934985209
CI: implement scheduled auto-update pipeline (MR 4967)
Introduce support for having CI automatically update packages using
project access tokens and scheduled pipelines.

The pipeline schedule is configured with an additional variable
containing a list of packages to update, the autoupdate-fetch.sh script
then calls a handler for each of these, the handler is expected to check
for an update, make the necessary APKBUILD changes and commit them.

After all packages have been updated, the changes are pushed to pmaports
master using a project access token.

[ci:skip-build] takes too long to build in CI
2024-06-19 22:45:20 +02:00
Caleb Connolly
dd28314ba2
postmarketos-initramfs: debug-shell 3.0 (MR 5000)
This incorprates the debug-shell functionality directly into the
initramfs, so it's no longer necessary to build and boot a custom
initramfs in order to debug your device.

Additionally, the behaviour of the debug-shell is entirely reworked, It
now creates an ACM serial gadget which can be accessed via any normal
terminal emulator (picocom, minicom, etc; or PuTTY on windows). Rather
than just invoking sh, the debug-shell now creates a respawning getty on
both the new virtual console and the active console (this will either be
the UART console or tty0/1).

It is necessary to spawn these shells via getty since the logging rework
means we can no longer assume that stdin/out/err reference a TTY.

In addition to the above, it is now possible to trigger a log dump by
holding volume up during boot. This can be useful for helping users
debug their devices if the issue doesn't result in a failure that can be
detected in the initramfs.

With these changes, the console-shell and debug-shell hook packages are
reduced to only adding the additional tools/features. console-shell is
still required for fbkeyboard, and debug-shell for the setup_usb_storage
tool.

Co-Developed-by: Clayton Craft <craftyguy@postmarketos.org>
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-18 12:35:05 -07:00
Anton Bambura
492f3c0e64
CI: test installing of postmarketos-installkernel (MR 4681)
[ci:skip-build]: too many kernels to build in CI, all built locally
2024-06-07 11:11:58 +02:00
Clayton Craft
45dec6cc73
pmos-base-ui: re-enable DNS filtering (MR 4846)
Alpine aports will have a patch[1] to fix the bug this was working around,
so let's re-enable it.

This reverts commit 4dac896160.

1. https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/61103

fixes #2601

Also see #1430
2024-06-04 09:42:33 -07:00
Stefan Hansson
b29ebae96b
CI: rename "device/unmaintained" to "device/archived" (MR 5046) 2024-05-15 17:07:51 +02:00
Stefan Hansson
b15ff1601c
CI: fix deprecation warning (MR 5126)
Fixes this warning:

    warning: `ruff <path>` is deprecated. Use `ruff check <path>` instead:
2024-05-13 16:19:06 +02:00
Stefan Hansson
6a1f7a1623
CI: clarify which commit to put [ci:ignore-count] in (MR 5126)
I've seen confusion about this in the past where people would find it
unclear which commit to put this in.
2024-05-13 16:16:18 +02:00
Stefan Hansson
79b8de8483
CI: replace lots of print statements with a single one (MR 5126)
This way it's easier to edit the text.
2024-05-13 16:16:18 +02:00
Clayton Craft
86e913235c
ci: suggest setting PMBOOTSTRAP_CMD when unable to locate pmbootstrap.py (MR 5033)
When running locally, sometimes pmbootstrap in PATH is not a symlink and
the auto-detection stuff fails. This can be resolved by setting
PMBOOTSTRAP_CMD=/path/to/pmbootstrap.py, so the error has been improved
to suggest doing this.

[ci:skip-build]: already built successfully in CI
2024-05-01 01:04:33 +02:00
Clayton Craft
c63e05246f
ci/common: use gitlab CI target branch in get_upstream_branch (MR 5082)
This prefers gitlab CI's target branch from the env, and falls back to
the old target branch detection mechanism (using pmaports.cfg, etc) if
it's not set. This fixes CI in gitlab where the target branch is
something different than expected, e.g. if using stacked branches.

[ci:skip-build]: already built successfully in CI
2024-05-01 00:58:32 +02:00
Clayton Craft
28f8f3135e
Revert "ci: allow specifying pmbootstrap path to aid running locally (MR 4994)"
This was merged erroneously as a part of another MR. See
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/5033#note_1877584477

This reverts commit 40a46fd4e5.
2024-04-24 11:53:27 -07:00
Clayton Craft
a263494c1c
ci: fix failure with check_changed_aports when testing new aport
Apparently some callers of `get_package_version` expect it to return
None if a package wasn't found...  e.g. when CI is testing a branch that
introduces a new aport and it's trying to get the upstream version for
it, which doesn't exist.

This leads to a spectacular crash in CI:

      upstream = get_package_version(args, package, commit, False)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/clayton/src/pmaports/./.ci/lib/check_changed_aports_versions.py", line 47, in get_package_version
        return parsed["pkgver"] + "-r" + parsed["pkgrel"]
               ~~~~~~^^^^^^^^^^
    TypeError: 'NoneType' object is not subscriptable

When I refactored this method in 07812a918 I goofed up and changed this
behavior, so let's restore it to fix the crash.
2024-04-23 17:59:30 -07:00
Arnav Singh
deb676fba2
ci/check_changed_aports_ver: fix pkgrel check (MR 5061)
The apkbuild parser returns `pkgrel` key as a `str`, not an `int`,
so the `!= 0` check would always succeed even if the file set it to `0`.

[ci:skip-build]: already built successfully in CI
2024-04-23 10:43:03 -07:00
Clayton Craft
970bc34c45
ci/check_changed_aports_ver: add tests for new dev pkg rules (MR 4994)
[ci:ignore-count]

[ci:skip-vercheck]
[ci:skip-build]: already built successfully in CI
2024-04-22 16:37:41 -07:00
Clayton Craft
40a46fd4e5
ci: allow specifying pmbootstrap path to aid running locally (MR 4994)
I don't like how CI requires pmbootstrap in PATH to be a symlink, I use
a wrapper script to handle running pmbootstrap how I want and the
current pmbootstrap path detection is kinda annoying since it depends on
it being a symlink.

This allows using an environment variable, PMBOOTSTRAP_PATH, to set the
pmbootstrap path and skip all of the symlink resolving stuff.
2024-04-22 16:37:41 -07:00
Clayton Craft
07812a9189
ci/check_changed_aports_ver: move apkbuild reading from get_version (MR 4994)
This allows reusing the logic to read apkbuild contents in future
methods
2024-04-22 16:37:41 -07:00
Clayton Craft
284fd42c0a
ci: add test for validating pkgver for device packages (MR 4994) 2024-04-22 16:37:41 -07:00
Stefan Hansson
824647ea3a
CI: remove flash_kernel_on_update dependency check (MR 5045)
This property is now handled by boot-deploy, which devices shouldn't
depend on directly anyway.
2024-04-20 11:15:33 +02:00
Stefan Hansson
66d84cc745
CI: remove postmarketos-update-kernel from Shellcheck check (MR 5045)
This script has been integrated into boot-deploy.
2024-04-20 11:15:33 +02:00
Vitaliy Ognev
5cef8d31ca
ci: fix format specifier typo in wiki script (MR 5038) 2024-04-16 09:05:05 +03:00
Oliver Smith
2d0a7aa6dc
CI: add more tests for CODEOWNERS (MR 4940)
* Parse the file in python and ensure it is ordered alphabetically
* Ensure that we have at least as many gitlab nicknames in CODEOWNERS,
  as there are listed maintainers in main and community devices. This
  should help with enforcing that every maintainer is also listed in
  CODEOWNERS, so they can be easily pinged via their gitlab nickname if
  something for the device they maintain is happening.

[ci:skip-build]: already built successfully in CI
2024-03-18 08:01:26 +00:00
Stefan Hansson
fc9c3c1fef
CI: don't check for executable files in temp (MR 4858)
Most things in temp come from Alpine's aports repository, which has
different rules and does not for example mandate that files are not
marked as executable. As such, let's not require packages in there
to conform to our rules.

[ci:skip-build]: already built successfully in CI
2024-02-27 08:24:53 -08:00
Stefan Hansson
ec5b59eb77
CI: check for "before wpa_supplicant" in OpenRC service files (MR 4769)
See https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4564
2024-02-21 21:19:12 +01:00
Oliver Smith
ff20316ff3
CI: allow firmware packages as deps of device pkgs (MR 4839)
We have decided to not use the non-free firmware subpackages anymore,
read the details in the blog post. Allow direct dependencies from the
device packages to the firmware packages.

Related: https://postmarketos.org/edge/2024/02/15/default-nonfree-fw/
[ci:skip-build]: already built successfully in CI
2024-02-19 21:35:33 +01:00
Clayton Craft
4dac896160
pmos-base-ui: disable DNS filtering to work around dnsmasq hang (MR 4824)
Crappy workaround, it's better than having DNS broken...
See: https://gitlab.com/postmarketOS/pmaports/-/issues/2601

Also removed it from shellcheck, because SC doesn't like all of the
unused/unreachable things after the `exit 0`. This commit should be
reverted when the issue is actually fixed later...

[ci:skip-build] already built successfully in CI
2024-02-14 12:17:55 -08:00
Sicelo A. Mhlongo
bdf9697cd9
ci: perform wallpaper checks on N900 too (MR 4810)
[ci:skip-build]: already built successfully in CI
2024-02-12 19:57:26 +01:00
David Heidelberg
bdea74f041
main/osk-sdl: drop (MR 4732)
Prequisite for dropping DirectFB support from SDL2 builds.

Signed-off-by: David Heidelberg <david@ixit.cz>
2024-02-07 21:44:46 +00:00
Stefan Hansson
73b1a493b9
ci: replace Flake8 with Ruff (MR 4741)
See similar patch in pmbootstrap for rationale:
27618d5ffd

W504 ignore is removed as the rule does not exist in Ruff. But, since it
was ignored anyway, this does not matter.
2024-01-19 18:06:09 +01:00
Clayton Craft
b5b7983ade
ci/grep.sh: always run all tests (MR 4740)
fixes #2543
2024-01-19 17:02:21 +01:00
Stefan Hansson
d8b97a440f
CI: check for wallpaper being set in device packages (MR 4738)
We do not want this going forward as we will be changing the wallpaper
on a bi-yearly basis and we do not want to have perform shotgun surgery
every time we do so.

[ci:skip-build]: already built successfully in CI
2024-01-18 22:39:49 +01:00
Luca Weiss
e5c26d38f8
CI: add CODEOWNERS file sanity check (MR 4662)
* Check for space indentation instead of tabs
* Check that an entry actually exists
* Check that a directory ends in a slash, otherwise GitLab seems to
  ignore it
2023-12-29 15:02:10 +01:00
Ion Agorria
c43e9f45a8
CI: add setup_usb_storage.sh to shellcheck.sh (MR 4450)
[ci:skip-build] already built successfully in CI
2023-11-19 10:27:42 -08:00
Stefan Hansson
93c04ff4a6
CI: don't shadow built-in dir function (MR 4500)
Not related to the deprecation fixes.

[ci:skip-build]: already built successfully in CI
2023-10-27 08:37:43 +02:00
Stefan Hansson
c5b66e4090
CI: replace depreciated module (MR 4500)
See PEP 632: https://peps.python.org/pep-0632

Closes https://gitlab.com/postmarketOS/pmaports/-/issues/2207
2023-10-27 08:37:37 +02:00
Clayton Craft
a8bf624bb4
ci/shellcheck: ignore SC3043 warnings about use of 'local' (MR 4340)
This configures shellcheck in CI to ignore the use of the 'local'. Using
'local' to support variable scoping can prevent a lot of nasty bugs in
shell scripts.
Ash supports 'local', even though it's not a POSIX sh thing. It's used
extensively in our init.sh script, and many Alpine scripts use it.
2023-08-21 11:16:55 +02:00