Skip to contentSkip to conversation

package/fscrypt: new package

PATCH New dusan.ivanco at gmail.com 2 participants 2 messages May 7, 2021 – May 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/fscrypt: new package

From: Du?an Ivan?o <[email protected]>

---
 package/Config.in            |  1 +
 package/fscrypt/Config.in    | 11 +++++++++++
 package/fscrypt/fscrypt.hash |  3 +++
 package/fscrypt/fscrypt.mk   | 27 +++++++++++++++++++++++++++
 4 files changed, 42 insertions(+)
 create mode 100644 package/fscrypt/Config.in
 create mode 100644 package/fscrypt/fscrypt.hash
 create mode 100644 package/fscrypt/fscrypt.mk
package/Config.in +1 -0
index 6888e824a0..bbb31a66dc 100644
@@ -210,6 +210,7 @@ menu "Filesystem and flash utilities"
 	source "package/exfatprogs/Config.in"
 	source "package/f2fs-tools/Config.in"
 	source "package/flashbench/Config.in"
+	source "package/fscrypt/Config.in"
 	source "package/fscryptctl/Config.in"
 	source "package/fuse-overlayfs/Config.in"
 	source "package/fwup/Config.in"
package/fscrypt/Config.in new file +11 -0
new file mode 100644
index 0000000000..17abe021af
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_FSCRYPT
+	bool "fscrypt"
+	depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_LINUX_PAM
+	help
+	  fscrypt is a high-level tool for the
+	  management of Linux filesystem encryption
+
+	  https://github.com/google/fscrypt
package/fscrypt/fscrypt.hash new file +3 -0
new file mode 100644
index 0000000000..7a50a55015
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 0d6e79ef73c996f9cab2436fd3f446bb89a2d2b36b64a97743d6274d6445e922  fscrypt-0.3.0.tar.gz
+sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
package/fscrypt/fscrypt.mk new file +27 -0
new file mode 100644
index 0000000000..2f67f2ed75
@@ -0,0 +1,27 @@
+################################################################################
+#
+# fscrypt
+#
+################################################################################
+
+FSCRYPT_VERSION = 0.3.0
+FSCRYPT_SITE = $(call github,google,fscrypt,v$(FSCRYPT_VERSION))
+FSCRYPT_LICENSE = Apache-2.0
+FSCRYPT_LICENSE_FILES = LICENSE
+FSCRYPT_DEPENDENCIES = host-go linux-pam
+FSCRYPT_MAKE_ENV = GOOS=linux GOARCH=arm CGO_ENABLED=1
+
+define FSCRYPT_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FS_ENCRYPTION)
+endef
+
+define FSCRYPT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(FSCRYPT_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define FSCRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/bin/fscrypt $(TARGET_DIR)/usr/bin
+	$(INSTALL) -D -m 0755 $(@D)/bin/pam_fscrypt.so $(TARGET_DIR)/usr/lib/security
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.21.1 (Apple Git-122.3)
#1 lore raw

PATCH 1/1 package/fscrypt: new package

Du?an, All,

On 2021-05-07 21:19 +0200, dusan.ivanco at gmail.com spake thusly:

Quoted 2 lines

From: Du?an Ivan?o <[email protected]>
---

[--SNIP--]

package/fscrypt/Config.in line 6

Quoted 12 lines
package/fscrypt/Config.in new file +6 -0
new file mode 100644
index 0000000000..17abe021af
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_FSCRYPT
+	bool "fscrypt"
+	depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_LINUX_PAM

linux-pam has dependencies; you must propagate them here (as I just explained in your raspi2fb patch).

[--SNIP--]

Quoted 23 lines
package/fscrypt/fscrypt.mk new file +17 -0
new file mode 100644
index 0000000000..2f67f2ed75
@@ -0,0 +1,27 @@
+################################################################################
+#
+# fscrypt
+#
+################################################################################
+
+FSCRYPT_VERSION = 0.3.0
+FSCRYPT_SITE = $(call github,google,fscrypt,v$(FSCRYPT_VERSION))
+FSCRYPT_LICENSE = Apache-2.0
+FSCRYPT_LICENSE_FILES = LICENSE
+FSCRYPT_DEPENDENCIES = host-go linux-pam
+FSCRYPT_MAKE_ENV = GOOS=linux GOARCH=arm CGO_ENABLED=1
+
+define FSCRYPT_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FS_ENCRYPTION)
+endef
+

package/fscrypt/fscrypt.mk line 27

Quoted 10 lines
package/fscrypt/fscrypt.mk new file +10 -0
+define FSCRYPT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(FSCRYPT_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define FSCRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/bin/fscrypt $(TARGET_DIR)/usr/bin
+	$(INSTALL) -D -m 0755 $(@D)/bin/pam_fscrypt.so $(TARGET_DIR)/usr/lib/security
+endef
+
+$(eval $(generic-package))

I haven't reviewed the package in details, but here I wonder why you are using the generic-package infrastructure, when the package is written in Go and we have an infrastructure dedicated to Go packages:

https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_go_packages

Can you revisit your package and see if you can make use of the go-pacakge infra instead? If this is not possible, please expand the commit log to explain why.

Thanks!

Regards,
Yann E. MORIN.

Quoted 7 lines
Signature · 6 lines
2.21.1 (Apple Git-122.3)

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'