Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-kernel/linux-headers/files/, sys-kernel/linux-headers/
Date: Fri, 01 Apr 2016 23:58:26
Message-Id: 1459555518.e674fd52ca2a26af722a2577a9194e9e2fb683c8.blueness@gentoo
1 commit: e674fd52ca2a26af722a2577a9194e9e2fb683c8
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 2 00:05:18 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 00:05:18 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=e674fd52
7
8 sys-kernel/linux-headers: push out patch in bug #544476
9
10 sys-kernel/linux-headers/Manifest | 4 +
11 .../linux-headers/files/libc-4.3-portability.patch | 120 +++++++++++++++++++++
12 .../linux-headers/linux-headers-4.5-r99.ebuild | 57 ++++++++++
13 3 files changed, 181 insertions(+)
14
15 diff --git a/sys-kernel/linux-headers/Manifest b/sys-kernel/linux-headers/Manifest
16 index 524af7a..dd6d053 100644
17 --- a/sys-kernel/linux-headers/Manifest
18 +++ b/sys-kernel/linux-headers/Manifest
19 @@ -1,10 +1,14 @@
20 AUX glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch 275 SHA256 eea3758ded887b84e3b15031e590975b4f94dbf7b03e7b135611339bcb8ca81c SHA512 8ff3af26ac01d402641d6c775ad54922a73e5eaf1e41efe842448d08c59f51ab9290104008283fafbdacd9eb1b8e48e9d2507210a8531d05a852c6ba84d2b60e WHIRLPOOL 2cd90e18615df2f1be80c83d0d2e218d6d02437b2ea91ba3a61ced407357f972371bddfed140f18ec66817e7f6ddd61a1c85da7f9b14be04f71ca3e64c8fb687
21 +AUX libc-4.3-portability.patch 3908 SHA256 cdd4a603361bb3e3e776b360460ce5df8247aa64fb06d62801fec2761ac0ae0c SHA512 7b577f7b0a489274685fc9af9234cd6fd00a033342e62c38601b3e663798b1af8e053f7df2a6d78fadcbf2e582ca25bfcc45259f01bc08c46d3d846a2b397eb3 WHIRLPOOL 415fb348b873dc3138e4cd2265b6be9a47bb92f05a8bc38c317edf1e0257312a169958774a3c03c621977769436027ca8768d868459e484392afff9f54149a25
22 AUX libc-compat.h-fix-some-issues-arising-from-in6.h.patch 2051 SHA256 9dc049392ba3b79453baa809f0aafb47283293046b84511b5ae8519a86716048 SHA512 6d6107974dcf9671dd0f1a747160adf85a22c27216b1200ce40fd410f6fc5fd47956b8b5b51055cfda4b97cc9f172cd3850ccb4daa73e4eda449e6e77c0840ca WHIRLPOOL 4245b157fd91ecba39f42126e603a166eab74ff4abc7487639ea191de22376876de25db35b295e1227da4990e2ae04bcc6bab34a1b583ef10fda4fe30341a1c1
23 AUX libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch 1037 SHA256 3297454dd7bdc3417d36f448ca2091e39a6acf475e22c6eb67ee5819d7b73c8f SHA512 895e23a36d0736ff624ad960e8a26e221d990e50910cc96b1a151789f97b94288f3e801ad76d141e421901e66422c480e511b2e20798e91a15b9e298c72533d6 WHIRLPOOL 25fc05bd3d942c27e12ede60fe07953d3c35adfb7154ee1b99cc8f02946264a4f91df9c5cce089c90bb08c5aec104c6217d55c8f7c07b454f3a4c32b4ee2f61f
24 DIST gentoo-headers-3.16-1.tar.xz 2760 SHA256 331d2e00e94d86b6895fde450dffa7c669a177a53174649561d46ccd58e1351c SHA512 5df6857267ff93619c1735420fad689e104980ad55fb6fa33db6d4739ac166594672b16fa21b58f253540adf3198c32acf499eb3e10726c2bc88234e42e68b14 WHIRLPOOL e380f0309d391db15ad1fb273925efe30ee020c594030d5b4c74b8a3fb9154eeac658b04bc9816ba7f932f8d0cc53cf385ba02bc690a306e053a22fa167e1965
25 DIST gentoo-headers-3.18-1.tar.xz 3628 SHA256 d6b83a873baf83d8db535623dc9b91b52354e53238a128bb6fc29c6ff4f9f11e SHA512 89fb9b336fa3455752f6fe8626500d30245c04806890d4448a2895bbef2a5eae409940618fd4e0be57aa12784a198a695c32479f12d76450e16f2af1536e7a1f WHIRLPOOL 5a18218fef9013d5306d3ef6aa6467c1fe09dc70593c3f8f1f62a3e99d704d085420e33ded3924f0e34ee58c080952e5e007842f31d7bf648fad14a02ce3751f
26 +DIST gentoo-headers-4.5-1.tar.xz 6388 SHA256 7edb535fcff4d0aa02334840f7afc4049018c479e0fe81036abc5fc2b4532298 SHA512 48b19592bce8176bb6a363fb383fa4f88b3f1d30712339ba215c1246a59c9463423c53e77967039703adc5b7eb32cee532686715cc61cab95bd0694f283a76de WHIRLPOOL 57abea28dc4dc50b393ce7c1bd00d7d2e4a19a5ed24282a74065efb4d61550ac389cee45ff917d3cc56d0687172da0bfe678fb21c28758767a8b4445098fc54e
27 DIST gentoo-headers-base-3.16.tar.xz 3743324 SHA256 705c4652ac1bf78c9accec6fd8da795ebd88a79f6fad47cf1f4e88685bb2a2ce SHA512 100234a696f9ec3a5762a8d5115672e48ff47a1741be24affde1a1c86a906d7a560d0bd6906ec2c6cd86ec79f843f29e2cc153fff17111ddf5e2696e5ee9f7b6 WHIRLPOOL 0fb19c8618b76ebacf7a647aacdce32406384e69cbdd7126ac567cb9819781d1c85ef341822b6551962b5af0cc75372119deeb709e11f2739b99d4be7a2ab338
28 DIST gentoo-headers-base-3.18.tar.xz 3776668 SHA256 12a44590e505525509556f6e973464f124f172565d3a4b29a3ff4627aa24f9a7 SHA512 6615c604e5e618d26fff5a61691f7827bb05be9790db6c9f8e16e3842bce8f056f9928f85ae5714710b75743b0d0804faba4ba9c76e934e1de22dc03ef6d5535 WHIRLPOOL 5cdd500aaac3589d6672ea365f5b29ccef207db36cbc34052f0bf1bbe35b5dbfedf3b1675079c1ec05daf1a136d2da3018b2ca91bcaeda1fe8d23e3246fda25e
29 +DIST gentoo-headers-base-4.5.tar.xz 3915016 SHA256 cec11abb1afbe966e1e2abf828adeb7989547129147528e32bbddcac83f416fd SHA512 fee3d986d0fa25beda7b04e971810903c1a4dd50b82167a511f65cba8e6b5fdf08005578663b36841c75168e144330004561c24d827c9b4b734e08bbab4608e2 WHIRLPOOL b9272bd4e00d430a4c62a3fdd92865798c1460e59ba88a1fd28747b1ef1947c982daf915db38db061dd33e25b2dfffa2636034f6f5dc6cfe904801bb5f476cb9
30 EBUILD linux-headers-3.16.ebuild 1384 SHA256 9830429f282f75e51404f02d9351e34d5aa7b72a7ba5d61ef5c198c6d6cb0e02 SHA512 39bb6208c26aed1c576c6f36750bad0f22f10e30330a330f4d11f3bd1dab679ba769ba0baf88d1a60b285c11c75f520ac93c1b1029da066064a79a769d67474a WHIRLPOOL 3a39ba8e43fed7b07b0930ee7f528c6318d48ed71a87a4d81d9b68bbe1f2d3aee672d317aedd5ec75382c0524d34851ac7f0a0d76882ccd8a16a7575d3965f9f
31 EBUILD linux-headers-3.18-r99.ebuild 1604 SHA256 a09fa647edfa9d7116a7a98bc8f59de01bee9e2a56b98b8e40c211dc7dc04634 SHA512 3ab4ce51539eae2a285488269c4e93075aa32bfd9560f2d78158e5d681ff5785aae68f68f7b96157daeab92cee0618c414887ad5c23d70a3de25b6b3cac99f62 WHIRLPOOL 5c592a512cf765cb9d9f9e166206e1b9d14c42c94c9bf2c1b0239aa185b6bf8aaa2fef442fb6cf5dc8ba2fe515550f05939542dc3db881bfdece4cd367fca80b
32 +EBUILD linux-headers-4.5-r99.ebuild 1496 SHA256 f1c9c89a7c07f444bb5bd82a5fd04aae1a33daad01da1d99beb03cf8aabb7a4f SHA512 958df17d5389672931c36134c1a192f0199a81705bc06787b384a5dc72051a88f6c061a3d2b1786850669ceab4f778ffb652925d13c9b69d916e45eae2d92dc2 WHIRLPOOL 0c113ee1de2a17d9900d38d29313e42e66963198dbb4e1dfdb1e6f3a2338ef70c789a2763f8b4c021fd88b582bf4ac0419c9c171926486395b968293442a47d5
33 MISC metadata.xml 344 SHA256 9a1be7c7cda2e8f30ea65c0abc9b3663e8efecd6d8d383b28a55de2ff7071d10 SHA512 4dfc3a4130e5ae01c17510c693c4f2bd81fb019cf003e866c7f359213b58c6e36ed59699d6a458464e1dabd73c8f4a24eada8ced06d7ac513ec3553c0179f164 WHIRLPOOL df2e1ce9fe16c663dca50b97b9e8f3c80ada9b8feceb9381ca256a052f1c7176c56439ca61c5d734e22d04386c8efd9462758d2aa1f12d24a73425b9f1a6a6dc
34
35 diff --git a/sys-kernel/linux-headers/files/libc-4.3-portability.patch b/sys-kernel/linux-headers/files/libc-4.3-portability.patch
36 new file mode 100644
37 index 0000000..b71e4b5
38 --- /dev/null
39 +++ b/sys-kernel/linux-headers/files/libc-4.3-portability.patch
40 @@ -0,0 +1,120 @@
41 +diff -urN a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
42 +--- a/include/uapi/linux/if_ether.h 2015-11-02 12:36:00.000000000 -0600
43 ++++ b/include/uapi/linux/if_ether.h 2015-11-06 21:07:36.109409947 -0600
44 +@@ -22,6 +22,7 @@
45 + #define _UAPI_LINUX_IF_ETHER_H
46 +
47 + #include <linux/types.h>
48 ++#include <linux/libc-compat.h>
49 +
50 + /*
51 + * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
52 +@@ -134,12 +135,12 @@
53 + /*
54 + * This is an Ethernet frame header.
55 + */
56 +-
57 ++#if __UAPI_DEF_ETHHDR
58 + struct ethhdr {
59 + unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
60 + unsigned char h_source[ETH_ALEN]; /* source ether addr */
61 + __be16 h_proto; /* packet type ID field */
62 + } __attribute__((packed));
63 +-
64 ++#endif
65 +
66 + #endif /* _UAPI_LINUX_IF_ETHER_H */
67 +diff -urN a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
68 +--- a/include/uapi/linux/kernel.h 2015-11-02 12:36:00.000000000 -0600
69 ++++ b/include/uapi/linux/kernel.h 2015-11-06 20:59:38.595400307 -0600
70 +@@ -1,7 +1,9 @@
71 + #ifndef _UAPI_LINUX_KERNEL_H
72 + #define _UAPI_LINUX_KERNEL_H
73 +
74 ++#ifdef __GLIBC__
75 + #include <linux/sysinfo.h>
76 ++#endif
77 +
78 + /*
79 + * 'kernel.h' contains some often-used function prototypes etc
80 +diff -urN a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
81 +--- a/include/uapi/linux/libc-compat.h 2015-11-02 12:36:00.000000000 -0600
82 ++++ b/include/uapi/linux/libc-compat.h 2015-11-06 21:09:14.645411936 -0600
83 +@@ -48,13 +48,18 @@
84 + #ifndef _UAPI_LIBC_COMPAT_H
85 + #define _UAPI_LIBC_COMPAT_H
86 +
87 +-/* We have included glibc headers... */
88 +-#if defined(__GLIBC__)
89 ++#ifndef __KERNEL__ /* we're used from userspace */
90 +
91 +-/* Coordinate with glibc netinet/in.h header. */
92 ++#ifdef _NETINET_IF_ETHER_H /* musl */
93 ++#define __UAPI_DEF_ETHHDR 0
94 ++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */
95 ++#define __UAPI_DEF_ETHHDR 1
96 ++#endif
97 ++
98 ++/* Coordinate with libc netinet/in.h header. */
99 + #if defined(_NETINET_IN_H)
100 +
101 +-/* GLIBC headers included first so don't define anything
102 ++/* libc headers included first so don't define anything
103 + * that would already be defined. */
104 + #define __UAPI_DEF_IN_ADDR 0
105 + #define __UAPI_DEF_IN_IPPROTO 0
106 +@@ -64,15 +69,7 @@
107 + #define __UAPI_DEF_IN_CLASS 0
108 +
109 + #define __UAPI_DEF_IN6_ADDR 0
110 +-/* The exception is the in6_addr macros which must be defined
111 +- * if the glibc code didn't define them. This guard matches
112 +- * the guard in glibc/inet/netinet/in.h which defines the
113 +- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
114 +-#if defined(__USE_MISC) || defined (__USE_GNU)
115 + #define __UAPI_DEF_IN6_ADDR_ALT 0
116 +-#else
117 +-#define __UAPI_DEF_IN6_ADDR_ALT 1
118 +-#endif
119 + #define __UAPI_DEF_SOCKADDR_IN6 0
120 + #define __UAPI_DEF_IPV6_MREQ 0
121 + #define __UAPI_DEF_IPPROTO_V6 0
122 +@@ -80,10 +77,10 @@
123 + #define __UAPI_DEF_IN6_PKTINFO 0
124 + #define __UAPI_DEF_IP6_MTUINFO 0
125 +
126 +-#else
127 ++#else /* defined(_NETINET_IN_H) */
128 +
129 + /* Linux headers included first, and we must define everything
130 +- * we need. The expectation is that glibc will check the
131 ++ * we need. The expectation is that libc will check the
132 + * __UAPI_DEF_* defines and adjust appropriately. */
133 + #define __UAPI_DEF_IN_ADDR 1
134 + #define __UAPI_DEF_IN_IPPROTO 1
135 +@@ -93,7 +90,7 @@
136 + #define __UAPI_DEF_IN_CLASS 1
137 +
138 + #define __UAPI_DEF_IN6_ADDR 1
139 +-/* We unconditionally define the in6_addr macros and glibc must
140 ++/* We unconditionally define the in6_addr macros and libc must
141 + * coordinate. */
142 + #define __UAPI_DEF_IN6_ADDR_ALT 1
143 + #define __UAPI_DEF_SOCKADDR_IN6 1
144 +@@ -115,7 +112,7 @@
145 + /* If we did not see any headers from any supported C libraries,
146 + * or we are being included in the kernel, then define everything
147 + * that we need. */
148 +-#else /* !defined(__GLIBC__) */
149 ++#else /* __KERNEL__ */
150 +
151 + /* Definitions for in.h */
152 + #define __UAPI_DEF_IN_ADDR 1
153 +@@ -138,6 +135,6 @@
154 + /* Definitions for xattr.h */
155 + #define __UAPI_DEF_XATTR 1
156 +
157 +-#endif /* __GLIBC__ */
158 ++#endif /* __KERNEL__ */
159 +
160 + #endif /* _UAPI_LIBC_COMPAT_H */
161
162 diff --git a/sys-kernel/linux-headers/linux-headers-4.5-r99.ebuild b/sys-kernel/linux-headers/linux-headers-4.5-r99.ebuild
163 new file mode 100644
164 index 0000000..5e85046
165 --- /dev/null
166 +++ b/sys-kernel/linux-headers/linux-headers-4.5-r99.ebuild
167 @@ -0,0 +1,57 @@
168 +# Copyright 1999-2016 Gentoo Foundation
169 +# Distributed under the terms of the GNU General Public License v2
170 +# $Id$
171 +
172 +EAPI="4"
173 +
174 +ETYPE="headers"
175 +H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa"
176 +inherit kernel-2
177 +detect_version
178 +
179 +PATCH_VER="1"
180 +SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
181 + ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
182 +
183 +KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
184 +
185 +DEPEND="app-arch/xz-utils
186 + dev-lang/perl"
187 +RDEPEND="!!media-sound/alsa-headers"
188 +
189 +S=${WORKDIR}/gentoo-headers-base-${PV}
190 +
191 +src_unpack() {
192 + unpack ${A}
193 +}
194 +
195 +src_prepare() {
196 + [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
197 + epatch "${FILESDIR}"/libc-4.3-portability.patch
198 +}
199 +
200 +src_install() {
201 + kernel-2_src_install
202 +
203 + # hrm, build system sucks
204 + find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
205 + find "${ED}" -depth -type d -delete 2>/dev/null
206 +}
207 +
208 +src_test() {
209 + # Make sure no uapi/ include paths are used by accident.
210 + egrep -r \
211 + -e '# *include.*["<]uapi/' \
212 + "${D}" && die "#include uapi/xxx detected"
213 +
214 + einfo "Possible unescaped attribute/type usage"
215 + egrep -r \
216 + -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \
217 + -e '\<([us](8|16|32|64))\>' \
218 + .
219 +
220 + einfo "Missing linux/types.h include"
221 + egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h
222 +
223 + emake ARCH=$(tc-arch-kernel) headers_check
224 +}