From 8153bb40e7c7622859fc221caab8c7f15c0a14c6 Mon Sep 17 00:00:00 2001 From: kth5 Date: Wed, 11 Sep 2024 18:03:23 +0200 Subject: [PATCH] * update pinentry to 1.3.1-2 --- pinentry/.SRCINFO | 41 ++++++++++++++++++++++++++++++++++++++++ pinentry/.nvchecker.toml | 5 +++++ pinentry/PKGBUILD | 34 ++++++++++++++++----------------- pinentry/pinentry | 34 +++++++++++++++++++++++---------- 4 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 pinentry/.SRCINFO create mode 100644 pinentry/.nvchecker.toml diff --git a/pinentry/.SRCINFO b/pinentry/.SRCINFO new file mode 100644 index 0000000000..ceeca0ed2f --- /dev/null +++ b/pinentry/.SRCINFO @@ -0,0 +1,41 @@ +pkgbase = pinentry + pkgdesc = Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol + pkgver = 1.3.1 + pkgrel = 2 + url = https://gnupg.org/related_software/pinentry/ + arch = x86_64 + license = GPL + makedepends = qt6-base + makedepends = qt5-x11extras + makedepends = kwayland5 + makedepends = gtk2-compat + makedepends = gcr + makedepends = kguiaddons + makedepends = kwindowsystem + depends = glibc + depends = ncurses + depends = libassuan + depends = libsecret + depends = glib2 + depends = libsecret-1.so + depends = libncursesw.so + depends = libassuan.so + depends = libglib-2.0.so + optdepends = gcr: GNOME backend + optdepends = gtk3: GTK backend + optdepends = qt5-x11extras: Qt5 backend + optdepends = kwayland5: Qt5 backend + optdepends = kguiaddons: Qt6 backend + optdepends = kwindowsystem: Qt6 backend + backup = etc/pinentry/preexec + source = https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.3.1.tar.bz2 + source = https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.3.1.tar.bz2.sig + source = pinentry + validpgpkeys = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 + validpgpkeys = 6DAA6E64A76D2840571B4902528897B826403ADA + validpgpkeys = AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD + sha256sums = bc72ee27c7239007ab1896c3c2fae53b076e2c9bd2483dc2769a16902bce8c04 + sha256sums = SKIP + sha256sums = 2f961cccf9aebddf9c0823a96809a10296d7af6516460ae2d93e8ea5a433166d + +pkgname = pinentry diff --git a/pinentry/.nvchecker.toml b/pinentry/.nvchecker.toml new file mode 100644 index 0000000000..955126b909 --- /dev/null +++ b/pinentry/.nvchecker.toml @@ -0,0 +1,5 @@ +[pinentry] +source = "regex" +url = "https://www.gnupg.org/ftp/gcrypt/pinentry/" +regex = "pinentry-([^\"]*)\\.tar" +exclude_regex = ".*diff.*" diff --git a/pinentry/PKGBUILD b/pinentry/PKGBUILD index 09ffe09eef..c9b4d3cb48 100644 --- a/pinentry/PKGBUILD +++ b/pinentry/PKGBUILD @@ -4,8 +4,8 @@ # Contributor: Gaetan Bisson pkgname=pinentry -pkgver=1.3.0 -pkgrel=1 +pkgver=1.3.1 +pkgrel=2 pkgdesc='Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol' url='https://gnupg.org/related_software/pinentry/' arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) @@ -13,21 +13,20 @@ license=('GPL') depends=( 'glibc' 'ncurses' 'libassuan' 'libsecret' 'glib2' libsecret-1.so libncursesw.so libassuan.so libglib-2.0.so) -makedepends=('gtk2' 'qt6-base' 'qt5-x11extras' 'kwayland5' 'gcr') +makedepends=('qt6-base' 'qt5-x11extras' 'kwayland5' 'gtk2-compat' 'gcr' 'kguiaddons' 'kwindowsystem') optdepends=( - 'gtk2: gtk2 backend' - 'qt5-x11extras: qt backend' - 'kwayland5: qt backend' - 'gcr: gnome3 backend' + 'gcr: GNOME backend' + 'gtk3: GTK backend' + 'qt5-x11extras: Qt5 backend' + 'kwayland5: Qt5 backend' + 'kguiaddons: Qt6 backend' + 'kwindowsystem: Qt6 backend' ) -backup=('etc/pinentry/preexec') source=("https://www.gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig} - 'pinentry' - 'preexec') -sha256sums=('9b3cd5226e7597f2fded399a3bc659923351536559e9db0826981bca316494de' + 'pinentry') +sha256sums=('bc72ee27c7239007ab1896c3c2fae53b076e2c9bd2483dc2769a16902bce8c04' 'SKIP' - 'af7c27139b20a7f1b9a227f3663abb21bb2b954523352b7844da27db1b0c1c86' - 'f428f08d77f1f7830eadb8435af282a833fc13d8b623b122eefd9d3b628bef90') + '2f961cccf9aebddf9c0823a96809a10296d7af6516460ae2d93e8ea5a433166d') validpgpkeys=( 'D8692123C4065DEA5E0F3AB5249B39D24F25E3B6' # Werner Koch (dist sig) '6DAA6E64A76D2840571B4902528897B826403ADA' # Werner Koch (dist signing 2020) @@ -42,20 +41,21 @@ build() { --enable-pinentry-curses \ --enable-fallback-curses \ --enable-pinentry-emacs \ - --enable-pinentry-gtk2 \ --enable-pinentry-gnome3 \ --enable-pinentry-qt \ - --enable-libsecret \ + --enable-libsecret make } package() { cd "${pkgname}-${pkgver}" - make DESTDIR="${pkgdir}" install + make DESTDIR="${pkgdir}" install install -Dm 755 ../pinentry -t "${pkgdir}/usr/bin" - install -Dm 755 ../preexec -t "${pkgdir}/etc/pinentry" + + # The -gtk backend has been built to be used with GTK3. + mv "${pkgdir}/usr/bin/pinentry-gtk"{-2,} } # vim: ts=2 sw=2 et: diff --git a/pinentry/pinentry b/pinentry/pinentry index 4115ca4a38..1d6cbfaa1c 100755 --- a/pinentry/pinentry +++ b/pinentry/pinentry @@ -1,14 +1,28 @@ -#!/bin/sh +#!/bin/bash -# user-defined pre-exec hook -test -r "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec && - . "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec +# Run user-defined and site-defined pre-exec hooks. +[[ -r "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec ]] && \ + . "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec +[[ -r /etc/pinentry/preexec ]] && . /etc/pinentry/preexec -# site-defined pre-exec hook -test -r /etc/pinentry/preexec && - . /etc/pinentry/preexec +# Guess preferred backend based on environment. +backends=(curses tty) +if [[ -n "$DISPLAY" || -n "$WAYLAND_DISPLAY" ]]; then + case "$XDG_CURRENT_DESKTOP" in + KDE|LXQT|LXQt) + backends=(qt qt5 gnome3 gtk curses tty) + ;; + *) + backends=(gnome3 gtk qt qt5 curses tty) + ;; + esac +fi -test -e /usr/lib/libgtk-x11-2.0.so.0 && - exec /usr/bin/pinentry-gtk-2 "$@" +for backend in "${backends[@]}" +do + lddout=$(ldd "/usr/bin/pinentry-$backend" 2>/dev/null) || continue + [[ "$lddout" == *'not found'* ]] && continue + exec "/usr/bin/pinentry-$backend" "$@" +done -exec /usr/bin/pinentry-curses "$@" +exit 1