diff options
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/cachefilesd/ChangeLog | 12 | ||||
-rw-r--r-- | sys-fs/cachefilesd/Manifest | 17 | ||||
-rw-r--r-- | sys-fs/cachefilesd/cachefilesd-0.10.1.ebuild | 50 | ||||
-rw-r--r-- | sys-fs/cachefilesd/files/0.10.1-makefile.patch | 21 | ||||
-rw-r--r-- | sys-fs/cachefilesd/files/cachefilesd.conf | 8 | ||||
-rw-r--r-- | sys-fs/cachefilesd/files/cachefilesd.init | 52 | ||||
-rw-r--r-- | sys-fs/cachefilesd/metadata.xml | 8 |
7 files changed, 168 insertions, 0 deletions
diff --git a/sys-fs/cachefilesd/ChangeLog b/sys-fs/cachefilesd/ChangeLog new file mode 100644 index 000000000000..95b77e182999 --- /dev/null +++ b/sys-fs/cachefilesd/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for sys-fs/cachefilesd +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cachefilesd/ChangeLog,v 1.1 2010/09/19 08:08:16 jlec Exp $ + +*cachefilesd-0.10.1 (19 Sep 2010) + + 19 Sep 2010; Justin Lecher <jlec@gentoo.org> +files/0.10.1-makefile.patch, + +cachefilesd-0.10.1.ebuild, +files/cachefilesd.conf, + +files/cachefilesd.init, +metadata.xml: + New addition, 275014; thanks Bruno Redondi and everyone else for the + contribution + diff --git a/sys-fs/cachefilesd/Manifest b/sys-fs/cachefilesd/Manifest new file mode 100644 index 000000000000..09f229a0b92f --- /dev/null +++ b/sys-fs/cachefilesd/Manifest @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX 0.10.1-makefile.patch 393 RMD160 66ff09058f703768b63127d7a071ab04cac5bb10 SHA1 0c175c824ae6873927f1c9e70db5db95859190de SHA256 7e855c5fa9099ebb5b088fb2f6f66eaed4479ba622daf9cfaabc2a052a2e2335 +AUX cachefilesd.conf 410 RMD160 72ab2295f9aafacb424fea456e066d33f90dd651 SHA1 2405679f247ba8cf78ed1122a355c40cd52cf67f SHA256 138297a340a6437cc39d2634b0d74d3efa13a29a7077d7e2dffa8197a24007ad +AUX cachefilesd.init 1658 RMD160 d59fc78953d7759ad52735ae1163eb234d2be043 SHA1 82ab773ef6d2e55466472f479e49ea2d8bf161f4 SHA256 9bcf8d274bc4032b6448968a041d531ca665864fd54bc83a583bfd2b8b595f79 +DIST cachefilesd-0.10.1.tar.bz2 23763 RMD160 293fe9aef77d296dde95af2939a13d62356a0ceb SHA1 73fc9424c485cc4b724c1f11764d7616cddebc5e SHA256 8964ec1ff571025db74b89385486299173cd2b6ed6944f92db95bf09871a43d5 +EBUILD cachefilesd-0.10.1.ebuild 1500 RMD160 19e21a79ba0746ad0a77115849fa0d37348fb1d0 SHA1 058c8c8da1fcfbe232a0d6c4c815b17b0268cd82 SHA256 56de4d0b1394141ce9306ffc1188c621bc2f203f8b29f2c5bbe6226a08b67aec +MISC ChangeLog 503 RMD160 656e4cd04fa627e619cd33deb4ea3e564529524c SHA1 41a8f2bfa27597defd261b155d8ff05ac1c9d11f SHA256 fd9576608106a8f4bc7c1849147026ffce66f50275ecdb589dc1b27bb3993286 +MISC metadata.xml 220 RMD160 435928b54535666360b3bf96aaa03430383339b8 SHA1 72650d93162578d87307bdef5caf72c5ee15c97a SHA256 e08cbf772d3bdb38ef895160c6573fdd3b1e81aea8f85a8cef84f5964d578fc4 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.16 (GNU/Linux) + +iEYEARECAAYFAkyVxPcACgkQgAnW8HDreRZgZgCeP/88Uf4wk2KC6N/GKY/LRRvZ +vXcAn1YoK2CBCFBFLEXE19xfsV8df7Yn +=1YhX +-----END PGP SIGNATURE----- diff --git a/sys-fs/cachefilesd/cachefilesd-0.10.1.ebuild b/sys-fs/cachefilesd/cachefilesd-0.10.1.ebuild new file mode 100644 index 000000000000..06466a9daee7 --- /dev/null +++ b/sys-fs/cachefilesd/cachefilesd-0.10.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cachefilesd/cachefilesd-0.10.1.ebuild,v 1.1 2010/09/19 08:08:16 jlec Exp $ + +EAPI="2" + +inherit eutils toolchain-funcs + +DESCRIPTION="Provides a caching directory on an already mounted filesystem" +HOMEPAGE="http://people.redhat.com/~dhowells/fscache/" +SRC_URI="http://people.redhat.com/~dhowells/fscache/${P}.tar.bz2" + +IUSE="doc selinux" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +src_prepare() { + epatch "${FILESDIR}"/${PV}-makefile.patch + tc-export CC + if ! use selinux; then + sed -e '/^secctx/s:^:#:g' -i cachefilesd.conf || die + fi +} +src_install() { + emake DESTDIR="${D}" install || die "install failed" + + if use selinux; then + insinto /usr/share/doc/${P} + doins -r selinux || die + fi + + dodoc README howto.txt || die + + newconfd "${FILESDIR}"/cachefilesd.conf cachefilesd || die + newinitd "${FILESDIR}"/cachefilesd.init cachefilesd || die + + keepdir /var/cache/cachefilesd +} + +pkg_postinst() { + [[ -d /var/fscache ]] && return + elog "Before CacheFiles can be used, a directory for local storage" + elog "must be created. The default configuration of /etc/cachefilesd.conf" + elog "uses /var/fscache. The filesystem mounted there must support" + elog "extended attributes (mount -o user_xattr)." + elog "" + elog "Once that is taken care of, start the daemon, add -o ...,fsc" + elog "to the mount options of your network mounts, and let it fly!" +} diff --git a/sys-fs/cachefilesd/files/0.10.1-makefile.patch b/sys-fs/cachefilesd/files/0.10.1-makefile.patch new file mode 100644 index 000000000000..af029c9293a3 --- /dev/null +++ b/sys-fs/cachefilesd/files/0.10.1-makefile.patch @@ -0,0 +1,21 @@ +diff --git a/Makefile b/Makefile +index 15a8445..d650f47 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,3 @@ +-CFLAGS := -g -O2 -Wall + INSTALL := install + DESTDIR := + BUILDFOR := +@@ -21,7 +20,10 @@ endif + # + all: cachefilesd + +-cachefilesd: cachefilesd.c Makefile ++cachefilesd.o: cachefilesd.c ++ $(CC) $(CFLAGS) -c $< ++ ++cachefilesd: cachefilesd.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + + # diff --git a/sys-fs/cachefilesd/files/cachefilesd.conf b/sys-fs/cachefilesd/files/cachefilesd.conf new file mode 100644 index 000000000000..40d1e92c88c6 --- /dev/null +++ b/sys-fs/cachefilesd/files/cachefilesd.conf @@ -0,0 +1,8 @@ +# Config file for /etc/init.d/cachefilesd +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cachefilesd/files/cachefilesd.conf,v 1.1 2010/09/19 08:08:16 jlec Exp $ + +# -d - This can be specified multiple times. +# -f <configfile> - Read the specified configuration file instead of /etc/cachefiles.conf +OPTIONS="" diff --git a/sys-fs/cachefilesd/files/cachefilesd.init b/sys-fs/cachefilesd/files/cachefilesd.init new file mode 100644 index 000000000000..6c934b06d029 --- /dev/null +++ b/sys-fs/cachefilesd/files/cachefilesd.init @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cachefilesd/files/cachefilesd.init,v 1.1 2010/09/19 08:08:16 jlec Exp $ + +depend() { + need localmount + use logger + before nfsmount +} + +checkxattr() { + local testpath testfile ret + testpath=$(awk '/^[[:space:]]*dir/ {print $2}' /etc/cachefilesd.conf) + testfile="${testpath}/.tmp-xattr-test.cachefilesd" + touch "${testfile}" + # creates a file in the testpath and tries to set an attribute on it to check + # if the support is available + attr -s test -V xattr "${testfile}" 2>&1 > /dev/null + ret=$? + rm -f "${testfile}" + [ ${ret} -ne 0 ] && eerror "xattr support missing on the ${testpath} filesystem" + return ${ret} +} + +start() { + ebegin "Starting cachefilesd" + checkxattr || return $? + # check if the cachefiles modules is loaded (or builtin) + if [ ! -c /dev/cachefiles ] ; then + local ret + einfo "/dev/cachefiles doesn't exist, trying to modprobe cachefiles" + modprobe cachefiles + ret=$? + if [ $ret -ne 0 ] ; then + eerror "cachefiles modules cannot be loaded so cachefilesd " + error "cannot be started, aborting. Did you build fscache in your " + error "kernel? Note that you need a 2.6.30 or better kernel" + return $ret + fi + fi + start-stop-daemon --start --pidfile /var/run/cachefilesd.pid --exec /sbin/cachefilesd -- ${OPTIONS} + eend $? "Failed to start cachefilesd. Check the system log to see the error" + +} + +stop() { + ebegin "Stopping cachefilesd" + start-stop-daemon --stop --exec /sbin/cachefilesd --pidfile /var/run/cachefilesd.pid + eend $? "Failed to stop cachefilesd" +} + diff --git a/sys-fs/cachefilesd/metadata.xml b/sys-fs/cachefilesd/metadata.xml new file mode 100644 index 000000000000..9aa75ad4091e --- /dev/null +++ b/sys-fs/cachefilesd/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>jlec@gentoo.org</email> +</maintainer> +</pkgmetadata> |