Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] kernel-libc-headers: update to 5.10.
@ 2020-12-14 14:21 ericonr
  2020-12-14 19:17 ` [PR PATCH] [Updated] " ericonr
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: ericonr @ 2020-12-14 14:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages linux5.9
https://github.com/void-linux/void-packages/pull/27145

[WIP] kernel-libc-headers: update to 5.10.
- haven't rebased patches
- requires rsync for install step! BAD

Haven't tried building anything with them yet. Also, this requires a revbump to all the cross toolchains. And the `rsync` part breaks bootstrap, afaik. So gotta turn that into some nice `cp $(find ...)`

A patch file from https://github.com/void-linux/void-packages/pull/27145.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-linux5.9-27145.patch --]
[-- Type: text/x-diff, Size: 11518 bytes --]

From 49ae45a0342ec96037a6bb5f0c46971ea7ca833d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 14 Dec 2020 00:29:26 -0300
Subject: [PATCH] kernel-libc-headers: update to 5.10.

- haven't rebased patches
- requires rsync for install step! BAD
---
 ...c-inclusion-of-sysinfo.h-in-kernel.h.patch |  12 --
 .../1-5-kernel-libc-compat-musl-support.patch | 117 ------------------
 .../patches/1-6-musl-libc-net-compat.patch    | 109 ----------------
 .../patches/1-7-musl-aarch64-asm-ptrace.patch |  28 -----
 srcpkgs/kernel-libc-headers/template          |  12 +-
 5 files changed, 6 insertions(+), 272 deletions(-)
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch

diff --git a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
deleted file mode 100644
index 0fc6df3c2cc..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- include/uapi/linux/kernel.h.orig
-+++ include/uapi/linux/kernel.h
-@@ -1,7 +1,9 @@
- #ifndef _UAPI_LINUX_KERNEL_H
- #define _UAPI_LINUX_KERNEL_H
- 
-+#ifdef __GLIBC__
- #include <linux/sysinfo.h>
-+#endif
- 
- /*
-  * 'kernel.h' contains some often-used function prototypes etc
diff --git a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch b/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
deleted file mode 100644
index 99ab5f791a6..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Source: yopito
-Upstream: No
-Reason: musl compatibility
---- include/uapi/linux/libc-compat.h	2018-11-01 21:44:22.016378667 +0100
-+++ include/uapi/linux/libc-compat.h	2018-11-01 21:54:14.382052324 +0100
-@@ -170,11 +170,102 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+/*
-+ * Support of guessed LIBC musl, since neither glibc nor kernel space.
-+ * Written for musl libc 1.1.16. Mimics the glibc support above.
-+ */
-+#elif !defined(__KERNEL__) /* and not __GLIBC__ */
-+
-+/* Coordinate with musl libc net/if.h header. */
-+#if defined(_NET_IF_H)
-+
-+/* LIBC headers included first so don't define anything
-+ * that would already be defined. */
-+
-+#define __UAPI_DEF_IF_IFCONF		0
-+#define __UAPI_DEF_IF_IFMAP		0
-+#define __UAPI_DEF_IF_IFNAMSIZ		0
-+#define __UAPI_DEF_IF_IFREQ		0
-+
-+/* Everything up to IFF_DYNAMIC, matches net/if.h */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	0
-+
-+/* musl libc defines IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
-+
-+#else /* _NET_IF_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if net/if.h is included later ?  */
-+
-+#define __UAPI_DEF_IF_IFCONF		1
-+#define __UAPI_DEF_IF_IFMAP		1
-+#define __UAPI_DEF_IF_IFNAMSIZ		1
-+#define __UAPI_DEF_IF_IFREQ		1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
-+
-+#endif /* _NET_IF_H */
-+
-+/* Coordinate with musl libc netinet/in.h header. */
-+#if defined(_NETINET_IN_H)
-+
-+/* musl 1.1.16 LIBC netinet/in.h defines the following (to 0),
-+ * so it's useless to set them again:
-+ *   __UAPI_DEF_IN_ADDR        __UAPI_DEF_IN_IPPROTO
-+ *   __UAPI_DEF_IN_PKTINFO     __UAPI_DEF_IP_MREQ
-+ *   __UAPI_DEF_SOCKADDR_IN    __UAPI_DEF_IN_CLASS
-+ *   __UAPI_DEF_IN6_ADDR       __UAPI_DEF_IN6_ADDR_ALT
-+ *   __UAPI_DEF_SOCKADDR_IN6   __UAPI_DEF_IPV6_MREQ
-+ *   __UAPI_DEF_IPPROTO_V6     __UAPI_DEF_IPV6_OPTIONS
-+ *   __UAPI_DEF_IN6_PKTINFO    __UAPI_DEF_IP6_MTUINFO
-+ */
-+
-+#else /* _NETINET_IN_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if netinet/in.h is included later ? */
-+
-+#define __UAPI_DEF_IN_ADDR		1
-+#define __UAPI_DEF_IN_IPPROTO		1
-+#define __UAPI_DEF_IN_PKTINFO		1
-+#define __UAPI_DEF_IP_MREQ		1
-+#define __UAPI_DEF_SOCKADDR_IN		1
-+#define __UAPI_DEF_IN_CLASS		1
-+
-+#define __UAPI_DEF_IN6_ADDR		1
-+#define __UAPI_DEF_IN6_ADDR_ALT		1
-+#define __UAPI_DEF_SOCKADDR_IN6		1
-+#define __UAPI_DEF_IPV6_MREQ		1
-+#define __UAPI_DEF_IPPROTO_V6		1
-+#define __UAPI_DEF_IPV6_OPTIONS		1
-+#define __UAPI_DEF_IN6_PKTINFO		1
-+#define __UAPI_DEF_IP6_MTUINFO		1
-+
-+#endif /* _NETINET_IN_H */
-+
-+/* musl libc does not provide IPX support */
-+#define __UAPI_DEF_SOCKADDR_IPX			1
-+#define __UAPI_DEF_IPX_ROUTE_DEFINITION		1
-+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION	1
-+#define __UAPI_DEF_IPX_CONFIG_DATA		1
-+#define __UAPI_DEF_IPX_ROUTE_DEF		1
-+
-+/* Definitions for sys/xattr.h */
-+#if defined(_SYS_XATTR_H)
-+#define __UAPI_DEF_XATTR		0
-+#else
-+#define __UAPI_DEF_XATTR		1
-+#endif
-+
-+
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
-  * that we need. Check for previous __UAPI_* definitions to give
-  * unsupported C libraries a way to opt out of any kernel definition. */
--#else /* !defined(__GLIBC__) */
-+#else /* defined(__KERNEL__) */
- 
- /* Definitions for if.h */
- #ifndef __UAPI_DEF_IF_IFCONF
-@@ -266,6 +357,6 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
--#endif /* __GLIBC__ */
-+#endif /* __KERNEL__ or __GLIBC__ or libc */
- 
- #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch b/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
deleted file mode 100644
index 65a70e18443..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-diff -u -r linux-4.9.8-bak/include/uapi/linux/if_arp.h linux-4.9.8/include/uapi/linux/if_arp.h
---- include/uapi/linux/if_arp.h	2018-05-14 23:49:28.882768986 +0200
-+++ include/uapi/linux/if_arp.h	2018-05-14 23:50:03.156912981 +0200
-@@ -24,6 +24,7 @@
- #define _UAPI_LINUX_IF_ARP_H
- 
- #include <linux/netdevice.h>
-+#include <linux/libc-compat.h>
- 
- /* ARP protocol HARDWARE identifiers. */
- #define ARPHRD_NETROM	0		/* from KA9Q: NET/ROM pseudo	*/
-@@ -108,7 +109,7 @@
- #define	ARPOP_InREPLY	9		/* InARP reply			*/
- #define	ARPOP_NAK	10		/* (ATM)ARP NAK			*/
- 
--
-+#if __UAPI_DEF_ARPREQ
- /* ARP ioctl request. */
- struct arpreq {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-@@ -117,13 +118,15 @@
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
-   char			arp_dev[16];
- };
--
-+#endif
-+#if __UAPI_DEF_ARPREQ_OLD
- struct arpreq_old {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-   struct sockaddr	arp_ha;		/* hardware address		*/
-   int			arp_flags;	/* flags			*/
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
- };
-+#endif
- 
- /* ARP Flag values. */
- #define ATF_COM		0x02		/* completed entry (ha valid)	*/
-@@ -133,7 +136,7 @@
- #define ATF_NETMASK     0x20            /* want to use a netmask (only
- 					   for proxy entries) */
- #define ATF_DONTPUB	0x40		/* don't answer this addresses	*/
--
-+#if __UAPI_DEF_ARPHDR
- /*
-  *	This structure defines an ethernet arp header.
-  */
-@@ -156,6 +159,6 @@
- #endif
- 
- };
--
-+#endif
- 
- #endif /* _UAPI_LINUX_IF_ARP_H */
-diff -u -r linux-4.9.8-bak/include/uapi/linux/libc-compat.h linux-4.9.8/include/uapi/linux/libc-compat.h
---- include/uapi/linux/libc-compat.h	2018-05-14 23:49:28.885768999 +0200
-+++ include/uapi/linux/libc-compat.h	2018-05-14 23:50:03.156912981 +0200
-@@ -51,6 +51,11 @@
- /* We have included glibc headers... */
- #if defined(__GLIBC__)
- 
-+#define __UAPI_DEF_ETHHDR 1
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+
- /* Coordinate with glibc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
- 
-@@ -73,7 +78,6 @@
- /* Linux headers included first, and we must define everything
-  * we need. The expectation is that glibc will check the
-  * __UAPI_DEF_* defines and adjust appropriately. */
--
- #define __UAPI_DEF_IF_IFCONF 1
- #define __UAPI_DEF_IF_IFMAP 1
- #define __UAPI_DEF_IF_IFNAMSIZ 1
-@@ -256,6 +260,21 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+#ifdef _NETINET_IF_ETHER_H /* musl */
-+#define __UAPI_DEF_ETHHDR 0
-+#else
-+#define __UAPI_DEF_ETHHDR 1
-+#endif
-+
-+#ifdef _NET_IF_ARP_H
-+#define __UAPI_DEF_ARPREQ 0
-+#define __UAPI_DEF_ARPREQ_OLD 0
-+#define __UAPI_DEF_ARPHDR 0
-+#else
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+#endif
- 
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
---- include/uapi/linux/if_ether.h	2018-11-01 21:25:05.338466089 +0100
-+++ include/uapi/linux/if_ether.h	2018-11-01 21:26:07.819172903 +0100
-@@ -23,6 +23,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
- 
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
- 
- /*
-  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
diff --git a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch b/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
deleted file mode 100644
index 970e342a97c..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Work around redefinition of sigcontext in libc headers
-
-Introduced with:
-https://github.com/torvalds/linux/commit/43d4da2c45b2f5d62f8a79ff7c6f95089bb24656
-
-diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
-index 98c4ce5..c44efed 100644
---- arch/arm64/include/uapi/asm/ptrace.h
-+++ arch/arm64/include/uapi/asm/ptrace.h
-@@ -23,8 +23,6 @@
- #include <linux/types.h>
- 
- #include <asm/hwcap.h>
--#include <asm/sigcontext.h>
--
- 
- /*
-  * PSR bits
-@@ -64,8 +62,6 @@
- 
- #ifndef __ASSEMBLY__
- 
--#include <linux/prctl.h>
--
- /*
-  * User structures for general purpose, floating point and debug registers.
-  */
-
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 2cae8e99e30..48c58793e8d 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -1,20 +1,20 @@
 # Template file for 'kernel-libc-headers'
 pkgname=kernel-libc-headers
-version=4.19.0
-revision=2
+version=5.10
+revision=1
 bootstrap=yes
 nostrip=yes
 noverifyrdeps=yes
 noshlibprovides=yes
-wrksrc=linux-${version%.*}
+wrksrc=linux-${version}
 short_desc="The Linux API headers for userland development"
 license="GPL-2.0-only"
 homepage="http://www.kernel.org"
-distfiles="$KERNEL_SITE/kernel/v4.x/linux-${version%.*}.tar.xz"
-checksum=0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+distfiles="$KERNEL_SITE/kernel/v${version%%.*}.x/linux-${version}.tar.xz"
+checksum=dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43
 
 if [ "$CHROOT_READY" ]; then
-	hostmakedepends="perl"
+	hostmakedepends="perl rsync"
 fi
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
@ 2020-12-14 19:17 ` ericonr
  2020-12-14 19:20 ` ericonr
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-14 19:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages linux5.9
https://github.com/void-linux/void-packages/pull/27145

[WIP] kernel-libc-headers: update to 5.10.
- haven't rebased patches
- requires rsync for install step! BAD

Haven't tried building anything with them yet. Also, this requires a revbump to all the cross toolchains. And the `rsync` part breaks bootstrap, afaik. So gotta turn that into some nice `cp $(find ...)`

https://github.com/torvalds/linux/blob/v5.10/Makefile#L1280

A patch file from https://github.com/void-linux/void-packages/pull/27145.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-linux5.9-27145.patch --]
[-- Type: text/x-diff, Size: 12379 bytes --]

From 2c120846aa3869eeb58035942da2785719b68ce6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 14 Dec 2020 00:29:26 -0300
Subject: [PATCH] kernel-libc-headers: update to 5.10.

- haven't rebased patches
- add patch to remove rsync requirement
---
 ...c-inclusion-of-sysinfo.h-in-kernel.h.patch |  12 --
 .../1-5-kernel-libc-compat-musl-support.patch | 117 ------------------
 .../patches/1-6-musl-libc-net-compat.patch    | 109 ----------------
 .../patches/1-7-musl-aarch64-asm-ptrace.patch |  28 -----
 .../patches/no-rsync.patch                    |  15 +++
 srcpkgs/kernel-libc-headers/template          |  10 +-
 6 files changed, 20 insertions(+), 271 deletions(-)
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
 create mode 100644 srcpkgs/kernel-libc-headers/patches/no-rsync.patch

diff --git a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
deleted file mode 100644
index 0fc6df3c2cc..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- include/uapi/linux/kernel.h.orig
-+++ include/uapi/linux/kernel.h
-@@ -1,7 +1,9 @@
- #ifndef _UAPI_LINUX_KERNEL_H
- #define _UAPI_LINUX_KERNEL_H
- 
-+#ifdef __GLIBC__
- #include <linux/sysinfo.h>
-+#endif
- 
- /*
-  * 'kernel.h' contains some often-used function prototypes etc
diff --git a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch b/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
deleted file mode 100644
index 99ab5f791a6..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Source: yopito
-Upstream: No
-Reason: musl compatibility
---- include/uapi/linux/libc-compat.h	2018-11-01 21:44:22.016378667 +0100
-+++ include/uapi/linux/libc-compat.h	2018-11-01 21:54:14.382052324 +0100
-@@ -170,11 +170,102 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+/*
-+ * Support of guessed LIBC musl, since neither glibc nor kernel space.
-+ * Written for musl libc 1.1.16. Mimics the glibc support above.
-+ */
-+#elif !defined(__KERNEL__) /* and not __GLIBC__ */
-+
-+/* Coordinate with musl libc net/if.h header. */
-+#if defined(_NET_IF_H)
-+
-+/* LIBC headers included first so don't define anything
-+ * that would already be defined. */
-+
-+#define __UAPI_DEF_IF_IFCONF		0
-+#define __UAPI_DEF_IF_IFMAP		0
-+#define __UAPI_DEF_IF_IFNAMSIZ		0
-+#define __UAPI_DEF_IF_IFREQ		0
-+
-+/* Everything up to IFF_DYNAMIC, matches net/if.h */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	0
-+
-+/* musl libc defines IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
-+
-+#else /* _NET_IF_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if net/if.h is included later ?  */
-+
-+#define __UAPI_DEF_IF_IFCONF		1
-+#define __UAPI_DEF_IF_IFMAP		1
-+#define __UAPI_DEF_IF_IFNAMSIZ		1
-+#define __UAPI_DEF_IF_IFREQ		1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
-+
-+#endif /* _NET_IF_H */
-+
-+/* Coordinate with musl libc netinet/in.h header. */
-+#if defined(_NETINET_IN_H)
-+
-+/* musl 1.1.16 LIBC netinet/in.h defines the following (to 0),
-+ * so it's useless to set them again:
-+ *   __UAPI_DEF_IN_ADDR        __UAPI_DEF_IN_IPPROTO
-+ *   __UAPI_DEF_IN_PKTINFO     __UAPI_DEF_IP_MREQ
-+ *   __UAPI_DEF_SOCKADDR_IN    __UAPI_DEF_IN_CLASS
-+ *   __UAPI_DEF_IN6_ADDR       __UAPI_DEF_IN6_ADDR_ALT
-+ *   __UAPI_DEF_SOCKADDR_IN6   __UAPI_DEF_IPV6_MREQ
-+ *   __UAPI_DEF_IPPROTO_V6     __UAPI_DEF_IPV6_OPTIONS
-+ *   __UAPI_DEF_IN6_PKTINFO    __UAPI_DEF_IP6_MTUINFO
-+ */
-+
-+#else /* _NETINET_IN_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if netinet/in.h is included later ? */
-+
-+#define __UAPI_DEF_IN_ADDR		1
-+#define __UAPI_DEF_IN_IPPROTO		1
-+#define __UAPI_DEF_IN_PKTINFO		1
-+#define __UAPI_DEF_IP_MREQ		1
-+#define __UAPI_DEF_SOCKADDR_IN		1
-+#define __UAPI_DEF_IN_CLASS		1
-+
-+#define __UAPI_DEF_IN6_ADDR		1
-+#define __UAPI_DEF_IN6_ADDR_ALT		1
-+#define __UAPI_DEF_SOCKADDR_IN6		1
-+#define __UAPI_DEF_IPV6_MREQ		1
-+#define __UAPI_DEF_IPPROTO_V6		1
-+#define __UAPI_DEF_IPV6_OPTIONS		1
-+#define __UAPI_DEF_IN6_PKTINFO		1
-+#define __UAPI_DEF_IP6_MTUINFO		1
-+
-+#endif /* _NETINET_IN_H */
-+
-+/* musl libc does not provide IPX support */
-+#define __UAPI_DEF_SOCKADDR_IPX			1
-+#define __UAPI_DEF_IPX_ROUTE_DEFINITION		1
-+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION	1
-+#define __UAPI_DEF_IPX_CONFIG_DATA		1
-+#define __UAPI_DEF_IPX_ROUTE_DEF		1
-+
-+/* Definitions for sys/xattr.h */
-+#if defined(_SYS_XATTR_H)
-+#define __UAPI_DEF_XATTR		0
-+#else
-+#define __UAPI_DEF_XATTR		1
-+#endif
-+
-+
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
-  * that we need. Check for previous __UAPI_* definitions to give
-  * unsupported C libraries a way to opt out of any kernel definition. */
--#else /* !defined(__GLIBC__) */
-+#else /* defined(__KERNEL__) */
- 
- /* Definitions for if.h */
- #ifndef __UAPI_DEF_IF_IFCONF
-@@ -266,6 +357,6 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
--#endif /* __GLIBC__ */
-+#endif /* __KERNEL__ or __GLIBC__ or libc */
- 
- #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch b/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
deleted file mode 100644
index 65a70e18443..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-diff -u -r linux-4.9.8-bak/include/uapi/linux/if_arp.h linux-4.9.8/include/uapi/linux/if_arp.h
---- include/uapi/linux/if_arp.h	2018-05-14 23:49:28.882768986 +0200
-+++ include/uapi/linux/if_arp.h	2018-05-14 23:50:03.156912981 +0200
-@@ -24,6 +24,7 @@
- #define _UAPI_LINUX_IF_ARP_H
- 
- #include <linux/netdevice.h>
-+#include <linux/libc-compat.h>
- 
- /* ARP protocol HARDWARE identifiers. */
- #define ARPHRD_NETROM	0		/* from KA9Q: NET/ROM pseudo	*/
-@@ -108,7 +109,7 @@
- #define	ARPOP_InREPLY	9		/* InARP reply			*/
- #define	ARPOP_NAK	10		/* (ATM)ARP NAK			*/
- 
--
-+#if __UAPI_DEF_ARPREQ
- /* ARP ioctl request. */
- struct arpreq {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-@@ -117,13 +118,15 @@
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
-   char			arp_dev[16];
- };
--
-+#endif
-+#if __UAPI_DEF_ARPREQ_OLD
- struct arpreq_old {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-   struct sockaddr	arp_ha;		/* hardware address		*/
-   int			arp_flags;	/* flags			*/
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
- };
-+#endif
- 
- /* ARP Flag values. */
- #define ATF_COM		0x02		/* completed entry (ha valid)	*/
-@@ -133,7 +136,7 @@
- #define ATF_NETMASK     0x20            /* want to use a netmask (only
- 					   for proxy entries) */
- #define ATF_DONTPUB	0x40		/* don't answer this addresses	*/
--
-+#if __UAPI_DEF_ARPHDR
- /*
-  *	This structure defines an ethernet arp header.
-  */
-@@ -156,6 +159,6 @@
- #endif
- 
- };
--
-+#endif
- 
- #endif /* _UAPI_LINUX_IF_ARP_H */
-diff -u -r linux-4.9.8-bak/include/uapi/linux/libc-compat.h linux-4.9.8/include/uapi/linux/libc-compat.h
---- include/uapi/linux/libc-compat.h	2018-05-14 23:49:28.885768999 +0200
-+++ include/uapi/linux/libc-compat.h	2018-05-14 23:50:03.156912981 +0200
-@@ -51,6 +51,11 @@
- /* We have included glibc headers... */
- #if defined(__GLIBC__)
- 
-+#define __UAPI_DEF_ETHHDR 1
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+
- /* Coordinate with glibc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
- 
-@@ -73,7 +78,6 @@
- /* Linux headers included first, and we must define everything
-  * we need. The expectation is that glibc will check the
-  * __UAPI_DEF_* defines and adjust appropriately. */
--
- #define __UAPI_DEF_IF_IFCONF 1
- #define __UAPI_DEF_IF_IFMAP 1
- #define __UAPI_DEF_IF_IFNAMSIZ 1
-@@ -256,6 +260,21 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+#ifdef _NETINET_IF_ETHER_H /* musl */
-+#define __UAPI_DEF_ETHHDR 0
-+#else
-+#define __UAPI_DEF_ETHHDR 1
-+#endif
-+
-+#ifdef _NET_IF_ARP_H
-+#define __UAPI_DEF_ARPREQ 0
-+#define __UAPI_DEF_ARPREQ_OLD 0
-+#define __UAPI_DEF_ARPHDR 0
-+#else
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+#endif
- 
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
---- include/uapi/linux/if_ether.h	2018-11-01 21:25:05.338466089 +0100
-+++ include/uapi/linux/if_ether.h	2018-11-01 21:26:07.819172903 +0100
-@@ -23,6 +23,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
- 
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
- 
- /*
-  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
diff --git a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch b/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
deleted file mode 100644
index 970e342a97c..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Work around redefinition of sigcontext in libc headers
-
-Introduced with:
-https://github.com/torvalds/linux/commit/43d4da2c45b2f5d62f8a79ff7c6f95089bb24656
-
-diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
-index 98c4ce5..c44efed 100644
---- arch/arm64/include/uapi/asm/ptrace.h
-+++ arch/arm64/include/uapi/asm/ptrace.h
-@@ -23,8 +23,6 @@
- #include <linux/types.h>
- 
- #include <asm/hwcap.h>
--#include <asm/sigcontext.h>
--
- 
- /*
-  * PSR bits
-@@ -64,8 +62,6 @@
- 
- #ifndef __ASSEMBLY__
- 
--#include <linux/prctl.h>
--
- /*
-  * User structures for general purpose, floating point and debug registers.
-  */
-
diff --git a/srcpkgs/kernel-libc-headers/patches/no-rsync.patch b/srcpkgs/kernel-libc-headers/patches/no-rsync.patch
new file mode 100644
index 00000000000..e986c5f6d11
--- /dev/null
+++ b/srcpkgs/kernel-libc-headers/patches/no-rsync.patch
@@ -0,0 +1,15 @@
+diff --git Makefile Makefile
+index e30cf02..f0c7fa9 100644
+--- Makefile
++++ Makefile
+@@ -1277,8 +1277,8 @@ export INSTALL_HDR_PATH = $(objtree)/usr
+ quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
+       cmd_headers_install = \
+ 	mkdir -p $(INSTALL_HDR_PATH); \
+-	rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
+-	usr/include $(INSTALL_HDR_PATH)
++	cp -r usr/include $(INSTALL_HDR_PATH); \
++	find $(INSTALL_HDR_PATH) -type f ! -name "*\.h" -delete
+ 
+ PHONY += headers_install
+ headers_install: headers
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 2cae8e99e30..e225c5f6c0e 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -1,17 +1,17 @@
 # Template file for 'kernel-libc-headers'
 pkgname=kernel-libc-headers
-version=4.19.0
-revision=2
+version=5.10
+revision=1
 bootstrap=yes
 nostrip=yes
 noverifyrdeps=yes
 noshlibprovides=yes
-wrksrc=linux-${version%.*}
+wrksrc=linux-${version}
 short_desc="The Linux API headers for userland development"
 license="GPL-2.0-only"
 homepage="http://www.kernel.org"
-distfiles="$KERNEL_SITE/kernel/v4.x/linux-${version%.*}.tar.xz"
-checksum=0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+distfiles="$KERNEL_SITE/kernel/v${version%%.*}.x/linux-${version}.tar.xz"
+checksum=dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43
 
 if [ "$CHROOT_READY" ]; then
 	hostmakedepends="perl"

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
  2020-12-14 19:17 ` [PR PATCH] [Updated] " ericonr
@ 2020-12-14 19:20 ` ericonr
  2020-12-14 22:54 ` ericonr
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-14 19:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages linux5.9
https://github.com/void-linux/void-packages/pull/27145

[WIP] kernel-libc-headers: update to 5.10.
- haven't rebased patches
- requires rsync for install step! BAD

Haven't tried building anything with them yet. Also, this requires a revbump to all the cross toolchains. And the `rsync` part breaks bootstrap, afaik. So gotta turn that into some nice `cp $(find ...)`

https://github.com/torvalds/linux/blob/v5.10/Makefile#L1280

A patch file from https://github.com/void-linux/void-packages/pull/27145.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-linux5.9-27145.patch --]
[-- Type: text/x-diff, Size: 12508 bytes --]

From f525923d787e99c1e53ba61ba0d2e83174e0206d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 14 Dec 2020 00:29:26 -0300
Subject: [PATCH] kernel-libc-headers: update to 5.10, adopt.

- haven't rebased patches !!! BAD !!!
- add patch to remove rsync requirement
---
 ...c-inclusion-of-sysinfo.h-in-kernel.h.patch |  12 --
 .../1-5-kernel-libc-compat-musl-support.patch | 117 ------------------
 .../patches/1-6-musl-libc-net-compat.patch    | 109 ----------------
 .../patches/1-7-musl-aarch64-asm-ptrace.patch |  28 -----
 .../patches/no-rsync.patch                    |  15 +++
 srcpkgs/kernel-libc-headers/template          |  16 ++-
 6 files changed, 22 insertions(+), 275 deletions(-)
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
 create mode 100644 srcpkgs/kernel-libc-headers/patches/no-rsync.patch

diff --git a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
deleted file mode 100644
index 0fc6df3c2cc..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- include/uapi/linux/kernel.h.orig
-+++ include/uapi/linux/kernel.h
-@@ -1,7 +1,9 @@
- #ifndef _UAPI_LINUX_KERNEL_H
- #define _UAPI_LINUX_KERNEL_H
- 
-+#ifdef __GLIBC__
- #include <linux/sysinfo.h>
-+#endif
- 
- /*
-  * 'kernel.h' contains some often-used function prototypes etc
diff --git a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch b/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
deleted file mode 100644
index 99ab5f791a6..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Source: yopito
-Upstream: No
-Reason: musl compatibility
---- include/uapi/linux/libc-compat.h	2018-11-01 21:44:22.016378667 +0100
-+++ include/uapi/linux/libc-compat.h	2018-11-01 21:54:14.382052324 +0100
-@@ -170,11 +170,102 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+/*
-+ * Support of guessed LIBC musl, since neither glibc nor kernel space.
-+ * Written for musl libc 1.1.16. Mimics the glibc support above.
-+ */
-+#elif !defined(__KERNEL__) /* and not __GLIBC__ */
-+
-+/* Coordinate with musl libc net/if.h header. */
-+#if defined(_NET_IF_H)
-+
-+/* LIBC headers included first so don't define anything
-+ * that would already be defined. */
-+
-+#define __UAPI_DEF_IF_IFCONF		0
-+#define __UAPI_DEF_IF_IFMAP		0
-+#define __UAPI_DEF_IF_IFNAMSIZ		0
-+#define __UAPI_DEF_IF_IFREQ		0
-+
-+/* Everything up to IFF_DYNAMIC, matches net/if.h */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	0
-+
-+/* musl libc defines IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
-+
-+#else /* _NET_IF_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if net/if.h is included later ?  */
-+
-+#define __UAPI_DEF_IF_IFCONF		1
-+#define __UAPI_DEF_IF_IFMAP		1
-+#define __UAPI_DEF_IF_IFNAMSIZ		1
-+#define __UAPI_DEF_IF_IFREQ		1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
-+
-+#endif /* _NET_IF_H */
-+
-+/* Coordinate with musl libc netinet/in.h header. */
-+#if defined(_NETINET_IN_H)
-+
-+/* musl 1.1.16 LIBC netinet/in.h defines the following (to 0),
-+ * so it's useless to set them again:
-+ *   __UAPI_DEF_IN_ADDR        __UAPI_DEF_IN_IPPROTO
-+ *   __UAPI_DEF_IN_PKTINFO     __UAPI_DEF_IP_MREQ
-+ *   __UAPI_DEF_SOCKADDR_IN    __UAPI_DEF_IN_CLASS
-+ *   __UAPI_DEF_IN6_ADDR       __UAPI_DEF_IN6_ADDR_ALT
-+ *   __UAPI_DEF_SOCKADDR_IN6   __UAPI_DEF_IPV6_MREQ
-+ *   __UAPI_DEF_IPPROTO_V6     __UAPI_DEF_IPV6_OPTIONS
-+ *   __UAPI_DEF_IN6_PKTINFO    __UAPI_DEF_IP6_MTUINFO
-+ */
-+
-+#else /* _NETINET_IN_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if netinet/in.h is included later ? */
-+
-+#define __UAPI_DEF_IN_ADDR		1
-+#define __UAPI_DEF_IN_IPPROTO		1
-+#define __UAPI_DEF_IN_PKTINFO		1
-+#define __UAPI_DEF_IP_MREQ		1
-+#define __UAPI_DEF_SOCKADDR_IN		1
-+#define __UAPI_DEF_IN_CLASS		1
-+
-+#define __UAPI_DEF_IN6_ADDR		1
-+#define __UAPI_DEF_IN6_ADDR_ALT		1
-+#define __UAPI_DEF_SOCKADDR_IN6		1
-+#define __UAPI_DEF_IPV6_MREQ		1
-+#define __UAPI_DEF_IPPROTO_V6		1
-+#define __UAPI_DEF_IPV6_OPTIONS		1
-+#define __UAPI_DEF_IN6_PKTINFO		1
-+#define __UAPI_DEF_IP6_MTUINFO		1
-+
-+#endif /* _NETINET_IN_H */
-+
-+/* musl libc does not provide IPX support */
-+#define __UAPI_DEF_SOCKADDR_IPX			1
-+#define __UAPI_DEF_IPX_ROUTE_DEFINITION		1
-+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION	1
-+#define __UAPI_DEF_IPX_CONFIG_DATA		1
-+#define __UAPI_DEF_IPX_ROUTE_DEF		1
-+
-+/* Definitions for sys/xattr.h */
-+#if defined(_SYS_XATTR_H)
-+#define __UAPI_DEF_XATTR		0
-+#else
-+#define __UAPI_DEF_XATTR		1
-+#endif
-+
-+
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
-  * that we need. Check for previous __UAPI_* definitions to give
-  * unsupported C libraries a way to opt out of any kernel definition. */
--#else /* !defined(__GLIBC__) */
-+#else /* defined(__KERNEL__) */
- 
- /* Definitions for if.h */
- #ifndef __UAPI_DEF_IF_IFCONF
-@@ -266,6 +357,6 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
--#endif /* __GLIBC__ */
-+#endif /* __KERNEL__ or __GLIBC__ or libc */
- 
- #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch b/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
deleted file mode 100644
index 65a70e18443..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-diff -u -r linux-4.9.8-bak/include/uapi/linux/if_arp.h linux-4.9.8/include/uapi/linux/if_arp.h
---- include/uapi/linux/if_arp.h	2018-05-14 23:49:28.882768986 +0200
-+++ include/uapi/linux/if_arp.h	2018-05-14 23:50:03.156912981 +0200
-@@ -24,6 +24,7 @@
- #define _UAPI_LINUX_IF_ARP_H
- 
- #include <linux/netdevice.h>
-+#include <linux/libc-compat.h>
- 
- /* ARP protocol HARDWARE identifiers. */
- #define ARPHRD_NETROM	0		/* from KA9Q: NET/ROM pseudo	*/
-@@ -108,7 +109,7 @@
- #define	ARPOP_InREPLY	9		/* InARP reply			*/
- #define	ARPOP_NAK	10		/* (ATM)ARP NAK			*/
- 
--
-+#if __UAPI_DEF_ARPREQ
- /* ARP ioctl request. */
- struct arpreq {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-@@ -117,13 +118,15 @@
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
-   char			arp_dev[16];
- };
--
-+#endif
-+#if __UAPI_DEF_ARPREQ_OLD
- struct arpreq_old {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-   struct sockaddr	arp_ha;		/* hardware address		*/
-   int			arp_flags;	/* flags			*/
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
- };
-+#endif
- 
- /* ARP Flag values. */
- #define ATF_COM		0x02		/* completed entry (ha valid)	*/
-@@ -133,7 +136,7 @@
- #define ATF_NETMASK     0x20            /* want to use a netmask (only
- 					   for proxy entries) */
- #define ATF_DONTPUB	0x40		/* don't answer this addresses	*/
--
-+#if __UAPI_DEF_ARPHDR
- /*
-  *	This structure defines an ethernet arp header.
-  */
-@@ -156,6 +159,6 @@
- #endif
- 
- };
--
-+#endif
- 
- #endif /* _UAPI_LINUX_IF_ARP_H */
-diff -u -r linux-4.9.8-bak/include/uapi/linux/libc-compat.h linux-4.9.8/include/uapi/linux/libc-compat.h
---- include/uapi/linux/libc-compat.h	2018-05-14 23:49:28.885768999 +0200
-+++ include/uapi/linux/libc-compat.h	2018-05-14 23:50:03.156912981 +0200
-@@ -51,6 +51,11 @@
- /* We have included glibc headers... */
- #if defined(__GLIBC__)
- 
-+#define __UAPI_DEF_ETHHDR 1
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+
- /* Coordinate with glibc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
- 
-@@ -73,7 +78,6 @@
- /* Linux headers included first, and we must define everything
-  * we need. The expectation is that glibc will check the
-  * __UAPI_DEF_* defines and adjust appropriately. */
--
- #define __UAPI_DEF_IF_IFCONF 1
- #define __UAPI_DEF_IF_IFMAP 1
- #define __UAPI_DEF_IF_IFNAMSIZ 1
-@@ -256,6 +260,21 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+#ifdef _NETINET_IF_ETHER_H /* musl */
-+#define __UAPI_DEF_ETHHDR 0
-+#else
-+#define __UAPI_DEF_ETHHDR 1
-+#endif
-+
-+#ifdef _NET_IF_ARP_H
-+#define __UAPI_DEF_ARPREQ 0
-+#define __UAPI_DEF_ARPREQ_OLD 0
-+#define __UAPI_DEF_ARPHDR 0
-+#else
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+#endif
- 
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
---- include/uapi/linux/if_ether.h	2018-11-01 21:25:05.338466089 +0100
-+++ include/uapi/linux/if_ether.h	2018-11-01 21:26:07.819172903 +0100
-@@ -23,6 +23,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
- 
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
- 
- /*
-  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
diff --git a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch b/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
deleted file mode 100644
index 970e342a97c..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Work around redefinition of sigcontext in libc headers
-
-Introduced with:
-https://github.com/torvalds/linux/commit/43d4da2c45b2f5d62f8a79ff7c6f95089bb24656
-
-diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
-index 98c4ce5..c44efed 100644
---- arch/arm64/include/uapi/asm/ptrace.h
-+++ arch/arm64/include/uapi/asm/ptrace.h
-@@ -23,8 +23,6 @@
- #include <linux/types.h>
- 
- #include <asm/hwcap.h>
--#include <asm/sigcontext.h>
--
- 
- /*
-  * PSR bits
-@@ -64,8 +62,6 @@
- 
- #ifndef __ASSEMBLY__
- 
--#include <linux/prctl.h>
--
- /*
-  * User structures for general purpose, floating point and debug registers.
-  */
-
diff --git a/srcpkgs/kernel-libc-headers/patches/no-rsync.patch b/srcpkgs/kernel-libc-headers/patches/no-rsync.patch
new file mode 100644
index 00000000000..e986c5f6d11
--- /dev/null
+++ b/srcpkgs/kernel-libc-headers/patches/no-rsync.patch
@@ -0,0 +1,15 @@
+diff --git Makefile Makefile
+index e30cf02..f0c7fa9 100644
+--- Makefile
++++ Makefile
+@@ -1277,8 +1277,8 @@ export INSTALL_HDR_PATH = $(objtree)/usr
+ quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
+       cmd_headers_install = \
+ 	mkdir -p $(INSTALL_HDR_PATH); \
+-	rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
+-	usr/include $(INSTALL_HDR_PATH)
++	cp -r usr/include $(INSTALL_HDR_PATH); \
++	find $(INSTALL_HDR_PATH) -type f ! -name "*\.h" -delete
+ 
+ PHONY += headers_install
+ headers_install: headers
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 2cae8e99e30..715e0be8174 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -1,17 +1,15 @@
 # Template file for 'kernel-libc-headers'
 pkgname=kernel-libc-headers
-version=4.19.0
-revision=2
+version=5.10
+revision=1
 bootstrap=yes
-nostrip=yes
-noverifyrdeps=yes
-noshlibprovides=yes
-wrksrc=linux-${version%.*}
-short_desc="The Linux API headers for userland development"
+wrksrc=linux-${version}
+short_desc="Linux API headers for userland development"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="GPL-2.0-only"
 homepage="http://www.kernel.org"
-distfiles="$KERNEL_SITE/kernel/v4.x/linux-${version%.*}.tar.xz"
-checksum=0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+distfiles="$KERNEL_SITE/kernel/v${version%%.*}.x/linux-${version}.tar.xz"
+checksum=dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43
 
 if [ "$CHROOT_READY" ]; then
 	hostmakedepends="perl"

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
  2020-12-14 19:17 ` [PR PATCH] [Updated] " ericonr
  2020-12-14 19:20 ` ericonr
@ 2020-12-14 22:54 ` ericonr
  2020-12-15  0:43 ` [PR REVIEW] " sgn
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-14 22:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages linux5.9
https://github.com/void-linux/void-packages/pull/27145

[WIP] kernel-libc-headers: update to 5.10.
- haven't rebased patches
- requires rsync for install step! BAD

Haven't tried building anything with them yet. Also, this requires a revbump to all the cross toolchains. And the `rsync` part breaks bootstrap, afaik. So gotta turn that into some nice `cp $(find ...)`

https://github.com/torvalds/linux/blob/v5.10/Makefile#L1280

A patch file from https://github.com/void-linux/void-packages/pull/27145.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-linux5.9-27145.patch --]
[-- Type: text/x-diff, Size: 12604 bytes --]

From b159a6c03716537930d9e87fe49b421f7e19b54a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Mon, 14 Dec 2020 00:29:26 -0300
Subject: [PATCH] kernel-libc-headers: update to 5.10, adopt.

- haven't rebased patches !!! BAD !!!
- add patch to remove rsync requirement
---
 ...c-inclusion-of-sysinfo.h-in-kernel.h.patch |  12 --
 .../1-5-kernel-libc-compat-musl-support.patch | 117 ------------------
 .../patches/1-6-musl-libc-net-compat.patch    | 109 ----------------
 .../patches/1-7-musl-aarch64-asm-ptrace.patch |  28 -----
 .../patches/no-rsync.patch                    |  14 +++
 srcpkgs/kernel-libc-headers/template          |  16 ++-
 6 files changed, 21 insertions(+), 275 deletions(-)
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
 create mode 100644 srcpkgs/kernel-libc-headers/patches/no-rsync.patch

diff --git a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
deleted file mode 100644
index 0fc6df3c2cc..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- include/uapi/linux/kernel.h.orig
-+++ include/uapi/linux/kernel.h
-@@ -1,7 +1,9 @@
- #ifndef _UAPI_LINUX_KERNEL_H
- #define _UAPI_LINUX_KERNEL_H
- 
-+#ifdef __GLIBC__
- #include <linux/sysinfo.h>
-+#endif
- 
- /*
-  * 'kernel.h' contains some often-used function prototypes etc
diff --git a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch b/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
deleted file mode 100644
index 99ab5f791a6..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Source: yopito
-Upstream: No
-Reason: musl compatibility
---- include/uapi/linux/libc-compat.h	2018-11-01 21:44:22.016378667 +0100
-+++ include/uapi/linux/libc-compat.h	2018-11-01 21:54:14.382052324 +0100
-@@ -170,11 +170,102 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+/*
-+ * Support of guessed LIBC musl, since neither glibc nor kernel space.
-+ * Written for musl libc 1.1.16. Mimics the glibc support above.
-+ */
-+#elif !defined(__KERNEL__) /* and not __GLIBC__ */
-+
-+/* Coordinate with musl libc net/if.h header. */
-+#if defined(_NET_IF_H)
-+
-+/* LIBC headers included first so don't define anything
-+ * that would already be defined. */
-+
-+#define __UAPI_DEF_IF_IFCONF		0
-+#define __UAPI_DEF_IF_IFMAP		0
-+#define __UAPI_DEF_IF_IFNAMSIZ		0
-+#define __UAPI_DEF_IF_IFREQ		0
-+
-+/* Everything up to IFF_DYNAMIC, matches net/if.h */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	0
-+
-+/* musl libc defines IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
-+
-+#else /* _NET_IF_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if net/if.h is included later ?  */
-+
-+#define __UAPI_DEF_IF_IFCONF		1
-+#define __UAPI_DEF_IF_IFMAP		1
-+#define __UAPI_DEF_IF_IFNAMSIZ		1
-+#define __UAPI_DEF_IF_IFREQ		1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
-+
-+#endif /* _NET_IF_H */
-+
-+/* Coordinate with musl libc netinet/in.h header. */
-+#if defined(_NETINET_IN_H)
-+
-+/* musl 1.1.16 LIBC netinet/in.h defines the following (to 0),
-+ * so it's useless to set them again:
-+ *   __UAPI_DEF_IN_ADDR        __UAPI_DEF_IN_IPPROTO
-+ *   __UAPI_DEF_IN_PKTINFO     __UAPI_DEF_IP_MREQ
-+ *   __UAPI_DEF_SOCKADDR_IN    __UAPI_DEF_IN_CLASS
-+ *   __UAPI_DEF_IN6_ADDR       __UAPI_DEF_IN6_ADDR_ALT
-+ *   __UAPI_DEF_SOCKADDR_IN6   __UAPI_DEF_IPV6_MREQ
-+ *   __UAPI_DEF_IPPROTO_V6     __UAPI_DEF_IPV6_OPTIONS
-+ *   __UAPI_DEF_IN6_PKTINFO    __UAPI_DEF_IP6_MTUINFO
-+ */
-+
-+#else /* _NETINET_IN_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if netinet/in.h is included later ? */
-+
-+#define __UAPI_DEF_IN_ADDR		1
-+#define __UAPI_DEF_IN_IPPROTO		1
-+#define __UAPI_DEF_IN_PKTINFO		1
-+#define __UAPI_DEF_IP_MREQ		1
-+#define __UAPI_DEF_SOCKADDR_IN		1
-+#define __UAPI_DEF_IN_CLASS		1
-+
-+#define __UAPI_DEF_IN6_ADDR		1
-+#define __UAPI_DEF_IN6_ADDR_ALT		1
-+#define __UAPI_DEF_SOCKADDR_IN6		1
-+#define __UAPI_DEF_IPV6_MREQ		1
-+#define __UAPI_DEF_IPPROTO_V6		1
-+#define __UAPI_DEF_IPV6_OPTIONS		1
-+#define __UAPI_DEF_IN6_PKTINFO		1
-+#define __UAPI_DEF_IP6_MTUINFO		1
-+
-+#endif /* _NETINET_IN_H */
-+
-+/* musl libc does not provide IPX support */
-+#define __UAPI_DEF_SOCKADDR_IPX			1
-+#define __UAPI_DEF_IPX_ROUTE_DEFINITION		1
-+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION	1
-+#define __UAPI_DEF_IPX_CONFIG_DATA		1
-+#define __UAPI_DEF_IPX_ROUTE_DEF		1
-+
-+/* Definitions for sys/xattr.h */
-+#if defined(_SYS_XATTR_H)
-+#define __UAPI_DEF_XATTR		0
-+#else
-+#define __UAPI_DEF_XATTR		1
-+#endif
-+
-+
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
-  * that we need. Check for previous __UAPI_* definitions to give
-  * unsupported C libraries a way to opt out of any kernel definition. */
--#else /* !defined(__GLIBC__) */
-+#else /* defined(__KERNEL__) */
- 
- /* Definitions for if.h */
- #ifndef __UAPI_DEF_IF_IFCONF
-@@ -266,6 +357,6 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
--#endif /* __GLIBC__ */
-+#endif /* __KERNEL__ or __GLIBC__ or libc */
- 
- #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch b/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
deleted file mode 100644
index 65a70e18443..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-diff -u -r linux-4.9.8-bak/include/uapi/linux/if_arp.h linux-4.9.8/include/uapi/linux/if_arp.h
---- include/uapi/linux/if_arp.h	2018-05-14 23:49:28.882768986 +0200
-+++ include/uapi/linux/if_arp.h	2018-05-14 23:50:03.156912981 +0200
-@@ -24,6 +24,7 @@
- #define _UAPI_LINUX_IF_ARP_H
- 
- #include <linux/netdevice.h>
-+#include <linux/libc-compat.h>
- 
- /* ARP protocol HARDWARE identifiers. */
- #define ARPHRD_NETROM	0		/* from KA9Q: NET/ROM pseudo	*/
-@@ -108,7 +109,7 @@
- #define	ARPOP_InREPLY	9		/* InARP reply			*/
- #define	ARPOP_NAK	10		/* (ATM)ARP NAK			*/
- 
--
-+#if __UAPI_DEF_ARPREQ
- /* ARP ioctl request. */
- struct arpreq {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-@@ -117,13 +118,15 @@
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
-   char			arp_dev[16];
- };
--
-+#endif
-+#if __UAPI_DEF_ARPREQ_OLD
- struct arpreq_old {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-   struct sockaddr	arp_ha;		/* hardware address		*/
-   int			arp_flags;	/* flags			*/
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
- };
-+#endif
- 
- /* ARP Flag values. */
- #define ATF_COM		0x02		/* completed entry (ha valid)	*/
-@@ -133,7 +136,7 @@
- #define ATF_NETMASK     0x20            /* want to use a netmask (only
- 					   for proxy entries) */
- #define ATF_DONTPUB	0x40		/* don't answer this addresses	*/
--
-+#if __UAPI_DEF_ARPHDR
- /*
-  *	This structure defines an ethernet arp header.
-  */
-@@ -156,6 +159,6 @@
- #endif
- 
- };
--
-+#endif
- 
- #endif /* _UAPI_LINUX_IF_ARP_H */
-diff -u -r linux-4.9.8-bak/include/uapi/linux/libc-compat.h linux-4.9.8/include/uapi/linux/libc-compat.h
---- include/uapi/linux/libc-compat.h	2018-05-14 23:49:28.885768999 +0200
-+++ include/uapi/linux/libc-compat.h	2018-05-14 23:50:03.156912981 +0200
-@@ -51,6 +51,11 @@
- /* We have included glibc headers... */
- #if defined(__GLIBC__)
- 
-+#define __UAPI_DEF_ETHHDR 1
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+
- /* Coordinate with glibc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
- 
-@@ -73,7 +78,6 @@
- /* Linux headers included first, and we must define everything
-  * we need. The expectation is that glibc will check the
-  * __UAPI_DEF_* defines and adjust appropriately. */
--
- #define __UAPI_DEF_IF_IFCONF 1
- #define __UAPI_DEF_IF_IFMAP 1
- #define __UAPI_DEF_IF_IFNAMSIZ 1
-@@ -256,6 +260,21 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+#ifdef _NETINET_IF_ETHER_H /* musl */
-+#define __UAPI_DEF_ETHHDR 0
-+#else
-+#define __UAPI_DEF_ETHHDR 1
-+#endif
-+
-+#ifdef _NET_IF_ARP_H
-+#define __UAPI_DEF_ARPREQ 0
-+#define __UAPI_DEF_ARPREQ_OLD 0
-+#define __UAPI_DEF_ARPHDR 0
-+#else
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+#endif
- 
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
---- include/uapi/linux/if_ether.h	2018-11-01 21:25:05.338466089 +0100
-+++ include/uapi/linux/if_ether.h	2018-11-01 21:26:07.819172903 +0100
-@@ -23,6 +23,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
- 
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
- 
- /*
-  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
diff --git a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch b/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
deleted file mode 100644
index 970e342a97c..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Work around redefinition of sigcontext in libc headers
-
-Introduced with:
-https://github.com/torvalds/linux/commit/43d4da2c45b2f5d62f8a79ff7c6f95089bb24656
-
-diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
-index 98c4ce5..c44efed 100644
---- arch/arm64/include/uapi/asm/ptrace.h
-+++ arch/arm64/include/uapi/asm/ptrace.h
-@@ -23,8 +23,6 @@
- #include <linux/types.h>
- 
- #include <asm/hwcap.h>
--#include <asm/sigcontext.h>
--
- 
- /*
-  * PSR bits
-@@ -64,8 +62,6 @@
- 
- #ifndef __ASSEMBLY__
- 
--#include <linux/prctl.h>
--
- /*
-  * User structures for general purpose, floating point and debug registers.
-  */
-
diff --git a/srcpkgs/kernel-libc-headers/patches/no-rsync.patch b/srcpkgs/kernel-libc-headers/patches/no-rsync.patch
new file mode 100644
index 00000000000..99046fa36f0
--- /dev/null
+++ b/srcpkgs/kernel-libc-headers/patches/no-rsync.patch
@@ -0,0 +1,14 @@
+diff --git Makefile Makefile
+index e30cf02..d023d8a 100644
+--- Makefile
++++ Makefile
+@@ -1277,8 +1277,7 @@ export INSTALL_HDR_PATH = $(objtree)/usr
+ quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include
+       cmd_headers_install = \
+ 	mkdir -p $(INSTALL_HDR_PATH); \
+-	rsync -mrl --include='*/' --include='*\.h' --exclude='*' \
+-	usr/include $(INSTALL_HDR_PATH)
++	find usr/include -type f -name '*.h' -exec sh -c 'set -e; f="$${1\#usr/}"; dd="$(INSTALL_HDR_PATH)/$${f%/*}"; [ -d "$$dd" ] || mkdir -p "$$dd"; cp "usr/$$f" $(INSTALL_HDR_PATH)/"$$f"' -- '{}' ';'
+ 
+ PHONY += headers_install
+ headers_install: headers
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 2cae8e99e30..715e0be8174 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -1,17 +1,15 @@
 # Template file for 'kernel-libc-headers'
 pkgname=kernel-libc-headers
-version=4.19.0
-revision=2
+version=5.10
+revision=1
 bootstrap=yes
-nostrip=yes
-noverifyrdeps=yes
-noshlibprovides=yes
-wrksrc=linux-${version%.*}
-short_desc="The Linux API headers for userland development"
+wrksrc=linux-${version}
+short_desc="Linux API headers for userland development"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="GPL-2.0-only"
 homepage="http://www.kernel.org"
-distfiles="$KERNEL_SITE/kernel/v4.x/linux-${version%.*}.tar.xz"
-checksum=0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+distfiles="$KERNEL_SITE/kernel/v${version%%.*}.x/linux-${version}.tar.xz"
+checksum=dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43
 
 if [ "$CHROOT_READY" ]; then
 	hostmakedepends="perl"

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (2 preceding siblings ...)
  2020-12-14 22:54 ` ericonr
@ 2020-12-15  0:43 ` sgn
  2020-12-15  0:55 ` sgn
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2020-12-15  0:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r542957967

Comment:
I don't think we need this patch, just follow what LFS do:
```diff
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 715e0be817..09e3456812 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -26,12 +26,13 @@ esac
 
 do_build() {
 	make mrproper
-	make ARCH=${_arch} headers_check
+	make ARCH=${_arch} headers
 }
 do_install() {
-	make ARCH=${_arch} INSTALL_HDR_PATH=${DESTDIR}/usr headers_install
-	# Remove unused files.
-	rm -f $(find ${DESTDIR}/usr/include -name .install -or -name ..install.cmd)
+	vmkdir usr
+	cp -r usr/include $DESTDIR/usr
+	find $DESTDIR/usr/include -name '.*' -delete
+	rm $DESTDIR/usr/include/Makefile
 	# Remove drm headers, use libdrm.
 	rm -rf ${DESTDIR}/usr/include/drm
 }
```

Notes that `headers_check` is nop, now.

http://www.linuxfromscratch.org/lfs/view/stable/chapter05/linux-headers.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (3 preceding siblings ...)
  2020-12-15  0:43 ` [PR REVIEW] " sgn
@ 2020-12-15  0:55 ` sgn
  2020-12-15  9:04 ` fosslinux
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2020-12-15  0:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r542957967

Comment:
I don't think we need this patch, just follow what LFS do:
```diff
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 715e0be817..358197d26c 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -26,12 +26,13 @@ esac
 
 do_build() {
 	make mrproper
-	make ARCH=${_arch} headers_check
+	make ARCH=${_arch} headers
 }
 do_install() {
-	make ARCH=${_arch} INSTALL_HDR_PATH=${DESTDIR}/usr headers_install
-	# Remove unused files.
-	rm -f $(find ${DESTDIR}/usr/include -name .install -or -name ..install.cmd)
+	vmkdir usr/include
+	vcopy usr/include usr
+	find $DESTDIR/usr/include -name '.*' -delete
+	rm $DESTDIR/usr/include/Makefile
 	# Remove drm headers, use libdrm.
 	rm -rf ${DESTDIR}/usr/include/drm
 }
```

Notes that `headers_check` is nop, now.

http://www.linuxfromscratch.org/lfs/view/stable/chapter05/linux-headers.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (4 preceding siblings ...)
  2020-12-15  0:55 ` sgn
@ 2020-12-15  9:04 ` fosslinux
  2020-12-15 13:38 ` ericonr
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: fosslinux @ 2020-12-15  9:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

New review comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r543164913

Comment:
While this template patch could break more easily IMO this is muchhhh much cleaner so i think we should go @sgn 's route.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (5 preceding siblings ...)
  2020-12-15  9:04 ` fosslinux
@ 2020-12-15 13:38 ` ericonr
  2020-12-15 16:23 ` sgn
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-15 13:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r543347250

Comment:
That works for us since we have a package destdir, so I'm okay with it. However, ideally I'd like to have this patch into upstream, if I can get it there.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (6 preceding siblings ...)
  2020-12-15 13:38 ` ericonr
@ 2020-12-15 16:23 ` sgn
  2020-12-15 19:23 ` pullmoll
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2020-12-15 16:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r543489737

Comment:
Good luck on sending this patch :-p Meanwhile, I'm inclined to not patch the build system with that long command.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (7 preceding siblings ...)
  2020-12-15 16:23 ` sgn
@ 2020-12-15 19:23 ` pullmoll
  2020-12-15 19:24 ` pullmoll
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pullmoll @ 2020-12-15 19:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r543623335

Comment:
FWIW if you want to copy a tree w/o rsync you can achieve similar results with a `{bsd,}tar` pipe like:
```
find usr/include -iname "*.h" | tar cf - -T - | tar xpf - -C $(INSTALL_HDR_PATH)
```
This is untested and may need `find .. -print0` and `tar --null` in case of blanks in path or filenames.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (8 preceding siblings ...)
  2020-12-15 19:23 ` pullmoll
@ 2020-12-15 19:24 ` pullmoll
  2020-12-15 19:27 ` pullmoll
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pullmoll @ 2020-12-15 19:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r543623335

Comment:
FWIW if you want to copy a tree w/o rsync you can achieve similar results with `find` and a `{bsd,}tar` pipe like:
```
find usr/include -iname "*.h" | tar cf - -T - | tar xpf - -C $(INSTALL_HDR_PATH)
```
This is untested and may need `find .. -print0` and `tar --null` in case of blanks in path or filenames.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (9 preceding siblings ...)
  2020-12-15 19:24 ` pullmoll
@ 2020-12-15 19:27 ` pullmoll
  2020-12-15 19:28 ` pullmoll
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pullmoll @ 2020-12-15 19:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r543623335

Comment:
FWIW if you want to copy a tree w/o rsync you can achieve similar results with `find` and a `{bsd,}tar` pipe like:
```
find usr/include -iname "*.h" | tar cf - -T - | tar xpf - -C $(INSTALL_HDR_PATH)
```
This is untested and may need `find -print0` and `tar --null` in case of blanks in path or filenames.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR REVIEW] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (10 preceding siblings ...)
  2020-12-15 19:27 ` pullmoll
@ 2020-12-15 19:28 ` pullmoll
  2020-12-24 13:59 ` sgn
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pullmoll @ 2020-12-15 19:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#discussion_r543623335

Comment:
FWIW if you want to copy a tree w/o rsync you can achieve similar results with `find` and a `{bsd,}tar` pipe like:
```
find usr/include \! -type d -iname "*.h" | tar cf - -T - | tar xpf - -C $(INSTALL_HDR_PATH)
```
This is untested and may need `find -print0` and `tar --null` in case of blanks in path or filenames.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (11 preceding siblings ...)
  2020-12-15 19:28 ` pullmoll
@ 2020-12-24 13:59 ` sgn
  2020-12-24 21:41 ` ericonr
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sgn @ 2020-12-24 13:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#issuecomment-750890712

Comment:
Any news?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (12 preceding siblings ...)
  2020-12-24 13:59 ` sgn
@ 2020-12-24 21:41 ` ericonr
  2021-01-05 18:53 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-12-24 21:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#issuecomment-751083448

Comment:
@sgn or someone else, feel free to take over. I haven't had the mind space to look at our patches to the headers, so I don't know which, if any, are still required, nor if we need new ones.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (13 preceding siblings ...)
  2020-12-24 21:41 ` ericonr
@ 2021-01-05 18:53 ` leahneukirchen
  2021-01-05 18:54 ` leahneukirchen
  2021-01-05 19:21 ` [PR PATCH] [Merged]: " ericonr
  16 siblings, 0 replies; 18+ messages in thread
From: leahneukirchen @ 2021-01-05 18:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/ericonr/void-packages linux5.9
https://github.com/void-linux/void-packages/pull/27145

[WIP] kernel-libc-headers: update to 5.10.
- haven't rebased patches
- requires rsync for install step! BAD

Haven't tried building anything with them yet. Also, this requires a revbump to all the cross toolchains. And the `rsync` part breaks bootstrap, afaik. So gotta turn that into some nice `cp $(find ...)`

https://github.com/torvalds/linux/blob/v5.10/Makefile#L1280

A patch file from https://github.com/void-linux/void-packages/pull/27145.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-linux5.9-27145.patch --]
[-- Type: text/x-diff, Size: 11849 bytes --]

From 2503851aa5830599b7b4741317342dc1e922331e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 5 Jan 2021 19:45:58 +0100
Subject: [PATCH] kernel-libc-headers: update to 5.10.4.

---
 .../1-5-kernel-libc-compat-musl-support.patch | 117 ------------------
 .../patches/1-6-musl-libc-net-compat.patch    | 109 ----------------
 .../patches/1-7-musl-aarch64-asm-ptrace.patch |  28 -----
 .../patches/1-8-if_tunnel.h.patch             |  14 +++
 srcpkgs/kernel-libc-headers/template          |  26 ++--
 5 files changed, 27 insertions(+), 267 deletions(-)
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
 delete mode 100644 srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
 create mode 100644 srcpkgs/kernel-libc-headers/patches/1-8-if_tunnel.h.patch

diff --git a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch b/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
deleted file mode 100644
index 99ab5f791a6..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-5-kernel-libc-compat-musl-support.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Source: yopito
-Upstream: No
-Reason: musl compatibility
---- include/uapi/linux/libc-compat.h	2018-11-01 21:44:22.016378667 +0100
-+++ include/uapi/linux/libc-compat.h	2018-11-01 21:54:14.382052324 +0100
-@@ -170,11 +170,102 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+/*
-+ * Support of guessed LIBC musl, since neither glibc nor kernel space.
-+ * Written for musl libc 1.1.16. Mimics the glibc support above.
-+ */
-+#elif !defined(__KERNEL__) /* and not __GLIBC__ */
-+
-+/* Coordinate with musl libc net/if.h header. */
-+#if defined(_NET_IF_H)
-+
-+/* LIBC headers included first so don't define anything
-+ * that would already be defined. */
-+
-+#define __UAPI_DEF_IF_IFCONF		0
-+#define __UAPI_DEF_IF_IFMAP		0
-+#define __UAPI_DEF_IF_IFNAMSIZ		0
-+#define __UAPI_DEF_IF_IFREQ		0
-+
-+/* Everything up to IFF_DYNAMIC, matches net/if.h */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	0
-+
-+/* musl libc defines IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
-+
-+#else /* _NET_IF_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if net/if.h is included later ?  */
-+
-+#define __UAPI_DEF_IF_IFCONF		1
-+#define __UAPI_DEF_IF_IFMAP		1
-+#define __UAPI_DEF_IF_IFNAMSIZ		1
-+#define __UAPI_DEF_IF_IFREQ		1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS	1
-+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
-+
-+#endif /* _NET_IF_H */
-+
-+/* Coordinate with musl libc netinet/in.h header. */
-+#if defined(_NETINET_IN_H)
-+
-+/* musl 1.1.16 LIBC netinet/in.h defines the following (to 0),
-+ * so it's useless to set them again:
-+ *   __UAPI_DEF_IN_ADDR        __UAPI_DEF_IN_IPPROTO
-+ *   __UAPI_DEF_IN_PKTINFO     __UAPI_DEF_IP_MREQ
-+ *   __UAPI_DEF_SOCKADDR_IN    __UAPI_DEF_IN_CLASS
-+ *   __UAPI_DEF_IN6_ADDR       __UAPI_DEF_IN6_ADDR_ALT
-+ *   __UAPI_DEF_SOCKADDR_IN6   __UAPI_DEF_IPV6_MREQ
-+ *   __UAPI_DEF_IPPROTO_V6     __UAPI_DEF_IPV6_OPTIONS
-+ *   __UAPI_DEF_IN6_PKTINFO    __UAPI_DEF_IP6_MTUINFO
-+ */
-+
-+#else /* _NETINET_IN_H */
-+
-+/* Linux headers included first, and we must define everything
-+ * we need. Will define the corresponding structures twice
-+ * if netinet/in.h is included later ? */
-+
-+#define __UAPI_DEF_IN_ADDR		1
-+#define __UAPI_DEF_IN_IPPROTO		1
-+#define __UAPI_DEF_IN_PKTINFO		1
-+#define __UAPI_DEF_IP_MREQ		1
-+#define __UAPI_DEF_SOCKADDR_IN		1
-+#define __UAPI_DEF_IN_CLASS		1
-+
-+#define __UAPI_DEF_IN6_ADDR		1
-+#define __UAPI_DEF_IN6_ADDR_ALT		1
-+#define __UAPI_DEF_SOCKADDR_IN6		1
-+#define __UAPI_DEF_IPV6_MREQ		1
-+#define __UAPI_DEF_IPPROTO_V6		1
-+#define __UAPI_DEF_IPV6_OPTIONS		1
-+#define __UAPI_DEF_IN6_PKTINFO		1
-+#define __UAPI_DEF_IP6_MTUINFO		1
-+
-+#endif /* _NETINET_IN_H */
-+
-+/* musl libc does not provide IPX support */
-+#define __UAPI_DEF_SOCKADDR_IPX			1
-+#define __UAPI_DEF_IPX_ROUTE_DEFINITION		1
-+#define __UAPI_DEF_IPX_INTERFACE_DEFINITION	1
-+#define __UAPI_DEF_IPX_CONFIG_DATA		1
-+#define __UAPI_DEF_IPX_ROUTE_DEF		1
-+
-+/* Definitions for sys/xattr.h */
-+#if defined(_SYS_XATTR_H)
-+#define __UAPI_DEF_XATTR		0
-+#else
-+#define __UAPI_DEF_XATTR		1
-+#endif
-+
-+
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
-  * that we need. Check for previous __UAPI_* definitions to give
-  * unsupported C libraries a way to opt out of any kernel definition. */
--#else /* !defined(__GLIBC__) */
-+#else /* defined(__KERNEL__) */
- 
- /* Definitions for if.h */
- #ifndef __UAPI_DEF_IF_IFCONF
-@@ -266,6 +357,6 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
--#endif /* __GLIBC__ */
-+#endif /* __KERNEL__ or __GLIBC__ or libc */
- 
- #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch b/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
deleted file mode 100644
index 65a70e18443..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-6-musl-libc-net-compat.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-diff -u -r linux-4.9.8-bak/include/uapi/linux/if_arp.h linux-4.9.8/include/uapi/linux/if_arp.h
---- include/uapi/linux/if_arp.h	2018-05-14 23:49:28.882768986 +0200
-+++ include/uapi/linux/if_arp.h	2018-05-14 23:50:03.156912981 +0200
-@@ -24,6 +24,7 @@
- #define _UAPI_LINUX_IF_ARP_H
- 
- #include <linux/netdevice.h>
-+#include <linux/libc-compat.h>
- 
- /* ARP protocol HARDWARE identifiers. */
- #define ARPHRD_NETROM	0		/* from KA9Q: NET/ROM pseudo	*/
-@@ -108,7 +109,7 @@
- #define	ARPOP_InREPLY	9		/* InARP reply			*/
- #define	ARPOP_NAK	10		/* (ATM)ARP NAK			*/
- 
--
-+#if __UAPI_DEF_ARPREQ
- /* ARP ioctl request. */
- struct arpreq {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-@@ -117,13 +118,15 @@
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
-   char			arp_dev[16];
- };
--
-+#endif
-+#if __UAPI_DEF_ARPREQ_OLD
- struct arpreq_old {
-   struct sockaddr	arp_pa;		/* protocol address		*/
-   struct sockaddr	arp_ha;		/* hardware address		*/
-   int			arp_flags;	/* flags			*/
-   struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
- };
-+#endif
- 
- /* ARP Flag values. */
- #define ATF_COM		0x02		/* completed entry (ha valid)	*/
-@@ -133,7 +136,7 @@
- #define ATF_NETMASK     0x20            /* want to use a netmask (only
- 					   for proxy entries) */
- #define ATF_DONTPUB	0x40		/* don't answer this addresses	*/
--
-+#if __UAPI_DEF_ARPHDR
- /*
-  *	This structure defines an ethernet arp header.
-  */
-@@ -156,6 +159,6 @@
- #endif
- 
- };
--
-+#endif
- 
- #endif /* _UAPI_LINUX_IF_ARP_H */
-diff -u -r linux-4.9.8-bak/include/uapi/linux/libc-compat.h linux-4.9.8/include/uapi/linux/libc-compat.h
---- include/uapi/linux/libc-compat.h	2018-05-14 23:49:28.885768999 +0200
-+++ include/uapi/linux/libc-compat.h	2018-05-14 23:50:03.156912981 +0200
-@@ -51,6 +51,11 @@
- /* We have included glibc headers... */
- #if defined(__GLIBC__)
- 
-+#define __UAPI_DEF_ETHHDR 1
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+
- /* Coordinate with glibc net/if.h header. */
- #if defined(_NET_IF_H) && defined(__USE_MISC)
- 
-@@ -73,7 +78,6 @@
- /* Linux headers included first, and we must define everything
-  * we need. The expectation is that glibc will check the
-  * __UAPI_DEF_* defines and adjust appropriately. */
--
- #define __UAPI_DEF_IF_IFCONF 1
- #define __UAPI_DEF_IF_IFMAP 1
- #define __UAPI_DEF_IF_IFNAMSIZ 1
-@@ -256,6 +260,21 @@
- #define __UAPI_DEF_XATTR		1
- #endif
- 
-+#ifdef _NETINET_IF_ETHER_H /* musl */
-+#define __UAPI_DEF_ETHHDR 0
-+#else
-+#define __UAPI_DEF_ETHHDR 1
-+#endif
-+
-+#ifdef _NET_IF_ARP_H
-+#define __UAPI_DEF_ARPREQ 0
-+#define __UAPI_DEF_ARPREQ_OLD 0
-+#define __UAPI_DEF_ARPHDR 0
-+#else
-+#define __UAPI_DEF_ARPREQ 1
-+#define __UAPI_DEF_ARPREQ_OLD 1
-+#define __UAPI_DEF_ARPHDR 1
-+#endif
- 
- /* If we did not see any headers from any supported C libraries,
-  * or we are being included in the kernel, then define everything
---- include/uapi/linux/if_ether.h	2018-11-01 21:25:05.338466089 +0100
-+++ include/uapi/linux/if_ether.h	2018-11-01 21:26:07.819172903 +0100
-@@ -23,6 +23,7 @@
- #define _UAPI_LINUX_IF_ETHER_H
- 
- #include <linux/types.h>
-+#include <linux/libc-compat.h>
- 
- /*
-  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
diff --git a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch b/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
deleted file mode 100644
index 970e342a97c..00000000000
--- a/srcpkgs/kernel-libc-headers/patches/1-7-musl-aarch64-asm-ptrace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Work around redefinition of sigcontext in libc headers
-
-Introduced with:
-https://github.com/torvalds/linux/commit/43d4da2c45b2f5d62f8a79ff7c6f95089bb24656
-
-diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
-index 98c4ce5..c44efed 100644
---- arch/arm64/include/uapi/asm/ptrace.h
-+++ arch/arm64/include/uapi/asm/ptrace.h
-@@ -23,8 +23,6 @@
- #include <linux/types.h>
- 
- #include <asm/hwcap.h>
--#include <asm/sigcontext.h>
--
- 
- /*
-  * PSR bits
-@@ -64,8 +62,6 @@
- 
- #ifndef __ASSEMBLY__
- 
--#include <linux/prctl.h>
--
- /*
-  * User structures for general purpose, floating point and debug registers.
-  */
-
diff --git a/srcpkgs/kernel-libc-headers/patches/1-8-if_tunnel.h.patch b/srcpkgs/kernel-libc-headers/patches/1-8-if_tunnel.h.patch
new file mode 100644
index 00000000000..a7ba47afb4c
--- /dev/null
+++ b/srcpkgs/kernel-libc-headers/patches/1-8-if_tunnel.h.patch
@@ -0,0 +1,14 @@
+Reverts 1fe8e0f074c77aa41aaa579345a9e675acbebfa9
+
+--- include/uapi/linux/if_tunnel.h
++++ include/uapi/linux/if_tunnel.h
+@@ -2,9 +2,6 @@
+ #define _UAPI_IF_TUNNEL_H_
+ 
+ #include <linux/types.h>
+-#include <linux/if.h>
+-#include <linux/ip.h>
+-#include <linux/in6.h>
+ #include <asm/byteorder.h>
+ 
+ 
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 2cae8e99e30..ddd9087044c 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -1,17 +1,15 @@
 # Template file for 'kernel-libc-headers'
 pkgname=kernel-libc-headers
-version=4.19.0
-revision=2
+version=5.10.4
+revision=1
 bootstrap=yes
-nostrip=yes
-noverifyrdeps=yes
-noshlibprovides=yes
-wrksrc=linux-${version%.*}
-short_desc="The Linux API headers for userland development"
+wrksrc=linux-${version}
+short_desc="Linux API headers for userland development"
+maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="GPL-2.0-only"
 homepage="http://www.kernel.org"
-distfiles="$KERNEL_SITE/kernel/v4.x/linux-${version%.*}.tar.xz"
-checksum=0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+distfiles="$KERNEL_SITE/kernel/v${version%%.*}.x/linux-${version}.tar.xz"
+checksum=904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
 
 if [ "$CHROOT_READY" ]; then
 	hostmakedepends="perl"
@@ -28,12 +26,14 @@ esac
 
 do_build() {
 	make mrproper
-	make ARCH=${_arch} headers_check
+	make ARCH=${_arch} headers
 }
 do_install() {
-	make ARCH=${_arch} INSTALL_HDR_PATH=${DESTDIR}/usr headers_install
-	# Remove unused files.
-	rm -f $(find ${DESTDIR}/usr/include -name .install -or -name ..install.cmd)
+ 	find usr/include -name '.*' -delete
+	rm usr/include/Makefile
+ 	vmkdir usr/include
+ 	vcopy usr/include usr
+
 	# Remove drm headers, use libdrm.
 	rm -rf ${DESTDIR}/usr/include/drm
 }

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (14 preceding siblings ...)
  2021-01-05 18:53 ` [PR PATCH] [Updated] " leahneukirchen
@ 2021-01-05 18:54 ` leahneukirchen
  2021-01-05 19:21 ` [PR PATCH] [Merged]: " ericonr
  16 siblings, 0 replies; 18+ messages in thread
From: leahneukirchen @ 2021-01-05 18:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/27145#issuecomment-754830761

Comment:
Taking this over. I have adopted it to use the LFS install snippet, and I only kept patch 1-4 which Alpine still has. Alpine also has another patch that I included.

I tried building a few packages that need these headers, no issues.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PR PATCH] [Merged]: [WIP] kernel-libc-headers: update to 5.10.
  2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
                   ` (15 preceding siblings ...)
  2021-01-05 18:54 ` leahneukirchen
@ 2021-01-05 19:21 ` ericonr
  16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2021-01-05 19:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

There's a merged pull request on the void-packages repository

[WIP] kernel-libc-headers: update to 5.10.
https://github.com/void-linux/void-packages/pull/27145

Description:
- haven't rebased patches
- requires rsync for install step! BAD

Haven't tried building anything with them yet. Also, this requires a revbump to all the cross toolchains. And the `rsync` part breaks bootstrap, afaik. So gotta turn that into some nice `cp $(find ...)`

https://github.com/torvalds/linux/blob/v5.10/Makefile#L1280

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-01-05 19:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 14:21 [PR PATCH] [WIP] kernel-libc-headers: update to 5.10 ericonr
2020-12-14 19:17 ` [PR PATCH] [Updated] " ericonr
2020-12-14 19:20 ` ericonr
2020-12-14 22:54 ` ericonr
2020-12-15  0:43 ` [PR REVIEW] " sgn
2020-12-15  0:55 ` sgn
2020-12-15  9:04 ` fosslinux
2020-12-15 13:38 ` ericonr
2020-12-15 16:23 ` sgn
2020-12-15 19:23 ` pullmoll
2020-12-15 19:24 ` pullmoll
2020-12-15 19:27 ` pullmoll
2020-12-15 19:28 ` pullmoll
2020-12-24 13:59 ` sgn
2020-12-24 21:41 ` ericonr
2021-01-05 18:53 ` [PR PATCH] [Updated] " leahneukirchen
2021-01-05 18:54 ` leahneukirchen
2021-01-05 19:21 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).