summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-22 08:09:09 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-22 08:09:09 +0000
commit767c2ab3d3063662317f3f5179f6b31d4c24e82f (patch)
tree0b5a1d7a39a4ef20a77707ca070ed104fb4598de /sys-apps
parentadd stuff for newer portages and enable colors by default (diff)
downloadgentoo-2-767c2ab3d3063662317f3f5179f6b31d4c24e82f.tar.gz
gentoo-2-767c2ab3d3063662317f3f5179f6b31d4c24e82f.tar.bz2
gentoo-2-767c2ab3d3063662317f3f5179f6b31d4c24e82f.zip
clean up ebuild and add a simple patch from Fedora
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/slocate/files/slocate-2.7-bounds.patch16
-rw-r--r--sys-apps/slocate/slocate-2.7-r7.ebuild25
2 files changed, 28 insertions, 13 deletions
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"