-
Notifications
You must be signed in to change notification settings - Fork 4
Cleanup makefile and add docs #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| # Makefile Reference | ||
|
|
||
| This document describes the Makefile targets available for building and | ||
| managing the goose RPM package. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| The following tools must be available in your environment, either installed | ||
| locally or inside a development container: | ||
|
|
||
| - `fedpkg` | ||
| - `spectool` | ||
| - `copr-cli` | ||
| - `fuzzytail` (optional, for `make logs`) | ||
|
|
||
| ## Targets | ||
|
|
||
| ### `create-copr-repo` | ||
|
|
||
| Creates a new [COPR](https://copr.fedorainfracloud.org) repository for | ||
| building goose. This is a one-time setup step and only needs to be run when | ||
| bootstrapping the project from scratch. | ||
|
|
||
| The repository is created with the following chroots enabled: | ||
|
|
||
| - `fedora-rawhide-x86_64` | ||
|
|
||
| ```bash | ||
| make create-copr-repo | ||
| ``` | ||
|
|
||
| ### `sources` | ||
|
|
||
| Downloads the source tarballs defined in `goose.spec` using `spectool`. The | ||
| files are placed in the repository root directory. | ||
|
|
||
| ```bash | ||
| make sources | ||
| ``` | ||
|
|
||
| ### `srpm` | ||
|
|
||
| Generates a source RPM (`.src.rpm`) using `fedpkg` targeting the Rawhide | ||
| release. This is automatically called by the `build` target, but can be run | ||
| independently to verify that the spec file produces a valid SRPM. | ||
|
|
||
| ```bash | ||
| make srpm | ||
| ``` | ||
|
|
||
| ### `build` | ||
|
|
||
| Builds the package in COPR. This target first generates an SRPM (via the | ||
| `srpm` dependency), then submits it to the COPR build system targeting | ||
| `fedora-rawhide-x86_64` with a 10-hour timeout. | ||
|
|
||
| ```bash | ||
| make build | ||
| ``` | ||
|
|
||
| ### `logs` | ||
|
|
||
| Watches COPR build logs in real time using | ||
| [fuzzytail](https://pypi.org/project/fuzzytail/). Requires `fuzzytail` to be | ||
| installed (`pip install fuzzytail`). The command will display an error message | ||
| if the tool is not found. | ||
|
|
||
| ```bash | ||
| make logs | ||
| ``` | ||
|
|
||
| ### `clean` | ||
|
|
||
| Removes generated build artifacts from the repository root: | ||
|
|
||
| - `*.src.rpm` -- source RPMs | ||
| - `*.tar.gz`, `*.tar.xz` -- source tarballs | ||
| - `*.crate` -- Rust crate archives | ||
| - `vendor/` -- vendored dependencies directory | ||
|
|
||
| ```bash | ||
| make clean | ||
| ``` | ||
|
|
||
| ### `freeze` | ||
|
|
||
| Freezes Python dependency versions for the goose Python extensions. Runs | ||
| `scripts/freeze.py` targeting Python 3.14 to produce pinned requirement files | ||
| under `requirements/`. | ||
|
|
||
| ```bash | ||
| make freeze | ||
| ``` | ||
|
|
||
| ## Typical Workflow | ||
|
|
||
| A standard build cycle looks like this: | ||
|
|
||
| ```bash | ||
| # 1. Download the sources defined in the spec file | ||
| make sources | ||
|
|
||
| # 2. Build the SRPM and submit to COPR | ||
| make build | ||
|
|
||
| # 3. (Optional) Watch the build logs | ||
| make logs | ||
|
|
||
| # 4. Clean up artifacts when done | ||
| make clean | ||
| ``` | ||
|
|
||
| ## Related Documentation | ||
|
|
||
| - [Version Update Process](update-process.md) -- how to update goose to a new | ||
| upstream version using the Claude Code automation |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: rhel-lightspeed/goose
Length of output: 212
🏁 Script executed:
Repository: rhel-lightspeed/goose
Length of output: 108
🏁 Script executed:
Repository: rhel-lightspeed/goose
Length of output: 2678
Add validation/fail-fast for
FAS_USERNAMEbefore runninglogs.FAS_USERNAME := $(shell copr whoami)is evaluated at Makefile load time; ifcopr whoamierrors or returns empty,logswill runfuzzytail watch $(FAS_USERNAME)/$(NAME)and produce unclear failures. Add stderr-silencing plus an explicit guard that fails fast whenlogsis invoked.🛡️ Proposed defensive implementation
Then make
logsdepend oncheck-copr-auth:🤖 Prompt for AI Agents