Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLSA support #3058

Merged
merged 18 commits into from
Mar 4, 2024
Merged

SLSA support #3058

merged 18 commits into from
Mar 4, 2024

Conversation

gyr
Copy link
Member

@gyr gyr commented Feb 17, 2024

Due to SLSA constrains pkglistgen.py cannot run on botmaster using gocd, as it must run on a separate and isolated server the following changes were added:

  • create scripts that run pkgelistgen.py emulating the gocd pipelines (RelPkg and Update.000product)
  • create systemd services to execute the scripts for multiple SLSA project
  • add log support
  • create a rpm package that will be used to deploy it on SLSA server

- Add script to run relpkg
- Add systemd service and timer
- Change SLSA user
- Only run pkglistgen when build finishes
- Add oscrc file for SLSA
- Change user to osrt-slsa
- Refactor log
- Unify log for pkglistgen
- Replace external while true loop with a systemd timer for pkglistgen
- Add process check on verify-build-and-generatelists and
  generate-release-packages to avoid start pkglistgen when there is an
  instance that is already running it
- SLSA services must not share the same workdir
- Decrease the interval time to trigger pkglistgen
- Add debug flag for relpkgen
- Create custom-cache-tag for pkglistgen to enable separate cache dir
  name in case of parallel running
- Add custom-cache-tag to SLSA services
- Check for systemd service instead of process to ensure that SLSA
  services will not run in parallel
- Change pkglisgen timer to avoid overlap with relpkggen timer
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (54075b0) 28.31% compared to head (d380b44) 25.37%.

Files Patch % Lines
pkglistgen/tool.py 0.00% 4 Missing ⚠️
pkglistgen/cli.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3058      +/-   ##
==========================================
- Coverage   28.31%   25.37%   -2.95%     
==========================================
  Files          86       86              
  Lines       14799    14803       +4     
==========================================
- Hits         4191     3756     -435     
- Misses      10608    11047     +439     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nilxam
Copy link
Contributor

nilxam commented Feb 21, 2024

the test is failed.

@gyr gyr marked this pull request as draft February 21, 2024 15:29
SLSA scripts don't have a help flag due to they are intended
to be executed by sytemd services only.
@gyr gyr marked this pull request as ready for review February 22, 2024 10:35
@gyr
Copy link
Member Author

gyr commented Feb 22, 2024

the test is failed.

Fixed, excluded the 2 SLSA scripts from the test as they don't have help flag because they are intended to be executed only by systemd services.

Copy link
Contributor

@nilxam nilxam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the change. But we might need to wait #3062 I assuming that, otherwise the packaging test can not be succesful if I understand that right...

Copy link
Contributor

@gleidi-suse gleidi-suse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gyr
Copy link
Member Author

gyr commented Mar 4, 2024

I'm fine with the change. But we might need to wait #3062 I assuming that, otherwise the packaging test can not be succesful if I understand that right...

All checks passed now, package built even with #3062 not being merged.

@gleidi-suse gleidi-suse merged commit fd5b7a6 into openSUSE:master Mar 4, 2024
11 checks passed
@DimStar77
Copy link
Contributor

somebody forgot about RPM 4.19:

can't install openSUSE-release-tools-slsa-build-service-20240315.b086253-1.1.noarch:
nothing provides group(osrt-slsa) needed by openSUSE-release-tools-slsa-build-service-20240315.b086253.noarch
nothing provides user(osrt-slsa) needed by openSUSE-release-tools-slsa-build-service-20240315.b086253.noarch

either the user is generated properly using sysusers.d or it is at least advertised in the pkg meta
https://en.opensuse.org/openSUSE:Packaging_guidelines#Users_and_Groups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants