[arch-commits] Commit in gnome-passwordsafe/trunk (PKGBUILD pykeepass-4.0.3.patch)

Antonio Rojas arojas at gemini.archlinux.org
Mon Jul 4 18:27:01 UTC 2022


    Date: Monday, July 4, 2022 @ 18:27:01
  Author: arojas
Revision: 1243957

Fix for pykeepass 4.0.3 (FS#57230)

Added:
  gnome-passwordsafe/trunk/pykeepass-4.0.3.patch
Modified:
  gnome-passwordsafe/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   13 ++++++++++---
 pykeepass-4.0.3.patch |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-07-04 18:25:57 UTC (rev 1243956)
+++ PKGBUILD	2022-07-04 18:27:01 UTC (rev 1243957)
@@ -2,7 +2,7 @@
 
 pkgname=gnome-passwordsafe
 pkgver=6.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Password manager for GNOME which makes use of the KeePass v.4 format"
 arch=(any)
 url="https://gitlab.gnome.org/World/PasswordSafe"
@@ -10,8 +10,10 @@
 depends=(gtk4 libadwaita libpwquality python-gobject python-pykeepass python-pyotp python-cairo)
 makedepends=(git gobject-introspection meson)
 _commit=2103661272e0f9b6b63db7103b08c818478debde
-source=("git+https://gitlab.gnome.org/World/PasswordSafe.git/#commit=$_commit")
-sha256sums=('SKIP')
+source=("git+https://gitlab.gnome.org/World/PasswordSafe.git/#commit=$_commit"
+         pykeepass-4.0.3.patch)
+sha256sums=('SKIP'
+            '93baa0b0435f6c527b834ebf389ded9bae3033f7061c3f28faef8dd6582be124')
 
 pkgver() {
   cd PasswordSafe
@@ -18,6 +20,11 @@
   git describe --tags | sed 's/-/+/g'
 }
 
+prepare() {
+  cd PasswordSafe
+  patch -p1 -i ../pykeepass-4.0.3.patch # Port to pykeepass 4.0.3
+}
+
 build() {
   arch-meson PasswordSafe build
   ninja -C build

Added: pykeepass-4.0.3.patch
===================================================================
--- pykeepass-4.0.3.patch	                        (rev 0)
+++ pykeepass-4.0.3.patch	2022-07-04 18:27:01 UTC (rev 1243957)
@@ -0,0 +1,39 @@
+From 4c1702c78d24f7357c082a409dc4ac78d5ec2dae Mon Sep 17 00:00:00 2001
+From: Maximiliano Sandoval R <msandova at protonmail.com>
+Date: Mon, 4 Jul 2022 19:34:39 +0200
+Subject: [PATCH] Update pykeepass to 4.0.3
+
+---
+diff --git a/gsecrets/safe_element.py b/gsecrets/safe_element.py
+index cef76f7dc..8bf79fb06 100644
+--- a/gsecrets/safe_element.py
++++ b/gsecrets/safe_element.py
+@@ -393,8 +393,7 @@ class SafeEntry(SafeElement):
+         self._url: str = entry.url or ""
+         self._username: str = entry.username or ""
+ 
+-        otp_uri = entry.get_custom_property("otp")
+-        if otp_uri:
++        if (otp_uri := entry.otp):
+             try:
+                 self._otp = parse_uri(otp_uri)
+             except ValueError as err:
+@@ -624,7 +623,7 @@ class SafeEntry(SafeElement):
+         if not otp and self._otp:
+             # Delete existing
+             self._otp = None
+-            self._element.delete_custom_property("otp")
++            self._element.otp = None
+             self.updated()
+         elif self._otp and self._otp.secret != otp:
+             # Changing an existing OTP
+@@ -636,7 +635,7 @@ class SafeEntry(SafeElement):
+             updated = True
+ 
+         if updated:
+-            self._element.set_custom_property("otp", self._otp.provisioning_uri())
++            self._element.otp = self._otp.provisioning_uri()
+             self.updated()
+ 
+     def otp_interval(self) -> int:
+



More information about the arch-commits mailing list