|
|
de3a0e |
%global buildflags -buildmode pie -compiler gc -a -v -x
|
|
|
de3a0e |
%global goldflags %{expand:-linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'}
|
|
|
de3a0e |
|
|
|
de3a0e |
%global yggdrasil_ver 0.2.1
|
|
|
de3a0e |
%global ygg_pkg_mgr_ver 0.1.0
|
|
|
de3a0e |
|
|
|
358eae |
Name: rhc
|
|
|
13c0f8 |
Version: 0.2.2
|
|
|
13c0f8 |
Release: 1%{?dist}
|
|
|
358eae |
Epoch: 1
|
|
|
84b5d8 |
Summary: rhc connects the system to Red Hat hosted services
|
|
|
358eae |
License: GPLv3
|
|
|
de3a0e |
URL: https://github.com/redhatinsights/rhc
|
|
|
358eae |
|
|
|
de3a0e |
Source0: https://github.com/RedHatInsights/rhc/releases/download/%{version}/%{name}-%{version}.tar.gz
|
|
|
358eae |
Source1: config.toml
|
|
|
de3a0e |
Source2: https://github.com/RedHatInsights/yggdrasil/releases/download/%{yggdrasil_ver}/yggdrasil-%{yggdrasil_ver}.tar.gz
|
|
|
de3a0e |
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
|
|
|
de3a0e |
Source4: rhc-package-manager.toml
|
|
|
358eae |
|
|
|
de3a0e |
# Fixed upstream https://github.com/RedHatInsights/yggdrasil-worker-package-manager/commit/22105b0016abfc7c743c1eadb0372e4ef93cc65e
|
|
|
de3a0e |
Patch0: 0001-feat-default-config-file-location.patch
|
|
|
13c0f8 |
# Fixed upstream https://github.com/RedHatInsights/yggdrasil/pull/100/commits/d75dc60df73a88b0a14c799f3b6f1e8f66cee3d4
|
|
|
13c0f8 |
Patch2: 0001-fix-read-worker-output-using-io.Read.patch
|
|
|
003585 |
|
|
|
358eae |
ExclusiveArch: %{go_arches}
|
|
|
358eae |
|
|
|
de3a0e |
Requires: insights-client
|
|
|
de3a0e |
|
|
|
358eae |
BuildRequires: git
|
|
|
358eae |
BuildRequires: golang
|
|
|
358eae |
BuildRequires: dbus-devel
|
|
|
358eae |
BuildRequires: systemd-devel
|
|
|
358eae |
|
|
|
84b5d8 |
%define _description %{expand:%{name} is a client tool and daemon that connects the system to Red Hat hosted
|
|
|
84b5d8 |
services enabling system and subscription management.}
|
|
|
358eae |
|
|
|
358eae |
%description
|
|
|
84b5d8 |
%{_description}
|
|
|
358eae |
|
|
|
de3a0e |
%global makeflags %{expand:PREFIX=%{_prefix} \\
|
|
|
de3a0e |
SYSCONFDIR=%{_sysconfdir} \\
|
|
|
de3a0e |
LOCALSTATEDIR=%{_localstatedir} \\
|
|
|
de3a0e |
SHORTNAME=%{name} \\
|
|
|
de3a0e |
LONGNAME=%{name} \\
|
|
|
de3a0e |
PKGNAME=%{name} \\
|
|
|
13c0f8 |
'BRANDNAME=Remote Host Configuration' \\
|
|
|
de3a0e |
TOPICPREFIX=redhat/insights \\
|
|
|
de3a0e |
VERSION=%{version} \\
|
|
|
de3a0e |
DATAHOST=cert.cloud.redhat.com \\
|
|
|
de3a0e |
'PROVIDER=Red Hat'}
|
|
|
de3a0e |
|
|
|
de3a0e |
|
|
|
358eae |
%prep
|
|
|
de3a0e |
%setup -T -D -c -n %{name} -a 0
|
|
|
de3a0e |
%setup -T -D -c -n %{name} -a 2
|
|
|
de3a0e |
%setup -T -D -c -n %{name} -a 3
|
|
|
de3a0e |
sed -i -e "s/LDFLAGS :=/LDFLAGS ?=/" %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}/Makefile
|
|
|
de3a0e |
sed -i -e "s/LDFLAGS :=/LDFLAGS ?=/" %{_builddir}/%{name}/%{name}-%{version}/Makefile
|
|
|
de3a0e |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
de3a0e |
%patch0 -p0
|
|
|
13c0f8 |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
13c0f8 |
%patch2 -p1
|
|
|
358eae |
|
|
|
358eae |
|
|
|
358eae |
%build
|
|
|
de3a0e |
%set_build_flags
|
|
|
de3a0e |
export BUILDFLAGS="%{buildflags}"
|
|
|
de3a0e |
export LDFLAGS="%{goldflags}"
|
|
|
de3a0e |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
de3a0e |
make %{makeflags}
|
|
|
de3a0e |
|
|
|
de3a0e |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
84b5d8 |
go build %{buildflags} -ldflags="%{goldflags}" -o rhc-package-manager-worker -mod=vendor .
|
|
|
de3a0e |
|
|
|
de3a0e |
cd %{_builddir}/%{name}/%{name}-%{version}
|
|
|
de3a0e |
make %{makeflags}
|
|
|
358eae |
|
|
|
358eae |
|
|
|
358eae |
%install
|
|
|
de3a0e |
%set_build_flags
|
|
|
de3a0e |
export BUILDFLAGS="%{buildflags}"
|
|
|
de3a0e |
export LDFLAGS="%{goldflags}"
|
|
|
de3a0e |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
de3a0e |
make %{makeflags} \
|
|
|
358eae |
DESTDIR=%{buildroot} \
|
|
|
358eae |
install
|
|
|
de3a0e |
|
|
|
358eae |
%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/
|
|
|
358eae |
|
|
|
de3a0e |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
de3a0e |
%{__install} -D -m 755 rhc-package-manager-worker %{buildroot}%{_libexecdir}/%{name}/
|
|
|
de3a0e |
%{__install} -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}/workers/rhc-package-manager.toml
|
|
|
de3a0e |
|
|
|
de3a0e |
cd %{_builddir}/%{name}/%{name}-%{version}
|
|
|
de3a0e |
make %{makeflags} \
|
|
|
de3a0e |
DESTDIR=%{buildroot} \
|
|
|
de3a0e |
install
|
|
|
de3a0e |
|
|
|
358eae |
|
|
|
358eae |
%files
|
|
|
de3a0e |
%doc %{name}-%{version}/README.md yggdrasil-%{yggdrasil_ver}/doc/tags.toml
|
|
|
358eae |
%{_bindir}/%{name}
|
|
|
358eae |
%{_sbindir}/%{name}d
|
|
|
003585 |
%config(noreplace) %{_sysconfdir}/%{name}/config.toml
|
|
|
de3a0e |
%config(noreplace) %{_sysconfdir}/%{name}/workers/rhc-package-manager.toml
|
|
|
358eae |
%{_unitdir}/%{name}d.service
|
|
|
358eae |
%{_datadir}/bash-completion/completions/*
|
|
|
358eae |
%{_mandir}/man1/*
|
|
|
358eae |
%{_prefix}/share/pkgconfig/%{name}.pc
|
|
|
358eae |
%{_libexecdir}/%{name}
|
|
|
358eae |
|
|
|
358eae |
|
|
|
358eae |
%changelog
|
|
|
13c0f8 |
* Thu Feb 16 2023 Alba Hita Catala <ahitacat@redhat.com> - 0.2.2-1
|
|
|
13c0f8 |
- New upstream version (RHBZ#2169778)
|
|
|
13c0f8 |
|
|
|
13c0f8 |
* Mon Jan 30 2023 Link Dupont <link@redhat.com> - 0.2.1-11
|
|
|
13c0f8 |
- Fixed and issue enabling content when registering with username and password (RHBZ#2141454)
|
|
|
13c0f8 |
|
|
|
13c0f8 |
* Tue Nov 22 2022 Link Dupont <link@redhat.com> - 0.2.1-10
|
|
|
13c0f8 |
- Fix an issue scanning worker's stdout (RHBZ#2143761)
|
|
|
13c0f8 |
|
|
|
84b5d8 |
* Fri Jun 03 2022 Link Dupont <link@redhat.com> - 0.2.1-9
|
|
|
84b5d8 |
- Correct default config file name (RHBZ#2083363)
|
|
|
84b5d8 |
|
|
|
84b5d8 |
* Tue May 10 2022 Link Dupont <link@redhat.com> - 0.2.1-8
|
|
|
84b5d8 |
- Correct default config file path (RHBZ#2083363)
|
|
|
84b5d8 |
|
|
|
84b5d8 |
* Tue Mar 1 2022 Link Dupont <link@redhat.com> - 0.2.1-5
|
|
|
84b5d8 |
- Ensure worker is built with hardening compiler flags (RHBZ#2059693)
|
|
|
84b5d8 |
|
|
|
84b5d8 |
* Tue Feb 22 2022 Link Dupont <link@redhat.com> - 0.2.1-4
|
|
|
84b5d8 |
- Update summary and description (RHBZ#2057153)
|
|
|
84b5d8 |
|
|
|
de3a0e |
* Tue Feb 15 2022 Link Dupont <link@redhat.com> - 0.2.1-3
|
|
|
de3a0e |
- Include patch to collect and report errors during disconnect
|
|
|
de3a0e |
|
|
|
de3a0e |
* Fri Feb 11 2022 Link Dupont <link@redhat.com> - 0.2.1-2
|
|
|
de3a0e |
- Include patch to default worker config location
|
|
|
de3a0e |
|
|
|
de3a0e |
* Fri Feb 11 2022 Link Dupont <link@redhat.com> - 0.2.1-1
|
|
|
de3a0e |
- New upstream version
|
|
|
de3a0e |
|
|
|
de3a0e |
* Tue Nov 16 2021 Link Dupont <link@redhat.com> - 0.2.0-5
|
|
|
de3a0e |
- Enable building with PIE and other build flags (Resolves: RHBZ#2023489)
|
|
|
de3a0e |
|
|
|
de3a0e |
* Fri Sep 24 2021 Link Dupont <link@redhat.com> - 0.2.0-4
|
|
|
de3a0e |
- Fix an issue reporting workers on reconnect (Resolves: RHBZ#2009641)
|
|
|
de3a0e |
|
|
|
003585 |
* Thu Jul 1 2021 Link Dupont <link@redhat.com> - 0.2.0-2
|
|
|
003585 |
- Add two patches that fix some UX issues
|
|
|
003585 |
|
|
|
003585 |
* Mon Jun 28 2021 Link Dupont <link@redhat.com> - 0.2.0-1
|
|
|
003585 |
- New upstream release
|
|
|
003585 |
- Mark config file as a noreplace config file
|
|
|
003585 |
|
|
|
003585 |
* Wed Apr 28 2021 Link Dupont <link@redhat.com> - 0.1.4-2
|
|
|
003585 |
- Rebuild for fixed binutils on aarch64 (Resolves: RHBZ#1954449)
|
|
|
003585 |
|
|
|
003585 |
* Fri Apr 9 2021 Link Dupont <link@redhat.com> - 0.1.4-1
|
|
|
003585 |
- New upstream release
|
|
|
003585 |
|
|
|
358eae |
* Fri Feb 19 2021 Link Dupont <link@redhat.com> - 0.1.2-2
|
|
|
358eae |
- Update default broker URI
|
|
|
358eae |
- Set Epoch to 1
|
|
|
358eae |
|
|
|
358eae |
* Thu Feb 18 2021 Link Dupont <link@redhat.com> - 0.1.2-1
|
|
|
358eae |
- New upstream release
|
|
|
358eae |
|
|
|
358eae |
* Wed Feb 17 2021 Link Dupont <link@redhat.com> - 0.1.1-1
|
|
|
358eae |
- New upstream release
|
|
|
358eae |
|
|
|
358eae |
* Fri Feb 12 2021 Link Dupont <link@redhat.com> - 0.1-1
|
|
|
358eae |
- Initial release
|