From f25d2ec8d55be55dc87d4dfaf2239413493f0dca Mon Sep 17 00:00:00 2001 From: jcsiadal Date: Mon, 17 Oct 2022 21:58:03 +0000 Subject: [PATCH] Update spec and Makefile Signed-off-by: jcsiadal --- Makefile | 8 ++++++-- warewulf.spec.in | 25 ++++++++++++++++++------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index add0a600..8cbc0625 100644 --- a/Makefile +++ b/Makefile @@ -95,8 +95,10 @@ export GOPROXY # built tags needed for wwbuild binary WW_GO_BUILD_TAGS := containers_image_openpgp containers_image_ostree +# Default target all: config vendor wwctl wwclient bash_completion.d man_pages config_defaults print_defaults wwapid wwapic wwapird +# Validate source and build all packages build: lint test-it vet all # set the go tools into the tools bin. @@ -113,8 +115,10 @@ $(GOLANGCI_LINT): setup: vendor $(TOOLS_DIR) setup_tools vendor: - go mod tidy -v - go mod vendor + ifndef OFFLINE_BUILD + go mod tidy -v + go mod vendor +endif $(TOOLS_DIR): @mkdir -p $@ diff --git a/warewulf.spec.in b/warewulf.spec.in index b040e074..5f57ffb2 100644 --- a/warewulf.spec.in +++ b/warewulf.spec.in @@ -1,4 +1,4 @@ -%define debug_package %{nil} +%global debug_package %{nil} %if 0%{?suse_version} %global tftpdir /srv/tftpboot @@ -17,6 +17,7 @@ Release: @RELEASE@%{?dist} License: BSD-3-Clause URL: https://github.com/hpcng/warewulf Source: https://github.com/hpcng/warewulf/releases/download/v%{version}/warewulf-%{version}.tar.gz +%{?with_offline:Source2: vendor.tgz} ExclusiveOS: linux @@ -27,11 +28,10 @@ Conflicts: warewulf-vnfs Conflicts: warewulf-provision Conflicts: warewulf-ipmi -BuildRequires: make - -%if 0%{?suse_version} +%if 0%{?suse_version} || 0%{?sle_version} +BuildRequires: distribution-release BuildRequires: systemd-rpm-macros -BuildRequires: go +BuildRequires: go >= 1.16 BuildRequires: firewall-macros BuildRequires: firewalld BuildRequires: tftp @@ -39,8 +39,10 @@ Requires: tftp Requires: nfs-kernel-server Requires: firewalld %else +# Assume Red Hat/Fedora build +BuildRequires: system-release BuildRequires: systemd -BuildRequires: golang +BuildRequires: golang >= 1.16 BuildRequires: firewalld-filesystem Requires: tftp-server Requires: nfs-utils @@ -53,16 +55,21 @@ Requires: dhcp-server Requires: dhcp %endif +BuildRequires: git +BuildRequires: make +BuildRequires: libassuan-devel gpgme-devel + %description Warewulf is a stateless and diskless container operating system provisioning system for large clusters of bare metal and/or virtual systems. %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name}-%{version} -b0 %if %{?with_offline:-a2} %build +%{?with_offline:OFFLINE_BUILD=1} # Install to sharedstatedir by redirecting LOCALSTATEDIR make genconfig \ PREFIX=%{_prefix} \ @@ -131,6 +138,10 @@ getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup} %changelog +* Mon Oct 17 2022 Jeremy Siadal - 4.4.0-1 +- Add offline build support -- prepping for bcond +- Add more BuildRequires for new golang vendor modules + * Wed Jan 26 2022 Jeremy Siadal - 4.2.0-1 - Add license install - Updates for RH and SUSE RPM guidelines