25255a
Summary: Simple kernel loader which boots from a FAT filesystem
25255a
Name: syslinux
25255a
Version: 4.05
25255a
%define tarball_version 4.05
af863e
Release: 13%{?dist}
25255a
License: GPLv2+
25255a
Group: Applications/System
25255a
URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
25255a
Source0: http://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{tarball_version}.tar.bz2
25255a
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1e69ac
BuildRequires: nasm >= 0.98.38-1, perl, netpbm-progs, git
25255a
BuildRequires: libuuid-devel
1e69ac
BuildRequires: /usr/include/gnu/stubs-32.h
1e69ac
BuildRequires: cpio, findutils
25255a
%ifarch x86_64
1e69ac
Requires: mtools, libc.so.6()(64bit), libuuid
25255a
%endif
25255a
8333c7
%ifarch %{ix86}
8333c7
Requires: mtools, libc.so.6
8333c7
%endif
8333c7
1e69ac
Patch0001: syslinux-isohybrid-fix-mbr.patch
1e69ac
Patch0002: syslinux-4.05-avoid-ext2_fs.h.patch
1e69ac
Patch0003: syslinux-4.05-man-pages.patch
1e69ac
Patch0006: 0003-Fixes-for-problems-discovered-by-coverity-scan.-8120.patch
1e69ac
Patch0007: 0004-Make-some-more-mingw-paths-work.patch
1e69ac
Patch0008: 0001-Don-t-use-strict-aliasing-because-not-everything-her.patch
1e69ac
Patch0009: 0001-relocs-Move-stop-to-the-end.patch
af863e
Patch0010: 0005-Save-Dell-BIOS-chunk-in-PXELINUX.patch
25255a
25255a
%description
25255a
SYSLINUX is a suite of bootloaders, currently supporting DOS FAT
25255a
filesystems, Linux ext2/ext3 filesystems (EXTLINUX), PXE network boots
1e69ac
(PXELINUX), or ISO 9660 CD-ROMs (ISOLINUX).
25255a
25255a
%package perl
25255a
Summary: Syslinux tools written in perl
25255a
Group: Applications/System
25255a
25255a
%description perl
25255a
Syslinux tools written in perl
25255a
25255a
%package extlinux
25255a
Summary: The EXTLINUX bootloader, for booting the local system.
25255a
Group: System/Boot
25255a
Requires: syslinux
25255a
25255a
%description extlinux
25255a
The EXTLINUX bootloader, for booting the local system, as well as all
25255a
the SYSLINUX/PXELINUX modules in /boot.
25255a
1e69ac
%package devel
1e69ac
Summary: Headers and libraries for syslinux development.
1e69ac
Group: Development/Libraries
1e69ac
1e69ac
%description devel
1e69ac
Headers and libraries for syslinux development.
1e69ac
25255a
%package tftpboot
1e69ac
Summary: SYSLINUX modules in /var/lib/tftpboot, available for network booting
25255a
Group: Applications/Internet
1e69ac
ExclusiveArch: x86_64
25255a
Requires: syslinux
25255a
25255a
%description tftpboot
25255a
All the SYSLINUX/PXELINUX modules directly available for network
1e69ac
booting in the /var/lib/tftpboot directory.
25255a
25255a
%prep
25255a
%setup -q -n syslinux-%{tarball_version}
1e69ac
git init
1e69ac
git config user.email "nobody@example.com"
1e69ac
git config user.name "RHEL Ninjas"
1e69ac
git add .
1e69ac
git commit -a -q -m "%{version} baseline."
1e69ac
git am %{patches} 
25255a
25255a
%build
25255a
CFLAGS="-Werror -Wno-unused -finline-limit=2000"
25255a
export CFLAGS
1e69ac
25255a
# If you make clean here, we lose the provided syslinux.exe
1e69ac
find . -name '*.exe' | cpio -H newc --quiet -o -F %{_tmppath}/%{name}-%{version}-%{release}.cpio
1e69ac
make clean
1e69ac
# There's an x86_64 image here that shouldn't be, and it makes i686 builds fail.
1e69ac
rm -vf diag/geodsp/mk-lba-img
1e69ac
make all
25255a
make installer
25255a
make -C sample tidy
25255a
25255a
%install
25255a
rm -rf %{buildroot}
25255a
25255a
mkdir -p %{buildroot}%{_bindir}
25255a
mkdir -p %{buildroot}%{_sbindir}
25255a
mkdir -p %{buildroot}%{_prefix}/lib/syslinux
25255a
mkdir -p %{buildroot}%{_includedir}
1e69ac
cat %{_tmppath}/%{name}-%{version}-%{release}.cpio | cpio -di
25255a
make install-all \
25255a
	INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} \
25255a
       	LIBDIR=%{_prefix}/lib DATADIR=%{_datadir} \
25255a
	MANDIR=%{_mandir} INCDIR=%{_includedir} \
1e69ac
	TFTPBOOT=/var/lib/tftpboot EXTLINUXDIR=/boot/extlinux
25255a
25255a
mkdir -p %{buildroot}/%{_docdir}/%{name}-%{version}/sample
25255a
install -m 644 sample/sample.* %{buildroot}/%{_docdir}/%{name}-%{version}/sample/
25255a
mkdir -p %{buildroot}/etc
25255a
( cd %{buildroot}/etc && ln -s ../boot/extlinux/extlinux.conf . )
25255a
25255a
# don't ship libsyslinux, at least, not for now
25255a
rm -f %{buildroot}%{_prefix}/lib/libsyslinux*
25255a
rm -f %{buildroot}%{_includedir}/syslinux.h
25255a
1e69ac
mkdir -p %{buildroot}/%{_libdir}/syslinux/com32/
1e69ac
mv %{buildroot}/%{_datadir}/syslinux/com32/*.a %{buildroot}/%{_libdir}/syslinux/com32/
1e69ac
25255a
%clean
25255a
rm -rf %{buildroot}
25255a
25255a
%files
25255a
%defattr(-,root,root)
25255a
%doc NEWS README* COPYING 
25255a
%doc doc/* 
25255a
%doc sample
25255a
%{_mandir}/man1/gethostip*
b95fbc
%{_mandir}/man1/isohybrid*
b95fbc
%{_mandir}/man1/memdiskfind*
25255a
%{_mandir}/man1/syslinux*
25255a
%{_bindir}/gethostip
25255a
%{_bindir}/isohybrid
25255a
%{_bindir}/memdiskfind
25255a
%{_bindir}/syslinux
25255a
%dir %{_datadir}/syslinux
1e69ac
%dir %{_datadir}/syslinux/dosutil
1e69ac
%{_datadir}/syslinux/dosutil/*
1e69ac
%dir %{_datadir}/syslinux/diag
1e69ac
%{_datadir}/syslinux/diag/*
1e69ac
%{_datadir}/syslinux/memdisk
25255a
%{_datadir}/syslinux/*.com
25255a
%{_datadir}/syslinux/*.exe
25255a
%{_datadir}/syslinux/*.c32
25255a
%{_datadir}/syslinux/*.bin
25255a
%{_datadir}/syslinux/*.0
25255a
25255a
%files perl
25255a
%defattr(-,root,root)
25255a
%{_mandir}/man1/lss16toppm*
25255a
%{_mandir}/man1/ppmtolss16*
25255a
%{_mandir}/man1/syslinux2ansi*
25255a
%{_bindir}/keytab-lilo
25255a
%{_bindir}/lss16toppm
25255a
%{_bindir}/md5pass
25255a
%{_bindir}/mkdiskimage
25255a
%{_bindir}/ppmtolss16
25255a
%{_bindir}/pxelinux-options
25255a
%{_bindir}/sha1pass
25255a
%{_bindir}/syslinux2ansi
25255a
%{_bindir}/isohybrid.pl
25255a
25255a
%files extlinux
1e69ac
%defattr(-,root,root)
25255a
%{_sbindir}/extlinux
b95fbc
%{_mandir}/man1/extlinux*
25255a
%config /etc/extlinux.conf
1e69ac
/boot/extlinux
1e69ac
1e69ac
%files devel
1e69ac
%defattr(-,root,root)
1e69ac
%dir %{_datadir}/syslinux/com32
1e69ac
%{_datadir}/syslinux/com32
1e69ac
%dir %{_libdir}/syslinux/com32
1e69ac
%{_libdir}/syslinux/com32/*
25255a
25255a
%files tftpboot
1e69ac
%defattr(-,root,root)
1e69ac
%{_sharedstatedir}/tftpboot
25255a
25255a
%post extlinux
25255a
# If we have a /boot/extlinux.conf file, assume extlinux is our bootloader
25255a
# and update it.
25255a
if [ -f /boot/extlinux/extlinux.conf ]; then \
25255a
	extlinux --update /boot/extlinux ; \
25255a
elif [ -f /boot/extlinux.conf ]; then \
25255a
	mkdir -p /boot/extlinux && \
25255a
	mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \
25255a
	extlinux --update /boot/extlinux ; \
25255a
fi
25255a
25255a
%changelog
8333c7
* Thu Dec 22 2016 Johnny Hughes <johnny@centos.org> - 4.05-13
8333c7
- CentOS i686 Mods
8333c7
af863e
* Tue May 10 2016 Peter Jones <pjones@redhat.com> - - 4.05-13
af863e
- Try to work around firmware bugs in the PXE stack.
af863e
  Resolves: rhbz#1254615
af863e
1e69ac
* Fri Sep 26 2014 Peter Jones <pjones@redhat.com> - 4.05-12
1e69ac
- Toolchain changes between when this originally got built and 4.05-9 means
1e69ac
  4.05-9 - 4.05-11 don't actually work.
1e69ac
  Related: rhbz#1085434
1e69ac
1e69ac
* Tue Sep 23 2014 Peter Jones <pjones@redhat.com> - 4.05-11
1e69ac
- Fix some rpmdiff problems.
1e69ac
  Related: rhbz#1085434
1e69ac
1e69ac
* Tue Sep 23 2014 Peter Jones <pjones@redhat.com> - 4.05-10
1e69ac
- Fix some aliasing errors rpmdiff complains about.
1e69ac
  Related: rhbz#1085434
1e69ac
1e69ac
* Tue Sep 02 2014 Peter Jones <pjones@redhat.com> - 4.05-9
1e69ac
- Try harder to build everything correctly.
1e69ac
  Resolves: rhbz#1085434
1e69ac
b95fbc
* Thu Feb 27 2014 David Cantrell <dcantrell@redhat.com> - 4.05-8
b95fbc
- Only build for x86_64
b95fbc
  Resolves: rhbz#1070659
b95fbc
b95fbc
* Mon Jan 20 2014 Peter Jones <pjones@redhat.com> - 4.05-7
b95fbc
- Improve documentation.
b95fbc
  Resolves: rhbz#948852
b95fbc
b95fbc
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 4.05-6
b95fbc
- Mass rebuild 2013-12-27
b95fbc
25255a
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.05-5
25255a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
25255a
25255a
* Mon Aug 06 2012 Peter Jones <pjones@redhat.com> - 4.05-4
25255a
- Fix build problem from kernel-headers' removeal of ext2_fs.h
25255a
  (fix backported from as-yet-unreleased upstream version.)
25255a
25255a
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.05-3
25255a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
25255a
25255a
* Wed Apr 18 2012 Michael Schwendt <mschwendt@fedoraproject.org> - 4.05-2
25255a
- Remove old Obsoletes/Provides for syslinux-devel as such a subpkg
25255a
  was introduced with 3.83-2 (#756733).
25255a
25255a
* Wed Feb 15 2012 Matthew Garrett <mjg@redhat.com> - 4.05-1
25255a
- New upstream release
25255a
- syslinux-isohybrid-fix-mbr.patch: generate a full MBR for UEFI images
25255a
25255a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.02-6
25255a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
25255a
25255a
* Wed Aug 24 2011 Matthew Garrett <mjg@redhat.com> - 4.02-5
25255a
- Add support for building Mac and GPT bootable hybrid images
25255a
25255a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.02-4
25255a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
25255a
25255a
* Fri Aug 20 2010 Matt Domsch <mdomsch@fedoraproject.org> - 4.02-2
25255a
- add perl subpackage, move perl apps there
25255a
25255a
* Fri Aug 06 2010 Peter Jones <pjones@redhat.com> - 4.02-2
25255a
- Split out extlinux and tftpboot.
25255a
- remove duplicate syslinux/com32/ left in base package after 3.83-2
25255a
25255a
* Thu Aug 05 2010 Peter Jones <pjones@redhat.com> - 4.02-1
25255a
- Update to 4.02