From c48577ad8902119ac55de1acb1255613b2ebe4fc Mon Sep 17 00:00:00 2001 From: Link Dupont Date: Tue, 7 Mar 2023 12:49:51 -0500 Subject: [PATCH] New upstream version --- .gitignore | 1 + changelog | 16 +++++ sources | 2 +- yggdrasil.spec | 163 +++++++++++-------------------------------------- 4 files changed, 53 insertions(+), 129 deletions(-) create mode 100644 changelog diff --git a/.gitignore b/.gitignore index 71c6814..81a6f70 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /yggdrasil-ffb580f55ae91beff78156fdb6a41be8bc049117.tar.gz +/yggdrasil-0.3.1.tar.gz diff --git a/changelog b/changelog new file mode 100644 index 0000000..615b3ab --- /dev/null +++ b/changelog @@ -0,0 +1,16 @@ +* 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 diff --git a/sources b/sources index b2dd5ee..d1c7322 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (yggdrasil-ffb580f55ae91beff78156fdb6a41be8bc049117.tar.gz) = 2629856f7276fb94204c35b1297b99aad7073f9cbc587d8ad21abec0deac1e8ec942dd6cace6c056a2d07cd27b9b8291fa1233d0854a76fdc3fc9fd329061a27 +SHA512 (yggdrasil-0.3.1.tar.gz) = 13c047758eb043e6cc705c77ec9c5dba5c4c00db8fd23498f6fc346fa3bf0993c7ee302914ec13797250ac4635ada03e809a71cf71525e5af46d4bb751baf927 diff --git a/yggdrasil.spec b/yggdrasil.spec index 39f069e..7ad76ee 100644 --- a/yggdrasil.spec +++ b/yggdrasil.spec @@ -1,167 +1,74 @@ -# Generated by go2rpm 1.3 %bcond_without check # https://github.com/redhatinsights/yggdrasil %global goipath github.com/redhatinsights/yggdrasil -%global commit ffb580f55ae91beff78156fdb6a41be8bc049117 -%global shortcommit %(c=%commit}; echo ${c:0:7}) -Version: 0.2.98^1.%{shortcommit} +Version: 0.3.1 +%global tag 0.3.1 -%gometa +%gometa -f %global common_description %{expand: -yggdrasil is a client daemon that establishes a receiving queue for instructions -to be sent to the system via a broker.} +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 INSTALL.md HACKING.md README.md +%global godocs CONTRIBUTING.md README.md Name: yggdrasil -Release: 0.5%{?dist} -Summary: Remote execution client and dispatch service +Release: %autorelease +Summary: Remote data transmission and processing client -License: GPLv3 +License: GPL-3.0-only URL: %{gourl} -Source0: %{gosource} - -BuildRequires: golang(git.sr.ht/~spc/go-log) -BuildRequires: golang(github.com/briandowns/spinner) -BuildRequires: golang(github.com/coreos/go-systemd/v22/dbus) -BuildRequires: golang(github.com/eclipse/paho.mqtt.golang) -BuildRequires: golang(github.com/godbus/dbus/v5) -BuildRequires: golang(github.com/google/uuid) -BuildRequires: golang(github.com/pelletier/go-toml) -BuildRequires: golang(github.com/rjeczalik/notify) -BuildRequires: golang(github.com/urfave/cli/v2) -BuildRequires: golang(github.com/urfave/cli/v2/altsrc) -BuildRequires: golang(golang.org/x/crypto/ssh/terminal) -BuildRequires: golang(google.golang.org/grpc) -BuildRequires: golang(google.golang.org/grpc/codes) -BuildRequires: golang(google.golang.org/grpc/status) -BuildRequires: golang(google.golang.org/protobuf/reflect/protoreflect) -BuildRequires: golang(google.golang.org/protobuf/runtime/protoimpl) +Source: %{gosource} BuildRequires: systemd-rpm-macros +BuildRequires: meson +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(bash-completion) -%if %{with check} -# Tests -BuildRequires: golang(github.com/google/go-cmp/cmp) -BuildRequires: golang(github.com/google/go-cmp/cmp/cmpopts) -%endif - -%description -%{common_description} - - -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} - - -%description devel -%{common_description} - -This package includes files necessary for building yggdrasil workers. +%description %{common_description} +%gopkg %prep %goprep +%autopatch -p1 +%generate_buildrequires +%go_generate_buildrequires -%global brandname yggdrasil -%global shortname ygg -%global longname yggdrasil -%global topicprefix "" -%global datahost "" -%global provider "" -%global sed_flags %{expand:-e 's,[@]SHORTNAME[@],%{shortname},g' \\ - -e 's,[@]LONGNAME[@],%{longname},g' \\ - -e 's,[@]BRANDNAME[@],%{brandname},g' \\ - -e 's,[@]PKGNAME[@],%{name},g' \\ - -e 's,[@]VERSION[@],%{version},g' \\ - -e 's,[@]TOPICPREFIX[@],%{topicprefix},g' \\ - -e 's,[@]DATAHOST[@],%{datahost},g' \\ - -e 's,[@]PROVIDER[@],%{provider},g' \\ - -e 's,[@]PREFIX[@],%{_prefix},g' \\ - -e 's,[@]BINDIR[@],%{_bindir},g' \\ - -e 's,[@]SBINDIR[@],%{_sbindir},g' \\ - -e 's,[@]LIBEXECDIR[@],%{_libexecdir},g' \\ - -e 's,[@]SYSCONFDIR[@],%{_sysconfdir},g' \\ - -e 's,[@]DATADIR[@],%{_datadir},g' \\ - -e 's,[@]DATAROOTDIR[@],%{_datarootdir},g' \\ - -e 's,[@]MANDIR[@],%{_mandir},g' \\ - -e 's,[@]DOCDIR[@],%{_docdir},g' \\ - -e 's,[@]LOCALSTATEDIR[@],%{_localstatedir},g'} -%global ldflags %{expand:-X 'github.com/redhatinsights/yggdrasil.ShortName=%{shortname}' \\ - -X 'github.com/redhatinsights/yggdrasil.LongName=%{longname}' \\ - -X 'github.com/redhatinsights/yggdrasil.BrandName=%{brandname}' \\ - -X 'github.com/redhatinsights/yggdrasil.Version=%{version}' \\ - -X 'github.com/redhatinsights/yggdrasil.TopicPrefix=%{topicprefix}' \\ - -X 'github.com/redhatinsights/yggdrasil.DataHost=%{datahost}' \\ - -X 'github.com/redhatinsights/yggdrasil.Provider=%{provider}' \\ - -X 'github.com/redhatinsights/yggdrasil.PrefixDir=%{_prefix}' \\ - -X 'github.com/redhatinsights/yggdrasil.BinDir=%{_bindir}' \\ - -X 'github.com/redhatinsights/yggdrasil.SbinDir=%{_sbindir}' \\ - -X 'github.com/redhatinsights/yggdrasil.LibexecDir=%{_libexecdir}' \\ - -X 'github.com/redhatinsights/yggdrasil.SysconfDir=%{_sysconfdir}' \\ - -X 'github.com/redhatinsights/yggdrasil.DataDir=%{_datadir}' \\ - -X 'github.com/redhatinsights/yggdrasil.DatarootDir=%{_datarootdir}' \\ - -X 'github.com/redhatinsights/yggdrasil.ManDir=%{_mandir}' \\ - -X 'github.com/redhatinsights/yggdrasil.DocDir=%{_docdir}' \\ - -X 'github.com/redhatinsights/yggdrasil.LocalstateDir=%{_localstatedir}'} %build -export LDFLAGS="%{ldflags}" -%gobuild -o %{gobuilddir}/bin/yggd %{goipath}/cmd/yggd -%__sed %{sed_flags} data/systemd/yggd.service.in > data/systemd/yggd.service -%__sed %{sed_flags} data/pkgconfig/yggdrasil.pc.in > data/pkgconfig/yggdrasil.pc -%{gobuilddir}/bin/yggd --generate-bash-completion > yggd.bash -%{gobuilddir}/bin/yggd --generate-man-page | gzip > yggd.1.gz - +%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 -install -D -m 0755 -vp %{gobuilddir}/bin/yggd %{buildroot}%{_sbindir}/yggd -install -D -m 0644 -vp data/systemd/yggd.service %{buildroot}%{_unitdir}/yggd.service -install -D -m 0644 -vp data/pkgconfig/yggdrasil.pc %{buildroot}%{_datadir}/pkgconfig/yggdrasil.pc -install -D -m 0644 -vp yggd.bash %{buildroot}%{_datadir}/bash-completion/completions/yggd.bash -install -D -m 0644 -vp yggd.1.gz %{buildroot}%{_mandir}/man1/yggd.1.gz -install -D -m 0644 -vp data/yggdrasil/config.toml %{buildroot}%{_sysconfdir}/%{longname}/config.toml - +%meson_install +%gopkginstall %if %{with check} %check %gocheck %endif - %files %license LICENSE -%doc INSTALL.md HACKING.md README.md -%{_sbindir}/* -%config(noreplace) %{_sysconfdir}/%{longname} +%doc CONTRIBUTING.md README.md +%{_bindir}/* +%config(noreplace) %{_sysconfdir}/%{name} %{_unitdir}/* +%{_userunitdir}/* %{_datadir}/bash-completion/completions/* +%{_datadir}/dbus-1/{interfaces,system-services,system.d}/* +%{_datadir}/doc/%{name}/* %{_mandir}/man1/* - -%files devel -%{_datadir}/pkgconfig/* - +%gopkgfiles %changelog -* 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 - +%autochangelog