Update spec and Makefile

Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
This commit is contained in:
jcsiadal
2022-10-17 21:58:03 +00:00
parent b5d3de621b
commit f25d2ec8d5
2 changed files with 24 additions and 9 deletions

View File

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

View File

@@ -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 <jeremy.c.siadal@intel.com> - 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 <jeremy.c.siadal@intel.com> - 4.2.0-1
- Add license install
- Updates for RH and SUSE RPM guidelines