diff options
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/prelink/ChangeLog | 11 | ||||
-rw-r--r-- | sys-devel/prelink/Manifest | 31 | ||||
-rw-r--r-- | sys-devel/prelink/files/digest-prelink-20060213 | 3 | ||||
-rw-r--r-- | sys-devel/prelink/files/prelink-20060213-symloop.patch | 13 | ||||
-rw-r--r-- | sys-devel/prelink/files/prelink.confd | 37 | ||||
-rw-r--r-- | sys-devel/prelink/files/prelink.cron | 51 | ||||
-rw-r--r-- | sys-devel/prelink/prelink-20060213.ebuild | 85 |
7 files changed, 214 insertions, 17 deletions
diff --git a/sys-devel/prelink/ChangeLog b/sys-devel/prelink/ChangeLog index b557caa5a31a..67b720bbc938 100644 --- a/sys-devel/prelink/ChangeLog +++ b/sys-devel/prelink/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/prelink -# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/prelink/ChangeLog,v 1.43 2005/12/02 16:28:26 azarah Exp $ +# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/prelink/ChangeLog,v 1.44 2006/04/11 21:33:09 cretin Exp $ + +*prelink-20060213 (11 Apr 2006) + + 11 Apr 2006; Stefan Jones <cretin@gentoo.org> + +files/prelink-20060213-symloop.patch, +files/prelink.confd, + +files/prelink.cron, +prelink-20060213.ebuild: + New version from FC5 plus cronjob *prelink-20050901 (02 Dec 2005) diff --git a/sys-devel/prelink/Manifest b/sys-devel/prelink/Manifest index b567dd4c90f2..bb367a354acd 100644 --- a/sys-devel/prelink/Manifest +++ b/sys-devel/prelink/Manifest @@ -1,20 +1,21 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 c57a36850e67e6c1c4ca45910a300331 ChangeLog 4702 MD5 e044ee8e67c7ef50523a1ccd4dd08e90 files/digest-prelink-20050314 69 +RMD160 e1b283558fa8c2b39d685190d3e2c35b1ad0622f files/digest-prelink-20050314 69 +SHA256 b0dd763a3474d79bba9130249a1c9c5223dbb90dd6dd4ae100e8f899d874562a files/digest-prelink-20050314 69 MD5 f624545fb4e6fe08e8fb45d9ace1d32f files/digest-prelink-20050610 69 +RMD160 68353d1b5cf6f030a18bcd61397d33aed20fad4b files/digest-prelink-20050610 69 +SHA256 9b1239845088183e8d109ea8e849dad03842b6256e1c894c2e81b11f52be9f30 files/digest-prelink-20050610 69 MD5 232d94e414c902b4c70d7b5e9110946b files/digest-prelink-20050901 69 +RMD160 ef0f5513b713d8bbbbcab6d1275811773a977b89 files/digest-prelink-20050901 69 +SHA256 b382678c0503d4f33562b1494c1684aa1efa5b3d665a74629c077cdf67703198 files/digest-prelink-20050901 69 +MD5 1ddedb8aef5466f4c95551d4339cae25 files/digest-prelink-20060213 253 +RMD160 fc3dd84b0c630678c9ff4ed0e54cc76549ef2ce9 files/digest-prelink-20060213 253 +SHA256 5a088be112fce2bb2d0afe8915be8d31b9d89289c0576135fa80f085aeed37ef files/digest-prelink-20060213 253 MD5 23dd82792b9637171b3f2fffc51eeea9 files/prelink-20040707-init.patch 1471 +RMD160 8dfdcffde6d66d874e960b60310ef495df0e97f1 files/prelink-20040707-init.patch 1471 +SHA256 ee745a928fe46d832a0a8af010de43592a5a673cccc870d4d3f2e5d2ad458ad4 files/prelink-20040707-init.patch 1471 MD5 e7b084a6fd6b4ef980a0d67d79ee8733 files/prelink-20050314-amd64-gcc4.patch 6816 -MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 -MD5 47b7b741ab3aa2749cfdad8aeb69c358 prelink-20050314.ebuild 1849 -MD5 369b8c64b5baf0307cea6695e6fde1fd prelink-20050610.ebuild 1811 -MD5 e8918dea7f44660d9d1f9792cf511da9 prelink-20050901.ebuild 1807 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDkHdi1ZcsMnZjRyIRAkglAKC0P0EPbDLCzlqkLWxdq77FLjnQoQCfZDQo -PNh5XzAvo8x7/BK6ewyeXYg= -=kjBg ------END PGP SIGNATURE----- +RMD160 8928e1ff383c6cb545c10e8cbc1d5c5a2fdf8795 files/prelink-20050314-amd64-gcc4.patch 6816 +SHA256 5d86fb771990d7f0d3eb87a4649195536f4b8bfae10f0b39ab82c8d2e6a42bc4 files/prelink-20050314-amd64-gcc4.patch 6816 +MD5 e8918dea7f44660d9d1f9792cf511da9 prelink-20060213.ebuild 1807 +RMD160 2168147b0e9cb1421da846f2cb9fb312678cf8cf prelink-20060213.ebuild 1807 +SHA256 4f3c0acea5a5ddecf891dda9db1bd82ba61758ec1c9a20cf5eccf7ec90c46d99 prelink-20060213.ebuild 1807 diff --git a/sys-devel/prelink/files/digest-prelink-20060213 b/sys-devel/prelink/files/digest-prelink-20060213 new file mode 100644 index 000000000000..4575a3bb7fc9 --- /dev/null +++ b/sys-devel/prelink/files/digest-prelink-20060213 @@ -0,0 +1,3 @@ +MD5 a3ee7d324ecdf2f1a7b8b95c01ee75fa prelink-20060213.tar.bz2 905983 +RMD160 7b33340b3bdfc9d03ce9e72f548dbe926fff47b4 prelink-20060213.tar.bz2 905983 +SHA256 6ec4473d238fa20341adf4bc9d2402a429f9f06f896e94048ccfbede8fe835a8 prelink-20060213.tar.bz2 905983 diff --git a/sys-devel/prelink/files/prelink-20060213-symloop.patch b/sys-devel/prelink/files/prelink-20060213-symloop.patch new file mode 100644 index 000000000000..0345cebbc6fa --- /dev/null +++ b/sys-devel/prelink/files/prelink-20060213-symloop.patch @@ -0,0 +1,13 @@ +--- prelink/src/gather.c.jj 2005-06-10 06:21:09.000000000 -0700 ++++ prelink/src/gather.c 2006-04-10 19:42:15.000000000 -0700 +@@ -1003,6 +1003,10 @@ + return 0; + ++implicit; + ret = nftw64 (name, gather_func, 20, flags | FTW_ACTIONRETVAL); ++ if(ret) ++ { ++ error (0, errno, "Can't walk directory tree %s", name); ++ } + --implicit; + #ifndef HAVE_FTW_ACTIONRETVAL + free (blacklist_dir); diff --git a/sys-devel/prelink/files/prelink.confd b/sys-devel/prelink/files/prelink.confd new file mode 100644 index 000000000000..cfe65aa83417 --- /dev/null +++ b/sys-devel/prelink/files/prelink.confd @@ -0,0 +1,37 @@ +# Set this to no to disable prelinking altogether +# (if you change this from yes to no prelink -ua +# will be run next night to undo prelinking) +PRELINKING=no + +# Options to pass to prelink +# -m Try to conserve virtual memory by allowing overlapping +# assigned virtual memory slots for libraries which +# never appear together in one binary +# -R Randomize virtual memory slot assignments for libraries. +# This makes it slightly harder for various buffer overflow +# attacks, since library addresses will be different on each +# host using -R. +PRELINK_OPTS=-mR + +# How often should full prelink be run (in days) +# Normally, prelink will be run in quick mode, every +# $PRELINK_FULL_TIME_INTERVAL days it will be run +# in normal mode. Comment it out if it should be run +# in normal mode always. +PRELINK_FULL_TIME_INTERVAL=14 + +# How often should prelink run (in days) even if +# no packages have been upgraded via portage. +# If $PRELINK_FULL_TIME_INTERVAL days have not elapsed +# yet since last normal mode prelinking, last +# quick mode prelinking happened less than +# $PRELINK_NOEMER_CHECK_INTERVAL days ago +# and no packages have been upgraded by portage +# since last quick mode prelinking, prelink +# will not do anything. +# Change to +# PRELINK_NOEMER_CHECK_INTERVAL=0 +# if you want to disable the portage database timestamp +# check (especially if you don't use portage +# exclusively to upgrade system libraries and/or binaries). +PRELINK_NOEMER_CHECK_INTERVAL=7 diff --git a/sys-devel/prelink/files/prelink.cron b/sys-devel/prelink/files/prelink.cron new file mode 100644 index 000000000000..9ad52dff9bb7 --- /dev/null +++ b/sys-devel/prelink/files/prelink.cron @@ -0,0 +1,51 @@ +#!/bin/sh + +. /etc/conf.d/prelink + +renice +19 -p $$ >/dev/null 2>&1 + +if [ "$PRELINKING" != yes ]; then + if [ -f /etc/prelink.cache ]; then + echo /usr/sbin/prelink -uav > /var/log/prelink.log + /usr/sbin/prelink -uav >> /var/log/prelink.log 2>&1 \ + || echo Prelink failed with return value $? >> /var/log/prelink.log + rm -f /etc/prelink.cache + # Restart init if needed + [ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u + fi + exit 0 +fi + +if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \ + || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then + # If cache does not exist or is from older prelink versions or + # if we were asked to explicitely, force full prelinking + rm -f /etc/prelink.cache /var/lib/misc/prelink.force + PRELINK_OPTS="$PRELINK_OPTS -f" + date > /var/lib/misc/prelink.full + cp -a /var/lib/misc/prelink.{full,quick} +elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \ + -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \ + = /var/lib/misc/prelink.full ]; then + # If no more than PRELINK_NOEMER_CHECK_INTERVAL days elapsed from last prelink + # (be it full or quick) and no packages have been upgraded via rpm since then, + # don't do anything. + [ "`find /var/lib/misc/prelink.quick -mtime -${PRELINK_NOEMER_CHECK_INTERVAL:-7} 2>/dev/null`" \ + -a -f /var/cache/edb/counter \ + -a /var/cache/edb/counter -ot /var/lib/misc/prelink.quick ] && exit 0 + date > /var/lib/misc/prelink.quick + # If prelink without -q has been run in the last + # PRELINK_FULL_TIME_INTERVAL days, just use quick mode + PRELINK_OPTS="$PRELINK_OPTS -q" +else + date > /var/lib/misc/prelink.full + cp -a /var/lib/misc/prelink.{full,quick} +fi + +echo /usr/sbin/prelink -av $PRELINK_OPTS > /var/log/prelink.log +/usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink.log 2>&1 \ + || echo Prelink failed with return value $? >> /var/log/prelink.log +# Restart init if needed +[ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u + +exit 0 diff --git a/sys-devel/prelink/prelink-20060213.ebuild b/sys-devel/prelink/prelink-20060213.ebuild new file mode 100644 index 000000000000..e416eb079f74 --- /dev/null +++ b/sys-devel/prelink/prelink-20060213.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/prelink/prelink-20060213.ebuild,v 1.1 2006/04/11 21:33:09 cretin Exp $ + +inherit eutils + +DESCRIPTION="Modifies executables so runtime libraries load faster" +HOMEPAGE="ftp://people.redhat.com/jakub/prelink" +SRC_URI="mirror://gentoo/${P}.tar.bz2 + http://dev.gentoo.org/~azarah/prelink/${P}.tar.bz2 + ftp://people.redhat.com/jakub/prelink/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~x86" +IUSE="" + +DEPEND=">=dev-libs/elfutils-0.100 + !dev-libs/libelf + >=sys-libs/glibc-2.3.4 + >=sys-devel/binutils-2.15.90.0.1" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PN}-20040707-init.patch + epatch ${FILESDIR}/${PN}-20060213-symloop.patch + + # Build our /etc/env.d/60prelink + cat > "${S}/60prelink" <<-EOF + $( + # Need to initialize PRELINK_PATH_MASK so that we can + # just add ':${x}' below. + PRELINK_PATH_MASK="/lib/modules" + # Ok, now add the rest + for x in /usr/$(get_libdir)/locale \ + /usr/$(get_libdir)/wine \ + /usr/$(get_libdir)/valgrind \ + "*.la" "*.png" "*.py" "*.pl" "*.pm" \ + "*.sh" "*.xml" "*.xslt" "*.a" "*.js" ; do + PRELINK_PATH_MASK="${PRELINK_PATH_MASK}:${x}" + done + # Now add it quoted + echo PRELINK_PATH_MASK="\"${PRELINK_PATH_MASK}\"" + ) + PRELINK_PATH="" + EOF +} + +src_compile() { + econf || die "Configure failed" + emake || die "Make Failed" +} + +src_install() { + einstall || die "Install Failed" + + doenvd ${S}/60prelink + + exeinto /etc/cron.daily + newexe "${FILESDIR}"/prelink.cron prelink + newconfd "${FILESDIR}"/prelink.confd prelink + + dodir /var/{lib/misc,log} + touch "${D}/var/lib/misc/prelink.full" + touch "${D}/var/lib/misc/prelink.quick" + touch "${D}/var/lib/misc/prelink.force" + touch "${D}/var/log/prelink.log" + + + dodoc INSTALL TODO ChangeLog THANKS COPYING README AUTHORS NEWS +} + +pkg_postinst() { + echo + einfo "You may wish to read the Gentoo Linux Prelink Guide, which can be" + einfo "found online at:" + einfo " http://www.gentoo.org/doc/en/prelink-howto.xml" + einfo "Added cron job at /etc/cron.daily/prelink" + einfo "Edit /etc/conf.d/prelink to enable / configure" + echo + touch "${ROOT}/var/lib/misc/prelink.force" +} |