gnupg trial and error ;)

This commit is contained in:
Daniel Langbein 2021-06-15 11:13:24 +02:00
parent aa77634ace
commit f79aa02a5c
4 changed files with 34 additions and 9 deletions

View File

@ -0,0 +1,15 @@
## arg 1: the new package version
post_install() {
holo apply
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
holo apply
}
## arg 1: the old package version
post_remove() {
holo apply
}

View File

@ -2,14 +2,15 @@
_pkgname=gnupg
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.4
pkgrel=2
pkgver=0.0.5
pkgrel=1
pkgdesc="gnupg with configuration"
arch=('any')
url="https://codeberg.org/privacy1st/${_reponame}"
license=('MIT')
depends=('gnupg')
depends=('gnupg' 'holo' 'git' 'base')
makedepends=('git')
install='.install'
source=("git+${url}.git" 'git+https://github.com/ioerror/duraconf.git')
noextract=()
sha256sums=('SKIP' 'SKIP')
@ -31,5 +32,5 @@ package() {
install -Dm0600 gpg.conf "$pkgdir"/etc/skel/.gnupg/gpg.conf
install -Dm0600 gpg-agent.conf "$pkgdir"/etc/skel/.gnupg/gpg-agent.conf
install -Dm0644 99_gnupg.sh "$pkgdir"/etc/profile.d/99_gnupg.sh
install -Dm0544 zshrc.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/zsh/zshrc
}

View File

@ -83,9 +83,6 @@ gpg-connect-agent updatestartuptty /bye >/dev/null
One's login shell should run the following.
**Note**: `/etc/profile.d/99_gnupg.sh` does **not** work!
**TODO** maybe was just wrong permission?
```shell
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
@ -93,3 +90,10 @@ if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK
fi
```
---
**Note**:
* `/etc/profile.d/99_gnupg.sh` does **not** work!
* `/etc/X11/xinit/xinitrc.d/`

View File

@ -1,4 +1,9 @@
GPG_TTY=$(tty)
#!/bin/sh
# stdin: default config
# stdout: modified config
cat
echo 'GPG_TTY=$(tty)
export GPG_TTY
gpg-connect-agent updatestartuptty /bye >/dev/null
@ -6,4 +11,4 @@ unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
fi
fi'