From 6e2da9672f79f44048d597f0f61e4646cdeade9d Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Fri, 27 Sep 2024 12:48:46 +0200 Subject: filesystems: add new category for file systems and related utilities The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988 --- filesystems/gitfs/Makefile | 45 +++++++++++++++++++++++ filesystems/gitfs/distinfo | 3 ++ filesystems/gitfs/files/patch-gitfs_utils_args.py | 36 ++++++++++++++++++ filesystems/gitfs/pkg-descr | 3 ++ 4 files changed, 87 insertions(+) create mode 100644 filesystems/gitfs/Makefile create mode 100644 filesystems/gitfs/distinfo create mode 100644 filesystems/gitfs/files/patch-gitfs_utils_args.py create mode 100644 filesystems/gitfs/pkg-descr (limited to 'filesystems/gitfs') diff --git a/filesystems/gitfs/Makefile b/filesystems/gitfs/Makefile new file mode 100644 index 000000000000..d943f6188d14 --- /dev/null +++ b/filesystems/gitfs/Makefile @@ -0,0 +1,45 @@ +PORTNAME= gitfs +DISTVERSION= 0.5.2 +PORTREVISION= 2 +CATEGORIES= filesystems devel +PKGNAMEPREFIX= fusefs- + +MAINTAINER= ports@FreeBSD.org +COMMENT= Version controlled file system +WWW= https://www.presslabs.com/code/gitfs/ + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +DEPRECATED= Abandonware, last release on 2019 +EXPIRATION_DATE=2024-12-31 + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}atomiclong>=0.1.1:devel/py-atomiclong@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cffi>=1.12.3:devel/py-cffi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fusepy>=3.0.1:filesystems/py-fusepy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycparser>=2.19:devel/py-pycparser@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pygit2>=0.28.2:devel/py-pygit2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}raven>=6.10.0:devel/py-raven@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}six>=1.12.0:devel/py-six@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=4.6.5:devel/py-pytest@${PY_FLAVOR} + +USE_GITHUB= yes +GH_ACCOUNT= PressLabs + +NO_ARCH= yes +USES= python +USE_PYTHON= autoplist distutils concurrent optsuffix + +post-patch: + @${REINPLACE_CMD} -e 's/==/>=/' ${WRKSRC}/*requirements.txt + +# XXX Integrations tests want MOUNT_PATH, REPO_* passed via TEST_ENV +do-test: + @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest) + +post-patch: patch-py3k-mock +patch-py3k-mock: + @${GREP} -Flr 'mock import' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \ + -i .bak.mock -e 's/mock import/unittest.&/' + +.include diff --git a/filesystems/gitfs/distinfo b/filesystems/gitfs/distinfo new file mode 100644 index 000000000000..a44e0ec16308 --- /dev/null +++ b/filesystems/gitfs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1571569210 +SHA256 (PressLabs-gitfs-0.5.2_GH0.tar.gz) = 921e24311e3b8ea3a5448d698a11a747618ee8dd62d5d43a85801de0b111cbf3 +SIZE (PressLabs-gitfs-0.5.2_GH0.tar.gz) = 64141 diff --git a/filesystems/gitfs/files/patch-gitfs_utils_args.py b/filesystems/gitfs/files/patch-gitfs_utils_args.py new file mode 100644 index 000000000000..bc4d1d42d80d --- /dev/null +++ b/filesystems/gitfs/files/patch-gitfs_utils_args.py @@ -0,0 +1,36 @@ +https://github.com/PressLabs/gitfs/issues/258 +https://github.com/PressLabs/gitfs/issues/257 + +--- gitfs/utils/args.py.orig 2019-10-20 11:00:10 UTC ++++ gitfs/utils/args.py +@@ -44,7 +44,7 @@ class Args(object): + ("foreground", (False, "bool")), + ("branch", ("master", "string")), + ("allow_other", (False, "bool")), +- ("allow_root", (True, "bool")), ++ ("allow_root", (False, "bool")), + ("commiter_name", (self.get_commiter_user, "string")), + ("commiter_email", (self.get_commiter_email, "string")), + ("max_size", (10, "float")), +@@ -76,12 +76,6 @@ class Args(object): + return self.check_args(self.set_defaults(args)) + + def check_args(self, args): +- # check allow_other and allow_root +- if args.allow_other: +- args.allow_root = False +- else: +- args.allow_root = True +- + # check log_level + if args.debug: + args.log_level = "debug" +@@ -182,7 +176,7 @@ class Args(object): + return "{}@{}".format(args.user, socket.gethostname()) + + def get_repo_path(self, args): +- return tempfile.mkdtemp(dir="/var/lib/gitfs") ++ return tempfile.mkdtemp(prefix="gitfs") + + def get_ssh_key(self, args): + return os.environ["HOME"] + "/.ssh/id_rsa" diff --git a/filesystems/gitfs/pkg-descr b/filesystems/gitfs/pkg-descr new file mode 100644 index 000000000000..ce7e2bf5144f --- /dev/null +++ b/filesystems/gitfs/pkg-descr @@ -0,0 +1,3 @@ +gitfs is a FUSE file system that fully integrates with git. You can +mount a remote repository's branch locally, and any subsequent changes +made to the files will be automatically committed to the remote. -- cgit v1.2.3