summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.makepkg.conf7
-rwxr-xr-xbin/setup6
2 files changed, 8 insertions, 5 deletions
diff --git a/.makepkg.conf b/.makepkg.conf
index b7245f8..caad51b 100644
--- a/.makepkg.conf
+++ b/.makepkg.conf
@@ -4,5 +4,8 @@ SRCPKGDEST="${HOME}/packages/srcpkgdest"
LOGDEST="${HOME}/packages/logdest"
BUILDDIR="${HOME}/packages/builddir"
-PACKAGER="Parabola automatic package builder <dev@lists.parabolagnulinux.org>"
-GPGKEY=$({ sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"; gpg --list-keys|sed -rn 's:^pub\s[^/]*/(\S*)\s.*:\1:p'; }|sed 1q)
+GPGKEY="$({
+ sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"
+ gpg --list-secret-keys --with-colons | grep ^sec: | cut -d: -f5 | sed -r 's/.*(........)$/\1/'
+ } | sed 1q)"
+PACKAGER="$(gpg --with-colons --fingerprint "$GPGKEY"|grep ^uid:|cut -d: -f10)"
diff --git a/bin/setup b/bin/setup
index e143fe7..f421cbd 100755
--- a/bin/setup
+++ b/bin/setup
@@ -23,12 +23,12 @@ autobuild $(HOME)/bin/autobuild: $(HOME)/bin/autobuild.c
$(HOME)/.ssh/id_rsa $(HOME)/.ssh/id_rsa.pub:
ssh-keygen -N '' -f $@
-$(HOME)/.gnupg/secring.gpg:
+$(HOME)/.gnupg/secring.gpg: | $(HOME)/.gitconfig
printf '%s\n' \
'Key-Type: default' \
'Subkey-Type: default' \
- 'Name-Real: Parabola automatic package builder' \
- 'Name-Email: dev@lists.parabolagnulinux.org' \
+ "Name-Real: $(git config user.name)" \
+ "Name-Email: $(git config user.email)" \
'Expire-Date: 0' \
| gpg --gen-key --batch