Blame SPECS/ipxe.spec

562251
562251
# Resulting binary formats we want from iPXE
562251
%global formats rom
562251
562251
# PCI IDs (vendor,product) of the ROMS we want for QEMU
562251
#
562251
#    pcnet32: 0x1022 0x2000
562251
#   ne2k_pci: 0x10ec 0x8029
562251
#      e1000: 0x8086 0x100e
562251
#    rtl8139: 0x10ec 0x8139
562251
# virtio-net: 0x1af4 0x1000
562251
%global qemuroms 10222000 10ec8029 8086100e 10ec8139 1af41000
562251
562251
# We only build the ROMs if on an x86 build host. The resulting
562251
# binary RPM will be noarch, so other archs will still be able
562251
# to use the binary ROMs.
562251
#
562251
# We do cross-compilation for 32->64-bit, but not for other arches
562251
# because EDK II does not support big-endian hosts.
57753c
%global buildarches x86_64
562251
562251
# debugging firmwares does not goes the same way as a normal program.
562251
# moreover, all architectures providing debuginfo for a single noarch
562251
# package is currently clashing in koji, so don't bother.
562251
%global debug_package %{nil}
562251
562251
# Upstream don't do "releases" :-( So we're going to use the date
562251
# as the version, and a GIT hash as the release. Generate new GIT
562251
# snapshots using the folowing commands:
562251
#
562251
# $ hash=`git log -1 --format='%h'`
562251
# $ date=`date '+%Y%m%d'`
562251
# $ git archive --output ipxe-${date}-git${hash}.tar.gz --prefix ipxe-${date}-git${hash}/ ${hash}
562251
#
562251
# And then change these two:
562251
562251
%global date 20130517
562251
%global hash c4bce43
562251
562251
Name:    ipxe
562251
Version: %{date}
c81224
Release: 8.git%{hash}%{?dist}.1
562251
Summary: A network boot loader
562251
562251
Group:   System Environment/Base
562251
License: GPLv2 and BSD
562251
URL:     http://ipxe.org/
562251
562251
Source0: %{name}-%{version}-git%{hash}.tar.gz
562251
Source1: USAGE
562251
# Remove 2 second startup wait. This patch is not intended to
562251
# go upstream. Modifying the general config header file is the
562251
# intended means for downstream customization.
562251
Patch1: %{name}-banner-timeout.patch
562251
# GCC >= 4.8 doesn't like the use of 'ebp' in asm
562251
# https://bugzilla.redhat.com/show_bug.cgi?id=914091
562251
Patch2: %{name}-asm.patch
57753c
# For bz#1062644 - pxe boot fails if next-server details come from a different dhcp server
57753c
Patch3: ipxe-Use-next-server-from-filename-s-settings-block.patch
57753c
# For bz#1031518 - iPXE does not honor specified boot device
57753c
Patch4: ipxe-Enable-infrastructure-to-specify-an-autoboot-device-.patch
57753c
# For bz#1031518 - iPXE does not honor specified boot device
57753c
Patch5: ipxe-Allow-prefix-to-specify-a-PCI-autoboot-device-locati.patch
57753c
# For bz#1031518 - iPXE does not honor specified boot device
57753c
Patch6: ipxe-Store-boot-bus-dev.fn-address-as-autoboot-device-loc.patch
57753c
# For bz#1031518 - iPXE does not honor specified boot device
57753c
Patch7: ipxe-Ignore-PCI-autoboot-device-location-if-set-to-00-00..patch
57753c
# For bz#857123 - Guests never get an iPXE prompt
57753c
Patch8: ipxe-Revert-Remove-2-second-startup-wait.patch
57753c
# For bz#857123 - Guests never get an iPXE prompt
57753c
Patch9: ipxe-Allow-ROM-banner-timeout-to-be-configured-independen.patch
57753c
# For bz#857123 - Guests never get an iPXE prompt
57753c
Patch10: ipxe-Customize-ROM-banner-timeout.patch
2e8da4
# For bz#1084561 - RFE: ship UEFI drivers for ipxe in RHEL-7.y
2e8da4
Patch11: ipxe-import-EfiRom-from-edk2-BaseTools-RHEL-only.patch
2e8da4
# For bz#1084561 - RFE: ship UEFI drivers for ipxe in RHEL-7.y
2e8da4
Patch12: ipxe-add-custom-Makefile-for-EfiRom-RHEL-only.patch
e55ecc
# For bz#1196352 - [RFE] option to increase gpxe retry timeout
e55ecc
Patch13: ipxe-Extract-timing-parameters-out-to-config-dhcp.h.patch
e55ecc
# For bz#1196352 - [RFE] option to increase gpxe retry timeout
e55ecc
Patch14: ipxe-Use-spec-compliant-timeouts.patch
562251
562251
%ifarch %{buildarches}
562251
BuildRequires: perl
562251
BuildRequires: syslinux
562251
BuildRequires: mtools
562251
BuildRequires: mkisofs
2e8da4
BuildRequires: binutils-devel
562251
562251
Obsoletes: gpxe <= 1.0.1
562251
562251
%package bootimgs
562251
Summary: Network boot loader images in bootable USB, CD, floppy and GRUB formats
562251
Group:   Development/Tools
562251
BuildArch: noarch
562251
Obsoletes: gpxe-bootimgs <= 1.0.1
562251
562251
%package roms
562251
Summary: Network boot loader roms in .rom format
562251
Group:  Development/Tools
562251
Requires: %{name}-roms-qemu = %{version}-%{release}
562251
BuildArch: noarch
562251
Obsoletes: gpxe-roms <= 1.0.1
562251
562251
%package roms-qemu
562251
Summary: Network boot loader roms supported by QEMU, .rom format
562251
Group:  Development/Tools
562251
BuildArch: noarch
562251
Obsoletes: gpxe-roms-qemu <= 1.0.1
562251
562251
%description bootimgs
562251
iPXE is an open source network bootloader. It provides a direct
562251
replacement for proprietary PXE ROMs, with many extra features such as
562251
DNS, HTTP, iSCSI, etc.
562251
562251
This package contains the iPXE boot images in USB, CD, floppy, and PXE
562251
UNDI formats.
562251
562251
%description roms
562251
iPXE is an open source network bootloader. It provides a direct
562251
replacement for proprietary PXE ROMs, with many extra features such as
562251
DNS, HTTP, iSCSI, etc.
562251
562251
This package contains the iPXE roms in .rom format.
562251
562251
562251
%description roms-qemu
562251
iPXE is an open source network bootloader. It provides a direct
562251
replacement for proprietary PXE ROMs, with many extra features such as
562251
DNS, HTTP, iSCSI, etc.
562251
562251
This package contains the iPXE ROMs for devices emulated by QEMU, in
562251
.rom format.
562251
%endif
562251
562251
%description
562251
iPXE is an open source network bootloader. It provides a direct
562251
replacement for proprietary PXE ROMs, with many extra features such as
562251
DNS, HTTP, iSCSI, etc.
562251
562251
%prep
562251
%setup -q -n %{name}-%{version}-git%{hash}
562251
%patch1 -p1
562251
%patch2 -p1
57753c
%patch3 -p1
57753c
%patch4 -p1
57753c
%patch5 -p1
57753c
%patch6 -p1
57753c
%patch7 -p1
57753c
%patch8 -p1
57753c
%patch9 -p1
57753c
%patch10 -p1
2e8da4
%patch11 -p1
2e8da4
%patch12 -p1
e55ecc
%patch13 -p1
e55ecc
%patch14 -p1
562251
cp -a %{SOURCE1} .
562251
562251
%build
562251
%ifarch %{buildarches}
562251
# The src/Makefile.housekeeping relies on .git/index existing
562251
# but since we pass GITVERSION= to make, we don't actally need
562251
# it to be the real deal, so just touch it to let the build pass
562251
mkdir .git
562251
touch .git/index
562251
562251
ISOLINUX_BIN=/usr/share/syslinux/isolinux.bin
562251
cd src
562251
# ath9k drivers are too big for an Option ROM
562251
rm -rf drivers/net/ath/ath9k
562251
562251
#make %{?_smp_mflags} bin/undionly.kpxe bin/ipxe.{dsk,iso,usb,lkrn} allroms \
562251
make bin/undionly.kpxe bin/ipxe.{dsk,iso,usb,lkrn} allroms \
562251
                   ISOLINUX_BIN=${ISOLINUX_BIN} NO_WERROR=1 V=1 \
562251
		   GITVERSION=%{hash}
562251
2e8da4
# build EfiRom
2e8da4
cd ../EfiRom
2e8da4
make %{?_smp_mflags}
2e8da4
cd ../src
2e8da4
2e8da4
# build roms with efi support for qemu
2e8da4
for rom in %qemuroms; do
2e8da4
  make NO_WERROR=1 V=1 GITVERSION=%{hash} bin/${rom}.rom
2e8da4
  make NO_WERROR=1 V=1 GITVERSION=%{hash} bin-x86_64-efi/${rom}.efidrv
2e8da4
  vid="0x${rom%%????}"
2e8da4
  did="0x${rom#????}"
2e8da4
  ../EfiRom/EfiRom -f "$vid" -i "$did" --pci23 \
2e8da4
                   -b  bin/${rom}.rom \
2e8da4
                   -ec bin-x86_64-efi/${rom}.efidrv \
2e8da4
                   -o  bin/${rom}.combined.rom
2e8da4
  ../EfiRom/EfiRom -d  bin/${rom}.combined.rom
2e8da4
  mv bin/${rom}.combined.rom bin/${rom}.rom
2e8da4
done
2e8da4
562251
%endif
562251
562251
%install
562251
%ifarch %{buildarches}
562251
mkdir -p %{buildroot}/%{_datadir}/%{name}/
562251
pushd src/bin/
562251
562251
cp -a undionly.kpxe ipxe.{iso,usb,dsk,lkrn} %{buildroot}/%{_datadir}/%{name}/
562251
562251
for fmt in %{formats};do
562251
 for img in *.${fmt};do
562251
      if [ -e $img ]; then
57753c
   cat $img /dev/zero | dd bs=256k count=1 of=$img.tmp iflag=fullblock
57753c
   install -D -p -m 0644 $img.tmp %{buildroot}/%{_datadir}/%{name}/$img
57753c
   rm $img.tmp
562251
   echo %{_datadir}/%{name}/$img >> ../../${fmt}.list
562251
  fi
562251
 done
562251
done
562251
popd
562251
562251
# the roms supported by qemu will be packaged separatedly
562251
# remove from the main rom list and add them to qemu.list
562251
for fmt in rom ;do
562251
 for rom in %{qemuroms} ; do
562251
  sed -i -e "/\/${rom}.${fmt}/d" ${fmt}.list
562251
  echo %{_datadir}/%{name}/${rom}.${fmt} >> qemu.${fmt}.list
562251
 done
562251
done
562251
%endif
562251
562251
%ifarch %{buildarches}
562251
%files bootimgs
562251
%dir %{_datadir}/%{name}
562251
%{_datadir}/%{name}/ipxe.iso
562251
%{_datadir}/%{name}/ipxe.usb
562251
%{_datadir}/%{name}/ipxe.dsk
562251
%{_datadir}/%{name}/ipxe.lkrn
562251
%{_datadir}/%{name}/undionly.kpxe
562251
%doc COPYING COPYRIGHTS USAGE
562251
562251
%files roms -f rom.list
562251
%dir %{_datadir}/%{name}
562251
%doc COPYING COPYRIGHTS
562251
562251
%files roms-qemu -f qemu.rom.list
562251
%dir %{_datadir}/%{name}
562251
%doc COPYING COPYRIGHTS
562251
%endif
562251
562251
%changelog
c81224
* Tue Jan 26 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20130517-8.gitc4bce43.el7_2.1
c81224
- Rebuild for preventing conflicts [bz#1301855]
c81224
e55ecc
* Wed May 06 2015 Miroslav Rezanina <mrezanin@redhat.com> - 20130517-7.gitc4bce43.el7
e55ecc
- ipxe-Extract-timing-parameters-out-to-config-dhcp.h.patch [bz#1196352]
e55ecc
- ipxe-Use-spec-compliant-timeouts.patch [bz#1196352]
e55ecc
- Resolves: bz#1196352
e55ecc
  ([RFE] option to increase gpxe retry timeout)
e55ecc
2e8da4
* Mon Sep 15 2014 Miroslav Rezanina <mrezanin@redhat.com> - 20130517-6.gitc4bce43.el7
2e8da4
- ipxe-import-EfiRom-from-edk2-BaseTools-RHEL-only.patch [bz#1084561]
2e8da4
- ipxe-add-custom-Makefile-for-EfiRom-RHEL-only.patch [bz#1084561]
2e8da4
- ipxe-redhat-delete-useless-editor-backup-of-spec.template.patch [bz#1084561]
2e8da4
- ipxe-redhat-build-and-install-combined-legacy-UEFI-roms-f.patch [bz#1084561]
2e8da4
- Resolves: bz#1084561
2e8da4
  (RFE: ship UEFI drivers for ipxe in RHEL-7.y)
2e8da4
57753c
* Wed Mar 05 2014 Miroslav Rezanina <mrezanin@redhat.com> - 20130517-5.gitc4bce43.el7
57753c
- ipxe-Enable-infrastructure-to-specify-an-autoboot-device-.patch [bz#1031518]
57753c
- ipxe-Allow-prefix-to-specify-a-PCI-autoboot-device-locati.patch [bz#1031518]
57753c
- ipxe-Store-boot-bus-dev.fn-address-as-autoboot-device-loc.patch [bz#1031518]
57753c
- ipxe-Ignore-PCI-autoboot-device-location-if-set-to-00-00..patch [bz#1031518]
57753c
- ipxe-Revert-Remove-2-second-startup-wait.patch [bz#857123]
57753c
- ipxe-Allow-ROM-banner-timeout-to-be-configured-independen.patch [bz#857123]
57753c
- ipxe-Customize-ROM-banner-timeout.patch [bz#857123]
57753c
- Resolves: bz#1031518
57753c
  (iPXE does not honor specified boot device)
57753c
- Resolves: bz#857123
57753c
  (Guests never get an iPXE prompt)
57753c
57753c
* Tue Feb 11 2014 Miroslav Rezanina <mrezanin@redhat.com> - 20130517-4.gitc4bce43
57753c
- ipxe-Use-next-server-from-filename-s-settings-block.patch [bz#1062644]
57753c
- Resolves: bz#1062644
57753c
  (pxe boot fails if next-server details come from a different dhcp server)
57753c
57753c
* Thu Jan 15 2014 Miroslav Rezanina <mrezanin@redhat.com> - 20130517-3.gitc4bce43
57753c
- pad ROMs to 256k (rhbz #1038630)
57753c
- Resolves: rhbz# 1038630
57753c
57753c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 20130517-2.gitc4bce43
57753c
- Mass rebuild 2013-12-27
57753c
562251
* Fri May 17 2013 Daniel P. Berrange <berrange@redhat.com> - 20130517-1.gitc4bce43
562251
- Update to latest upstream snapshot
562251
562251
* Fri May 17 2013 Daniel P. Berrange <berrange@redhat.com> - 20130103-3.git717279a
562251
- Fix build with GCC 4.8 (rhbz #914091)
562251
562251
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20130103-2.git717279a
562251
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
562251
562251
* Thu Jan  3 2013 Daniel P. Berrange <berrange@redhat.com> - 20130103-1.git717279a
562251
- Updated to latest GIT snapshot
562251
562251
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120328-2.gitaac9718
562251
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
562251
562251
* Wed Mar 28 2012 Daniel P. Berrange <berrange@redhat.com> - 20120328-1.gitaac9718
562251
- Update to newer upstream
562251
562251
* Fri Mar 23 2012 Daniel P. Berrange <berrange@redhat.com> - 20120319-3.git0b2c788
562251
- Remove more defattr statements
562251
562251
* Tue Mar 20 2012 Daniel P. Berrange <berrange@redhat.com> - 20120319-2.git0b2c788
562251
- Remove BuildRoot & rm -rf of it in install/clean sections
562251
- Remove defattr in file section
562251
- Switch to use global, instead of define for macros
562251
- Add note about Patch1 not going upstream
562251
- Split BRs across lines for easier readability
562251
562251
* Mon Feb 27 2012 Daniel P. Berrange <berrange@redhat.com> - 20120319-1.git0b2c788
562251
- Initial package based on gPXE
562251
562251
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
562251
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
562251
562251
* Mon Feb 21 2011 Matt Domsch <mdomsch@fedoraproject.org> - 1.0.1-4
562251
- don't use -Werror, it flags a failure that is not a failure for gPXE
562251
562251
* Mon Feb 21 2011 Matt Domsch <mdomsch@fedoraproject.org> - 1.0.1-3
562251
- Fix virtio-net ethernet frame length (patch by cra), fixes BZ678789
562251
562251
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
562251
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
562251
562251
* Thu Aug  5 2010 Matt Domsch <mdomsch@fedoraproject.org> - 1.0.1-1
562251
- New drivers: Intel e1000, e1000e, igb, EFI snpnet, JMicron jme,
562251
  Neterion X3100, vxge, pcnet32.
562251
- Bug fixes and improvements to drivers, wireless, DHCP, iSCSI,
562251
  COMBOOT, and EFI.
562251
* Tue Feb  2 2010 Matt Domsch <mdomsch@fedoraproject.org> - 1.0.0-1
562251
- bugfix release, also adds wireless card support
562251
- bnx2 builds again
562251
- drop our one patch
562251
562251
* Tue Oct 27 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.9.9-1
562251
- new upstream version 0.9.9
562251
-- plus patches from git up to 20090818 which fix build errors and
562251
   other release-critical bugs.
562251
-- 0.9.9: added Attansic L1E and sis190/191 ethernet drivers.  Fixes
562251
   and updates to e1000 and 3c90x drivers.
562251
-- 0.9.8: new commands: time, sleep, md5sum, sha1sum. 802.11 wireless
562251
   support with Realtek 8180/8185 and non-802.11n Atheros drivers.
562251
   New Marvell Yukon-II gigabet Ethernet driver.  HTTP redirection
562251
   support.  SYSLINUX floppy image type (.sdsk) with usable file
562251
   system.  Rewrites, fixes, and updates to 3c90x, forcedeth, pcnet32,
562251
   e1000, and hermon drivers.
562251
562251
* Mon Oct  5 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.9.7-6
562251
- move rtl8029 from -roms to -roms-qemu for qemu ne2k_pci NIC (BZ 526776)
562251
562251
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7-5
562251
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
562251
562251
* Tue May 19 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.9.7-4
562251
- add undionly.kpxe to -bootimgs
562251
562251
* Tue May 12 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.9.7-3
562251
- handle isolinux changing paths
562251
562251
* Sat May  9 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.9.7-2
562251
- add dist tag
562251
562251
* Thu Mar 26 2009 Matt Domsch <mdomsch@fedoraproject.org> - 0.9.7-1
562251
- Initial release based on etherboot spec