public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/system-config-printer/files/, app-admin/system-config-printer/
@ 2020-10-25  0:28 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2020-10-25  0:28 UTC (permalink / raw
  To: gentoo-commits

commit:     b94cda060272b6fe1db3c1d8b3a9a10e9c6b5d89
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 24 16:50:26 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 25 00:27:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b94cda06

app-admin/system-config-printer: EAPI-7 bump, gnome2--

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...stem-config-printer-1.5.12-check-for-null.patch | 102 +++++++++------------
 .../system-config-printer-1.5.12-r2.ebuild         |  22 ++---
 2 files changed, 55 insertions(+), 69 deletions(-)

diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch
index 1c03bbd193f..b0df809c939 100644
--- a/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch
+++ b/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch
@@ -1,58 +1,46 @@
-From cf9903466c1a2d18a701f3b5e8c7e03483e1244d Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Mon, 14 Oct 2019 16:39:28 +0200
-Subject: [PATCH] udev-configure-printer: Add checks for NULL
-
----
- NEWS                          |  1 +
- udev/udev-configure-printer.c | 12 +++++++++---
- 2 files changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index f4b774e5c..0b53aa8ef 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,5 +1,6 @@
- 1.5.13 changes
- --------------
-+- add checks for NULL in udev-configure-printer (Fedora #1761097)
+From cf9903466c1a2d18a701f3b5e8c7e03483e1244d Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Mon, 14 Oct 2019 16:39:28 +0200
+Subject: [PATCH] udev-configure-printer: Add checks for NULL
+
+---
+ udev/udev-configure-printer.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
+index 83092fc21..d753bbeaf 100644
+--- a/udev/udev-configure-printer.c
++++ b/udev/udev-configure-printer.c
+@@ -1411,7 +1411,7 @@ for_each_matching_queue (struct device_uris *device_uris,
+       const char *printer_state_message = NULL;
+       int state = 0;
+       size_t i, l;
+-      char *this_device_uri_n, *device_uri_n;
++      char *this_device_uri_n = NULL, *device_uri_n = NULL;
+       const char *ps1, *ps2, *pi1, *pi2;
  
- 1.5.12 changes
- --------------
-diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
-index 83092fc21..d753bbeaf 100644
---- a/udev/udev-configure-printer.c
-+++ b/udev/udev-configure-printer.c
-@@ -1411,7 +1411,7 @@ for_each_matching_queue (struct device_uris *device_uris,
-       const char *printer_state_message = NULL;
-       int state = 0;
-       size_t i, l;
--      char *this_device_uri_n, *device_uri_n;
-+      char *this_device_uri_n = NULL, *device_uri_n = NULL;
-       const char *ps1, *ps2, *pi1, *pi2;
- 
-       while (attr && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
-@@ -1448,6 +1448,8 @@ for_each_matching_queue (struct device_uris *device_uris,
-       for (i = 0; i < device_uris->n_uris; i++)
- 	{
- 	  device_uri_n = normalize_device_uri(device_uris->uri[i]);
-+          if (this_device_uri_n == NULL || device_uri_n == NULL)
-+            goto skip;
- 	  /* As for the same device different URIs can come out when the
- 	     device is accessed via the usblp kernel module or via low-
- 	     level USB (libusb) we cannot simply compare URIs, must
-@@ -1512,8 +1514,12 @@ for_each_matching_queue (struct device_uris *device_uris,
-       firstqueue = 0;
- 
-     skip:
--      free(device_uri_n);
--      free(this_device_uri_n);
-+      if (device_uri_n != NULL)
-+        free(device_uri_n);
-+        device_uri_n = NULL;
-+      if (this_device_uri_n != NULL)
-+        free(this_device_uri_n);
-+        this_device_uri_n = NULL;
-       if (!attr)
- 	break;
-     }
+       while (attr && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
+@@ -1448,6 +1448,8 @@ for_each_matching_queue (struct device_uris *device_uris,
+       for (i = 0; i < device_uris->n_uris; i++)
+ 	{
+ 	  device_uri_n = normalize_device_uri(device_uris->uri[i]);
++          if (this_device_uri_n == NULL || device_uri_n == NULL)
++            goto skip;
+ 	  /* As for the same device different URIs can come out when the
+ 	     device is accessed via the usblp kernel module or via low-
+ 	     level USB (libusb) we cannot simply compare URIs, must
+@@ -1512,8 +1514,12 @@ for_each_matching_queue (struct device_uris *device_uris,
+       firstqueue = 0;
+ 
+     skip:
+-      free(device_uri_n);
+-      free(this_device_uri_n);
++      if (device_uri_n != NULL)
++        free(device_uri_n);
++        device_uri_n = NULL;
++      if (this_device_uri_n != NULL)
++        free(this_device_uri_n);
++        this_device_uri_n = NULL;
+       if (!attr)
+ 	break;
+     }

diff --git a/app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild b/app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild
index c97eaf9b4f2..c0544a091b8 100644
--- a/app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild
+++ b/app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild
@@ -1,19 +1,19 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 PYTHON_COMPAT=( python3_{7,8,9} )
 PYTHON_REQ_USE="xml"
-inherit gnome2 python-single-r1 systemd
+inherit python-single-r1 systemd xdg
 
 DESCRIPTION="Graphical user interface for CUPS administration"
 HOMEPAGE="https://github.com/OpenPrinting/system-config-printer"
 SRC_URI="https://github.com/OpenPrinting/${PN}/releases/download/${PV}/${P}.tar.xz"
 
 LICENSE="GPL-2+"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE="gnome-keyring policykit"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
@@ -68,19 +68,17 @@ pkg_setup() {
 }
 
 src_configure() {
-	gnome2_src_configure \
-		--enable-nls \
-		--with-desktop-vendor=Gentoo \
-		--with-udev-rules \
+	local myeconfargs=(
+		--enable-nls
+		--with-desktop-vendor=Gentoo
+		--with-udev-rules
 		--with-systemdsystemunitdir=$(systemd_get_systemunitdir)
-}
-
-src_compile() {
-	gnome2_src_compile
+	)
+	econf "${myeconfargs[@]}"
 }
 
 src_install() {
-	gnome2_src_install
+	default
 	python_fix_shebang "${ED}"
 	python_optimize
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/system-config-printer/files/, app-admin/system-config-printer/
@ 2020-10-25  0:28 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2020-10-25  0:28 UTC (permalink / raw
  To: gentoo-commits

commit:     14a30e74032de0399de3e8ffefbf04c2316070a5
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 24 16:15:53 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 25 00:27:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14a30e74

app-admin/system-config-printer: python3_9 w/ required fixes

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...config-printer-1.5.12-catch-urllib-errors.patch |  22 +++
 ...config-printer-1.5.12-fix-remember-passwd.patch | 121 +++++++++++++++++
 .../system-config-printer-1.5.12-py39-1.patch      |  45 +++++++
 .../system-config-printer-1.5.12-py39-2.patch      | 147 +++++++++++++++++++++
 .../system-config-printer-1.5.12-r2.ebuild         |  86 ++++++++++++
 5 files changed, 421 insertions(+)

diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-catch-urllib-errors.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-catch-urllib-errors.patch
new file mode 100644
index 00000000000..fbae8442615
--- /dev/null
+++ b/app-admin/system-config-printer/files/system-config-printer-1.5.12-catch-urllib-errors.patch
@@ -0,0 +1,22 @@
+From feed693225cc0c26464bfc0adef21da72581e811 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Thu, 28 Nov 2019 15:45:22 +0100
+Subject: [PATCH] Catch errors from urllib too
+
+---
+ newprinter.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/newprinter.py b/newprinter.py
+index 8b9298887..6c71ec578 100644
+--- a/newprinter.py
++++ b/newprinter.py
+@@ -4183,7 +4183,7 @@ def getNPPPD(self):
+                                 tmpf.flush ()
+                                 ppd = cups.PPD(tmpf.name)
+ 
+-        except RuntimeError as e:
++        except (RuntimeError, urllib.error.HTTPError) as e:
+             debugprint ("RuntimeError: " + repr (e))
+             if self.rbtnNPFoomatic.get_active():
+                 # Foomatic database problem of some sort.

diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-remember-passwd.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-remember-passwd.patch
new file mode 100644
index 00000000000..980d1e03154
--- /dev/null
+++ b/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-remember-passwd.patch
@@ -0,0 +1,121 @@
+From b74c701feb52a1d2865fe1d33c393f71ae3ac47a Mon Sep 17 00:00:00 2001
+From: Ave Ozkal <ave@ave.zone>
+Date: Thu, 19 Mar 2020 13:30:23 +0300
+Subject: [PATCH 1/3] jobviewer: Use sync methods for secret.service
+
+---
+ jobviewer.py | 28 +++++++++-------------------
+ 1 file changed, 9 insertions(+), 19 deletions(-)
+
+diff --git a/jobviewer.py b/jobviewer.py
+index b95bf6c58..ba8abd06f 100644
+--- a/jobviewer.py
++++ b/jobviewer.py
+@@ -91,36 +91,26 @@
+     class ServiceGet:
+         service = Secret.Service()
+     
+-        def on_get_service(self, source, result, unused):
+-            service = Secret.Service.get_finish(result)
+-    
+         def __init__(self):
+-            Secret.Service.get(0,
+-                               None,
+-                               self.on_get_service,
+-                               None)
++            self.service = Secret.Service.get(0,
++                                              None)
+     
+         def get_service(self):
+-            return ServiceGet.service
++            return self.service
+     
+     
+     class ItemSearch:
+         items = list()
+     
+-        def on_search_item(self, source, result, unused):
+-            items = Secret.Service.search_finish(None, result)
+-    
+         def __init__(self, service, attrs):
+-            Secret.Service.search(service,
+-                                  NETWORK_PASSWORD,
+-                                  attrs,
+-                                  Secret.SearchFlags.LOAD_SECRETS,
+-                                  None,
+-                                  self.on_search_item,
+-                                  None)
++            self.items = Secret.Service.search_sync(service,
++                                                    NETWORK_PASSWORD,
++                                                    attrs,
++                                                    Secret.SearchFlags.LOAD_SECRETS,
++                                                    None)
+     
+         def get_items(self):
+-            return ItemSearch.items
++            return self.items
+     
+     
+     class PasswordStore:
+
+From 152b617f511cd44757d2db4d730067aca8cf69a9 Mon Sep 17 00:00:00 2001
+From: Ave Ozkal <ave@ave.zone>
+Date: Thu, 19 Mar 2020 14:39:21 +0300
+Subject: [PATCH 2/3] jobviewer: properly use sync
+
+---
+ jobviewer.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/jobviewer.py b/jobviewer.py
+index ba8abd06f..761673b49 100644
+--- a/jobviewer.py
++++ b/jobviewer.py
+@@ -92,8 +92,8 @@ class ServiceGet:
+         service = Secret.Service()
+     
+         def __init__(self):
+-            self.service = Secret.Service.get(0,
+-                                              None)
++            self.service = Secret.Service.get_sync(0,
++                                                   None)
+     
+         def get_service(self):
+             return self.service
+
+From 00177768ca1464c694acde4cdbabc1a18420c176 Mon Sep 17 00:00:00 2001
+From: Ave Ozkal <ave@ave.zone>
+Date: Thu, 19 Mar 2020 14:40:55 +0300
+Subject: [PATCH 3/3] jobviewer: Properly fetch username and password
+
+---
+ jobviewer.py | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+diff --git a/jobviewer.py b/jobviewer.py
+index 761673b49..5376a7e88 100644
+--- a/jobviewer.py
++++ b/jobviewer.py
+@@ -1049,20 +1049,10 @@ def get_authentication (self, job, device_uri, printer_uri,
+                     if items:
+                         auth_info = ['' for x in auth_info_required]
+                         ind = auth_info_required.index ('username')
+-
+-                        for attr in items[0].attributes:
+-                            # It might be safe to assume here that the
+-                            # user element is always the second item in a
+-                            # NETWORK_PASSWORD element but lets make sure.
+-                            if attr.name == 'user':
+-                                auth_info[ind] = attr.get_string()
+-                                break
+-                        else:
+-                            debugprint ("Did not find username keyring "
+-                                        "attributes.")
++                        auth_info[ind] = items[0].get_attributes().get("user")
+ 
+                         ind = auth_info_required.index ('password')
+-                        auth_info[ind] = items[0].secret
++                        auth_info[ind] = items[0].get_secret().get().decode()
+                         break
+                 else:
+                     debugprint ("Failed to find secret in keyring.")

diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-py39-1.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-py39-1.patch
new file mode 100644
index 00000000000..658a63d65c7
--- /dev/null
+++ b/app-admin/system-config-printer/files/system-config-printer-1.5.12-py39-1.patch
@@ -0,0 +1,45 @@
+From cf7a74217558b19aff7c21a724878bcc15dc4e38 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Mon, 5 Oct 2020 09:26:40 +0200
+Subject: [PATCH] isAlive() is removed, use is_alive()
+
+---
+ asyncipp.py | 2 +-
+ timedops.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/asyncipp.py b/asyncipp.py
+index 5bc160e0f..61cd72136 100644
+--- a/asyncipp.py
++++ b/asyncipp.py
+@@ -269,7 +269,7 @@ def destroy (self):
+         for binding in self.bindings:
+             delattr (self, binding)
+ 
+-        if self.thread.isAlive ():
++        if self.thread.is_alive ():
+             debugprint ("Stopping worker thread")
+             self.thread.stop ()
+             GLib.timeout_add_seconds (1, self._reap_thread)
+diff --git a/timedops.py b/timedops.py
+index 8a8741c82..111d575f6 100644
+--- a/timedops.py
++++ b/timedops.py
+@@ -157,7 +157,7 @@ def run (self):
+             self.exception = e
+ 
+     def collect_result (self):
+-        if self.isAlive ():
++        if self.is_alive ():
+             # We've been canceled.
+             raise OperationCanceled()
+ 
+@@ -212,7 +212,7 @@ def run (self):
+         return self.thread.collect_result ()
+ 
+     def _check_thread (self):
+-        if self.thread.isAlive ():
++        if self.thread.is_alive ():
+             # Thread still running.
+             return True
+ 

diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-py39-2.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-py39-2.patch
new file mode 100644
index 00000000000..eccb3939e0d
--- /dev/null
+++ b/app-admin/system-config-printer/files/system-config-printer-1.5.12-py39-2.patch
@@ -0,0 +1,147 @@
+From 63eccd5603e19cd35d6d44af65443665a3c63f38 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Wed, 22 Jul 2020 13:57:13 +0200
+Subject: [PATCH] python3.9 - xml module removed elem.getchildren() method, use
+ list(elem)
+
+---
+ cupshelpers/openprinting.py   |  6 +++---
+ cupshelpers/xmldriverprefs.py | 20 ++++++++++----------
+ xml/validate.py               | 10 +++++-----
+ 3 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/cupshelpers/openprinting.py b/cupshelpers/openprinting.py
+index c616d913c..9bb4764c9 100755
+--- a/cupshelpers/openprinting.py
++++ b/cupshelpers/openprinting.py
+@@ -338,7 +338,7 @@ def parse_result (status, data, result):
+                     packages = {}
+                     container = driver.find ('packages')
+                     if container is not None:
+-                        for arch in container.getchildren ():
++                        for arch in list(container):
+                             rpms = {}
+                             for package in arch.findall ('package'):
+                                 rpm = {}
+@@ -351,7 +351,7 @@ def parse_result (status, data, result):
+ 
+                                 repositories = package.find ('repositories')
+                                 if repositories is not None:
+-                                    for pkgsys in repositories.getchildren ():
++                                    for pkgsys in list(repositories):
+                                         rpm.setdefault('repositories', {})[pkgsys.tag] = pkgsys.text
+ 
+                                 rpms[package.attrib['file']] = rpm
+@@ -363,7 +363,7 @@ def parse_result (status, data, result):
+                     ppds = []
+                     container = driver.find ('ppds')
+                     if container is not None:
+-                        for each in container.getchildren ():
++                        for each in list(container):
+                             ppds.append (each.text)
+ 
+                     if ppds:
+diff --git a/cupshelpers/xmldriverprefs.py b/cupshelpers/xmldriverprefs.py
+index 4177e1c0f..0d02950f4 100644
+--- a/cupshelpers/xmldriverprefs.py
++++ b/cupshelpers/xmldriverprefs.py
+@@ -27,7 +27,7 @@
+ 
+ def PreferredDrivers (filename):
+     preferreddrivers = xml.etree.ElementTree.XML (open (filename).read ())
+-    return preferreddrivers.getchildren()
++    return list(preferreddrivers)
+ 
+ class DeviceIDMatch:
+     """
+@@ -227,10 +227,10 @@ def load (self, drivertypes):
+         """
+ 
+         types = []
+-        for drivertype in drivertypes.getchildren ():
++        for drivertype in list(drivertypes):
+             t = DriverType (drivertype.attrib["name"])
+ 
+-            for child in drivertype.getchildren ():
++            for child in list(drivertype):
+                 if child.tag == "ppdname":
+                     t.add_ppd_name (child.attrib["match"])
+                 elif child.tag == "attribute":
+@@ -238,7 +238,7 @@ def load (self, drivertypes):
+                                      child.attrib["match"])
+                 elif child.tag == "deviceid":
+                     deviceid_match = DeviceIDMatch ()
+-                    for field in child.getchildren ():
++                    for field in list(child):
+                         if field.tag == "field":
+                             deviceid_match.add_field (field.attrib["name"],
+                                                       field.attrib["match"])
+@@ -414,29 +414,29 @@ def load (self, preferreddrivers):
+         Load the policy from an XML file.
+         """
+ 
+-        for printer in preferreddrivers.getchildren ():
++        for printer in list(preferreddrivers):
+             ptype = PrinterType ()
+-            for child in printer.getchildren ():
++            for child in list(printer):
+                 if child.tag == "make-and-model":
+                     ptype.add_make_and_model (child.attrib["match"])
+                 elif child.tag == "deviceid":
+                     deviceid_match = DeviceIDMatch ()
+-                    for field in child.getchildren ():
++                    for field in list(child):
+                         if field.tag == "field":
+                             deviceid_match.add_field (field.attrib["name"],
+                                                       field.attrib["match"])
+                     ptype.add_deviceid_match (deviceid_match)
+ 
+                 elif child.tag == "drivers":
+-                    for drivertype in child.getchildren ():
++                    for drivertype in list(child):
+                         ptype.add_drivertype_pattern (drivertype.text)
+ 
+                 elif child.tag == "avoid":
+-                    for drivertype in child.getchildren ():
++                    for drivertype in list(child):
+                         ptype.add_avoidtype_pattern (drivertype.text)
+ 
+                 elif child.tag == "blacklist":
+-                    for drivertype in child.getchildren ():
++                    for drivertype in list(child):
+                         ptype.add_blacklisted (drivertype.text)
+ 
+             self.ptypes.append (ptype)
+diff --git a/xml/validate.py b/xml/validate.py
+index 8fc201ecf..ba16766dc 100644
+--- a/xml/validate.py
++++ b/xml/validate.py
+@@ -35,23 +35,23 @@ def validate (self):
+         filename = self._filename
+         print ("Validating %s" % filename)
+         preferreddrivers = xml.etree.ElementTree.XML (open (filename).read ())
+-        (drivertypes, preferenceorder) = preferreddrivers.getchildren ()
++        (drivertypes, preferenceorder) = list(preferreddrivers)
+         validates = True
+ 
+         names = set()
+-        for drivertype in drivertypes.getchildren ():
++        for drivertype in list(drivertypes):
+             name = drivertype.get ("name")
+             names.add (name)
+ 
+-        for printer in preferenceorder.getchildren ():
++        for printer in list(preferenceorder):
+             types = []
+             drivers = printer.find ("drivers")
+             if drivers is not None:
+-                types.extend (drivers.getchildren ())
++                types.extend (list(drivers))
+ 
+             blacklist = printer.find ("blacklist")
+             if blacklist is not None:
+-                types.extend (blacklist.getchildren ())
++                types.extend (list(blacklist))
+ 
+             for drivertype in types:
+                 pattern = drivertype.text.strip ()

diff --git a/app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild b/app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild
new file mode 100644
index 00000000000..c97eaf9b4f2
--- /dev/null
+++ b/app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_REQ_USE="xml"
+inherit gnome2 python-single-r1 systemd
+
+DESCRIPTION="Graphical user interface for CUPS administration"
+HOMEPAGE="https://github.com/OpenPrinting/system-config-printer"
+SRC_URI="https://github.com/OpenPrinting/${PN}/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+SLOT="0"
+IUSE="gnome-keyring policykit"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Needs cups running, bug 284005
+RESTRICT="test"
+
+# Additional unhandled dependencies
+# gnome-extra/gnome-packagekit[${PYTHON_USEDEP}] with pygobject:2 ?
+# python samba client: smbc
+# selinux: needed for troubleshooting
+COMMON_DEPEND="${PYTHON_DEPS}
+	dev-libs/glib:2
+	net-print/cups[dbus]
+	virtual/libusb:1
+	>=virtual/udev-172
+	x11-libs/gtk+:3[introspection]
+	x11-libs/libnotify[introspection]
+	x11-libs/pango[introspection]
+"
+DEPEND="${COMMON_DEPEND}
+	app-text/docbook-xml-dtd:4.1.2
+	>=app-text/xmlto-0.0.22
+	dev-perl/XML-Parser
+	dev-util/desktop-file-utils
+	dev-util/intltool
+	sys-devel/gettext
+	virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+	$(python_gen_cond_dep '
+		dev-python/dbus-python[${PYTHON_MULTI_USEDEP}]
+		dev-python/pycairo[${PYTHON_MULTI_USEDEP}]
+		dev-python/pycups[${PYTHON_MULTI_USEDEP}]
+		dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
+		dev-python/requests[${PYTHON_MULTI_USEDEP}]
+		dev-python/urllib3[${PYTHON_MULTI_USEDEP}]
+	')
+	gnome-keyring? ( app-crypt/libsecret[introspection] )
+	policykit? ( net-print/cups-pk-helper )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-check-for-null.patch
+	"${FILESDIR}"/${P}-fix-abrt-in-udev-configure-printer.patch
+	"${FILESDIR}"/${P}-catch-urllib-errors.patch
+	"${FILESDIR}"/${P}-fix-remember-passwd.patch
+	"${FILESDIR}"/${P}-py39-{1,2}.patch
+)
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+src_configure() {
+	gnome2_src_configure \
+		--enable-nls \
+		--with-desktop-vendor=Gentoo \
+		--with-udev-rules \
+		--with-systemdsystemunitdir=$(systemd_get_systemunitdir)
+}
+
+src_compile() {
+	gnome2_src_compile
+}
+
+src_install() {
+	gnome2_src_install
+	python_fix_shebang "${ED}"
+	python_optimize
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/system-config-printer/files/, app-admin/system-config-printer/
@ 2020-11-27  8:51 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2020-11-27  8:51 UTC (permalink / raw
  To: gentoo-commits

commit:     12f94d91c28937eee58cd8071fa64b52fa9bf898
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 27 08:48:23 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 27 08:48:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12f94d91

app-admin/system-config-printer: Drop 1.5.12-r1

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-admin/system-config-printer/Manifest           |  1 -
 ...stem-config-printer-1.5.12-check-for-null.patch | 46 ------------
 ...1.5.12-fix-abrt-in-udev-configure-printer.patch | 72 -------------------
 .../system-config-printer-1.5.12-r1.ebuild         | 83 ----------------------
 4 files changed, 202 deletions(-)

diff --git a/app-admin/system-config-printer/Manifest b/app-admin/system-config-printer/Manifest
index 22c632e36fb..985f7b1a478 100644
--- a/app-admin/system-config-printer/Manifest
+++ b/app-admin/system-config-printer/Manifest
@@ -1,2 +1 @@
-DIST system-config-printer-1.5.12.tar.xz 955756 BLAKE2B 766cc7307382a7b0ab65387650f1568fd5108dae2693dfc93684c6593e28837d513e4c823bf4e07c3ba2123eea8aba0649135020318f06f38633b9837683d7f7 SHA512 c8b0702dcdf99c4e8a19274dd4a3f82d9263bd5f51d0c19edf7d71fb13095f57a35e643ddbe161ffb5805e72bf7da0cb6a3de44a554854390ac05d8e56644c32
 DIST system-config-printer-1.5.13.tar.xz 974532 BLAKE2B 44e748d2fc20edefe58e1c8dd3781aff28af93e57356a9969e051813bf4f04f72c4e895b587e86614df6fb4984a4d610e8e1a1e17777801ae8912b6904679c72 SHA512 f4fbc1b20b35aa5b33bafdffc8a7490cc3c55e0b33bd9e925f1d3e01532c0a7bb87f80a04dd6da6fc492edd9fea74bacb0ce16ff64ceac622722fe1f9a77a6b7

diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch
deleted file mode 100644
index b0df809c939..00000000000
--- a/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From cf9903466c1a2d18a701f3b5e8c7e03483e1244d Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Mon, 14 Oct 2019 16:39:28 +0200
-Subject: [PATCH] udev-configure-printer: Add checks for NULL
-
----
- udev/udev-configure-printer.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
-index 83092fc21..d753bbeaf 100644
---- a/udev/udev-configure-printer.c
-+++ b/udev/udev-configure-printer.c
-@@ -1411,7 +1411,7 @@ for_each_matching_queue (struct device_uris *device_uris,
-       const char *printer_state_message = NULL;
-       int state = 0;
-       size_t i, l;
--      char *this_device_uri_n, *device_uri_n;
-+      char *this_device_uri_n = NULL, *device_uri_n = NULL;
-       const char *ps1, *ps2, *pi1, *pi2;
- 
-       while (attr && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
-@@ -1448,6 +1448,8 @@ for_each_matching_queue (struct device_uris *device_uris,
-       for (i = 0; i < device_uris->n_uris; i++)
- 	{
- 	  device_uri_n = normalize_device_uri(device_uris->uri[i]);
-+          if (this_device_uri_n == NULL || device_uri_n == NULL)
-+            goto skip;
- 	  /* As for the same device different URIs can come out when the
- 	     device is accessed via the usblp kernel module or via low-
- 	     level USB (libusb) we cannot simply compare URIs, must
-@@ -1512,8 +1514,12 @@ for_each_matching_queue (struct device_uris *device_uris,
-       firstqueue = 0;
- 
-     skip:
--      free(device_uri_n);
--      free(this_device_uri_n);
-+      if (device_uri_n != NULL)
-+        free(device_uri_n);
-+        device_uri_n = NULL;
-+      if (this_device_uri_n != NULL)
-+        free(this_device_uri_n);
-+        this_device_uri_n = NULL;
-       if (!attr)
- 	break;
-     }

diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch
deleted file mode 100644
index 7aed67584f7..00000000000
--- a/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From b9289dfe105bdb502f183f0afe7a115ecae5f2af Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Fri, 1 Nov 2019 15:55:34 +0100
-Subject: [PATCH] Fix abrt in udev-configure-printer
-
-The abrt was due invalid free - several printer models have its normalized uri cropped.
-The original pointer from strdup() was lost so its freeing was invalid.
----
- udev/udev-configure-printer.c | 21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
-diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
-index d753bbeaf..a44520f9c 100644
---- a/udev/udev-configure-printer.c
-+++ b/udev/udev-configure-printer.c
-@@ -1285,7 +1285,8 @@ normalize_device_uri(const char *str_orig)
- {
-   int i, j;
-   int havespace = 0;
--  char *str;
-+  char *str = NULL;
-+  char *cropped_str = NULL;
- 
-   if (str_orig == NULL)
-     return NULL;
-@@ -1333,7 +1334,11 @@ normalize_device_uri(const char *str_orig)
- 	 (strstr(str, "packard ") == str) ||
- 	 (strstr(str, "apollo ") == str) ||
- 	 (strstr(str, "usb ") == str))
--    str = strchr(str, ' ') + 1;
-+  {
-+    cropped_str = strdup(strchr(str, ' ') + 1);
-+    free(str);
-+    str = cropped_str;
-+  }
- 
-   return str;
- }
-@@ -1448,8 +1453,6 @@ for_each_matching_queue (struct device_uris *device_uris,
-       for (i = 0; i < device_uris->n_uris; i++)
- 	{
- 	  device_uri_n = normalize_device_uri(device_uris->uri[i]);
--          if (this_device_uri_n == NULL || device_uri_n == NULL)
--            goto skip;
- 	  /* As for the same device different URIs can come out when the
- 	     device is accessed via the usblp kernel module or via low-
- 	     level USB (libusb) we cannot simply compare URIs, must
-@@ -1509,17 +1512,21 @@ for_each_matching_queue (struct device_uris *device_uris,
- 		  break;
- 		}
- 	    }
-+          if (device_uri_n != NULL)
-+          {
-+            free(device_uri_n);
-+            device_uri_n = NULL;
-+          }
- 	}
- 
-       firstqueue = 0;
- 
-     skip:
--      if (device_uri_n != NULL)
--        free(device_uri_n);
--        device_uri_n = NULL;
-       if (this_device_uri_n != NULL)
-+      {
-         free(this_device_uri_n);
-         this_device_uri_n = NULL;
-+      }
-       if (!attr)
- 	break;
-     }

diff --git a/app-admin/system-config-printer/system-config-printer-1.5.12-r1.ebuild b/app-admin/system-config-printer/system-config-printer-1.5.12-r1.ebuild
deleted file mode 100644
index 9a157f3b5f0..00000000000
--- a/app-admin/system-config-printer/system-config-printer-1.5.12-r1.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE="xml"
-inherit gnome2 python-single-r1 systemd
-
-DESCRIPTION="Graphical user interface for CUPS administration"
-HOMEPAGE="https://github.com/OpenPrinting/system-config-printer"
-SRC_URI="https://github.com/OpenPrinting/${PN}/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="GPL-2+"
-KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ppc ppc64 ~sparc x86"
-SLOT="0"
-IUSE="gnome-keyring policykit"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-# Needs cups running, bug 284005
-RESTRICT="test"
-
-# Additional unhandled dependencies
-# gnome-extra/gnome-packagekit[${PYTHON_USEDEP}] with pygobject:2 ?
-# python samba client: smbc
-# selinux: needed for troubleshooting
-COMMON_DEPEND="${PYTHON_DEPS}
-	dev-libs/glib:2
-	net-print/cups[dbus]
-	virtual/libusb:1
-	>=virtual/udev-172
-	x11-libs/gtk+:3[introspection]
-	x11-libs/libnotify[introspection]
-	x11-libs/pango[introspection]
-"
-DEPEND="${COMMON_DEPEND}
-	app-text/docbook-xml-dtd:4.1.2
-	>=app-text/xmlto-0.0.22
-	dev-perl/XML-Parser
-	dev-util/desktop-file-utils
-	dev-util/intltool
-	sys-devel/gettext
-	virtual/pkgconfig
-"
-RDEPEND="${COMMON_DEPEND}
-	$(python_gen_cond_dep '
-		dev-python/dbus-python[${PYTHON_MULTI_USEDEP}]
-		dev-python/pycairo[${PYTHON_MULTI_USEDEP}]
-		dev-python/pycups[${PYTHON_MULTI_USEDEP}]
-		dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
-		dev-python/requests[${PYTHON_MULTI_USEDEP}]
-		dev-python/urllib3[${PYTHON_MULTI_USEDEP}]
-	')
-	gnome-keyring? ( app-crypt/libsecret[introspection] )
-	policykit? ( net-print/cups-pk-helper )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-check-for-null.patch
-	"${FILESDIR}"/${P}-fix-abrt-in-udev-configure-printer.patch
-)
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-}
-
-src_configure() {
-	gnome2_src_configure \
-		--enable-nls \
-		--with-desktop-vendor=Gentoo \
-		--with-udev-rules \
-		--with-systemdsystemunitdir=$(systemd_get_systemunitdir)
-}
-
-src_compile() {
-	gnome2_src_compile
-}
-
-src_install() {
-	gnome2_src_install
-	python_fix_shebang "${ED}"
-	python_optimize
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-27  8:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-27  8:51 [gentoo-commits] repo/gentoo:master commit in: app-admin/system-config-printer/files/, app-admin/system-config-printer/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2020-10-25  0:28 Andreas Sturmlechner
2020-10-25  0:28 Andreas Sturmlechner

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