From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1385D13835C for ; Sun, 25 Oct 2020 00:28:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4A623E0949; Sun, 25 Oct 2020 00:28:03 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 20CEEE0949 for ; Sun, 25 Oct 2020 00:28:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1B3A734092D for ; Sun, 25 Oct 2020 00:28:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C62F53B7 for ; Sun, 25 Oct 2020 00:28:00 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1603585660.b94cda060272b6fe1db3c1d8b3a9a10e9c6b5d89.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/system-config-printer/files/, app-admin/system-config-printer/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch app-admin/system-config-printer/system-config-printer-1.5.12-r2.ebuild X-VCS-Directories: app-admin/system-config-printer/ app-admin/system-config-printer/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: b94cda060272b6fe1db3c1d8b3a9a10e9c6b5d89 X-VCS-Branch: master Date: Sun, 25 Oct 2020 00:28:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 02534619-8434-4757-a67e-c070864f8dde X-Archives-Hash: 35d92067e3c7fc2d6b8b8b6952ffd6e2 commit: b94cda060272b6fe1db3c1d8b3a9a10e9c6b5d89 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Oct 24 16:50:26 2020 +0000 Commit: Andreas Sturmlechner gentoo 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 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 -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 +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 }