mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
core/glibc to 2.15-12
This commit is contained in:
parent
39b8d9c89c
commit
560970b83b
9 changed files with 218 additions and 49157 deletions
|
@ -16,7 +16,7 @@ noautobuild=1
|
|||
|
||||
pkgname=glibc
|
||||
pkgver=2.15
|
||||
pkgrel=10
|
||||
pkgrel=12
|
||||
_glibcdate=20111227
|
||||
pkgdesc="GNU C Library"
|
||||
arch=('i686' 'x86_64')
|
||||
|
@ -36,7 +36,6 @@ source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.t
|
|||
glibc-2.15-do-not-install-timezone-files.patch
|
||||
glibc-2.15-do-not-install-timezone-files-2.patch
|
||||
glibc-__i686.patch
|
||||
glibc-2.12.2-ignore-origin-of-privileged-program.patch
|
||||
glibc-2.14-libdl-crash.patch
|
||||
glibc-2.14-reexport-rpc-interface.patch
|
||||
glibc-2.14-reinstall-nis-rpc-headers.patch
|
||||
|
@ -48,7 +47,7 @@ source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.t
|
|||
glibc-2.15-ifunc.patch
|
||||
glibc-2.15-avx.patch
|
||||
glibc-2.15-strcasecmp-disable-avx.patch
|
||||
glibc-2.15-gb18030.patch
|
||||
glibc-2.15-gb18030.patch.gz
|
||||
glibc-2.15-revert-netlink-cache.patch
|
||||
glibc-2.15-arena.patch
|
||||
glibc-2.15-negative-result-cache.patch
|
||||
|
@ -62,7 +61,10 @@ source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.t
|
|||
glibc-2.15-rintf-rounding.patch
|
||||
glibc-2.15-nearbyintf-rounding.patch
|
||||
glibc-2.15-confstr-local-buffer-extent.patch
|
||||
nscd
|
||||
glibc-2.15-testsuite.patch
|
||||
nscd.rcd
|
||||
nscd.service
|
||||
nscd.tmpfiles
|
||||
locale.gen.txt
|
||||
locale-gen)
|
||||
md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
|
||||
|
@ -71,7 +73,6 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
|
|||
'349227bcedb19cea008fbcb2c7e1a582'
|
||||
'880439de2c608177ed1d749722d26820'
|
||||
'40cd342e21f71f5e49e32622b25acc52'
|
||||
'e60e33591c9ec1447e4cddadcbb9cf3a'
|
||||
'6970bcfeb3bf88913436d5112d16f588'
|
||||
'c5de2a946215d647c8af5432ec4b0da0'
|
||||
'55febbb72139ac7b65757df085024b83'
|
||||
|
@ -83,7 +84,7 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
|
|||
'3d844b53b2dbb7c996e39c7ad932f55d'
|
||||
'41ae047ac88e8f6f547c70b0a0bc3b72'
|
||||
'fccb89f6628f59752278e125c35941f8'
|
||||
'c4cd34f20ccd37817f6c1374bd4ee68e'
|
||||
'001a4044ac3d59aca6ee144eaca57ab2'
|
||||
'94b61302a7ca6c5764d013dc7738fcfe'
|
||||
'a9ffadcfd2d357f91fee0b861fd4a7c6'
|
||||
'2c46b8e294de24c531f2253ff69aeef3'
|
||||
|
@ -97,7 +98,10 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
|
|||
'1419d61fd1dbc6cdc48bb59da86fa66f'
|
||||
'7ff501435078b1a2622124fbeaafc921'
|
||||
'4ed0bb09c3851cd9cb5e39c946a8a334'
|
||||
'b587ee3a70c9b3713099295609afde49'
|
||||
'6962c3fa29306bfbf6f0d22b19cb825d'
|
||||
'589d79041aa767a5179eaa4e2737dd3f'
|
||||
'ad8a9af15ab7eeaa23dc7ee85024af9f'
|
||||
'bccbe5619e75cf1d97312ec3681c605c'
|
||||
'07ac979b6ab5eeb778d55f041529d623'
|
||||
'476e9113489f93b348b21e144b6a8fcf')
|
||||
|
||||
|
@ -127,10 +131,6 @@ build() {
|
|||
# http://sourceware.org/glibc/wiki/Release/2.15#Build_Failures
|
||||
patch -p1 -i ${srcdir}/glibc-__i686.patch
|
||||
|
||||
# http://www.exploit-db.com/exploits/15274/
|
||||
# http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (fedora branch)
|
||||
patch -p1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
|
||||
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (fedora branch)
|
||||
# http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
|
||||
patch -p1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
|
||||
|
@ -181,7 +181,7 @@ build() {
|
|||
patch -p1 -i ${srcdir}/glibc-2.15-gb18030.patch
|
||||
|
||||
# fix crash in __nscd_get_mapping if nscd not running
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=13594 (potential "fix" in comment)
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=13594 (potential fix in comment)
|
||||
# reverts commit 3a2c0242 and other necessary following changes...
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-revert-netlink-cache.patch
|
||||
|
||||
|
@ -234,6 +234,10 @@ build() {
|
|||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=d6a403f9
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-confstr-local-buffer-extent.patch
|
||||
|
||||
# fix testsuite failures with --as-needed
|
||||
# http://sourceware.org/git/?p=glibc.git;a=commit;h=d4c2917f
|
||||
patch -p1 -i ${srcdir}/glibc-2.15-testsuite.patch
|
||||
|
||||
install -dm755 ${pkgdir}/etc
|
||||
touch ${pkgdir}/etc/ld.so.conf
|
||||
|
||||
|
@ -261,9 +265,7 @@ build() {
|
|||
--with-headers=/usr/include \
|
||||
--enable-add-ons=nptl,libidn,ports \
|
||||
--enable-kernel=2.6.27 \
|
||||
--with-tls --with-__thread \
|
||||
--enable-bind-now --without-gd \
|
||||
--without-cvs --disable-profile \
|
||||
--enable-bind-now --disable-profile \
|
||||
--disable-multi-arch $CONFIGFLAG
|
||||
|
||||
# build libraries with hardening disabled
|
||||
|
@ -271,7 +273,7 @@ build() {
|
|||
make $MAKEFLAG
|
||||
|
||||
# re-enable hardening for programs
|
||||
sed -i "s#=no#=yes#" configparms
|
||||
sed -i "/build-programs=/s#no#yes#" configparms
|
||||
echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
|
||||
echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
|
||||
make $MAKEFLAG
|
||||
|
@ -293,15 +295,17 @@ package() {
|
|||
|
||||
rm -f ${pkgdir}/etc/ld.so.{cache,conf}
|
||||
|
||||
install -dm755 ${pkgdir}/etc/rc.d
|
||||
install -dm755 ${pkgdir}/usr/sbin
|
||||
install -dm755 ${pkgdir}/usr/lib/locale
|
||||
install -dm755 ${pkgdir}/{etc/rc.d,usr/{sbin,lib/{,locale,systemd/system,tmpfiles.d}}}
|
||||
|
||||
install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}/etc/nscd.conf
|
||||
install -m755 ${srcdir}/nscd ${pkgdir}/etc/rc.d/nscd
|
||||
install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
|
||||
sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf
|
||||
install -m755 ${srcdir}/nscd.rcd ${pkgdir}/etc/rc.d/nscd
|
||||
install -m644 ${srcdir}/nscd.service ${pkgdir}/usr/lib/systemd/system
|
||||
install -m644 ${srcdir}/nscd.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/nscd.conf
|
||||
|
||||
install -m644 ${srcdir}/glibc/posix/gai.conf ${pkgdir}/etc/gai.conf
|
||||
|
||||
sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf
|
||||
install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin
|
||||
|
||||
# create /etc/locale.gen
|
||||
install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/elf/dl-object.c b/elf/dl-object.c
|
||||
index 22a1635..7674d49 100644
|
||||
--- a/elf/dl-object.c
|
||||
+++ b/elf/dl-object.c
|
||||
@@ -214,6 +214,9 @@ _dl_new_object (char *realname, const char *libname, int type,
|
||||
out:
|
||||
new->l_origin = origin;
|
||||
}
|
||||
+ else if (INTUSE(__libc_enable_secure) && type == lt_executable)
|
||||
+ /* The origin of a privileged program cannot be trusted. */
|
||||
+ new->l_origin = (char *) -1;
|
||||
|
||||
return new;
|
||||
}
|
File diff suppressed because it is too large
Load diff
BIN
core/glibc/glibc-2.15-gb18030.patch.gz
Normal file
BIN
core/glibc/glibc-2.15-gb18030.patch.gz
Normal file
Binary file not shown.
109
core/glibc/glibc-2.15-testsuite.patch
Normal file
109
core/glibc/glibc-2.15-testsuite.patch
Normal file
|
@ -0,0 +1,109 @@
|
|||
From d4c2917fc5091dae7ab1b30c165becb70d3c3453 Mon Sep 17 00:00:00 2001
|
||||
From: Allan McRae <allan@archlinux.org>
|
||||
Date: Mon, 16 Apr 2012 14:06:47 +1000
|
||||
Subject: [PATCH] Fix test-suite failues with -Wl,--as-needed
|
||||
|
||||
Signed-off-by: Allan McRae <allan@archlinux.org>
|
||||
---
|
||||
ChangeLog | 24 ++++++++++++++++++++++++
|
||||
elf/Makefile | 21 ++++++++++++++++++++-
|
||||
nptl/ChangeLog | 5 +++++
|
||||
nptl/Makefile | 3 ++-
|
||||
stdlib/Makefile | 1 +
|
||||
5 files changed, 52 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/elf/Makefile b/elf/Makefile
|
||||
index 57dcab0..47729c3 100644
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -500,6 +500,18 @@ $(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb
|
||||
$(objpfx)tst-initordera4.so: $(objpfx)tst-initordera3.so
|
||||
$(objpfx)tst-initorder: $(objpfx)tst-initordera4.so $(objpfx)tst-initordera1.so $(objpfx)tst-initorderb2.so
|
||||
|
||||
+LDFLAGS-nodel2mod3.so = $(no-as-needed)
|
||||
+LDFLAGS-reldepmod5.so = $(no-as-needed)
|
||||
+LDFLAGS-reldep6mod1.so = $(no-as-needed)
|
||||
+LDFLAGS-reldep6mod4.so = $(no-as-needed)
|
||||
+LDFLAGS-reldep8mod3.so = $(no-as-needed)
|
||||
+LDFLAGS-unload4mod1.so = $(no-as-needed)
|
||||
+LDFLAGS-unload4mod2.so = $(no-as-needed)
|
||||
+LDFLAGS-tst-initorder = $(no-as-needed)
|
||||
+LDFLAGS-tst-initordera2.so = $(no-as-needed)
|
||||
+LDFLAGS-tst-initordera3.so = $(no-as-needed)
|
||||
+LDFLAGS-tst-initordera4.so = $(no-as-needed)
|
||||
+LDFLAGS-tst-initorderb2.so = $(no-as-needed)
|
||||
LDFLAGS-tst-tlsmod5.so = -nostdlib
|
||||
LDFLAGS-tst-tlsmod6.so = -nostdlib
|
||||
|
||||
@@ -633,7 +645,7 @@ $(objpfx)vismain.out: $(addprefix $(objpfx),vismod3.so)
|
||||
vismain-ENV = LD_PRELOAD=$(addprefix $(objpfx),vismod3.so)
|
||||
|
||||
$(objpfx)noload: $(objpfx)testobj1.so $(common-objpfx)dlfcn/libdl.so
|
||||
-LDFLAGS-noload = -rdynamic
|
||||
+LDFLAGS-noload = -rdynamic $(no-as-needed)
|
||||
$(objpfx)noload.out: $(objpfx)testobj5.so
|
||||
|
||||
$(objpfx)noload-mem: $(objpfx)noload.out
|
||||
@@ -678,6 +690,7 @@ $(objpfx)reldep4: $(libdl)
|
||||
$(objpfx)reldep4.out: $(objpfx)reldep4mod1.so $(objpfx)reldep4mod2.so
|
||||
|
||||
$(objpfx)next: $(objpfx)nextmod1.so $(objpfx)nextmod2.so $(libdl)
|
||||
+LDFLAGS-next = $(no-as-needed)
|
||||
|
||||
$(objpfx)unload2: $(libdl)
|
||||
$(objpfx)unload2.out: $(objpfx)unload2mod.so $(objpfx)unload2dep.so
|
||||
@@ -1025,6 +1038,8 @@ $(objpfx)order2mod1.so: $(objpfx)order2mod4.so
|
||||
$(objpfx)order2mod4.so: $(objpfx)order2mod3.so
|
||||
$(objpfx)order2mod2.so: $(objpfx)order2mod3.so
|
||||
order2mod2.so-no-z-defs = yes
|
||||
+LDFLAGS-order2mod1.so = $(no-as-needed)
|
||||
+LDFLAGS-order2mod2.so = $(no-as-needed)
|
||||
|
||||
tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
|
||||
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
|
||||
@@ -1113,6 +1128,10 @@ $(objpfx)tst-initorder2: $(objpfx)tst-initorder2a.so $(objpfx)tst-initorder2d.so
|
||||
$(objpfx)tst-initorder2a.so: $(objpfx)tst-initorder2b.so
|
||||
$(objpfx)tst-initorder2b.so: $(objpfx)tst-initorder2c.so
|
||||
$(objpfx)tst-initorder2c.so: $(objpfx)tst-initorder2d.so
|
||||
+LDFLAGS-tst-initorder2 = $(no-as-needed)
|
||||
+LDFLAGS-tst-initorder2a.so = $(no-as-needed)
|
||||
+LDFLAGS-tst-initorder2b.so = $(no-as-needed)
|
||||
+LDFLAGS-tst-initorder2c.so = $(no-as-needed)
|
||||
define o-iterator-doit
|
||||
$(objpfx)tst-initorder2$o.os: tst-initorder2.c; \
|
||||
$$(compile-command.c) -DNAME=\"$o\"
|
||||
diff --git a/nptl/Makefile b/nptl/Makefile
|
||||
index 09acd8a..07a1022 100644
|
||||
--- a/nptl/Makefile
|
||||
+++ b/nptl/Makefile
|
||||
@@ -458,6 +458,7 @@ $(objpfx)tst-tls4: $(libdl) $(shared-thread-library)
|
||||
$(objpfx)tst-tls4.out: $(objpfx)tst-tls4moda.so $(objpfx)tst-tls4modb.so
|
||||
|
||||
$(objpfx)tst-tls5: $(objpfx)tst-tls5mod.so $(shared-thread-library)
|
||||
+LDFLAGS-tst-tls5 = $(no-as-needed)
|
||||
LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
|
||||
|
||||
ifeq ($(build-shared),yes)
|
||||
@@ -503,7 +504,7 @@ $(objpfx)tst-clock2: $(common-objpfx)rt/librt.a
|
||||
$(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.a
|
||||
endif
|
||||
|
||||
-LDFLAGS-tst-cancel24 = -lstdc++
|
||||
+LDFLAGS-tst-cancel24 = $(no-as-needed) -lstdc++
|
||||
|
||||
extra-B-pthread.so = -B$(common-objpfx)nptl/
|
||||
$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
|
||||
diff --git a/stdlib/Makefile b/stdlib/Makefile
|
||||
index 44eb20d..f7811c5 100644
|
||||
--- a/stdlib/Makefile
|
||||
+++ b/stdlib/Makefile
|
||||
@@ -138,6 +138,7 @@ $(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg
|
||||
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
|
||||
|
||||
$(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so
|
||||
+LDFLAGS-tst-putenv = $(no-as-needed)
|
||||
|
||||
$(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os
|
||||
$(build-module)
|
||||
--
|
||||
1.7.3.4
|
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
PID=`pidof -o %PPID /usr/sbin/nscd`
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting nscd"
|
||||
# create necessary directories if they don't already exist
|
||||
mkdir -p /var/run/nscd /var/db/nscd 2>/dev/null
|
||||
# remove stale files
|
||||
rm -f /var/db/nscd/* /var/run/nscd/* 2>/dev/null
|
||||
[ -z "$PID" ] && /usr/sbin/nscd
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon nscd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping nscd"
|
||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon nscd
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
||||
exit 0
|
65
core/glibc/nscd.rcd
Normal file
65
core/glibc/nscd.rcd
Normal file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
daemon_name="nscd"
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
|
||||
get_pid() {
|
||||
pidof -o %PPID $daemon_name
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
stat_busy "Starting $daemon_name daemon"
|
||||
PID=$(get_pid)
|
||||
if [[ -z $PID ]]; then
|
||||
rm -f /run/$daemon_name.pid
|
||||
mkdir -p /run/nscd /var/db/nscd
|
||||
rm -f /run/nscd/* /var/db/nscd/*
|
||||
$daemon_name
|
||||
if (( $? > 0 )); then
|
||||
stat_fail
|
||||
exit 1
|
||||
else
|
||||
echo $(get_pid) > /var/run/$daemon_name.pid
|
||||
add_daemon $daemon_name
|
||||
stat_done
|
||||
fi
|
||||
else
|
||||
stat_fail
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
stop)
|
||||
stat_busy "Stopping $daemon_name daemon"
|
||||
PID=$(get_pid)
|
||||
[[ -n $PID ]] && nscd --shutdown &> /dev/null
|
||||
if (( $? > 0 )); then
|
||||
stat_fail
|
||||
exit 1
|
||||
else
|
||||
rm -f /run/$daemon_name.pid &> /dev/null
|
||||
rm_daemon $daemon_name
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
stat_busy "Checking $daemon_name status";
|
||||
ck_status $daemon_name
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart|status}"
|
||||
esac
|
||||
|
||||
exit 0
|
17
core/glibc/nscd.service
Normal file
17
core/glibc/nscd.service
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=Name Service Cache Daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/nscd
|
||||
ExecStop=/usr/sbin/nscd --shutdown
|
||||
ExecReload=/usr/sbin/nscd -i passwd
|
||||
ExecReload=/usr/sbin/nscd -i group
|
||||
ExecReload=/usr/sbin/nscd -i hosts
|
||||
ExecReload=/usr/sbin/nscd -i service
|
||||
Restart=always
|
||||
PIDFile=/run/nscd/nscd.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
core/glibc/nscd.tmpfiles
Normal file
1
core/glibc/nscd.tmpfiles
Normal file
|
@ -0,0 +1 @@
|
|||
d /run/nscd 0755 root root
|
Loading…
Reference in a new issue