Don't build the API for CentOS 7
A recent security update breaks compatibility with CentOS 7 through gpgme. This change omits building the API by default and does not build it when packaging for EL 7. - Closes #1171 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -51,6 +51,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Bump github.com/opencontainers/runc to 1.1.12
|
- Bump github.com/opencontainers/runc to 1.1.12
|
||||||
- Dynamically calculate version and release from Git. #1162
|
- Dynamically calculate version and release from Git. #1162
|
||||||
- Update quickstarts to configure firewalld for dhcp. #1133
|
- Update quickstarts to configure firewalld for dhcp. #1133
|
||||||
|
- Omit building the API on EL7. #1171
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
37
Makefile
37
Makefile
@@ -5,7 +5,10 @@ include Variables.mk
|
|||||||
include Tools.mk
|
include Tools.mk
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: wwctl wwclient wwapid wwapic wwapird etc/defaults.conf etc/bash_completion.d/wwctl
|
build: wwctl wwclient etc/defaults.conf etc/bash_completion.d/wwctl
|
||||||
|
|
||||||
|
.PHONY: api
|
||||||
|
api: wwapid wwapic wwapird
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs: man_pages reference
|
docs: man_pages reference
|
||||||
@@ -21,15 +24,18 @@ tidy:
|
|||||||
fmt:
|
fmt:
|
||||||
go fmt ./...
|
go fmt ./...
|
||||||
|
|
||||||
config = etc/wwapic.conf \
|
config = include/systemd/warewulfd.service \
|
||||||
etc/wwapid.conf \
|
|
||||||
etc/wwapird.conf \
|
|
||||||
include/systemd/warewulfd.service \
|
|
||||||
internal/pkg/config/buildconfig.go \
|
internal/pkg/config/buildconfig.go \
|
||||||
warewulf.spec
|
warewulf.spec
|
||||||
.PHONY: config
|
.PHONY: config
|
||||||
config: $(config)
|
config: $(config)
|
||||||
|
|
||||||
|
apiconfig = etc/wwapic.conf \
|
||||||
|
etc/wwapid.conf \
|
||||||
|
etc/wwapird.conf
|
||||||
|
.PHONY: apiconfig
|
||||||
|
apiconfig: $(apiconfig)
|
||||||
|
|
||||||
%: %.in
|
%: %.in
|
||||||
sed -ne "$(foreach V,$(VARLIST),s,@$V@,$(strip $($V)),g;)p" $@.in >$@
|
sed -ne "$(foreach V,$(VARLIST),s,@$V@,$(strip $($V)),g;)p" $@.in >$@
|
||||||
|
|
||||||
@@ -43,13 +49,13 @@ update_configuration: $(config) $(call godeps,cmd/update_configuration/update_co
|
|||||||
go build -X 'github.com/warewulf/warewulf/internal/pkg/node.ConfigFile=./etc/nodes.conf'" \
|
go build -X 'github.com/warewulf/warewulf/internal/pkg/node.ConfigFile=./etc/nodes.conf'" \
|
||||||
-mod vendor -tags "$(WW_GO_BUILD_TAGS)" -o update_configuration cmd/update_configuration/update_configuration.go
|
-mod vendor -tags "$(WW_GO_BUILD_TAGS)" -o update_configuration cmd/update_configuration/update_configuration.go
|
||||||
|
|
||||||
wwapid: $(config) $(call godeps,internal/app/api/wwapid/wwapid.go)
|
wwapid: $(config) $(apiconfig) $(call godeps,internal/app/api/wwapid/wwapid.go)
|
||||||
go build -o ./wwapid internal/app/api/wwapid/wwapid.go
|
go build -o ./wwapid internal/app/api/wwapid/wwapid.go
|
||||||
|
|
||||||
wwapic: $(config) $(call godeps,internal/app/api/wwapic/wwapic.go)
|
wwapic: $(config) $(apiconfig) $(call godeps,internal/app/api/wwapic/wwapic.go)
|
||||||
go build -o ./wwapic internal/app/api/wwapic/wwapic.go
|
go build -o ./wwapic internal/app/api/wwapic/wwapic.go
|
||||||
|
|
||||||
wwapird: $(config) $(call godeps,internal/app/api/wwapird/wwapird.go)
|
wwapird: $(config) $(apiconfig) $(call godeps,internal/app/api/wwapird/wwapird.go)
|
||||||
go build -o ./wwapird internal/app/api/wwapird/wwapird.go
|
go build -o ./wwapird internal/app/api/wwapird/wwapird.go
|
||||||
|
|
||||||
.PHONY: man_pages
|
.PHONY: man_pages
|
||||||
@@ -109,9 +115,6 @@ install: build docs
|
|||||||
# wwctl genconfig to get the compiled in paths to warewulf.conf
|
# wwctl genconfig to get the compiled in paths to warewulf.conf
|
||||||
test -f $(DESTDIR)$(WWCONFIGDIR)/warewulf.conf || ./wwctl --warewulfconf etc/warewulf.conf genconfig warewulfconf print> $(DESTDIR)$(WWCONFIGDIR)/warewulf.conf
|
test -f $(DESTDIR)$(WWCONFIGDIR)/warewulf.conf || ./wwctl --warewulfconf etc/warewulf.conf genconfig warewulfconf print> $(DESTDIR)$(WWCONFIGDIR)/warewulf.conf
|
||||||
test -f $(DESTDIR)$(WWCONFIGDIR)/nodes.conf || install -m 0644 etc/nodes.conf $(DESTDIR)$(WWCONFIGDIR)
|
test -f $(DESTDIR)$(WWCONFIGDIR)/nodes.conf || install -m 0644 etc/nodes.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||||
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapic.conf || install -m 0644 etc/wwapic.conf $(DESTDIR)$(WWCONFIGDIR)
|
|
||||||
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapid.conf || install -m 0644 etc/wwapid.conf $(DESTDIR)$(WWCONFIGDIR)
|
|
||||||
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapird.conf || install -m 0644 etc/wwapird.conf $(DESTDIR)$(WWCONFIGDIR)
|
|
||||||
test -f $(DESTDIR)$(DATADIR)/warewulf/defaults.conf || install -m 0644 etc/defaults.conf $(DESTDIR)$(DATADIR)/warewulf/defaults.conf
|
test -f $(DESTDIR)$(DATADIR)/warewulf/defaults.conf || install -m 0644 etc/defaults.conf $(DESTDIR)$(DATADIR)/warewulf/defaults.conf
|
||||||
for f in etc/examples/*.ww; do install -m 0644 $$f $(DESTDIR)$(WWCONFIGDIR)/examples/; done
|
for f in etc/examples/*.ww; do install -m 0644 $$f $(DESTDIR)$(WWCONFIGDIR)/examples/; done
|
||||||
for f in etc/ipxe/*.ipxe; do install -m 0644 $$f $(DESTDIR)$(WWCONFIGDIR)/ipxe/; done
|
for f in etc/ipxe/*.ipxe; do install -m 0644 $$f $(DESTDIR)$(WWCONFIGDIR)/ipxe/; done
|
||||||
@@ -129,9 +132,6 @@ install: build docs
|
|||||||
chmod 0750 $(DESTDIR)$(WWOVERLAYDIR)/host/rootfs
|
chmod 0750 $(DESTDIR)$(WWOVERLAYDIR)/host/rootfs
|
||||||
install -m 0755 wwctl $(DESTDIR)$(BINDIR)
|
install -m 0755 wwctl $(DESTDIR)$(BINDIR)
|
||||||
install -m 0755 wwclient $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/$(WWCLIENTDIR)/wwclient
|
install -m 0755 wwclient $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/$(WWCLIENTDIR)/wwclient
|
||||||
install -m 0755 wwapic $(DESTDIR)$(BINDIR)
|
|
||||||
install -m 0755 wwapid $(DESTDIR)$(BINDIR)
|
|
||||||
install -m 0755 wwapird $(DESTDIR)$(BINDIR)
|
|
||||||
install -m 0644 include/firewalld/warewulf.xml $(DESTDIR)$(FIREWALLDDIR)
|
install -m 0644 include/firewalld/warewulf.xml $(DESTDIR)$(FIREWALLDDIR)
|
||||||
install -m 0644 include/systemd/warewulfd.service $(DESTDIR)$(SYSTEMDDIR)
|
install -m 0644 include/systemd/warewulfd.service $(DESTDIR)$(SYSTEMDDIR)
|
||||||
install -m 0644 LICENSE.md $(DESTDIR)$(WWDOCDIR)
|
install -m 0644 LICENSE.md $(DESTDIR)$(WWDOCDIR)
|
||||||
@@ -139,6 +139,15 @@ install: build docs
|
|||||||
for f in docs/man/man1/*.1.gz; do install -m 0644 $$f $(DESTDIR)$(MANDIR)/man1/; done
|
for f in docs/man/man1/*.1.gz; do install -m 0644 $$f $(DESTDIR)$(MANDIR)/man1/; done
|
||||||
for f in docs/man/man5/*.5.gz; do install -m 0644 $$f $(DESTDIR)$(MANDIR)/man5/; done
|
for f in docs/man/man5/*.5.gz; do install -m 0644 $$f $(DESTDIR)$(MANDIR)/man5/; done
|
||||||
|
|
||||||
|
.PHONY: installapi
|
||||||
|
installapi:
|
||||||
|
install -m 0755 wwapic $(DESTDIR)$(BINDIR)
|
||||||
|
install -m 0755 wwapid $(DESTDIR)$(BINDIR)
|
||||||
|
install -m 0755 wwapird $(DESTDIR)$(BINDIR)
|
||||||
|
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapic.conf || install -m 0644 etc/wwapic.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||||
|
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapid.conf || install -m 0644 etc/wwapid.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||||
|
test -f $(DESTDIR)$(WWCONFIGDIR)/wwapird.conf || install -m 0644 etc/wwapird.conf $(DESTDIR)$(WWCONFIGDIR)
|
||||||
|
|
||||||
.PHONY: init
|
.PHONY: init
|
||||||
init:
|
init:
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%global api 1
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||||
|
%global api 0
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%global tftpdir /srv/tftpboot
|
%global tftpdir /srv/tftpboot
|
||||||
%else
|
%else
|
||||||
@@ -69,7 +74,9 @@ Requires: dhcp
|
|||||||
|
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
|
%if %{api}
|
||||||
BuildRequires: libassuan-devel gpgme-devel
|
BuildRequires: libassuan-devel gpgme-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Warewulf is a stateless and diskless container operating system provisioning
|
Warewulf is a stateless and diskless container operating system provisioning
|
||||||
@@ -100,6 +107,9 @@ make defaults \
|
|||||||
WWCLIENTDIR=/warewulf \
|
WWCLIENTDIR=/warewulf \
|
||||||
IPXESOURCE=/usr/share/ipxe
|
IPXESOURCE=/usr/share/ipxe
|
||||||
make
|
make
|
||||||
|
%if %{api}
|
||||||
|
make api
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@@ -107,6 +117,10 @@ export OFFLINE_BUILD=1
|
|||||||
export NO_BRP_STALE_LINK_ERROR=yes
|
export NO_BRP_STALE_LINK_ERROR=yes
|
||||||
make install \
|
make install \
|
||||||
DESTDIR=%{buildroot}
|
DESTDIR=%{buildroot}
|
||||||
|
%if %{api}
|
||||||
|
make installapi \
|
||||||
|
DESTDIR=%{buildroot}
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} || 0%{?sle_version}
|
%if 0%{?suse_version} || 0%{?sle_version}
|
||||||
yq e '
|
yq e '
|
||||||
@@ -140,7 +154,6 @@ getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
|||||||
%defattr(-, root, %{wwgroup})
|
%defattr(-, root, %{wwgroup})
|
||||||
%dir %{_sysconfdir}/warewulf
|
%dir %{_sysconfdir}/warewulf
|
||||||
%config(noreplace) %{_sysconfdir}/warewulf/warewulf.conf
|
%config(noreplace) %{_sysconfdir}/warewulf/warewulf.conf
|
||||||
%config(noreplace) %{_sysconfdir}/warewulf/wwapi*.conf
|
|
||||||
%config(noreplace) %{_sysconfdir}/warewulf/examples
|
%config(noreplace) %{_sysconfdir}/warewulf/examples
|
||||||
%config(noreplace) %{_sysconfdir}/warewulf/ipxe
|
%config(noreplace) %{_sysconfdir}/warewulf/ipxe
|
||||||
%config(noreplace) %{_sysconfdir}/warewulf/grub
|
%config(noreplace) %{_sysconfdir}/warewulf/grub
|
||||||
@@ -157,7 +170,6 @@ getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
|||||||
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/*/rootfs
|
%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/*/rootfs
|
||||||
|
|
||||||
%attr(-, root, root) %{_bindir}/wwctl
|
%attr(-, root, root) %{_bindir}/wwctl
|
||||||
%attr(-, root, root) %{_bindir}/wwapi*
|
|
||||||
%attr(-, root, root) %{_prefix}/lib/firewalld/services/warewulf.xml
|
%attr(-, root, root) %{_prefix}/lib/firewalld/services/warewulf.xml
|
||||||
%attr(-, root, root) %{_unitdir}/warewulfd.service
|
%attr(-, root, root) %{_unitdir}/warewulfd.service
|
||||||
%attr(-, root, root) %{_mandir}/man1/wwctl*
|
%attr(-, root, root) %{_mandir}/man1/wwctl*
|
||||||
@@ -167,8 +179,16 @@ getent group %{wwgroup} >/dev/null || groupadd -r %{wwgroup}
|
|||||||
%dir %{_docdir}/warewulf
|
%dir %{_docdir}/warewulf
|
||||||
%license %{_docdir}/warewulf/LICENSE.md
|
%license %{_docdir}/warewulf/LICENSE.md
|
||||||
|
|
||||||
|
%if %{api}
|
||||||
|
%attr(-, root, root) %{_bindir}/wwapi*
|
||||||
|
%config(noreplace) %{_sysconfdir}/warewulf/wwapi*.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 17 2024 Jonathon Anderson <janderson@ciq.com>
|
||||||
|
- Don't build the API on EL7
|
||||||
|
|
||||||
* Sat Mar 9 2024 Jonathon Anderson <janderson@ciq.com> - 4.5.0-1
|
* Sat Mar 9 2024 Jonathon Anderson <janderson@ciq.com> - 4.5.0-1
|
||||||
- Update source to github.com/warewulf
|
- Update source to github.com/warewulf
|
||||||
- Fix ownership of overlay files
|
- Fix ownership of overlay files
|
||||||
|
|||||||
Reference in New Issue
Block a user