summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Schwartz2017-12-31 01:07:34 -0500
committerEli Schwartz2017-12-31 01:07:34 -0500
commitc63f732de65a9cec95709a0124ebe97102897d3d (patch)
treedc3972eb5f568b29c791cb12f3986183103f8806
parent41a698329f79e84e21cbe198683efdba4382783e (diff)
downloadaur-c63f732de65a9cec95709a0124ebe97102897d3d.tar.gz
upgpkg: glibc-git 2.26.r1049.g3e3c904dae-1
Add patch corresponding to [core] changes. New locale-gen allows optionally listing a charset inside the flag file.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--bz20338.patch114
-rw-r--r--locale-gen9
4 files changed, 133 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2b7978af9047..1e3d55a6ce9c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = glibc-git
pkgdesc = GNU C Library, from git
- pkgver = 2.26.r1039.g48a8f83281
+ pkgver = 2.26.r1049.g3e3c904dae
pkgrel = 1
url = https://www.gnu.org/software/libc/
install = glibc-git.install
@@ -22,8 +22,10 @@ pkgbase = glibc-git
backup = etc/nscd.conf
source = git+https://sourceware.org/git/glibc.git
source = locale-gen
+ source = bz20338.patch
sha256sums = SKIP
- sha256sums = 7e4a8d3fd37c67ec57b5e27575155d958628a92729098cf8a01ba9aba7078a80
+ sha256sums = cdbd47144b319b0b0eca8d0488dc5173bf24158ab888340920ffe6c3d252dfa6
+ sha256sums = 959d4f41edd004bddd9091c4d8c8c3aa07d79a04bfdb89d59f9f26fe5a74d32a
pkgname = glibc-git
diff --git a/PKGBUILD b/PKGBUILD
index 13a27802ba87..2edbc30cfc2b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
# All my PKGBUILDs are managed at https://github.com/eli-schwartz/pkgbuilds
pkgname=glibc-git
-pkgver=2.26.r1039.g48a8f83281
+pkgver=2.26.r1049.g3e3c904dae
pkgrel=1
pkgdesc='GNU C Library, from git'
arch=('i686' 'x86_64')
@@ -21,9 +21,11 @@ backup=('etc/gai.conf' 'etc/nscd.conf')
options=('!strip' 'staticlibs')
install='glibc-git.install'
source=('git+https://sourceware.org/git/glibc.git'
- 'locale-gen')
+ 'locale-gen'
+ 'bz20338.patch')
sha256sums=('SKIP'
- '7e4a8d3fd37c67ec57b5e27575155d958628a92729098cf8a01ba9aba7078a80')
+ 'cdbd47144b319b0b0eca8d0488dc5173bf24158ab888340920ffe6c3d252dfa6'
+ '959d4f41edd004bddd9091c4d8c8c3aa07d79a04bfdb89d59f9f26fe5a74d32a')
pkgver() {
cd glibc
@@ -32,8 +34,11 @@ pkgver() {
}
prepare() {
- rm -rf build
- mkdir build
+ mkdir -p build
+
+ cd glibc
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=20338
+ patch -p1 < ../bz20338.patch
}
build() {
diff --git a/bz20338.patch b/bz20338.patch
new file mode 100644
index 000000000000..d223e9f08882
--- /dev/null
+++ b/bz20338.patch
@@ -0,0 +1,114 @@
+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
+
diff --git a/locale-gen b/locale-gen
index 1bc79322b6e9..c9b65c448ad7 100644
--- a/locale-gen
+++ b/locale-gen
@@ -8,17 +8,18 @@ fi
for locale in /etc/locales/*; do
if [ -f "$locale" ]; then
+ read -r charset < "$locale"
+ charset=${charset:-UTF-8}
locale=${locale##*/}
else
continue
fi
- printf '%s: generating locale\n' "$locale".UTF-8 >&2
+ printf '%s: generating locale\n' "$locale"."$charset" >&2
- localedef -i "$locale" -f UTF-8 -c "$locale".UTF-8
+ localedef -i "$locale" -f "$charset" -c "$locale"."$charset"
case $? in
- 4) printf '%s: invalid locale\n' "$locale" >&2 ;;
- 1) exit
+ 4) printf '%s: invalid locale\n' "$locale"."$charset" >&2
esac
done