|
|
696de9 |
%global buildflags -buildmode pie -compiler gc -a -v -x
|
|
|
696de9 |
%global goldflags %{expand:-linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'}
|
|
|
696de9 |
|
|
|
696de9 |
%global yggdrasil_ver 0.2.1
|
|
|
696de9 |
%global ygg_pkg_mgr_ver 0.1.0
|
|
|
696de9 |
|
|
|
696de9 |
Name: rhc
|
|
|
119ce6 |
Version: 0.2.2
|
|
|
119ce6 |
Release: 1%{?dist}
|
|
|
696de9 |
Epoch: 1
|
|
|
696de9 |
Summary: rhc connects the system to Red Hat hosted services
|
|
|
696de9 |
License: GPLv3
|
|
|
696de9 |
URL: https://github.com/redhatinsights/rhc
|
|
|
696de9 |
|
|
|
696de9 |
Source0: https://github.com/RedHatInsights/rhc/releases/download/%{version}/%{name}-%{version}.tar.gz
|
|
|
696de9 |
Source1: config.toml
|
|
|
696de9 |
Source2: https://github.com/RedHatInsights/yggdrasil/releases/download/%{yggdrasil_ver}/yggdrasil-%{yggdrasil_ver}.tar.gz
|
|
|
696de9 |
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
|
|
|
696de9 |
Source4: rhc-package-manager.toml
|
|
|
696de9 |
|
|
|
696de9 |
# Fixed upstream https://github.com/RedHatInsights/yggdrasil-worker-package-manager/commit/22105b0016abfc7c743c1eadb0372e4ef93cc65e
|
|
|
696de9 |
Patch0: 0001-feat-default-config-file-location.patch
|
|
|
1bad90 |
# Fixed upstream https://github.com/RedHatInsights/yggdrasil/pull/100/commits/d75dc60df73a88b0a14c799f3b6f1e8f66cee3d4
|
|
|
1bad90 |
Patch2: 0001-fix-read-worker-output-using-io.Read.patch
|
|
|
696de9 |
|
|
|
696de9 |
ExclusiveArch: %{go_arches}
|
|
|
696de9 |
|
|
|
fb7bdb |
Recommends: insights-client
|
|
|
696de9 |
|
|
|
8d898a |
Requires(post): policycoreutils-python-utils
|
|
|
8d898a |
|
|
|
696de9 |
BuildRequires: git
|
|
|
696de9 |
BuildRequires: golang
|
|
|
696de9 |
BuildRequires: go-rpm-macros
|
|
|
696de9 |
BuildRequires: dbus-devel
|
|
|
696de9 |
BuildRequires: systemd-devel
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%define _description %{expand:%{name} is a client tool and daemon that connects the system to Red Hat hosted
|
|
|
696de9 |
services enabling system and subscription management.}
|
|
|
696de9 |
|
|
|
696de9 |
%description
|
|
|
696de9 |
%{_description}
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%package devel
|
|
|
696de9 |
Summary: Development files for %{name}
|
|
|
696de9 |
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%description devel
|
|
|
696de9 |
%{_description}
|
|
|
696de9 |
|
|
|
696de9 |
This package includes files necessary for building rhc workers.
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%global makeflags %{expand:PREFIX=%{_prefix} \\
|
|
|
696de9 |
SYSCONFDIR=%{_sysconfdir} \\
|
|
|
696de9 |
LOCALSTATEDIR=%{_localstatedir} \\
|
|
|
696de9 |
SHORTNAME=%{name} \\
|
|
|
696de9 |
LONGNAME=%{name} \\
|
|
|
696de9 |
PKGNAME=%{name} \\
|
|
|
119ce6 |
'BRANDNAME=Remote Host Configuration' \\
|
|
|
696de9 |
TOPICPREFIX=redhat/insights \\
|
|
|
696de9 |
VERSION=%{version} \\
|
|
|
696de9 |
DATAHOST=cert.cloud.redhat.com \\
|
|
|
696de9 |
'PROVIDER=Red Hat'}
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%prep
|
|
|
696de9 |
%setup -T -D -c -n %{name} -a 0
|
|
|
696de9 |
%setup -T -D -c -n %{name} -a 2
|
|
|
696de9 |
%setup -T -D -c -n %{name} -a 3
|
|
|
696de9 |
sed -i -e "s/LDFLAGS :=/LDFLAGS ?=/" %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}/Makefile
|
|
|
696de9 |
sed -i -e "s/LDFLAGS :=/LDFLAGS ?=/" %{_builddir}/%{name}/%{name}-%{version}/Makefile
|
|
|
696de9 |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
696de9 |
%patch0 -p0
|
|
|
1bad90 |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
1bad90 |
%patch2 -p1
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%build
|
|
|
696de9 |
%set_build_flags
|
|
|
696de9 |
export BUILDFLAGS="%{buildflags}"
|
|
|
696de9 |
export LDFLAGS="%{goldflags}"
|
|
|
696de9 |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
696de9 |
make %{makeflags}
|
|
|
696de9 |
|
|
|
696de9 |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
696de9 |
go build %{buildflags} -ldflags="%{goldflags}" -o rhc-package-manager-worker -mod vendor .
|
|
|
696de9 |
|
|
|
696de9 |
cd %{_builddir}/%{name}/%{name}-%{version}
|
|
|
696de9 |
make %{makeflags}
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%install
|
|
|
696de9 |
%set_build_flags
|
|
|
696de9 |
export BUILDFLAGS="%{buildflags}"
|
|
|
696de9 |
export LDFLAGS="%{goldflags}"
|
|
|
696de9 |
cd %{_builddir}/%{name}/yggdrasil-%{yggdrasil_ver}
|
|
|
696de9 |
make %{makeflags} \
|
|
|
696de9 |
DESTDIR=%{buildroot} \
|
|
|
696de9 |
install
|
|
|
696de9 |
|
|
|
696de9 |
%{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/
|
|
|
696de9 |
|
|
|
696de9 |
cd %{_builddir}/%{name}/yggdrasil-worker-package-manager
|
|
|
696de9 |
%{__install} -D -m 755 rhc-package-manager-worker %{buildroot}%{_libexecdir}/%{name}/
|
|
|
6b92a9 |
%{__install} -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}/workers/rhc-package-manager.toml
|
|
|
696de9 |
|
|
|
696de9 |
cd %{_builddir}/%{name}/%{name}-%{version}
|
|
|
696de9 |
make %{makeflags} \
|
|
|
696de9 |
DESTDIR=%{buildroot} \
|
|
|
696de9 |
install
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
8d898a |
%post
|
|
|
119ce6 |
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
|
|
|
119ce6 |
/usr/sbin/semanage permissive --add rhcd_t || true
|
|
|
119ce6 |
fi
|
|
|
8d898a |
|
|
|
8d898a |
|
|
|
8d898a |
%postun
|
|
|
8d898a |
if [ $1 -eq 0 ]; then
|
|
|
119ce6 |
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
|
|
|
119ce6 |
/usr/sbin/semanage permissive --delete rhcd_t || true
|
|
|
119ce6 |
fi
|
|
|
8d898a |
fi
|
|
|
8d898a |
|
|
|
8d898a |
|
|
|
696de9 |
%files
|
|
|
696de9 |
%doc %{name}-%{version}/README.md yggdrasil-%{yggdrasil_ver}/doc/tags.toml
|
|
|
696de9 |
%{_bindir}/%{name}
|
|
|
696de9 |
%{_sbindir}/%{name}d
|
|
|
696de9 |
%config(noreplace) %{_sysconfdir}/%{name}/config.toml
|
|
|
6b92a9 |
%config(noreplace) %{_sysconfdir}/%{name}/workers/rhc-package-manager.toml
|
|
|
696de9 |
%{_unitdir}/%{name}d.service
|
|
|
696de9 |
%{_datadir}/bash-completion/completions/*
|
|
|
696de9 |
%{_mandir}/man1/*
|
|
|
696de9 |
%{_libexecdir}/%{name}
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%files devel
|
|
|
696de9 |
%{_prefix}/share/pkgconfig/%{name}.pc
|
|
|
696de9 |
|
|
|
696de9 |
|
|
|
696de9 |
%changelog
|
|
|
119ce6 |
* Tue Feb 14 2023 Alba Hita Catala <ahitacat@redhat.com> - 0.2.2-1
|
|
|
119ce6 |
- New upstream version (RHBZ#2169772)
|
|
|
119ce6 |
- RHC renaming (RHBZ#2167427)
|
|
|
119ce6 |
|
|
|
119ce6 |
* Wed Feb 01 2023 Link Dupont <link@redhat.com> - 1:0.2.1-14
|
|
|
119ce6 |
- Correct syntax error in post scriptlet
|
|
|
119ce6 |
|
|
|
119ce6 |
* Fri Jan 27 2023 Link Dupont <link@redhat.com> - 0.2.1-13
|
|
|
119ce6 |
- Build debuginfo packages
|
|
|
119ce6 |
|
|
|
119ce6 |
* Thu Jan 26 2023 Link Dupont <link@redhat.com> - 0.2.1-12
|
|
|
119ce6 |
- Only run semanage conditionally when SELinux is enabled (RHBZ#2164602)
|
|
|
119ce6 |
|
|
|
1bad90 |
* Tue Nov 22 2022 Link Dupont <link@redhat.com> - 0.2.1-11
|
|
|
119ce6 |
- Fix an issue scanning worker's stdout (RHBZ#2144926)
|
|
|
1bad90 |
|
|
|
8d898a |
* Thu Nov 10 2022 Link Dupont <link@redhat.com> - 0.2.1-10
|
|
|
8d898a |
- Set SELinux policy to permissive for rhcd_t module (RHBZ#2141445)
|
|
|
8d898a |
|
|
|
fb7bdb |
* Fri Jun 03 2022 Link Dupont <link@redhat.com> - 0.2.1-9
|
|
|
fb7bdb |
- Correct config file installation name (RHBZ#2082689)
|
|
|
6b92a9 |
|
|
|
fb7bdb |
* Fri Jun 03 2022 Link Dupont <link@redhat.com> - 0.2.1-8
|
|
|
fb7bdb |
- Correct default config file name (RHBZ#2082689)
|
|
|
6b92a9 |
|
|
|
fb7bdb |
* Mon May 09 2022 Link Dupont <link@redhat.com> - 0.2.1-7
|
|
|
fb7bdb |
- Correct default config file path (RHBZ#2082689)
|
|
|
fb7bdb |
|
|
|
fb7bdb |
* Thu Mar 17 2022 Link Dupont <link@redhat.com> - 0.2.1-6
|
|
|
fb7bdb |
- Change dependency on insights-client to weak (RHBZ#2064944)
|
|
|
6b92a9 |
|
|
|
696de9 |
* Tue Mar 1 2022 Link Dupont <link@redhat.com> - 0.2.1-5
|
|
|
fb7bdb |
- Ensure worker is built with hardening compiler flags (RHBZ#2060539)
|
|
|
696de9 |
|
|
|
696de9 |
* Tue Feb 22 2022 Link Dupont <link@redhat.com> - 0.2.1-4
|
|
|
696de9 |
- Update summary and description (RHBZ#2057029)
|
|
|
696de9 |
|
|
|
696de9 |
* Tue Feb 15 2022 Link Dupont <link@redhat.com> - 0.2.1-3
|
|
|
696de9 |
- Include patch to collect and report errors during disconnect
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Feb 11 2022 Link Dupont <link@redhat.com> - 0.2.1-2
|
|
|
696de9 |
- Include patch to default worker config location
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Feb 11 2022 Link Dupont <link@redhat.com> - 0.2.1-1
|
|
|
696de9 |
- New upstream version
|
|
|
696de9 |
|
|
|
696de9 |
* Wed Dec 01 2021 Link Dupont <link@redhat.com> - 0.2.0-6
|
|
|
696de9 |
- Require full NEVR in devel subpackage
|
|
|
696de9 |
|
|
|
696de9 |
* Wed Dec 01 2021 Link Dupont <link@redhat.com> - 0.2.0-5
|
|
|
696de9 |
- Enable building with PIE and other build flags
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Sep 24 2021 Link Dupont <link@redhat.com> - 0.2.0-4
|
|
|
696de9 |
- Fix an issue reporting workers on reconnect (Resolves: RHBZ#2007767)
|
|
|
696de9 |
|
|
|
696de9 |
* Wed Sep 1 2021 Link Dupont <link@redhat.com> - 0.2.0-3
|
|
|
696de9 |
- Split out development files into subpackage
|
|
|
696de9 |
|
|
|
696de9 |
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:0.2.0-2
|
|
|
696de9 |
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
696de9 |
Related: rhbz#1991688
|
|
|
696de9 |
|
|
|
696de9 |
* Mon Jun 28 2021 Link Dupont <link@redhat.com> - 0.2.0-1
|
|
|
696de9 |
- New upstream release
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Jun 25 2021 Link Dupont <link@redhat.com> - 0.1.99-5
|
|
|
696de9 |
- Mark config file as such
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Jun 25 2021 Link Dupont <link@redhat.com> - 0.1.99-4
|
|
|
696de9 |
- New upstream snapshot
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Jun 11 2021 Link Dupont <link@redhat.com> - 0.1.99-3
|
|
|
696de9 |
- Build executables as PIE programs
|
|
|
696de9 |
|
|
|
696de9 |
* Thu Jun 10 2021 Link Dupont <link@redhat.com> - 0.1.99-2
|
|
|
696de9 |
- Include missing disttag
|
|
|
696de9 |
|
|
|
696de9 |
* Tue May 25 2021 Link Dupont <link@redhat.com> - 0.1.99-1
|
|
|
696de9 |
- New upstream development release
|
|
|
696de9 |
|
|
|
696de9 |
* Wed Apr 28 2021 Link Dupont <link@redhat.com> - 0.1.4-2
|
|
|
696de9 |
- Rebuild for fixed binutils on aarch64 (Resolves: RHBZ#1954449)
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Apr 9 2021 Link Dupont <link@redhat.com> - 0.1.4-1
|
|
|
696de9 |
- New upstream release
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Feb 19 2021 Link Dupont <link@redhat.com> - 0.1.2-2
|
|
|
696de9 |
- Update default broker URI
|
|
|
696de9 |
- Set Epoch to 1
|
|
|
696de9 |
|
|
|
696de9 |
* Thu Feb 18 2021 Link Dupont <link@redhat.com> - 0.1.2-1
|
|
|
696de9 |
- New upstream release
|
|
|
696de9 |
|
|
|
696de9 |
* Wed Feb 17 2021 Link Dupont <link@redhat.com> - 0.1.1-1
|
|
|
696de9 |
- New upstream release
|
|
|
696de9 |
|
|
|
696de9 |
* Fri Feb 12 2021 Link Dupont <link@redhat.com> - 0.1-1
|
|
|
696de9 |
- Initial release
|