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
commit706f32a0df76e01eb9c7897221eec2437dfb301f (patch)
treeb9a6f292bf4b2a6e55a217fc8cc5535b79cba808 /sys-fs/copyfs/files
parentBump to new release. Add my self to the maintainers list. (Manifest recommit) (diff)
downloadgentoo-2-706f32a0df76e01eb9c7897221eec2437dfb301f.tar.gz
gentoo-2-706f32a0df76e01eb9c7897221eec2437dfb301f.tar.bz2
gentoo-2-706f32a0df76e01eb9c7897221eec2437dfb301f.zip
Initial import
Diffstat (limited to 'sys-fs/copyfs/files')
-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
3 files changed, 143 insertions, 0 deletions
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