Skip to content

feat: modernize RPM spec for Fedora Go packaging guidelines - #826

Merged
marcusburghardt merged 5 commits into
complytime:mainfrom
marcusburghardt:opsx/rpm-spec-modernization
Aug 27, 2026
Merged

feat: modernize RPM spec for Fedora Go packaging guidelines#826
marcusburghardt merged 5 commits into
complytime:mainfrom
marcusburghardt:opsx/rpm-spec-modernization

Conversation

@marcusburghardt

@marcusburghardt marcusburghardt commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

Modernize complyctl.spec for Fedora Go packaging guidelines before v1.0.0 release.

Fixes #827

Changes

  • Fix debuginfo: Remove %global debug_package %{nil}, switch to %gobuild macro (proper build-id, DWARF, external linkmode)
  • Adopt go-vendor-tools: Source1 vendor archive, Source2 config, %go_vendor_license_* macros for vendored license verification
  • Modernize spec: %gocheck2 for unit tests, %autorelease, %gometa -f, %goprep -A, %generate_buildrequires
  • Update Packit: srpm_build_deps, post-modifications action for vendor archive generation, sync go-vendor-tools.toml to dist-git
  • F43 compat: Generalize vendor/modules.txt sed to match any Go version above 1.25
  • License: Composite SPDX expression from go_vendor_license scan
  • CentOS Stream: Targets temporarily removed (go-vendor-tools unavailable)

Verification

Local RPM build verified:

  • rpmbuild -ba succeeds with debuginfo subpackage produced
  • rpmlint passes (0 errors)
  • %gocheck2 runs unit tests with exclusions working correctly
  • rpmbuild --without check passes
  • 355 vendor license files installed under /usr/share/licenses/complyctl/

Design

See openspec/changes/rpm-spec-modernization/ for proposal, design (9 decisions), and task tracking.

Review Hints

This PR can be more easily tested in a Fedora VM using complytime-demos: complytime/complytime-demos#81

@marcusburghardt
marcusburghardt force-pushed the opsx/rpm-spec-modernization branch 4 times, most recently from f7e42d7 to f893adf Compare August 26, 2026 09:08
@marcusburghardt
marcusburghardt force-pushed the opsx/rpm-spec-modernization branch 2 times, most recently from 08a157e to c2e8240 Compare August 27, 2026 11:45
@marcusburghardt
marcusburghardt marked this pull request as ready for review August 27, 2026 11:46
@marcusburghardt
marcusburghardt requested a review from a team as a code owner August 27, 2026 11:46
@marcusburghardt
marcusburghardt requested review from sedonnel and trevor-vaughan and removed request for sedonnel August 27, 2026 11:46
OpenSpec change proposal for modernizing the RPM spec file to align
with Fedora Go packaging guidelines for the v1.0.0 release.

Artifacts: proposal.md, design.md (9 decisions, D1-D9), tasks.md
(28 tasks across 5 phases). Specs skipped (skip_specs: true) since
this is a packaging infrastructure change with no application
behavior modifications.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
- Remove %global debug_package %{nil} and switch to %gobuild macro
  for proper debuginfo generation (build-id, DWARF, external linkmode)
- Add go-vendor-tools integration: Source1 vendor archive, Source2
  config, %go_vendor_license_* macros for license verification
- Use %gocheck2 for unit tests with -t exclusions for non-unit paths
- Adopt %autorelease, %gometa -f, %goprep -A, %generate_buildrequires
- Generalize F43 vendor/modules.txt sed to match any Go version
- Set License to composite SPDX expression from go_vendor_license:
  Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- Align Version to 1.0.0

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
- Add srpm_build_deps (go-vendor-tools, golang, askalono-cli) for
  Copr SRPM builds
- Add post-modifications action for vendor archive generation using
  bash -c wrapper (required by Packit command tokenization)
- Context detection via PACKIT_DOWNSTREAM_REPO for downstream vs
  upstream working directory
- Use GOTOOLCHAIN=local (no auto-download in Fedora build env)
- Sync go-vendor-tools.toml to dist-git via files_to_sync
- Add create_sync_note: false
- Remove CentOS Stream targets (go-vendor-tools unavailable)

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Askalono detector config with manual license entries for:
- go.yaml.in/yaml/v3 and gopkg.in/yaml.v3 (dual MIT AND Apache-2.0)
- mattn/go-localereader (MIT declared in README, no LICENSE file)

Generated by go_vendor_license report --autofill=auto with scancode
backend for undetected licenses.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
@marcusburghardt
marcusburghardt force-pushed the opsx/rpm-spec-modernization branch from c2e8240 to 48fea72 Compare August 27, 2026 14:47
@marcusburghardt

Copy link
Copy Markdown
Member Author

Rebased

@marcusburghardt
marcusburghardt enabled auto-merge (rebase) August 27, 2026 14:50

@hbraswelrh hbraswelrh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@marcusburghardt
marcusburghardt merged commit 7ccb4e7 into complytime:main Aug 27, 2026
26 checks passed
@marcusburghardt
marcusburghardt deleted the opsx/rpm-spec-modernization branch August 27, 2026 16:18
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.

Review and modernize RPM spec for Fedora Go packaging guidelines

4 participants