From 777e7369ac591c0d247fda9c34c36f2813571695 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 12 Jan 2015 11:20:41 +0000 Subject: [PATCH] Fixes for IPP constants (bug #1181043, bug #1181055). Resolves: rhbz#1181043 rhbz#1181055 --- python-cups-ipp-constants.patch | 45 +++++++++++++++++++++++++++++++++ python-cups.spec | 9 ++++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 python-cups-ipp-constants.patch diff --git a/python-cups-ipp-constants.patch b/python-cups-ipp-constants.patch new file mode 100644 index 0000000..f95a8b9 --- /dev/null +++ b/python-cups-ipp-constants.patch @@ -0,0 +1,45 @@ +diff -up pycups-1.9.70/cupsmodule.c.ipp-constants pycups-1.9.70/cupsmodule.c +--- pycups-1.9.70/cupsmodule.c.ipp-constants 2014-12-23 13:01:14.000000000 +0000 ++++ pycups-1.9.70/cupsmodule.c 2015-01-12 11:19:16.132501327 +0000 +@@ -1,6 +1,6 @@ + /* + * cups - Python bindings for CUPS +- * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc ++ * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc + * Author: Tim Waugh + * + * This program is free software; you can redistribute it and/or modify +@@ -1341,10 +1341,14 @@ initcups (void) + INT_16_CONSTANT (IPP_STATUS_ERROR_TEMPORARY, IPP_TEMPORARY_ERROR); + INT_16_CONSTANT (IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS, IPP_NOT_ACCEPTING); + INT_16_CONSTANT (IPP_STATUS_ERROR_BUSY, IPP_PRINTER_BUSY); +- INT_IPP_STATUS_ERROR_CONSTANT (JOB_CANCELED); ++ INT_16_CONSTANT (IPP_STATUS_ERROR_JOB_CANCELED, IPP_ERROR_JOB_CANCELED); + INT_IPP_STATUS_ERROR_CONSTANT (MULTIPLE_JOBS_NOT_SUPPORTED); + INT_IPP_STATUS_ERROR_CONSTANT (PRINTER_IS_DEACTIVATED); ++ INT_16_CONSTANT (IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED, ++ IPP_AUTHENTICATION_CANCELED); + INT_16_CONSTANT (IPP_STATUS_ERROR_CUPS_PKI, IPP_PKI_ERROR); ++ INT_16_CONSTANT (IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED, ++ IPP_UPGRADE_REQUIRED); + + // IPP states + /* Also define legacy names */ +diff -up pycups-1.9.70/NEWS.ipp-constants pycups-1.9.70/NEWS +--- pycups-1.9.70/NEWS.ipp-constants 2014-12-23 13:07:01.000000000 +0000 ++++ pycups-1.9.70/NEWS 2015-01-12 11:19:16.117501266 +0000 +@@ -1,6 +1,14 @@ + NEWS + ---- + ++New in 1.9.71: ++ ++* Fixes for cups.IPP_JOB_CANCELED, cups.IPP_ERROR_JOB_CANCELED, ++ cups.IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED, ++ cups.IPP_AUTHENTICATION_CANCELED, ++ cups.IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED, and ++ cups.IPP_UPGRADE_REQUIRED. ++ + New in 1.9.70: + + * cups.ippErrorString(). Fixed build with CUPS 1.5. New-style (CUPS diff --git a/python-cups.spec b/python-cups.spec index 8b76f7d..57d166b 100644 --- a/python-cups.spec +++ b/python-cups.spec @@ -6,9 +6,10 @@ Summary: Python bindings for CUPS Name: python-cups Version: 1.9.70 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://cyberelk.net/tim/software/pycups/ Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2 +Patch1: python-cups-ipp-constants.patch License: GPLv2+ Group: Development/Languages BuildRequires: cups-devel @@ -41,6 +42,9 @@ Documentation for python-cups. %prep %setup -q -n pycups-%{version} +# Fixes for IPP constants (bug #1181043, bug #1181055). +%patch1 -p1 -b .ipp-constants + rm -rf %{py3dir} cp -a . %{py3dir} @@ -81,6 +85,9 @@ popd %doc examples html %changelog +* Mon Jan 12 2015 Tim Waugh - 1.9.70-2 +- Fixes for IPP constants (bug #1181043, bug #1181055). + * Tue Dec 23 2014 Tim Waugh - 1.9.70-1 - 1.9.70.