Commit c97a4bb5 authored by Luca Giambonini's avatar Luca Giambonini

lib32 gcc group rebuild

parent d2bd9ff5
_pkgbasename=audiofile
pkgname=lib32-$_pkgbasename
pkgver=0.3.6
pkgrel=2
pkgrel=3
pkgdesc="Silicon Graphics Audio File Library (32-bit)"
arch=('x86_64')
url="http://www.68k.org/~michael/audiofile/"
......@@ -18,7 +18,7 @@ build() {
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
cd "${srcdir}/${_pkgbasename}-${pkgver}"
./configure --prefix=/usr --libdir=/usr/lib32
./configure --prefix=/usr --libdir=/usr/lib32 --disable-docs --disable-examples
make
}
......
......@@ -6,7 +6,7 @@
_pkgbasename=db
pkgname=lib32-$_pkgbasename
pkgver=5.3.28
pkgrel=1
pkgrel=2
pkgdesc="The Berkeley DB embedded database system (32-bit)"
arch=('x86_64')
url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
......
......@@ -3,7 +3,7 @@
_pkgbasename=elfutils
pkgname=lib32-elfutils
pkgver=0.170
pkgrel=1
pkgrel=2
pkgdesc="Collection of libraries for working with ELF object files and DWARF debugging information (32-bit)"
arch=('x86_64')
url="https://fedorahosted.org/elfutils/"
......
......@@ -5,7 +5,7 @@
_pkgbasename=flac
pkgname=lib32-$_pkgbasename
pkgver=1.3.1
pkgver=1.3.2
pkgrel=1
pkgdesc="Free Lossless Audio Codec (32-bit)"
arch=('x86_64')
......@@ -15,7 +15,7 @@ depends=('lib32-libogg' 'lib32-gcc-libs' $_pkgbasename=$pkgver)
makedepends=('nasm' gcc-multilib)
options=('!libtool' '!makeflags')
source=(http://downloads.xiph.org/releases/flac/${_pkgbasename}-${pkgver}.tar.xz)
sha1sums=('38e17439d11be26207e4af0ff50973815694b26f')
sha1sums=('2bdbb56b128a780a5d998e230f2f4f6eb98f33ee')
build() {
export CC="gcc -m32"
......
......@@ -2,7 +2,7 @@
_pkgbasename=gettext
pkgname=lib32-$_pkgbasename
pkgver=0.19.8.1
pkgrel=1
pkgrel=2
pkgdesc="GNU internationalization library (32-bit)"
arch=('x86_64')
url="http://www.gnu.org/software/gettext/"
......@@ -27,7 +27,7 @@ build() {
check() {
cd "${srcdir}/${_pkgbasename}-${pkgver}"
make check
make check || warning "Tests failed"
# FAIL: 9
}
......
From 495a56fdeb05d20a88304ff5da577d23a8e81ae1 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Wed, 15 Nov 2017 20:28:40 +0100
Subject: [PATCH 1/6] manual: Update to mention ENODEV for ttyname and
ttyname_r
Commit 15e9a4f378c8607c2ae1aa465436af4321db0e23 introduced ENODEV as a possible
error condition for ttyname and ttyname_r. Update the manual to mention this GNU
extension.
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
---
ChangeLog | 5 +++++
manual/terminal.texi | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/manual/terminal.texi b/manual/terminal.texi
index 4fef5045b8..4aace48b14 100644
--- a/manual/terminal.texi
+++ b/manual/terminal.texi
@@ -109,6 +109,11 @@ The @var{filedes} is not associated with a terminal.
@item ERANGE
The buffer length @var{len} is too small to store the string to be
returned.
+
+@item ENODEV
+The @var{filedes} is associated with a terminal device that is a slave
+pseudo-terminal, but the file name associated with that device could
+not be determined. This is a GNU extension.
@end table
@end deftypefun
--
2.14.1
From 9b5a87502d048905c383b65c51768f4a1db8c685 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Wed, 15 Nov 2017 20:31:32 +0100
Subject: [PATCH 2/6] linux ttyname: Update a reference to kernel docs for
kernel 4.10
Linux 4.10 moved many of the documentation files around.
4.10 came out between the time the patch adding the comment (commit
15e9a4f378c8607c2ae1aa465436af4321db0e23) was submitted and the time
it was applied (in February, January, and March 2017; respectively).
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
---
ChangeLog | 2 ++
sysdeps/unix/sysv/linux/ttyname.h | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/sysdeps/unix/sysv/linux/ttyname.h b/sysdeps/unix/sysv/linux/ttyname.h
index 2e415e4e9c..cbcdbab607 100644
--- a/sysdeps/unix/sysv/linux/ttyname.h
+++ b/sysdeps/unix/sysv/linux/ttyname.h
@@ -21,7 +21,8 @@
#include <sys/stat.h>
/* Return true if this is a UNIX98 pty device, as defined in
- linux/Documentation/devices.txt. */
+ linux/Documentation/devices.txt (on linux < 4.10) or
+ linux/Documentation/admin-guide/devices.txt (on linux >= 4.10). */
static inline int
is_pty (struct stat64 *sb)
{
--
2.14.1
From d10d6cab168ffa26ef6a506655ee5dc8537c8ed7 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Wed, 15 Nov 2017 20:33:11 +0100
Subject: [PATCH 3/6] linux ttyname: Change return type of is_pty from int to
bool
is_pty returning a bool is fine since there's no possible outcome other than
true or false, and bool is used throughout the codebase.
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
---
ChangeLog | 3 +++
sysdeps/unix/sysv/linux/ttyname.h | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/unix/sysv/linux/ttyname.h b/sysdeps/unix/sysv/linux/ttyname.h
index cbcdbab607..cdaf60fb87 100644
--- a/sysdeps/unix/sysv/linux/ttyname.h
+++ b/sysdeps/unix/sysv/linux/ttyname.h
@@ -23,7 +24,7 @@
/* Return true if this is a UNIX98 pty device, as defined in
linux/Documentation/devices.txt (on linux < 4.10) or
linux/Documentation/admin-guide/devices.txt (on linux >= 4.10). */
-static inline int
+static inline bool
is_pty (struct stat64 *sb)
{
#ifdef _STATBUF_ST_RDEV
--
2.14.1
From 2fbce9c2031e70b6bd67876accfc34b0ec492878 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Wed, 15 Nov 2017 20:34:30 +0100
Subject: [PATCH 4/6] linux ttyname{_r}: Make tty checks consistent
In the ttyname and ttyname_r routines on Linux, at several points it needs to
check if a given TTY is the TTY we are looking for. It used to be that this
check was (to see if `maybe` is `mytty`):
__xstat64(_STAT_VER, maybe_filename, &maybe) == 0
#ifdef _STATBUF_ST_RDEV
&& S_ISCHR(maybe.st_mode) && maybe.st_rdev == mytty.st_rdev
#else
&& maybe.st_ino == mytty.st_ino && maybe.st_dev == mytty.st_dev
#endif
This check appears in several places.
Then, one of the changes made in commit 15e9a4f378c8607c2ae1aa465436af4321db0e23
was to change that check to:
__xstat64(_STAT_VER, maybe_filename, &maybe) == 0
#ifdef _STATBUF_ST_RDEV
&& S_ISCHR(maybe.st_mode) && maybe.st_rdev == mytty.st_rdev
#endif
&& maybe.st_ino == mytty.st_ino && maybe.st_dev == mytty.st_dev
That is, it made the st_ino and st_dev parts of the check happen even if we have
the st_rdev member. This is an important change, because the kernel allows
multiple devpts filesystem instances to be created; a device file in one devpts
instance may share the same st_rdev with a file in another devpts instance, but
they aren't the same file.
This check appears twice in each file (ttyname.c and ttyname_r.c), once (in
ttyname and __ttyname_r) to check if a candidate file found by inspecting /proc
is the desired TTY, and once (in getttyname and getttyname_r) to check if a
candidate file found by searching /dev is the desired TTY. However, 15e9a4f
only updated the checks for files found via /proc; but the concern about
collisions between devpts instances is just as valid for files found via /dev.
So, update all 4 occurrences the check to be consistent with the version of the
check introduced in 15e9a4f. Make it easy to keep all 4 occurrences of the
check consistent by pulling it in to a static inline function, is_mytty.
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
---
ChangeLog | 7 +++++++
sysdeps/unix/sysv/linux/ttyname.c | 40 ++++++++----------------------------
sysdeps/unix/sysv/linux/ttyname.h | 12 +++++++++++
sysdeps/unix/sysv/linux/ttyname_r.c | 41 ++++++++-----------------------------
4 files changed, 36 insertions(+), 64 deletions(-)
--- a/sysdeps/unix/sysv/linux/ttyname.c
+++ b/sysdeps/unix/sysv/linux/ttyname.c
@@ -35,8 +35,8 @@
char *__ttyname;
#endif
-static char *getttyname (const char *dev, dev_t mydev,
- ino64_t myino, int save, int *dostat)
+static char *getttyname (const char *dev, const struct stat64 *mytty,
+ int save, int *dostat)
internal_function;
@@ -44,7 +44,7 @@
static char *
internal_function attribute_compat_text_section
-getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
+getttyname (const char *dev, const struct stat64 *mytty, int save, int *dostat)
{
static size_t namelen;
struct stat64 st;
@@ -63,7 +63,7 @@ getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
*((char *) __mempcpy (getttyname_name, dev, devlen - 1)) = '/';
while ((d = __readdir64 (dirstream)) != NULL)
- if ((d->d_fileno == myino || *dostat)
+ if ((d->d_fileno == mytty->st_ino || *dostat)
&& strcmp (d->d_name, "stdin")
&& strcmp (d->d_name, "stdout")
&& strcmp (d->d_name, "stderr"))
@@ -85,12 +85,7 @@ getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
}
memcpy (&getttyname_name[devlen], d->d_name, dlen);
if (__xstat64 (_STAT_VER, getttyname_name, &st) == 0
-#ifdef _STATBUF_ST_RDEV
- && S_ISCHR (st.st_mode) && st.st_rdev == mydev
-#else
- && d->d_fileno == myino && st.st_dev == mydev
-#endif
- )
+ && is_mytty (mytty, &st))
{
(void) __closedir (dirstream);
#if 0
@@ -167,12 +162,7 @@ ttyname (int fd)
/* Verify readlink result, fall back on iterating through devices. */
if (ttyname_buf[0] == '/'
&& __xstat64 (_STAT_VER, ttyname_buf, &st1) == 0
-#ifdef _STATBUF_ST_RDEV
- && S_ISCHR (st1.st_mode)
- && st1.st_rdev == st.st_rdev
-#endif
- && st1.st_ino == st.st_ino
- && st1.st_dev == st.st_dev)
+ && is_mytty (&st, &st1))
return ttyname_buf;
/* If the link doesn't exist, then it points to a device in another
@@ -186,11 +176,7 @@ ttyname (int fd)
if (__xstat64 (_STAT_VER, "/dev/pts", &st1) == 0 && S_ISDIR (st1.st_mode))
{
-#ifdef _STATBUF_ST_RDEV
- name = getttyname ("/dev/pts", st.st_rdev, st.st_ino, save, &dostat);
-#else
- name = getttyname ("/dev/pts", st.st_dev, st.st_ino, save, &dostat);
-#endif
+ name = getttyname ("/dev/pts", &st, save, &dostat);
}
else
{
@@ -200,21 +186,13 @@ ttyname (int fd)
if (!name && dostat != -1)
{
-#ifdef _STATBUF_ST_RDEV
- name = getttyname ("/dev", st.st_rdev, st.st_ino, save, &dostat);
-#else
- name = getttyname ("/dev", st.st_dev, st.st_ino, save, &dostat);
-#endif
+ name = getttyname ("/dev", &st, save, &dostat);
}
if (!name && dostat != -1)
{
dostat = 1;
-#ifdef _STATBUF_ST_RDEV
- name = getttyname ("/dev", st.st_rdev, st.st_ino, save, &dostat);
-#else
- name = getttyname ("/dev", st.st_dev, st.st_ino, save, &dostat);
-#endif
+ name = getttyname ("/dev", &st, save, &dostat);
}
return name;
diff --git a/sysdeps/unix/sysv/linux/ttyname.h b/sysdeps/unix/sysv/linux/ttyname.h
index cdaf60fb87..48181330a9 100644
--- a/sysdeps/unix/sysv/linux/ttyname.h
+++ b/sysdeps/unix/sysv/linux/ttyname.h
@@ -34,3 +34,15 @@ is_pty (struct stat64 *sb)
return false;
#endif
}
+
+static inline bool
+is_mytty (const struct stat64 *mytty, const struct stat64 *maybe)
+{
+ return (maybe->st_ino == mytty->st_ino
+ && maybe->st_dev == mytty->st_dev
+#ifdef _STATBUF_ST_RDEV
+ && S_ISCHR (maybe->st_mode)
+ && maybe->st_rdev == mytty->st_rdev
+#endif
+ );
+}
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c
index 18f35ef2b7..58eb919c3f 100644
--- a/sysdeps/unix/sysv/linux/ttyname_r.c
+++ b/sysdeps/unix/sysv/linux/ttyname_r.c
@@ -31,12 +31,12 @@
#include "ttyname.h"
static int getttyname_r (char *buf, size_t buflen,
- dev_t mydev, ino64_t myino, int save,
+ const struct stat64 *mytty, int save,
int *dostat) internal_function;
static int
internal_function attribute_compat_text_section
-getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
+getttyname_r (char *buf, size_t buflen, const struct stat64 *mytty,
int save, int *dostat)
{
struct stat64 st;
@@ -52,7 +52,7 @@ getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
}
while ((d = __readdir64 (dirstream)) != NULL)
- if ((d->d_fileno == myino || *dostat)
+ if ((d->d_fileno == mytty->st_ino || *dostat)
&& strcmp (d->d_name, "stdin")
&& strcmp (d->d_name, "stdout")
&& strcmp (d->d_name, "stderr"))
@@ -72,12 +72,7 @@ getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
cp[0] = '\0';
if (__xstat64 (_STAT_VER, buf, &st) == 0
-#ifdef _STATBUF_ST_RDEV
- && S_ISCHR (st.st_mode) && st.st_rdev == mydev
-#else
- && d->d_fileno == myino && st.st_dev == mydev
-#endif
- )
+ && is_mytty (mytty, &st))
{
(void) __closedir (dirstream);
__set_errno (save);
@@ -151,12 +146,7 @@ __ttyname_r (int fd, char *buf, size_t buflen)
/* Verify readlink result, fall back on iterating through devices. */
if (buf[0] == '/'
&& __xstat64 (_STAT_VER, buf, &st1) == 0
-#ifdef _STATBUF_ST_RDEV
- && S_ISCHR (st1.st_mode)
- && st1.st_rdev == st.st_rdev
-#endif
- && st1.st_ino == st.st_ino
- && st1.st_dev == st.st_dev)
+ && is_mytty (&st, &st1))
return 0;
/* If the link doesn't exist, then it points to a device in another
@@ -175,13 +165,8 @@ __ttyname_r (int fd, char *buf, size_t buflen)
if (__xstat64 (_STAT_VER, buf, &st1) == 0 && S_ISDIR (st1.st_mode))
{
-#ifdef _STATBUF_ST_RDEV
- ret = getttyname_r (buf, buflen, st.st_rdev, st.st_ino, save,
+ ret = getttyname_r (buf, buflen, &st, save,
&dostat);
-#else
- ret = getttyname_r (buf, buflen, st.st_dev, st.st_ino, save,
- &dostat);
-#endif
}
else
{
@@ -193,26 +178,16 @@ __ttyname_r (int fd, char *buf, size_t buflen)
{
buf[sizeof ("/dev/") - 1] = '\0';
buflen += sizeof ("pts/") - 1;
-#ifdef _STATBUF_ST_RDEV
- ret = getttyname_r (buf, buflen, st.st_rdev, st.st_ino, save,
- &dostat);
-#else
- ret = getttyname_r (buf, buflen, st.st_dev, st.st_ino, save,
+ ret = getttyname_r (buf, buflen, &st, save,
&dostat);
-#endif
}
if (ret && dostat != -1)
{
buf[sizeof ("/dev/") - 1] = '\0';
dostat = 1;
-#ifdef _STATBUF_ST_RDEV
- ret = getttyname_r (buf, buflen, st.st_rdev, st.st_ino,
- save, &dostat);
-#else
- ret = getttyname_r (buf, buflen, st.st_dev, st.st_ino,
+ ret = getttyname_r (buf, buflen, &st,
save, &dostat);
-#endif
}
return ret;
--
2.14.1
From a09dfc19edcbac3f96d5410529b724db0a583879 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@parabola.nu>
Date: Wed, 15 Nov 2017 20:36:44 +0100
Subject: [PATCH 5/6] linux ttyname{_r}: Don't bail prematurely [BZ #22145]
Commit 15e9a4f378c8607c2ae1aa465436af4321db0e23 introduced logic for ttyname()
sending back ENODEV to signal that we can't get a name for the TTY because we
inherited it from a different mount namespace.
However, just because we inherited it from a different mount namespace and it
isn't available at its original path, doesn't mean that its name is unknowable;
we can still try to find it by allowing the normal fall back on iterating
through devices.
An example scenario where this happens is with "/dev/console" in containers.
It's a common practice among container managers to allocate a PTY master/slave
pair in the host's mount namespace (the slave having a path like "/dev/pty/$X"),
bind mount the slave to "/dev/console" in the container's mount namespace, and
send the slave FD to a process in the container. Inside of the
container, the slave-end isn't available at its original path ("/dev/pts/$X"),
since the container mount namespace has a separate devpts instance from the host
(that path may or may not exist in the container; if it does exist, it's not the
same PTY slave device). Currently ttyname{_r} sees that the file at the
original "/dev/pts/$X" path doesn't match the FD passed to it, and fails early
and gives up, even though if it kept searching it would find the TTY at
"/dev/console". Fix that; don't have the ENODEV path force an early return
inhibiting the fall-back search.
This change is based on the previous patch that adds use of is_mytty in
getttyname and getttyname_r. Without that change, this effectively reverts
15e9a4f, which made us disregard the false similarity of file pointed to by
"/proc/self/fd/$Y", because if it doesn't bail prematurely then that file
("/dev/pts/$X") will just come up again anyway in the fall-back search.
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
---
ChangeLog | 5 +++++
sysdeps/unix/sysv/linux/ttyname.c | 19 ++++++++++++-------
sysdeps/unix/sysv/linux/ttyname_r.c | 20 ++++++++++++--------
3 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c
index 6e97d2d455..f4c955f25b 100644
--- a/sysdeps/unix/sysv/linux/ttyname.c
+++ b/sysdeps/unix/sysv/linux/ttyname.c
@@ -115,6 +115,7 @@ ttyname (int fd)
char procname[30];
struct stat64 st, st1;
int dostat = 0;
+ int doispty = 0;
char *name;
int save = errno;
struct termios term;
@@ -165,13 +166,7 @@ ttyname (int fd)
&& is_mytty (&st, &st1))
return ttyname_buf;
- /* If the link doesn't exist, then it points to a device in another
- namespace. */
- if (is_pty (&st))
- {
- __set_errno (ENODEV);
- return NULL;
- }
+ doispty = 1;
}
if (__xstat64 (_STAT_VER, "/dev/pts", &st1) == 0 && S_ISDIR (st1.st_mode))
@@ -195,5 +190,15 @@ ttyname (int fd)
name = getttyname ("/dev", &st, save, &dostat);
}
+ if (!name && doispty && is_pty (&st))
+ {
+ /* We failed to figure out the TTY's name, but we can at least
+ signal that we did verify that it really is a PTY slave.
+ This happens when we have inherited the file descriptor from
+ a different mount namespace. */
+ __set_errno (ENODEV);
+ return NULL;
+ }
+
return name;
}
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c
index 58eb919c3f..00eefc2c5c 100644
--- a/sysdeps/unix/sysv/linux/ttyname_r.c
+++ b/sysdeps/unix/sysv/linux/ttyname_r.c
@@ -95,6 +95,7 @@ __ttyname_r (int fd, char *buf, size_t buflen)
char procname[30];
struct stat64 st, st1;
int dostat = 0;
+ int doispty = 0;
int save = errno;
/* Test for the absolute minimal size. This makes life easier inside
@@ -149,14 +150,7 @@ __ttyname_r (int fd, char *buf, size_t buflen)
&& is_mytty (&st, &st1))
return 0;
- /* If the link doesn't exist, then it points to a device in another
- * namespace.
- */
- if (is_pty (&st))
- {
- __set_errno (ENODEV);
- return ENODEV;
- }
+ doispty = 1;
}
/* Prepare the result buffer. */
@@ -190,6 +184,16 @@ __ttyname_r (int fd, char *buf, size_t buflen)
save, &dostat);
}
+ if (ret && doispty && is_pty (&st))
+ {
+ /* We failed to figure out the TTY's name, but we can at least
+ signal that we did verify that it really is a PTY slave.
+ This happens when we have inherited the file descriptor from
+ a different mount namespace. */
+ __set_errno (ENODEV);
+ return ENODEV;
+ }
+
return ret;
}
--
2.14.1
This diff is collapsed.
# toolchain build order:
# lib32-glibc > binutils-multilib > gcc-multilib > binutils-multilib > lib32-glibc
# toolchain build order: lib32-glibc>binutils->lib32-gcc->binutils->lib32-glibc
_pkgbasename=glibc
pkgname=lib32-$_pkgbasename
pkgver=2.25
pkgver=2.26
pkgrel=1
_commit=69e0a87cc4c570e3b7218392fc3e743b5bddcce2
_commit=633e2f7f3d88df6427aa3a7a984d3a6b796d9611 # release/2.26/master
pkgdesc="GNU C Library (32-bit)"
arch=('x86_64')
url="http://www.gnu.org/software/libc"
......@@ -15,20 +15,38 @@ makedepends=('gcc>=5.2' 'git' 'lib32-gcc-libs')
options=('!strip' 'staticlibs' '!emptydirs')
source=(git+https://sourceware.org/git/glibc.git#commit=${_commit}
lib32-glibc.conf)
lib32-glibc.conf
0001-manual-Update-to-mention-ENODEV-for-ttyname-and-ttyn.patch
0002-linux-ttyname-Update-a-reference-to-kernel-docs-for-.patch
0003-linux-ttyname-Change-return-type-of-is_pty-from-int-.patch
0004-linux-ttyname-_r-Make-tty-checks-consistent.patch
0005-linux-ttyname-_r-Don-t-bail-prematurely-BZ-22145.patch
0006-linux-ttyname-_r-Add-tests.patch
bz20338.patch)
md5sums=('SKIP'
'6e052f1cb693d5d3203f50f9d4e8c33b')
'6e052f1cb693d5d3203f50f9d4e8c33b'
'2bb2dfa660fbb4b349f844459f79d5a1'
'299316b1a35426eadf3301a3fad170be'
'41d212e3f8d838bff341102679b2af09'
'8a886e84f950caf2ad1c37cc3a456339'
'fc5af427803b139d9753230849053458'
'eb4e1836f4f3721f1215450a2cca3523'
'dc0d3ad59aeaaf591b085a77de6e03e9')
prepare() {
mkdir glibc-build
mkdir -p glibc-build
cd glibc
# avoid crashes on i686 memchr-sse2.S
# https://sourceware.org/bugzilla/show_bug.cgi?id=21182
_revert_commit="23d27709a423aec32821e9a5198a10267107bae2"
_revert_file="sysdeps/i386/i686/multiarch/memchr-sse2.S"
git show ${_revert_commit} -- ${_revert_file} | git apply -R
local i; for i in ${source[@]}; do
case ${i%::*} in
*.patch)
msg2 "Applying ${i}"
patch -p1 -i "$srcdir/${i}"
;;
esac
done
}
build() {
......@@ -40,8 +58,8 @@ build() {
echo "rootsbindir=/usr/sbin" >> configparms
#export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
export CC="gcc -m32"
export CXX="g++ -m32"
export CC="gcc -m32 -mstackrealign"
export CXX="g++ -m32 -mstackrealign"
# remove fortify for building libraries
CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
......@@ -51,16 +69,16 @@ build() {
--libdir=/usr/lib32 \
--libexecdir=/usr/lib32 \
--with-headers=/usr/include \
--with-bugurl=https://chakralinux.org/bugtracker \
--with-bugurl=https://code.chakralinux.org/ \
--enable-add-ons \
--enable-obsolete-rpc \
--enable-kernel=2.6.32 \
--enable-bind-now \
--disable-profile \
--enable-stackguard-randomization \
--enable-stack-protector=strong \
--enable-lock-elision \
--enable-multi-arch \
--enable-obsolete-nsl \
--enable-obsolete-rpc \
--enable-stack-protector=strong \
--enable-stackguard-randomization \
--disable-profile \
--disable-werror \
i686-pc-linux-gnu
......@@ -114,30 +132,13 @@ package() {
# libthread_db-1.0.so
cd $pkgdir
strip $STRIP_BINARIES \
\
\
usr/lib32/getconf/*
strip $STRIP_BINARIES usr/lib32/getconf/*
strip $STRIP_STATIC usr/lib32/lib{anl,BrokenLocale,c{,_nonshared},crypt}.a \
usr/lib32/lib{dl,g,ieee,mcheck,nsl,pthread{,_nonshared}}.a \
usr/lib32/lib{resolv,rpcsvc,rt,util}.a
usr/lib32/lib{dl,g,ieee,mcheck,nsl,pthread{,_nonshared}}.a \
usr/lib32/lib{resolv,rpcsvc,rt,util,m}.a
strip $STRIP_SHARED usr/lib32/lib{anl,BrokenLocale,cidn,crypt}-${pkgver}.so \
usr/lib32/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \
usr/lib32/lib{dl,m,nsl,resolv,rt,util}-${pkgver}.so \
usr/lib32/lib{memusage,pcprofile,SegFault}.so \
usr/lib32/{audit,gconv}/*.so || true
#if [[ $CARCH = "i686" ]]; then
strip $STRIP_STATIC usr/lib32/libm.a
#fi
usr/lib32/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \
usr/lib32/lib{dl,m,nsl,resolv,rt,util}-${pkgver}.so \
usr/lib32/lib{memusage,pcprofile,SegFault}.so \
usr/lib32/{audit,gconv}/*.so || true
}
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.