|
|
e97745 |
%define debug_package %{nil}
|
|
|
e97745 |
|
|
|
ec5d98 |
%global buildflags -buildmode pie -compiler gc -a -v -x
|
|
|
ec5d98 |
%global goldflags %{expand:-linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'}
|
|
|
ec5d98 |
|
|
|
93f545 |
%global yggdrasil_ver 0.2.1
|
|
|
93f545 |
%global ygg_pkg_mgr_ver 0.1.0
|
|
|
93f545 |
|
|
|
e97745 |
Name: rhc
|
|
|
93f545 |
Version: 0.2.1
|
|
|
d97cbb |
Release: 7%{?dist}
|
|
|
e97745 |
Epoch: 1
|
|
|
d97cbb |
Summary: rhc connects the system to Red Hat hosted services
|
|
|
e97745 |
License: GPLv3
|
|
|
93f545 |
URL: https://github.com/redhatinsights/rhc
|
|
|
e97745 |
|
|
|
93f545 |
Source0: https://github.com/RedHatInsights/rhc/releases/download/%{version}/%{name}-%{version}.tar.gz
|
|
|
e97745 |
Source1: config.toml
|
|
|
93f545 |
Source2: https://github.com/RedHatInsights/yggdrasil/releases/download/%{yggdrasil_ver}/yggdrasil-%{yggdrasil_ver}.tar.gz
|
|
|
93f545 |
Source3: https://github.com/RedHatInsights/yggdrasil-worker-package-manager/releases/download/%{ygg_pkg_mgr_ver}/yggdrasil-worker-package-manager-%{ygg_pkg_mgr_ver}.tar.gz
|
|
|
93f545 |
Source4: rhc-package-manager.toml
|
|
|
e97745 |
|
|
|
93f545 |
# Fixed upstream https://github.com/RedHatInsights/yggdrasil-worker-package-manager/commit/22105b0016abfc7c743c1eadb0372e4ef93cc65e
|
|
|
93f545 |
Patch0: 0001-feat-default-config-file-location.patch
|
|
|
93f545 |
# Fixed upstream https://github.com/RedHatInsights/rhc/commit/0e3ce2489f92cc037936866a1d6d7901fb14d440
|
|
|
93f545 |
Patch1: 0003-fix-collect-error-messages-during-disconnect.patch
|
|
|
f94f6d |
|
|
|
e97745 |
ExclusiveArch: %{go_arches}
|
|
|
e97745 |
|
|
|
93f545 |
Requires: insights-client
|
|
|
93f545 |
|
|
|
e97745 |
BuildRequires: git
|
|
|
e97745 |
BuildRequires: golang
|
|
|
e97745 |
BuildRequires: dbus-devel
|
|
|
e97745 |
BuildRequires: systemd-devel
|
|
|
e97745 |
|
|
|
d97cbb |
%define _description %{expand:%{name} is a client tool and daemon that connects the system to Red Hat hosted
|
|
|
d97cbb |
services enabling system and subscription management.}
|
|
|
e97745 |
|
|
|
e97745 |
%description
|
|
|
d97cbb |
%{_description}
|
|
|
e97745 |
|
|
|
93f545 |
%global makeflags %{expand:PREFIX=%{_prefix} \\
|
|
|
93f545 |
SYSCONFDIR=%{_sysconfdir} \\
|
|
|
93f545 |
LOCALSTATEDIR=%{_localstatedir} \\
|
|
|
93f545 |
SHORTNAME=%{name} \\
|
|
|
93f545 |
LONGNAME=%{name} \\
|
|
|
93f545 |
PKGNAME=%{name} \\
|
|
|
93f545 |
'BRANDNAME=Red Hat connector' \\
|
|
|
93f545 |
TOPICPREFIX=redhat/insights \\
|
|
|
93f545 |
VERSION=%{version} \\
|
|
|
93f545 |
DATAHOST=cert.cloud.redhat.com \\
|
|
|
93f545 |
'PROVIDER=Red Hat'}
|
|
|
93f545 |
|
|
|
93f545 |
|
|
|
e97745 |
%prep
|
|
|
93f545 |
%setup -T -D -c -n %{name} -a 0
|
|
|
93f545 |
%setup -T -D -c -n %{name} -a 2
|
|
|
93f545 |
%setup -T -D -c -n %{name} -a 3
|
|
|
93f545 |
sed -i -e "s/LDFLAGS :=/LDFLAGS ?=/" %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}/Makefile
|
|
|
93f545 |
sed -i -e "s/LDFLAGS :=/LDFLAGS ?=/" %{_builddir}/%{name}/%{name}-%{version}/Makefile
|
|
|
93f545 |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
93f545 |
%patch0 -p0
|
|
|
93f545 |
cd %{_builddir}/%{name}/%{name}-%{version}
|
|
|
93f545 |
%patch1 -p1
|
|
|
e97745 |
|
|
|
e97745 |
|
|
|
e97745 |
%build
|
|
|
ec5d98 |
%set_build_flags
|
|
|
ec5d98 |
export BUILDFLAGS="%{buildflags}"
|
|
|
ec5d98 |
export LDFLAGS="%{goldflags}"
|
|
|
93f545 |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
93f545 |
make %{makeflags}
|
|
|
93f545 |
|
|
|
93f545 |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
d97cbb |
go build %{buildflags} -ldflags="%{goldflags}" -o rhc-package-manager-worker -mod=vendor .
|
|
|
93f545 |
|
|
|
93f545 |
cd %{_builddir}/%{name}/%{name}-%{version}
|
|
|
93f545 |
make %{makeflags}
|
|
|
e97745 |
|
|
|
e97745 |
|
|
|
e97745 |
%install
|
|
|
ec5d98 |
%set_build_flags
|
|
|
ec5d98 |
export BUILDFLAGS="%{buildflags}"
|
|
|
ec5d98 |
export LDFLAGS="%{goldflags}"
|
|
|
93f545 |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
93f545 |
make %{makeflags} \
|
|
|
e97745 |
DESTDIR=%{buildroot} \
|
|
|
e97745 |
install
|
|
|
93f545 |
|
|
|
e97745 |
%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/
|
|
|
e97745 |
|
|
|
93f545 |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
93f545 |
%{__install} -D -m 755 rhc-package-manager-worker %{buildroot}%{_libexecdir}/%{name}/
|
|
|
93f545 |
%{__install} -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}/workers/rhc-package-manager.toml
|
|
|
93f545 |
|
|
|
93f545 |
cd %{_builddir}/%{name}/%{name}-%{version}
|
|
|
93f545 |
make %{makeflags} \
|
|
|
93f545 |
DESTDIR=%{buildroot} \
|
|
|
93f545 |
install
|
|
|
93f545 |
|
|
|
e97745 |
|
|
|
e97745 |
%files
|
|
|
93f545 |
%doc %{name}-%{version}/README.md yggdrasil-%{yggdrasil_ver}/doc/tags.toml
|
|
|
e97745 |
%{_bindir}/%{name}
|
|
|
e97745 |
%{_sbindir}/%{name}d
|
|
|
f94f6d |
%config(noreplace) %{_sysconfdir}/%{name}/config.toml
|
|
|
93f545 |
%config(noreplace) %{_sysconfdir}/%{name}/workers/rhc-package-manager.toml
|
|
|
e97745 |
%{_unitdir}/%{name}d.service
|
|
|
e97745 |
%{_datadir}/bash-completion/completions/*
|
|
|
e97745 |
%{_mandir}/man1/*
|
|
|
e97745 |
%{_prefix}/share/pkgconfig/%{name}.pc
|
|
|
e97745 |
%{_libexecdir}/%{name}
|
|
|
e97745 |
|
|
|
e97745 |
|
|
|
e97745 |
%changelog
|
|
|
d97cbb |
* Mon Mar 21 2022 Link Dupont <link@redhat.com> - 0.2.1-7
|
|
|
d97cbb |
- Use correct macro syntax for ldflags (RHBZ#2059690)
|
|
|
d97cbb |
|
|
|
d97cbb |
* Tue Mar 1 2022 Link Dupont <link@redhat.com> - 0.2.1-6
|
|
|
d97cbb |
- Ensure worker is built with hardening compiler flags (RHBZ#2059690)
|
|
|
d97cbb |
|
|
|
d97cbb |
* Tue Feb 22 2022 Link Dupont <link@redhat.com> - 0.2.1-4
|
|
|
d97cbb |
- Update summary and description (RHBZ#2057153)
|
|
|
d97cbb |
|
|
|
93f545 |
* Tue Feb 15 2022 Link Dupont <link@redhat.com> - 0.2.1-3
|
|
|
93f545 |
- Include patch to collect and report errors during disconnect
|
|
|
93f545 |
|
|
|
93f545 |
* Fri Feb 11 2022 Link Dupont <link@redhat.com> - 0.2.1-2
|
|
|
93f545 |
- Include patch to default worker config location
|
|
|
93f545 |
|
|
|
93f545 |
* Fri Feb 11 2022 Link Dupont <link@redhat.com> - 0.2.1-1
|
|
|
93f545 |
- New upstream version
|
|
|
93f545 |
|
|
|
ec5d98 |
* Tue Nov 16 2021 Link Dupont <link@redhat.com> - 0.2.0-5
|
|
|
ec5d98 |
- Enable building with PIE and other build flags (Resolves: RHBZ#2023489)
|
|
|
ec5d98 |
|
|
|
ec5d98 |
* Fri Sep 24 2021 Link Dupont <link@redhat.com> - 0.2.0-4
|
|
|
ec5d98 |
- Fix an issue reporting workers on reconnect (Resolves: RHBZ#2009641)
|
|
|
c57bbd |
|
|
|
f94f6d |
* Thu Jul 1 2021 Link Dupont <link@redhat.com> - 0.2.0-2
|
|
|
f94f6d |
- Add two patches that fix some UX issues
|
|
|
f94f6d |
|
|
|
f94f6d |
* Mon Jun 28 2021 Link Dupont <link@redhat.com> - 0.2.0-1
|
|
|
f94f6d |
- New upstream release
|
|
|
f94f6d |
- Mark config file as a noreplace config file
|
|
|
f94f6d |
|
|
|
fd385f |
* Wed Apr 28 2021 Link Dupont <link@redhat.com> - 0.1.4-2
|
|
|
fd385f |
- Rebuild for fixed binutils on aarch64 (Resolves: RHBZ#1954449)
|
|
|
fd385f |
|
|
|
4d5422 |
* Fri Apr 9 2021 Link Dupont <link@redhat.com> - 0.1.4-1
|
|
|
4d5422 |
- New upstream release
|
|
|
4d5422 |
|
|
|
e97745 |
* Fri Feb 19 2021 Link Dupont <link@redhat.com> - 0.1.2-2
|
|
|
e97745 |
- Update default broker URI
|
|
|
e97745 |
- Set Epoch to 1
|
|
|
e97745 |
|
|
|
e97745 |
* Thu Feb 18 2021 Link Dupont <link@redhat.com> - 0.1.2-1
|
|
|
e97745 |
- New upstream release
|
|
|
e97745 |
|
|
|
e97745 |
* Wed Feb 17 2021 Link Dupont <link@redhat.com> - 0.1.1-1
|
|
|
e97745 |
- New upstream release
|
|
|
e97745 |
|
|
|
e97745 |
* Fri Feb 12 2021 Link Dupont <link@redhat.com> - 0.1-1
|
|
|
e97745 |
- Initial release
|