summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD5
-rw-r--r--gpg-agent.conf1
-rw-r--r--mkinitcpio-sign-install4
5 files changed, 10 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1a1d586917d..460068cc18a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -32,6 +32,7 @@ pkgbase = mkinitcpio-sign-patch
source = https://sources.archlinux.org/other/mkinitcpio/mkinitcpio-27.tar.gz.sig
source = 0001-mkinitcpio-remove-preset-pacsave.patch
source = gpg.conf
+ source = gpg-agent.conf
source = 89-mkinitcpio-sign-install.hook
source = mkinitcpio-sign-install
source = 0002-mkinitcpio-sign-when-done.patch
@@ -42,8 +43,9 @@ pkgbase = mkinitcpio-sign-patch
sha256sums = SKIP
sha256sums = 845569fa760f70c868ecb3dc8ae9667287970526dddaf403fdafcb716e8b3d51
sha256sums = f6eebbd610dcb91288d39b93e4f7f7f47e1c13abaab2d379607d78d417bfd0c7
+ sha256sums = 899983ccc567d84ab5d059e87ea4be322e429a2dd18c33f2e443ff5faf890f3d
sha256sums = cb094c11de6d4ad903484dea41ef456a4a92c788e570ff8f21214021de7e4f14
- sha256sums = dc555d3c8d774556732362ae707704b09b86c21c55f53f5c68215ca1d3b24b0a
+ sha256sums = 3f0f42849fbb20c2d74ed9a7192d0e63770db5421377f3f4c227216d4f42a071
sha256sums = 5dc8d9ae28979ea09a6b2ba0192a211421b0a40518a8763bdc86c4f841926590
pkgname = mkinitcpio-sign-patch
diff --git a/.gitignore b/.gitignore
index d7727ffc22a..27b6ab9bba3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
!0001-mkinitcpio-remove-preset-pacsave.patch
!0002-mkinitcpio-sign-when-done.patch
!gpg.conf
+!gpg-agent.conf
!mkinitcpio-sign-install
!mkinitcpio.install
!89-mkinitcpio-sign-install.hook
diff --git a/PKGBUILD b/PKGBUILD
index c5c5acf6702..4f21d78014f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,15 +19,16 @@ conflicts=('mkinitcpio')
backup=('etc/mkinitcpio.conf')
source=("https://sources.archlinux.org/other/${pkgname%-sign-patch}/${pkgname%-sign-patch}-$pkgver.tar.gz"{,.sig}
"0001-mkinitcpio-remove-preset-pacsave.patch"
- "gpg.conf" "89-mkinitcpio-sign-install.hook" "mkinitcpio-sign-install"
+ "gpg.conf" "gpg-agent.conf" "89-mkinitcpio-sign-install.hook" "mkinitcpio-sign-install"
"0002-mkinitcpio-sign-when-done.patch")
install=mkinitcpio.install
sha256sums=('e6bff1cb78b677538eb9aace900b715fd59de8fc210b74fb9d899dfaa32bc354'
'SKIP'
'845569fa760f70c868ecb3dc8ae9667287970526dddaf403fdafcb716e8b3d51'
'f6eebbd610dcb91288d39b93e4f7f7f47e1c13abaab2d379607d78d417bfd0c7'
+ '899983ccc567d84ab5d059e87ea4be322e429a2dd18c33f2e443ff5faf890f3d'
'cb094c11de6d4ad903484dea41ef456a4a92c788e570ff8f21214021de7e4f14'
- 'dc555d3c8d774556732362ae707704b09b86c21c55f53f5c68215ca1d3b24b0a'
+ '3f0f42849fbb20c2d74ed9a7192d0e63770db5421377f3f4c227216d4f42a071'
'5dc8d9ae28979ea09a6b2ba0192a211421b0a40518a8763bdc86c4f841926590')
validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53' # Dave Reisner
'86CFFCA918CF3AF47147588051E8B148A9999C34' # Evangelos Foutras
diff --git a/gpg-agent.conf b/gpg-agent.conf
new file mode 100644
index 00000000000..358b8e272f3
--- /dev/null
+++ b/gpg-agent.conf
@@ -0,0 +1 @@
+max-cache-ttl 1
diff --git a/mkinitcpio-sign-install b/mkinitcpio-sign-install
index 4bacd2fe007..9d0942895aa 100644
--- a/mkinitcpio-sign-install
+++ b/mkinitcpio-sign-install
@@ -1,14 +1,14 @@
#!/bin/bash -e
pushd /usr/lib/initcpio/sign
-gpg-agent --daemon --max-cache-ttl 1
+gpg-connect-agent --homedir . reloadagent /bye
keys=(`gpg --homedir . --list-keys --with-colons | awk -F: '/^pub:/ { print $5 }' | tr '\n' ' '`)
if [[ $keys != "" ]]; then
echo "found $keys"
else
gpg --homedir . --gen-key
- [ $? -ne 0 ] && 1>&2 echo "you need to generate a GPG keypair to use for signing in /usr/lib/initcpio/sign" && exit 1
+ [ $? -ne 0 ] && 1>&2 echo "failed to generate a GPG keypair in /usr/lib/initcpio/sign" && exit 1
gpg --homedir . --export > ~/boot.key
fi