Skip to content

feat: update RPM packaging for core-only complyctl after provider split#485

Open
marcusburghardt wants to merge 4 commits intocomplytime:mainfrom
marcusburghardt:005-rpm-packaging-ci
Open

feat: update RPM packaging for core-only complyctl after provider split#485
marcusburghardt wants to merge 4 commits intocomplytime:mainfrom
marcusburghardt:005-rpm-packaging-ci

Conversation

@marcusburghardt
Copy link
Copy Markdown
Contributor

Summary

Restore Fedora RPM packaging for complyctl after the provider repository split (spec 004). The complyctl RPM spec is simplified to deliver only the core CLI binary, man page, and owned provider directories. The openscap-provider sub-package and all provider-specific man pages are removed since providers are now distributed via the complytime-providers repository.

Changes in this PR (complyctl repo):

  • complyctl.spec: Rewritten for core-only delivery — removes openscap-provider sub-package, builds only cmd/complyctl, adds man page (complyctl.1), adds vendor/modules.txt for automatic bundled provides, adds %doc README.md, changes Release to 1%{?dist}
  • .goreleaser.yaml: Removes the openscap-plugin build entry (references removed cmd/openscap-plugin/)
  • Makefile: Removes stale provider man page variables and build targets
  • docs/man/c2p-openscap-manifest.*: Removed (provider-specific, belongs in complytime-providers)
  • docs/man/complyctl.md: Fixes broken URL and removes stale provider man page reference
  • docs/man/complyctl.1: Regenerated via make man
  • docs/RELEASE_PROCESS.md: Documents independent release cycles for complyctl and complytime-providers Fedora packages
  • specs/005-rpm-packaging-ci/: Full specification, plan, research, data model, contracts, and task breakdown

Companion PR needed (complytime-providers repo):

A separate PR will be submitted to complytime-providers with:

  • complytime-providers.spec — two sub-packages (openscap + ampel), no main package
  • .packit.yaml — full Packit CI/CD pipeline
  • .fmf/version + plans/test-RPM-providers.fmf — Testing Farm integration

Related Issues

  • Continuation of the provider repository split (spec 004)
  • Prerequisite for complytime-providers: Fedora package review (manual, one-time)

Review Hints

  • Review the three commits in sequence:

    1. Spec artifacts (docs:): specification, plan, research decisions, and task breakdown under specs/005-rpm-packaging-ci/
    2. Implementation (feat:): the actual packaging and documentation changes
    3. Cleanup (fix:): removal of stale provider man page files and Makefile cleanup
  • Both rpmlint complyctl.spec and packit validate pass with zero errors.

  • To build and test the RPM locally:

    # Download the source tarball
    spectool -g -R complyctl.spec
    
    # Build the SRPM
    rpmbuild -bs complyctl.spec \
      --define "_sourcedir $(pwd)" \
      --define "_srcrpmdir $(pwd)"
    
    # Build in mock (Fedora rawhide)
    mock -r fedora-rawhide-x86_64 rebuild complyctl-*.src.rpm
    
    # Verify the built RPM contains only expected files
    rpm -qlp /var/lib/mock/fedora-rawhide-x86_64/result/complyctl-*.x86_64.rpm
    
    # Expected: /usr/bin/complyctl, man page, LICENSE, modules.txt,
    #           README.md, and owned provider directories.
    # Must NOT contain any provider binaries.
    
    # Verify bundled provides are auto-generated
    rpm -qp --provides /var/lib/mock/fedora-rawhide-x86_64/result/complyctl-*.x86_64.rpm \
      | grep "bundled(golang"
    
    # Verify no provider dependencies
    rpm -qp --requires /var/lib/mock/fedora-rawhide-x86_64/result/complyctl-*.x86_64.rpm \
      | grep -E "complytime-providers|scap-security-guide" && echo "FAIL" || echo "PASS"

    Alternatively: packit build locally

  • To verify GoReleaser:

    goreleaser check
    goreleaser build --snapshot --clean
    # Should produce only the complyctl binary, no openscap-plugin
  • The Requires: complyctl >= 0.0.8 version in the companion complytime-providers spec is a placeholder — it should be set to the first release that includes the provider SDK rename (pkg/provider/).

T038: replace directive removed in complytime-providers PR complytime#4
T051: complyctl e2e-test passes on main post-merge
T052: binary discovery confirmed via CI (e2e passes with provider from complytime-providers)
T054: complyctl CI pipeline passes cleanly on main with no provider source dirs

Issues closed: complytime#483 (plugins removed), complytime#457 (both repos working)

Assisted-by: OpenCode (claude-sonnet-4-6@default)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Add complete specification, implementation plan, research decisions,
data model, packaging contracts, and task breakdown for restoring
Fedora RPM packaging after the provider repository split (spec 004).

Covers complyctl spec simplification, new complytime-providers spec
with two sub-packages, Packit CI/CD automation, Testing Farm
integration, and release process updates.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Rewrite complyctl.spec to remove the openscap-provider sub-package
and simplify for core-only delivery:
- Build only cmd/complyctl (not cmd/...)
- Add complyctl.1 man page to the RPM
- Add vendor/modules.txt for automatic bundled provides generation
- Add %doc README.md
- Retain owned provider directories for provider sub-packages
- Change Release tag to standard 1%{?dist}

Update .goreleaser.yaml to remove the openscap-plugin build entry
that references the removed cmd/openscap-plugin directory.

Update docs/RELEASE_PROCESS.md to document the independent release
cycles for complyctl and complytime-providers Fedora packages.

Update docs/man/complyctl.md to fix broken URL and remove stale
provider man page reference in SEE ALSO section.

Both rpmlint and packit validate pass with zero errors.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove c2p-openscap-manifest.md and c2p-openscap-manifest.5 which
are provider-specific documentation that belongs in the
complytime-providers repository. Clean up Makefile man target to
only generate complyctl.1.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
@marcusburghardt
Copy link
Copy Markdown
Contributor Author

@jpower432 and @gvauter , the spec here was very specific, so I proceed with the implementation already. I expect some other changes around release and packit when working with integration tests.

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.

1 participant