**Summary**
This PR:
- Improves the output format when not running in CI.
- Shows this output when being called via a hook.
- Extends the package bump check so that pspec files must always be
bumped.
Resolves#1888.
**Test Plan**
Run CI checks locally using `go-task check` in a fairly dirty working
directory:

Try to commit a changed pspec file:
```
$ gotopkg nano
$ go-task build
$ git add pspec_x86_64.xml
$ git commit
ERR packages/n/nano/pspec_x86_64.xml:1: Package release is not incremented by 1
Package checks failed: <snip>/packages/common/CI/package_checks.py packages/n/nano/pspec_x86_64.xml
```
**Checklist**
- [x] ~~Package was built and tested against unstable~~
Improve the worklog build output with:
- An emoji indicating the job status.
- A color indicating the job status.
- The build duration when the job is finished.
- The comment given to the bulid.
Change the output of the `update` subcommand with:
- A Markdown format that can be used for publishing.
- Multiple authors (one for each commit).
- The GitHub author that made the change.
**Summary**
Without specifying the -s/--sort option, worklog.py will output the
latest build or commit last.
This enables the ability to trivially keep an eye on large PR (re)builds
with something like:
while true; do
date
./worklog.py --format md builds 2024-02-24 now |tail -n5
echo "----"
sleep 30
done
**Test Plan**
Test the output of worklog.py with and without -s/--sort options.
**Checklist**
- [ ] Package was built and tested against unstable
**Summary**
Script which can take the markdown output of worklog.py and
output one entry per package using the highest version
**Test Plan**
- Examined output sent to stdout and output written to file to ensure
data is correct
- Ran automated test from common/perl
```bash
❯ prove -v get_unique_updates/t/*.t
get_unique_updates/t/get_unique_updates.t ..
# Seeded srand with seed '20240214' from local date.
1..6
ok 1 - Module loads correctly.
ok 2 - Markdown file passes file check
ok 3 - Text file fails file check
ok 4 - Entry for package with 2 versions has highest value
ok 5 - Entry for package with 3 versions has highest version
test looking for /home/tracey/packaging/packages/common/perl/get_unique_updates/t/../t/data/markdown_output.md
ok 6 - Output file is written and has expected number of packages
ok
All tests successful.
Files=1, Tests=6, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.06 cusr 0.01 csys = 0.08 CPU)
Result: PASS
```
**Checklist**
- [ ] Package was built and tested against unstable N/A
Without specifying the -s/--sort option, worklog.py will output the
latest build or commit last.
This enables the ability to trivially keep an eye on large PR (re)builds
with something like:
while true; do
date
./worklog.py --format md builds 2024-02-24 now |tail -n5
echo "----"
sleep 30
done
Signed-off-by: Rune Morling <ermo@serpentos.com>
This can be useful when looking up the correct CPE $PRODUCT:$VENDOR pair
for monitoring.yml purpurses and for manually searching for known CVEs.
This commit only adds a PoC bash script helper.
Signed-off-by: Rune Morling <ermo@serpentos.com>
This fixes an issue where lightdm-wrapper would choke on the previous
function name (reindex-localrepo) when logging into Budgie.
Reported and tested working by @yusi1.
Signed-off-by: Rune Morling <ermo@serpentos.com>
**Summary**
We have no convenient way to re-index our local repo.
Since it is quite a long command, why not add a convenience function to
do it correctly that is maintained by Solus Staff?
This commit does just that for all helper scripts.
Signed-off-by: Rune Morling <ermo@serpentos.com>
**Summary**
Fix `pkgconfig32` entries not being sorted in a separate section by
sorting them *before* `pkgconfig` (as that is currently most common).
Resolves#921
**Test Plan**
- Run checks against `packages/a/avahi/package.yml`, see no dependency
order violation.
- Run checks against `packages/c/cups/package.yml`, see dependency order
violation (it has `pkgconfig` before `pkgconfig32`).
**Checklist**
- [x] ~~Package was built and tested against unstable~~ n/a
**Summary**
SPDX license identifiers may be a 'simple' or 'compound' expression,
meaning that the following formats are also allowed:
- A document reference instead of license identifier.
- `+` after the license identifier.
- License identifier followed `WITH` and an exception identifier.
- The above split by `AND` or `OR`.
- The above contained between `()`.
All but the first case should now be valid according to the package
checks. The first case is still invalid, as we want license identifiers
and not document references in our packages.
See: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/Resolves#956
**Test Plan**
Manually run the package checks against all packages with `WITH/AND/OR`
in the license:
```console
> common/CI/package_checks.py (rg 'license *:.* (WITH|AND|OR) ' -l |rg yml)
Checking files: packages/w/wxsqlite3/package.yml, packages/w/wxwidgets/package.yml, packages/w/wxPython/package.yml, packages/w/wxwidgets30/package.yml, packages/o/openscenegraph/package.yml, packages/l/libabigail/package.yml, packages/o/openjdk-17/package.yml, packages/o/openjdk-11/package.yml, packages/o/opencascade/package.yml, packages/o/opam/package.yml, packages/j/jtreg/package.yml
Found 0 result(s), 0 error(s)
```
Manually invalidate one of the licenses and run the check again:
```console
./common/CI/package_checks.py (rg 'license *:.* (WITH|AND|OR) ' -l |rg yml)
Checking files: packages/w/wxsqlite3/package.yml, packages/w/wxwidgets30/package.yml, packages/w/wxwidgets/package.yml, packages/w/wxPython/package.yml, packages/o/openscenegraph/package.yml, packages/o/openjdk-11/package.yml, packages/o/openjdk-17/package.yml, packages/l/libabigail/package.yml, packages/o/opencascade/package.yml, packages/o/opam/package.yml, packages/j/jtreg/package.yml
Found 1 result(s), 0 error(s)
::warning file=packages/l/libabigail/package.yml,line=7::invalid license identifier: 'Apache-2.0 WITH LLVM-exceptionx'
```
**Checklist**
- [x] ~~Package was built and tested against unstable~~ n/a
**Summary**
Ensure that package versions are always strings and not numbers, as
might happen with versions like '1.2' and '20230102'.
**Test Plan**
Manually run check against repo:
```shell
$ ./common/CI/package_checks.py **/package.yml
Checking files: <snip>
Found 234 result(s), 234 error(s)
::error file=packages/a/a2jmidid/package.yml,line=2::Package version is not a string
::error file=packages/a/accounts-qml-module/package.yml,line=2::Package version is not a string
<etc>
```
**Checklist**
- [x] ~~Package was built and tested against unstable~~ n/a
Add a simple configuration file for the CI checks,
that includes dates for a package freeze.
Packages updates for packages in `common/iso_packages.txt` result in
either a notice outside of freeze periods, or a warning in freeze periods.
SPDX license identifiers may be a 'simple' or 'compound' expression,
meaning that the following formats are also allowed:
- A document reference instead of license identifier.
- `+` after the license identifier.
- License identifier followed `WITH` and an exception identifier.
- The above split by `AND` or `OR`.
- The above contained between `()`.
All but the first case should now be valid according to the package checks.
The first case is still invalid, as we want license identifiers and not document references in our packages.
See: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/Resolves#956