## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 2;
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/yggdrasil-worker-package-manager
%global goipath github.com/redhatinsights/yggdrasil-worker-package-manager
Version: 0.2.3
%global tag v%{version}
%gometa -f
%global common_description %{expand:
yggdrasil-worker-package-manager is a simple package manager yggd worker. It
knows how to install and remove packages, add, remove, enable and disable
repositories, and does rudimentary detection of the host it is running on to
guess the package manager to use. It only installs packages that match one of
the provided allow-pattern regular expressions.}
%global golicenses LICENSE
%global godocs README.md
Name: yggdrasil-worker-package-manager
Release: %autorelease
Summary: Package manager worker for yggdrasil
License: GPL-3.0-only
URL: %{gourl}
Source: %{url}/releases/download/%{tag}/%{name}-%{version}.tar.xz
BuildRequires: systemd-rpm-macros
BuildRequires: meson
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(systemd)
BuildRequires: golang >= 1.21
%description %{common_description}
%gopkg
%prep
%goprep %{?rhel:-k}
%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 "-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
%gopkginstall
%if %{with check}
%check
%gocheck
%endif
%post
%systemd_post com.redhat.Yggdrasil1.Worker1.package_manager.service
%preun
%systemd_preun com.redhat.Yggdrasil1.Worker1.package_manager.service
%postun
%systemd_postun_with_restart com.redhat.Yggdrasil1.Worker1.package_manager.service
%files
%license LICENSE
%if %{defined rhel}
%license vendor/modules.txt
%endif
%doc README.md
%{_libexecdir}/*
%config(noreplace) %{_sysconfdir}/%{name}
%{_datadir}/dbus-1/system-services/*
%{_datadir}/dbus-1/system.d/*
%{_unitdir}
%gopkgfiles
%changelog
## START: Generated by rpmautospec
* Thu Sep 12 2024 Link Dupont - 0.2.3-1
- Update to 0.2.3
* Sat Jul 20 2024 Fedora Release Engineering - 0.2.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Feb 11 2024 Maxwell G - 0.2.2-5
- Rebuild for golang 1.22.0
* Sat Jan 27 2024 Fedora Release Engineering - 0.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Nov 06 2023 Yaakov Selkowitz - 0.2.2-3
- Only apply devendoring patch in Fedora builds
* Wed Oct 25 2023 Link Dupont - 0.2.2-1
- Update to version 0.2.2
* Wed Aug 09 2023 Link Dupont - 0.2.1-1
- Update to version 0.2.1
* Wed Aug 09 2023 Yaakov Selkowitz - 0.2.0-3
- Use vendored dependencies in RHEL builds
* Sat Jul 22 2023 Fedora Release Engineering - 0.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 20 2023 Link Dupont - 0.2.0-1
- Initial package (RHBZ#2176342)
## END: Generated by rpmautospec