From 4d20229376bcf4090991d4233b9a178ed876f4ba Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 9 Aug 2023 10:25:42 -0400 Subject: [PATCH] Use vendored dependencies in RHEL builds The upstream release tarballs include the vendored dependencies. In Fedora builds, %goprep will remove them and still use dynamic buildrequires, but RHEL does not package those and needs to use the vendoring. --- .gitignore | 1 + sources | 2 +- yggdrasil-worker-package-manager.spec | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 81a51c7..03ed63e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /yggdrasil-worker-package-manager-0.2.0.tar.gz +/yggdrasil-worker-package-manager-0.2.0.tar.xz diff --git a/sources b/sources index 0429d16..e9f9e7d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (yggdrasil-worker-package-manager-0.2.0.tar.gz) = da1e015bcecca9d870eb1bf3cb37ed41a8bf02d7de3baf9b91c4fccdf27ea95681700bbb37828770479cce5b193b84335ab4a031e2552d6f9ecdc5596c45c5ab +SHA512 (yggdrasil-worker-package-manager-0.2.0.tar.xz) = 67e6a7152cf105f8a5593cb47e86be46419291f580fb98a9407bb82b67046288884cb5cf28b55ef0224bfb5f5ce63c636b9bb5f7b7da93828501f0a3af5219eb diff --git a/yggdrasil-worker-package-manager.spec b/yggdrasil-worker-package-manager.spec index 0d6e389..e86e2a1 100644 --- a/yggdrasil-worker-package-manager.spec +++ b/yggdrasil-worker-package-manager.spec @@ -23,7 +23,7 @@ Summary: Package manager worker for yggdrasil License: GPL-3.0-only URL: %{gourl} -Source: %{gosource} +Source: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz BuildRequires: systemd-rpm-macros BuildRequires: meson @@ -34,11 +34,13 @@ BuildRequires: pkgconfig(dbus-1) %gopkg %prep -%goprep +%goprep %{?rhel:-k} %autopatch -p1 +%if %{undefined rhel} %generate_buildrequires %go_generate_buildrequires +%endif %build %undefine _auto_set_build_flags @@ -58,6 +60,9 @@ export %gomodulesmode %files %license LICENSE +%if %{defined rhel} +%license vendor/modules.txt +%endif %doc README.md %{_libexecdir}/* %config(noreplace) %{_sysconfdir}/%{name}