1
0

Accepting request 645710 from Base:System

- fix netfilter builds with 4.19
  * add netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch

- Update to kernel headers 4.19

OBS-URL: https://build.opensuse.org/request/show/645710
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/linux-glibc-devel?expand=0&rev=65
This commit is contained in:
Dominique Leuenberger 2018-11-12 08:48:02 +00:00 committed by Git OBS Bridge
commit adb7b39b76
5 changed files with 72 additions and 13 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a4206a0542023b8189a7621834d0fa0fcd3ad61b1c604ebee2769c21cc5d575
size 1083844

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e3673cedeabf17448ccdb31f0c53d9e28a5a59a2428238bfcf241ffdc196328
size 1092564

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Oct 24 14:51:55 UTC 2018 - Jiri Slaby <jslaby@suse.cz>
- fix netfilter builds with 4.19
* add netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch
-------------------------------------------------------------------
Mon Oct 22 09:18:57 UTC 2018 - schwab@suse.de
- Update to kernel headers 4.19
-------------------------------------------------------------------
Mon Aug 13 07:41:51 UTC 2018 - schwab@suse.de

View File

@ -17,7 +17,7 @@
Name: linux-glibc-devel
Version: 4.18
Version: 4.19
Release: 0
Summary: Linux headers for userspace development
License: GPL-2.0-only
@ -25,6 +25,7 @@ Group: Development/Libraries/C and C++
URL: http://www.kernel.org/
Source: %{name}-%{version}.tar.xz
Source1: install_all.sh
Patch0: netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch
BuildRequires: fdupes
BuildRequires: xz
# rpm-build requires gettext-tools; ignore this, in order to shorten cycles (we have no translations)
@ -46,12 +47,13 @@ packages, instead.
%prep
%setup -q -n linux-glibc-devel-%{version}
%autopatch -p1
%build
cat > version.h <<\BOGUS
#ifdef __KERNEL__
#error "======================================================="
#error "You should not include /usr/include/{linux,asm}/ header"
#error "You should not include %{_includedir}/{linux,asm}/ header"
#error "files directly for the compilation of kernel modules."
#error ""
#error "glibc now uses kernel header files from a well-defined"
@ -112,7 +114,7 @@ ln -sfn asm-dummy %{buildroot}%{_includedir}/asm
%postun
if test "$1" = 0
then
rm -f usr/include/asm
rm -f %{_includedir}/asm
fi
exit 0
@ -132,22 +134,22 @@ case "$(uname -m)" in
riscv*) asm_link=riscv ;;
*) asm_link=x86 ;;
esac
if test -L usr/include/asm
if test -L %{_includedir}/asm
then
case "$(readlink usr/include/asm)" in
case "$(readlink %{_includedir}/asm)" in
*../src/linux/include*)
echo "%{_includedir}/asm points to kernel-source, waiting for triggerpostun to symlink to asm-$asm_link"
rm -fv usr/include/asm
rm -fv %{_includedir}/asm
exit 0
;;
esac
: symlink is ok, update it below in case of an arch change
elif test -d usr/include/asm
# symlink is ok, update it below in case of an arch change
elif test -d %{_includedir}/asm
then
echo "%{_includedir}/asm is a directory, waiting for triggerpostun to symlink to asm-$asm_link"
exit 0
fi
ln -sfn arch-$asm_link/asm usr/include/asm
ln -sfn arch-$asm_link/asm %{_includedir}/asm
exit 0
%triggerpostun -- linux-kernel-headers, glibc-devel < 2.5, libc < 2.2
@ -166,7 +168,7 @@ case "$(uname -m)" in
riscv*) asm_link=riscv ;;
*) asm_link=x86 ;;
esac
ln -sfn arch-$asm_link/asm usr/include/asm
ln -sfn arch-$asm_link/asm %{_includedir}/asm
exit 0
%files

View File

@ -0,0 +1,46 @@
From: Jiri Slaby <jslaby@suse.cz>
Date: Wed, 24 Oct 2018 12:36:28 +0200
Subject: netfilter: bridge: define INT_MIN & INT_MAX in userspace
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Patch-mainline: submitted on 2018/10/24
References: 4.19 fixes
With 4.19, programs like ebtables fail to build when they include
"linux/netfilter_bridge.h". It is caused by commit 94276fa8a2a4 which
added a use of INT_MIN and INT_MAX to the header:
: In file included from /usr/include/linux/netfilter_bridge/ebtables.h:18,
: from include/ebtables_u.h:28,
: from communication.c:23:
: /usr/include/linux/netfilter_bridge.h:30:20: error: 'INT_MIN' undeclared here (not in a function)
: NF_BR_PRI_FIRST = INT_MIN,
: ^~~~~~~
Define these constants by including "limits.h" when !__KERNEL__ (the
same way as for other netfilter_* headers).
Fixes: 94276fa8a2a4 ("netfilter: bridge: Expose nf_tables bridge hook priorities through uapi")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Máté Eckl <ecklm94@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
---
include/uapi/linux/netfilter_bridge.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/uapi/linux/netfilter_bridge.h b/include/uapi/linux/netfilter_bridge.h
index 156ccd089df1..1610fdbab98d 100644
--- a/usr/include/linux/netfilter_bridge.h
+++ b/usr/include/linux/netfilter_bridge.h
@@ -11,6 +11,8 @@
#include <linux/if_vlan.h>
#include <linux/if_pppox.h>
+#include <limits.h> /* for INT_MIN, INT_MAX */
+
/* Bridge Hooks */
/* After promisc drops, checksum checks. */
#define NF_BR_PRE_ROUTING 0
--
2.19.1