Draft: CI: aports version check: modernize with new rules
- Nov 11, 2022
-
-
Oliver Smith authored
Update the script once more with the goal that we no longer need to comment on pkgrel/pkgver bumps. Parse not only the version of the old and new package, but also the checksums and remote sources. Replace the previous check of simply having $pkgver-r$pkgrel higher than the upstream APKBUILD with more detailed rules: APKBUILD has remote sources? ------> Did sha512sums change? | No | | | Yes | No | Yes v | v Did the file name of a remote | * Increase pkgver source change? ----. | * Set pkgrel=0 | | | | Yes | No | v v v Is pkgver=9999? -----> * Don't change pkgver (Forked from Alpine) Yes * Bump pkgrel by 1 | | No v * Set the pkgver to the version of the source tarball * Set pkgrel=0 I'll also put this in the wiki at: https://postmarketos.org/howto-bump-pkgrel-pkgver Besides the new rules, print a detailed error message below each package where the test failed that explains exactly what was expected and what the reasoning behind that is. Also add a hint that users can run this locally with 'pmbootstrap ci' now. Use logging instead of print, so we get colored ERROR: and NOTE: statements from pmbootstrap code, this should make it easier to read.
-
Oliver Smith authored
Move parse_source_from_checksums() from .ci/testcases/test_source.py to .ci/lib/common.py and give it the more fitting name parse_apkbuild_checksums(). Create a symlink for common.py to make it also available in .ci/lib/common.py. This is in preparation for using it in .ci/lib/check_changed_aports_versions.py in a future patch.
-
Oliver Smith authored
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".
-
Oliver Smith authored
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.
-
Oliver Smith authored
-
Oliver Smith authored
-
Oliver Smith authored
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.
-
Oliver Smith authored
-
Oliver Smith authored
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.
-
Oliver Smith authored
-
Oliver Smith authored
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
-
Oliver Smith authored
I added this around all urls in the beginning of postmarketOS, but now I think it makes it less readable and doesn't have a benefit.
-