Github messages for voidlinux
 help / color / mirror / Atom feed
From: leahneukirchen <leahneukirchen@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] kernel-libc-headers: update to 5.10.
Date: Tue, 05 Jan 2021 19:53:17 +0100	[thread overview]
Message-ID: <20210105185317.BBYivFcB-ll7L70haCE84tTRQ8xRyB1CEz4T_E9HHqU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27145@inbox.vuxu.org>

[-- 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
 }

  parent reply	other threads:[~2021-01-05 18:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 14:21 [PR PATCH] " 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 ` leahneukirchen [this message]
2021-01-05 18:54 ` leahneukirchen
2021-01-05 19:21 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210105185317.BBYivFcB-ll7L70haCE84tTRQ8xRyB1CEz4T_E9HHqU@z \
    --to=leahneukirchen@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).