git: ddef0735eee9 - main - security/py-dirhash: New port: Python module and CLI for hashing of file system directories
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 Apr 2023 02:27:33 UTC
The branch main has been updated by acm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=ddef0735eee94237922e0e7b76d3f1566f5d10fb
commit ddef0735eee94237922e0e7b76d3f1566f5d10fb
Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2023-04-20 02:26:22 +0000
Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2023-04-20 02:26:22 +0000
security/py-dirhash: New port: Python module and CLI for hashing of file system directories
A lightweight python module and CLI for computing the hash of any directory
based on its files structure and content.
- Supports all hashing algorithms of Python's built-in hashlib module.
- Glob/wildcard (".gitignore style") path matching for expressive filtering of
files to include/exclude.
- Multiprocessing for up to 6x speed-up
The hash is computed according to the Dirhash Standard, which is designed to
allow for consistent and collision resistant generation/verification of
directory hashes across implementations.
---
security/Makefile | 1 +
security/py-dirhash/Makefile | 19 +++++++++++++++++++
security/py-dirhash/distinfo | 3 +++
security/py-dirhash/pkg-descr | 11 +++++++++++
4 files changed, 34 insertions(+)
diff --git a/security/Makefile b/security/Makefile
index a2aedd6eeacc..624766505d37 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -889,6 +889,7 @@
SUBDIR += py-dfdatetime
SUBDIR += py-dfvfs
SUBDIR += py-dfwinreg
+ SUBDIR += py-dirhash
SUBDIR += py-django-auth-kerberos
SUBDIR += py-docker-pycreds
SUBDIR += py-ecdsa
diff --git a/security/py-dirhash/Makefile b/security/py-dirhash/Makefile
new file mode 100644
index 000000000000..5049e4526725
--- /dev/null
+++ b/security/py-dirhash/Makefile
@@ -0,0 +1,19 @@
+PORTNAME= dirhash
+DISTVERSION= 0.2.1
+CATEGORIES= security python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= acm@FreeBSD.org
+COMMENT= Python module and CLI for hashing of file system directories
+WWW= https://github.com/andhus/dirhash-python
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scantree>0:devel/py-scantree@${PY_FLAVOR}
+
+USES= python:3.7+
+USE_PYTHON= autoplist distutils
+
+.include <bsd.port.mk>
diff --git a/security/py-dirhash/distinfo b/security/py-dirhash/distinfo
new file mode 100644
index 000000000000..b9b4aa70f713
--- /dev/null
+++ b/security/py-dirhash/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1681956003
+SHA256 (dirhash-0.2.1.tar.gz) = 31bf8192fbb6e09a2a7ff4de31b9eb127c58545af22125ca1fa67c91c8e2d898
+SIZE (dirhash-0.2.1.tar.gz) = 13833
diff --git a/security/py-dirhash/pkg-descr b/security/py-dirhash/pkg-descr
new file mode 100644
index 000000000000..b9f6cbf20ec7
--- /dev/null
+++ b/security/py-dirhash/pkg-descr
@@ -0,0 +1,11 @@
+A lightweight python module and CLI for computing the hash of any directory
+based on its files structure and content.
+
+- Supports all hashing algorithms of Python's built-in hashlib module.
+- Glob/wildcard (".gitignore style") path matching for expressive filtering of
+ files to include/exclude.
+- Multiprocessing for up to 6x speed-up
+
+The hash is computed according to the Dirhash Standard, which is designed to
+allow for consistent and collision resistant generation/verification of
+directory hashes across implementations.