- 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
179 lines
5.1 KiB
RPMSpec
179 lines
5.1 KiB
RPMSpec
#
|
|
# spec file for package ipxe
|
|
#
|
|
# 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
|
|
%define buildtargets sdsk,dsk,iso,usb,lkrn
|
|
%define do_floppy 1
|
|
%endif
|
|
|
|
Name: ipxe
|
|
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
|
|
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
|
|
%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
|
|
|
|
%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}
|
|
%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}}
|
|
%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
|