diff options
Diffstat (limited to 'app-admin/system-config-printer')
-rw-r--r-- | app-admin/system-config-printer/Manifest | 7 | ||||
-rw-r--r-- | app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch | 58 | ||||
-rw-r--r-- | app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch | 72 | ||||
-rw-r--r-- | app-admin/system-config-printer/system-config-printer-1.5.11-r2.ebuild | 2 | ||||
-rw-r--r-- | app-admin/system-config-printer/system-config-printer-1.5.12.ebuild (renamed from app-admin/system-config-printer/system-config-printer-1.5.11-r1.ebuild) | 22 |
5 files changed, 143 insertions, 18 deletions
diff --git a/app-admin/system-config-printer/Manifest b/app-admin/system-config-printer/Manifest index 324106cb80dd..53a5ed316e4b 100644 --- a/app-admin/system-config-printer/Manifest +++ b/app-admin/system-config-printer/Manifest @@ -1,5 +1,8 @@ +AUX system-config-printer-1.5.12-check-for-null.patch 2048 BLAKE2B e6a87f6ae92cd29f3fa4900be4df2bcfb54892a87346a24baabe8fa4ea779d69a259bab7f25f7121d90b7599c15721044fe530b80654160501631857b332d705 SHA512 4a640793f89b637620c12d99ddc53b7ed87ba5cfc19bf90a3c8f7c2938bb17deba540bfe4312556fe253be52f087340d6b2a794c305c78443515a4f6c1eceace +AUX system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch 2206 BLAKE2B 82195b83923cf84bd33ea141f0e7443d16b3540845fe867251f77e53324b255a076ad7d14f4e29690ef139fd1a53f832968927d03e8885648d377ab466305667 SHA512 d093a81ec6d92f242b18d5f5bc1fb96d36797fe85dfd2a7c7edf99138a3bf392543a350fde4e051e97d7640cb14323a7754029d4a082adde3d7f2d89f1262a1f DIST system-config-printer-1.5.11-patchset-01.tar.xz 6948 BLAKE2B effe29c51cbe74fc72566df65f10ab845c9dc1f40ca2966c40be87e19f98046f34311c24b7bc77f471b840e35b0c8eb7754a7c5464d50335c8ab2e2ed0e79afd SHA512 2501bda0e75ea51cc8e14df6b3746a0ea51618919ef35ace849efeded0cddc49e6e3793142d1cd128ce3ce62c21661d5fdb85b19718df07b87a20f5fc641885b DIST system-config-printer-1.5.11.tar.xz 949816 BLAKE2B 96b41d64e0aa3494b7fc7ed15ac926d833a046ba2880b36b6f5dd4e7508e2bc1fac4cb52c9940c13cec6e34cb8972fbc11fcd5a7df510296444ca08a23f4cb2b SHA512 cc0a6faec0022092e64de3d7ab28669039c93853c6931d26c264f0035486e09ad0af784833e88ee8e3dc1b6f5be9dcf84144a2a6464dfa9711172966fa6a22b4 -EBUILD system-config-printer-1.5.11-r1.ebuild 2384 BLAKE2B 2f0904200c9d0fdbe5451be4e5c89b1dcaf6e35b36d5d0db12a2333dc3e28e65974b20515bb416cb6b3d7835db078b2d959caac3af57a02e711c9f5e3d089910 SHA512 5e9ae2a8bc648f4daf019c646003785bd45bf108913b55323d46dbb01ed0bb830ca74665725916bb26ea08ea368b211ffa2d707489055e13803a1aa9ed197add -EBUILD system-config-printer-1.5.11-r2.ebuild 2391 BLAKE2B a9ae83182a784c3ad131ab3445a75a5a334a68d95ef78caac0a52be8bd548ef5772adba59161e2c9df1c770c6293f0f58e0474b18e5c51480cecea4d2b5a88e9 SHA512 ce543d1b878d214133efb5452fbd74c53471b562647834e33b108fb81f899022ceb44aa63809c7bc6e9073ce313818173a7c635ff3a5176441f3a3c864231824 +DIST system-config-printer-1.5.12.tar.xz 955756 BLAKE2B 766cc7307382a7b0ab65387650f1568fd5108dae2693dfc93684c6593e28837d513e4c823bf4e07c3ba2123eea8aba0649135020318f06f38633b9837683d7f7 SHA512 c8b0702dcdf99c4e8a19274dd4a3f82d9263bd5f51d0c19edf7d71fb13095f57a35e643ddbe161ffb5805e72bf7da0cb6a3de44a554854390ac05d8e56644c32 +EBUILD system-config-printer-1.5.11-r2.ebuild 2386 BLAKE2B 0795c7ffe9cfa37c599066d487c83c93ad87e9ec57c7abb46adaad777867a5551cb49187ec301bae117c84bc1e2daa9e6b675e3968fb1575c4258db21205e6b0 SHA512 f9c6d857b69223f39f49d6004950237e12f08aa471330150333b0fbd053ed9ae0d2d9ae4c8b2ef702521ca524df04eddae69c59e5a6905559d78ee8757546e61 +EBUILD system-config-printer-1.5.12.ebuild 2099 BLAKE2B 240ef800834f33113bce3762decaf4bd78914f8ea22fe966c75e2bef987156266cf547e450899042f69dbfc6fcf11e563ce4bdb2bd1b3047453da6a9cb9e4df3 SHA512 6665bd581070d6ec88e137d38afe2ad342d7fe312627e99f5fbb1cd4a8ef9fabda003edc7c500793a0df76935e0a812f77c9d6a9bfc7283eecf7aa8c729b210a MISC metadata.xml 463 BLAKE2B 8cc3de37cb766555e89dca64b9be719c3b2885144f08e5a126084e5f8125ff085e9c51705216cd51fb3c66daa29016a790dd606de2b443a7e65f6677f4c46fa4 SHA512 8521e871b99b17ea2bb754dc9bf1b1a49bd32673acce3fe561ec087c5c4bacfbefbf904af1cf5a6ada369e936a0e06a7116074ef622f882e434da7afdee12533 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 new file mode 100644 index 000000000000..1c03bbd193fc --- /dev/null +++ b/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch @@ -0,0 +1,58 @@ +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 new file mode 100644 index 000000000000..7aed67584f70 --- /dev/null +++ b/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch @@ -0,0 +1,72 @@ +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.11-r2.ebuild b/app-admin/system-config-printer/system-config-printer-1.5.11-r2.ebuild index 3138fdc7de8c..506b95217fad 100644 --- a/app-admin/system-config-printer/system-config-printer-1.5.11-r2.ebuild +++ b/app-admin/system-config-printer/system-config-printer-1.5.11-r2.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://github.com/zdohnal/${PN}/releases/download/${PV}/${P}.tar.xz https://dev.gentoo.org/~asturm/distfiles/${P}-patchset-01.tar.xz" LICENSE="GPL-2+" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ppc ppc64 ~sh ~sparc x86" SLOT="0" IUSE="doc gnome-keyring policykit" diff --git a/app-admin/system-config-printer/system-config-printer-1.5.11-r1.ebuild b/app-admin/system-config-printer/system-config-printer-1.5.12.ebuild index c1bd77fd2c90..f4c8f7a381cf 100644 --- a/app-admin/system-config-printer/system-config-printer-1.5.11-r1.ebuild +++ b/app-admin/system-config-printer/system-config-printer-1.5.12.ebuild @@ -3,19 +3,17 @@ EAPI=6 -PYTHON_COMPAT=( python3_{5,6} ) +PYTHON_COMPAT=( python3_{5,6,7} ) PYTHON_REQ_USE="xml" inherit gnome2 python-single-r1 systemd DESCRIPTION="Graphical user interface for CUPS administration" -HOMEPAGE="https://github.com/zdohnal/system-config-printer" -SRC_URI="https://github.com/zdohnal/${PN}/releases/download/${PV}/${P}.tar.xz - https://dev.gentoo.org/~asturm/distfiles/${P}-patchset-01.tar.xz" +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 ~sh ~sparc x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" SLOT="0" - IUSE="doc gnome-keyring policykit" REQUIRED_USE="${PYTHON_REQUIRED_USE}" @@ -56,15 +54,8 @@ RDEPEND="${COMMON_DEPEND} " PATCHES=( - "${WORKDIR}"/${P}-auth-dialog.patch - "${WORKDIR}"/${P}-libsecret-optional-{1,2}.patch - "${WORKDIR}"/${P}-scp-dbus-service-{1,2}.patch - "${WORKDIR}"/${P}-typo.patch - "${WORKDIR}"/${P}-appdata.patch - "${WORKDIR}"/${P}-empty-LC_MESSAGES.patch - "${WORKDIR}"/${P}-fdopen-utf8.patch - "${WORKDIR}"/${P}-typeerror.patch - "${WORKDIR}"/${P}-debugprint-typo.patch + "${FILESDIR}"/${P}-check-for-null.patch + "${FILESDIR}"/${P}-fix-abrt-in-udev-configure-printer.patch ) pkg_setup() { @@ -88,4 +79,5 @@ src_install() { use doc && local HTML_DOCS=( html/. ) gnome2_src_install python_fix_shebang "${ED}" + python_optimize } |