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
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.
1. Move all configs from /etc/NetworkManager/conf.d to
/usr/lib/NetworkManager/conf.d since the latter is more appropriate for
distribution-provided config files. In particular this means apk will
update them when the package file is changed rather than creating
`.apk-new` files. If a user wants to override such a file, they can create
a file with the same name under /etc/NetworkManager/conf.d
2. Move all dispatcher scripts from /etc/NetworkManager/dispatcher.d to
/usr/lib/NetworkManager/dispatcher.d for the same reason.
3. Rename all configs to have a "50-" prefix so that users can add their own
"99-" overrides with a guarantee that they'll be processed after
distribution-provided configs.
4. Rename dispatcher scripts to have a "50-" prefix instead of "85-" and "99-"
since they're distribution-provided files.
5. Move 50-tethering.conf from the base-ui package to
the base-ui-networkmanager package.
There are also some device packages that put config files without a numeric
prefix in /etc/NetworkManager/conf.d . This MR doesn't change those.
[ci:skip-build] already built successfully in CI
In 11682fb0ab, the timeout was set to 10
hours. This means that the CI no longer just runs for one hour. However,
we are still limited by GitLab's runners which only give us three hours
of CI time per job, so given the status quo, this is the most likely
duration for someone who hasn't set up their own CI runners.
USB tethering allows users to use their phone's WiFi or WWAN interface
as an access point for the device they connect the phone with over USB.
This way, they can use their data plan with a laptop or desktop when
regular Internet access is absent.
Configure NetworkManager to manage the usb0 iface from initfs so users
can configure it in GNOME Settings or KDE. Include a NetworkManager
dispatcher script as well to handle postmarketOS' setup with unudhcpd as
we want to provide an SSH login over USB when tethering is disabled. If
tethering is enabled, unudhpcd is stopped and its functionality is taken
over by NetworkManager through an instance of dnsmasq. NetworkManager
will also configure the necessary settings to allow IP forwarding and
firewall rules during tethering. Once disabled, NetworkManager cleans up
these settings and our dispatcher script starts unudhcpd again.
Due to upstream changes, NetworkManager requires networkmanager-dnsmasq
subpackage as dependency as dnsmasq needs DBus support for
NetworkManager. Without it, NetworkManager will silently fail spawning
dnsmasq instances.
[ci:skip-build]: already built successfully in CI
This uses a dispatcher script to configure filtering A and AAAA records
based on which IP versions are routable on the NM primary connection.
gojq is preferred over the 'standard' jq because it's considerably
faster... the dispatcher script took 0.89s on my L5 with jq, and 0.07s
with gojq. the difference is probably greater on slower phones... so it
seemed worth installing it.
fixes#1430
Co-authored-by: Arnavion <me@arnavion.dev>
Not everyone's setup includes "pmbootstrap" as a command in $PATH.
Currently, in such setups, $ pmbootstrap ci kconfig (and potentially
other testcases) in the pmaports repository do not work as they expect
the "pmbootstrap" command to exist. Resolve this by checking whether
PMBOOTSTRAP_CMD is set and use that as command for invoking pmbootstrap.
If it isn't set (because you're using an old pmbootstrap version or
invoking a script directly for some reason), fall back to the old
behaviour as to not break compatibility.
Depends on pmbootstrap patch that sets PMBOOTSTRAP_CMD to argv[0]:
https://lists.sr.ht/~postmarketos/pmbootstrap-devel/patches/39995
- Move base files/modules out of package, this package now only provides
the mkinitfs tool.
- Add all required modules, these were copied over from
postmarketos-mkinitfs and sorted
- Use new exe name in trigger
- Update triggers to ignore /etc, add /usr/share/mkinitfs. No packages
should be installing into /etc/mkinitfs/
- Support building/installing docs
- Add vendored deps
- Change trigger path
This package contains base file and module lists for the initramfs /
initramfs-extra archives, along with the init.sh
The primary reason for doing this is so that changes to these
files/lists can be properly versioned (in pkgver), and (re)building
mkinitfs itself is no longer required for these changes.
- Add base file list for initramfs. The dirs at path
/usr/share/postmarketos-mkinitfs/* are "new" in mkinitfs 2.0
- Install default modules to /usr/share
- Install system config to /usr/share/mkinifs
- Add base files for -extra archive
- Create user config dirs
- Update hook dirs in init.sh, change from mkinitfs 2.0
- Remove splash images, obsolete since pbsplash
- Support uncompressed initramfs-extra
Previously, the grep command would detect the /usr/bin/share string
inside of the .ci/grep.sh file, so only check the device folder to
avoid this. Other folders shouldn't contain any kernels anyway.
[ci:skip-build]: Everything but linux-postmarketos-qcom-sm7150
built fine in CI, and linux-postmarketos-qcom-sm7150 built fine
locally. Building linux-postmarketos-qcom-sm7150 via the CI failed
because it took over 3 hours so the CI timed out.
Note that the URLs in these scripts are not only for information, but
they are also used as marker by pmbootstrap so it knows these are
compatible with 'pmbootstrap ci'. I just fixed the typo in the
pmbootstrap code as well and made a new release, use pmbootstrap 1.50.0
or above to have it recognize these scripts with 'pmbootstrap ci' again.
Reimplement the distfile-check as python test inside this git
repository, so we don't need to download a tarball of ci-common.git to
run it. This would not have been nice for running the test with
'pmbootstrap ci', as we don't want it to get downloaded every time the
test runs.
This new implementation is done in less than 40 lines of code, very fast
and doesn't need to create a lot of files in /tmp to build a
"distfiletree".
Prepare to add a new test making use of the
parse_source_from_checksums() function in test_unreferenced_files.py by
extending the function to not only return the checksum file names, but
also the checksums. Also rename the file from test_unreferenced_files.py
to test_source.py.
Adjust all CI scripts that make use of .ci/common.py to
'pmbootstrap ci'. Move all scripts that are not direct entry points to
running CI scripts to .ci/lib.
Comment out the dtb check, as it is failing. Apparently it didn't run
properly before. Let's fix this after this CI change is done.
Split out the grep for CHANGEME into a separate .ci/grep.sh script, as
it's not related to shellcheck and also there's another grep check that
I'll move there in a follow-up patch.
Add a wrapper .ci/wiki.sh, that pmbootstrap ci can run and use it in
gitlab-ci.yml. Add a .ci/lib/gitlab_prepare_ci.sh script that makes a
user available with sudo, as expected by the pmbootstrap ci compatible
scripts. Set up binfmt_misc too while at it, it will be needed for
running pmbootstrap.
The next patches will adjust the rest of the CI scripts and move the old
scripts in the .ci/lib dir, so only the scripts that should be called
directly are in the .ci dir.
Related: https://postmarketos.org/pmb-ci
Device uses mainline kernel. What works:
- boots
- display
- touchscreen
- wifi
Also add firmware package
[ci:skip-build]: already built successfully in CI
It thinks that the gcc-go.post-install files from the new cross/gcc-*
packages isn't used because those add subpackages dynamically in the
APKBUILD which isn't handled.