Commit Graph
73 Commits
Author SHA1 Message Date
Oliver Smith 3e012e3714 CI: test_directory_structure: mention firmware mv (MR 1362)
Instead of encouraging the user to add the directory to
test_directory_structure.py, mention that we just moved the firmware to
device/{main,community,testing}/. This will be more helpful for users
who get the message after rebasing on master.

In the rare case that we need to change the directory structure, we will
figure out which file to edit.

[ci skip]: various firmware packages fail when built at the same time
           (they use generic source files like "bcmdhd.cal" with different checksums)
2020-07-07 16:06:02 +02:00
Minecrell c590ed74cf firmware/*: move rest of firmware packages to device/testing (MR 1362)
After moving the firmware packages used by devices in community to
device/community, move the rest of the firmware packages to device/testing.
2020-07-07 16:05:58 +02:00
Oliver Smith 24b83e2415 CI: use check_mr_settings.py from ci-common.git (MR 1320) 2020-06-17 16:29:34 +02:00
Oliver Smith f415d413c5 CI: support release channels (v20.05 branch) (MR 1321)
Add common.get_upstream_branch() and use it instead of assuming "master"
as upstream branch.

Example: user forks v20.05 to v20.05_some-fix, then creates a merge
request. CI must use v20.05 as upstream branch, when comparing for
modified files etc.
2020-06-17 16:26:38 +02:00
Oliver Smith 4d116177ac CI: common.py: add cache (MR 1321)
Don't query the pmaports dir more than once. This cache will also be
used to store the upstream branch in the next commit.
2020-06-17 16:26:38 +02:00
Antoine Fontaine 11b60e838b ci: check for executable files (MR 1257)
fix https://gitlab.com/postmarketOS/pmaports/-/issues/593.
2020-05-23 17:40:00 +02:00
Antoine Fontaine 307f4f19e6 ci: check that kernels have pmb:cross-native enabled (MR 1247)
follow up to
https://gitlab.com/postmarketOS/pmbootstrap/-/issues/1910,
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1169 and
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1187.

Fixing the repo is good, but keeping it clean is better. Ensuring it
before merge will avoid yet another fixup commit.
2020-05-21 07:29:16 +03:00
Anjandev Momi bcfdb0f914 CI: check for pkgrel=0 in new aports (MR 1211)
closes #573
2020-05-13 14:37:09 +03:00
Daniele Debernardi 5ead73e86c CI: use pmbootstrap lint for checking packages (MR 1132) 2020-04-18 11:50:02 +02:00
Daniele Debernardi 233ec0d21c CI: return output of common.run_pmbootstrap (MR 1132) 2020-04-18 11:49:57 +02:00
Oliver Smith 8f79b6f5b2 CI: use install-pmbootstrap.sh from ci-common repo (MR 1147)
This script is used by multiple repositories by now, let's make sure we
only have one place where we need to maintain it. The version in
ci-common is shellchecked and displays less output for 'pmbootstrap
init' again (unless it fails, then it shows the whole log).
2020-04-14 00:43:44 +02:00
Oliver Smith 23c58a681f main/postmarketos-mkinitfs: modules from files (!1123)
Read kernel module names from files in
/etc/postmarketos-mkinitfs/modules and print out which modules are
required by which of these files as the initramfs gets generated. Put
the default modules into a new 00-default.modules. This allows mkinitfs
hooks to add modules to the initramfs.

Parse the modules from a file similar to modules-load.d, with commented
lines and empty lines ignored. Add a simple test script for that and run
it in check().
2020-04-12 00:56:22 +02:00
Oliver Smith 3e7604601a main/postmarketos-mkinitfs: split mkinitfs funcs (!1123)
Split mkinitfs.sh into two files, so the functions (now in
mkinitfs_functions.sh) can be sourced in a test. Such a test will be
added in the next commit.

Move $BINARIES_EXTRA into the get_binaries_extra() function, so its
$(find...) does not get executed when sourcing the functions file. Move
$BINARIES into get_binaries() too for consistency.
2020-04-12 00:56:22 +02:00
Oliver Smith 74f42ebeb0 main/postmarketos-mkinitfs: pass shellcheck (!1123)
Make it pass shellcheck by fixing obvious mistakes like '==' instead of
'='. Add "shellcheck disable" lines for things that are intentionally done
or would be a bit more complicated to rewrite. It would be nice to
refactor some things like '${outfile/initramfs-/uImage-}', but this should
be done in a separate change (patches welcome).

Remove unused variable "modules_path". While at it, add two new fatal
error messages instead of just "exit 1" without any comment and remove
redundant mkdir in APKBUILD.
2020-04-12 00:56:17 +02:00
Minecrell 69efae2e0b CI: test_directory_structure: Allow device/{community,main} (!1121) 2020-04-11 15:47:49 +02:00
Minecrell 0ffb448de4 CI: common: fixup get_changed_packages() (!1069)
At the moment the function does not handle all cases correctly.
For example, it cannot say which package was changed when a file
in a subdirectory of a package was changed.

This is used e.g. in device-samsung-golden:

    device-samsung-golden
    ├── APKBUILD
    ├── deviceinfo
    ├── downstream
    │   ├── init-usb-hook.sh
    │   ├── module-config.conf
    │   └── modules-load.conf
    └── kwin.sh

At the moment, changing a file under "downstream" would attempt
building a "downstream" package, instead of device-samsung-golden.

Refactor the function a bit to walk up the directory hierarchy,
until we find an APKBUILD.
2020-03-21 22:32:48 +01:00
Minecrell ae4931816b CI: apkbuild-linting: use get_changed_files() instead of get_changed_packages() (!1069)
For APKBUILD linting we care only about APKBUILD files that were changed,
not to which package they belong or whatever.

The "with_directory" option of get_changed_packages() really meant
"just give me changed files", which means that we can just use
get_changed_files() instead.
2020-03-21 22:32:48 +01:00
Minecrell 87e1b9f0b5 CI: common: get_changed_files: return set, add "removed" parameter (!1069)
All users of get_changed_files() check if the file was removed,
so it seems like most of them do not need files that were removed.

Also, there is no need to have files listed twice,
so we should return a set instead of a list.
2020-03-21 22:32:48 +01:00
Oliver Smith e87f2ec27b CI: test_directory_structure.py: fix flake8 (!1069)
It seems that the .gitlab-ci.yml did not trigger properly when the file
was changed last time, and now it does in this MR. Fix the file to make
it pass.
2020-03-21 22:31:57 +01:00
Oliver Smith 0e5ba649a5 CI: remove upstream compatibility checks (!1085)
Do not run upstream compatibility checks whenever pushing to master.
This is confusing, because if the upstream compatibility check fails,
then it appears that the last patch was broken in some way although it
isn't related.

I've moved the upstream compatibility checks to a separate repository
already, and added a badge to the pmaports gitlab project that indicates
whether they are currently succeding or not. The checks run hourly now.

Related: https://gitlab.com/postmarketOS/monitoring
Fixes: #457
2020-03-21 18:21:16 +01:00
Minecrell 01e064c733 CI: add tests to ensure directory structure stays clean (!1070)
pmbootstrap now allows APKBUILDs in arbitrarily nested directories
within pmaports. This means that we really need some checks to ensure
APKBUILDs don't end up all over the place.

Add a test case with a whitelist of allowed directories.
Having this list in pmaports allows changing it without a new pmbootstrap
release.
2020-03-18 12:44:35 +00:00
Minecrell 796f2d097d CI: skip all dot folders for now (!1068)
At the moment we assume that all files except in /.* belong to
a package. Now that .shared-patches was moved to device/.shared-patches
that does not work correctly anymore.

This method should really check to which package the files belong
(e.g. walk up directories until it finds an APKBUILD) instead of
assuming they are directly in the same directory as the APKBUILD.

For now just ignore **/.* (i.e. all files in dot folders),
to unblock the MR since it's a critical fix.
2020-03-15 16:24:28 +03:00
Minecrell 2bfba9106a CI: update for device/* -> device/testing/* move (!1067) 2020-03-14 09:41:26 +01:00
Oliver Smith 7c5f01d892 run_testcases.sh: adjust to new device structure (!1066)
Fix error:
ERROR: Could not find deviceinfo file for selected device
2020-03-14 09:12:57 +01:00
Oliver Smith 77e4902dfb CI: install_pmb: use git clone, not tarball (!980)
GitLab disabled downloads of tarballs currently, because it was being
exploited for DoS agains their infrastructure. Work around this by using
git clone for now. I've thought about using --depth=1, but that would
break the ability to choose different branches.

Related: https://status.gitlab.com
2020-02-22 21:46:49 +01:00
Minecrell f7a4fcc3e7 CI: stop verifying kernel subpackage names (!907)
At the moment we check that the kernel variants for a device package
match the suffix of an existing linux-postmarketos-<suffix> package.

However, in most cases the name of the kernel subpackage has nothing
to do with the actual kernel that is used:

  - the kernel subpackages usually have generic names like "mainline" or
    "downstream", which have nothing to do with the actual suffixes like
    "qcom-msm8916", "allwinner" or "novathor"

  - pine64-dontbeevil uses kernel subpackages to switch between
    "longts" and "shortts" device tree variants. Both are actually
    using linux-postmarketos-allwinner.

So far we have been whitelisting names like "longts" or "shortts",
but the check does not seem very useful overall.

Removing it fixes the following CI failure for MSM8916:
  RuntimeError: Invalid kernel subpackage name 'mainline-modem',
  valid: ['downstream', 'rpi', 'rpi2', 'longts', 'shortts', 'stable', 'mainline',
          'allwinner', 'qcom-msm8916', 'qcom-msm8974', 'novathor']
2020-02-16 12:48:00 +01:00
Daniele Debernardi 3c9c61eb48 CI: skip linting check for cross/ folder (!881) 2020-01-16 00:47:16 +01:00
Alexey Min c203ee697d CI: add new requirements for pmbootstrap
https://gitlab.com/postmarketOS/pmbootstrap/commit/02e514f4d375e8c6956df2a69b505adf6b7296da
added a new required program from host system: git
2020-01-12 15:46:10 +03:00
Bart Ribbers d6ea9107bd CI: fix linter checking non-APKBUILDs (!867)
Only check APKBUILD files
2020-01-10 02:23:54 +03:00
Bart Ribbers 7c31d47745 CI: skip linting check for temp/ folder (!864)
Since we copy these aports directly from Alpine and try to keep them in
sync, we don't want to differ from upstream because our CI doesn't pass
on linting. If the APKBUILD should be improved, it should be done
upstream which is then synced back to us.
2020-01-09 02:40:38 +03:00
Oliver Smith 6b267e8010 CI: disable test_soname_bump
Temporarily disabled, because the postmarketOS binary repository has
armhf packages for various kde related packages depending on
qt5-qtwebengine-dev, although qt5-qtwebengine-dev isn't available for
armhf anymore. All related pmaports were disabled for armhf, however
currently the binary repository does not delete binary packages yet,
after the corresponding pmaport was deleted/disabled for a given arch.
I'll work on this with high priority, so we can enable the test again.

Related: https://gitlab.com/postmarketOS/build.postmarketos.org/issues/38
2020-01-06 05:03:04 +01:00
Oliver Smith 388e593ab1 Change copyright to 2020 2020-01-06 02:47:56 +01:00
Daniele Debernardi 3c43c503ee CI: fix parsing wiki page (!814) 2019-12-21 03:09:47 +01:00
Oliver Smith 6f464f96bf CI: skip git versions in framework check
The framework check is supposed to make sure, that we always have the
same versions of multiple packages that belong to the same framework.
We must exclude git versions for this check to have it working properly.

The interesting question is of course: why was this working before?

The check is using the url field to figure out which packages belong to
a certain framework, and by chance, all packages that had a git version,
did also use single quotes around the URL:
	url='http://qt-project.org/'
With the old APKINDEX parsing code, this was parsed as:
	url: "'http://qt-project.org/'"
And therefore, this was considered a different URL than the URL with
double quotes (again, by chance!) used by the stable qt versions:
	url: "http://qt-project.org/"
I have improved the APKBUILD parsing code in pmbootstrap today, and now
it is properly parsing both URLs.

Related: https://gitlab.com/postmarketOS/pmbootstrap/merge_requests/1837
2019-11-30 15:18:20 +01:00
Bart Ribbers 8b7c90d328 CI: various improvements (!694)
* Only run the wiki test, if anything matching device/device-* was
  modified.
* Split testcase linting (flake8) from shellcheck and only run flake8 if
  .gitlab-ci/* was modified.
* Rename .gitlab-ci/static_code_analysis.sh to .gitlab-ci/shellcheck.sh
  and make it scan all pre/post install/upgrade/deinstall scripts.

[ci:skip-vercheck]: other commits in this merge request have several
                    intended version downgrades, such as 3 -> 1.0.0
2019-11-05 22:22:53 +01:00
Bart Ribbers 6c42c53cd5 main/postmarketos-splash: build from new repo (!694) 2019-11-05 22:15:10 +01:00
Bart Ribbers 310d7314cb CI: remove redundant C linter check (!694) 2019-11-05 22:15:10 +01:00
Oliver Smith b407687761 CI: whitelist firmware-asus-me176c-acpi in devpkg (!699)
Without this, the device will simply run the broken ACPI DSDT table, so
we might as well update it. If we had put it into a subpackage, it
would not be possible to use the fixed DSDT without any other firmware
packages.
2019-11-03 15:58:21 +01:00
Oliver Smith c8143f0212 CI: framework versions test: handle hotfixes (!639)
Cut off the hotfix-version (fourth number) from the version strings
before comparing them, to fix invalid errors like:

[14:57:00] Reference pkgver: 5.16.90 (from 'khotkeys')
[14:57:00] ERROR: plasma-workspace has version 5.16.90.1
2019-09-29 20:39:03 +02:00
Oliver Smith a3510eca5e CI: test_upstream_compat: check binutils again
Related: #357
2019-09-16 22:52:19 +02:00
Daniele Debernardi bc399297dc CI: check for CHANGEME in all dirs (!628)
With pmbootstrap!1811, generated aports in temp/ can also have a
"(CHANGEME!)" string. Let's check in all dirs, not just in the device
dir.
2019-09-14 05:24:37 +02:00
Luca Weiss 82b143f3f0 Fix spelling mistakes (!466)
codespell --skip="./.git,*.patch,*.diff,config-*.*"

[ci:skip-build]
[ci:skip-vercheck]
2019-06-30 01:40:02 +02:00
Luca Weiss 90e2cc7eff CI: check coding style of C code (!465) 2019-06-26 22:36:20 +02:00
Daniel Michelin 0a634a4932 CI: check_mr_settings: disallow squashing commits (!464) 2019-06-26 21:55:47 +02:00
Martijn Braam 1b5e1e0d0c tests: Allow longts and shortts as kernel name (!407)
This is required for the pinephone-dontbeevil.
2019-06-20 00:18:46 +02:00
Oliver Smith cd94b3ef74 CI: test_upstream_compat: disable binutils check
We need to freeze binutils at 2.31 (Alpine has 2.32 already), until
issue #295 is resolved. Let's disable the test, so the testsuite passes
again if everything else is good, and we don't start to ignore whether
it fails or not.
2019-06-11 21:33:32 +02:00
Oliver Smith 75c8eaeaf7 CI: fix package count check + ci:skip-build (!404)
Do not require ci:ignore-count, when using ci:skip-build in a MR that
has change a lot of packages. If the user already supplies ci:skip-build
then we can safely assume that we don't to check the package count.

Fixes #267
2019-05-31 00:38:17 +02:00
Oliver Smith e504c8d1b9 CI: version check: fix running on upstream/master (!403)
When running on upstream/master, don't compare HEAD against
upstream/master. This is the same commit, so all versions will be the
same. Instead compare against HEAD~1.
2019-05-31 00:27:41 +02:00
Oliver Smith 11b1448aa5 CI: add check_changed_aports_versions.py (!382)
Make sure that changed aports always have a higher version than what is
currently in master. This check can be skipped with ci:skip-vercheck (in
square brackets).

Related: #187
2019-05-30 16:11:33 +02:00
Oliver Smith debf530c78 CI: add common.py (from build_changed_aports.py)
Move most code from build_changed_aports.py to common.py. Another patch
will follow soon, which uses common.py to check the versions of changed
aports.

Related: #187
2019-05-24 22:48:05 +02:00