summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-fs/copyfs
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-fs/copyfs')
-rw-r--r--sys-fs/copyfs/Manifest1
-rw-r--r--sys-fs/copyfs/copyfs-1.0.1.ebuild44
-rw-r--r--sys-fs/copyfs/files/copyfs-1.0-unlink.patch158
-rw-r--r--sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch46
-rw-r--r--sys-fs/copyfs/metadata.xml8
5 files changed, 257 insertions, 0 deletions
diff --git a/sys-fs/copyfs/Manifest b/sys-fs/copyfs/Manifest
new file mode 100644
index 000000000000..f23e29727886
--- /dev/null
+++ b/sys-fs/copyfs/Manifest
@@ -0,0 +1 @@
+DIST copyfs-1.0.1.tar.bz2 38429 SHA256 63022f60e2c6b488bef509add0e7cdb41d597ded22a70c1c6ae74ab4a6b7e0f7 SHA512 abe1a125913f35d8390385562d56a5a1aa238ec03bfa044d61ac8f514a4986bfa70502d30af9dbc90e58910dab7f0ab5e230de0b4fa2eb45fe3a2f6514be0a07 WHIRLPOOL e230bb1f4cf24bbc6cdf9bfcad4324d7861e6b36b3dd5a9611e62e52520635e2605831d697a548f82fb589422ac79e4997efbc9b2ef689746860d04932d3f5f2
diff --git a/sys-fs/copyfs/copyfs-1.0.1.ebuild b/sys-fs/copyfs/copyfs-1.0.1.ebuild
new file mode 100644
index 000000000000..c3410402b46a
--- /dev/null
+++ b/sys-fs/copyfs/copyfs-1.0.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils toolchain-funcs
+
+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 ~amd64 ~ppc"
+IUSE=""
+
+DEPEND=">=sys-fs/fuse-2.0
+ sys-apps/attr"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # 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}"/${PN}-1.0-unlink.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --bindir="${D}/usr/bin" --mandir="${D}/usr/share/man"
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
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..f4ee28fae148
--- /dev/null
+++ b/sys-fs/copyfs/files/copyfs-1.0-unlink.patch
@@ -0,0 +1,158 @@
+diff -u --recursive copyfs-1.0-orig/cache.c copyfs-1.0/cache.c
+--- copyfs-1.0-orig/cache.c 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0/cache.c 2004-12-18 20:30:17.945445677 +0000
+@@ -94,6 +94,61 @@
+ }
+
+ /*
++ * Remove metadata from the cache
++ */
++void cache_remove_metadata(metadata_t *metadata)
++{
++ version_t * version;
++
++ int atHead = 1;
++ int atTail = 1;
++
++ if (NULL == 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)
++ {
++ metadata->md_bucket->b_contents = metadata->md_next;
++ if (metadata->md_next != NULL)
++ metadata->md_next->md_previous = NULL;
++ }
++
++ metadata->md_bucket->b_count--;
++ if (metadata->md_bucket->b_count == 0)
++ metadata->md_bucket->b_contents = NULL;
++
++ version = metadata->md_versions;
++
++ while (NULL != version)
++ {
++ metadata->md_versions = version->v_next;
++ free(version);
++ version = metadata->md_versions;
++ }
++
++ if (metadata->md_vfile != NULL)
++ free (metadata->md_vfile);
++
++ if (metadata->md_vpath != NULL)
++ free (metadata->md_vpath);
++
++ 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.
+ */
+@@ -122,6 +177,7 @@
+ bucket = &cache_hash_table[CACHE_HASH(metadata->md_vfile)];
+ metadata->md_previous = NULL;
+ metadata->md_next = bucket->b_contents;
++ metadata->md_bucket = bucket;
+ if (bucket->b_contents)
+ bucket->b_contents->md_previous = metadata;
+ bucket->b_contents = metadata;
+diff -u --recursive copyfs-1.0-orig/cache.h copyfs-1.0/cache.h
+--- copyfs-1.0-orig/cache.h 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0/cache.h 2004-12-18 20:04:32.072307652 +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(metadata_t *metadata);
+ void cache_add_metadata(metadata_t *metadata);
+ int cache_find_maximal_match(char **array, metadata_t **result);
+
+diff -u --recursive copyfs-1.0-orig/interface.c copyfs-1.0/interface.c
+--- copyfs-1.0-orig/interface.c 2004-12-18 20:04:21.560474299 +0000
++++ copyfs-1.0/interface.c 2004-12-18 20:17:22.367357210 +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)
+ {
+@@ -176,18 +177,42 @@
+ metadata = rcs_translate_to_metadata(path, rcs_version_path);
+ if (!metadata || metadata->md_deleted)
+ return -ENOENT;
+- version = rcs_find_version(metadata, LATEST, LATEST);
+- if (lstat(version->v_rfile, &st_rfile) == -1)
+- return -errno;
+- if (S_ISDIR(st_rfile.st_mode))
+- return -EISDIR;
++
++ /* remove all of the versions that we know about */
++
++ version = metadata->md_versions;
++
++ while (NULL != version)
++ {
++ /* if we can't stat the file, we assume it's already toast */
++
++ if (lstat(version->v_rfile, &st_rfile) == 0)
++ {
++ if (S_ISDIR(st_rfile.st_mode))
++ {
++ return -EISDIR;
++ }
++
++ if (unlink(version->v_rfile) == -1)
++ return -errno;
++ }
++
++ /* move on to the next version */
++ metadata->md_versions = version->v_next;
++ free(version);
++
++ version = metadata->md_versions;
++ }
++
++ /* if we get to here, we've released all the versions */
+ 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(metadata);
++
+ return 0;
+ }
+
+diff -u --recursive copyfs-1.0-orig/structs.h copyfs-1.0/structs.h
+--- copyfs-1.0-orig/structs.h 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0/structs.h 2004-12-18 20:04:32.073307446 +0000
+@@ -38,6 +38,8 @@
+
+ metadata_t *md_next; /* Next file in bucket */
+ metadata_t *md_previous; /* Previous " */
++
++ bucket_t *md_bucket; /* Our container */
+ };
+
+ struct bucket_t
diff --git a/sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch b/sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch
new file mode 100644
index 000000000000..f0ddfab94af4
--- /dev/null
+++ b/sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch
@@ -0,0 +1,46 @@
+--- a/ea.c
++++ b/ea.c
+@@ -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"
+--- a/interface.c
++++ b/interface.c
+@@ -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>
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -27,7 +27,7 @@
+ OBJ = $(SRC:.c=.o)
+
+ CC = gcc
+-CFLAGS = -Wall -ansi -W -std=c99 -g -ggdb -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
++CFLAGS += -Wall -ansi -W -std=c99 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+ LIBS = -lfuse
+
+ all: $(TARGET)
+@@ -54,7 +54,7 @@
+ rm -rf /tmp/copyfs-dist
+
+ $(TARGET): $(OBJ)
+- gcc -o $(TARGET) $(OBJ) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJ) $(LIBS)
+
+ # Dependencies (use gcc -MM -D_FILE_OFFSET_BITS=64 *.c to regenerate)
+
diff --git a/sys-fs/copyfs/metadata.xml b/sys-fs/copyfs/metadata.xml
new file mode 100644
index 000000000000..333a655e1976
--- /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>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+</maintainer>
+</pkgmetadata>