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
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.
Fix TypeError when RuntimeError is thrown
Example:
FAILED testcases/test_device.py::test_aports_device -
TypeError: can only concatenate str (not "PosixPath") to str
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
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>
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