sys-libs/glibc: Sync with Gentoo's latest stable, 2.29

This commit is contained in:
David Michael 2019-05-24 23:44:12 +00:00
parent b69890b64e
commit 952a4415fd
8 changed files with 125 additions and 488 deletions

View File

@ -1,15 +0,0 @@
DEFINED_PHASES=compile configure install postinst preinst prepare test unpack
DEPEND=nscd? ( selinux? ( audit? ( sys-process/audit ) caps? ( sys-libs/libcap ) ) ) suid? ( caps? ( sys-libs/libcap ) ) selinux? ( sys-libs/libselinux ) systemtap? ( dev-util/systemtap ) >=app-misc/pax-utils-0.1.10 sys-devel/bison !<sys-apps/sandbox-1.6 !<sys-apps/portage-2.1.2 !<sys-devel/bison-2.7 doc? ( sys-apps/texinfo ) >=sys-devel/binutils-2.24 >=sys-devel/gcc-4.9 virtual/os-headers sys-devel/gnuconfig virtual/pkgconfig
DESCRIPTION=GNU libc C library
EAPI=6
HOMEPAGE=https://www.gnu.org/software/libc/
IUSE=audit caps compile-locales doc gd hardened headers-only +multiarch multilib nscd profile selinux suid systemtap vanilla
KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86
LICENSE=LGPL-2.1+ BSD HPND ISC inner-net rc PCRE
PDEPEND=!vanilla? ( sys-libs/timezone-data )
RDEPEND=nscd? ( selinux? ( audit? ( sys-process/audit ) caps? ( sys-libs/libcap ) ) ) suid? ( caps? ( sys-libs/libcap ) ) selinux? ( sys-libs/libselinux ) systemtap? ( dev-util/systemtap ) sys-apps/gentoo-functions !sys-kernel/ps3-sources !sys-libs/nss-db vanilla? ( !sys-libs/timezone-data )
RESTRICT=strip
SLOT=2.2
SRC_URI=mirror://gnu/glibc/glibc-2.27.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/glibc-2.27-patches-3.tar.bz2 multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-20180511.tar.xz )
_eclasses_=desktop b1d22ac8bdd4679ab79c71aca235009d epatch a1bf4756dba418a7238f3be0cb010c54 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 6e6c2737b59a4b982de6fb3ecefd87f8 flag-o-matic a09389deba2c0a7108b581e02c7cecbf gnuconfig b8ec1c34be4ff9dac7ad4034d277936b ltprune 2729691420b6deeda2a90b1f1183fb55 multilib 1d91b03d42ab6308b5f4f6b598ed110e multiprocessing cac3169468f893670dac3e7cb940e045 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 71fd8d2065d102753fb9e4d20eaf3e9f toolchain-funcs 8c7f9d80beedd16f2e5a7f612c609529 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 2352c3fc97241f6a02042773c8287748
_md5_=dd8cda5091a41b834006ab8b366cc249

View File

@ -0,0 +1,15 @@
DEFINED_PHASES=compile configure install postinst preinst prepare pretend setup test unpack
DEPEND=nscd? ( selinux? ( audit? ( sys-process/audit ) caps? ( sys-libs/libcap ) ) ) suid? ( caps? ( sys-libs/libcap ) ) selinux? ( sys-libs/libselinux ) systemtap? ( dev-util/systemtap ) || ( dev-lang/python:3.7 dev-lang/python:3.6 dev-lang/python:3.5 ) >=app-misc/pax-utils-0.1.10 sys-devel/bison !<sys-apps/sandbox-1.6 !<sys-apps/portage-2.1.2 !<sys-devel/bison-2.7 !<sys-devel/make-4 doc? ( sys-apps/texinfo ) test? ( >=net-dns/libidn2-2.0.5 ) >=sys-devel/binutils-2.24 >=sys-devel/gcc-6 virtual/os-headers sys-devel/gnuconfig virtual/pkgconfig
DESCRIPTION=GNU libc C library
EAPI=6
HOMEPAGE=https://www.gnu.org/software/libc/
IUSE=audit caps cet compile-locales doc gd headers-only +multiarch multilib nscd profile selinux +ssp suid systemtap test vanilla
KEYWORDS=~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc x86
LICENSE=LGPL-2.1+ BSD HPND ISC inner-net rc PCRE
PDEPEND=!vanilla? ( sys-libs/timezone-data )
RDEPEND=nscd? ( selinux? ( audit? ( sys-process/audit ) caps? ( sys-libs/libcap ) ) ) suid? ( caps? ( sys-libs/libcap ) ) selinux? ( sys-libs/libselinux ) systemtap? ( dev-util/systemtap ) sys-apps/gentoo-functions !sys-kernel/ps3-sources !sys-libs/nss-db >=net-dns/libidn2-2.0.5 vanilla? ( !sys-libs/timezone-data )
RESTRICT=strip
SLOT=2.2
SRC_URI=mirror://gnu/glibc/glibc-2.29.tar.xz https://dev.gentoo.org/~dilfridge/distfiles/glibc-2.29-patches-3.tar.xz multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-20180511.tar.xz )
_eclasses_=desktop b1d22ac8bdd4679ab79c71aca235009d eapi7-ver 756b3f27d8e46131d5cf3c51bd876446 epatch a1bf4756dba418a7238f3be0cb010c54 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 6e6c2737b59a4b982de6fb3ecefd87f8 flag-o-matic a09389deba2c0a7108b581e02c7cecbf gnuconfig b8ec1c34be4ff9dac7ad4034d277936b ltprune 2729691420b6deeda2a90b1f1183fb55 multilib 1d91b03d42ab6308b5f4f6b598ed110e multiprocessing cac3169468f893670dac3e7cb940e045 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 4900ae970f827a22d33d41bd8b8f9ace python-utils-r1 08e17157a6807add7db1f8d01e7e391f systemd 71fd8d2065d102753fb9e4d20eaf3e9f toolchain-funcs 8c7f9d80beedd16f2e5a7f612c609529 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
_md5_=30979c9f59c01b26585992a380d11aaa

View File

@ -1,3 +1,3 @@
DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908f60d894c6344a2fa09383b30c1633a0682bc668367c8a2f8c6fec2d41b6e2178d709a2bd8db57e8b2ab56ba263c7d56f819c15acd061 SHA512 98c766e913693ab42ff790557acde2a36a8001e2648046a685b21964200df8d4d52d8452d499c0068c6648284d086ce062c2d36e2c6c2fd8aacd232d193f2853 DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908f60d894c6344a2fa09383b30c1633a0682bc668367c8a2f8c6fec2d41b6e2178d709a2bd8db57e8b2ab56ba263c7d56f819c15acd061 SHA512 98c766e913693ab42ff790557acde2a36a8001e2648046a685b21964200df8d4d52d8452d499c0068c6648284d086ce062c2d36e2c6c2fd8aacd232d193f2853
DIST glibc-2.27-patches-3.tar.bz2 166511 BLAKE2B 1dc54bef6e82112935c7411f7a5cd07c1edb24c3edaa1e0243b846b3832a40af1ba3a7b77aef04c54a173388156b464ea442fa8310a02e6f44e2ed5b78994286 SHA512 12496e9b0c60630dbec4c2febdd6d20df1f3d7a2c243cc55b595202b27f682b9208e16cd8c387687c0cc9e18b36c3caeef8d1b1148eb3ee8081431997270db5e DIST glibc-2.29-patches-3.tar.xz 35812 BLAKE2B 90b8bc57b7a63f03617795c368b92e525eccfec462d638dbc25c581e5b7a2a72ffd5191842f5ac443a868cbc950838d7e5120e866d343a14b80c55dcbfa48f30 SHA512 4c9b78d9d1a8aa629418f2d758ef800857780b8a1fd8d3582b88348a513ca26ca7f6ac9110a8c6bae16949b360ba36840d184f42293cd4324760273592d1b438
DIST glibc-2.27.tar.xz 15395316 BLAKE2B ea206d304c8c9aa86d69db981a14bea008602cea06a6c151c4971a8df059949ffe5632b42a67ab0ffcd7c4d7ce1ec02ac48815dac4dade1c4dd41eaee8a6ed33 SHA512 7c5581154487d38d173ce1feb944e60207139cca148bccf066eaae322c0c2d219423bdcfa15c7f9be1b5e45dfc43c641cc5d80d3c3c65837d08a83cdb4e2a147 DIST glibc-2.29.tar.xz 16515488 BLAKE2B b754e6825176538a2b8ca03fce014f0d87d333dc4d038bf0cda5ee8a2f484cd3ce93ad78ec126737e093ab64b55ceedf04cd08aecb4f8041daaa329e99717afa SHA512 146bc0769fe853d9edbf93cea7f74c5b3d84d69cb7614c62588e7acdecd1ec789a9d8949f3e8b99f8f36f2ccac740a003bed94f32b07817baf780b06cfeb6ed0

View File

@ -1,114 +0,0 @@
From 74250a7cdf106d4ca7d9506e6d5dc7c448dc3434 Mon Sep 17 00:00:00 2001
From: David Michael <david.michael@coreos.com>
Date: Thu, 15 Dec 2016 15:22:57 -0800
Subject: [PATCH] gshadow: Sync fgetsgent_r.c with grp/fgetgrent_r.c
[BZ #20338]
* gshadow/fgetsgent_r.c: Include <libio/iolibio.h>.
(flockfile): New macro.
(funlockfile): Likewise.
(__fgetsgent_r): Sync with __fgetgrent_r.
* nss/nss_files/files-sgrp.c: Fix "fgetsgent_r.c" typo.
---
gshadow/fgetsgent_r.c | 35 ++++++++++++++++++++++++-----------
nss/nss_files/files-sgrp.c | 2 +-
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/gshadow/fgetsgent_r.c b/gshadow/fgetsgent_r.c
index b70f6fa..02cd33a 100644
--- a/gshadow/fgetsgent_r.c
+++ b/gshadow/fgetsgent_r.c
@@ -20,39 +20,44 @@
#include <gshadow.h>
#include <stdio.h>
+#include <libio/iolibio.h>
+#define flockfile(s) _IO_flockfile (s)
+#define funlockfile(s) _IO_funlockfile (s)
+
/* Define a line parsing function using the common code
used in the nss_files module. */
#define STRUCTURE sgrp
#define ENTNAME sgent
-#define EXTERN_PARSER 1
+#define EXTERN_PARSER 1
struct sgent_data {};
#include <nss/nss_files/files-parse.c>
-/* Read one shadow entry from the given stream. */
+/* Read one entry from the given stream. */
int
__fgetsgent_r (FILE *stream, struct sgrp *resbuf, char *buffer, size_t buflen,
struct sgrp **result)
{
char *p;
+ int parse_result;
- _IO_flockfile (stream);
+ flockfile (stream);
do
{
buffer[buflen - 1] = '\xff';
p = fgets_unlocked (buffer, buflen, stream);
- if (p == NULL && feof_unlocked (stream))
+ if (__builtin_expect (p == NULL, 0) && feof_unlocked (stream))
{
- _IO_funlockfile (stream);
+ funlockfile (stream);
*result = NULL;
__set_errno (ENOENT);
return errno;
}
- if (p == NULL || buffer[buflen - 1] != '\xff')
+ if (__builtin_expect (p == NULL, 0) || buffer[buflen - 1] != '\xff')
{
- _IO_funlockfile (stream);
+ funlockfile (stream);
*result = NULL;
__set_errno (ERANGE);
return errno;
@@ -61,13 +66,21 @@ __fgetsgent_r (FILE *stream, struct sgrp *resbuf, char *buffer, size_t buflen,
/* Skip leading blanks. */
while (isspace (*p))
++p;
- } while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
+ } while (*p == '\0' || *p == '#' /* Ignore empty and comment lines. */
/* Parse the line. If it is invalid, loop to
get the next line of the file to parse. */
- ! parse_line (buffer, (void *) resbuf, (void *) buffer, buflen,
- &errno));
+ || ! (parse_result = parse_line (p, resbuf,
+ (void *) buffer, buflen,
+ &errno)));
+
+ funlockfile (stream);
- _IO_funlockfile (stream);
+ if (__builtin_expect (parse_result, 0) == -1)
+ {
+ /* The parser ran out of space. */
+ *result = NULL;
+ return errno;
+ }
*result = resbuf;
return 0;
diff --git a/nss/nss_files/files-sgrp.c b/nss/nss_files/files-sgrp.c
index 15dc659..05c3805 100644
--- a/nss/nss_files/files-sgrp.c
+++ b/nss/nss_files/files-sgrp.c
@@ -23,7 +23,7 @@
#define DATABASE "gshadow"
struct sgent_data {};
-/* Our parser function is already defined in sgetspent_r.c, so use that
+/* Our parser function is already defined in sgetsgent_r.c, so use that
to parse lines from the database file. */
#define EXTERN_PARSER
#include "files-parse.c"
--
2.7.4

View File

@ -1,270 +0,0 @@
From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com>
Date: Mon, 10 Aug 2015 15:58:12 +0200
Subject: [PATCH] Add a C.UTF-8 locale
---
localedata/SUPPORTED | 1 +
localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 239 insertions(+)
create mode 100644 localedata/locales/C
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
index 8ca023e..2a78391 100644
--- a/localedata/SUPPORTED
+++ b/localedata/SUPPORTED
@@ -1,6 +1,7 @@
# This file names the currently supported and somewhat tested locales.
# If you have any additions please file a glibc bug report.
SUPPORTED-LOCALES=\
+C.UTF-8/UTF-8 \
aa_DJ.UTF-8/UTF-8 \
aa_DJ/ISO-8859-1 \
aa_ER/UTF-8 \
diff --git a/localedata/locales/C b/localedata/locales/C
new file mode 100644
index 0000000..fdf460e
--- /dev/null
+++ b/localedata/locales/C
@@ -0,0 +1,238 @@
+escape_char /
+comment_char %
+% Locale for C locale in UTF-8
+
+LC_IDENTIFICATION
+title "C locale"
+source ""
+address ""
+contact ""
+email "mfabian@redhat.com"
+tel ""
+fax ""
+language "C"
+territory ""
+revision "1.0"
+date "2015-08-10"
+%
+category "i18n:2012";LC_IDENTIFICATION
+category "i18n:2012";LC_CTYPE
+category "i18n:2012";LC_COLLATE
+category "i18n:2012";LC_TIME
+category "i18n:2012";LC_NUMERIC
+category "i18n:2012";LC_MONETARY
+category "i18n:2012";LC_MESSAGES
+category "i18n:2012";LC_PAPER
+category "i18n:2012";LC_NAME
+category "i18n:2012";LC_ADDRESS
+category "i18n:2012";LC_TELEPHONE
+category "i18n:2012";LC_MEASUREMENT
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "i18n"
+
+translit_start
+include "translit_combining";""
+translit_end
+
+END LC_CTYPE
+
+LC_COLLATE
+order_start forward
+<U0000>
+..
+<UFFFF>
+<U10000>
+..
+<U1FFFF>
+<U20000>
+..
+<U2FFFF>
+<UE0000>
+..
+<UEFFFF>
+<UF0000>
+..
+<UFFFFF>
+<U100000>
+..
+<U10FFFF>
+UNDEFINED
+order_end
+END LC_COLLATE
+
+LC_MONETARY
+% This is the 14652 i18n fdcc-set definition for
+% the LC_MONETARY category
+% (except for the int_curr_symbol and currency_symbol, they are empty in
+% the 14652 i18n fdcc-set definition and also empty in
+% glibc/locale/C-monetary.c. But localedef complains in that case).
+%
+% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
+% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
+int_curr_symbol "<U0055><U0053><U0044><U0020>"
+% Using "$" for currency_symbol. But maybe <U00A4> would be better?
+% U+00A4 is the "generic currency symbol"
+% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
+currency_symbol "<U0024>"
+mon_decimal_point "<U002E>"
+mon_thousands_sep ""
+mon_grouping -1
+positive_sign ""
+negative_sign "<U002D>"
+int_frac_digits -1
+frac_digits -1
+p_cs_precedes -1
+int_p_sep_by_space -1
+p_sep_by_space -1
+n_cs_precedes -1
+int_n_sep_by_space -1
+n_sep_by_space -1
+p_sign_posn -1
+n_sign_posn -1
+%
+END LC_MONETARY
+
+LC_NUMERIC
+% This is the POSIX Locale definition for
+% the LC_NUMERIC category.
+%
+decimal_point "<U002E>"
+thousands_sep ""
+grouping -1
+END LC_NUMERIC
+
+LC_TIME
+% This is the POSIX Locale definition for
+% the LC_TIME category.
+%
+% Abbreviated weekday names (%a)
+abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
+ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
+ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
+ "<U0053><U0061><U0074>"
+
+% Full weekday names (%A)
+day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
+ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
+ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
+ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
+ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
+ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
+ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
+
+% Abbreviated month names (%b)
+abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
+ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
+ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
+ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
+ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
+
+% Full month names (%B)
+mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
+ "<U004D><U0061><U0072><U0063><U0068>";/
+ "<U0041><U0070><U0072><U0069><U006C>";/
+ "<U004D><U0061><U0079>";/
+ "<U004A><U0075><U006E><U0065>";/
+ "<U004A><U0075><U006C><U0079>";/
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
+ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
+ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
+
+% Week description, consists of three fields:
+% 1. Number of days in a week.
+% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
+% 3. The weekday number to be contained in the first week of the year.
+%
+% ISO 8601 conforming applications should use the values 7, 19971201 (a
+% Monday), and 4 (Thursday), respectively.
+week 7;19971201;4
+first_weekday 1
+first_workday 1
+
+% Appropriate date and time representation (%c)
+% "%a %b %e %H:%M:%S %Y"
+d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
+
+% Appropriate date representation (%x)
+% "%m/%d/%y"
+d_fmt "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
+
+% Appropriate time representation (%X)
+% "%H:%M:%S"
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
+
+% Appropriate AM/PM time representation (%r)
+% "%I:%M:%S %p"
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
+
+% Equivalent of AM/PM (%p) "AM"/"PM"
+%
+am_pm "<U0041><U004D>";"<U0050><U004D>"
+
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
+END LC_TIME
+
+LC_MESSAGES
+% This is the POSIX Locale definition for
+% the LC_NUMERIC category.
+%
+yesexpr "<U005E><U005B><U0079><U0059><U005D>"
+noexpr "<U005E><U005B><U006E><U004E><U005D>"
+yesstr "<U0059><U0065><U0073>"
+nostr "<U004E><U006F>"
+END LC_MESSAGES
+
+LC_PAPER
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_PAPER category.
+% (A4 paper, this is also used in the built in C/POSIX
+% locale in glibc/locale/C-paper.c)
+height 297
+width 210
+END LC_PAPER
+
+LC_NAME
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_NAME category.
+% "%p%t%g%t%m%t%f"
+% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
+<U0025><U006D><U0025><U0074><U0025><U0066>"
+END LC_NAME
+
+LC_ADDRESS
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_ADDRESS category.
+% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
+% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
+postal_fmt "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
+<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
+<U004E><U0025><U0063><U0025><U004E>"
+END LC_ADDRESS
+
+LC_TELEPHONE
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_TELEPHONE category.
+% "+%c %a %l"
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
+<U006C>"
+% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_MEASUREMENT category.
+% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
+%metric
+measurement 1
+END LC_MEASUREMENT
+
--
2.4.3

View File

@ -1,2 +0,0 @@
L /etc/nscd.conf - - - - ../usr/share/baselayout/nscd.conf
d /var/db/nscd - - - - -

View File

@ -1,9 +1,11 @@
# Copyright 1999-2018 Gentoo Authors # Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=6
inherit prefix eutils versionator toolchain-funcs flag-o-matic gnuconfig \ PYTHON_COMPAT=( python3_{5,6,7} )
inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig \
multilib systemd multiprocessing multilib systemd multiprocessing
DESCRIPTION="GNU libc C library" DESCRIPTION="GNU libc C library"
@ -18,7 +20,7 @@ if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://sourceware.org/git/glibc.git" EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
inherit git-r3 inherit git-r3
else else
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
fi fi
@ -29,10 +31,10 @@ GCC_BOOTSTRAP_VER=20180511
# Gentoo patchset # Gentoo patchset
PATCH_VER=3 PATCH_VER=3
SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2" SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
IUSE="audit caps compile-locales doc gd hardened headers-only +multiarch multilib nscd profile selinux suid systemtap vanilla" IUSE="audit caps cet compile-locales doc gd headers-only +multiarch multilib nscd profile selinux +ssp suid systemtap test vanilla"
# Minimum kernel version that glibc requires # Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0" MIN_KERN_VER="3.2.0"
@ -60,7 +62,8 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi fi
# We need a new-enough binutils/gcc to match upstream baseline. # We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS. # Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
COMMON_DEPEND=" COMMON_DEPEND="
nscd? ( selinux? ( nscd? ( selinux? (
audit? ( sys-process/audit ) audit? ( sys-process/audit )
@ -71,12 +74,15 @@ COMMON_DEPEND="
systemtap? ( dev-util/systemtap ) systemtap? ( dev-util/systemtap )
" "
DEPEND="${COMMON_DEPEND} DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
>=app-misc/pax-utils-0.1.10 >=app-misc/pax-utils-0.1.10
sys-devel/bison sys-devel/bison
!<sys-apps/sandbox-1.6 !<sys-apps/sandbox-1.6
!<sys-apps/portage-2.1.2 !<sys-apps/portage-2.1.2
!<sys-devel/bison-2.7 !<sys-devel/bison-2.7
!<sys-devel/make-4
doc? ( sys-apps/texinfo ) doc? ( sys-apps/texinfo )
test? ( >=net-dns/libidn2-2.0.5 )
" "
RDEPEND="${COMMON_DEPEND} RDEPEND="${COMMON_DEPEND}
sys-apps/gentoo-functions sys-apps/gentoo-functions
@ -87,16 +93,19 @@ RDEPEND="${COMMON_DEPEND}
if [[ ${CATEGORY} == cross-* ]] ; then if [[ ${CATEGORY} == cross-* ]] ; then
DEPEND+=" !headers-only? ( DEPEND+=" !headers-only? (
>=${CATEGORY}/binutils-2.24 >=${CATEGORY}/binutils-2.24
>=${CATEGORY}/gcc-4.9 >=${CATEGORY}/gcc-6
)" )"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else else
DEPEND+=" DEPEND+="
>=sys-devel/binutils-2.24 >=sys-devel/binutils-2.24
>=sys-devel/gcc-4.9 >=sys-devel/gcc-6
virtual/os-headers virtual/os-headers
" "
RDEPEND+=" vanilla? ( !sys-libs/timezone-data )" RDEPEND+="
>=net-dns/libidn2-2.0.5
vanilla? ( !sys-libs/timezone-data )
"
PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
fi fi
@ -255,18 +264,18 @@ setup_target_flags() {
sparc64-*) sparc64-*)
case $(get-flag mcpu) in case $(get-flag mcpu) in
niagara[234]) niagara[234])
if version_is_at_least 2.8 ; then if ver_test -ge 2.8 ; then
cpu="sparc64v2" cpu="sparc64v2"
elif version_is_at_least 2.4 ; then elif ver_test -ge 2.4 ; then
cpu="sparc64v" cpu="sparc64v"
elif version_is_at_least 2.2.3 ; then elif ver_test -ge 2.2.3 ; then
cpu="sparc64b" cpu="sparc64b"
fi fi
;; ;;
niagara) niagara)
if version_is_at_least 2.4 ; then if ver_test -ge 2.4 ; then
cpu="sparc64v" cpu="sparc64v"
elif version_is_at_least 2.2.3 ; then elif ver_test -ge 2.2.3 ; then
cpu="sparc64b" cpu="sparc64b"
fi fi
;; ;;
@ -284,20 +293,20 @@ setup_target_flags() {
sparc-*) sparc-*)
case $(get-flag mcpu) in case $(get-flag mcpu) in
niagara[234]) niagara[234])
if version_is_at_least 2.8 ; then if ver_test -ge 2.8 ; then
cpu="sparcv9v2" cpu="sparcv9v2"
elif version_is_at_least 2.4 ; then elif ver_test -ge 2.4 ; then
cpu="sparcv9v" cpu="sparcv9v"
elif version_is_at_least 2.2.3 ; then elif ver_test -ge 2.2.3 ; then
cpu="sparcv9b" cpu="sparcv9b"
else else
cpu="sparcv9" cpu="sparcv9"
fi fi
;; ;;
niagara) niagara)
if version_is_at_least 2.4 ; then if ver_test -ge 2.4 ; then
cpu="sparcv9v" cpu="sparcv9v"
elif version_is_at_least 2.2.3 ; then elif ver_test -ge 2.2.3 ; then
cpu="sparcv9b" cpu="sparcv9b"
else else
cpu="sparcv9" cpu="sparcv9"
@ -367,21 +376,6 @@ setup_flags() {
append-flags -O2 -fno-strict-aliasing append-flags -O2 -fno-strict-aliasing
filter-flags '-fstack-protector*' filter-flags '-fstack-protector*'
# Starting with gcc-6 (and fully upstreamed pie patches) we control
# default enabled/disabled pie via use flags. So nothing to do
# here then. #618160
if [[ $(gcc-major-version) -lt 6 ]]; then
if use hardened && tc-enables-pie ; then
# Force PIC macro definition for all compilations since they're all
# either -fPIC or -fPIE with the default-PIE compiler.
append-cppflags -DPIC
else
# Don't build -fPIE without the default-PIE compiler and the
# hardened-pie patch
filter-flags -fPIE
fi
fi
} }
want_tls() { want_tls() {
@ -429,7 +423,7 @@ use_multiarch() {
sparc) nver="2.21" ;; sparc) nver="2.21" ;;
*) return 1 ;; *) return 1 ;;
esac esac
version_is_at_least ${nver} ${bver} ver_test ${bver} -ge ${nver}
} }
# Setup toolchain variables that had historically been defined in the # Setup toolchain variables that had historically been defined in the
@ -459,7 +453,7 @@ setup_env() {
export ABI=${ABI:-${DEFAULT_ABI:-default}} export ABI=${ABI:-${DEFAULT_ABI:-default}}
if use headers-only ; then if just_headers ; then
# Avoid mixing host's CC and target's CFLAGS_${ABI}: # Avoid mixing host's CC and target's CFLAGS_${ABI}:
# At this bootstrap stage we have only binutils for # At this bootstrap stage we have only binutils for
# target but not compiler yet. # target but not compiler yet.
@ -592,6 +586,9 @@ get_kheader_version() {
# pkg_ and src_ phases, so we call this function both in pkg_pretend and in # pkg_ and src_ phases, so we call this function both in pkg_pretend and in
# src_unpack. # src_unpack.
sanity_prechecks() { sanity_prechecks() {
# Make sure devpts is mounted correctly for use w/out setuid pt_chown
check_devpts
# Prevent native builds from downgrading # Prevent native builds from downgrading
if [[ ${MERGE_TYPE} != "buildonly" ]] && \ if [[ ${MERGE_TYPE} != "buildonly" ]] && \
[[ ${ROOT} == "/" ]] && \ [[ ${ROOT} == "/" ]] && \
@ -675,12 +672,6 @@ sanity_prechecks() {
# When we actually have to compile something... # When we actually have to compile something...
if ! just_headers ; then if ! just_headers ; then
local run_kv build_kv want_kv
run_kv=$(g_get_running_KV)
build_kv=$(g_int_to_KV $(get_kheader_version))
want_kv=${MIN_KERN_VER}
ebegin "Checking gcc for __thread support" ebegin "Checking gcc for __thread support"
if ! eend $(want__thread ; echo $?) ; then if ! eend $(want__thread ; echo $?) ; then
echo echo
@ -689,6 +680,13 @@ sanity_prechecks() {
die "No __thread support in gcc!" die "No __thread support in gcc!"
fi fi
if [[ ${CTARGET} == *-linux* ]] ; then
local run_kv build_kv want_kv
run_kv=$(g_get_running_KV)
build_kv=$(g_int_to_KV $(get_kheader_version))
want_kv=${MIN_KERN_VER}
if ! is_crosscompile && ! tc-is-cross-compiler ; then if ! is_crosscompile && ! tc-is-cross-compiler ; then
# Building fails on an non-supporting kernel # Building fails on an non-supporting kernel
ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
@ -706,12 +704,26 @@ sanity_prechecks() {
die "linux-headers version too low!" die "linux-headers version too low!"
fi fi
fi fi
fi
} }
# #
# the phases # the phases
# #
# pkg_pretend
pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
}
pkg_setup() {
# see bug 682570
[[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
}
# src_unpack # src_unpack
src_unpack() { src_unpack() {
@ -728,18 +740,10 @@ src_unpack() {
unpack ${P}.tar.xz unpack ${P}.tar.xz
fi fi
cd "${S}" || die
touch locale/C-translit.h || die #185476 #218003
cd "${WORKDIR}" || die cd "${WORKDIR}" || die
unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
} }
PATCHES=(
"${FILESDIR}"/${PV}/${P}-c-utf8-locale.patch
"${FILESDIR}"/2.25/glibc-2.25-gshadow-handle-erange.patch
)
src_prepare() { src_prepare() {
if ! use vanilla ; then if ! use vanilla ; then
elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}"
@ -789,13 +793,23 @@ glibc_do_configure() {
# https://sourceware.org/PR23273 # https://sourceware.org/PR23273
# Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
# and breaks multiarch support. See 659030#c3 for an example. # and breaks multiarch support. See 659030#c3 for an example.
# The glibc configure script doesn't properly use LDFLAGS all the time. # The glibc configure script doesn't properly use LDFLAGS all the time.
export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}" export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
einfo " $(printf '%15s' 'Manual CC:') ${CC}" einfo " $(printf '%15s' 'Manual CC:') ${CC}"
# Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
if is_crosscompile; then
# Assume worst-case bootstrap: glibc is buil first time
# when ${CTARGET}-g++ is not available yet. We avoid
# building auxiliary programs that require C++: bug #683074
# It should not affect final result.
export libc_cv_cxx_link_ok=no
# The line above has the same effect. We set CXX explicitly
# to make build logs less confusing.
export CXX=
fi
einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
echo echo
@ -803,6 +817,11 @@ glibc_do_configure() {
local myconf=() local myconf=()
case ${CTARGET} in case ${CTARGET} in
m68k*)
# setjmp() is not compatible with stack protection:
# https://sourceware.org/PR24202
myconf+=( --enable-stack-protector=no )
;;
powerpc-*) powerpc-*)
# Currently gcc on powerpc32 generates invalid code for # Currently gcc on powerpc32 generates invalid code for
# __builtin_return_address(0) calls. Normally programs # __builtin_return_address(0) calls. Normally programs
@ -812,7 +831,7 @@ glibc_do_configure() {
myconf+=( --enable-stack-protector=no ) myconf+=( --enable-stack-protector=no )
;; ;;
*) *)
myconf+=( --enable-stack-protector=all ) myconf+=( --enable-stack-protector=$(usex ssp all no) )
;; ;;
esac esac
myconf+=( --enable-stackguard-randomization ) myconf+=( --enable-stackguard-randomization )
@ -828,6 +847,12 @@ glibc_do_configure() {
*) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
esac esac
# Enable Intel Control-flow Enforcement Technology on amd64 if requested
case ${CTARGET} in
x86_64-*) myconf+=( $(use_enable cet) ) ;;
*) ;;
esac
[[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
myconf+=( --enable-kernel=${MIN_KERN_VER} ) myconf+=( --enable-kernel=${MIN_KERN_VER} )
@ -1155,6 +1180,9 @@ glibc_do_src_install() {
# powerpc # powerpc
ppc /lib/ld.so.1 ppc /lib/ld.so.1
ppc64 /lib64/ld64.so.1 ppc64 /lib64/ld64.so.1
# riscv
lp64d /lib/ld-linux-riscv64-lp64d.so.1
lp64 /lib/ld-linux-riscv64-lp64.so.1
# s390 # s390
s390 /lib/ld.so.1 s390 /lib/ld.so.1
s390x /lib/ld64.so.1 s390x /lib/ld64.so.1
@ -1237,6 +1265,17 @@ glibc_do_src_install() {
fi fi
done done
# HACK: If we're building for riscv, we need to additionally make sure that
# we can find the locale archive afterwards
case ${CTARGET} in
riscv*)
if [[ ! -e ${ED}/usr/lib/locale ]] ; then
dosym ../$(get_libdir)/locale /usr/lib/locale
fi
;;
*) ;;
esac
cd "${S}" cd "${S}"
# Install misc network config files # Install misc network config files
@ -1276,23 +1315,6 @@ glibc_do_src_install() {
if use compile-locales && ! is_crosscompile ; then if use compile-locales && ! is_crosscompile ; then
run_locale_gen "${ED}" run_locale_gen "${ED}"
fi fi
## COREOS: Add some local changes:
# - Config files are installed by baselayout, not glibc.
# - Install nscd/systemd stuff in /usr.
# Use tmpfiles to put nscd.conf in /etc and create directories.
insinto /usr/share/baselayout
if ! in_iuse nscd || use nscd ; then
doins "${S}"/nscd/nscd.conf || die
systemd_newtmpfilesd "${FILESDIR}"/nscd-conf.tmpfiles nscd-conf.conf || die
fi
# Clean out any default configs.
rm -rf "${ED}"/etc
# Restore this one for the SDK.
test ! -e "${T}"/00glibc || doenvd "${T}"/00glibc
} }
glibc_headers_install() { glibc_headers_install() {

View File

@ -6,15 +6,16 @@
<name>Gentoo Toolchain Project</name> <name>Gentoo Toolchain Project</name>
</maintainer> </maintainer>
<use> <use>
<flag name="cet">Enable Intel Control-flow Enforcement Technology (needs binutils 2.29 and gcc 8)</flag>
<flag name="compile-locales">build *all* locales in src_install; this is generally meant for stage building only as it ignores /etc/locale.gen file and can be pretty slow</flag> <flag name="compile-locales">build *all* locales in src_install; this is generally meant for stage building only as it ignores /etc/locale.gen file and can be pretty slow</flag>
<flag name="debug">When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL)</flag> <flag name="debug">When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL)</flag>
<flag name="gd">build memusage and memusagestat tools</flag> <flag name="gd">build memusage and memusagestat tools</flag>
<flag name="multiarch">enable optimizations for multiple CPU architectures (detected at runtime)</flag> <flag name="multiarch">enable optimizations for multiple CPU architectures (detected at runtime)</flag>
<flag name="nscd">Build, and enable support for, the Name Service Cache Daemon</flag> <flag name="nscd">Build, and enable support for, the Name Service Cache Daemon</flag>
<flag name="rpc">Enable obsolete RPC/NIS layers</flag> <flag name="rpc">Enable obsolete RPC/NIS layers</flag>
<flag name="ssp">protect stack of glibc internals</flag>
<flag name="suid">Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5</flag> <flag name="suid">Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5</flag>
<flag name="systemtap">enable systemtap static probe points</flag> <flag name="systemtap">enable systemtap static probe points</flag>
<flag name="cet">Enable Intel Control-flow Enforcement Technology (needs binutils 2.29 and gcc 8)</flag>
</use> </use>
<upstream> <upstream>
<remote-id type="cpe">cpe:/a:gnu:glibc</remote-id> <remote-id type="cpe">cpe:/a:gnu:glibc</remote-id>