summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Herbert <stuart@gentoo.org>2004-12-16 22:21:34 +0000
committerStuart Herbert <stuart@gentoo.org>2004-12-16 22:21:34 +0000
commiteb299d7bc9cc36a5843729e4296bd8186276dae6 (patch)
treee0951e6d06c87a8f166a391ed617627b586c4342 /sys-fs/copyfs
parentBump to new release. Add my self to the maintainers list. (diff)
downloadhistorical-eb299d7bc9cc36a5843729e4296bd8186276dae6.tar.gz
historical-eb299d7bc9cc36a5843729e4296bd8186276dae6.tar.bz2
historical-eb299d7bc9cc36a5843729e4296bd8186276dae6.zip
Initial import
Diffstat (limited to 'sys-fs/copyfs')
-rw-r--r--sys-fs/copyfs/ChangeLog11
-rw-r--r--sys-fs/copyfs/Manifest6
-rw-r--r--sys-fs/copyfs/copyfs-1.0.ebuild42
-rw-r--r--sys-fs/copyfs/files/copyfs-1.0-gentoo.patch42
-rw-r--r--sys-fs/copyfs/files/copyfs-1.0-unlink.patch100
-rw-r--r--sys-fs/copyfs/files/digest-copyfs-1.01
-rw-r--r--sys-fs/copyfs/metadata.xml8
7 files changed, 210 insertions, 0 deletions
diff --git a/sys-fs/copyfs/ChangeLog b/sys-fs/copyfs/ChangeLog
new file mode 100644
index 000000000000..f728e8ca5b30
--- /dev/null
+++ b/sys-fs/copyfs/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sys-fs/copyfs
+# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/copyfs/ChangeLog,v 1.1 2004/12/16 22:21:34 stuart Exp $
+
+*copyfs-1.0 (16 Dec 2004)
+
+ 16 Dec 2004; Stuart Herbert <stuart@gentoo.org> +metadata.xml,
+ +files/copyfs-1.0-gentoo.patch, +files/copyfs-1.0-unlink.patch,
+ +copyfs-1.0.ebuild:
+ Initial import
+
diff --git a/sys-fs/copyfs/Manifest b/sys-fs/copyfs/Manifest
new file mode 100644
index 000000000000..0453aa13c3e7
--- /dev/null
+++ b/sys-fs/copyfs/Manifest
@@ -0,0 +1,6 @@
+MD5 a6cf703e3aaf237dae6065a4c68e40a2 ChangeLog 397
+MD5 a95943ad704dca8b5420d97a521c181a copyfs-1.0.ebuild 1045
+MD5 71da003bb2109fed15aff6635287c6a6 metadata.xml 222
+MD5 c05721e998e3acccd0813319c8e08dfd files/digest-copyfs-1.0 62
+MD5 5ec647183c280e2dbed2a9f03d5d5776 files/copyfs-1.0-gentoo.patch 1330
+MD5 1902efbf4abea16617145fe1d8cb2963 files/copyfs-1.0-unlink.patch 2833
diff --git a/sys-fs/copyfs/copyfs-1.0.ebuild b/sys-fs/copyfs/copyfs-1.0.ebuild
new file mode 100644
index 000000000000..1593e8784bfa
--- /dev/null
+++ b/sys-fs/copyfs/copyfs-1.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/copyfs/copyfs-1.0.ebuild,v 1.1 2004/12/16 22:21:34 stuart Exp $
+
+inherit eutils
+DESCRIPTION="fuse-based filesystem for maintaining configuration files"
+HOMEPAGE="http://invaders.mars-attacks.org/~boklm/copyfs/"
+SRC_URI="${HOMEPAGE}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-x86"
+IUSE=""
+#RESTRICT="nostrip"
+DEPEND=">=sys-fs/fuse-2.0
+ sys-apps/attr"
+#RDEPEND=""
+
+S=${WORKDIR}/${P}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S} || die
+
+ # this patch fixes sandbox violations
+ epatch ${FILESDIR}/${P}-gentoo.patch
+
+ # this patch adds support for cleaning up the versions directory
+ # the patch is experimental at best, but it's better than your
+ # versions directory filling up with unused files
+ #
+ # patch by stuart@gentoo.org
+ epatch ${FILESDIR}/${P}-unlink.patch
+}
+
+src_compile() {
+ econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+}
diff --git a/sys-fs/copyfs/files/copyfs-1.0-gentoo.patch b/sys-fs/copyfs/files/copyfs-1.0-gentoo.patch
new file mode 100644
index 000000000000..aabf14ee4855
--- /dev/null
+++ b/sys-fs/copyfs/files/copyfs-1.0-gentoo.patch
@@ -0,0 +1,42 @@
+diff -u --recursive copyfs-1.0/Makefile.in copyfs-1.0-gentoo/Makefile.in
+--- copyfs-1.0/Makefile.in 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0-gentoo/Makefile.in 2004-12-16 20:34:44.724159540 +0000
+@@ -27,8 +27,9 @@
+ all: $(TARGET)
+
+ install: $(TARGET) $(SCRIPTS)
+- install -o root -g root -m 755 $(TARGET) /usr/local/bin
+- install -o root -g root -m 755 $(SCRIPTS) /usr/local/bin
++ @mkdir -p $(DESTDIR)/usr/bin
++ install -o root -g root -m 755 $(TARGET) $(DESTDIR)/usr/bin
++ install -o root -g root -m 755 $(SCRIPTS) $(DESTDIR)/usr/bin
+
+ clean:
+ rm -f *~ $(OBJ) \#*\#
+diff -u --recursive copyfs-1.0/ea.c copyfs-1.0-gentoo/ea.c
+--- copyfs-1.0/ea.c 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0-gentoo/ea.c 2004-12-16 20:36:03.868144344 +0000
+@@ -1,10 +1,11 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <fuse.h>
++#include <sys/errno.h>
+
+ #include "helper.h"
+ #include "structs.h"
+--- copyfs-1.0/interface.c 2004-12-16 20:37:56.214420764 +0000
++++ copyfs-1.0-gentoo/interface.c 2004-12-16 20:38:03.196008992 +0000
+@@ -23,7 +23,7 @@
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+ #include <sys/time.h>
+ #include <time.h>
+
diff --git a/sys-fs/copyfs/files/copyfs-1.0-unlink.patch b/sys-fs/copyfs/files/copyfs-1.0-unlink.patch
new file mode 100644
index 000000000000..c63f7cc29715
--- /dev/null
+++ b/sys-fs/copyfs/files/copyfs-1.0-unlink.patch
@@ -0,0 +1,100 @@
+diff -u --recursive copyfs-1.0-orig/cache.c copyfs-1.0/cache.c
+--- copyfs-1.0-orig/cache.c 2004-12-16 21:07:38.953286336 +0000
++++ copyfs-1.0/cache.c 2004-12-16 22:00:40.158056066 +0000
+@@ -94,6 +94,50 @@
+ }
+
+ /*
++ * Remove metadata from the cache
++ */
++void cache_remove_metadata(const char *vpath)
++{
++ bucket_t *bucket;
++ metadata_t *metadata;
++ int atHead = 1;
++ int atTail = 1;
++
++ /* Lookup the item */
++ bucket = &cache_hash_table[CACHE_HASH(vpath)];
++ metadata = bucket->b_contents;
++ while (metadata && strcmp(metadata->md_vfile, vpath))
++ metadata = metadata->md_next;
++ if (!metadata)
++ return ;
++
++ /* Disconnect it from the list */
++ if (metadata->md_previous)
++ {
++ metadata->md_previous->md_next = metadata->md_next;
++ atHead = 0;
++ }
++
++ if (metadata->md_next)
++ {
++ metadata->md_next->md_previous = metadata->md_previous;
++ atTail = 0;
++ }
++
++ if (atHead)
++ {
++ bucket->b_contents = metadata->md_next;
++ bucket->b_contents->md_previous = NULL;
++ }
++
++ bucket->b_count--;
++ if (bucket->b_count == 0)
++ bucket->b_contents = NULL;
++
++ free(metadata);
++}
++
++/*
+ * Clean the older items out of the cache to free space. The goal is to
+ * half the number of items, so that we don't get called constantly.
+ */
+diff -u --recursive copyfs-1.0-orig/cache.h copyfs-1.0/cache.h
+--- copyfs-1.0-orig/cache.h 2004-12-16 21:07:38.953286336 +0000
++++ copyfs-1.0/cache.h 2004-12-16 22:00:28.463400204 +0000
+@@ -11,6 +11,7 @@
+ void cache_initialize(void);
+ void cache_finalize(void);
+ metadata_t *cache_get_metadata(const char *vpath);
++void cache_remove_metadata(const char *vpath);
+ void cache_add_metadata(metadata_t *metadata);
+ int cache_find_maximal_match(char **array, metadata_t **result);
+
+Only in copyfs-1.0: config.cache
+Only in copyfs-1.0: config.log
+Only in copyfs-1.0: config.status
+Only in copyfs-1.0: fcopyfs-daemon
+diff -u --recursive copyfs-1.0-orig/interface.c copyfs-1.0/interface.c
+--- copyfs-1.0-orig/interface.c 2004-12-16 21:07:38.953286336 +0000
++++ copyfs-1.0/interface.c 2004-12-16 22:01:40.393756516 +0000
+@@ -137,6 +137,7 @@
+ file = helper_build_composite("-S", "/", entry->d_name +
+ strlen(METADATA_PREFIX));
+ metadata = rcs_translate_to_metadata(file, rcs_version_path);
++
+ free(file);
+ if (metadata && !metadata->md_deleted)
+ {
+@@ -181,13 +182,16 @@
+ return -errno;
+ if (S_ISDIR(st_rfile.st_mode))
+ return -EISDIR;
++ if (unlink(version->v_rfile) == -1)
++ return -errno;
+ metadata->md_deleted = 1;
+ metafile = create_meta_name(metadata->md_vfile, "metadata");
+- if (write_metadata_file(metafile, metadata) == -1) {
+- free(metafile);
++ if (unlink(metafile) == -1)
+ return -errno;
+- }
+ free(metafile);
++
++ cache_remove_metadata(version->v_rfile);
++
+ return 0;
+ }
+
diff --git a/sys-fs/copyfs/files/digest-copyfs-1.0 b/sys-fs/copyfs/files/digest-copyfs-1.0
new file mode 100644
index 000000000000..5af8fc10ab65
--- /dev/null
+++ b/sys-fs/copyfs/files/digest-copyfs-1.0
@@ -0,0 +1 @@
+MD5 6b020556e9819756e391100840d6b1e3 copyfs-1.0.tar.bz2 30713
diff --git a/sys-fs/copyfs/metadata.xml b/sys-fs/copyfs/metadata.xml
new file mode 100644
index 000000000000..71d7ba9c0605
--- /dev/null
+++ b/sys-fs/copyfs/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>stuart@gentoo.org</email>
+</maintainer>
+</pkgmetadata>