From owner-dev-commits-ports-main@freebsd.org Sun Jul 4 13:05:49 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32F5B664D18; Sun, 4 Jul 2021 13:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHpwF0gtCz55fJ; Sun, 4 Jul 2021 13:05:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF4A31342B; Sun, 4 Jul 2021 13:05:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164D5mVo016746; Sun, 4 Jul 2021 13:05:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164D5mO3016745; Sun, 4 Jul 2021 13:05:48 GMT (envelope-from git) Date: Sun, 4 Jul 2021 13:05:48 GMT Message-Id: <202107041305.164D5mO3016745@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: c46bf2783f0f - main - sysutils/fusefs-unreliablefs: Add new port MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c46bf2783f0f8c44e83daf1d74e2c63b0788b040 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 13:05:49 -0000 The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/ports/commit/?id=c46bf2783f0f8c44e83daf1d74e2c63b0788b040 commit c46bf2783f0f8c44e83daf1d74e2c63b0788b040 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-07-04 13:03:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-07-04 13:05:30 +0000 sysutils/fusefs-unreliablefs: Add new port UnreliableFS is a FUSE-based fault injection filesystem that allows to change fault-injections in runtime using simple configuration file. Supported fault injections are: - errinj_errno - return error value and set random errno. - errinj_kill_caller - send SIGKILL to a process that invoked file operation. - errinj_noop - replace file operation with no operation (similar to libeatmydata, but applicable to any file operation). - errinj_slowdown - slowdown invoked file operation. WWW: https://github.com/ligurio/unreliablefs --- sysutils/Makefile | 1 + sysutils/fusefs-unreliablefs/Makefile | 48 ++++++++++++++++++++++++++++++++++ sysutils/fusefs-unreliablefs/distinfo | 3 +++ sysutils/fusefs-unreliablefs/pkg-descr | 12 +++++++++ 4 files changed, 64 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 28918d81b7de..3a497f333125 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -419,6 +419,7 @@ SUBDIR += fusefs-squashfuse SUBDIR += fusefs-sshfs SUBDIR += fusefs-unionfs + SUBDIR += fusefs-unreliablefs SUBDIR += fusefs-webdavfs SUBDIR += fusefs-zip SUBDIR += fvcool diff --git a/sysutils/fusefs-unreliablefs/Makefile b/sysutils/fusefs-unreliablefs/Makefile new file mode 100644 index 000000000000..04af2f19a895 --- /dev/null +++ b/sysutils/fusefs-unreliablefs/Makefile @@ -0,0 +1,48 @@ +PORTNAME= unreliablefs +DISTVERSION= 0.1.0 +CATEGORIES= sysutils +PKGNAMEPREFIX= fusefs- + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= FUSE-based fault injection filesystem + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= fusefs-libs>=0:fusefs-libs +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \ + fio:benchmarks/fio + +USES= cmake:testing fuse pkgconfig python:env +USE_CSTD= c11 +USE_GITHUB= yes +GH_ACCOUNT= ligurio + +CFLAGS+= -fcommon + +PLIST_FILES= bin/${PORTNAME} \ + share/man/man1/${PORTNAME}.1.gz \ + share/man/man5/${PORTNAME}.conf.5.gz + +post-patch: +# Upstream hardcodes FreeBSD release versions in order to skip some tests. We +# need to adjust those to values as not all supported FreeBSD releases are +# listed there. + ${REINPLACE_CMD} 's|freebsd12|freebsd${OSREL:R}|' \ + ${WRKSRC}/tests/util.py \ + ${WRKSRC}/tests/test_unreliablefs.py + +do-install: + ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1 + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.conf.5 ${STAGEDIR}${PREFIX}/share/man/man5 + +do-test: +# The test suite assumes that the binaries are available in the ${WRKSRC}/build +# directory, which is not the case here. + ${MKDIR} ${WRKSRC}/build/tests + ${RLN} ${INSTALL_WRKSRC}/${PORTNAME} ${WRKSRC}/build/ + ${RLN} ${INSTALL_WRKSRC}/tests/fsx ${WRKSRC}/build/tests + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest --verbose -rxXs tests/ + +.include diff --git a/sysutils/fusefs-unreliablefs/distinfo b/sysutils/fusefs-unreliablefs/distinfo new file mode 100644 index 000000000000..99a0f35a7897 --- /dev/null +++ b/sysutils/fusefs-unreliablefs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1625398764 +SHA256 (ligurio-unreliablefs-0.1.0_GH0.tar.gz) = 4fc13b4cc4e947c72bd02c891b3be135083d57fba245a35808f9b2e039574074 +SIZE (ligurio-unreliablefs-0.1.0_GH0.tar.gz) = 33789 diff --git a/sysutils/fusefs-unreliablefs/pkg-descr b/sysutils/fusefs-unreliablefs/pkg-descr new file mode 100644 index 000000000000..77ecbe61d4e7 --- /dev/null +++ b/sysutils/fusefs-unreliablefs/pkg-descr @@ -0,0 +1,12 @@ +UnreliableFS is a FUSE-based fault injection filesystem that allows to change +fault-injections in runtime using simple configuration file. + +Supported fault injections are: + +- errinj_errno - return error value and set random errno. +- errinj_kill_caller - send SIGKILL to a process that invoked file operation. +- errinj_noop - replace file operation with no operation (similar to + libeatmydata, but applicable to any file operation). +- errinj_slowdown - slowdown invoked file operation. + +WWW: https://github.com/ligurio/unreliablefs