fix(rpm): move version macro definition before Version field
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
The %{spec_version} macro was being referenced in the Version field
before it was defined, causing RPM packages to show literal '%{spec_version}'
instead of the actual version number.
Moving the macro definition to the top of the spec file ensures it's
expanded correctly during rpmbuild.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
# Version macro must be defined BEFORE it's used in Version: field
|
||||
# Override from command line: rpmbuild --define "build_version X.Y.Z"
|
||||
%if %{defined build_version}
|
||||
%define spec_version %{build_version}
|
||||
%else
|
||||
%define spec_version 1.0.4
|
||||
%endif
|
||||
|
||||
Name: ja4sentinel
|
||||
Version: %{spec_version}
|
||||
Release: 1%{?dist}
|
||||
@ -6,13 +14,6 @@ License: MIT
|
||||
URL: https://github.com/your-repo/ja4sentinel
|
||||
BuildArch: x86_64
|
||||
|
||||
# Override version from command line: rpmbuild --define "build_version X.Y.Z"
|
||||
%if %{defined build_version}
|
||||
%define spec_version %{build_version}
|
||||
%else
|
||||
%define spec_version 1.0.4
|
||||
%endif
|
||||
|
||||
# Distribution-agnostic dependencies
|
||||
# systemd is available on all target distros (Rocky 8/9/10, AlmaLinux)
|
||||
Requires: systemd
|
||||
|
||||
Reference in New Issue
Block a user