mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 23:11:07 +02:00
commit
938a84e994
@ -1,3 +1,3 @@
|
||||
DIST gcc-4.7.3-r1-multilib-bootstrap.tar.bz2 8064097 SHA256 34aec5a59bb4d0ecf908c62fd418461d0f3793238296897687305fd7a1f27299 SHA512 40b93e194ad41a75d649d84d1c49070680f253a13f0617803243bc61c44fed1ca2d0a7572a97ebb79353f312b58b5f6360be916dd7435928cc53935082e15269 WHIRLPOOL bbce19e7fe5c30faa55ddd4e29070f0d1fdfca3a04e8d68e0772260fa9be89ccde63ec92badb490209008df5fee6e53dfdeec4ae51857b90ba298a79315a199f
|
||||
DIST glibc-2.22-patches-13.tar.bz2 74479 SHA256 ffd1e0f9a41be030e5ce2518d9e84a1fbaa9a4fb2e96f1b85dafb05fea666c86 SHA512 73517fc1502b0733d67ade1d1ba6168415f5da64f37045fac0b10ef57155bf6dfbe1876e4742d2543fcea0c935c179426f6fbb94f0205968392ef903d2f83897 WHIRLPOOL 0eeedaf09eb42e5186256dd41aae00cd2b9b8e3ab929a792e83d0fd8e8a8630d829f01b293588bf59e105eb17ab512416d8d115c3e542cddc34a84b84d56af3d
|
||||
DIST glibc-2.22.tar.xz 12969072 SHA256 eb731406903befef1d8f878a46be75ef862b9056ab0cde1626d08a7a05328948 SHA512 a8719f3a4f8aa5fa81711116fdafbea5082c6dfd85bd8c4cdce60571910263ab422b35bb8b55a84d37ccb146442133ba60a84d453ca4a439c8ccd35419bd051b WHIRLPOOL f7e707b3776fc197a2e7bf5633721925507237b154bbc1f94b9fc303c87e6fc039ff0758da6ee55b4c1a0daaa87c6e594a6c96e7b00a7ba8ae98ee29918709a7
|
||||
DIST glibc-2.23-patches-7.tar.bz2 315221 SHA256 97ef9e370ce9b09d8e9b9f6239f7ef94dd837d29b7bfc1404438c63da1d534ac SHA512 c0d0cab0a370acef0b085b0ab09ce868425a12bbb371d0a9ff91dc83a74a0d8d3b541d10c44650b00b7cb155f8ac1f87764e6a6bd9d6bae8a9a904b4df1650ef WHIRLPOOL 128ea1a2eeaad3d95cdf1054d10232a34e8f88d10ed8907a67d9ff02734243d20b21595ca3698a4861d9c65e2a59aedbcf8e399bd1ed879dba1556ce2995ad9b
|
||||
DIST glibc-2.23.tar.xz 13455260 SHA256 94efeb00e4603c8546209cefb3e1a50a5315c86fa9b078b6fad758e187ce13e9 SHA512 b82953388cd028e174cb08f082557bbce0dad8b67b17d31b29f90102fd52a51e03d591448ecb64882a1c1d5303afffc7f6ede85cee4c784a9284fbc9b4ad26cf WHIRLPOOL 7c7e3bf55a89a04bac917b9ca5a1cbb1613f22c427d2766f114b5a36f9635856005b823852ef5d3b73462b577fe4e5865e68e7b64633d48a95fa1e5eaa831a71
|
||||
|
@ -1,31 +1,114 @@
|
||||
--- gshadow/fgetsgent_r.c
|
||||
+++ gshadow/fgetsgent_r.c
|
||||
@@ -37,6 +37,7 @@
|
||||
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 rc;
|
||||
+ int parse_result;
|
||||
|
||||
_IO_flockfile (stream);
|
||||
- _IO_flockfile (stream);
|
||||
+ flockfile (stream);
|
||||
do
|
||||
@@ -64,11 +65,18 @@
|
||||
} while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
|
||||
{
|
||||
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));
|
||||
+ !(rc = 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 (rc < 0)
|
||||
- _IO_funlockfile (stream);
|
||||
+ if (__builtin_expect (parse_result, 0) == -1)
|
||||
+ {
|
||||
+ /* The parser ran out of space. */
|
||||
+ *result = NULL;
|
||||
+ __set_errno (ERANGE);
|
||||
+ 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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
@ -50,7 +50,7 @@ eblit-glibc-pkg_preinst() {
|
||||
|
||||
[[ ${ROOT} != "/" ]] && return 0
|
||||
[[ -d ${ED}/$(get_libdir) ]] || return 0
|
||||
glibc_sanity_check
|
||||
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
|
||||
|
||||
# For newer EAPIs, this was run in pkg_pretend.
|
||||
if [[ ${EAPI:-0} == [0123] ]] ; then
|
||||
|
@ -27,8 +27,7 @@ toolchain-glibc_headers_compile() {
|
||||
|
||||
eblit-glibc-src_compile() {
|
||||
if just_headers ; then
|
||||
export ABI=default
|
||||
toolchain-glibc_headers_compile
|
||||
[[ ${EAPI:-0} == [01] ]] && toolchain-glibc_headers_configure
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -226,6 +226,14 @@ toolchain-glibc_headers_configure() {
|
||||
pushd "${S}"/sysdeps/mips >/dev/null
|
||||
sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
|
||||
sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
|
||||
if version_is_at_least 2.21 ; then
|
||||
# Force the mips ABI to the default. This is OK because the set of
|
||||
# installed headers in this phase is the same between the 3 ABIs.
|
||||
# If this ever changes, this hack will break, but that's unlikely
|
||||
# as glibc discourages that behavior.
|
||||
# https://crbug.com/647033
|
||||
sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
|
||||
fi
|
||||
popd >/dev/null
|
||||
fi
|
||||
|
||||
|
@ -51,6 +51,12 @@ toolchain-glibc_src_install() {
|
||||
cp -a elf/ld.so "${ED}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
|
||||
fi
|
||||
|
||||
# Newer versions get fancy with libm linkage to include vectorized support.
|
||||
# While we don't really need a ldscript here, portage QA checks get upset.
|
||||
if [[ -e ${ED}$(alt_usrlibdir)/libm-${PV}.a ]] ; then
|
||||
dosym ../../$(get_libdir)/libm-${PV}.so $(alt_usrlibdir)/libm-${PV}.so
|
||||
fi
|
||||
|
||||
# We'll take care of the cache ourselves
|
||||
rm -f "${ED}"/etc/ld.so.cache
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
@ -58,6 +58,8 @@ eblit-glibc-src_prepare() {
|
||||
find . -type f '(' -size 0 -o -name "*.orig" ')' -delete
|
||||
find . -name configure -exec touch {} +
|
||||
|
||||
eprefixify extra/locale/locale-gen
|
||||
|
||||
# Fix permissions on some of the scripts.
|
||||
chmod u+x "${S}"/scripts/*.sh
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib systemd unpacker multiprocessing
|
||||
inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib systemd unpacker multiprocessing prefix
|
||||
|
||||
DESCRIPTION="GNU libc6 (also called glibc2) C library"
|
||||
HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
|
||||
|
||||
LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
|
||||
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 s390 sh ~sparc x86"
|
||||
RESTRICT="strip" # strip ourself #46186
|
||||
EMULTILIB_PKG="true"
|
||||
|
||||
@ -27,10 +27,10 @@ case ${PV} in
|
||||
;;
|
||||
esac
|
||||
GCC_BOOTSTRAP_VER="4.7.3-r1"
|
||||
PATCH_VER="13" # Gentoo patchset
|
||||
PATCH_VER="7" # Gentoo patchset
|
||||
: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires
|
||||
|
||||
IUSE="debug gd hardened multilib nscd selinux systemtap profile suid vanilla crosscompile_opts_headers-only"
|
||||
IUSE="audit caps debug gd hardened multilib nscd +rpc selinux systemtap profile suid vanilla crosscompile_opts_headers-only"
|
||||
|
||||
# Here's how the cross-compile logic breaks down ...
|
||||
# CTARGET - machine that will target the binaries
|
||||
@ -64,25 +64,33 @@ SLOT="2.2"
|
||||
|
||||
# General: We need a new-enough binutils/gcc to match upstream baseline.
|
||||
# arch: we need to make sure our binutils/gcc supports TLS.
|
||||
DEPEND=">=app-misc/pax-utils-0.1.10
|
||||
!<sys-apps/sandbox-1.6
|
||||
!<sys-apps/portage-2.1.2
|
||||
selinux? ( sys-libs/libselinux )"
|
||||
RDEPEND="!sys-kernel/ps3-sources
|
||||
sys-apps/gentoo-functions
|
||||
COMMON_DEPEND="
|
||||
nscd? ( selinux? (
|
||||
audit? ( sys-process/audit )
|
||||
caps? ( sys-libs/libcap )
|
||||
) )
|
||||
suid? ( caps? ( sys-libs/libcap ) )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=app-misc/pax-utils-0.1.10
|
||||
!<sys-apps/sandbox-1.6
|
||||
!<sys-apps/portage-2.1.2"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!sys-kernel/ps3-sources
|
||||
sys-apps/gentoo-functions
|
||||
!sys-libs/nss-db"
|
||||
|
||||
if [[ ${CATEGORY} == cross-* ]] ; then
|
||||
DEPEND+=" !crosscompile_opts_headers-only? (
|
||||
>=${CATEGORY}/binutils-2.24
|
||||
>=${CATEGORY}/gcc-4.6
|
||||
>=${CATEGORY}/gcc-4.7
|
||||
)"
|
||||
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
|
||||
else
|
||||
DEPEND+="
|
||||
>=sys-devel/binutils-2.24
|
||||
>=sys-devel/gcc-4.6
|
||||
>=sys-devel/gcc-4.7
|
||||
virtual/os-headers"
|
||||
RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
|
||||
PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
|
||||
@ -155,9 +163,6 @@ done
|
||||
|
||||
eblit-src_unpack-pre() {
|
||||
[[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
|
||||
# Bug 558636 we don't apply the pie works around for 2.22. It shoud have the support. #558636
|
||||
GLIBC_PATCH_EXCLUDE+=" 00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch"
|
||||
GLIBC_PATCH_EXCLUDE+=" 00_all_0012-disable-PIE-when-checking-for-PIC-default.patch"
|
||||
}
|
||||
|
||||
eblit-src_prepare-post() {
|
Loading…
x
Reference in New Issue
Block a user