Skip to contentSkip to conversation

git-crypt: new package

PATCH Superseded Francesco Negri 4 participants 13 messages Jan 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-crypt: new package

---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      |  9 +++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 21 +++++++++++++++++++++
 4 files changed, 33 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
 	source "package/gawk/Config.in"
 	source "package/gettext/Config.in"
 	source "package/git/Config.in"
+	source "package/git-crypt/Config.in"
 	source "package/gperf/Config.in"
 	source "package/grep/Config.in"
 	source "package/jq/Config.in"
package/git-crypt/Config.in new file +9 -0
new file mode 100644
index 000000000..15a12b5c6
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_GIT_CRYPT
+	bool "git-crypt"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_GIT
+	help
+	  git-crypt enables transparent encryption and decryption of files in a
+	  git repository.
+
+	  https://github.com/AGWA/git-crypt
package/git-crypt/git-crypt.hash new file +2 -0
new file mode 100644
index 000000000..fe18498cc
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 5150144a528bc74eeb47a2884cf2fefe978a1d1dc0223bbfcac395fa6a73a410 git-crypt-0.5.0.tar.gz
package/git-crypt/git-crypt.mk new file +21 -0
new file mode 100644
index 000000000..9f7df223d
@@ -0,0 +1,21 @@
+################################################################################
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+GIT_CRYPT_SITE = $(call github,agwa,git-crypt,$(GIT_CRYPT_VERSION))
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3
+GIT_CRYPT_LICENSE_FILES = COPYING
+
+define GIT_CRYPT_BUILD_CMDS
+	$(MAKE) CXX="$(TARGET_CXX)" -C $(@D) all
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 git-crypt: new package

Hi Francesco,

Quoted 29 lines · Francesco Negri
---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      |  9 +++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 21 +++++++++++++++++++++
 4 files changed, 33 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
 	source "package/gawk/Config.in"
 	source "package/gettext/Config.in"
 	source "package/git/Config.in"
+	source "package/git-crypt/Config.in"
 	source "package/gperf/Config.in"
 	source "package/grep/Config.in"
 	source "package/jq/Config.in"
package/git-crypt/Config.in new file +0 -0
new file mode 100644
index 000000000..15a12b5c6

package/git-crypt/Config.in line 4

Quoted 4 lines
package/git-crypt/Config.in new file +4 -0
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_GIT_CRYPT
+	bool "git-crypt"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_GIT

You should also propagate BR2_PACKAGE_GIT dependency here (BR2_USE_MMU).

package/git-crypt/Config.in line 9

Quoted 5 lines
package/git-crypt/Config.in new file +5 -0
+	help
+	  git-crypt enables transparent encryption and decryption of files in a
+	  git repository.
+
+	  https://github.com/AGWA/git-crypt

https://www.agwa.name/projects/git-crypt/ looks more informative.

A dependencies comment is missing. See section 17.2.4 in the manual[1].

package/git-crypt/git-crypt.hash line 2

Quoted 8 lines
package/git-crypt/git-crypt.hash new file +2 -0
new file mode 100644
index 000000000..fe18498cc
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 5150144a528bc74eeb47a2884cf2fefe978a1d1dc0223bbfcac395fa6a73a410 git-crypt-0.5.0.tar.gz

Upstream tarball (see below) has upstream provided hash[2].

Quoted 6 lines
package/git-crypt/git-crypt.mk new file +0 -0
new file mode 100644
index 000000000..9f7df223d

package/git-crypt/git-crypt.mk line 8

Quoted 8 lines
package/git-crypt/git-crypt.mk new file +8 -0
@@ -0,0 +1,21 @@
+################################################################################
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+GIT_CRYPT_SITE = $(call github,agwa,git-crypt,$(GIT_CRYPT_VERSION))

Any reason not to use upstream tarball?

https://www.agwa.name/projects/git-crypt/downloads/git-crypt-0.5.0.tar.gz

package/git-crypt/git-crypt.mk line 9

Quoted 1 line
package/git-crypt/git-crypt.mk new file +1 -0
+GIT_CRYPT_DEPENDENCIES = git openssl

A 'select BR2_PACKAGE_OPENSSL' in Config.in is missing.

package/git-crypt/git-crypt.mk line 21

Quoted 12 lines
package/git-crypt/git-crypt.mk new file +12 -0
+GIT_CRYPT_LICENSE = GPLv3
+GIT_CRYPT_LICENSE_FILES = COPYING
+
+define GIT_CRYPT_BUILD_CMDS
+	$(MAKE) CXX="$(TARGET_CXX)" -C $(@D) all
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt
+endef
+
+$(eval $(generic-package))

baruch

[1] http://nightly.buildroot.org/manual.html

[2] https://lists.cloudmutt.com/pipermail/git-crypt-announce/2015-May/000003.html

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 git-crypt: new package

Hi Baruch. Thanks for your help, this is my first patch for buildroot and I am still learning how things work.

Quoted 1 line · Baruch Siach

You should also propagate BR2_PACKAGE_GIT dependency here (BR2_USE_MMU).

Right, will do.

Quoted 1 line

https://www.agwa.name/projects/git-crypt/ looks more informative.

Agreed.

Quoted 1 line

A dependencies comment is missing. See section 17.2.4 in the manual[1].

Sorry, missed that part. I will add it.

Quoted 2 lines

Upstream tarball (see below) has upstream provided hash[2]. Any reason not to use upstream tarball?

No reason, I simply didn't notice the tarball and the hash were available, I will use those.

Quoted 1 line

A 'select BR2_PACKAGE_OPENSSL' in Config.in is missing.

Thanks, will add.

Francesco

#3 lore raw

PATCH 1/1 git-crypt: new package

In reply to Baruch Siach

Hello,

Quoted 2 lines · Baruch Siach

package/git-crypt/git-crypt.mk line 14

Quoted 2 lines
package/git-crypt/git-crypt.mk new file +2 -0
+define GIT_CRYPT_BUILD_CMDS
+	$(MAKE) CXX="$(TARGET_CXX)" -C $(@D) all

Please use:

	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH v2 1/1 git-crypt: new package

In reply to Francesco Negri

---
Changes v1 -> v2:
- added BR2_USE_MMU and BR2_PACKAGE_OPENSSL to Config.in
- added dependency comment (hope it is correct!)
- download from official website instead of GitHub
- use hash from git-crypt mailing list

---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      | 15 +++++++++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 23 +++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
 	source "package/gawk/Config.in"
 	source "package/gettext/Config.in"
 	source "package/git/Config.in"
+	source "package/git-crypt/Config.in"
 	source "package/gperf/Config.in"
 	source "package/grep/Config.in"
 	source "package/jq/Config.in"
package/git-crypt/Config.in new file +15 -0
new file mode 100644
index 000000000..e7a67ae47
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_GIT_CRYPT
+	bool "git-crypt"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_GIT
+	select BR2_USE_MMU # git
+	select BR2_PACKAGE_OPENSSL
+	help
+	  git-crypt enables transparent encryption and decryption of files in a
+	  git repository.
+
+	  https://www.agwa.name/projects/git-crypt/
+
+comment "git-crypt needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU
package/git-crypt/git-crypt.hash new file +2 -0
new file mode 100644
index 000000000..8589f03f7
@@ -0,0 +1,2 @@
+# Hash from: https://lists.cloudmutt.com/pipermail/git-crypt-announce/2015-May/000003.html
+sha256 0a8f92c0a0a125bf768d0c054d947ca4e4b8d6556454b0e7e87fb907ee17cf06 git-crypt-0.5.0.tar.gz
package/git-crypt/git-crypt.mk new file +23 -0
new file mode 100644
index 000000000..13f8f435b
@@ -0,0 +1,23 @@
+################################################################################
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+
+GIT_CRYPT_SOURCE = git-crypt-$(GIT_CRYPT_VERSION).tar.gz
+GIT_CRYPT_SITE = https://www.agwa.name/projects/git-crypt/downloads
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3
+GIT_CRYPT_LICENSE_FILES = COPYING
+
+define GIT_CRYPT_BUILD_CMDS
+	$(MAKE) CXX="$(TARGET_CXX)" -C $(@D) all
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#5 lore raw

PATCH v2 1/1 git-crypt: new package

Hi Francesco,

Quoted 35 lines · Francesco Negri

---
Changes v1 -> v2:
- added BR2_USE_MMU and BR2_PACKAGE_OPENSSL to Config.in
- added dependency comment (hope it is correct!)
- download from official website instead of GitHub
- use hash from git-crypt mailing list

---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      | 15 +++++++++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 23 +++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
 	source "package/gawk/Config.in"
 	source "package/gettext/Config.in"
 	source "package/git/Config.in"
+	source "package/git-crypt/Config.in"
 	source "package/gperf/Config.in"
 	source "package/grep/Config.in"
 	source "package/jq/Config.in"
package/git-crypt/Config.in new file +0 -0
new file mode 100644
index 000000000..e7a67ae47

package/git-crypt/Config.in line 5

Quoted 5 lines
package/git-crypt/Config.in new file +5 -0
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_GIT_CRYPT
+	bool "git-crypt"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_GIT
+	select BR2_USE_MMU # git

You can't select BR2_USE_MMU; it's determined by the target architecture. You need to depend on BR2_USE_MMU.

Quoted 24 lines
package/git-crypt/Config.in new file +10 -0
+	select BR2_PACKAGE_OPENSSL
+	help
+	  git-crypt enables transparent encryption and decryption of files in a
+	  git repository.
+
+	  https://www.agwa.name/projects/git-crypt/
+
+comment "git-crypt needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU
package/git-crypt/git-crypt.hash new file +2 -0
new file mode 100644
index 000000000..8589f03f7
@@ -0,0 +1,2 @@
+# Hash from: https://lists.cloudmutt.com/pipermail/git-crypt-announce/2015-May/000003.html
+sha256 0a8f92c0a0a125bf768d0c054d947ca4e4b8d6556454b0e7e87fb907ee17cf06 git-crypt-0.5.0.tar.gz
package/git-crypt/git-crypt.mk new file +0 -0
new file mode 100644
index 000000000..13f8f435b

package/git-crypt/git-crypt.mk line 9

Quoted 9 lines
package/git-crypt/git-crypt.mk new file +9 -0
@@ -0,0 +1,23 @@
+################################################################################
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+
+GIT_CRYPT_SOURCE = git-crypt-$(GIT_CRYPT_VERSION).tar.gz

This is the default, so it can be dropped.

package/git-crypt/git-crypt.mk line 16

Quoted 7 lines
package/git-crypt/git-crypt.mk new file +7 -0
+GIT_CRYPT_SITE = https://www.agwa.name/projects/git-crypt/downloads
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3
+GIT_CRYPT_LICENSE_FILES = COPYING
+
+define GIT_CRYPT_BUILD_CMDS
+	$(MAKE) CXX="$(TARGET_CXX)" -C $(@D) all

You missed Thomas' comment.

package/git-crypt/git-crypt.mk line 23

Quoted 7 lines
package/git-crypt/git-crypt.mk new file +7 -0
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt
+endef
+
+$(eval $(generic-package))

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#6 lore raw

PATCH v2 1/1 git-crypt: new package

Hi,

Quoted 1 line

You can't select BR2_USE_MMU; it's determined by the target architecture. You

need to depend on BR2_USE_MMU.

Sorry, my bad.

Quoted 1 line

This is the default, so it can be dropped.

K, will do.

Quoted 1 line

You missed Thomas' comment.

Apologies, I read Thomas' comment a few seconds after submitting v2.

I tried using the command suggested by Thomas, but the build fails with:

undefined reference to `AES_set_encrypt_key'

followed by a few other "undefined reference" errors.

I'm not sure how to fix it.

Thanks,
Francesco

Quoted 107 lines · Baruch Siach

Hi Francesco,

Quoted 35 lines · Francesco Negri

---
Changes v1 -> v2:
- added BR2_USE_MMU and BR2_PACKAGE_OPENSSL to Config.in
- added dependency comment (hope it is correct!)
- download from official website instead of GitHub
- use hash from git-crypt mailing list

---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      | 15 +++++++++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 23 +++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
      source "package/gawk/Config.in"
      source "package/gettext/Config.in"
      source "package/git/Config.in"
+     source "package/git-crypt/Config.in"
      source "package/gperf/Config.in"
      source "package/grep/Config.in"
      source "package/jq/Config.in"
package/git-crypt/Config.in new file +0 -0
new file mode 100644
index 000000000..e7a67ae47

package/git-crypt/Config.in line 5

Quoted 5 lines
package/git-crypt/Config.in new file +5 -0
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_GIT_CRYPT
+     bool "git-crypt"
+     depends on BR2_INSTALL_LIBSTDCPP
+     select BR2_PACKAGE_GIT
+     select BR2_USE_MMU # git

You can't select BR2_USE_MMU; it's determined by the target architecture. You need to depend on BR2_USE_MMU.

Quoted 24 lines
package/git-crypt/Config.in new file +10 -0
+     select BR2_PACKAGE_OPENSSL
+     help
+       git-crypt enables transparent encryption and decryption of files in a
+       git repository.
+
+       https://www.agwa.name/projects/git-crypt/
+
+comment "git-crypt needs a toolchain w/ C++"
+     depends on !BR2_INSTALL_LIBSTDCPP
+     depends on BR2_USE_MMU
package/git-crypt/git-crypt.hash new file +2 -0
new file mode 100644
index 000000000..8589f03f7
@@ -0,0 +1,2 @@
+# Hash from: https://lists.cloudmutt.com/pipermail/git-crypt-announce/2015-May/000003.html
+sha256 0a8f92c0a0a125bf768d0c054d947ca4e4b8d6556454b0e7e87fb907ee17cf06 git-crypt-0.5.0.tar.gz
package/git-crypt/git-crypt.mk new file +0 -0
new file mode 100644
index 000000000..13f8f435b

package/git-crypt/git-crypt.mk line 9

Quoted 9 lines
package/git-crypt/git-crypt.mk new file +9 -0
@@ -0,0 +1,23 @@
+################################################################################
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+
+GIT_CRYPT_SOURCE = git-crypt-$(GIT_CRYPT_VERSION).tar.gz

This is the default, so it can be dropped.

package/git-crypt/git-crypt.mk line 16

Quoted 7 lines
package/git-crypt/git-crypt.mk new file +7 -0
+GIT_CRYPT_SITE = https://www.agwa.name/projects/git-crypt/downloads
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3
+GIT_CRYPT_LICENSE_FILES = COPYING
+
+define GIT_CRYPT_BUILD_CMDS
+     $(MAKE) CXX="$(TARGET_CXX)" -C $(@D) all

You missed Thomas' comment.

package/git-crypt/git-crypt.mk line 23

Quoted 7 lines
package/git-crypt/git-crypt.mk new file +7 -0
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+     $(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt
+endef
+
+$(eval $(generic-package))

baruch

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

#7 lore raw

PATCH v2 1/1 git-crypt: new package

Quoted 1 line · Francesco Negri

I tried using the command suggested by Thomas, but the build fails with:

I found the error is caused by $(TARGET_CONFIGURE_OPTS) setting LDFLAGS="". Setting it to LDFLAGS="-lcrypto" fixes the error. What would be the best way to do this in git-crypt.mk?

Thanks,
Francesco

#8 lore raw

PATCH v2 1/1 git-crypt: new package

Hi Francesco,

Quoted 7 lines · Francesco Negri
Quoted 1 line · Francesco Negri

I tried using the command suggested by Thomas, but the build fails with:

I found the error is caused by $(TARGET_CONFIGURE_OPTS) setting LDFLAGS="". Setting it to LDFLAGS="-lcrypto" fixes the error. What would be the best way to do this in git-crypt.mk?

In that case I think it would be better to do

  $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) ...

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#9 lore raw

PATCH v3 1/1 git-crypt: new package

In reply to Francesco Negri

---
Changes v2 -> v3:
- add TARGET_MAKE_ENV and TARGET_CONFIGURE_OPTS in make cmd
- use depends, not select, for BR2_USE_MMU
- remove unnecessary GIT_CRYPT_SOURCE

---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      | 15 +++++++++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 21 +++++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
 	source "package/gawk/Config.in"
 	source "package/gettext/Config.in"
 	source "package/git/Config.in"
+	source "package/git-crypt/Config.in"
 	source "package/gperf/Config.in"
 	source "package/grep/Config.in"
 	source "package/jq/Config.in"
package/git-crypt/Config.in new file +15 -0
new file mode 100644
index 000000000..4e1ca4a2b
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_GIT_CRYPT
+	bool "git-crypt"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # git
+	select BR2_PACKAGE_GIT
+	select BR2_PACKAGE_OPENSSL
+	help
+	  git-crypt enables transparent encryption and decryption of files in a
+	  git repository.
+
+	  https://www.agwa.name/projects/git-crypt/
+
+comment "git-crypt needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU
package/git-crypt/git-crypt.hash new file +2 -0
new file mode 100644
index 000000000..8589f03f7
@@ -0,0 +1,2 @@
+# Hash from: https://lists.cloudmutt.com/pipermail/git-crypt-announce/2015-May/000003.html
+sha256 0a8f92c0a0a125bf768d0c054d947ca4e4b8d6556454b0e7e87fb907ee17cf06 git-crypt-0.5.0.tar.gz
package/git-crypt/git-crypt.mk new file +21 -0
new file mode 100644
index 000000000..3ef2bd26f
@@ -0,0 +1,21 @@
+################################################################################
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+GIT_CRYPT_SITE = https://www.agwa.name/projects/git-crypt/downloads
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3
+GIT_CRYPT_LICENSE_FILES = COPYING
+
+define GIT_CRYPT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#10 lore raw

PATCH v3 1/1 git-crypt: new package

Hi Francesco,

Looks good now except for one more comment below.

Quoted 1 line · Francesco Negri

[snip]

Quoted 7 lines
package/git-crypt/git-crypt.mk new file +1 -0
new file mode 100644
index 000000000..3ef2bd26f
@@ -0,0 +1,21 @@
+################################################################################

package/git-crypt/git-crypt.mk line 11

Quoted 10 lines
package/git-crypt/git-crypt.mk new file +10 -0
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+GIT_CRYPT_SITE = https://www.agwa.name/projects/git-crypt/downloads
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3
+GIT_CRYPT_LICENSE_FILES = COPYING

Source code files include the "or any later version" language, so the license should be GPLv3+.

A few files (parse_options.*, fhstream.*) are under the MIT license.

The end result it:

GIT_CRYPT_LICENSE = GPLv3+, MIT GIT_CRYPT_LICENSE_FILES = COPYING parse_options.hpp

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#11 lore raw

PATCH v4 1/1 git-crypt: new package

In reply to Francesco Negri

---
Changes v3 -> v4:
- more accurate info on licenses

---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      | 15 +++++++++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 21 +++++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
 	source "package/gawk/Config.in"
 	source "package/gettext/Config.in"
 	source "package/git/Config.in"
+	source "package/git-crypt/Config.in"
 	source "package/gperf/Config.in"
 	source "package/grep/Config.in"
 	source "package/jq/Config.in"
package/git-crypt/Config.in new file +15 -0
new file mode 100644
index 000000000..4e1ca4a2b
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_GIT_CRYPT
+	bool "git-crypt"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # git
+	select BR2_PACKAGE_GIT
+	select BR2_PACKAGE_OPENSSL
+	help
+	  git-crypt enables transparent encryption and decryption of files in a
+	  git repository.
+
+	  https://www.agwa.name/projects/git-crypt/
+
+comment "git-crypt needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU
package/git-crypt/git-crypt.hash new file +2 -0
new file mode 100644
index 000000000..8589f03f7
@@ -0,0 +1,2 @@
+# Hash from: https://lists.cloudmutt.com/pipermail/git-crypt-announce/2015-May/000003.html
+sha256 0a8f92c0a0a125bf768d0c054d947ca4e4b8d6556454b0e7e87fb907ee17cf06 git-crypt-0.5.0.tar.gz
package/git-crypt/git-crypt.mk new file +21 -0
new file mode 100644
index 000000000..fc3e44f81
@@ -0,0 +1,21 @@
+################################################################################
+#
+# git-crypt
+#
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+GIT_CRYPT_SITE = https://www.agwa.name/projects/git-crypt/downloads
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3+, MIT
+GIT_CRYPT_LICENSE_FILES = COPYING parse_options.hpp
+
+define GIT_CRYPT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#12 lore raw

PATCH v4 1/1 git-crypt: new package

Quoted 34 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francesco" == Francesco Negri <[email protected]> writes:

---
Changes v3 -> v4:
- more accurate info on licenses

---
 package/Config.in                |  1 +
 package/git-crypt/Config.in      | 15 +++++++++++++++
 package/git-crypt/git-crypt.hash |  2 ++
 package/git-crypt/git-crypt.mk   | 21 +++++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/git-crypt/Config.in
 create mode 100644 package/git-crypt/git-crypt.hash
 create mode 100644 package/git-crypt/git-crypt.mk
package/Config.in +1 -0
index 6a3a1a7c7..067ff3cc9 100644
@@ -138,6 +138,7 @@ menu "Development tools"
 	source "package/gawk/Config.in"
 	source "package/gettext/Config.in"
 	source "package/git/Config.in"
+	source "package/git-crypt/Config.in"
 	source "package/gperf/Config.in"
 	source "package/grep/Config.in"
 	source "package/jq/Config.in"
package/git-crypt/Config.in new file +0 -0
new file mode 100644
index 000000000..4e1ca4a2b

package/git-crypt/Config.in line 5

Quoted 5 lines
package/git-crypt/Config.in new file +5 -0
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_GIT_CRYPT
+	bool "git-crypt"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # git
+	select BR2_PACKAGE_GIT

git is only used at runtime, not build time - So we normally add a comment about that (and drop it from GIT_CRYPT_DEPENDENCIES).

Quoted 9 lines

new file mode 100644
index 000000000..fc3e44f81

package/git-crypt/git-crypt.mk new file +4 -0
@@ -0,0 +1,21 @@
+################################################################################
+#
+# git-crypt
+#

package/git-crypt/git-crypt.mk line 14

Quoted 10 lines
package/git-crypt/git-crypt.mk new file +10 -0
+################################################################################
+
+GIT_CRYPT_VERSION = 0.5.0
+GIT_CRYPT_SITE = https://www.agwa.name/projects/git-crypt/downloads
+GIT_CRYPT_DEPENDENCIES = git openssl
+GIT_CRYPT_LICENSE = GPLv3+, MIT
+GIT_CRYPT_LICENSE_FILES = COPYING parse_options.hpp
+
+define GIT_CRYPT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all

The reason you had to add TARGET_CONFIGURE_OPTS before make was that the build system hardcoded -lcrypto to link with openssl. This is unfortunately not enough when linking statically as you also have to consider the dependencies of openssl (E.G. zlib).

So I changed it to host pkg-config to get the libraries needed for openssl and pass those in LDFLAGS.

package/git-crypt/git-crypt.mk line 18

Quoted 4 lines
package/git-crypt/git-crypt.mk new file +4 -0
+endef
+
+define GIT_CRYPT_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/git-crypt $(TARGET_DIR)/usr/bin/git-crypt

The buildsystem has a sensible 'make install' target, so I rewrote it to use that.

Committed with these fixes, thanks.

Signature · 1 line
Bye, Peter Korsgaard