%define formats rom # ne is only for backwards compat with older versions of qemu %define qemuroms rtl8029 ne e1000-0x100e pcnet32 rtl8139 virtio-net %define buildarches x86_64 # debugging firmwares does not goes the same way as a normal program. # moreover, all architectures providing debuginfo for a single noarch # package is currently clashing in koji, so don't bother. %global debug_package %{nil} %define pkgrelease 6.16 Name: gpxe Version: 0.9.7 Release: %{pkgrelease}%{?dist} Summary: A network boot loader Group: System Environment/Base License: GPLv2 and BSD URL: http://etherboot.org/ Source0: http://git.etherboot.org/releases/%{name}/%{name}-%{version}.tar.bz2 Source1: USAGE # For bz#579964 - Keyboard cannot be used during pxe boot when using one kind of pxe server Patch1: gpxe-Don-t-use-lret-2-to-return-from-an-interrupt.patch # For bz#672529 - VMs with virtIO NIC can't access the PXE server Patch2: gpxe-virtio-avoid-padding-for-len-64.patch # For bz#661840 - undi polling fix for Emulex NICs # For bz#668005 - [RFE] gpxe should support polling NICs Patch3: gpxe-Support-underlying-UNDI-devices-that-don-t-support-i.patch # For bz#661840 - undi polling fix for Emulex NICs Patch4: gpxe-Revert-Support-underlying-UNDI-devices-that-don-t-su.patch # For bz#661840 - undi polling fix for Emulex NICs Patch5: gpxe-Add-SUPPORTED_-constants-to-pxe_api.h.patch # For bz#661840 - undi polling fix for Emulex NICs Patch6: gpxe-Support-underlying-UNDI-devices-that-don-t-support-i-reapply.patch # For bz#743893 - Failed to PXE boot when using Virtio Patch7: gpxe-Replace-virtio-net-with-native-gPXE-driver.patch # For bz#743893 - Failed to PXE boot when using Virtio Patch8: gpxe-Fix-DEBUG-builds-for-filenames-with-hyphens.patch # For bz#972671 - pxe boot fails if next-server details come from a different dhcp server Patch9: gpxe-Provide-fetch_setting_origin.patch # For bz#972671 - pxe boot fails if next-server details come from a different dhcp server Patch10: gpxe-Use-next-server-from-filename-s-settings-block.patch # For bz#1105189 - HTTP request generated by gPXE has wrong TCP flag (SYN & PSH) in first packet in session Patch11: gpxe-Avoid-setting-PSH-flag-when-SYN-flag-is-set.patch # For bz#1105189 - HTTP request generated by gPXE has wrong TCP flag (SYN & PSH) in first packet in session Patch12: gpxe-Set-PSH-flag-only-on-packets-containing-data.patch # For bz#1057249 - NIC boot order use device PCI address order instead of device boot order Patch13: gpxe-Add-init_pci_busdevfn.patch # For bz#1057249 - NIC boot order use device PCI address order instead of device boot order Patch14: gpxe-Enable-infrastructure-to-specify-an-autoboot-device-lo.patch # For bz#1057249 - NIC boot order use device PCI address order instead of device boot order Patch15: gpxe-Allow-prefix-to-specify-a-PCI-autoboot-device-location.patch # For bz#1057249 - NIC boot order use device PCI address order instead of device boot order Patch16: gpxe-Store-boot-bus-dev.fn-address-as-autoboot-device-locat.patch # For bz#1057249 - NIC boot order use device PCI address order instead of device boot order Patch17: gpxe-Ignore-PCI-autoboot-device-location-if-set-to-00-00.0.patch # For bz#968474 - [RFE] option to increase gpxe retry timeout Patch18: gpxe-Add-support-for-local-configuration-files.patch # For bz#968474 - [RFE] option to increase gpxe retry timeout Patch19: gpxe-Extract-timing-parameters-out-to-config-dhcp.h.patch # For bz#968474 - [RFE] option to increase gpxe retry timeout Patch20: gpxe-Use-spec-compliant-timeouts.patch # For bz#1206042 - Connection time out when install vm through network Patch21: gpxe-Fix-timeouts.patch # For bz#1231931 - gPXE 'Host' header being transferred without port Patch22: gpxe-Include-port-in-HTTP-Host-header-as-needed.patch # For bz#1354521 - Properly Handle 8021.Q VID 0 Frames, as new vlan model in linux kernel does. Patch23: gpxe-netdevice-Strip-802.1Q-VLAN-0-priority-tags.patch # For bz#1380215 - gPXE gets stuck if it receives fragmented IP multicast packets Patch24: gpxe-Fix-fragment-reassembly.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) ExclusiveArch: %{buildarches} %ifarch %{buildarches} BuildRequires: perl syslinux mtools mkisofs %package bootimgs Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats Group: Development/Tools BuildArch: noarch %package roms Summary: Network boot loader roms in .rom format Group: Development/Tools Requires: %{name}-roms-qemu = %{version}-%{release} BuildArch: noarch %package roms-qemu Summary: Network boot loader roms supported by QEMU, .rom format Group: Development/Tools BuildArch: noarch %description bootimgs gPXE is an open source 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 gPXE boot images in USB, CD, floppy, and PXE UNDI formats. %description roms gPXE is an open source 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 gPXE roms in .rom format. %description roms-qemu gPXE is an open source 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 gPXE ROMs for devices emulated by QEMU, in .rom format. %endif %description gPXE is an open source network bootloader. It provides a direct replacement for proprietary PXE ROMs, with many extra features such as DNS, HTTP, iSCSI, etc. %prep %setup -q %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 %patch23 -p1 %patch24 -p1 cp -a %{SOURCE1} . %build %ifarch %{buildarches} # Fedora 10 and newer, location is in /usr/share. Older is in /usr/lib. ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin [ -e /usr/lib/syslinux/isolinux.bin ] && ISOLINUX_BIN=/usr/lib/syslinux/isolinux.bin cd src make %{?_smp_mflags} ISOLINUX_BIN=${ISOLINUX_BIN} make %{?_smp_mflags} bin/gpxe.lkrn # The bnx2 firmware is too large to fit into an option ROM. rm drivers/net/bnx2*.[ch] make %{?_smp_mflags} allroms %endif %install rm -rf $RPM_BUILD_ROOT %ifarch %{buildarches} mkdir -p %{buildroot}/%{_datadir}/%{name}/ pushd src/bin/ cp -a undionly.kpxe gpxe.{iso,usb,dsk,lkrn} %{buildroot}/%{_datadir}/%{name}/ for fmt in %{formats};do for img in *.${fmt};do if [ -e $img ]; then cp -a $img %{buildroot}/%{_datadir}/%{name}/ echo %{_datadir}/%{name}/$img >> ../../${fmt}.list fi done done popd # the roms supported by qemu will be packaged separatedly # remove from the main rom list and add them to qemu.list for fmt in rom ;do for rom in %{qemuroms} ; do sed -i -e "/\/${rom}.${fmt}/d" ${fmt}.list echo %{_datadir}/%{name}/${rom}.${fmt} >> qemu.${fmt}.list done done %endif %clean rm -rf $RPM_BUILD_ROOT %ifarch %{buildarches} %files bootimgs %defattr(-,root,root,-) %dir %{_datadir}/%{name} %{_datadir}/%{name}/gpxe.iso %{_datadir}/%{name}/gpxe.usb %{_datadir}/%{name}/gpxe.dsk %{_datadir}/%{name}/gpxe.lkrn %{_datadir}/%{name}/undionly.kpxe %doc COPYING COPYRIGHTS USAGE %files roms -f rom.list %defattr(-,root,root,-) %dir %{_datadir}/%{name} %doc COPYING COPYRIGHTS %files roms-qemu -f qemu.rom.list %defattr(-,root,root,-) %dir %{_datadir}/%{name} %doc COPYING COPYRIGHTS %endif %changelog * Thu Oct 27 2016 Yash Mankad - 0.9.7-6.16.el6 - gpxe-netdevice-Strip-802.1Q-VLAN-0-priority-tags.patch [bz#1354521] - gpxe-Fix-fragment-reassembly.patch [bz#1380215] - Resolves: bz#1354521 (Properly Handle 8021.Q VID 0 Frames, as new vlan model in linux kernel does.) - Resolves: bz#1380215 (gPXE gets stuck if it receives fragmented IP multicast packets) * Mon Dec 07 2015 Jeff E. Nelson - 0.9.7-6.15.el6 - gpxe-Include-port-in-HTTP-Host-header-as-needed.patch [bz#1231931] - Resolves: bz#1231931 (gPXE 'Host' header being transferred without port) * Thu Apr 02 2015 Miroslav Rezanina - 0.9.7-6.14.el6 - gpxe-Fix-timeouts.patch [bz#1206042] - Resolves: bz#1206042 (Connection time out when install vm through network) * Thu Feb 26 2015 Jeff E. Nelson - 0.9.7-6.13.el6 - gpxe-Add-support-for-local-configuration-files.patch [bz#968474] - gpxe-Extract-timing-parameters-out-to-config-dhcp.h.patch [bz#968474] - gpxe-Use-spec-compliant-timeouts.patch [bz#968474] - Resolves: bz#968474 ([RFE] option to increase gpxe retry timeout) * Fri Aug 01 2014 Jeff E. Nelson - gpxe-0.9.7-6.12.el6 - gpxe-Add-init_pci_busdevfn.patch [bz#1057249] - gpxe-Enable-infrastructure-to-specify-an-autoboot-device-lo.patch [bz#1057249] - gpxe-Allow-prefix-to-specify-a-PCI-autoboot-device-location.patch [bz#1057249] - gpxe-Store-boot-bus-dev.fn-address-as-autoboot-device-locat.patch [bz#1057249] - gpxe-Ignore-PCI-autoboot-device-location-if-set-to-00-00.0.patch [bz#1057249] - Resolves: bz#1057249 (NIC boot order use device PCI address order instead of device boot order) * Thu Jun 19 2014 Jeff E. Nelson - 0.9.7-6.11.el6 - gpxe-Avoid-setting-PSH-flag-when-SYN-flag-is-set.patch [bz#1105189] - gpxe-Set-PSH-flag-only-on-packets-containing-data.patch [bz#1105189] - Resolves: bz#1105189 (HTTP request generated by gPXE has wrong TCP flag (SYN & PSH) in first packet in session) * Thu Jul 25 2013 Michal Novotny - gpxe-0.9.7-6.10.el6 - gpxe-Provide-fetch_setting_origin.patch [bz#972671] - gpxe-Use-next-server-from-filename-s-settings-block.patch [bz#972671] - Resolves: bz#972671 (pxe boot fails if next-server details come from a different dhcp server) * Tue Oct 18 2011 Michal Novotny - gpxe-0.9.7-6.8.el6 - gpxe-Replace-virtio-net-with-native-gPXE-driver.patch [bz#743893] - gpxe-Fix-DEBUG-builds-for-filenames-with-hyphens.patch [bz#743893] - Resolves: bz#743893 (Failed to PXE boot when using Virtio) * Thu Feb 17 2011 Eduardo Habkost - gpxe-0.9.7-6.7.el6 - gpxe-Add-SUPPORTED_-constants-to-pxe_api.h.patch [bz#661840] - gpxe-Support-underlying-UNDI-devices-that-don-t-support-i-reapply.patch [bz#661840] - Resolves: bz#661840 (undi polling fix for Emulex NICs) * Wed Feb 16 2011 Eduardo Habkost - gpxe-0.9.7-6.6.el6 - gpxe-Revert-Support-underlying-UNDI-devices-that-don-t-su.patch [bz#661840] (patch is broken) - Related: bz#661840 (undi polling fix for Emulex NICs) * Wed Feb 16 2011 Eduardo Habkost - gpxe-0.9.7-6.5.el6 - gpxe-Support-underlying-UNDI-devices-that-don-t-support-i.patch [bz#661840 bz#668005] - Resolves: bz#661840 (undi polling fix for Emulex NICs) - Resolves: bz#668005 ([RFE] gpxe should support polling NICs) * Thu Jan 27 2011 Luiz Capitulino - gpxe-0.9.7-6.4.el6 - gpxe-virtio-avoid-padding-for-len-64.patch [bz#672529] - Resolves: bz#672529 (VMs with virtIO NIC can't access the PXE server) * Mon Apr 26 2010 Eduardo Habkost - gpxe-0.9.7-6.3.el6 - gpxe-Don-t-use-lret-2-to-return-from-an-interrupt.patch [bz#579964] - Resolves: bz#579964 (Keyboard cannot be used during pxe boot when using one kind of pxe server) * Wed Jan 13 2010 Eduardo Habkost - gpxe-0.9.7-6.2.el6 - Build only on x86_64 - Resolves: bz#554863 (gpxe should not be shipped on i686/ppc64/s390x, only on x86_64) * Mon Nov 30 2009 Dennis Gregorovic - 0.9.7-6.1 - Rebuilt for RHEL 6 * Mon Oct 5 2009 Matt Domsch - 0.9.7-6 - move rtl8029 from -roms to -roms-qemu for qemu ne2k_pci NIC (BZ 526776) * Fri Jul 24 2009 Fedora Release Engineering - 0.9.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue May 19 2009 Matt Domsch - 0.9.7-4 - add undionly.kpxe to -bootimgs * Tue May 12 2009 Matt Domsch - 0.9.7-3 - handle isolinux changing paths * Sat May 9 2009 Matt Domsch - 0.9.7-2 - add dist tag * Thu Mar 26 2009 Matt Domsch - 0.9.7-1 - Initial release based on etherboot spec