From 7ea4d014d49d254d2030abfc9eb1718ff26192c06f8d1718f4657d442d441689 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 22 Oct 2018 09:28:04 +0000 Subject: [PATCH 1/2] Accepting request 643672 from home:Andreas_Schwab:Factory - Update to kernel headers 4.19 OBS-URL: https://build.opensuse.org/request/show/643672 OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=133 --- linux-glibc-devel-4.18.tar.xz | 3 --- linux-glibc-devel-4.19.tar.xz | 3 +++ linux-glibc-devel.changes | 5 +++++ linux-glibc-devel.spec | 22 +++++++++++----------- 4 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 linux-glibc-devel-4.18.tar.xz create mode 100644 linux-glibc-devel-4.19.tar.xz diff --git a/linux-glibc-devel-4.18.tar.xz b/linux-glibc-devel-4.18.tar.xz deleted file mode 100644 index 15fce77..0000000 --- a/linux-glibc-devel-4.18.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a4206a0542023b8189a7621834d0fa0fcd3ad61b1c604ebee2769c21cc5d575 -size 1083844 diff --git a/linux-glibc-devel-4.19.tar.xz b/linux-glibc-devel-4.19.tar.xz new file mode 100644 index 0000000..48f37df --- /dev/null +++ b/linux-glibc-devel-4.19.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e3673cedeabf17448ccdb31f0c53d9e28a5a59a2428238bfcf241ffdc196328 +size 1092564 diff --git a/linux-glibc-devel.changes b/linux-glibc-devel.changes index fe0a3ed..e578f7f 100644 --- a/linux-glibc-devel.changes +++ b/linux-glibc-devel.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/linux-glibc-devel.spec b/linux-glibc-devel.spec index f12b0b9..80703bd 100644 --- a/linux-glibc-devel.spec +++ b/linux-glibc-devel.spec @@ -12,12 +12,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: linux-glibc-devel -Version: 4.18 +Version: 4.19 Release: 0 Summary: Linux headers for userspace development License: GPL-2.0-only @@ -51,7 +51,7 @@ packages, instead. 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 +112,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 +132,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 +166,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 From 83e821256608a91ca2e85b4efee05b47dcd3d0547c0b80c348ee4d9a43d955e4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 24 Oct 2018 18:18:06 +0000 Subject: [PATCH 2/2] Accepting request 644358 from home:jirislaby:branches:Base:System - fix netfilter builds with 4.19 * add netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch OBS-URL: https://build.opensuse.org/request/show/644358 OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=134 --- linux-glibc-devel.changes | 6 +++ linux-glibc-devel.spec | 4 +- ...-define-INT_MIN-INT_MAX-in-userspace.patch | 46 +++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch diff --git a/linux-glibc-devel.changes b/linux-glibc-devel.changes index e578f7f..9be533e 100644 --- a/linux-glibc-devel.changes +++ b/linux-glibc-devel.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 24 14:51:55 UTC 2018 - Jiri Slaby + +- 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 diff --git a/linux-glibc-devel.spec b/linux-glibc-devel.spec index 80703bd..17a5291 100644 --- a/linux-glibc-devel.spec +++ b/linux-glibc-devel.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -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,6 +47,7 @@ packages, instead. %prep %setup -q -n linux-glibc-devel-%{version} +%autopatch -p1 %build cat > version.h <<\BOGUS diff --git a/netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch b/netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch new file mode 100644 index 0000000..fc00995 --- /dev/null +++ b/netfilter-bridge-define-INT_MIN-INT_MAX-in-userspace.patch @@ -0,0 +1,46 @@ +From: Jiri Slaby +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 +Cc: Máté Eckl +Cc: Pablo Neira Ayuso +--- + 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 + #include + ++#include /* for INT_MIN, INT_MAX */ ++ + /* Bridge Hooks */ + /* After promisc drops, checksum checks. */ + #define NF_BR_PRE_ROUTING 0 +-- +2.19.1 +