Merge pull request #1974 from middelkoopt/tm-el10

Add support for EL10
This commit is contained in:
Jonathon Anderson
2025-08-27 15:46:25 -06:00
committed by GitHub
7 changed files with 61 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "Warewulf Development",
"image": "registry.docker.com/library/rockylinux:9",
"image": "registry.docker.com/rockylinux/rockylinux:10",
"remoteUser": "vscode",
"onCreateCommand": "sudo dnf install -y dnf-utils && sudo dnf config-manager --set-enabled crb && sudo dnf install -y unzip cpio gpgme-devel python3-sphinx python3-sphinx_rtd_theme",
"features": {

View File

@@ -19,6 +19,7 @@ jobs:
outputs:
has-recent-commits: ${{ steps.commits.outputs.has-recent-commits }}
commits: ${{ steps.commits.outputs.commits }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout Code
@@ -43,6 +44,13 @@ jobs:
run: |
make warewulf.spec dist
- name: Get build version
id: version
run: |
VERSION=$(make version)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "Version: ${VERSION}"
- name: Upload spec
uses: actions/upload-artifact@v4
with:
@@ -65,18 +73,20 @@ jobs:
name: Build RPMs
runs-on: ${{ matrix.runs-on }}
container:
image: rockylinux/rockylinux:9
image: rockylinux/rockylinux:10
options: --privileged
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]
dist: [el9, el8, suse.lp155]
dist: [el10, el9, el8, suse.lp155]
include:
- dist: el8
target: rocky+epel-8
- dist: el9
target: rocky+epel-9
- dist: el10
target: rocky+epel-10
- dist: suse.lp155
target: opensuse-leap-15.5
- arch: x86_64
@@ -110,7 +120,7 @@ jobs:
root="${eol_root}"
fi
mock --root="${root}" --rebuild --spec=warewulf.spec --sources=. \
&& mock --root="${root}" --chroot -- bash -c "make -C /builddir/build/BUILD/warewulf-*/ test"
&& mock --root="${root}" --chroot -- bash -c "make -C /builddir/build/BUILD/warewulf-${{ needs.dist.outputs.version }} test"
- name: Upload RPMs
uses: actions/upload-artifact@v4

View File

@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
### Added
- Build support for EL10, EL10 depends on `dnsmasq` and no longer `dhcpd-server` (EOL). #1974
- `make rpm` added for local development rpm builds. #1974
### Changed
- `make dist` now uses `mktemp` instead of `.dist`. #1974
- Fixed dnsmasq template file to use basename for ipxe files. #1974
- For EL10 default to dnsmasq for dhcpd and tftp. #1974
## v4.6.3, 2025-08-01
### Added

View File

@@ -17,6 +17,10 @@ include Tools.mk
##@ Build
.PHONY: version
version: ## Build version
@echo $(VERSION)
.PHONY: build
build: wwctl wwclient etc/bash_completion.d/wwctl ## Build the Warewulf binaries
@@ -28,14 +32,21 @@ spec: warewulf.spec ## Create an RPM spec file
.PHONY: dist
dist: $(config) ## Create a distributable source tarball
rm -rf .dist/
mkdir -p .dist/$(WAREWULF)-$(VERSION)
git ls-files >.dist/dist-files
tar -c --files-from .dist/dist-files | tar -C .dist/$(WAREWULF)-$(VERSION) -x
test -d vendor/ && cp -a vendor/ .dist/$(WAREWULF)-$(VERSION) || :
scripts/get-version.sh >.dist/$(WAREWULF)-$(VERSION)/VERSION
tar -C .dist -czf $(WAREWULF)-$(VERSION).tar.gz $(WAREWULF)-$(VERSION)
rm -rf .dist/
$(eval TMPDIR := $(shell mktemp -d))
mkdir -p $(TMPDIR)/$(WAREWULF)-$(VERSION)
git ls-files >$(TMPDIR)/dist-files
tar -c --files-from $(TMPDIR)/dist-files | tar -C $(TMPDIR)/$(WAREWULF)-$(VERSION) -x
test -d vendor/ && cp -a vendor/ $(TMPDIR)/$(WAREWULF)-$(VERSION) || :
scripts/get-version.sh >$(TMPDIR)/$(WAREWULF)-$(VERSION)/VERSION
tar -C $(TMPDIR) -czf $(WAREWULF)-$(VERSION).tar.gz $(WAREWULF)-$(VERSION)
rm -rf $(TMPDIR)
RPMDIR = $(HOME)/rpmbuild
.PHONY: rpm
rpm: spec dist ## Create an RPM package
@mkdir -p $(RPMDIR)/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp $(WAREWULF)-$(VERSION).tar.gz $(RPMDIR)/SOURCES/
rpmbuild -bb warewulf.spec
config = include/systemd/warewulfd.service \
internal/pkg/config/buildconfig.go \

View File

@@ -260,7 +260,7 @@ dhcp-option-force=tag:efi-http,60,HTTPClient
# for http boot always use shim/grub
dhcp-boot=tag:efi-http,"http://192.168.0.1:9873/efiboot/shim.efi"
dhcp-boot=tag:x86PC,"/warewulf/ipxe-snponly-x86_64.efi"
dhcp-boot=tag:aarch64,"/warewulf/arm64-efi/snponly.efi"
dhcp-boot=tag:aarch64,"/warewulf/snponly.efi"
# iPXE binary will get the following configuration file
dhcp-boot=tag:iPXE,"http://192.168.0.1:9873/ipxe/${mac:hexhyp}?assetkey=${asset}&uuid=${uuid}"
dhcp-no-override

View File

@@ -19,7 +19,7 @@ dhcp-boot=tag:x86PC,"warewulf/shim.efi"
dhcp-boot=tag:x86PC,"/warewulf/{{ index $.Tftp.IpxeBinaries "00:07" }}"
{{- end }}
{{- with (index $.Tftp.IpxeBinaries "00:0B" ) }}
dhcp-boot=tag:aarch64,"/warewulf/{{ index $.Tftp.IpxeBinaries "00:0B" }}"
dhcp-boot=tag:aarch64,"/warewulf/{{ index $.Tftp.IpxeBinaries "00:0B" | basename }}"
{{- end }}
{{- end }}
# iPXE binary will get the following configuration file

View File

@@ -50,7 +50,9 @@ BuildRequires: system-release
BuildRequires: systemd
BuildRequires: golang >= 1.16
BuildRequires: firewalld-filesystem
%if ! (0%{?rhel} >= 10)
Requires: tftp-server
%endif
Requires: nfs-utils
%if 0%{?rhel} < 8
Requires: ipxe-bootimgs
@@ -60,12 +62,16 @@ Requires: ipxe-bootimgs-aarch64
%endif
%endif
%if 0%{?rhel} >= 10
Requires: dnsmasq
%else
%if 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?fedora}
Requires: dhcp-server
%else
# rhel < 8
# rhel < 8 and others
Requires: dhcp
%endif
%endif
BuildRequires: git
BuildRequires: make
@@ -116,6 +122,14 @@ export NO_BRP_STALE_LINK_ERROR=yes
make install \
DESTDIR=%{buildroot}
%if 0%{?rhel} >= 10
sed -i '
s/systemd name: dhcpd/systemd name: dnsmasq/
s/systemd name: tftp/systemd name: dnsmasq/
/- dsa/d' \
-i %{buildroot}%{_sysconfdir}/warewulf/warewulf.conf
%endif
%if 0%{?suse_version} || 0%{?sle_version}
yq e '
.tftp.ipxe."00:00" = "undionly.kpxe" |