diff --git a/SOURCES/0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch b/SOURCES/0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch new file mode 100644 index 0000000..e55c490 --- /dev/null +++ b/SOURCES/0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch @@ -0,0 +1,76 @@ +From 5c24d725d5a5f50f0544fbcc544f08a3f9e90e5d Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 8 Aug 2019 05:41:36 -0400 +Subject: [PATCH] Add 'RPMOPTFLAGS' to CFLAGS for some stuff. + +--- + extlinux/Makefile | 4 ++-- + linux/Makefile | 4 ++-- + mtools/Makefile | 4 ++-- + utils/Makefile | 4 ++-- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/extlinux/Makefile b/extlinux/Makefile +index 1721ee54aff..d504e23133e 100644 +--- a/extlinux/Makefile ++++ b/extlinux/Makefile +@@ -18,9 +18,9 @@ include $(MAKEDIR)/syslinux.mk + + OPTFLAGS = -g -Os + INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller +-CFLAGS = $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \ ++CFLAGS = $(RPMCFLAGS) $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \ + $(OPTFLAGS) $(INCLUDES) +-LDFLAGS = ++LDFLAGS = $(RPMLDFLAGS) + + SRCS = main.c \ + mountinfo.c \ +diff --git a/linux/Makefile b/linux/Makefile +index 5a49d813de1..9fed68d02c6 100644 +--- a/linux/Makefile ++++ b/linux/Makefile +@@ -18,8 +18,8 @@ include $(MAKEDIR)/syslinux.mk + + OPTFLAGS = -g -Os + INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller +-CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) +-LDFLAGS = ++CFLAGS = $(RPMCFLAGS) $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) ++LDFLAGS = $(RPMLDFLAGS) + + SRCS = syslinux.c \ + ../libinstaller/syslxopt.c \ +diff --git a/mtools/Makefile b/mtools/Makefile +index 632b185ba2f..b6e5ebdba6b 100755 +--- a/mtools/Makefile ++++ b/mtools/Makefile +@@ -2,8 +2,8 @@ include $(MAKEDIR)/syslinux.mk + + OPTFLAGS = -g -Os + INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libfat -I$(SRC)/../libinstaller +-CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) +-LDFLAGS = ++CFLAGS = $(RPMCFLAGS) $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) ++LDFLAGS = $(RPMLDFLAGS) + + SRCS = syslinux.c \ + ../libinstaller/fs.c \ +diff --git a/utils/Makefile b/utils/Makefile +index dfe625902ce..b4962353f20 100644 +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -17,8 +17,8 @@ + VPATH = $(SRC) + include $(MAKEDIR)/syslinux.mk + +-CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC) +-LDFLAGS = -O2 ++CFLAGS = $(RPMCFLAGS) $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC) ++LDFLAGS = $(RPMLDFLAGS) -O2 + + C_TARGETS = isohybrid gethostip memdiskfind + SCRIPT_TARGETS = mkdiskimage +-- +2.21.0 + diff --git a/SPECS/syslinux.spec b/SPECS/syslinux.spec index 055a37c..de1227d 100644 --- a/SPECS/syslinux.spec +++ b/SPECS/syslinux.spec @@ -1,8 +1,13 @@ +%global buildarches %{ix86} x86_64 +%ifnarch %{buildarches} +%global debug_package %{nil} +%endif + Summary: Simple kernel loader which boots from a FAT filesystem Name: syslinux Version: 6.04 %define tarball_version 6.04-pre1 -Release: 1%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/System URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project @@ -10,17 +15,20 @@ Source0: http://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{tarball_v Patch0001: 0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch Patch0002: 0002-ext4-64bit-feature.patch Patch0003: 0003-extlinux-fix-missing-include-for-major-minor.patch +Patch0004: 0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch # this is to keep rpmbuild from thinking the .c32 / .com / .0 / memdisk files # in noarch packages are a reason to stop the build. %define _binaries_in_noarch_packages_terminate_build 0 -ExclusiveArch: %{ix86} x86_64 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: nasm >= 0.98.38-1, perl-interpreter, perl-generators, netpbm-progs, git +BuildRequires: git +%ifarch %{buildarches} +BuildRequires: nasm >= 0.98.38-1, perl-interpreter, perl-generators, netpbm-progs BuildRequires: /usr/include/gnu/stubs-32.h BuildRequires: libuuid-devel Requires: syslinux-nonlinux = %{version}-%{release} +%endif %ifarch %{ix86} Requires: mtools, libc.so.6 BuildRequires: mingw32-gcc @@ -70,8 +78,6 @@ the SYSLINUX/PXELINUX modules in /boot. Summary: SYSLINUX modules in /tftpboot, available for network booting Group: Applications/Internet BuildArch: noarch -ExclusiveArch: %{ix86} x86_64 -Requires: syslinux %description tftpboot All the SYSLINUX/PXELINUX modules directly available for network @@ -114,12 +120,15 @@ SYSLINUX binaries and modules for 64-bit UEFI systems %autosetup -S git_am -n syslinux-%{tarball_version} %build -make bios clean all +%ifarch %{buildarches} +make RPMCFLAGS='%{optflags}' RPMLDFLAGS='%{build_ldflags}' bios clean all +%endif %ifarch x86_64 -make efi64 clean all +make RPMCFLAGS='%{optflags}' RPMLDFLAGS='%{build_ldflags}' efi64 clean all %endif %install +%ifarch %{buildarches} rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} @@ -149,10 +158,12 @@ mkdir -p %{buildroot}/etc # don't ship libsyslinux, at least, not for now rm -f %{buildroot}%{_prefix}/lib/libsyslinux* rm -f %{buildroot}%{_includedir}/syslinux.h +%endif %clean rm -rf %{buildroot} +%ifarch %{buildarches} %files %defattr(-,root,root) %{!?_licensedir:%global license %%doc} @@ -252,8 +263,21 @@ elif [ -f /boot/extlinux.conf ]; then \ mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \ extlinux --update /boot/extlinux ; \ fi +%endif %changelog +* Tue Sep 24 2019 Yaakov Selkowitz - 6.04-4 +- Make tftpboot subpackage completely noarch + Resolves: rhbz#1745205 + +* Tue Aug 27 2019 Javier Martinez Canillas 6.04-3 + Drop x86_64 ExclusiveArch for tftpboot subpackage + Resolves: rhbz#1745205 + +* Thu Aug 08 2019 Peter Jones - 6.04-2 +- Fix a bunch of annocheck problems + Resolves: rhbz#1624176 + * Fri Aug 10 2018 Peter Jones - 6.04-1 - extlinux: fix missing include for major()/minor() Resolves: rhbz#1611751