diff --git a/pinentry-1.2.0.tar.bz2 b/pinentry-1.2.0.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..975c090270be53340bdcd770b0752df61ad115e6 Binary files /dev/null and b/pinentry-1.2.0.tar.bz2 differ diff --git a/pinentry-1.2.0.tar.bz2.sig b/pinentry-1.2.0.tar.bz2.sig new file mode 100644 index 0000000000000000000000000000000000000000..4fa199b973ff34c257d59b99d1e146b08160c25e Binary files /dev/null and b/pinentry-1.2.0.tar.bz2.sig differ diff --git a/pinentry-wrapper b/pinentry-wrapper new file mode 100755 index 0000000000000000000000000000000000000000..e4318dfec06a95b5d3d21f6b91114047c96405e2 --- /dev/null +++ b/pinentry-wrapper @@ -0,0 +1,80 @@ +#!/usr/bin/sh + +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 Fedora Project +# Copyright (c) 2014-2015 Red Hat +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugzilla.redhat.com/ +# +# Anna Bernathova 2006 +# Pavel Nemec 2006 +# Rex Dieter 2009 +# Pavol Rusnak 2009 +# Boris Ranto 2014 +# +# use proper binary (pinentry-qt, pinentry-gnome, pinentry-gtk-2 or pinentry-curses) + +kde_running= +arg= +display= +# look for a --display option +for opt in "$@"; do + if [ "$opt" = "--display" ]; then + arg=1 + elif [ -n "$arg" ]; then + display="$opt" + else + arg= + fi +done + +# export DISPLAY if pinentry is meant to be run on a different display +# check the KDE_FULL_SESSION variable otherwise +if [ -n "$display" ] && [ "$DISPLAY" != "$display" ]; then + export DISPLAY="$display" +elif [ -n "$KDE_FULL_SESSION" ]; then + kde_running=1 +fi + +# Check for presence of xprop binary +type xprop >/dev/null 2>/dev/null +XPROP=$? + +if [ -n "$DISPLAY" ] && [ $XPROP -eq 0 ]; then + xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null + if test $? -eq 0; then + kde_running=1 + fi +fi + +# if a user supplied a pinentry binary, use it +if [ -n "$PINENTRY_BINARY" ]; +then + export PINENTRY_BINARY="$PINENTRY_BINARY" +# if KDE is detected and pinentry-qt exists, use pinentry-qt +elif [ -n "$kde_running" ] && [ -x /usr/bin/pinentry-qt ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt" +# otherwise test if pinentry-gnome3 is installed +elif [ -n "$DISPLAY" ] && [ -x /usr/bin/pinentry-gnome3 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-gnome3" +# otherwise test if pinentry-gtk-2 is installed +elif [ -n "$DISPLAY" ] && [ -x /usr/bin/pinentry-gtk-2 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-gtk-2" +# otherwise test if pinentry-qt exists although KDE is not detected +elif [ -n "$DISPLAY" ] && [ -x /usr/bin/pinentry-qt ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt" +# use pinentry-tty if installed +elif [ -x /usr/bin/pinentry-tty ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-tty" +# pinentry-curses is installed by default +else + export PINENTRY_BINARY="/usr/bin/pinentry-curses" +fi +exec $PINENTRY_BINARY "$@" diff --git a/pinentry.spec b/pinentry.spec new file mode 100644 index 0000000000000000000000000000000000000000..10632fdad93c10b17c2964655efa859ef782011c --- /dev/null +++ b/pinentry.spec @@ -0,0 +1,150 @@ +%define anolis_release 1 +Name: pinentry +Version: 1.2.0 +Release: %{anolis_release}%{?dist} +Summary: Collection of simple PIN or passphrase entry dialogs + +License: GPLv2+ +URL: https://www.gnupg.org/ +Source0: https://gnupg.org/ftp/gcrypt/pinentry/%{name}-%{version}.tar.bz2 +Source1: https://gnupg.org/ftp/gcrypt/pinentry/%{name}-%{version}.tar.bz2.sig + + +# borrowed from opensuse +Source10: pinentry-wrapper + +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcr-devel +BuildRequires: gtk2-devel +BuildRequires: libcap-devel +BuildRequires: ncurses-devel +BuildRequires: libgpg-error-devel +BuildRequires: libassuan-devel +BuildRequires: libsecret-devel +BuildRequires: pkgconfig(Qt5Core) pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets) + +Requires(pre): %{_sbindir}/update-alternatives + +Provides: %{name}-curses = %{version}-%{release} + +%description +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the curses (text) based version of the PIN entry dialog. + +%package gnome3 +Summary: Passphrase/PIN entry dialog for GNOME 3 +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} +%description gnome3 +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the GNOME 3 version of the PIN entry dialog. + +%package gtk +Summary: Passphrase/PIN entry dialog based on GTK+ +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} +Provides: pinentry-gtk2 = %{version}-%{release} +%description gtk +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the GTK GUI based version of the PIN entry dialog. + +%package qt +Summary: Passphrase/PIN entry dialog based on Qt5 +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} +Obsoletes: pinentry-qt4 < 0.8.0-2 +Provides: pinentry-qt5 = %{version}-%{release} +%description qt +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the Qt4 GUI based version of the PIN entry dialog. + +%package emacs +Summary: Passphrase/PIN entry dialog based on emacs +Requires: %{name} = %{version}-%{release} +%description emacs +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the emacs based version of the PIN entry dialog. + +%package tty +Summary: Passphrase/PIN entry dialog in tty +Requires: %{name} = %{version}-%{release} +%description tty +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the tty version of the PIN entry dialog. + +%prep +%setup -q + + +%build +%configure \ + --disable-rpath \ + --disable-dependency-tracking \ + --without-libcap \ + --disable-pinentry-fltk \ + --enable-pinentry-gnome3 \ + --enable-pinentry-gtk2 \ + --enable-pinentry-qt5 \ + --enable-pinentry-emacs \ + --enable-pinentry-tty \ + --enable-libsecret + +%make_build + + +%install +%make_install + +# Symlink for Backward compatibility +ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk +ln -s pinentry-qt $RPM_BUILD_ROOT%{_bindir}/pinentry-qt4 + +install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pinentry + +# unpackaged files +rm -fv $RPM_BUILD_ROOT%{_infodir}/dir + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README THANKS TODO +%{_bindir}/pinentry-curses +%{_bindir}/pinentry +%{_infodir}/pinentry.info* + +%files gnome3 +%{_bindir}/pinentry-gnome3 + +%files gtk +%{_bindir}/pinentry-gtk-2 +# symlink for backward compatibility +%{_bindir}/pinentry-gtk + +%files qt +%{_bindir}/pinentry-qt +# symlink for backward compatibility +%{_bindir}/pinentry-qt4 + +%files emacs +%{_bindir}/pinentry-emacs + +%files tty +%{_bindir}/pinentry-tty + +%changelog +* Fri Mar 04 2022 mgb01105731 - 1.2.0-1 +- Init from upstream version 1.2.0 + +