From ffc503fab767c9d2381f7152bcaab024a6358748 Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Sun, 10 Oct 2021 16:46:55 -0700 Subject: [PATCH] package/gocryptfs: new package Adds the gocryptfs encrypted FUSE filesystem. Currently uses without_openssl build tag, to use the native Go cryptography. However, the package could be improved by conditionally enabling openssl if it is also configured to be built by Buildroot. Signed-off-by: Christian Stewart Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/gocryptfs/Config.in | 12 ++++++++++++ package/gocryptfs/gocryptfs.hash | 3 +++ package/gocryptfs/gocryptfs.mk | 19 +++++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 package/gocryptfs/Config.in create mode 100644 package/gocryptfs/gocryptfs.hash create mode 100644 package/gocryptfs/gocryptfs.mk diff --git a/DEVELOPERS b/DEVELOPERS index 2e3500e788..259cace487 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -531,6 +531,7 @@ F: package/docker-proxy/ F: package/embiggen-disk/ F: package/fuse-overlayfs/ F: package/go/ +F: package/gocryptfs/ F: package/mbpfan/ F: package/mosh/ F: package/pkg-golang.mk diff --git a/package/Config.in b/package/Config.in index f127b6bf45..081268527c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -221,6 +221,7 @@ menu "Filesystem and flash utilities" source "package/genext2fs/Config.in" source "package/genpart/Config.in" source "package/genromfs/Config.in" + source "package/gocryptfs/Config.in" source "package/imx-usb-loader/Config.in" source "package/mmc-utils/Config.in" source "package/mtd/Config.in" diff --git a/package/gocryptfs/Config.in b/package/gocryptfs/Config.in new file mode 100644 index 0000000000..2630cafdcf --- /dev/null +++ b/package/gocryptfs/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_GOCRYPTFS + bool "gocryptfs" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + help + gocryptfs is an encrypted FUSE overlay filesystem. + + https://github.com/rfjakob/gocryptfs + +comment "gocryptfs needs a toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gocryptfs/gocryptfs.hash b/package/gocryptfs/gocryptfs.hash new file mode 100644 index 0000000000..94487815f5 --- /dev/null +++ b/package/gocryptfs/gocryptfs.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 4d89b76fe0b0c7218099f6f0ea6c1c87efe13927d95579a6ede82f20b6dbe48a gocryptfs-2.2.0.tar.gz +sha256 322a7e3b02cf18e38b7e6b18cafefb773df8676c65634b34e8a2beb931294a4b LICENSE diff --git a/package/gocryptfs/gocryptfs.mk b/package/gocryptfs/gocryptfs.mk new file mode 100644 index 0000000000..2a00e9a959 --- /dev/null +++ b/package/gocryptfs/gocryptfs.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# gocryptfs +# +################################################################################ + +GOCRYPTFS_VERSION = 2.2.0 +GOCRYPTFS_SITE = $(call github,rfjakob,gocryptfs,v$(GOCRYPTFS_VERSION)) +GOCRYPTFS_LICENSE = MIT +GOCRYPTFS_LICENSE_FILES = LICENSE + +GOCRYPTFS_GOMOD = github.com/rfjakob/gocryptfs/v2 + +GOCRYPTFS_LDFLAGS = \ + -X main.GitVersion=$(GOCRYPTFS_VERSION) \ + -X main.GitVersionFuse=[vendored] +GOCRYPTFS_TAGS = without_openssl + +$(eval $(golang-package))