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.
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>
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
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
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
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
Make sure that linux-next actually builds, before pushing the change to
pmaports master. Otherwise it may block publishing other aarch64
packages in bpo.
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!
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
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
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>
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
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
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.
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
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.
* 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
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
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
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
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.
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
* 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