Skip to content

Conversation

@thresheek
Copy link
Member

Proposed changes

This PR adds a few targets which will be used to generate inputs for attestation documents for pkg-oss builds.
Those targets are a dependency of main ones - base, module-% so packaging scripts will not need to call any new targets to generate them.

Files that are generated (attest-base or attest-module-$modulename) can be fetched from the build source dir, and concatenated accordingly to produce a full input document for a given build.

Currently implemented for debian/ to test the idea and gather comments, and if we settle on the implementation, it's trivial to apply the same changes for other distributions, and downstream forks like NGINX Plus packaging.

@thresheek thresheek requested a review from oxpa October 21, 2025 01:49
@thresheek thresheek self-assigned this Oct 21, 2025
@oxpa
Copy link
Contributor

oxpa commented Oct 21, 2025

I was thinking more about changing every module makefile to get an explicit list of dependencies. And then use the said list everywhere.
Checkout attest branch in the repo with my approach implemented for lua. The result is the same though and the change is smeared across the whole repository. So I'm not sure it's any good.

@thresheek thresheek force-pushed the attest branch 3 times, most recently from 3778f07 to 6ee0d3a Compare November 7, 2025 06:11
@thresheek
Copy link
Member Author

Thanks for the suggestion, indeed it's best not to guess but have a rather rigid dependency as defined per Makefiles.

I went ahead and implemented the following:

  • dependencies in modules for debian, alpine, rpm
  • fixed variables naming in contrib to properly match the contrib names
  • moved attestation targets to contrib/attestation.mak to be included in OS-specific Makefiles so we don't have to duplicate the code

For now, the attestation code generates space-separated output files. I originally wanted it to be tab-separated, but am having a hard time convincing gnu make to output those. Maybe we'll just stick to space-separated then.

@thresheek
Copy link
Member Author

FWIW, decided to stick with the whitespaces (discussed with the security team)

Copy link
Contributor

@oxpa oxpa left a comment

Choose a reason for hiding this comment

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

Красивое __

@oxpa
Copy link
Contributor

oxpa commented Nov 18, 2025

even though the PR touches almost every file in the repository - it feels like renaming some variables under contrib and defining dependencies is a welcomed change. I don't remember the exact reason but I was curious why it wasn't done initially. We will probably find places to simplify stuff later on. Well done, great job :)

@thresheek thresheek changed the title [DRAFT] Add targets to create attestation input documents Add targets to create attestation input documents Nov 18, 2025
And use them to compute .deps-module-* targets
And use them to compute .deps-module-* targets
And use them to compute .deps-module-* targets
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.

2 participants