commit: f931d23ceba3b9565fe8d37fff231269ec9690a8 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Mon Jul 28 01:48:08 2025 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Aug 16 03:34:10 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f931d23c
app-crypt/gocryptfs: add 2.6.1 * Add verify-sig support https://nuetzlich.net/gocryptfs/releases/ * Drop pandoc dependency. Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/43201 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> app-crypt/gocryptfs/Manifest | 2 + app-crypt/gocryptfs/gocryptfs-2.6.1.ebuild | 105 +++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) diff --git a/app-crypt/gocryptfs/Manifest b/app-crypt/gocryptfs/Manifest index b78033b8d118..641e7bbae5a3 100644 --- a/app-crypt/gocryptfs/Manifest +++ b/app-crypt/gocryptfs/Manifest @@ -1,2 +1,4 @@ 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 +DIST gocryptfs_v2.6.1_src-deps.tar.gz 3166951 BLAKE2B fe3eb4f029f7fbad7dcafd55c99a55c2daf41ba37e6f88d24e1a82f3ba8c4892236ac9b78ec3753d4994f2d23ae3a3e1d2dba22ec8c84a3ad3851a078e063500 SHA512 ec8a8011a355656c1f242269fcc1559c537e880342e4f71a956a63ac72e47f2d9fea45f6ef308d420282725eb5bd4780f0cd645d137bb6beecb97a9c93b448fb +DIST gocryptfs_v2.6.1_src-deps.tar.gz.asc 833 BLAKE2B b4aee2b7b2b1989fab6ef66ac2f8e91f8e52d009e5a276e4799b317791d24964b367abdae0b1df96ef834bcfd16eb29b6f7bed7bd371941c2884e3898ff37af3 SHA512 318c131a1345dc36574170b4d208515c5fb101bfc04dbc3e57f136cb1b138aa33e458fe7bd04efcd15f51c0e397280e4a4a62b9a7676832206bcb9c510257991 diff --git a/app-crypt/gocryptfs/gocryptfs-2.6.1.ebuild b/app-crypt/gocryptfs/gocryptfs-2.6.1.ebuild new file mode 100644 index 000000000000..0c63546fb157 --- /dev/null +++ b/app-crypt/gocryptfs/gocryptfs-2.6.1.ebuild @@ -0,0 +1,105 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gocryptfs.asc +inherit go-module verify-sig + +DESCRIPTION="Encrypted overlay filesystem written in Go" +HOMEPAGE="https://github.com/rfjakob/gocryptfs" +# https://nuetzlich.net/gocryptfs/releases/ +SRC_URI=" + https://github.com/rfjakob/gocryptfs/releases/download/v${PV}/${PN}_v${PV}_src-deps.tar.gz + verify-sig? ( https://github.com/rfjakob/gocryptfs/releases/download/v${PV}/gocryptfs_v${PV}_src-deps.tar.gz.asc ) +" +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="verify-sig? ( sec-keys/openpgp-keys-gocryptfs )" + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/gocryptfs_v${PV}_src-deps.tar.gz{,.asc} + fi + go-module_src_unpack +} + +src_prepare() { + default + + # 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" + # 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 ${T}/gocryptfs-test-parent-0/932700816/default-plain/dir1/dir2: permission denied + # root_test.go:97: open ${T}/gocryptfs-test-parent-0/932700816/default-plain/dir1/file1: permission denied + ["TestSupplementaryGroups"]="tests/root_test/root_test.go" + # root_test.go:158: mount: ${T}/gocryptfs-test-parent-0/932700816/TestDiskFull.ext4.mnt: + # failed to setup loop device for ${T}/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: ${T}/gocryptfs-test-parent-0/932700816/TestBtrfsQuirks.img.mnt: + # failed to setup loop device for ${T}/gocryptfs-test-parent-0/932700816/TestBtrfsQuirks.img. + ["TestBtrfsQuirks"]="tests/root_test/btrfs_test.go" + # requires root + ["TestRootForceOwner"]="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() { + # call directly to avoid pandoc dependency. The man pages are included in the upstream tarballs + # https://github.com/rfjakob/gocryptfs/commit/61940a9c0666eba8be21de4f1cd182912f74f929 + ./build.bash || die +} + +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 +}
