aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-09-26 16:23:50 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-09-26 16:25:06 +0200
commitfb9142d5f0df59f9a0e381e6b79829dd6b40c680 (patch)
tree3a348f8af96e03fe59c8319caa291718ae239850
parent9397682d64f1e7f23dcecd4f47fcf92ae7f2c1b0 (diff)
downloadaports-fb9142d5f0df59f9a0e381e6b79829dd6b40c680.tar.gz
aports-fb9142d5f0df59f9a0e381e6b79829dd6b40c680.tar.bz2
aports-fb9142d5f0df59f9a0e381e6b79829dd6b40c680.tar.xz
testing/git-secret: don't hide output, fix issue on gpg 2.2
-rw-r--r--testing/git-secret/APKBUILD9
-rw-r--r--testing/git-secret/dont-hide-gpg-output.patch26
-rw-r--r--testing/git-secret/fix-passphrase-input-for-gpg2.2.patch26
3 files changed, 60 insertions, 1 deletions
diff --git a/testing/git-secret/APKBUILD b/testing/git-secret/APKBUILD
index cb86144007..e9c606acfe 100644
--- a/testing/git-secret/APKBUILD
+++ b/testing/git-secret/APKBUILD
@@ -1,8 +1,11 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+#
+# Note: git-secret is very badly designed, I'll replace this abuild once
+# I find or write something better.
pkgname=git-secret
pkgver=0.2.2
-pkgrel=0
+pkgrel=1
pkgdesc="A bash-tool to store your private data inside a git repository"
url="http://git-secret.io/"
arch="noarch"
@@ -11,6 +14,8 @@ depends="bash gnupg"
checkdepends="bats"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/sobolevn/$pkgname/archive/v$pkgver.tar.gz
+ fix-passphrase-input-for-gpg2.2.patch
+ dont-hide-gpg-output.patch
makefile.patch"
builddir="$srcdir/$pkgname-$pkgver"
options="!check" # does not work in a container w/o tty
@@ -31,4 +36,6 @@ package() {
}
sha512sums="453b9012fd90e962ec47af598b43f1036b7e741d9f46053ff16a469c08c1da33f99c8e792119664c82dd63d24b8cf72736e445a454c7b7f59c0387e886ee5fde git-secret-0.2.2.tar.gz
+c1e619a7770f9a075e51fcdb2bac8651b0e29d0eae25bbeaa60458e1462b01f2d080aabecca20c909d2ec6e77656c0ce75d8781f5ac90352a416c8a76b287256 fix-passphrase-input-for-gpg2.2.patch
+43a446c7fa3bf723fb00ddddb187b58fffa8bfa9914de8398501f93f9ef42836abaa606944a67670e3033e5ff28d3e1d4cdcf40d05d6a1069aa20916a398ee76 dont-hide-gpg-output.patch
5e91d0830e95a8be0eb1f87b482a1d9216ff86be354d52c5f0f5cf5b7c4bba6833f09097ea83349178314d63c373683f1782315b862eb4fc728dc17c91ba9bad makefile.patch"
diff --git a/testing/git-secret/dont-hide-gpg-output.patch b/testing/git-secret/dont-hide-gpg-output.patch
new file mode 100644
index 0000000000..a6045e9a87
--- /dev/null
+++ b/testing/git-secret/dont-hide-gpg-output.patch
@@ -0,0 +1,26 @@
+Goddamn, don't make troubleshooting impossible!
+
+--- a/src/_utils/_git_secret_tools.sh
++++ b/src/_utils/_git_secret_tools.sh
+@@ -279,8 +279,8 @@
+ if [[ ! -z "$passphrase" ]]; then
+ echo "$passphrase" | $base --batch --yes --no-tty --passphrase-fd 0 \
+ --passphrase-fd 0 --pinentry-mode loopback \
+- "$encrypted_filename" > /dev/null 2>&1
++ --quiet "$encrypted_filename"
+ else
+- $base "$encrypted_filename" > /dev/null 2>&1
++ $base "$encrypted_filename"
+ fi
+ }
+--- a/src/commands/git_secret_tell.sh
++++ b/src/commands/git_secret_tell.sh
+@@ -64,7 +64,7 @@
+ fi
+
+ # Importing public key to the local keychain:
+- $GPGLOCAL --import "$keyfile" > /dev/null 2>&1
++ $GPGLOCAL --import "$keyfile"
+ done
+
+ echo "done. ${emails[*]} added as someone who know(s) the secret."
diff --git a/testing/git-secret/fix-passphrase-input-for-gpg2.2.patch b/testing/git-secret/fix-passphrase-input-for-gpg2.2.patch
new file mode 100644
index 0000000000..d106f19052
--- /dev/null
+++ b/testing/git-secret/fix-passphrase-input-for-gpg2.2.patch
@@ -0,0 +1,26 @@
+From d548e548d8c4d03356cf576188715292091efe18 Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Tue, 26 Sep 2017 16:09:39 +0200
+Subject: [PATCH 1/2] Fix providing passphrase to GPG to work with GPG 2.2+
+
+---
+ src/_utils/_git_secret_tools.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/_utils/_git_secret_tools.sh b/src/_utils/_git_secret_tools.sh
+index 882c0b2..9e4282b 100644
+--- a/src/_utils/_git_secret_tools.sh
++++ b/src/_utils/_git_secret_tools.sh
+@@ -446,7 +446,8 @@ function _decrypt {
+ fi
+
+ if [[ ! -z "$passphrase" ]]; then
+- echo "$passphrase" | $base --batch --yes --no-tty --passphrase-fd 0 \
++ echo "$passphrase" | $base --batch --yes --no-tty \
++ --passphrase-fd 0 --pinentry-mode loopback \
+ "$encrypted_filename" > /dev/null 2>&1
+ else
+ $base --quiet "$encrypted_filename"
+--
+2.10.1 (Apple Git-78)
+