From 3c086d92af3a9b40a23531319cbb0fe23931a8a1 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Thu, 4 Apr 2013 11:19:24 +0300 Subject: [PATCH] packaging: initial import Signed-off-by: Artem Bityutskiy --- packaging/rpmlintrc | 1 + packaging/syslinux.changes | 6 +++ packaging/syslinux.manifest | 5 ++ packaging/syslinux.spec | 124 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 packaging/rpmlintrc create mode 100644 packaging/syslinux.changes create mode 100644 packaging/syslinux.manifest create mode 100644 packaging/syslinux.spec diff --git a/packaging/rpmlintrc b/packaging/rpmlintrc new file mode 100644 index 0000000..8113fbe --- /dev/null +++ b/packaging/rpmlintrc @@ -0,0 +1 @@ +addFilter("arch-dependent-file-in-usr-share") diff --git a/packaging/syslinux.changes b/packaging/syslinux.changes new file mode 100644 index 0000000..728a09c --- /dev/null +++ b/packaging/syslinux.changes @@ -0,0 +1,6 @@ +* Thu Nov 14 2013 Artem Bityutskiy 4.07 +- Upgrade to version 4.07 which supports the '-d' option which we need. + +* Thu Mar 28 08:53:45 UTC 2013 Artem Bityutskiy 4.04 +- Back-port the ext2_fs.h patch from upstream to make syslinux compile with the latest + kernel headers (v3.7). Fixes TIVI-557. diff --git a/packaging/syslinux.manifest b/packaging/syslinux.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/syslinux.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/syslinux.spec b/packaging/syslinux.spec new file mode 100644 index 0000000..bbdc8d3 --- /dev/null +++ b/packaging/syslinux.spec @@ -0,0 +1,124 @@ +Summary: Kernel loader which uses a FAT, ext2/3 or iso9660 filesystem or a PXE network +Name: syslinux +Version: 4.07 +Release: 1 +License: GPL-2.0 +Url: http://syslinux.zytor.com/ +Group: System/Other +Source0: ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{version}.tar.gz +Source1001: packaging/syslinux.manifest +ExclusiveArch: %{ix86} x86_64 +BuildRequires: nasm >= 0.98.39, perl +BuildRequires: python +BuildRequires: libuuid-devel + +Autoreq: 0 +%ifarch x86_64 +Requires: mtools +%define my_cc gcc -Wno-sizeof-pointer-memaccess +%else +Requires: mtools, libc.so.6 +%define my_cc gcc -m32 -Wno-sizeof-pointer-memaccess +%endif + +# NOTE: extlinux belongs in /sbin, not in /usr/sbin, since it is typically +# a system bootloader, and may be necessary for system recovery. +%define _sbindir /sbin + +%description +SYSLINUX is a suite of bootloaders, currently supporting DOS FAT +filesystems, Linux ext2/ext3 filesystems (EXTLINUX), PXE network boots +(PXELINUX), or ISO 9660 CD-ROMs (ISOLINUX). It also includes a tool, +MEMDISK, which loads legacy operating systems from these media. + +%package devel +Summary: Development environment for SYSLINUX add-on modules +Group: System/Other +Requires: syslinux + +%description devel +The SYSLINUX boot loader contains an API, called COM32, for writing +sophisticated add-on modules. This package contains the libraries +necessary to compile such modules. + +%package extlinux +Summary: The EXTLINUX bootloader, for booting the local system +Group: System/Other +Requires: syslinux + +%description extlinux +The EXTLINUX bootloader, for booting the local system, as well as all +the SYSLINUX/PXELINUX modules in /boot. + +%package tftpboot +Summary: SYSLINUX modules in /var/lib/tftpboot, available for network booting +Group: System/Other +Requires: syslinux + +%description tftpboot +All the SYSLINUX/PXELINUX modules directly available for network +booting in the /var/lib/tftpboot directory. + +%prep +%setup -q -n syslinux-%{version} + +%build +cp %{SOURCE1001} . +make CC='%{my_cc}' %{?_smp_mflags} clean +make CC='%{my_cc}' %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make CC='%{my_cc}' install-all \ + INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} \ + LIBDIR=%{_libdir} DATADIR=%{_datadir} \ + MANDIR=%{_mandir} INCDIR=%{_includedir} \ + TFTPBOOT=/var/lib/tftpboot EXTLINUXDIR=/boot/extlinux + +%clean +rm -rf %{buildroot} + +%files +%manifest syslinux.manifest +%defattr(-,root,root) +%{_bindir}/* +%dir %{_datadir}/syslinux +%{_datadir}/syslinux/*.com +%{_datadir}/syslinux/*.c32 +%{_datadir}/syslinux/*.bin +%{_datadir}/syslinux/*.0 +%{_datadir}/syslinux/memdisk +%{_datadir}/syslinux/dosutil +%license COPYING + +%files devel +%manifest syslinux.manifest +%defattr(-,root,root) +%doc NEWS README doc/* +%doc sample +%doc %{_mandir}/man*/* +%{_datadir}/syslinux/com32 +%{_datadir}/syslinux/diag + +%files extlinux +%manifest syslinux.manifest +%defattr(-,root,root) +%{_sbindir}/extlinux +/boot/extlinux + +%files tftpboot +%manifest syslinux.manifest +%defattr(-,root,root) +/var/lib/tftpboot + +%post extlinux +# If we have a /boot/extlinux.conf file, assume extlinux is our bootloader +# and update it. +if [ -f /boot/extlinux/extlinux.conf ]; then \ + ln -sf /boot/extlinux/extlinux.conf /etc/extlinux.conf; \ + extlinux --update /boot/extlinux ; \ +elif [ -f /boot/extlinux.conf ]; then \ + mkdir -p /boot/extlinux && \ + mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \ + extlinux --update /boot/extlinux ; \ +fi -- 2.7.4