diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-05-22 08:09:09 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-22 08:09:09 +0000 |
commit | a040693aed994a98fd68cfc2b0df66e951dfff90 (patch) | |
tree | 7cae621d2c09cd78df708112e3f7b6de36e4810d /sys-apps/slocate | |
parent | add stuff for newer portages and enable colors by default (diff) | |
download | historical-a040693aed994a98fd68cfc2b0df66e951dfff90.tar.gz historical-a040693aed994a98fd68cfc2b0df66e951dfff90.tar.bz2 historical-a040693aed994a98fd68cfc2b0df66e951dfff90.zip |
clean up ebuild and add a simple patch from Fedora
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'sys-apps/slocate')
-rw-r--r-- | sys-apps/slocate/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/slocate/files/slocate-2.7-bounds.patch | 16 | ||||
-rw-r--r-- | sys-apps/slocate/slocate-2.7-r7.ebuild | 25 |
3 files changed, 30 insertions, 14 deletions
diff --git a/sys-apps/slocate/Manifest b/sys-apps/slocate/Manifest index 416a89644692..1ce33f2948ab 100644 --- a/sys-apps/slocate/Manifest +++ b/sys-apps/slocate/Manifest @@ -1,5 +1,6 @@ MD5 f73833cc3270af566a045cf764dd3a10 ChangeLog 6731 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 -MD5 f3899d9e3712c1eede944133655a19c3 slocate-2.7-r7.ebuild 2262 +MD5 1711c302c7546e0a7210bce15849fa43 slocate-2.7-r7.ebuild 2323 MD5 177bd72a1d45668ac899a01d2512d82b files/updatedb.conf 505 MD5 4109d0757229d079e30f8ea33b676f00 files/digest-slocate-2.7-r7 211 +MD5 6cd691d75d501eb87ed12cf31c1e1ff6 files/slocate-2.7-bounds.patch 305 diff --git a/sys-apps/slocate/files/slocate-2.7-bounds.patch b/sys-apps/slocate/files/slocate-2.7-bounds.patch new file mode 100644 index 000000000000..b370d12842e6 --- /dev/null +++ b/sys-apps/slocate/files/slocate-2.7-bounds.patch @@ -0,0 +1,16 @@ +Snatched from Fedora. + +--- slocate-2.7/main.c ++++ slocate-2.7/main.c +@@ -1265,6 +1265,11 @@ + + pathlen = code_ptr - codedpath; + ++ if (pathlen < 0) { ++ fprintf(stderr,"%s: decode_db() aborted. Corrupt database?\n",progname); ++ exit(1); ++ } ++ + jump = 0; + while (!jump) { + ch = *begin_ptr; diff --git a/sys-apps/slocate/slocate-2.7-r7.ebuild b/sys-apps/slocate/slocate-2.7-r7.ebuild index 0d2d204547bc..b9da22d4b499 100644 --- a/sys-apps/slocate/slocate-2.7-r7.ebuild +++ b/sys-apps/slocate/slocate-2.7-r7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/slocate-2.7-r7.ebuild,v 1.2 2005/02/13 00:30:42 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/slocate-2.7-r7.ebuild,v 1.3 2005/05/22 08:09:09 vapier Exp $ inherit flag-o-matic eutils @@ -8,15 +8,14 @@ DESCRIPTION="Secure way to index and quickly search for files on your system (dr HOMEPAGE="http://www.geekreview.org/slocate/" SRC_URI="ftp://ftp.geekreview.org/slocate/src/slocate-${PV}.tar.gz mirror://gentoo/${P}-debian.patch.bz2 - mirror://gentoo/${P}-uclibc-sl_fts.patch.bz2" + elibc_uclibc? ( mirror://gentoo/${P}-uclibc-sl_fts.patch.bz2 )" LICENSE="GPL-2" SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86" -IUSE="uclibc" +KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86" +IUSE="" DEPEND="sys-apps/shadow" -RDEPEND="sys-apps/shadow" pkg_setup() { enewgroup slocate @@ -24,17 +23,19 @@ pkg_setup() { src_unpack() { unpack ${A} - cd ${S} - use uclibc && epatch ${WORKDIR}/${P}-uclibc-sl_fts.patch - epatch ${WORKDIR}/${P}-debian.patch + cd "${S}" + use elibc_uclibc && epatch "${WORKDIR}"/${P}-uclibc-sl_fts.patch + epatch "${WORKDIR}"/${P}-debian.patch + epatch "${FILESDIR}"/${P}-bounds.patch - append-ldflags -Wl,-z,now filter-lfs-flags + # this is safe since slocate only has 1 binary + append-ldflags -Wl,-z,now sed -i \ -e "/groupadd/s/^/#/" \ -e "/chown.*slocate/s/^/#/" \ - -e "/^CFLAGS/s:-g3:${CFLAGS}:" \ + -e '/^CFLAGS/d' \ Makefile.in || die } @@ -71,12 +72,10 @@ src_install() { pkg_postinst() { touch "${ROOT}/var/lib/slocate/slocate.db" - if [[ -f "${ROOT}/etc/cron.daily/slocate.cron" ]]; then - ewarn + if [[ -f ${ROOT}/etc/cron.daily/slocate.cron ]]; then ewarn "If you merged slocate-2.7.ebuild, please remove" ewarn "/etc/cron.daily/slocate.cron since .cron has been removed" ewarn "from the filename" - ewarn echo fi einfo "Note that the /etc/updatedb.conf file is generic" |