[gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-headers/files/, sys-kernel/linux-headers/

2024-03-26 Thread Mike Gilbert
commit: 69a5fc41a89f8efd0bba4479af02fe460826868e
Author: Mike Gilbert  gentoo  org>
AuthorDate: Wed Mar 27 00:04:15 2024 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Wed Mar 27 00:07:09 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69a5fc41

sys-kernel/linux-headers: add fix for sparc

Closes: https://bugs.gentoo.org/918992
Signed-off-by: Mike Gilbert  gentoo.org>

 ...sparc-move-struct-termio-to-asm-termios.h.patch | 64 ++
 ...ders-6.6.ebuild => linux-headers-6.6-r1.ebuild} |  6 +-
 ...ders-6.7.ebuild => linux-headers-6.7-r1.ebuild} |  6 +-
 ...ders-6.8.ebuild => linux-headers-6.8-r1.ebuild} |  6 +-
 4 files changed, 76 insertions(+), 6 deletions(-)

diff --git 
a/sys-kernel/linux-headers/files/linux-headers-sparc-move-struct-termio-to-asm-termios.h.patch
 
b/sys-kernel/linux-headers/files/linux-headers-sparc-move-struct-termio-to-asm-termios.h.patch
new file mode 100644
index ..7e8a7353bc6a
--- /dev/null
+++ 
b/sys-kernel/linux-headers/files/linux-headers-sparc-move-struct-termio-to-asm-termios.h.patch
@@ -0,0 +1,64 @@
+https://bugs.gentoo.org/918992
+https://lkml.org/lkml/2024/3/6/1112
+
+From 91577201977e109b2bda95077cb5db30864ab96e Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Tue, 5 Mar 2024 23:19:37 -0500
+Subject: [PATCH] sparc: move struct termio to asm/termios.h
+
+Every other arch declares struct termio in asm/termios.h, so make sparc
+match them.
+
+Resolves a build failure in the PPP software package, which includes
+both bits/ioctl-types.h via sys/ioctl.h (glibc) and asm/termbits.h.
+
+Closes: https://bugs.gentoo.org/918992
+Signed-off-by: Mike Gilbert 
+---
+ arch/sparc/include/uapi/asm/termbits.h | 10 --
+ arch/sparc/include/uapi/asm/termios.h  |  9 +
+ 2 files changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/arch/sparc/include/uapi/asm/termbits.h 
b/arch/sparc/include/uapi/asm/termbits.h
+index 4321322701fc..0da2b1adc0f5 100644
+--- a/arch/sparc/include/uapi/asm/termbits.h
 b/arch/sparc/include/uapi/asm/termbits.h
+@@ -10,16 +10,6 @@ typedef unsigned inttcflag_t;
+ typedef unsigned long tcflag_t;
+ #endif
+ 
+-#define NCC 8
+-struct termio {
+-  unsigned short c_iflag; /* input mode flags */
+-  unsigned short c_oflag; /* output mode flags */
+-  unsigned short c_cflag; /* control mode flags */
+-  unsigned short c_lflag; /* local mode flags */
+-  unsigned char c_line;   /* line discipline */
+-  unsigned char c_cc[NCC];/* control characters */
+-};
+-
+ #define NCCS 17
+ struct termios {
+   tcflag_t c_iflag;   /* input mode flags */
+diff --git a/arch/sparc/include/uapi/asm/termios.h 
b/arch/sparc/include/uapi/asm/termios.h
+index ee86f4093d83..cceb32260881 100644
+--- a/arch/sparc/include/uapi/asm/termios.h
 b/arch/sparc/include/uapi/asm/termios.h
+@@ -40,5 +40,14 @@ struct winsize {
+   unsigned short ws_ypixel;
+ };
+ 
++#define NCC 8
++struct termio {
++  unsigned short c_iflag; /* input mode flags */
++  unsigned short c_oflag; /* output mode flags */
++  unsigned short c_cflag; /* control mode flags */
++  unsigned short c_lflag; /* local mode flags */
++  unsigned char c_line;   /* line discipline */
++  unsigned char c_cc[NCC];/* control characters */
++};
+ 
+ #endif /* _UAPI_SPARC_TERMIOS_H */
+-- 
+2.44.0
+

diff --git a/sys-kernel/linux-headers/linux-headers-6.6.ebuild 
b/sys-kernel/linux-headers/linux-headers-6.6-r1.ebuild
similarity index 88%
rename from sys-kernel/linux-headers/linux-headers-6.6.ebuild
rename to sys-kernel/linux-headers/linux-headers-6.6-r1.ebuild
index 17d8fd815b5c..1b82b2d037f1 100644
--- a/sys-kernel/linux-headers/linux-headers-6.6.ebuild
+++ b/sys-kernel/linux-headers/linux-headers-6.6-r1.ebuild
@@ -24,14 +24,16 @@ BDEPEND="
dev-lang/perl
 "
 
-[[ -n ${PATCH_VER} ]] && PATCHES=( "${WORKDIR}"/${PATCH_PV} )
-
 src_unpack() {
# Avoid kernel-2_src_unpack
default
 }
 
 src_prepare() {
+   local PATCHES=()
+   [[ -n ${PATCH_VER} ]] && PATCHES+=( "${WORKDIR}"/${PATCH_PV} )
+   PATCHES+=( 
"${FILESDIR}"/${PN}-sparc-move-struct-termio-to-asm-termios.h.patch )
+
# TODO: May need forward porting to newer versions
use elibc_musl && PATCHES+=(
"${FILESDIR}"/${PN}-5.15-remove-inclusion-sysinfo.h.patch

diff --git a/sys-kernel/linux-headers/linux-headers-6.7.ebuild 
b/sys-kernel/linux-headers/linux-headers-6.7-r1.ebuild
similarity index 88%
rename from sys-kernel/linux-headers/linux-headers-6.7.ebuild
rename to sys-kernel/linux-headers/linux-headers-6.7-r1.ebuild
index e16c15ac5901..fe49fd6ed12e 100644
--- a/sys-kernel/linux-headers/linux-headers-6.7.ebuild
+++ b/sys-kernel/linux-headers/linux-headers-6.7-r1.ebuild
@@ -24,14 +24,16 @@ BDEPEND="
dev-lang/perl
 "
 
-[[ -n ${PATCH_VER} ]] && PATCHES=( 

[gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-headers/files/, sys-kernel/linux-headers/

2021-12-30 Thread Sam James
commit: 87dd049078d78e654436f3cb084091ef69376ee8
Author: Sam James  gentoo  org>
AuthorDate: Fri Dec 31 02:46:44 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Dec 31 02:50:00 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87dd0490

sys-kernel/linux-headers: fix 5.15 patch

We don't need to drop the const bit, avoids us patching consumers.

Thanks-to: Jory A. Pratt  gentoo.org>
Signed-off-by: Sam James  gentoo.org>

 ...linux-headers-5.15-remove-inclusion-sysinfo.h.patch | 18 +-
 ...ers-5.15-r2.ebuild => linux-headers-5.15-r3.ebuild} |  0
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch
 
b/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch
index 064066f19ef6..11760b93227c 100644
--- 
a/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch
+++ 
b/sys-kernel/linux-headers/files/linux-headers-5.15-remove-inclusion-sysinfo.h.patch
@@ -1,6 +1,8 @@
-Earlier version: 
https://git.alpinelinux.org/aports/tree/main/linux-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
+https://git.alpinelinux.org/aports/tree/main/linux-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
 https://bugs.gentoo.org/828726
 
+[Adapted to drop the const.h change as things may rely on it like btrfs.]
+
 From: rofl0r 
 Date: Mon, 20 Jan 2014 21:31:34 +0100
 Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h
@@ -8,17 +10,15 @@ Subject: [PATCH 3/3] remove inclusion of sysinfo.h in 
kernel.h
 the declaration of struct sysinfo clashes with userspace.
 it's not quite clear why that header was included from kernel.h,
 as none of its functionality is needed.
+
 --- a/include/uapi/linux/kernel.h
 +++ b/include/uapi/linux/kernel.h
-@@ -2,7 +2,9 @@
- #ifndef _UAPI_LINUX_KERNEL_H
- #define _UAPI_LINUX_KERNEL_H
+@@ -4,7 +4,7 @@
  
-+#ifdef __GLIBC__
+ #ifdef __GLIBC__
  #include 
- #include 
-+#endif
+-#include 
+ #endif
++#include 
  
  #endif /* _UAPI_LINUX_KERNEL_H */
-
-

diff --git a/sys-kernel/linux-headers/linux-headers-5.15-r2.ebuild 
b/sys-kernel/linux-headers/linux-headers-5.15-r3.ebuild
similarity index 100%
rename from sys-kernel/linux-headers/linux-headers-5.15-r2.ebuild
rename to sys-kernel/linux-headers/linux-headers-5.15-r3.ebuild



[gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-headers/files/, sys-kernel/linux-headers/

2021-12-30 Thread Sam James
commit: 1ef3659212ff98d2e6bb5df51e405c0953a45fec
Author: Sam James  gentoo  org>
AuthorDate: Thu Dec 30 09:37:33 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 30 09:37:37 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ef36592

sys-kernel/linux-headers: fix 5.10 for musl (sysinfo.h)

Notably fixes btrfs-progs build.

Closes: https://bugs.gentoo.org/828726
Signed-off-by: Sam James  gentoo.org>

 ...x-headers-5.10-remove-inclusion-sysinfo.h.patch | 24 +++
 .../linux-headers/linux-headers-5.10-r2.ebuild | 49 ++
 2 files changed, 73 insertions(+)

diff --git 
a/sys-kernel/linux-headers/files/linux-headers-5.10-remove-inclusion-sysinfo.h.patch
 
b/sys-kernel/linux-headers/files/linux-headers-5.10-remove-inclusion-sysinfo.h.patch
new file mode 100644
index ..7f23d77a71a5
--- /dev/null
+++ 
b/sys-kernel/linux-headers/files/linux-headers-5.10-remove-inclusion-sysinfo.h.patch
@@ -0,0 +1,24 @@
+https://git.alpinelinux.org/aports/tree/main/linux-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
+https://bugs.gentoo.org/828726
+
+From: rofl0r 
+Date: Mon, 20 Jan 2014 21:31:34 +0100
+Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h
+
+the declaration of struct sysinfo clashes with userspace.
+it's not quite clear why that header was included from kernel.h,
+as none of its functionality is needed.
+--- a/include/uapi/linux/kernel.h
 b/include/uapi/linux/kernel.h
+@@ -2,7 +2,9 @@
+ #ifndef _UAPI_LINUX_KERNEL_H
+ #define _UAPI_LINUX_KERNEL_H
+ 
++#ifdef __GLIBC__
+ #include 
++#endif
+ #include 
+ 
+ #endif /* _UAPI_LINUX_KERNEL_H */
+
+

diff --git a/sys-kernel/linux-headers/linux-headers-5.10-r2.ebuild 
b/sys-kernel/linux-headers/linux-headers-5.10-r2.ebuild
new file mode 100644
index ..26138c3d9ff4
--- /dev/null
+++ b/sys-kernel/linux-headers/linux-headers-5.10-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ETYPE="headers"
+H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 cris frv hexagon hppa ia64 
m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 riscv s390 score sh 
sparc x86 xtensa"
+inherit kernel-2 toolchain-funcs
+detect_version
+
+PATCH_PV=${PV} # to ease testing new versions against not existing patches
+PATCH_VER="1"
+SRC_URI="${KERNEL_URI}
+   
${PATCH_VER:+mirror://gentoo/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
+   
${PATCH_VER:+https://dev.gentoo.org/~sam/distfiles/gentoo-headers-${PATCH_PV}-${PATCH_VER}.tar.xz}
+"
+S="${WORKDIR}"/linux-${PV}
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+BDEPEND="app-arch/xz-utils
+   dev-lang/perl"
+
+src_unpack() {
+   unpack ${A}
+}
+
+src_prepare() {
+   [[ -n ${PATCH_VER} ]] && eapply "${WORKDIR}"/${PATCH_PV}/*.patch
+
+   if use elibc_musl ; then
+   # TODO: May need forward porting to newer versions
+   eapply 
"${FILESDIR}"/${PN}-5.10-Use-stddefs.h-instead-of-compiler.h.patch
+   eapply "${FILESDIR}"/${PN}-5.10-remove-inclusion-sysinfo.h.patch
+   fi
+
+   default
+}
+
+src_test() {
+   emake headers_check ${xmakeopts}
+}
+
+src_install() {
+   kernel-2_src_install
+
+   find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
+   find "${ED}" -depth -type d -delete 2>/dev/null
+}