Accepting request 663285 from home:Andreas_Schwab:Factory

- Update to kernel headers 4.20

OBS-URL: https://build.opensuse.org/request/show/663285
OBS-URL: https://build.opensuse.org/package/show/Base:System/linux-glibc-devel?expand=0&rev=136
This commit is contained in:
Andreas Schwab 2019-01-07 08:34:24 +00:00 committed by Git OBS Bridge
parent 83e8212566
commit c37686d285
6 changed files with 50 additions and 108 deletions

View File

@ -1,58 +1,45 @@
#!/bin/bash
# bash -x $0 linux-1.2.3.tar.xz
# bash -x $0 linux.git tag
set -e
kernel=$1
if ! test -f "$1"
then
echo "Usage: ${0##*/} linux-1.2.3.tar.xz"
exit 1
fi
if echo $PWD | grep -q :; then
echo "do not call this in a directory with : - make will fail"
if test $# -ne 2 || ! test -d "$1" || test "$2" = "${2#v}"; then
echo "Usage: ${0##*/} linux.git tag"
exit 1
fi
case $PWD in
*:*)
echo "do not call this in a directory with : - make will fail"
exit 1
;;
esac
kernel_dir="`tar -tf $1 | sed '1 {s@^.*[[:blank:]]@@;s@linux-@@;s@/.*$@@;s@^\([0-9]\+\.[0-9]\+\.[0-9]\+\)\(.*\)@\1@;p;Q}'`"
header_dir="$PWD/linux-glibc-devel-$kernel_dir"
if test -d "$kernel_dir"
then
echo "$kernel_dir exists, remove it first."
exit 1
version=${2#v}
kernel_dir=linux-$version
header_dir="$PWD/linux-glibc-devel-$version"
if test -d "$kernel_dir"; then
echo "$kernel_dir exists, remove it first."
exit 1
fi
if ! mkdir "$header_dir"
then
echo "$header_dir exists, remove it first."
exit 1
if ! mkdir "$header_dir"; then
echo "$header_dir exists, remove it first."
exit 1
fi
tar -xf $1
pushd linux-${kernel_dir}
cp Makefile $header_dir
/usr/bin/make O="$header_dir" headers_install_all
git clone --single-branch -b "$2" "$1" "$kernel_dir"
pushd "$kernel_dir"
cp Makefile "$header_dir"
make O="$header_dir" headers_install_all
# kvm.h and aout.h are only installed if SRCARCH is an architecture
# that has support for them. As the package is noarch we need to make
# sure we get the full support on x86
/usr/bin/make SRCARCH=x86 O="$header_dir" headers_install_all
make SRCARCH=x86 O="$header_dir" headers_install_all
popd
pushd "$header_dir"
for asm in \
alpha \
arc \
c6x \
h8300 \
hexagon \
microblaze \
nds32 \
nios2 \
openrisc \
sh \
unicore32 \
xtensa \
; do
rm -rf usr/include/arch-$asm
remove="arc c6x csky h8300 hexagon microblaze nds32 nios2 openrisc sh unicore32 xtensa"
for asm in $remove; do
rm -rf usr/include/arch-$asm
done
rm -f Makefile .cache.mk
find -type f -name "..install.cmd" -exec rm {} +
find -type f -name ".install" -exec rm {} +
find -type f \( -name "..install.cmd" -or -name ".install" \) -exec rm {} +
#-------------------------------------------------------------------
#Fri Sep 5 10:43:49 CEST 2008 - matz@suse.de
@ -62,20 +49,18 @@ find -type f -name ".install" -exec rm {} +
rm -rf usr/include/drm/
# Remove confusing empty uapi directory
test ! -d usr/include/uapi || rmdir usr/include/uapi
for dir in *
do
case "$dir" in
usr) ;;
*)
if test -d "$dir"
then
rm -rf "$dir"
fi
;;
esac
for dir in *; do
case "$dir" in
usr) ;;
*)
if test -d "$dir"; then
rm -rf "$dir"
fi
;;
esac
done
popd
du -sh "$header_dir/usr"
tar -cJf "$header_dir.tar.xz" --owner=root --group=root "${header_dir##*/}"
rm -rf $header_dir linux-${kernel_dir}
rm -rf "$header_dir" "$kernel_dir"

View File

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

View File

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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jan 7 08:32:43 UTC 2019 - schwab@suse.de
- Update to kernel headers 4.20
-------------------------------------------------------------------
Wed Oct 24 14:51:55 UTC 2018 - Jiri Slaby <jslaby@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package linux-glibc-devel
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -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.19
Version: 4.20
Release: 0
Summary: Linux headers for userspace development
License: GPL-2.0-only
@ -25,7 +25,6 @@ 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)
@ -47,7 +46,6 @@ packages, instead.
%prep
%setup -q -n linux-glibc-devel-%{version}
%autopatch -p1
%build
cat > version.h <<\BOGUS
@ -138,7 +136,7 @@ if test -L %{_includedir}/asm
then
case "$(readlink %{_includedir}/asm)" in
*../src/linux/include*)
echo "%{_includedir}/asm points to kernel-source, waiting for triggerpostun to symlink to asm-$asm_link"
echo "%{_includedir}/asm points to kernel-source, waiting for triggerpostun to symlink to arch-$asm_link/asm"
rm -fv %{_includedir}/asm
exit 0
;;
@ -146,7 +144,7 @@ then
# 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"
echo "%{_includedir}/asm is a directory, waiting for triggerpostun to symlink to arch-$asm_link/asm"
exit 0
fi
ln -sfn arch-$asm_link/asm %{_includedir}/asm

View File

@ -1,46 +0,0 @@
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