From cd34b0878772cae362c1df304aa8bf8186f94420 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Fri, 25 Oct 2024 20:05:43 +0300 Subject: [PATCH] import yggdrasil-0.4.4-4.el10 --- .gitignore | 1 + .yggdrasil.metadata | 1 + SOURCES/config.toml | 5 ++ SOURCES/yggdrasil.sysuser | 5 ++ SPECS/yggdrasil.spec | 185 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 197 insertions(+) create mode 100644 .gitignore create mode 100644 .yggdrasil.metadata create mode 100644 SOURCES/config.toml create mode 100644 SOURCES/yggdrasil.sysuser create mode 100644 SPECS/yggdrasil.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4aacf2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/yggdrasil-0.4.4.tar.xz diff --git a/.yggdrasil.metadata b/.yggdrasil.metadata new file mode 100644 index 0000000..5e3e591 --- /dev/null +++ b/.yggdrasil.metadata @@ -0,0 +1 @@ +558066c9941d8554d9ea05ce92db39b7e19fb92b SOURCES/yggdrasil-0.4.4.tar.xz diff --git a/SOURCES/config.toml b/SOURCES/config.toml new file mode 100644 index 0000000..ef438af --- /dev/null +++ b/SOURCES/config.toml @@ -0,0 +1,5 @@ +protocol = "mqtt" +server = ["wss://connect.cloud.redhat.com:443"] +cert-file = "/etc/pki/consumer/cert.pem" +key-file = "/etc/pki/consumer/key.pem" +facts-file = "/var/lib/yggdrasil/canonical-facts.json" diff --git a/SOURCES/yggdrasil.sysuser b/SOURCES/yggdrasil.sysuser new file mode 100644 index 0000000..81ccc1d --- /dev/null +++ b/SOURCES/yggdrasil.sysuser @@ -0,0 +1,5 @@ +#Type Name ID GECOS Home directory Shell +u yggdrasil - "yggdrasil system user" /var/lib/yggdrasil - +u yggdrasil-worker - "yggdrasil worker user" - - +m yggdrasil yggdrasil-worker +m yggdrasil rhsm diff --git a/SPECS/yggdrasil.spec b/SPECS/yggdrasil.spec new file mode 100644 index 0000000..26913da --- /dev/null +++ b/SPECS/yggdrasil.spec @@ -0,0 +1,185 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 4; + 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 +%global goipath github.com/redhatinsights/yggdrasil +Version: 0.4.4 +%global tag v%{version} + +%gometa -f + +%global common_description %{expand: +yggdrasil is a system daemon that subscribes to topics on an MQTT broker and +routes any data received on the topics to an appropriate child "worker" process, +exchanging data with its worker processes through a D-Bus message broker.} + +%global golicenses LICENSE +%global godocs CONTRIBUTING.md README.md + +Name: yggdrasil +Release: %autorelease +Summary: Remote data transmission and processing client + +License: GPL-3.0-only +URL: %{gourl} +Source: %{url}/releases/download/%{tag}/yggdrasil-%{version}.tar.xz +Source1: config.toml +Source2: yggdrasil.sysuser + +BuildRequires: systemd-rpm-macros +BuildRequires: meson +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(bash-completion) +%{?sysusers_requires_compat} + +%description %{common_description} + +%package devel +Summary: %{name} development files + +%description devel +%{common_description} + +Contains files needed for yggdrasil worker development. + +%gopkg + +%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 -Ddefault_data_host=cert.cloud.redhat.com -Ddefault_path_prefix=redhat/insights "-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 + +%global gosupfiles ./ipc/com.redhat.Yggdrasil1.Dispatcher1.xml ./ipc/com.redhat.Yggdrasil1.Worker1.xml +%install +%meson_install +%__install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/config.toml +%__install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf + +%if %{with check} +%check +%gocheck +%endif + +%pre +%sysusers_create_compat %{SOURCE2} + +%post +%systemd_post %{name}.service +%systemd_user_post %{name}.service + +%preun +%systemd_preun %{name}.service +%systemd_user_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service +%systemd_user_postun_with_restart %{name}.service + +%files +%license LICENSE +%if %{defined rhel} +%license vendor/modules.txt +%endif +%doc CONTRIBUTING.md README.md +%{_bindir}/* +%config(noreplace) %{_sysconfdir}/%{name} +%{_unitdir}/* +%{_userunitdir}/* +%{_sysusersdir}/* +%{_datadir}/bash-completion/completions/* +%{_datadir}/dbus-1/{interfaces,system-services,system.d}/* +%{_datadir}/doc/%{name}/* +%{_mandir}/man1/* + +%files devel +%{_libdir}/pkgconfig/*.pc + +%changelog +## START: Generated by rpmautospec +* Tue Oct 08 2024 Link Dupont - 0.4.4-4 +- Add yggdrasil user to rhsm group (RHEL-61735) + +* Tue Sep 24 2024 Link Dupont - 0.4.4-3 +- Use sysusers_create_compat to create users in pre + +* Mon Sep 16 2024 Link Dupont - 0.4.4-2 +- Bump release to rebuild + +* Fri Sep 13 2024 Link Dupont - 0.4.4-1 +- Update to version 0.4.4 (RHEL-56788) + +* Mon Aug 19 2024 Link Dupont - 0.4.1-8 +- Bump release to rebuild package. + +* Tue Aug 06 2024 Link Dupont - 0.4.1-7 +- Don't build gopkg subpackages + +* Tue Aug 06 2024 Link Dupont - 0.4.1-6 +- Rebuild to mitigate CVE-2024-24791 risk (RHEL-47186) + +* Mon Jun 24 2024 Troy Dawson - 0.4.1-5 +- Bump release for June 2024 mass rebuild + +* Fri Jun 07 2024 Link Dupont - 0.4.1-4 +- add gating.yaml + +* Sun Feb 11 2024 Maxwell G - 0.4.1-3 +- Rebuild for golang 1.22.0 + +* Sat Jan 27 2024 Fedora Release Engineering - 0.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Sep 18 2023 Link Dupont - 0.4.1-1 +- Update to version 0.4.1 (RHBZ#2239102) + +* Wed Aug 09 2023 Yaakov Selkowitz - 0.3.2-2 +- Use vendored dependencies in RHEL builds + +* Mon Jul 24 2023 Link Dupont - 0.3.2-1 +- Update to version 0.3.2 (RHBZ#2225230) + +* Sat Jul 22 2023 Fedora Release Engineering - 0.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Mar 07 2023 Link Dupont - 0.3.1-2 +- Include D-Bus interface files in devel package + +* Sat Jan 21 2023 Fedora Release Engineering - 0.2.98^1.ffb580f-0.5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.2.98^1.ffb580f-0.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jul 19 2022 Maxwell G - 0.2.98^1.ffb580f-0.3 +- Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in + golang + +* Sat Jun 18 2022 Robert-André Mauchin - 0.2.98^1.ffb580f-0.2 +- Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191, + CVE-2022-29526, CVE-2022-30629 + +* Tue Aug 10 2021 Link Dupont - 0.2.98^1.ffb580f-0.1.20210728gitffb580f +- Initial package + +## END: Generated by rpmautospec