## START: Set by rpmautospec ## (rpmautospec version 0.6.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_without check # https://github.com/redhatinsights/rhc %global goipath github.com/redhatinsights/rhc Version: 0.3.0 %global tag v%{version} %gometa -f %global golicenses LICENSE %global godocs CONTRIBUTING.md README.md Name: rhc Release: %autorelease Epoch: 1 Summary: rhc connects the system to Red Hat hosted services License: GPL-3.0-only URL: %{gourl} Source: %{url}/releases/download/%{tag}/%{name}-%{version}.tar.xz Recommends: insights-client Requires: subscription-manager Requires: yggdrasil >= 0.4 Requires: yggdrasil-worker-package-manager Requires(post): policycoreutils-python-utils BuildRequires: git-core BuildRequires: golang BuildRequires: go-rpm-macros BuildRequires: meson BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(bash-completion) %global common_description %{expand: %{name} is a client tool and daemon that connects the system to Red Hat hosted services enabling system and subscription management.} %description %{common_description} %package compat Summary: Transition package to support migrating from rhcd to yggd Requires: yggdrasil >= 0.4.2 Recommends: rhc %description compat %{common_description} Transition package to support migrating from rhcd to yggd. %prep %goprep %{?rhel:-k} %autopatch -p1 %if %{undefined rhel} %generate_buildrequires %go_generate_buildrequires %endif %build %undefine _auto_set_build_flags export %gomodulesmode %{?gobuilddir:export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} %meson -Dvendor=True "-Dgobuildflags=[%(echo %{expand:%gocompilerflags} | sed -e s/"^"/"'"/ -e s/" "/"', '"/g -e s/"$"/"'"/), '-tags', '"rpm_crashtraceback\ ${BUILDTAGS:-}"', '-a', '-v', '-x']" -Dgoldflags='%{?currentgoldflags} -B 0x%(head -c20 /dev/urandom|od -An -tx1|tr -d " \n") -compressdwarf=false -linkmode=external -extldflags "%{build_ldflags} %{?__golang_extldflags}"' %meson_build %install %meson_install install --directory %{buildroot}%{_unitdir} install --directory %{buildroot}%{_sysconfdir}/rhc ln -sf yggdrasil.service %{buildroot}%{_unitdir}/rhcd.service ln -sf ../yggdrasil/config.toml %{buildroot}%{_sysconfdir}/rhc/config.toml %if %{with check} %check %gocheck %endif %post /usr/sbin/semanage permissive --add rhcd_t || true %systemd_post rhc-canonical-facts.timer if [ $1 -eq 1 ]; then systemctl daemon-reload systemctl start rhc-canonical-facts.timer fi %preun %systemd_preun rhc-canonical-facts.timer %postun if [ $1 -eq 0 ]; then /usr/sbin/semanage permissive --delete rhcd_t || true fi %systemd_postun_with_restart rhc-canonical-facts.timer if [ $1 -eq 0 ]; then systemctl daemon-reload fi %files %license LICENSE %doc CONTRIBUTING.md README.md %{_bindir}/* %{_datadir}/bash-completion/completions/* %{_mandir}/man1/* %{_unitdir}/rhc-canonical-facts.* %{_presetdir}/* %files compat %{_unitdir}/rhcd.service %{_sysconfdir}/rhc/config.toml %changelog ## START: Generated by rpmautospec * Mon Dec 02 2024 Link Dupont - 1:0.3.0-1 - Update to 0.3.0 (RHEL-69743) * Tue Oct 29 2024 Troy Dawson - 1:0.2.4-7 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018 * Fri Oct 25 2024 MSVSphere Packaging Team - 0.2.4-6 - Rebuilt for MSVSphere 10 * Tue May 21 2024 Link Dupont - 0.2.4-6 - Require systemd instead of systemd-devel during compilation (RHEL-37674) * Mon Feb 12 2024 Link Dupont - 0.2.4-5 - Update embedded yggdrasil-worker-package-manager to 0.1.3 (RHEL-17179) - Update embedded yggdrasil to 0.2.4 (RHEL-17179) * Mon Jan 8 2024 Jiri Hnidek - 0.2.4-4 - Add dependency on subscription-manager (RHEL-18974) * Mon Oct 23 2023 Link Dupont - 0.2.4-3 - Update embedded yggdrasil-worker-package-manager (RHEL-14200) * Wed Oct 18 2023 Link Dupont - 0.2.4-2 - Update embedded yggdrasil to 0.2.3 (RHEL-14200) * Tue Aug 01 2023 Alba Hita Catala - 0.2.4-1 - Configure proxy for http connections (RHBZ#2227018) - Failling to get system profile is not an error but a warning (RHBZ#2227012) - Prevent message content being logged at any level (RHBZ#2227010) - Added bash completion (RHBZ#2145198) * Tue Jul 25 2023 Vit Mojzis - 0.2.3-2 - Make rhcd_t permissive even when SELinux is disabled (RHBZ#2226701) * Tue Jul 04 2023 Alba Hita Catala - 0.2.3-1 - New upstream version (RHBZ#2219563) * Tue Feb 14 2023 Alba Hita Catala - 0.2.2-1 - New upstream version (RHBZ#2169772) - RHC renaming (RHBZ#2167427) * Wed Feb 01 2023 Link Dupont - 1:0.2.1-14 - Correct syntax error in post scriptlet * Fri Jan 27 2023 Link Dupont - 0.2.1-13 - Build debuginfo packages * Thu Jan 26 2023 Link Dupont - 0.2.1-12 - Only run semanage conditionally when SELinux is enabled (RHBZ#2164602) * Tue Nov 22 2022 Link Dupont - 0.2.1-11 - Fix an issue scanning worker's stdout (RHBZ#2144926) * Thu Nov 10 2022 Link Dupont - 0.2.1-10 - Set SELinux policy to permissive for rhcd_t module (RHBZ#2141445) * Fri Jun 03 2022 Link Dupont - 0.2.1-9 - Correct config file installation name (RHBZ#2082689) * Fri Jun 03 2022 Link Dupont - 0.2.1-8 - Correct default config file name (RHBZ#2082689) * Mon May 09 2022 Link Dupont - 0.2.1-7 - Correct default config file path (RHBZ#2082689) * Thu Mar 17 2022 Link Dupont - 0.2.1-6 - Change dependency on insights-client to weak (RHBZ#2064944) * Tue Mar 1 2022 Link Dupont - 0.2.1-5 - Ensure worker is built with hardening compiler flags (RHBZ#2060539) * Tue Feb 22 2022 Link Dupont - 0.2.1-4 - Update summary and description (RHBZ#2057029) * Tue Feb 15 2022 Link Dupont - 0.2.1-3 - Include patch to collect and report errors during disconnect * Fri Feb 11 2022 Link Dupont - 0.2.1-2 - Include patch to default worker config location * Fri Feb 11 2022 Link Dupont - 0.2.1-1 - New upstream version * Wed Dec 01 2021 Link Dupont - 0.2.0-6 - Require full NEVR in devel subpackage * Wed Dec 01 2021 Link Dupont - 0.2.0-5 - Enable building with PIE and other build flags * Fri Sep 24 2021 Link Dupont - 0.2.0-4 - Fix an issue reporting workers on reconnect (Resolves: RHBZ#2007767) * Wed Sep 1 2021 Link Dupont - 0.2.0-3 - Split out development files into subpackage * Tue Aug 10 2021 Mohan Boddu - 1:0.2.0-2 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 * Mon Jun 28 2021 Link Dupont - 0.2.0-1 - New upstream release * Fri Jun 25 2021 Link Dupont - 0.1.99-5 - Mark config file as such * Fri Jun 25 2021 Link Dupont - 0.1.99-4 - New upstream snapshot * Fri Jun 11 2021 Link Dupont - 0.1.99-3 - Build executables as PIE programs * Thu Jun 10 2021 Link Dupont - 0.1.99-2 - Include missing disttag * Tue May 25 2021 Link Dupont - 0.1.99-1 - New upstream development release * Wed Apr 28 2021 Link Dupont - 0.1.4-2 - Rebuild for fixed binutils on aarch64 (Resolves: RHBZ#1954449) * Fri Apr 9 2021 Link Dupont - 0.1.4-1 - New upstream release * Fri Feb 19 2021 Link Dupont - 0.1.2-2 - Update default broker URI - Set Epoch to 1 * Thu Feb 18 2021 Link Dupont - 0.1.2-1 - New upstream release * Wed Feb 17 2021 Link Dupont - 0.1.1-1 - New upstream release * Fri Feb 12 2021 Link Dupont - 0.1-1 - Initial release ## END: Generated by rpmautospec