commit:     0d6b5e3df96622f2b6b08b9338db1461ac0cf102
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Tue May  6 22:25:17 2025 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  7 22:51:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d6b5e3d

app-crypt/gocryptfs: add 2.5.4

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
From: https://github.com/gentoo/gentoo/pull/41970
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-crypt/gocryptfs/Manifest               |  1 +
 app-crypt/gocryptfs/gocryptfs-2.5.4.ebuild | 89 ++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/app-crypt/gocryptfs/Manifest b/app-crypt/gocryptfs/Manifest
index ce7e282f07aa..2923cfd4e693 100644
--- a/app-crypt/gocryptfs/Manifest
+++ b/app-crypt/gocryptfs/Manifest
@@ -1,2 +1,3 @@
 DIST gocryptfs_v2.4.0_src-deps.tar.gz 2927929 BLAKE2B 
e66e91506c5a7abb5413e8797f786145c436ca760e3c7157590ccb1c8430b2ac240b8ba1fd0ed3401ee4277a2e9ef6b8f3a9b3c52c22bac8e6b27b56350d9eec
 SHA512 
b46d6eee21a0194022a042d6ae2a737f221a0932bb899123438f2cf929ecb50635fcfc90012d6a04928fd4b2856d6e24d19392ce5aa87eea573fb58cf5a5d4e1
 DIST gocryptfs_v2.5.1_src-deps.tar.gz 2935982 BLAKE2B 
429b9ee986ad88156f36825c9b3420c361a717524f04c3dd2738c527de2faf49abe517c13903206531f6cf6678c331141cfb38013ece3814b939aedb2b5a34fb
 SHA512 
d35c76284b31e10c71eefac1abf20d0c46d3d3dcf8f45b0c745b829152bab9c2fe84b3a8f96ea04a96c2eeeb5554094a9e775cea25213187f8d9fa6403fbb61f
+DIST gocryptfs_v2.5.4_src-deps.tar.gz 3147352 BLAKE2B 
25eb141b06f7c191d49658913baba239af340ffcf9580b115d6191a844fdf012317a9db87a4f9f59c603efcffd77e5bde3f77e460d5d873ad6ccdb649e1584c4
 SHA512 
64523a7224676273ea5d375952eecccc6c03c813ef37429a90ee4c29add2cf69684e54c2a9d6113a9d84e315b03f9f85a72f8cd45d04aae2c63733ead08a3cf5

diff --git a/app-crypt/gocryptfs/gocryptfs-2.5.4.ebuild 
b/app-crypt/gocryptfs/gocryptfs-2.5.4.ebuild
new file mode 100644
index 000000000000..09ea171b20f0
--- /dev/null
+++ b/app-crypt/gocryptfs/gocryptfs-2.5.4.ebuild
@@ -0,0 +1,89 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+
+DESCRIPTION="Encrypted overlay filesystem written in Go"
+HOMEPAGE="https://github.com/rfjakob/gocryptfs";
+SRC_URI="https://github.com/rfjakob/gocryptfs/releases/download/v${PV}/${PN}_v${PV}_src-deps.tar.gz";
+S=${WORKDIR}/${PN}_v${PV}_src-deps
+
+LICENSE="MIT"
+# Vendored licenses
+LICENSE+=" Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+PROPERTIES="test_privileged"
+RESTRICT="test"
+
+RDEPEND="dev-libs/openssl:="
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pandoc"
+
+src_prepare() {
+       default
+       sed -e 's:ldd gocryptfs 2> /dev/null:! ldd gocryptfs | grep -q 
"statically linked":' \
+               -i "${S}/build-without-openssl.bash" || die
+
+       # Code linting not relevant downstream
+       sed -e 's/command -v shellcheck/false/' -e 's/\! go tool \| grep 
vet/false/' \
+               -i "${S}/test.bash" || die
+
+       local -A skip_tests=(
+               # cli_test.go:450: wrong exit code: want=12, have=20
+               ["TestMountPasswordIncorrect"]="tests/cli/cli_test.go"
+               # cli_test.go:467: want=9, got=20
+               ["TestMountPasswordEmpty"]="tests/cli/cli_test.go"
+               ["TestMountPasswordIncorrect"]="tests/cli/cli_test.go"
+               # ctlsock: listen unix 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp/gocryptfs-test-parent-0/3259013716/TestOrphanedSocket.572617384.sock:
 bind: invalid argument
+               # cli_test.go:1067: mount failed: exit status 20
+               ["TestEncryptPaths"]="gocryptfs-xray/xray_tests/xray_test.go"
+               ["TestOrphanedSocket"]="tests/cli/cli_test.go"
+               ["TestCtlSock"]="tests/defaults/ctlsock_test.go"
+               ["TestCtlSockDecrypt"]="tests/defaults/ctlsock_test.go"
+               ["TestCtlSockDecryptCrash"]="tests/defaults/ctlsock_test.go"
+               ["TestCtlSockPathOps"]="tests/reverse/ctlsock_test.go"
+               ["TestCtlSockCrash"]="tests/reverse/ctlsock_test.go"
+               ["TestSymlinkDentrySize"]="tests/reverse/correctness_test.go"
+               ["TestExcludeTestFs"]="tests/reverse/exclude_test.go"
+               ["TestExcludeAllOnlyDir1"]="tests/reverse/exclude_test.go"
+               # correctness_test.go:142: should NOT be executable
+               ["TestAccessVirtualDirIV"]="tests/reverse/correctness_test.go"
+               # issue893_test.go:54: mkdir 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp: permission denied
+               ["TestConcurrentUserOps"]="tests/root_test/issue893_test.go"
+               # root_test.go:86: mkdir 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp/gocryptfs-test-parent-0/932700816/default-plain/dir1/dir2:
 permission denied
+               # root_test.go:97: open 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp/gocryptfs-test-parent-0/932700816/default-plain/dir1/file1:
 permission denied
+               ["TestSupplementaryGroups"]="tests/root_test/root_test.go"
+               # root_test.go:158: mount: 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp/gocryptfs-test-parent-0/932700816/TestDiskFull.ext4.mnt:
 failed to setup loop device for 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp/gocryptfs-test-parent-0/932700816/TestDiskFull.ext4.
+               ["TestDiskFull"]="tests/root_test/root_test.go"
+               # root_test.go:281: O_RDONLY should have worked, but got error: 
permission denied
+               ["TestAcl"]="tests/root_test/root_test.go"
+               # root_test.go:340: mount: 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp/gocryptfs-test-parent-0/932700816/TestBtrfsQuirks.img.mnt:
 failed to setup loop device for 
/var/tmp/portage/app-crypt/gocryptfs-2.5.4/temp/gocryptfs-test-parent-0/932700816/TestBtrfsQuirks.img.
+               ["TestBtrfsQuirks"]="tests/root_test/root_test.go"
+       )
+
+       for test in "${!skip_tests[@]}"; do
+               sed -e "/^func ${test}(/ a      t.Skip(\"Skipped by Gentoo\")" 
-i ${skip_tests[$test]} || die
+       done
+
+       # Doesn't account for the vendor directory
+       sed -e 's|find .|find . -path ./vendor -prune -o|' -i test.bash || die
+}
+
+src_compile() {
+       emake build
+}
+
+src_test() {
+       emake test
+}
+
+src_install() {
+       emake "DESTDIR=${ED}" install
+       dobin contrib/statfs/statfs
+       doman Documentation/*.1
+       dodoc -r README.md Documentation
+       rm -f 
"${ED}"/usr/share/doc/${PF}/Documentation/{.gitignore,gocryptfs.1,gocryptfs-xray.1,statfs.1,MANPAGE-render.bash}
 || die
+}

Reply via email to