Skip to content

Commit

Permalink
warewulf: fix offline build in OBS
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Reber <areber@redhat.com>
  • Loading branch information
adrianreber committed Aug 3, 2024
1 parent ebd1508 commit e4b4afb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions components/provisioning/warewulf/SPECS/warewulf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ BuildRequires: unzip
Requires: dhcp-server

%if 0%{?suse_version} || 0%{?sle_version}
BuildRequires: distribution-release
BuildRequires: systemd-rpm-macros
BuildRequires: go > 1.20
BuildRequires: firewall-macros
Expand All @@ -62,7 +61,6 @@ Requires: firewalld
Requires: ipxe-bootimgs
%else
# Assume Fedora-based OS (>= RHEL 9) if not SUSE-based
BuildRequires: system-release
BuildRequires: systemd
BuildRequires: golang > 1.20
BuildRequires: firewalld-filesystem
Expand All @@ -85,13 +83,7 @@ system for large clusters of bare metal and/or virtual systems.


%build
# No network access in OBS, so module downloads will break builds
%if 0%{?OHPC_BUILD} || !0%{?update_mods}
export OFFLINE_BUILD=1
%else
export OFFLINE_BUILD=0
%endif

# Install to sharedstatedir by redirecting LOCALSTATEDIR
make defaults \
PREFIX=%{_prefix} \
Expand All @@ -116,6 +108,7 @@ make api

%install
export NO_BRP_STALE_LINK_ERROR=yes
export OFFLINE_BUILD=1
make install DESTDIR=%{buildroot}
make installapi DESTDIR=%{buildroot}

Expand Down Expand Up @@ -205,4 +198,4 @@ Warewulf server.
%files -n %{dracut_package}
%defattr(-, root, root)
%dir %{_prefix}/lib/dracut/modules.d/90wwinit
%{_prefix}/lib/dracut/modules.d/90wwinit/*.sh
%{_prefix}/lib/dracut/modules.d/90wwinit/*.sh

0 comments on commit e4b4afb

Please sign in to comment.