CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
glibc: added patches for CVE-2015-8776, CVE-2015-8777, CVE-2015-8778, CVE-2015-8779
[ports/core-arm.git] / glibc / Pkgfile
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
7 name=glibc
8 version=2.22
9 release=2
10 source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
11 http://ftp.kernel.org/pub/linux/kernel/v4.x/linux-4.1.13.tar.xz \
12 CVE-2015-8779.patch CVE-2015-8778.patch CVE-2015-8777.patch CVE-2015-8776.patch \
13 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
14
15 build() {
16 # install kernel headers
17 cd linux-4.1.13
18 make mrproper
19 make ARCH=arm headers_check
20 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
21
22 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8779.patch
23 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8778.patch
24 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8777.patch
25 patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8776.patch
26
27 mkdir $SRC/build
28 cd $SRC/build
29 ../$name-$version/configure --prefix=/usr \
30 --build=arm-unknown-linux-gnueabihf \
31 --libexecdir=/usr/lib \
32 --with-headers=$PKG/usr/include \
33 --enable-kernel=2.6.25 \
34 --enable-add-ons \
35 --enable-static-nss \
36 --disable-profile \
37 --disable-werror \
38 --without-gd \
39 --enable-obsolete-rpc
40
41 make
42 make install_root=$PKG install
43
44 install -m 0644 $SRC/$name-$version/nscd/nscd.conf $PKG/etc
45 install -d $PKG/var/{db,run}/nscd
46
47 install -m 0644 $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
48
49 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
50 ln -s stubs-hard.h $PKG/usr/include/gnu/stubs-soft.h
51 install -d $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
52 touch $PKG/etc/ld.so.cache
53
54 rm -rf $PKG/usr/share/{info,locale} \
55 $PKG/usr/bin/tzselect \
56 $PKG/usr/sbin/z{dump,ic}
57 }