summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-04-19 04:47:10 +0000
committerMike Frysinger <vapier@gentoo.org>2006-04-19 04:47:10 +0000
commitd4034a202bcf86d63d62da9705ebec472ad96699 (patch)
treea228f192886b8c09764d0485ee4e629bd7f975e2 /sys-apps/slocate
parentbetter digests (diff)
downloadhistorical-d4034a202bcf86d63d62da9705ebec472ad96699.tar.gz
historical-d4034a202bcf86d63d62da9705ebec472ad96699.tar.bz2
historical-d4034a202bcf86d63d62da9705ebec472ad96699.zip
Version bump 130286 by F. Steinel.
Package-Manager: portage-2.1_pre9
Diffstat (limited to 'sys-apps/slocate')
-rw-r--r--sys-apps/slocate/ChangeLog9
-rw-r--r--sys-apps/slocate/Manifest10
-rw-r--r--sys-apps/slocate/files/digest-slocate-3.13
-rw-r--r--sys-apps/slocate/files/slocate-3.1-build.patch52
-rw-r--r--sys-apps/slocate/files/slocate-3.1-incompat-warning.patch13
-rw-r--r--sys-apps/slocate/slocate-3.1.ebuild88
6 files changed, 174 insertions, 1 deletions
diff --git a/sys-apps/slocate/ChangeLog b/sys-apps/slocate/ChangeLog
index bcb3a39f48a4..24da58cbe896 100644
--- a/sys-apps/slocate/ChangeLog
+++ b/sys-apps/slocate/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/slocate
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/ChangeLog,v 1.64 2006/04/17 20:55:23 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/ChangeLog,v 1.65 2006/04/19 04:47:10 vapier Exp $
+
+*slocate-3.1 (19 Apr 2006)
+
+ 19 Apr 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/slocate-3.1-build.patch, +files/slocate-3.1-incompat-warning.patch,
+ +slocate-3.1.ebuild:
+ Version bump 130286 by F. Steinel.
17 Apr 2006; Markus Rothe <corsair@gentoo.org> slocate-2.7-r8.ebuild:
Stable on ppc64; bug #130079
diff --git a/sys-apps/slocate/Manifest b/sys-apps/slocate/Manifest
index 41deb189a299..188944675ec2 100644
--- a/sys-apps/slocate/Manifest
+++ b/sys-apps/slocate/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX slocate-2.7-bounds.patch 305 RMD160 df8f220cdf25d98e2fa9fd0e054b2151b3a4b1ad SHA1 a82e6f131ecc6109ac8e8546ba543913e151f39e SHA256 59ce3339cacaa817d65031fae80c0bd96962f01915511a096e47fafa295d5e8f size 305
MD5 6cd691d75d501eb87ed12cf31c1e1ff6 files/slocate-2.7-bounds.patch 305
RMD160 df8f220cdf25d98e2fa9fd0e054b2151b3a4b1ad files/slocate-2.7-bounds.patch 305
@@ -54,3 +57,10 @@ MD5 dae9a79a94d9e7f6f19cbe6255a86347 files/digest-slocate-3.1 232
RMD160 0321f108f5da4e100ea515a23e40c96162760fb4 files/digest-slocate-3.1 232
SHA256 88814468d0d142ef8d368f35c29b0a2ba64cd7868069d4e96ad22da2bc943c2c files/digest-slocate-3.1 232
size 232 files/digest-slocate-3.1 232
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2.2 (GNU/Linux)
+
+iD8DBQFERcEg2+ySkm8kpY0RAvNGAJ4nKMAuUfC827TAa6t0XVYlw/B1fwCgmfqw
+xY3Cwbypv2vMteakUkdDhgE=
+=FBB0
+-----END PGP SIGNATURE-----
diff --git a/sys-apps/slocate/files/digest-slocate-3.1 b/sys-apps/slocate/files/digest-slocate-3.1
new file mode 100644
index 000000000000..fae5f81751c0
--- /dev/null
+++ b/sys-apps/slocate/files/digest-slocate-3.1
@@ -0,0 +1,3 @@
+MD5 908e6949d959ae7b686c10bb76b35bf3 slocate-3.1.tar.gz 37748
+RMD160 d3b1e818cc35ce8e87ec1b0764f6b2145a319e13 slocate-3.1.tar.gz 37748
+SHA256 6abec68ab50fa743739fb78a5063c295ae2f7d04d2e538f7c3108120e49a3266 slocate-3.1.tar.gz 37748
diff --git a/sys-apps/slocate/files/slocate-3.1-build.patch b/sys-apps/slocate/files/slocate-3.1-build.patch
new file mode 100644
index 000000000000..98f5ea113231
--- /dev/null
+++ b/sys-apps/slocate/files/slocate-3.1-build.patch
@@ -0,0 +1,52 @@
+--- src/slocate.h
++++ src/slocate.h
+@@ -35,20 +35,11 @@
+ #define MTAB_FILE "/etc/mtab"
+ #define UPDATEDB_FILE "/etc/updatedb.conf"
+
+-/* More fitting paths for FreeBSD -matt */
+-#if defined(__FreeBSD__)
+-# define DEFAULT_DB "/var/db/slocate/slocate.db"
+-# define DEFAULT_DB_DIR "/var/db/slocate/"
+-#elif defined(__SunOS__)
+-# define DEFAULT_DB "/var/db/slocate/slocate.db"
+-# define DEFAULT_DB_DIR "/var/db/slocate/"
+-#else
+-# define DEFAULT_DB "/var/lib/slocate/slocate.db"
+-# define DEFAULT_DB_DIR "/var/lib/slocate/"
+-#endif
++#define DEFAULT_DB "/var/lib/slocate/slocate.db"
++#define DEFAULT_DB_DIR "/var/lib/slocate/"
+
+ #define DB_UID 0
+-#define DB_GROUP "slocate"
++#define DB_GROUP "locate"
+ #define DB_MODE 00640
+
+ #define SLOC_ESC -0x80
+--- src/Makefile
++++ src/Makefile
+@@ -1,16 +1,18 @@
+ OBJS=slocate.o cmds.o conf.o utils.o
+ HEADERS=slocate.h cmds.h conf.h utils.h
+
+-CFLAGS=-Wall -Wshadow
+-CFLAGS+=-O2
++CFLAGS+=-Wall -Wshadow
++#CFLAGS+=-O2
+ #CFLAGS+=-g3
+ #LDFLAGS+=-lefence
+
+ PROG=slocate
+-CC=gcc
++CC?=gcc
+
+-all: $(OBJS) $(MOD_OBJS)
+- $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(MOD_OBJS)
++all: $(PROG)
++
++$(PROG): $(OBJS) $(MOD_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(MOD_OBJS)
+
+ %.o: %.c $(HEADERS)
+ $(CC) -c $(CFLAGS) -o $@ $<
diff --git a/sys-apps/slocate/files/slocate-3.1-incompat-warning.patch b/sys-apps/slocate/files/slocate-3.1-incompat-warning.patch
new file mode 100644
index 000000000000..158a10a0477b
--- /dev/null
+++ b/sys-apps/slocate/files/slocate-3.1-incompat-warning.patch
@@ -0,0 +1,13 @@
+slocate-2.x databases are incompat with slocate-3.x
+
+--- src/slocate.c
++++ src/slocate.c
+@@ -435,7 +435,7 @@
+ * cancelling the + */
+ len = path_len+code_num;
+ if (len <= 0) {
+- if (!report_error(g_data, FATAL, "set_path_head: path_head len <= 0: %d\n", len))
++ if (!report_error(g_data, FATAL, "set_path_head: path_head len <= 0: %d\nPerhaps your database is still the old format and you need to run `updatedb` ?\n", len))
+ goto EXIT;
+ }
+ if (!(path_head = realloc(path_head, (sizeof(char) * (len+1))))) {
diff --git a/sys-apps/slocate/slocate-3.1.ebuild b/sys-apps/slocate/slocate-3.1.ebuild
new file mode 100644
index 000000000000..ad484f039cd8
--- /dev/null
+++ b/sys-apps/slocate/slocate-3.1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/slocate-3.1.ebuild,v 1.1 2006/04/19 04:47:10 vapier Exp $
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Secure way to index and quickly search for files on your system (drop-in replacement for 'locate')"
+HOMEPAGE="http://slocate.trakker.ca/"
+SRC_URI="http://slocate.trakker.ca/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+DEPEND="sys-apps/shadow"
+RDEPEND="${DEPEND}
+ !sys-apps/rlocate"
+
+pkg_setup() {
+ if [[ -n $(egetent group slocate) ]] ; then
+ eerror "The 'slocate' group has been renamed to 'locate'."
+ eerror "You seem to already have a 'slocate' group."
+ eerror "Please rename it:"
+ eerror "groupmod -n locate slocate"
+ die "Change 'slocate' to 'locate'"
+ fi
+ enewgroup locate 245
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-incompat-warning.patch
+}
+
+src_compile() {
+ filter-lfs-flags
+ # this is safe since slocate only has 1 binary
+ append-ldflags $(bindnow-flags)
+ emake -C src || die
+}
+
+src_install() {
+ dobin src/slocate || die
+ dodir /usr/bin
+ dosym slocate /usr/bin/locate
+ dosym slocate /usr/bin/updatedb
+
+ exeinto /etc/cron.daily
+ newexe debian/cron.daily slocate || die
+
+ doman doc/*.1
+ dosym slocate.1 /usr/share/man/man1/locate.1
+
+ keepdir /var/lib/slocate
+
+ # #37871: nice updatedb
+ sed -i \
+ -e '/^[[:space:]]*\/usr\/bin\/updatedb/s:/:nice /:' \
+ "${D}"/etc/cron.daily/slocate
+
+ dodoc Changelog README WISHLIST notes
+
+ insinto /etc
+ doins "${FILESDIR}"/updatedb.conf
+
+ fowners root:locate /usr/bin/slocate
+ fperms go-r,g+s /usr/bin/slocate
+
+ chown -R root:locate "${D}"/var/lib/slocate
+ fperms 0750 /var/lib/slocate
+}
+
+pkg_postinst() {
+ 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"
+ echo
+ fi
+ einfo "Note that the /etc/updatedb.conf file is generic"
+ einfo "Please customize it to your system requirements"
+ echo
+ ewarn "The slocate database created by slocate-2.x is incompatible"
+ ewarn "with slocate-3.x. Make sure you run updatedb!"
+}