Update to version 0.4.4 (RHEL-56788)

Resolves: RHEL-56788
This commit is contained in:
Link Dupont 2024-09-10 13:58:47 -04:00
parent c878efe005
commit 4906512595
4 changed files with 40 additions and 5 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@
/yggdrasil-0.3.2.tar.gz
/yggdrasil-0.3.2.tar.xz
/yggdrasil-0.4.1.tar.xz
/yggdrasil-0.4.2.tar.xz
/yggdrasil-0.4.4.tar.xz

5
config.toml Normal file
View File

@ -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"

View File

@ -1 +1 @@
SHA512 (yggdrasil-0.4.1.tar.xz) = 0329b969b7441363cf376cd8b9adf163e0d7f9ecf89db54128a3d8062c887676ac9903e911397bb6eef84238423705352138e0ff1d1ceec0d088c0514222a2f0
SHA512 (yggdrasil-0.4.4.tar.xz) = 138df3b4eeb4815fda5d7c60001d75a29596508c9c7de5a0e29aa4b54f4df73024e42cf26f8afcd19671a552199452c81d920873d839044ed1a7f509e6671875

View File

@ -2,8 +2,8 @@
# https://github.com/redhatinsights/yggdrasil
%global goipath github.com/redhatinsights/yggdrasil
Version: 0.4.1
%global tag %{version}
Version: 0.4.4
%global tag v%{version}
%gometa -f
@ -21,7 +21,8 @@ Summary: Remote data transmission and processing client
License: GPL-3.0-only
URL: %{gourl}
Source: %{url}/releases/download/%{version}/yggdrasil-%{version}.tar.xz
Source: %{url}/releases/download/%{tag}/yggdrasil-%{version}.tar.xz
Source1: config.toml
BuildRequires: systemd-rpm-macros
BuildRequires: meson
@ -31,6 +32,16 @@ BuildRequires: pkgconfig(bash-completion)
%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
@ -44,18 +55,31 @@ BuildRequires: pkgconfig(bash-completion)
%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 -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
%if %{with check}
%check
%gocheck
%endif
%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}
@ -66,10 +90,14 @@ export %gomodulesmode
%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
%autochangelog