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 _pkgname=gnupg
_reponame=arch _reponame=arch
pkgname="de-p1st-$_pkgname" pkgname="de-p1st-$_pkgname"
pkgver=0.0.4 pkgver=0.0.5
pkgrel=2 pkgrel=1
pkgdesc="gnupg with configuration" pkgdesc="gnupg with configuration"
arch=('any') arch=('any')
url="https://codeberg.org/privacy1st/${_reponame}" url="https://codeberg.org/privacy1st/${_reponame}"
license=('MIT') license=('MIT')
depends=('gnupg') depends=('gnupg' 'holo' 'git' 'base')
makedepends=('git') makedepends=('git')
install='.install'
source=("git+${url}.git" 'git+https://github.com/ioerror/duraconf.git') source=("git+${url}.git" 'git+https://github.com/ioerror/duraconf.git')
noextract=() noextract=()
sha256sums=('SKIP' 'SKIP') sha256sums=('SKIP' 'SKIP')
@ -31,5 +32,5 @@ package() {
install -Dm0600 gpg.conf "$pkgdir"/etc/skel/.gnupg/gpg.conf install -Dm0600 gpg.conf "$pkgdir"/etc/skel/.gnupg/gpg.conf
install -Dm0600 gpg-agent.conf "$pkgdir"/etc/skel/.gnupg/gpg-agent.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. 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 ```shell
unset SSH_AGENT_PID unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then 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 export SSH_AUTH_SOCK
fi 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 export GPG_TTY
gpg-connect-agent updatestartuptty /bye >/dev/null gpg-connect-agent updatestartuptty /bye >/dev/null
@ -6,4 +11,4 @@ unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK export SSH_AUTH_SOCK
fi fi'