Skip to content

Improve build tools and update documentation - #42

Merged
r0x0d merged 3 commits into
rhel-lightspeed:mainfrom
samdoran:build-improvements
Jun 6, 2026
Merged

Improve build tools and update documentation#42
r0x0d merged 3 commits into
rhel-lightspeed:mainfrom
samdoran:build-improvements

Conversation

@samdoran

@samdoran samdoran commented Jun 5, 2026

Copy link
Copy Markdown
Member

Add make targets to generate vendor tarball, create srpm, and import sources.

Use dynamic targets based on the version to determine if the target needs to run.
Static aliases are used to provide a consistent interface.

make vendor-tarball
make srpm
make import

The SRPM variable is recursively expanded since it may change when the srpm target runs.

Running make import will build the vendor tarball, build the srpm, and then import it into the dist-git repo.

There's still a bit of work to do with making sure the dist-git repo is in the correct state to import the srpm. The changes to the dist-git repo then need to be submitted in a PR. That isn't covered in these changes.

Summary by CodeRabbit

  • Documentation

    • Simplified setup instructions by removing manual build steps.
    • Updated build system documentation with new targets and configuration options.
  • Chores

    • Enhanced build automation with centralized version and artifact management.

samdoran added 3 commits June 5, 2026 13:00
…sources

Use dynamic targets based on the version to determine if the target needs to run.
Static aliases are used to provide a consistent interface.

The SRPM variable is lazily evaluated since it may change when the srpm target runs.

Update clean target to remove the extracted source directory.
@samdoran
samdoran requested a review from a team as a code owner June 5, 2026 17:11
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR refactors the Fedora COPR build workflow by centralizing version and artifact discovery in the Makefile, implementing dependency-driven targets (vendor-tarball, srpm, import), updating the vendor tarball generation script to exclude specific directories, and expanding documentation to describe the new build targets and configurable variables.

Changes

COPR Build System Refactoring

Layer / File(s) Summary
Makefile build variables and target dependencies
Makefile
Introduces computed variables (DIST_GIT_CHECKOUT, VERSION, VENDOR_TARBALL, SRPM) from goose.spec and configurable checkout paths. Replaces the simple srpm target with a vendor-tarball prerequisite that runs generate-vendor-tarball.sh, makes srpm depend on vendor-tarball, adds an import target for COPR integration, and expands clean to remove goose-* outputs.
Vendor tarball generation with explicit exclusions
generate-vendor-tarball.sh
Modifies source extraction to use tar -xzf with explicit --exclude flags to omit vendor/v8 and service-related directories under goose-${VERSION}, replacing the prior combined rm -rf && tar xf with suppressed output. Patch application loop workflow remains functionally intact.
Documentation of targets, variables, and setup
README.md, docs/makefile.md
Expands docs/makefile.md with descriptions of vendor-tarball, build-all targets, updated clean artifacts list, and a new Variables section documenting DIST_GIT_CHECKOUT, SRPM, VERSION, and VENDOR_TARBALL. Simplifies README.md setup instructions by removing the deprecated make spec step.

🎯 2 (Simple) | ⏱️ ~12 minutes


Possibly related PRs

  • rhel-lightspeed/goose#39: Both PRs modify the Makefile's COPR/SRPM workflow by changing the srpm target to use fedpkg --release rawhide srpm and update clean-related artifact handling at the same build-target code level.

Suggested reviewers

  • r0x0d
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Improve build tools and update documentation' is vague and does not specifically identify the main change. While it mentions documentation updates, it obscures the core work of adding Makefile targets for vendor tarball, SRPM, and import functionality. Consider a more specific title such as 'Add Makefile targets for vendor tarball, SRPM, and dist-git import' to clearly convey the primary changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/makefile.md`:
- Around line 41-45: Update the `vendor-tarball` documentation to list the extra
tools required by the `generate-vendor-tarball.sh` script: explicitly mention
`cargo`, `rpmspec`, `tar`, `patch`, and `cargo-vendor-filterer` as prerequisites
for the `vendor-tarball` target and note that the target is skipped if the
tarball already exists; ensure this appears alongside the `vendor-tarball`
section and references `generate-vendor-tarball.sh` so users know why these
tools are needed.

In `@Makefile`:
- Around line 35-36: Wrap the shell variables in the import recipe with double
quotes to make the command robust: in the Makefile's import target change the
recipe so it cd's into "$(DIST_GIT_CHECKOUT)" and passes "$(SRPM)" to fedpkg
(references: the import target, DIST_GIT_CHECKOUT, and SRPM) so paths or names
with spaces/special chars are handled safely.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cffd2bd9-9378-48a9-928b-a73d6f9101ed

📥 Commits

Reviewing files that changed from the base of the PR and between b5b32fc and bdfb248.

📒 Files selected for processing (4)
  • Makefile
  • README.md
  • docs/makefile.md
  • generate-vendor-tarball.sh
💤 Files with no reviewable changes (1)
  • README.md

Comment thread docs/makefile.md
Comment thread Makefile
@r0x0d
r0x0d merged commit 949a399 into rhel-lightspeed:main Jun 6, 2026
13 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 29, 2026
This was referenced Jul 24, 2026
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.

3 participants