Merge pull request 'feat: add custom ipxe bootloader' (#45) from benvin/unkin_undionly into master
Reviewed-on: #45
This commit is contained in:
commit
56de02eb94
1
rpms/unkin-undionly-kpxe/20250712/release
Normal file
1
rpms/unkin-undionly-kpxe/20250712/release
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
18
rpms/unkin-undionly-kpxe/Dockerfile
Normal file
18
rpms/unkin-undionly-kpxe/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM git.unkin.net/unkin/almalinux9-rpmbuilder:latest
|
||||
|
||||
# Create output directory for RPMs
|
||||
RUN mkdir -p /app/dist
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
ARG PACKAGE_RELEASE
|
||||
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
|
||||
ARG PACKAGE_VERSION
|
||||
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
||||
|
||||
# Copy nfpm.yaml from the context into the container
|
||||
COPY resources /app/resources
|
||||
|
||||
# Default command to build RPMs
|
||||
CMD /app/resources/build.sh
|
||||
20
rpms/unkin-undionly-kpxe/resources/build.sh
Executable file
20
rpms/unkin-undionly-kpxe/resources/build.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/bash
|
||||
# clone the repo
|
||||
git clone https://github.com/ipxe/ipxe.git
|
||||
|
||||
# change into it
|
||||
cd ipxe/src
|
||||
|
||||
# copy the main.pxi to embed
|
||||
cp /app/resources/main.ipxe ./
|
||||
|
||||
# build images
|
||||
make bin/undionly.kpxe EMBED=main.ipxe
|
||||
make bin-x86_64-efi/ipxe.efi EMBED=main.ipxe
|
||||
|
||||
# copy to /app
|
||||
cp bin/undionly.kpxe /app/
|
||||
cp bin-x86_64-efi/ipxe.efi /app/
|
||||
|
||||
# build rpm
|
||||
nfpm pkg --config /app/resources/nfpm.yaml --target /app/dist --packager rpm
|
||||
2
rpms/unkin-undionly-kpxe/resources/main.ipxe
Normal file
2
rpms/unkin-undionly-kpxe/resources/main.ipxe
Normal file
@ -0,0 +1,2 @@
|
||||
#!ipxe
|
||||
chain tftp://198.18.19.19/main.ipxe
|
||||
44
rpms/unkin-undionly-kpxe/resources/nfpm.yaml
Normal file
44
rpms/unkin-undionly-kpxe/resources/nfpm.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
# nfpm.yaml
|
||||
|
||||
name: unkin-undionly-kpxe
|
||||
version: ${PACKAGE_VERSION}
|
||||
release: ${PACKAGE_RELEASE}
|
||||
arch: amd64
|
||||
platform: linux
|
||||
section: default
|
||||
priority: extra
|
||||
description: "iPXE network bootloader"
|
||||
maintainer: iPXE
|
||||
homepage: https://github.com/ipxe/ipxe
|
||||
license: GPL-2.0 license
|
||||
|
||||
disable_globbing: false
|
||||
|
||||
replaces:
|
||||
- unkin-undionly-kpxe
|
||||
|
||||
provides:
|
||||
- undionly.kpxe
|
||||
- ipxe.efi
|
||||
|
||||
# Files to include in the package
|
||||
contents:
|
||||
- src: /app/ipxe.efi
|
||||
dst: /var/lib/tftpboot/ipxe.efi
|
||||
file_info:
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
- src: /app/undionly.kpxe
|
||||
dst: /var/lib/tftpboot/undionly.kpxe
|
||||
file_info:
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
# Scripts to run during installation/removal (optional)
|
||||
scripts:
|
||||
preinstall: /app/resources/preinstall.sh
|
||||
# postinstall: ./scripts/postinstall.sh
|
||||
# preremove: ./scripts/preremove.sh
|
||||
# postremove: ./scripts/postremove.sh
|
||||
2
rpms/unkin-undionly-kpxe/resources/preinstall.sh
Executable file
2
rpms/unkin-undionly-kpxe/resources/preinstall.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/bash
|
||||
mkdir -p /var/lib/tftpboot
|
||||
Loading…
Reference in New Issue
Block a user