feat(rpm): use :dev image tag for non-release Packit builds#1218
Open
maxamillion wants to merge 3 commits intoNVIDIA:mainfrom
Open
feat(rpm): use :dev image tag for non-release Packit builds#1218maxamillion wants to merge 3 commits intoNVIDIA:mainfrom
maxamillion wants to merge 3 commits intoNVIDIA:mainfrom
Conversation
89bc74a to
99e9446
Compare
TaylorMutch
previously approved these changes
May 6, 2026
drew
previously approved these changes
May 6, 2026
TaylorMutch
reviewed
May 6, 2026
| Metadata-Version: 2.1 | ||
| Name: %{name} | ||
| Version: %{openshell_python_version} | ||
| Version: 0.0.37 |
Collaborator
There was a problem hiding this comment.
Is this meant to be hard coded?
Collaborator
Author
There was a problem hiding this comment.
no, my coding agent went rogue and I missed it in my review...🤦
Add a %global image_tag macro to the spec file (default: dev) that controls the container image tag baked into RPM-built binaries and the installed systemd unit. Packit's fix-spec-file action detects tagged stable releases via git describe --exact-match and overrides the macro to 'latest'. PR and commit-to-main builds keep the 'dev' default, matching the :dev images pushed by release-dev.yml. The init-gateway-env.sh installed copy is also patched at RPM build time so its commented image defaults stay consistent with the tag the RPM actually expects from the registry. Signed-off-by: Adam Miller <admiller@redhat.com>
The community sandbox base image (ghcr.io/nvidia/openshell-community/
sandboxes/base) does not publish :dev tags -- only :latest and version-
pinned tags are available. Applying %{image_tag} to it caused a
manifest unknown error when pulling the image on non-release builds.
Scope the dynamic tag to the supervisor image only, which is part of
the core OpenShell release pipeline and does receive :dev tags from
release-dev.yml. The sandbox base image unconditionally uses :latest.
Also tighten the sed in %install to target only the supervisor image
line in init-gateway-env.sh rather than blanket-replacing all :latest
occurrences.
Signed-off-by: Adam Miller <admiller@redhat.com>
…TADATA
The Version field inside the METADATA heredoc was hardcoded to 0.0.37
instead of using the %%{openshell_python_version} macro. This caused
the installed Python dist-info to always report the wrong version on
non-release builds.
Signed-off-by: Adam Miller <admiller@redhat.com>
TaylorMutch
approved these changes
May 7, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
RPM builds triggered by Packit for PRs and commits to main were always baking
:latestimage tags into the compiled binaries and the installed systemd unit,while the CI container pipeline only pushes
:lateston tagged stable releases.Main-branch and PR builds push
:dev. This mismatch meant development RPMspointed at the wrong image stream.
This PR adds a
%global image_tagmacro (default:dev) to the spec file andwires it through all three places where image tags appear. Packit's
fix-spec-fileaction now detects tagged stable releases viagit describe --exact-matchand overrides the macro tolatest. All otherbuild triggers keep the
devdefault.Related Issue
N/A
Changes
openshell.spec: add%global image_tag devmacro; use%{image_tag}inthe
%buildOPENSHELL_IMAGE_TAGexport, the embedded systemd unitEnvironment=lines, and asedin%installthat patches theinit-gateway-env.shcommented defaults to match.packit.yaml: append afix-spec-filestep that runsgit describe --exact-matchand overrides%global image_tagtolatestonly when HEAD sits on a stable
v*.*.*tagTesting
mise run pre-commitpasses (lint + clippy clean; license:check failuresare pre-existing vendor/ SPDX issues unrelated to this change)
Checklist