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
40e044
#     e1000e: 0x8086 0x10d3
40e044
%global qemuroms 10222000 10ec8029 8086100e 10ec8139 1af41000 808610d3
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
c62b1d
%global date 20170123
c62b1d
%global hash 4e85b27
562251
562251
Name:    ipxe
562251
Version: %{date}
fb3608
Release: 1.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
c62b1d
Source0: %{name}-%{date}-git%{hash}.tar.gz
562251
Source1: USAGE
40e044
c62b1d
Patch1: 0001-Add-redhat-directory.patch
c62b1d
Patch2: 0002-import-EfiRom-from-edk2-BaseTools-RHEL-only.patch
c62b1d
Patch3: 0003-add-custom-Makefile-for-EfiRom-RHEL-only.patch
c62b1d
Patch4: 0005-Use-spec-compliant-timeouts.patch
c62b1d
Patch5: 0008-Enable-IPv6-protocol-in-non-QEMU-builds.patch
c62b1d
Patch6: 0009-Strip-802.1Q-VLAN-0-priority-tags.patch
fb3608
# For bz#1481180 - iommu platform support for ipxe [rhel-7.4.z]
fb3608
Patch7: ipxe-Support-VIRTIO_NET_F_IOMMU_PLATFORM.patch
562251
562251
%ifarch %{buildarches}
562251
BuildRequires: perl
562251
BuildRequires: syslinux
562251
BuildRequires: mtools
562251
BuildRequires: mkisofs
2e8da4
BuildRequires: binutils-devel
40e044
BuildRequires: xz-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
40e044
%setup -q -n %{name}-%{hash}
40e044
cp -a %{SOURCE1} .
40e044
40e044
patch_command="patch -p1 -s"
40e044
c62b1d
%patch1 -p1
562251
%patch2 -p1
57753c
%patch3 -p1
57753c
%patch4 -p1
c62b1d
%patch5 -p1
57753c
%patch6 -p1
fb3608
%patch7 -p1
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
40e044
make bin-x86_64-efi/ipxe.efi \
40e044
     NO_WERROR=1 V=1 GITVERSION=%{hash}
40e044
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
40e044
  make NO_WERROR=1 V=1 GITVERSION=%{hash} CONFIG=qemu \
40e044
       bin/${rom}.rom 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
40e044
pushd src
562251
40e044
cp -a bin/undionly.kpxe bin/ipxe.{iso,usb,dsk,lkrn} bin-x86_64-efi/ipxe.efi \
40e044
   %{buildroot}/%{_datadir}/%{name}/
40e044
40e044
cd bin
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
40e044
%{_datadir}/%{name}/ipxe.efi
562251
%{_datadir}/%{name}/undionly.kpxe
40e044
%doc COPYING COPYING.GPLv2 USAGE
562251
562251
%files roms -f rom.list
562251
%dir %{_datadir}/%{name}
40e044
%doc COPYING COPYING.GPLv2
562251
562251
%files roms-qemu -f qemu.rom.list
562251
%dir %{_datadir}/%{name}
40e044
%doc COPYING COPYING.GPLv2
562251
%endif
562251
562251
%changelog
fb3608
* Thu Aug 17 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170123-1.git4e85b27.el7_4.1
fb3608
- ipxe-Support-VIRTIO_NET_F_IOMMU_PLATFORM.patch [bz#1481180]
fb3608
- Resolves: bz#1481180
fb3608
  (iommu platform support for ipxe [rhel-7.4.z])
fb3608
c62b1d
* Fri Mar 10 2017 Miroslav Rezanina <mrezanin@redhat.com> - 20170123-1.git4e85b27.el7
c62b1d
- Rebase to commit 4e85b27 [bz#1413781]
c62b1d
- Resolves: bz#1413781
c62b1d
  (Rebase ipxe for RHEL-7.4)
c62b1d
40e044
* Thu Sep 01 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160127-5.git6366fa7a.el7
40e044
- ipxe-Strip-802.1Q-VLAN-0-priority-tags.patch [bz#1316329]
40e044
- Resolves: bz#1316329
40e044
  ([RFE] Properly Handle 8021.Q VID 0 Frames, as new vlan model in linux kernel does.)
40e044
40e044
* Tue Aug 02 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160127-4.git6366fa7a.el7
40e044
- ipxe-Send-TCP-keepalives-on-idle-established-connections.patch [bz#1322056]
40e044
- ipxe-enable-e1000e-rom.patch [bz#1361534]
40e044
- Resolves: bz#1322056
40e044
  (ipxe freeze during HTTP download with last RPM)
40e044
- Resolves: bz#1361534
40e044
  (RFE: Integrate e1000e implementation in downstream QEMU)
40e044
40e044
* Fri Jul 15 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160127-3.git6366fa7a.el7
40e044
- ipxe-Add-pci_find_next_capability.patch [bz#1242850]
40e044
- ipxe-Add-virtio-1.0-constants-and-data-structures.patch [bz#1242850]
40e044
- ipxe-Add-virtio-1.0-PCI-support.patch [bz#1242850]
40e044
- ipxe-Add-virtio-net-1.0-support.patch [bz#1242850]
40e044
- ipxe-Renumber-virtio_pci_region-flags.patch [bz#1242850]
40e044
- ipxe-Fix-virtio-pci-logging.patch [bz#1242850]
40e044
- Resolves: bz#1242850
40e044
  (Ipxe can not recognize "network device" when enable virtio-1 of virtio-net-pci)
40e044
40e044
* Tue Jul 12 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160127-2.git6366fa7a.el7
40e044
- ipxe-Enable-IPv6-protocol-in-non-QEMU-builds.patch [bz#1350167]
40e044
- Resolves: bz#1350167
40e044
  (ipxe: enable IPV6)
40e044
40e044
* Wed Mar 09 2016 Miroslav Rezanina <mrezanin@redhat.com> - 20160127-1.git6366fa7a.el7
40e044
- Rebase to 6366fa7a
40e044
- Resolves: bz#1297853
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-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
40e044
* Wed 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