From 1807628b5018604be11c7d48d19446d6c48ba9e9 Mon Sep 17 00:00:00 2001 From: mkasik Date: Sep 30 2009 14:49:22 +0000 Subject: - Fix adding of printers without specification of device-uri. - Patch by Tim Waugh. - Resolves: #526442 --- diff --git a/cups-pk-helper-ppd-name.patch b/cups-pk-helper-ppd-name.patch new file mode 100644 index 0000000..ff58778 --- /dev/null +++ b/cups-pk-helper-ppd-name.patch @@ -0,0 +1,29 @@ +--- cups-pk-helper-0.0.4/src/cups.c 2009-09-30 10:38:21.895761263 +0100 ++++ cups-pk-helper-0.0.4/src/cups.c 2009-09-30 10:44:07.794636125 +0100 +@@ -2,8 +2,9 @@ + * vim: set et ts=8 sw=8: + * + * Copyright (C) 2008 Novell, Inc. ++ * Copyright (C) 2009 Red Hat, Inc. + * +- * Authors: Vincent Untz ++ * Authors: Vincent Untz, Tim Waugh + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -997,11 +998,13 @@ cph_cups_printer_add (CphCups *cups, + + ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_NAME, + "printer-name", NULL, printer_name); +- ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_URI, +- "device-uri", NULL, printer_uri); + ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_NAME, + "ppd-name", NULL, ppd_file); + ++ if (printer_uri && printer_uri[0] != '\0') { ++ ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_URI, ++ "device-uri", NULL, printer_uri); ++ } + if (info && info[0] != '\0') { + ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_TEXT, + "printer-info", NULL, info); diff --git a/cups-pk-helper.spec b/cups-pk-helper.spec index ae7bb00..5d46c4f 100644 --- a/cups-pk-helper.spec +++ b/cups-pk-helper.spec @@ -1,6 +1,6 @@ Name: cups-pk-helper Version: 0.0.4 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A helper that makes system-config-printer use PolicyKit Group: System Environment/Base @@ -12,6 +12,7 @@ Patch0: polkit-1.patch Patch1: get_devices.patch Patch2: polkit_result.patch Patch3: edit_job.patch +Patch4: cups-pk-helper-ppd-name.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -45,6 +46,7 @@ interfaces available under control of PolicyKit. %patch1 -p1 -b .get-devices %patch2 -p1 -b .polkit-result %patch3 -p1 -b .edit-job +%patch4 -p1 -b .ppd-name %build # Patch0 modifies configure.ac @@ -74,6 +76,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Sep 30 2009 Marek Kasik - 0.0.4-8 +- Fix adding of printers without specification of device-uri. +- Patch by Tim Waugh. +- Resolves: #526442 + * Tue Aug 18 2009 Marek Kasik - 0.0.4-7 - Fix policies to check when editing a job.