Skip to content

Commit

Permalink
fix: adjust release to incldue git info
Browse files Browse the repository at this point in the history
Adjust the forge macros so they work across EL9, EL10 and Fedora.
  • Loading branch information
subpop committed Nov 25, 2024
1 parent 378906d commit 7190615
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ srpm_build_deps:
- "pkgconfig(bash-completion)"
- "pkgconfig(dbus-1)"
- "pkgconfig(systemd)"
- "rpm_macro(forgemeta)"
- rpm-build

actions:
Expand Down
12 changes: 4 additions & 8 deletions dist/srpm/rhc.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Version: @VERSION@
%global goipath github.com/redhatinsights/rhc
%global commit @COMMIT@
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global date %(date "+%Y%m%d")
%global archivename rhc-%{version}

%if %{has_go_rpm_macros}
Expand All @@ -24,13 +25,8 @@ Version: @VERSION@
%global gomodulesmode GO111MODULES=off
%global gosource %{gourl}/releases/download/%{version}/rhc-%{version}.tar.gz
%global gocompilerflags "-buildmode pie -compiler gc"
%endif

# Manually redefine %%dist to work around an issue in COPR where the build root
# that creates the srpm does not define a value for %%dist. This should *NOT* be
# carried in downstream; this is strictly an upstream/COPR/CI workaround.
%if "%{dist}" == ""
%global dist %{distprefix}.fc%{fedora}
%global scm git
%forgemeta
%endif

%if 0%{?fedora}
Expand All @@ -47,7 +43,7 @@ MQTT client.}
%global godocs CONTRIBUTING.md README.md

Name: rhc
Release: 0%{?dist}
Release: 99%{?dist}
Epoch: 1
Summary: Client for registering Red Hat Enterprise Linux systems

Expand Down

0 comments on commit 7190615

Please sign in to comment.