public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/duplicity] epel10.3: Fix GPG check
@ 2026-10-09 15:56 Gwyn Ciesla
  0 siblings, 0 replies; only message in thread
From: Gwyn Ciesla @ 2026-10-09 15:56 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/duplicity
Branch : epel10.3
Commit : a3dfcca7194434c46ea6b1051a1937f8f7a54eaf
Author : Gwyn Ciesla <limburgher@gmail.com>
Date   : 2017-05-01T09:59:15-05:00
Stats  : +176/-3 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/duplicity/c/a3dfcca7194434c46ea6b1051a1937f8f7a54eaf?branch=epel10.3

Log:
Fix GPG check

---
diff --git a/1278_1277.diff b/1278_1277.diff
new file mode 100644
index 0000000..21219a0
--- /dev/null
+++ b/1278_1277.diff
@@ -0,0 +1,170 @@
+=== modified file '.bzrignore'
+--- .bzrignore	2016-11-21 20:19:04 +0000
++++ .bzrignore	2017-04-20 21:11:09 +0000
+@@ -1,7 +1,7 @@
+ *.egg
+ *.log
++.DS_Store
+ ._.DS_Store
+-.DS_Store
+ .eggs
+ .idea
+ .project
+@@ -17,4 +17,5 @@
+ po/duplicity.pot-e
+ random_seed
+ testfiles
++testing/gnupg/.gpg-v21-migrated
+ testing/gnupg/private-keys-v1.d
+
+=== modified file 'CHANGELOG'
+--- CHANGELOG	2017-03-21 20:03:22 +0000
++++ CHANGELOG	2017-04-20 21:11:09 +0000
+@@ -1,3 +1,10 @@
++New in v0.7.13 (2017/??/??)
++---------------------------
++* Fixed bug #1680682 with patch supplied from Dave Allan
++  - Only specify --pinentry-mode=loopback when --use-agent is not specified
++* Fixed man page that had 'cancel' instead of 'loopback' for pinentry mode
++
++
+ New in v0.7.12 (2017/03/21)
+ ---------------------------
+ * Fixed bug #1623342 with patch supplied by Daniel Jakots
+
+=== modified file 'Changelog.GNU'
+--- Changelog.GNU	2017-03-21 20:03:22 +0000
++++ Changelog.GNU	2017-04-20 21:11:09 +0000
+@@ -1,3 +1,9 @@
++2017-04-20  Kenneth Loafman  <kenneth@loafman.com>
++
++    * Fixed bug #1680682 with patch supplied from Dave Allan
++      - Only specify --pinentry-mode=loopback when --use-agent is not specified
++    * Fixed man page that had 'cancel' instead of 'loopback' for pinentry mode
++
+ 2017-03-21  Kenneth Loafman  <kenneth@loafman.com>
+ 
+     * Prep for 0.7.12
+
+=== modified file 'README'
+--- README	2016-08-12 20:50:29 +0000
++++ README	2017-04-20 21:11:09 +0000
+@@ -34,6 +34,7 @@
+ 
+  * Python development files, normally found in module 'python-dev'.
+  * librsync development files, normally found in module 'librsync-dev'.
++ * internationalization tools, normally found in module 'intltool'.
+ 
+ 
+ A NOTE ON GnuPGInterface.py AND MULTIPLE GPG PROCESSES:
+
+=== modified file 'bin/duplicity.1'
+--- bin/duplicity.1	2017-02-11 15:51:09 +0000
++++ bin/duplicity.1	2017-04-20 21:11:09 +0000
+@@ -931,7 +931,7 @@
+ .B Note:
+ Contrary to previous versions of duplicity, this option will also be honored
+ by GnuPG 2 and newer versions. If GnuPG 2 is in use, duplicity passes the option
+-.I --pinentry-mode=cancel
++.I --pinentry-mode=loopback
+ to the the gpg process unless
+ .I --use-agent
+ is specified on the duplicity command line. This has the effect that GnuPG 2
+
+=== modified file 'duplicity/gpg.py'
+--- duplicity/gpg.py	2017-02-11 17:06:01 +0000
++++ duplicity/gpg.py	2017-04-20 21:11:09 +0000
+@@ -26,6 +26,7 @@
+ """
+ 
+ import os
++import sys
+ import types
+ import tempfile
+ import re
+@@ -35,6 +36,7 @@
+ 
+ from duplicity import globals
+ from duplicity import gpginterface
++from duplicity import log
+ from duplicity import tempdir
+ from duplicity import util
+ 
+@@ -134,13 +136,26 @@
+             gnupg.call = globals.gpg_binary
+         gnupg.options.meta_interactive = 0
+         gnupg.options.extra_args.append('--no-secmem-warning')
+-        if globals.use_agent and profile.gpg_version < (2, 0, 0):
+-            # gpg2 always requires the agent where gpg1 does not
+-            gnupg.options.extra_args.append('--use-agent')
+-        if profile.gpg_version >= (2, 1, 0):
+-            # This forces gpg2 to ignore the agent.
+-            # Necessary to enforce truly non-interactive operation.
+-            gnupg.options.extra_args.append('--pinentry-mode=loopback')
++
++        # Support three versions of gpg present 1.x, 2.0.x, 2.1.x
++        if profile.gpg_version[:1] == (1,):
++            if globals.use_agent:
++                # gpg1 agent use is optional
++                gnupg.options.extra_args.append('--use-agent')
++
++        elif profile.gpg_version[:2] == (2, 0):
++            pass
++
++        elif profile.gpg_version[:2] >= (2, 1):
++            if not globals.use_agent:
++                # This forces gpg2 to ignore the agent.
++                # Necessary to enforce truly non-interactive operation.
++                gnupg.options.extra_args.append('--pinentry-mode=loopback')
++
++        else:
++            raise GPGError("Unsupported GNUPG version, %s" % profile.gpg_version)
++
++        # User supplied options added later, can override ours
+         if globals.gpg_options:
+             for opt in globals.gpg_options.split():
+                 gnupg.options.extra_args.append(opt)
+@@ -181,7 +196,7 @@
+                            attach_fhs={'stdout': encrypt_path.open("wb"),
+                                        'stderr': self.stderr_fp,
+                                        'logger': self.logger_fp})
+-            if not(globals.use_agent):
++            if not globals.use_agent:
+                 p1.handles['passphrase'].write(passphrase)
+                 p1.handles['passphrase'].close()
+             self.gpg_input = p1.handles['stdin']
+@@ -240,7 +255,10 @@
+         for fp in (self.logger_fp, self.stderr_fp):
+             fp.seek(0)
+             for line in fp:
+-                msg += unicode(line.strip(), locale.getpreferredencoding(), 'replace') + u"\n"
++                try:
++                    msg += unicode(line.strip(), locale.getpreferredencoding(), 'replace') + u"\n"
++                except Exception as e:
++                    msg += line.strip() + u"\n"
+         msg += u"===== End GnuPG log =====\n"
+         if not (msg.find(u"invalid packet (ctb=14)") > -1):
+             raise GPGError(msg)
+
+=== modified file 'po/duplicity.pot'
+--- po/duplicity.pot	2017-02-11 17:06:01 +0000
++++ po/duplicity.pot	2017-04-20 21:11:09 +0000
+@@ -8,7 +8,7 @@
+ msgstr ""
+ "Project-Id-Version: PACKAGE VERSION\n"
+ "Report-Msgid-Bugs-To: Kenneth Loafman <kenneth@loafman.com>\n"
+-"POT-Creation-Date: 2017-02-11 10:19-0600\n"
++"POT-Creation-Date: 2017-04-20 15:59-0500\n"
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+ "Language-Team: LANGUAGE <LL@li.org>\n"
+@@ -1309,7 +1309,7 @@
+ "succeeded"
+ msgstr ""
+ 
+-#: ../duplicity/backends/pydrivebackend.py:142
++#: ../duplicity/backends/pydrivebackend.py:143
+ #, python-format
+ msgid "PyDrive backend: multiple files called '%s'."
+ msgstr ""
+

diff --git a/duplicity.spec b/duplicity.spec
index 76adba6..069a5f8 100644
--- a/duplicity.spec
+++ b/duplicity.spec
@@ -3,12 +3,12 @@
 Summary:        Encrypted bandwidth-efficient backup using rsync algorithm
 Name:           duplicity
 Version:        0.7.12
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        GPLv2+
 Group:          Applications/Archiving
 URL:            http://www.nongnu.org/duplicity/
 Source:         http://savannah.nongnu.org/download/%{name}/%{name}-%{version}.tar.gz
-#Patch0:         duplicity-0.7.01-librsync-1.0.0.patch
+Patch0:         1278_1277.diff
 Requires:       python-GnuPGInterface >= 0.3.2, gnupg >= 1.0.6
 Requires:       openssh-clients, ncftp >= 3.1.9, rsync, python-boto >= 0.9d
 Requires:       python-paramiko python-dropbox python-lockfile python-pexpect
@@ -35,7 +35,7 @@ but not hard links.
 
 %prep
 %setup -q
-#%patch0 -p1 -b .librsync-1.0.0
+%patch0 -p0
 
 %build
 %{__python} setup.py build
@@ -73,6 +73,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/%{name}/cacert.pem
 
 %changelog
+* Mon May 01 2017 Gwyn Ciesla <limburgher@gmail.com> - 0.7.12-2
+- Fix gpg agent, BZ 1439455.
+
 * Wed Mar 22 2017 Gwyn Ciesla <limburgher@gmail.com> - 0.7.12-1
 - 0.7.12, BZ 1434625.
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-09 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 15:56 [rpms/duplicity] epel10.3: Fix GPG check Gwyn Ciesla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox