diff options
Diffstat (limited to 'app-admin/system-config-printer')
7 files changed, 133 insertions, 227 deletions
diff --git a/app-admin/system-config-printer/Manifest b/app-admin/system-config-printer/Manifest index 01c0dc3964bb..12e9f144b7b9 100644 --- a/app-admin/system-config-printer/Manifest +++ b/app-admin/system-config-printer/Manifest @@ -1 +1 @@ -DIST system-config-printer-1.5.12.tar.xz 955756 BLAKE2B 766cc7307382a7b0ab65387650f1568fd5108dae2693dfc93684c6593e28837d513e4c823bf4e07c3ba2123eea8aba0649135020318f06f38633b9837683d7f7 SHA512 c8b0702dcdf99c4e8a19274dd4a3f82d9263bd5f51d0c19edf7d71fb13095f57a35e643ddbe161ffb5805e72bf7da0cb6a3de44a554854390ac05d8e56644c32 +DIST system-config-printer-1.5.18.tar.xz 1396808 BLAKE2B 910e853829ee876edc597a3103b5ab857b3b8c1cb87096f25213b1088e35d9f4d320dad61f55b530283a7650b07abe028a53b4e144b33b1b66c733cb2caa8011 SHA512 33dc9c52d92f4234e055fb10a99cadd58424dcdb62554797b44bdd5319f1c3662bd2fa33417ac3a3f5ec51216d64e81e1897f3e671eb49f6be34057d7c38f3f4 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 1c03bbd193fc..000000000000 --- a/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch +++ /dev/null @@ -1,58 +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 - ---- - 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)
-
- 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; - } 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 7aed67584f70..000000000000 --- 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/files/system-config-printer-1.5.18-fix-debugprint-exception.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.18-fix-debugprint-exception.patch new file mode 100644 index 000000000000..829166ad9d8e --- /dev/null +++ b/app-admin/system-config-printer/files/system-config-printer-1.5.18-fix-debugprint-exception.patch @@ -0,0 +1,22 @@ +From 399b3334d6519639cfe7f1c0457e2475b8ee5230 Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal <zdohnal@redhat.com> +Date: Thu, 13 Oct 2022 14:03:37 +0200 +Subject: [PATCH] Fix debugprint() in options.py (fixes #291) + +--- + options.py | 2 +- + 1 file changed, 1 insertions(+), 1 deletion(-) + +diff --git a/options.py b/options.py +index d756f98dc..d7c236deb 100644 +--- a/options.py ++++ b/options.py +@@ -423,7 +423,7 @@ def __init__(self, name, value, supported, on_change): + debugprint("Unknown value for %s: %s" % (name, value)) + debugprint("Choices: %s" % (supported)) + if len(supported) > 0: +- debugprint("Selecting from choices:", supported[0]) ++ debugprint("Selecting from choices: %s" % supported[0]) + self.selector.set_active(0) + self.selector.connect("changed", self.changed) + diff --git a/app-admin/system-config-printer/metadata.xml b/app-admin/system-config-printer/metadata.xml index ef7c43f6f08a..e34a1cb28469 100644 --- a/app-admin/system-config-printer/metadata.xml +++ b/app-admin/system-config-printer/metadata.xml @@ -1,16 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="person"> - <email>reavertm@gentoo.org</email> - <name>Maciej Mrozowski</name> -</maintainer> -<maintainer type="project"> - <email>gnome@gentoo.org</email> - <name>Gentoo GNOME Desktop</name> -</maintainer> -<maintainer type="project"> - <email>kde@gentoo.org</email> - <name>Gentoo KDE Project</name> -</maintainer> + <maintainer type="person"> + <email>reavertm@gentoo.org</email> + <name>Maciej Mrozowski</name> + </maintainer> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <maintainer type="project"> + <email>kde@gentoo.org</email> + <name>Gentoo KDE Project</name> + </maintainer> + <upstream> + <remote-id type="github">OpenPrinting/system-config-printer</remote-id> + </upstream> </pkgmetadata> 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 9a157f3b5f00..000000000000 --- 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 -} diff --git a/app-admin/system-config-printer/system-config-printer-1.5.18-r2.ebuild b/app-admin/system-config-printer/system-config-printer-1.5.18-r2.ebuild new file mode 100644 index 000000000000..eac1dbdb254b --- /dev/null +++ b/app-admin/system-config-printer/system-config-printer-1.5.18-r2.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_REQ_USE="xml(+)" + +inherit distutils-r1 systemd udev 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/v${PV}/${P}.tar.xz +" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86" +IUSE="keyring policykit" +# 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 +DEPEND=" + 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] +" +BDEPEND=" + app-text/docbook-xml-dtd:4.1.2 + >=app-text/xmlto-0.0.22 + dev-perl/XML-Parser + dev-util/desktop-file-utils + >=sys-devel/gettext-0.20 + virtual/pkgconfig +" +RDEPEND=" + ${DEPEND} + $(python_gen_cond_dep ' + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pycairo[${PYTHON_USEDEP}] + dev-python/pycups[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + ') + keyring? ( app-crypt/libsecret[introspection] ) + policykit? ( net-print/cups-pk-helper ) +" + +PATCHES=( + # git master (1.5.19) + "${FILESDIR}/${P}-fix-debugprint-exception.patch" +) + +src_configure() { + local myeconfargs=( + --with-xmlto + --enable-nls + --with-desktop-vendor=Gentoo + --with-udev-rules + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + emake PYTHON=: + distutils-r1_src_compile +} + +src_install() { + emake DESTDIR="${D}" PYTHON=: install + python_fix_shebang "${ED}" + distutils-r1_src_install +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} |