Files
ipxe/ipxe.spec

179 lines
5.1 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package ipxe
#
Accepting request 1163847 from home:firstyear:branches:network - Remove 1082.patch which has an alternative merged upstream - Update to version 1.21.1+git20240329.764e34f: * [http] Add error table entry for HTTP 404 Not Found error * [tftp] Add error table entry for TFTP "file not found" error code * [efi] Add error table entry for local filesystem EFI_NOT_FOUND error * [efi] Report local file errors during download, rather than on opening * [image] Allow opaque URI component to provide image name * [build] Fix build failures with random versions of gcc * [efi] Extract basic network settings from loaded image device path * [efi] Add efi_path_mac() to parse a MAC address from an EFI device path * [efi] Add support for driving EFI_MANAGED_NETWORK_PROTOCOL devices * [efi] Allow for drivers to be located via child handles * [efi] Add helper functions for service binding protocols * [efi] Match chainloaded device by uppermost matching handle * [efi] Set current working URI from our own device path URI, if present * [efi] Add efi_path_uri() to parse a URI from an EFI device path * [settings] Expose current working URI and directory URI via settings * [efi] Pad transmit buffer length to work around vendor driver bugs * [golan] Use ETH_HLEN for inline header size * [build] Fix building on older versions of gcc * [snp] Allocate additional padding for receive buffers * [ucode] Add support for updating x86 microcode * [bios] Provide a multiprocessor API for BIOS * [librm] Add support for installing a startup IPI handler * [efi] Provide a multiprocessor API for EFI * [mp] Define an API for multiprocessor functions * [efi] Update to current EDK2 headers * [ci] Update action versions to silence GitHub warnings * [efi] Do not report return status from efi_block_local() * [block] Allow SAN boot device to be identified by filesystem label OBS-URL: https://build.opensuse.org/request/show/1163847 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=58
2024-04-01 06:34:54 +00:00
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%ifnarch %{ix86} x86_64
%define buildtargets dsk,usb,lkrn
%else
Accepting request 1118981 from home:michals - Add floppy disk image. * use syslinux-mtools for building the image syslinux-mtools.patch - Update to version 1.21.1+git20231006.ff0f8604: * [libc] Use wall clock time as seed for the (non-cryptographic) RNG * [eapol] Send EAPoL-Start packets to trigger EAP authentication * [eap] Define a supplicant model for EAP and EAPoL * [dhcp] Request NTP server option * [ntp] Define NTP server setting * [efi] Provide read-only access to EFI variables via settings mechanism * [crypto] Add support for PKCS#8 private key format * [efi] Add support for executing images via a shim * [image] Generalise concept of selected image * [tls] Handle fragmented handshake records (jsc#PED-5536) * [params] Allow for arbitrary HTTP request headers to be specified * [rng] Allow entropy source to be selected at runtime * [efi] Support the initrd autodetection mechanism in newer Linux kernels * [loong64] Add initial support for LoongArch64 * [efi] Enable NET_PROTO_LLDP by default * [dhcp] Ignore DHCPNAK unless originating from the selected DHCP server * [xen] Update to current Xen headers * [efi] Allow autoexec script to be located alongside iPXE binary * [efi] Accept a command line passed to an iPXE image via LoadOptions * [efi] Update to current EDK2 headers * [golan] Add new PCI ID for NVIDIA BlueField-3 network device * [arm] Support building as a Linux userspace binary for AArch64 OBS-URL: https://build.opensuse.org/request/show/1118981 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=52
2023-10-25 12:36:08 +00:00
%define buildtargets sdsk,dsk,iso,usb,lkrn
%define do_floppy 1
%endif
Name: ipxe
Accepting request 1163847 from home:firstyear:branches:network - Remove 1082.patch which has an alternative merged upstream - Update to version 1.21.1+git20240329.764e34f: * [http] Add error table entry for HTTP 404 Not Found error * [tftp] Add error table entry for TFTP "file not found" error code * [efi] Add error table entry for local filesystem EFI_NOT_FOUND error * [efi] Report local file errors during download, rather than on opening * [image] Allow opaque URI component to provide image name * [build] Fix build failures with random versions of gcc * [efi] Extract basic network settings from loaded image device path * [efi] Add efi_path_mac() to parse a MAC address from an EFI device path * [efi] Add support for driving EFI_MANAGED_NETWORK_PROTOCOL devices * [efi] Allow for drivers to be located via child handles * [efi] Add helper functions for service binding protocols * [efi] Match chainloaded device by uppermost matching handle * [efi] Set current working URI from our own device path URI, if present * [efi] Add efi_path_uri() to parse a URI from an EFI device path * [settings] Expose current working URI and directory URI via settings * [efi] Pad transmit buffer length to work around vendor driver bugs * [golan] Use ETH_HLEN for inline header size * [build] Fix building on older versions of gcc * [snp] Allocate additional padding for receive buffers * [ucode] Add support for updating x86 microcode * [bios] Provide a multiprocessor API for BIOS * [librm] Add support for installing a startup IPI handler * [efi] Provide a multiprocessor API for EFI * [mp] Define an API for multiprocessor functions * [efi] Update to current EDK2 headers * [ci] Update action versions to silence GitHub warnings * [efi] Do not report return status from efi_block_local() * [block] Allow SAN boot device to be identified by filesystem label OBS-URL: https://build.opensuse.org/request/show/1163847 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=58
2024-04-01 06:34:54 +00:00
Version: 1.21.1+git20240329.764e34f
Release: 0
Summary: A Network Boot Firmware
License: GPL-2.0-only
Group: System/Boot
URL: https://ipxe.org/
Source: %{name}-%{version}.tar.xz
Patch0: syslinux-mtools.patch
BuildRequires: binutils-devel
# Do not build i586 for Leap/SLE: no such port available
%ifarch i586
%if 0%{?sle_version}
%define no_aarch64_cc 1
%endif
%endif
%ifnarch %{ix86} x86_64
%if 0%{?sle_version} >= 150000 && 0%{?sle_version} < 159999
BuildRequires: cross-x86_64-gcc7
%else
BuildRequires: cross-x86_64-gcc%{gcc_version}
%endif
%endif
%if !0%{?no_aarch64_cc}
%ifnarch aarch64
%if 0%{?sle_version} >= 150000 && 0%{?sle_version} < 159999
BuildRequires: cross-aarch64-gcc7
%else
BuildRequires: cross-aarch64-gcc%{gcc_version}
%endif
%endif
%endif
BuildRequires: perl
%ifarch %{ix86} x86_64
Accepting request 1118981 from home:michals - Add floppy disk image. * use syslinux-mtools for building the image syslinux-mtools.patch - Update to version 1.21.1+git20231006.ff0f8604: * [libc] Use wall clock time as seed for the (non-cryptographic) RNG * [eapol] Send EAPoL-Start packets to trigger EAP authentication * [eap] Define a supplicant model for EAP and EAPoL * [dhcp] Request NTP server option * [ntp] Define NTP server setting * [efi] Provide read-only access to EFI variables via settings mechanism * [crypto] Add support for PKCS#8 private key format * [efi] Add support for executing images via a shim * [image] Generalise concept of selected image * [tls] Handle fragmented handshake records (jsc#PED-5536) * [params] Allow for arbitrary HTTP request headers to be specified * [rng] Allow entropy source to be selected at runtime * [efi] Support the initrd autodetection mechanism in newer Linux kernels * [loong64] Add initial support for LoongArch64 * [efi] Enable NET_PROTO_LLDP by default * [dhcp] Ignore DHCPNAK unless originating from the selected DHCP server * [xen] Update to current Xen headers * [efi] Allow autoexec script to be located alongside iPXE binary * [efi] Accept a command line passed to an iPXE image via LoadOptions * [efi] Update to current EDK2 headers * [golan] Add new PCI ID for NVIDIA BlueField-3 network device * [arm] Support building as a Linux userspace binary for AArch64 OBS-URL: https://build.opensuse.org/request/show/1118981 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=52
2023-10-25 12:36:08 +00:00
BuildRequires: mtools
BuildRequires: syslinux
BuildRequires: xorriso
%endif
BuildRequires: xz-devel
# Does not build on bigendian
ExcludeArch: s390 s390x ppc ppc64
# ix86 does not have a cross-x86_64 gcc available so it can't build
# the x86_64 ipxe code. As a result of which, the support for ix86
# is more limited.
%description
iPXE is a network bootloader. It provides a direct
replacement for proprietary PXE ROMs, with many extra features such as
DNS, HTTP, iSCSI, etc.
%package bootimgs
Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats
Group: Development/Tools/Other
%description bootimgs
iPXE is a network bootloader. It provides a direct
replacement for proprietary PXE ROMs, with many extra features such as
DNS, HTTP, iSCSI, etc.
This package contains the iPXE boot images in USB, CD, floppy, and PXE
UNDI formats. EFI is supported, too.
%prep
Accepting request 1118981 from home:michals - Add floppy disk image. * use syslinux-mtools for building the image syslinux-mtools.patch - Update to version 1.21.1+git20231006.ff0f8604: * [libc] Use wall clock time as seed for the (non-cryptographic) RNG * [eapol] Send EAPoL-Start packets to trigger EAP authentication * [eap] Define a supplicant model for EAP and EAPoL * [dhcp] Request NTP server option * [ntp] Define NTP server setting * [efi] Provide read-only access to EFI variables via settings mechanism * [crypto] Add support for PKCS#8 private key format * [efi] Add support for executing images via a shim * [image] Generalise concept of selected image * [tls] Handle fragmented handshake records (jsc#PED-5536) * [params] Allow for arbitrary HTTP request headers to be specified * [rng] Allow entropy source to be selected at runtime * [efi] Support the initrd autodetection mechanism in newer Linux kernels * [loong64] Add initial support for LoongArch64 * [efi] Enable NET_PROTO_LLDP by default * [dhcp] Ignore DHCPNAK unless originating from the selected DHCP server * [xen] Update to current Xen headers * [efi] Allow autoexec script to be located alongside iPXE binary * [efi] Accept a command line passed to an iPXE image via LoadOptions * [efi] Update to current EDK2 headers * [golan] Add new PCI ID for NVIDIA BlueField-3 network device * [arm] Support building as a Linux userspace binary for AArch64 OBS-URL: https://build.opensuse.org/request/show/1118981 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=52
2023-10-25 12:36:08 +00:00
%autosetup -p1
cd src
# enable compressed images
sed -i.bak \
-e 's,//\(#define.*IMAGE_ZLIB.*\),\1,' \
-e 's,//\(#define.*IMAGE_GZIP.*\),\1,' \
config/general.h
# enable HTTPS downloads
sed -i.bak \
-e 's,#undef\(.*DOWNLOAD_PROTO_HTTPS.*\),#define\1,' \
config/general.h
Accepting request 1118981 from home:michals - Add floppy disk image. * use syslinux-mtools for building the image syslinux-mtools.patch - Update to version 1.21.1+git20231006.ff0f8604: * [libc] Use wall clock time as seed for the (non-cryptographic) RNG * [eapol] Send EAPoL-Start packets to trigger EAP authentication * [eap] Define a supplicant model for EAP and EAPoL * [dhcp] Request NTP server option * [ntp] Define NTP server setting * [efi] Provide read-only access to EFI variables via settings mechanism * [crypto] Add support for PKCS#8 private key format * [efi] Add support for executing images via a shim * [image] Generalise concept of selected image * [tls] Handle fragmented handshake records (jsc#PED-5536) * [params] Allow for arbitrary HTTP request headers to be specified * [rng] Allow entropy source to be selected at runtime * [efi] Support the initrd autodetection mechanism in newer Linux kernels * [loong64] Add initial support for LoongArch64 * [efi] Enable NET_PROTO_LLDP by default * [dhcp] Ignore DHCPNAK unless originating from the selected DHCP server * [xen] Update to current Xen headers * [efi] Allow autoexec script to be located alongside iPXE binary * [efi] Accept a command line passed to an iPXE image via LoadOptions * [efi] Update to current EDK2 headers * [golan] Add new PCI ID for NVIDIA BlueField-3 network device * [arm] Support building as a Linux userspace binary for AArch64 OBS-URL: https://build.opensuse.org/request/show/1118981 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=52
2023-10-25 12:36:08 +00:00
%build
cd src
make_ipxe() {
# https://github.com/ipxe/ipxe/issues/620
[ `gcc -dumpversion` -ge 12 ] && TAG="NO_WERROR=1" || TAG=""
make -O %{?_smp_mflags} V=1 \
VERSION=%{version} $TAG "$@"
}
%ifarch %{ix86} x86_64
make_ipxe bin-i386-efi/ipxe.efi
make_ipxe bin-i386-efi/snp.efi
%else
make_ipxe CROSS="x86_64-suse-linux-" bin-i386-efi/ipxe.efi
make_ipxe CROSS="x86_64-suse-linux-" bin-i386-efi/snp.efi
%endif
%ifarch x86_64
make_ipxe bin-x86_64-efi/ipxe.efi
make_ipxe bin-x86_64-efi/snp.efi
%else
# ix86 can't cross-compile
%ifnarch %{ix86}
make_ipxe CROSS="x86_64-suse-linux-" bin-x86_64-efi/ipxe.efi
make_ipxe CROSS="x86_64-suse-linux-" bin-x86_64-efi/snp.efi
%endif
%endif # x86_64
%ifarch aarch64
make_ipxe bin-arm64-efi/snp.efi
%else
%{!?no_aarch64_cc:make_ipxe CROSS="aarch64-suse-linux-" bin-arm64-efi/snp.efi}
%endif
make_ipxe \
%ifnarch %{ix86} x86_64
CROSS="x86_64-suse-linux-" \
%endif
bin/undionly.kpxe bin/ipxe.{%{buildtargets}}
%install
mkdir -p %{buildroot}/%{_datadir}/%{name}/
mkdir -p %{buildroot}/%{_datadir}/%{name}.efi/
install -D -m0644 src/bin/undionly.kpxe %{buildroot}/%{_datadir}/%{name}/
install -D -m0644 src/bin/ipxe.{%{buildtargets}} %{buildroot}/%{_datadir}/%{name}/
install -D -m0644 src/bin-i386-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/ipxe-i386.efi
install -D -m0644 src/bin-i386-efi/snp.efi %{buildroot}/%{_datadir}/%{name}/snp-i386.efi
%ifnarch %{ix86}
install -D -m0644 src/bin-x86_64-efi/ipxe.efi %{buildroot}/%{_datadir}/%{name}/ipxe-x86_64.efi
install -D -m0644 src/bin-x86_64-efi/snp.efi %{buildroot}/%{_datadir}/%{name}/snp-x86_64.efi
%endif
%{!?no_aarch64_cc:install -D -m0644 src/bin-arm64-efi/snp.efi %{buildroot}/%{_datadir}/%{name}/snp-arm64.efi}
Accepting request 1118981 from home:michals - Add floppy disk image. * use syslinux-mtools for building the image syslinux-mtools.patch - Update to version 1.21.1+git20231006.ff0f8604: * [libc] Use wall clock time as seed for the (non-cryptographic) RNG * [eapol] Send EAPoL-Start packets to trigger EAP authentication * [eap] Define a supplicant model for EAP and EAPoL * [dhcp] Request NTP server option * [ntp] Define NTP server setting * [efi] Provide read-only access to EFI variables via settings mechanism * [crypto] Add support for PKCS#8 private key format * [efi] Add support for executing images via a shim * [image] Generalise concept of selected image * [tls] Handle fragmented handshake records (jsc#PED-5536) * [params] Allow for arbitrary HTTP request headers to be specified * [rng] Allow entropy source to be selected at runtime * [efi] Support the initrd autodetection mechanism in newer Linux kernels * [loong64] Add initial support for LoongArch64 * [efi] Enable NET_PROTO_LLDP by default * [dhcp] Ignore DHCPNAK unless originating from the selected DHCP server * [xen] Update to current Xen headers * [efi] Allow autoexec script to be located alongside iPXE binary * [efi] Accept a command line passed to an iPXE image via LoadOptions * [efi] Update to current EDK2 headers * [golan] Add new PCI ID for NVIDIA BlueField-3 network device * [arm] Support building as a Linux userspace binary for AArch64 OBS-URL: https://build.opensuse.org/request/show/1118981 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=52
2023-10-25 12:36:08 +00:00
%if 0%{?do_floppy}
ln -s ipxe.sdsk %{buildroot}/%{_datadir}/%{name}/floppy.img
%endif
%files bootimgs
%defattr(-,root,root)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/ipxe.{%{buildtargets}}
Accepting request 1118981 from home:michals - Add floppy disk image. * use syslinux-mtools for building the image syslinux-mtools.patch - Update to version 1.21.1+git20231006.ff0f8604: * [libc] Use wall clock time as seed for the (non-cryptographic) RNG * [eapol] Send EAPoL-Start packets to trigger EAP authentication * [eap] Define a supplicant model for EAP and EAPoL * [dhcp] Request NTP server option * [ntp] Define NTP server setting * [efi] Provide read-only access to EFI variables via settings mechanism * [crypto] Add support for PKCS#8 private key format * [efi] Add support for executing images via a shim * [image] Generalise concept of selected image * [tls] Handle fragmented handshake records (jsc#PED-5536) * [params] Allow for arbitrary HTTP request headers to be specified * [rng] Allow entropy source to be selected at runtime * [efi] Support the initrd autodetection mechanism in newer Linux kernels * [loong64] Add initial support for LoongArch64 * [efi] Enable NET_PROTO_LLDP by default * [dhcp] Ignore DHCPNAK unless originating from the selected DHCP server * [xen] Update to current Xen headers * [efi] Allow autoexec script to be located alongside iPXE binary * [efi] Accept a command line passed to an iPXE image via LoadOptions * [efi] Update to current EDK2 headers * [golan] Add new PCI ID for NVIDIA BlueField-3 network device * [arm] Support building as a Linux userspace binary for AArch64 OBS-URL: https://build.opensuse.org/request/show/1118981 OBS-URL: https://build.opensuse.org/package/show/network/ipxe?expand=0&rev=52
2023-10-25 12:36:08 +00:00
%if 0%{?do_floppy}
%{_datadir}/%{name}/floppy.img
%endif
%{_datadir}/%{name}/ipxe-i386.efi
%{_datadir}/%{name}/snp-i386.efi
%ifnarch %{ix86}
%{_datadir}/%{name}/ipxe-x86_64.efi
%{_datadir}/%{name}/snp-x86_64.efi
%endif
%{!?no_aarch64_cc:%{_datadir}/%{name}/snp-arm64.efi}
%{_datadir}/%{name}/undionly.kpxe
%license COPYING COPYING.GPLv2 COPYING.UBDL
%changelog