From 7c3fdfdedef4fb97e0b9e68d24b931f10f1f767a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:37:29 +0000 Subject: import cups-pk-helper-0.2.6-2.el7 --- diff --git a/.cups-pk-helper.metadata b/.cups-pk-helper.metadata index 38b7805..b27bedd 100644 --- a/.cups-pk-helper.metadata +++ b/.cups-pk-helper.metadata @@ -1 +1 @@ -36c6e132eda3dc41d8f53e88e493adb013a4da74 SOURCES/cups-pk-helper-0.2.4.tar.bz2 +b8bc47688ad692530ec33336543edf9ef4d636fb SOURCES/cups-pk-helper-0.2.6.tar.xz diff --git a/.gitignore b/.gitignore index 1a34c34..333ec11 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/cups-pk-helper-0.2.4.tar.bz2 +SOURCES/cups-pk-helper-0.2.6.tar.xz diff --git a/SOURCES/0001-Be-stricter-when-validating-printer-names.patch b/SOURCES/0001-Be-stricter-when-validating-printer-names.patch deleted file mode 100644 index 0a6ba60..0000000 --- a/SOURCES/0001-Be-stricter-when-validating-printer-names.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 7bf9cbe43ef8f648f308e4760f75c2aa6b61fa8e Mon Sep 17 00:00:00 2001 -From: Vincent Untz -Date: Tue, 27 Mar 2012 17:47:07 +0200 -Subject: [PATCH] Be stricter when validating printer names - -Only alphanumerical characters and the underscore are valid, and the -name must not be longer than 127 characters. See -http://www.cups.org/documentation.php/doc-1.1/sam.html#4_1 ---- - src/cups.c | 20 +++++++++++--------- - 1 file changed, 11 insertions(+), 9 deletions(-) - -diff --git a/src/cups.c b/src/cups.c -index 332abbe..1b2562b 100644 ---- a/src/cups.c -+++ b/src/cups.c -@@ -287,23 +287,25 @@ _cph_cups_is_printer_name_valid_internal (const char *name) - int i; - int len; - -+ /* Quoting http://www.cups.org/documentation.php/doc-1.1/sam.html#4_1: -+ * -+ * The printer name must start with any printable character except -+ * " ", "/", and "@". It can contain up to 127 letters, numbers, and -+ * the underscore (_). -+ * -+ * The first part is a bit weird, as the second part is more -+ * restrictive. So we only consider the second part. */ -+ - /* no empty string */ - if (!name || name[0] == '\0') - return FALSE; - - len = strlen (name); -- /* no string that is too long; see comment at the beginning of the -- * validation code block */ -- if (len > CPH_STR_MAXLEN) -+ if (len > 127) - return FALSE; - -- /* only printable characters, no space, no /, no # */ - for (i = 0; i < len; i++) { -- if (!g_ascii_isprint (name[i])) -- return FALSE; -- if (g_ascii_isspace (name[i])) -- return FALSE; -- if (name[i] == '/' || name[i] == '#') -+ if (!g_ascii_isalnum (name[i]) && name[i] != '_') - return FALSE; - } - --- -1.7.12.1 - diff --git a/SOURCES/cups-pk-helper-0.2.6-ipp-jstate.patch b/SOURCES/cups-pk-helper-0.2.6-ipp-jstate.patch new file mode 100644 index 0000000..68d4b4a --- /dev/null +++ b/SOURCES/cups-pk-helper-0.2.6-ipp-jstate.patch @@ -0,0 +1,20 @@ +--- cups-pk-helper-0.2.6/src/cups.c ++++ cups-pk-helper-0.2.6/src/cups.c +@@ -87,6 +87,17 @@ ippSetString(ipp_t *ipp, + } + #endif + ++/* The ipp_jstate_t enum was added in CUPS 1.7 */ ++#if ((CUPS_VERSION_MAJOR < 1) || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 7)) ++#define IPP_JSTATE_PENDING IPP_JOB_PENDING ++#define IPP_JSTATE_HELD IPP_JOB_HELD ++#define IPP_JSTATE_PROCESSING IPP_JOB_PROCESSING ++#define IPP_JSTATE_STOPPED IPP_JOB_STOPPED ++#define IPP_JSTATE_CANCELED IPP_JOB_CANCELED ++#define IPP_JSTATE_ABORTED IPP_JOB_ABORTED ++#define IPP_JSTATE_COMPLETED IPP_JOB_COMPLETED ++#endif ++ + /* This is 0.1 second */ + #define RECONNECT_DELAY 100000 + /* We try to reconnect during 3 seconds. It's still a fairly long time even for diff --git a/SPECS/cups-pk-helper.spec b/SPECS/cups-pk-helper.spec index 9ec8b03..f8295c9 100644 --- a/SPECS/cups-pk-helper.spec +++ b/SPECS/cups-pk-helper.spec @@ -1,15 +1,15 @@ Name: cups-pk-helper -Version: 0.2.4 -Release: 5%{?dist} +Version: 0.2.6 +Release: 2%{?dist} Summary: A helper that makes system-config-printer use PolicyKit Group: System Environment/Base License: GPLv2+ URL: http://www.vuntz.net/download/cups-pk-helper/ -Source0: http://cgit.freedesktop.org/cups-pk-helper/snapshot/cups-pk-helper-%{version}.tar.bz2 +Source0: http://cgit.freedesktop.org/cups-pk-helper/snapshot/cups-pk-helper-%{version}.tar.xz Patch0: polkit_result.patch -Patch1: 0001-Be-stricter-when-validating-printer-names.patch +Patch1: cups-pk-helper-0.2.6-ipp-jstate.patch BuildRequires: libtool >= 1.4.3 BuildRequires: cups-devel >= 1.2 @@ -36,15 +36,11 @@ interfaces available under control of PolicyKit. %prep %setup -q - %patch0 -p1 -b .polkit-result -%patch1 -p1 -R -b .strict-names +%patch1 -p1 -b .ipp-jstate %build -# grr, tarball without configure -./autogen.sh - %configure make %{?_smp_mflags} @@ -66,6 +62,14 @@ make install DESTDIR=$RPM_BUILD_ROOT %changelog +* Fri Feb 10 2017 Marek Kasik - 0.2.6-2 +- Define IPP jstate constants if they are not defined +- Related: #1384967 + +* Fri Feb 10 2017 Marek Kasik - 0.2.6-1 +- Update to 0.2.6 +- Resolves: #1384967 + * Fri Jan 24 2014 Daniel Mach - 0.2.4-5 - Mass rebuild 2014-01-24