promu/promu.spec
Wangjunqi123 20428742ad promu存在不安全的编译选项PIE、STRIP
(cherry picked from commit ab29e9dead5ff5595090bd90245c7ede849a104c)
2023-03-07 13:35:27 +08:00

44 lines
898 B
RPMSpec

%define debug_package %{nil}
Name: promu
Version: 0.7.0
Release: 2
Summary: Prometheus Utility Tool
License: ASL 2.0
URL: https://github.com/prometheus/promu
Source0: https://github.com/prometheus/promu/archive/v%{version}.tar.gz
Patch0: add-parameters-to-solve-the-strip.patch
BuildRequires: golang >= 1.13
BuildRequires: gcc
Conflicts: promu
Provides: %{name} = %{version}
%description
promu is the utility tool for building and releasing Prometheus projects
%prep
%setup -q -T -n %{name}-%{version} -b 0
%patch0 -p1
%build
export GOFLAGS="-mod=vendor -buildmode=pie"
make build
%install
install -D -m 755 %{name}-%{version} %{buildroot}%{_bindir}/promu
%files
%defattr(-,root,root,-)
%{_bindir}/promu
%changelog
* Fri Mar 03 2023 wangjunqi <wangjunqi@kylinos.cn> - 0.7.0-2
- add strip and pie
* Wed Dec 16 2020 yangzhao <yangzhao1@kylinos.cn> - 0.7.0-1
- Init project promu