CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
glibc: updated to 2.19-5 Added CVE patches
[ports/core-arm.git] / glibc / Pkgfile
CommitLineData
34fed911
VM
1# Description: The C library used in the GNU system
2# URL: http://www.gnu.org/software/libc/
3# Maintainer: CRUX System Team, core-ports at crux dot nu
4# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5# Depends on:
6
7name=glibc
d6e43ba0 8version=2.19
3d9e9aa9 9release=5
34fed911 10source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
d6e43ba0 11 ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-3.12.tar.xz \
3d9e9aa9
VM
12 CVE-2014-0475.patch iconv-gconv_trans.c.patch \
13 CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \
14 CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \
15 CVE-2014-9402-Avoid-infinite-loop-in-nss_dns-getnetbyname.patch \
16 CVE-2015-1472-wscanf-allocates-too-little-memory.patch \
d6e43ba0 17 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
34fed911
VM
18
19build() {
736f12d7 20 # install kernel headers
d6e43ba0 21 cd linux-3.12
34fed911
VM
22 make mrproper
23 make ARCH=arm headers_check
24 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
25
3d9e9aa9
VM
26 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2014-0475.patch
27 patch -p1 -d $SRC/$name-$version -i $SRC/iconv-gconv_trans.c.patch
28 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch
29 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch
30 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2014-9402-Avoid-infinite-loop-in-nss_dns-getnetbyname.patch
31 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-1472-wscanf-allocates-too-little-memory.patch
34fed911 32
736f12d7
VM
33 mkdir $SRC/build
34 cd $SRC/build
34fed911 35 ../$name-$version/configure --prefix=/usr \
68160bd8 36 --build=arm-unknown-linux-gnueabihf \
34fed911
VM
37 --libexecdir=/usr/lib \
38 --with-headers=$PKG/usr/include \
39 --with-tls \
736f12d7 40 --enable-kernel=2.6.25 \
34fed911
VM
41 --enable-add-ons \
42 --disable-profile \
43 --without-gd \
736f12d7 44 --enable-obsolete-rpc
34fed911 45
736f12d7 46 make
34fed911
VM
47 make install_root=$PKG install
48
49 cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
50 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
51 mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
736f12d7 52 touch $PKG/etc/ld.so.cache
34fed911 53
736f12d7
VM
54 rm -rf $PKG/usr/share/{info,locale} \
55 $PKG/usr/bin/tzselect \
56 $PKG/usr/sbin/z{dump,ic}
34fed911 57}