Skip to content

Conversation

oliviacrain
Copy link
Contributor

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/tools/cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

The audit package was recently added to the toolchain in #2416. The audit package uses systemd macros to handle service management. This was fine when audit was outside the toolchain, since systemd-bootstrap-rpm-macros is in the worker chroot and the systemd macros expand just fine at build-time.

However, the raw toolchain does not have any systemd macros defined. So, specs in the toolchain can't use systemd macros since they can't expand into a proper scriptlet at build-time. This causes scriptlet failures when upgrading the audit package.

So, let's bootstrap the raw toolchain with the systemd RPM macros! This PR adds the macros.systemd file from the systemd-rpm-macros package as part of the raw toolchain. This file gets downloaded like any other toolchain source and is installed into the RPM macros directory when building the raw toolchain.

TODO: Need to add a note to systemd.spec about updating the toolchain macro file when upgrading that package

Change Log
  • Add
Does this affect the toolchain?

YES

Associated issues
Test Methodology
  • Pipeline build ongoing, will validate that produced audit-libs RPM has expanded systemd macros in its scriptlets.

@ghost ghost added Tools main PR Destined for main labels Apr 25, 2022
@oliviacrain
Copy link
Contributor Author

Closing- I worked on two fixes in parallel, the other one (#2878) ended up being less hacky and just as effective.

@oliviacrain oliviacrain deleted the olivia/audit-unexpanded-scriptlets branch April 26, 2022 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant