Skip to contentSkip to conversation

ecryptfs-utils: new package

PATCH New Marcin Bis 3 participants 6 messages May 31, 2013 – Jun 2, 2013

lore
Share & tools
lore

Marcin Bis

author
#0 lore raw

PATCH 1/1 ecryptfs-utils: new package

Hi

The following patch adds support for ecryptfs-utils.
http://ecryptfs.org/

---
 package/Config.in                        |    1 +
 package/ecryptfs-utils/Config.in         |   18 ++++++++++++++++++
 package/ecryptfs-utils/ecryptfs-utils.mk |   25 +++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 0 deletions(-)
package/Config.in +1 -0
index d980871..54711c8 100644
@@ -194,6 +194,7 @@ source "package/cramfs/Config.in"
 source "package/curlftpfs/Config.in"
 source "package/dosfstools/Config.in"
 source "package/e2fsprogs/Config.in"
+source "package/ecryptfs-utils/Config.in"
 source "package/exfat/Config.in"
 source "package/exfat-utils/Config.in"
 source "package/f2fs-tools/Config.in"
package/ecryptfs-utils/Config.in new file +18 -0
new file mode 100644
index 0000000..b1b2ec0
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_ECRYPTFS_UTILS
+    bool "ecryptfs-utils"
+    select BR2_PACKAGE_KEYUTILS
+    select BR2_PACKAGE_LIBNSS
+    help
+      eCryptfs is a POSIX-compliant enterprise cryptographic
+      filesystem for Linux. It is stacked on top of any other
+      Linux filesystem, it stores cryptographic metadata in the header
+      of each file written.
+
+      The eCryptfs kernel module is available in all Linux kernels
+      since version 2.6.19. This package provides userspace utilities
+      needed to mount eCryptfs.
+
+      Files are encrypted using a passphrase. Consider building openssl
+      for another method.
+
+      http://ecryptfs.org
(quoted diff) +0 -0

b/package/ecryptfs-utils/ecryptfs-utils.mk
new file mode 100644
index 0000000..8c656ba

package/ecryptfs-utils/ecryptfs-utils.mk new file +8 -0
@@ -0,0 +1,25 @@
+#############################################################
+#
+# ecryptfs-utils
+#
+##############################################################
+
+ECRYPTFS_UTILS_VERSION         = 103
+ECRYPTFS_UTILS_SOURCE          =

ecryptfs-utils_$(ECRYPTFS_UTILS_VERSION).orig.tar.gz
+ECRYPTFS_UTILS_SITE =
https://launchpad.net/ecryptfs/trunk/$(ECRYPTFS_UTILS_VERSION)/+download
+ECRYPTFS_UTILS_LICENSE = GPLv2+
+ECRYPTFS_UTILS_LICENSE_FILES = COPYING
+
+ECRYPTFS_UTILS_DEPENDENCIES = keyutils libnss
+ECRYPTFS_UTILS_CONF_OPT += --disable-pywrap --disable-pam --disable-nls
+
+#Needed for build system to find pk11func.h and libnss3.so +ECRYPTFS_UTILS_CONF_ENV += NSS_CFLAGS="-I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr" \
+ NSS_LIBS="-lnss3"
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+ #openssl will be found by configure
+ ECRYPTFS_UTILS_DEPENDENCIES += openssl
+endif
+
+$(eval $(autotools-package))

#1 lore raw

PATCH 1/1 ecryptfs-utils: new package

Dear Marcin Bis,

Thanks!

Your patch is line-wrapped, could you use 'git send-email' to send patches? More comments below.

package/ecryptfs-utils/Config.in line 4

Quoted 10 lines · Marcin Bis
package/ecryptfs-utils/Config.in new file +4 -0
new file mode 100644
index 0000000..b1b2ec0
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_ECRYPTFS_UTILS
+    bool "ecryptfs-utils"
+    select BR2_PACKAGE_KEYUTILS
+    select BR2_PACKAGE_LIBNSS

You need to propagate the dependencies of libnss and keyutils here, so:

	depends on BR2_USE_MMU # keyutils
	depends on !BR2_avr32 && !BR2_microblaze # keyutils
	depends on BR2_LARGEFILE # libnss
	depends on BR2_TOOLCHAIN_HAS_THREADS # libnss -> libnspr

and then, add a comment like:

comment "ecryptfs-utils requires a toolchain with largefile and thread support"

	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS

package/ecryptfs-utils/Config.in line 5

Quoted 1 line
package/ecryptfs-utils/Config.in new file +1 -0
+    help

Indentation should be one tab here.

package/ecryptfs-utils/Config.in line 18

Quoted 13 lines
package/ecryptfs-utils/Config.in new file +13 -0
+      eCryptfs is a POSIX-compliant enterprise cryptographic
+      filesystem for Linux. It is stacked on top of any other
+      Linux filesystem, it stores cryptographic metadata in the header
+      of each file written.
+
+      The eCryptfs kernel module is available in all Linux kernels
+      since version 2.6.19. This package provides userspace utilities
+      needed to mount eCryptfs.
+
+      Files are encrypted using a passphrase. Consider building openssl
+      for another method.
+
+      http://ecryptfs.org

And one tab + two spaces here.

Quoted 18 lines
package/ecryptfs-utils/ecryptfs-utils.mk new file +8 -0
new file mode 100644
index 0000000..8c656ba
@@ -0,0 +1,25 @@
+#############################################################
+#
+# ecryptfs-utils
+#
+##############################################################
+
+ECRYPTFS_UTILS_VERSION         = 103
+ECRYPTFS_UTILS_SOURCE          =

ecryptfs-utils_$(ECRYPTFS_UTILS_VERSION).orig.tar.gz
+ECRYPTFS_UTILS_SITE =
https://launchpad.net/ecryptfs/trunk/$(ECRYPTFS_UTILS_VERSION)/+download

package/ecryptfs-utils/ecryptfs-utils.mk

Quoted 4 lines
package/ecryptfs-utils/ecryptfs-utils.mk new file +4 -0
+ECRYPTFS_UTILS_LICENSE         = GPLv2+
+ECRYPTFS_UTILS_LICENSE_FILES   = COPYING
+
+ECRYPTFS_UTILS_DEPENDENCIES    = keyutils libnss

Apparently, ecryptfs-utils can be built without libnss, and use gcrypt instead. Maybe it would be worth supporting this possibility. But it's not mandatory to get your patch accepted.

Quoted 1 line

+ECRYPTFS_UTILS_CONF_OPT += --disable-pywrap --disable-pam --disable-nls

No need for the += here.

Please don't pass --disable-nls. It will be passed automatically when locale support is not enabled.

package/ecryptfs-utils/ecryptfs-utils.mk

Quoted 10 lines
package/ecryptfs-utils/ecryptfs-utils.mk new file +2 -0
+#Needed for build system to find pk11func.h and libnss3.so
+ECRYPTFS_UTILS_CONF_ENV +=

NSS_CFLAGS="-I$(STAGING_DIR)/usr/include/nss

package/ecryptfs-utils/ecryptfs-utils.mk new file +6 -1
-I$(STAGING_DIR)/usr/include/nspr" \
+    NSS_LIBS="-lnss3"
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+    #openssl will be found by configure
+    ECRYPTFS_UTILS_DEPENDENCIES += openssl
+endif

Please disable explicitly openssl support when it's not available, to make sure it doesn't mis-detect the OpenSSL for the host. So, something like:

ifeq ($(BR2_PACKAGE_OPENSSL),y)

	ECRYPTFS_UTILS_CONF_OPT += --enable-openssl
	ECRYPTFS_UTILS_DEPENDENCIES += openssl
else
	ECRYPTFS_UTILS_CONF_OPT += --disable-openssl

endif

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
author
#2 lore raw

PATCH 1/1 ecryptfs-utils: new package

Thank you, I will fix it and resend.

Quoted 5 lines · Thomas Petazzoni
Quoted 1 line

+ECRYPTFS_UTILS_DEPENDENCIES = keyutils libnss

Apparently, ecryptfs-utils can be built without libnss, and use gcrypt instead. Maybe it would be worth supporting this possibility. But it's not mandatory to get your patch accepted.

I have got a problem trying to build it with gcrypt instead of nss.

The dependencies seems to be hard-coded:
http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/libecryptfs/main.c#L24
nss.h and pk11func.h are provided only by libnss. (and libecryptfs is essential for mount.ecryptfs to work)

Foud this one too: https://bugs.launchpad.net/ecryptfs/+bug/1072643
--
Marcin Bis

#3 lore raw

PATCH 1/1 ecryptfs-utils: new package

Dear Marcin Bis,

Quoted 4 lines · Marcin Bis
Quoted 3 lines

Apparently, ecryptfs-utils can be built without libnss, and use gcrypt instead. Maybe it would be worth supporting this possibility. But it's not mandatory to get your patch accepted.

Quoted 8 lines

I have got a problem trying to build it with gcrypt instead of nss.

The dependencies seems to be hard-coded:
http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/libecryptfs/main.c#L24
nss.h and pk11func.h are provided only by libnss. (and libecryptfs is essential for mount.ecryptfs to work)

Foud this one too: https://bugs.launchpad.net/ecryptfs/+bug/1072643

Is this case, no problem, just submit something like you did, which depends on NSS only. If someone cares enough to make it work with gcrypt, this someone will fix it.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
author
#4 lore raw

PATCH v2 1/1 ecryptfs-utils: new package

The following patch adds support for ecryptfs-utils.
http://ecryptfs.org/

---
 package/Config.in                        |    1 +
 package/ecryptfs-utils/Config.in         |   22 ++++++++++++++++++++++
 package/ecryptfs-utils/ecryptfs-utils.mk |   28 ++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 package/ecryptfs-utils/Config.in
 create mode 100644 package/ecryptfs-utils/ecryptfs-utils.mk
package/Config.in +1 -0
index d980871..54711c8 100644
@@ -194,6 +194,7 @@ source "package/cramfs/Config.in"
 source "package/curlftpfs/Config.in"
 source "package/dosfstools/Config.in"
 source "package/e2fsprogs/Config.in"
+source "package/ecryptfs-utils/Config.in"
 source "package/exfat/Config.in"
 source "package/exfat-utils/Config.in"
 source "package/f2fs-tools/Config.in"
package/ecryptfs-utils/Config.in new file +22 -0
new file mode 100644
index 0000000..8f89e75
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_ECRYPTFS_UTILS
+	bool "ecryptfs-utils"
+	select BR2_PACKAGE_KEYUTILS
+	select BR2_PACKAGE_LIBNSS
+	depends on BR2_USE_MMU # keyutils
+	depends on !BR2_avr32 && !BR2_microblaze # keyutils
+	depends on BR2_LARGEFILE # libnss
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libnss -> libnspr
+	help
+	  eCryptfs is a POSIX-compliant enterprise cryptographic
+	  filesystem for Linux. It is stacked on top of any other
+	  Linux filesystem, it stores cryptographic metadata in the header
+	  of each file written.
+	  
+	  The eCryptfs kernel module is available in all Linux kernels
+	  since version 2.6.19. This package provides userspace utilities
+	  needed to mount eCryptfs.
+	  
+	  Files are encrypted using a passpthase. Consider building openssl
+	  for another method.
+	  
+	  http://ecryptfs.org
package/ecryptfs-utils/ecryptfs-utils.mk new file +28 -0
new file mode 100644
index 0000000..32b509f
@@ -0,0 +1,28 @@
+#############################################################
+#
+# ecryptfs-utils
+#
+##############################################################
+
+ECRYPTFS_UTILS_VERSION         = 103
+ECRYPTFS_UTILS_SOURCE          = ecryptfs-utils_$(ECRYPTFS_UTILS_VERSION).orig.tar.gz
+ECRYPTFS_UTILS_SITE            = https://launchpad.net/ecryptfs/trunk/$(ECRYPTFS_UTILS_VERSION)/+download
+ECRYPTFS_UTILS_LICENSE         = GPLv2+
+ECRYPTFS_UTILS_LICENSE_FILES   = COPYING
+
+ECRYPTFS_UTILS_DEPENDENCIES    = keyutils libnss
+ECRYPTFS_UTILS_CONF_OPT        = --disable-pywrap --disable-pam
+
+#Needed for build system to find pk11func.h and libnss3.so
+ECRYPTFS_UTILS_CONF_ENV = \
+  NSS_CFLAGS="-I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr" \
+  NSS_LIBS="-lnss3"
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+	ECRYPTFS_UTILS_CONF_OPT += --enable-openssl
+	ECRYPTFS_UTILS_DEPENDENCIES += openssl
+else
+	ECRYPTFS_UTILS_CONF_OPT += --disable-openssl
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.2.5
#5 lore raw

PATCH v2 1/1 ecryptfs-utils: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Marcin" == Marcin Bis <[email protected]> writes:

Marcin> The following patch adds support for ecryptfs-utils. Marcin> http://ecryptfs.org/

Marcin> Signed-off-by: Marcin Bis <[email protected]> Marcin> ---

 Marcin>  package/Config.in                        |    1 +
 Marcin>  package/ecryptfs-utils/Config.in         |   22 ++++++++++++++++++++++
 Marcin>  package/ecryptfs-utils/ecryptfs-utils.mk |   28 ++++++++++++++++++++++++++++
 Marcin>  3 files changed, 51 insertions(+), 0 deletions(-)
 Marcin>  create mode 100644 package/ecryptfs-utils/Config.in
 Marcin>  create mode 100644 package/ecryptfs-utils/ecryptfs-utils.mk

Marcin> diff --git a/package/Config.in b/package/Config.in Marcin> index d980871..54711c8 100644
Marcin> --- a/package/Config.in
Marcin> +++ b/package/Config.in
Marcin> @@ -194,6 +194,7 @@ source "package/cramfs/Config.in"

 Marcin>  source "package/curlftpfs/Config.in"
 Marcin>  source "package/dosfstools/Config.in"
 Marcin>  source "package/e2fsprogs/Config.in"
 Marcin> +source "package/ecryptfs-utils/Config.in"
 Marcin>  source "package/exfat/Config.in"
 Marcin>  source "package/exfat-utils/Config.in"
 Marcin>  source "package/f2fs-tools/Config.in"
 Marcin> diff --git a/package/ecryptfs-utils/Config.in b/package/ecryptfs-utils/Config.in
 Marcin> new file mode 100644
 Marcin> index 0000000..8f89e75
 Marcin> --- /dev/null
 Marcin> +++ b/package/ecryptfs-utils/Config.in
 Marcin> @@ -0,0 +1,22 @@
 Marcin> +config BR2_PACKAGE_ECRYPTFS_UTILS
 Marcin> +	bool "ecryptfs-utils"
 Marcin> +	select BR2_PACKAGE_KEYUTILS
 Marcin> +	select BR2_PACKAGE_LIBNSS
 Marcin> +	depends on BR2_USE_MMU # keyutils
 Marcin> +	depends on !BR2_avr32 && !BR2_microblaze # keyutils
 Marcin> +	depends on BR2_LARGEFILE # libnss
 Marcin> +	depends on BR2_TOOLCHAIN_HAS_THREADS # libnss -> libnspr
 Marcin> +	help
 Marcin> +	  eCryptfs is a POSIX-compliant enterprise cryptographic
 Marcin> +	  filesystem for Linux. It is stacked on top of any other
 Marcin> +	  Linux filesystem, it stores cryptographic metadata in the header
 Marcin> +	  of each file written.
 Marcin> +	  
 Marcin> +	  The eCryptfs kernel module is available in all Linux kernels
 Marcin> +	  since version 2.6.19. This package provides userspace utilities
 Marcin> +	  needed to mount eCryptfs.

Marcin> +
Marcin> + Files are encrypted using a passpthase. Consider building openssl

s/passthase/passphrase/

Marcin> + for another method.
Marcin> +
Marcin> + http://ecryptfs.org
Marcin> diff --git a/package/ecryptfs-utils/ecryptfs-utils.mk b/package/ecryptfs-utils/ecryptfs-utils.mk Marcin> new file mode 100644
Marcin> index 0000000..32b509f
Marcin> --- /dev/null
Marcin> +++ b/package/ecryptfs-utils/ecryptfs-utils.mk
Marcin> @@ -0,0 +1,28 @@
Marcin> +#############################################################
Marcin> +#
Marcin> +# ecryptfs-utils
Marcin> +#
Marcin> +##############################################################
Marcin> +

 Marcin> +ECRYPTFS_UTILS_VERSION         = 103
 Marcin> +ECRYPTFS_UTILS_SOURCE          = ecryptfs-utils_$(ECRYPTFS_UTILS_VERSION).orig.tar.gz
 Marcin> +ECRYPTFS_UTILS_SITE            = https://launchpad.net/ecryptfs/trunk/$(ECRYPTFS_UTILS_VERSION)/+download
 Marcin> +ECRYPTFS_UTILS_LICENSE         = GPLv2+
 Marcin> +ECRYPTFS_UTILS_LICENSE_FILES   = COPYING

Marcin> +
Marcin> +ECRYPTFS_UTILS_DEPENDENCIES = keyutils libnss

It also needs host-intltool, and >= 0.41, so I had to bump our intltool package.

Committed with these fixes, thanks.

Signature · 1 line
Bye, Peter Korsgaard