A set of fixes

- Fix a bunch of annocheck problems (pjones)
- Drop x86_64 ExclusiveArch for tftpboot subpackage
- Make tftpboot subpackage completely noarch (yselkowi)

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2019-09-27 17:53:04 +02:00
parent 7a4a4beeb6
commit 59d40e0203
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
2 changed files with 101 additions and 14 deletions

View File

@ -0,0 +1,76 @@
From 5c24d725d5a5f50f0544fbcc544f08a3f9e90e5d Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
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

View File

@ -1,25 +1,33 @@
%global buildarches %{ix86} x86_64
%ifnarch %{buildarches}
%global debug_package %{nil}
%endif
Summary: Simple kernel loader which boots from a FAT filesystem Summary: Simple kernel loader which boots from a FAT filesystem
Name: syslinux Name: syslinux
Version: 6.04 Version: 6.04
%define tarball_version 6.04-pre1 %define tarball_version 6.04-pre1
Release: 0.12%{?dist} Release: 0.13%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
Source0: http://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{tarball_version}.tar.xz Source0: http://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{tarball_version}.tar.xz
Patch0001: 0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch Patch0001: 0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch
Patch0002: 0002-ext4-64bit-feature.patch Patch0002: 0002-ext4-64bit-feature.patch
Patch0003: 0003-include-sysmacros-h.patch Patch0003: 0003-include-sysmacros-h.patch
Patch0004: 0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch
# this is to keep rpmbuild from thinking the .c32 / .com / .0 / memdisk files # this is to keep rpmbuild from thinking the .c32 / .com / .0 / memdisk files
# in noarch packages are a reason to stop the build. # in noarch packages are a reason to stop the build.
%define _binaries_in_noarch_packages_terminate_build 0 %define _binaries_in_noarch_packages_terminate_build 0
ExclusiveArch: %{ix86} x86_64 BuildRequires: git
%ifarch %{buildarches}
BuildRequires: gcc BuildRequires: gcc
BuildRequires: nasm >= 0.98.38-1, perl-interpreter, perl-generators, netpbm-progs, git BuildRequires: nasm >= 0.98.38-1, perl-interpreter, perl-generators, netpbm-progs
BuildRequires: /usr/include/gnu/stubs-32.h BuildRequires: /usr/include/gnu/stubs-32.h
BuildRequires: libuuid-devel BuildRequires: libuuid-devel
Requires: syslinux-nonlinux = %{version}-%{release} Requires: syslinux-nonlinux = %{version}-%{release}
%endif
%ifarch %{ix86} %ifarch %{ix86}
Requires: mtools, libc.so.6 Requires: mtools, libc.so.6
BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc
@ -65,8 +73,6 @@ the SYSLINUX/PXELINUX modules in /boot.
%package tftpboot %package tftpboot
Summary: SYSLINUX modules in /tftpboot, available for network booting Summary: SYSLINUX modules in /tftpboot, available for network booting
BuildArch: noarch BuildArch: noarch
ExclusiveArch: %{ix86} x86_64
Requires: syslinux
%description tftpboot %description tftpboot
All the SYSLINUX/PXELINUX modules directly available for network All the SYSLINUX/PXELINUX modules directly available for network
@ -103,21 +109,18 @@ SYSLINUX binaries and modules for 64-bit UEFI systems
%endif %endif
%prep %prep
%setup -q -n syslinux-%{tarball_version} %autosetup -S git_am -n syslinux-%{tarball_version}
git init
git config user.email "%{name}-owner@fedoraproject.org"
git config user.name "Fedora Ninjas"
git add .
git commit -a -q -m "%{version} baseline."
git am %{patches} </dev/null
%build %build
make bios clean all %ifarch %{buildarches}
make RPMCFLAGS='%{optflags}' RPMLDFLAGS='%{build_ldflags}' bios clean all
%endif
%ifarch x86_64 %ifarch x86_64
make efi64 clean all make RPMCFLAGS='%{optflags}' RPMLDFLAGS='%{build_ldflags}' efi64 clean all
%endif %endif
%install %install
%ifarch %{buildarches}
rm -rf %{buildroot} rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
@ -147,7 +150,9 @@ mkdir -p %{buildroot}/etc
# don't ship libsyslinux, at least, not for now # don't ship libsyslinux, at least, not for now
rm -f %{buildroot}%{_prefix}/lib/libsyslinux* rm -f %{buildroot}%{_prefix}/lib/libsyslinux*
rm -f %{buildroot}%{_includedir}/syslinux.h rm -f %{buildroot}%{_includedir}/syslinux.h
%endif
%ifarch %{buildarches}
%files %files
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING %license COPYING
@ -244,8 +249,14 @@ elif [ -f /boot/extlinux.conf ]; then \
mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \ mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && \
extlinux --update /boot/extlinux ; \ extlinux --update /boot/extlinux ; \
fi fi
%endif
%changelog %changelog
* Fri Sep 27 2019 Javier Martinez Canillas <javierm@redhat.com> - 6.04-0.13
- Fix a bunch of annocheck problems (pjones)
- Drop x86_64 ExclusiveArch for tftpboot subpackage
- Make tftpboot subpackage completely noarch (yselkowi)
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.12 * Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-0.12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild