https://bugzilla.redhat.com/show_bug.cgi?id=1770147
--- Comment #5 from Stefan Midjich <swehack(a)gmail.com> ---
First on my agenda is what was mentioned by Elliot to follow the Go packaging
guidelines. I will also look at go2rpm that you recommended.
(In reply to Robert-André Mauchin from comment #4)
- This is not defined anywhere:
Version: %{upstream_version}
Latest version seems to be 0.4.1
- What is the purpose of this??
The RPM package is being built by a CI/CD pipeline and that is the reason I'm
passing upstream_version from rpmbuild CLI.
test -d '%{name}-%{version}' && chmod -R u+w
'%{name}-%{version}'
- Use the SystemD macros:
BuildRequires: systemd-rpm-macros
I will make another attempt at using them but again because of the CI/CD
pipeline used to build the RPM packages I was forced to use the more basic
method. In fact copied from the macros.
[...]
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
- Changelog entry is not good:
* Tue Oct 29 2019 Stefan Midjich <swehack at gmail.com> - 0.4.1-1
- Use the Golang Packaging Guidelines:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/
Use go2rpm to help you:
# Generated by go2rpm 1
%bcond_without check
#
https://gitlab.com/hacklunch/ntsclient
%global goipath
gitlab.com/hacklunch/ntsclient
%global forgeurl
https://gitlab.com/hacklunch/ntsclient
Version: 0.4.1
%gometa
%global common_description %{expand:
Small Network Time Security Client.}
%global golicenses LICENSE
%global godocs README.md
Name: %{goname}
Release: 1%{?dist}
Summary: Small Network Time Security Client
License: ISC
URL: %{gourl}
Source0: %{gosource}
BuildRequires:
golang(github.com/BurntSushi/toml)
BuildRequires:
golang(gitlab.com/hacklunch/ntp)
BuildRequires:
golang(gitlab.com/hacklunch/ntske)
%description
%{common_description}
%prep
%goprep
%build
%gobuild -o %{gobuilddir}/bin/ntsclient %{goipath}
%install
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE
%doc README.md
%{_bindir}/*
%changelog
- You'll need to package first:
BuildRequires:
golang(gitlab.com/hacklunch/ntp)
BuildRequires:
golang(gitlab.com/hacklunch/ntske)
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component