diff options
author | Ned Ludd <solar@gentoo.org> | 2004-12-15 02:28:27 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2004-12-15 02:28:27 +0000 |
commit | e1b645a03b4a2d3c82f264fec765eb715954e71e (patch) | |
tree | 6205760a65fc93221fc92a152d385532882a3df7 /dev-libs | |
parent | unleash Xfce 4.2 RC 2 (diff) | |
download | historical-e1b645a03b4a2d3c82f264fec765eb715954e71e.tar.gz historical-e1b645a03b4a2d3c82f264fec765eb715954e71e.tar.bz2 historical-e1b645a03b4a2d3c82f264fec765eb715954e71e.zip |
- Improved hardened handling bug 73699. Initial support for xattr.
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/uclibc/ChangeLog | 5 | ||||
-rw-r--r-- | dev-libs/uclibc/Manifest | 14 | ||||
-rw-r--r-- | dev-libs/uclibc/files/digest-uclibc-0.9.26-r8 | 4 | ||||
-rw-r--r-- | dev-libs/uclibc/uclibc-0.9.26-r8.ebuild | 151 |
4 files changed, 86 insertions, 88 deletions
diff --git a/dev-libs/uclibc/ChangeLog b/dev-libs/uclibc/ChangeLog index b1a7975653b2..0473d8e286f1 100644 --- a/dev-libs/uclibc/ChangeLog +++ b/dev-libs/uclibc/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for dev-libs/uclibc # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.42 2004/11/11 01:06:15 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.43 2004/12/15 02:28:27 solar Exp $ + + 14 Dec 2004; <solar@gentoo.org> uclibc-0.9.26-r8.ebuild: + - Improved hardened handling bug 73699. Initial support for xattr. 10 Nov 2004; <solar@gentoo.org> uclibc-0.9.26-r8.ebuild: uclibc updates diff --git a/dev-libs/uclibc/Manifest b/dev-libs/uclibc/Manifest index 85c96d142be0..e0169588f16d 100644 --- a/dev-libs/uclibc/Manifest +++ b/dev-libs/uclibc/Manifest @@ -2,9 +2,9 @@ Hash: SHA1 MD5 d98118dbcb77466679b07fd6eb029f9f uclibc-9999.ebuild 5443 -MD5 dec526b45cd6a3adb8a7e59c26f0972e uclibc-0.9.26-r8.ebuild 9084 +MD5 8f504f01c1cb586217db109896a60ca0 uclibc-0.9.26-r8.ebuild 9084 MD5 7ba6e2f7dbe4f241de617f5ebfa35fa0 uclibc-0.9.26-r5.ebuild 7658 -MD5 299cda881c945bffd33fda5406d65b35 ChangeLog 7882 +MD5 ddeed663eb1a390fa3aa5dd91076ba6b ChangeLog 8011 MD5 7fde305dfd21aeac12e0eb721e0f6a17 uclibc-0.9.21.ebuild 1096 MD5 e96b4dfc373a1cdf7735aeae52c4cf7e metadata.xml 999 MD5 59d40f2d78a6bbdb5e3fc3f0efe960ef uclibc-0.9.26-r7.ebuild 7861 @@ -12,7 +12,7 @@ MD5 d16f404e56abc9f0ab5c372b88a6905d files/Makefile-cp-order-fix.patch 897 MD5 0b733285f186f31c1be9ffcc42f1064e files/getent 973 MD5 6d2b5c523d34c86df9bc37747d9261dc files/digest-uclibc-0.9.26-r5 231 MD5 6d2b5c523d34c86df9bc37747d9261dc files/digest-uclibc-0.9.26-r7 231 -MD5 8ffd115eb23763c99de8a8230f7a7495 files/digest-uclibc-0.9.26-r8 232 +MD5 e0556dd58957468793213ab327c590d3 files/digest-uclibc-0.9.26-r8 232 MD5 799adc7fb6ec9ffd653831cea1d32dd5 files/digest-uclibc-0.9.21 67 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-uclibc-9999 0 MD5 df59fcf3a02c17b7dac6999bd9262d05 files/cvs/22_all_uClibc-ld-now.patch 1072 @@ -37,7 +37,9 @@ MD5 b9df87c681aa3a1ef3033cb195e516df files/0.9.26/uclibc-0.9.26-arm-dl-sysdep.pa -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) -iD8DBQFBkrsH94CCfB4KcwwRAu9NAKDBEWv9IcwpdmgCwFcb3CR0dobolgCgjeSr -Qop8eMv6bAlTrp0HnUig0LM= -=6VyF +iQCVAwUBQb+hIJ4WFLgrx1GWAQKMGAP+PIfl72Xd9BPFqzT6PE3065pOQC/EA3rC +WLaFbw3dq33shDUnTSEmoXQ6bzaKCDyOGZNIIxbrhAk68/L7bm5MA1blbGETHcsF +MJpQiTd9bQb7peP8Z/0nqry3ASfOoYfigQRZh5Tg8/07gQRN1+DrFTY7zJ2pwnW+ +ckijJTDUvx0= +=3lIc -----END PGP SIGNATURE----- diff --git a/dev-libs/uclibc/files/digest-uclibc-0.9.26-r8 b/dev-libs/uclibc/files/digest-uclibc-0.9.26-r8 index 3f897c835596..d630ae20babd 100644 --- a/dev-libs/uclibc/files/digest-uclibc-0.9.26-r8 +++ b/dev-libs/uclibc/files/digest-uclibc-0.9.26-r8 @@ -1,3 +1,3 @@ MD5 7212713c432dd0de6ec2140c2a6212e4 uClibc-0.9.26.tar.bz2 1604543 -MD5 78ed315ff2a414d193366de869fb1490 uClibc-0.9.26-cvs-update-20041110.patch.bz2 399149 -MD5 4c60104636709c2e631aec586842767e uClibc-0.9.26-patches-1.2.tar.bz2 51434 +MD5 27f9c3067674f1f479a4ea6491c7e63b uClibc-0.9.26-cvs-update-20041209.patch.bz2 403987 +MD5 87c26182b2254e65682408444adb9e90 uClibc-0.9.26-patches-1.4.tar.bz2 35502 diff --git a/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild b/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild index 2891007f73b2..dbc8593902e7 100644 --- a/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild +++ b/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild,v 1.2 2004/11/11 01:06:15 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r8.ebuild,v 1.3 2004/12/15 02:28:27 solar Exp $ inherit eutils flag-o-matic gcc @@ -11,8 +11,9 @@ inherit eutils flag-o-matic gcc # rm -rf uClibc-0.9.26-cvs-update-`date +%Y%m%d`.patch.bz2 uClibc uClibc-0.9.26 MY_P="${P/ucl/uCl}" -CVS_VER="20041110" -PATCH_VER="1.2" +# only CVS_VER >= 20041117 is supported +CVS_VER="20041209" +PATCH_VER="1.4" DESCRIPTION="C library for developing embedded Linux systems" HOMEPAGE="http://www.uclibc.org/" SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2 @@ -23,9 +24,10 @@ LICENSE="LGPL-2" SLOT="0" KEYWORDS="-*" #KEYWORDS="~x86 ~ppc ~sparc ~mips ~arm" -IUSE="build hardened ipv6 static debug" # nls is not supported yet +IUSE="build debug hardened ipv6 static xattr" # nls is not supported yet RESTRICT="nostrip" +# 2004/11/16 the only binutils w/ relro support for uclibc DEPEND="sys-devel/gcc" RDEPEND="" PROVIDE="virtual/glibc virtual/libc" @@ -74,18 +76,6 @@ check_cpu_opts() { fi } -check_main_libc() { - if [ "${CHOST/uclibc}" != "${CHOST}" ] ; then - SYS_LIBC=uClibc - else - SYS_LIBC=glibc - fi - export SYS_LIBC - echo - einfo "We are building for ${SYS_LIBC} system library" - echo -} - src_unpack() { unpack ${A} cd ${S} @@ -96,32 +86,13 @@ src_unpack() { [ -n "${CVS_VER}" ] && \ epatch ${DISTDIR}/${MY_P}-cvs-update-${CVS_VER}.patch.bz2 - cp ${FILESDIR}/0.9.26/ssp.c ${S}/libc/sysdeps/linux/common/ \ - || die "failed to copy ssp.c to ${S}/libc/sysdeps/linux/common/" - # gcc 3.4 nukes ssp without this patch - [ "`gcc-major-version`" -eq "3" -a "`gcc-minor-version`" -ge "4" ] && \ - epatch ${FILESDIR}/0.9.26/uclibc-0.9.26-ssp-gcc34-after-frandom.patch - if [ -n "${PATCH_VER}" ] ; then unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 - mv ${WORKDIR}/patch/*frandom* ${WORKDIR}/patch/exclude/ - # zdefs/main patches, not yet properly tested - mv ${WORKDIR}/patch/*{zdefs,main}* ${WORKDIR}/patch/exclude/ - # needed for gcc-3.4 after frandom - mv ${WORKDIR}/patch/*attribute* ${WORKDIR}/patch/exclude/ epatch ${WORKDIR}/patch - # for math functions (j2sdk/xorg-x11) - #epatch ${WORKDIR}/patch/math + # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) + use build || epatch ${WORKDIR}/patch/math fi - # support archs which dont implement all syscalls - [ -z "${CVS_VER}" ] \ - && epatch ${FILESDIR}/${PV}/arm-fix-missing-syscalls.patch \ - || epatch ${FILESDIR}/${PV}/uclibc-0.9.26-arm-dl-sysdep.patch - - # fixup for install perms - sed -i -e "s:-fa:-dRf:g" Makefile - ########## CPU SELECTION ########## local target config_target @@ -159,8 +130,7 @@ src_unpack() { echo "UCLIBC_HAS_FULL_RPC=y" >> .config echo "PTHREADS_DEBUG_SUPPORT=y" >> .config - #if use nls - #then + #if use nls ; then # sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config # echo "UCLIBC_HAS_XLOCALE=n" >> .config # echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config @@ -175,34 +145,47 @@ src_unpack() { use ipv6 && sed -i -e "s:# UCLIBC_HAS_IPV6 is not set:UCLIBC_HAS_IPV6=y:" .config + # uncomment if you miss wordexp (alsa-lib) + #use build || sed -i -e "s:# UCLIBC_HAS_WORDEXP is not set:UCLIBC_HAS_WORDEXP=y:" .config + + # we need to do it independently of hardened to get ssp.c built into libc + sed -i -e "s:# UCLIBC_SECURITY.*:UCLIBC_SECURITY=y:" .config + einfo "Enable Stack Smashing Protections support in ${P}" + echo "UCLIBC_HAS_SSP=y:" >> .config + echo "PROPOLICE_BLOCK_ABRT=n" >> .config + if use debug ; then + echo "PROPOLICE_BLOCK_SEGV=y" >> .config + echo "PROPOLICE_BLOCK_KILL=n" >> .config + else + echo "PROPOLICE_BLOCK_SEGV=n" >> .config + echo "PROPOLICE_BLOCK_KILL=y" >> .config + fi + if use hardened ; then - sed -i -e "s:# UCLIBC_SECURITY.*:UCLIBC_SECURITY=y:" .config - if has ${ARCH} x86 ppc mips; then - einfo "Enable Position Independent Executable support in ${P}" + if has ${ARCH} mips ppc x86 ; then echo "UCLIBC_BUILD_PIE=y" >> .config - fi - - einfo "Enable Stack Smashing Protections support in ${P}" - echo "UCLIBC_HAS_SSP=y:" >> .config - echo "PROPOLICE_BLOCK_ABRT=n" >> .config - if use debug ; then - echo "PROPOLICE_BLOCK_SEGV=y" >> .config - echo "PROPOLICE_BLOCK_KILL=n" >> .config else - echo "PROPOLICE_BLOCK_SEGV=n" >> .config - echo "PROPOLICE_BLOCK_KILL=y" >> .config + echo "UCLIBC_BUILD_PIE=n" >> .config fi + echo "UCLIBC_BUILD_SSP=y" >> .config echo "UCLIBC_BUILD_RELRO=y" >> .config echo "UCLIBC_BUILD_NOW=y" >> .config echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config + else + echo "UCLIBC_BUILD_PIE=n" >> .config + echo "UCLIBC_BUILD_SSP=n" >> .config + echo "UCLIBC_BUILD_RELRO=n" >> .config + echo "UCLIBC_BUILD_NOW=n" >> .config + echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config fi + use xattr && echo "UCLIBC_XATTR=y" >> .config + # we are building against system installed kernel headers sed -i -e 's:KERNEL_SOURCE.*:KERNEL_SOURCE="/usr":' .config - check_main_libc - if [ "${SYS_LIBC}" = "uClibc" ] ; then + if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then sed -i \ -e 's:SHARED_LIB_LOADER_PREFIX=.*:SHARED_LIB_LOADER_PREFIX="/lib":' \ -e 's:DEVEL_PREFIX=.*:DEVEL_PREFIX="/usr":' \ @@ -224,8 +207,7 @@ src_compile() { use build || addwrite /dev/ptmx cp myconfig .config - #if use nls - #then + #if use nls ; then # # these can be built only if the build system supports locales (as of 0.9.26) # emake -j1 headers # cd extra/locale @@ -237,15 +219,13 @@ src_compile() { #fi emake -j1 || die "could not make" - check_main_libc - if [ "${SYS_LIBC}" = "uClibc" ] - then + if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then emake -j1 utils || die "could not make utils" fi if ! use build ; then if ! hasq maketest $RESTRICT ; then - # assert test fails on pax enabled kernels - normal + # assert test fails on pax/grsec enabled kernels - normal # vfork test fails in sandbox (both glibc/uclibc) cd test; make; cd .. fi @@ -257,9 +237,7 @@ src_install() { # remove files coming from kernel-headers # scsi is uclibc's own directory since cvs 20040212 - check_main_libc - if [ "${SYS_LIBC}" = "uClibc" ] - then + if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then rm -rf ${D}/usr/include/{asm,linux} rm -f ${D}/usr/lib/lib*_pic.a ! use static && use build && rm -f ${D}/usr/lib/lib*.a @@ -267,27 +245,42 @@ src_install() { emake PREFIX=${D} install_utils || die "install-utils failed" dodir /usr/bin exeinto /usr/bin - doexe docs/getent + doexe extra/scripts/getent fi - if ! use build - then + if ! use build ; then dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 doman debian/*.1 fi } -#pkg_postinst() { -#check_main_libc -#if [ "${SYS_LIBC}" = "uClibc" ] ; then -# if [ "${ROOT}" = "/" ] ; then -# # should we create ld.so.conf and/or preload? -# # currently the option is not enabled -# /sbin/ldconfig -# [ ! -e /etc/TZ ] && echo UTC > /etc/TZ -# # reload init? -# fi +pkg_postinst() { +if [ "${PORTAGE_LIBC}" = "uClibc" ] ; then + # remove invalid symlinks if any + #local x= + #for x in TZ ld.so.conf ld.so.preload ; do + # [ ! -e "${ROOT}/etc/${x}" ] && rm -f ${ROOT}/etc/${x} + #done + + if [ ! -e "${ROOT}/etc/TZ" ] ; then + echo "Please remember to set your timezone in /etc/TZ." + echo "UTC" > ${ROOT}/etc/TZ + fi + + if [ ! -e "${ROOT}/etc/ld.so.conf" ] ; then + [ -d "${ROOT}/usr/X11R6/lib" ] \ + && echo "/usr/X11R6/lib" > ${ROOT}/etc/ld.so.conf \ + || > ${ROOT}/etc/ld.so.conf + fi + + if [ "${ROOT}" = "/" ] ; then + # update cache before reloading init + /sbin/ldconfig + # reload init ... + [ -x /sbin/init ] && /sbin/init U &> /dev/null + # add entries for alternatives (like minit) + fi #else -#should we add the lib dir to ld.so.conf? -#fi -#} +#should we add the libdir on a non-uclibc based system to ld.so.conf? +fi +} |