From 63e5ea2820445675c0455ffbdd3b7aa19d28a019 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jan 24 2014 19:51:30 +0000 Subject: import cups-1.6.3-14.el7.src.rpm --- diff --git a/SOURCES/cups-dbus-notifier.patch b/SOURCES/cups-dbus-notifier.patch new file mode 100644 index 0000000..371f63e --- /dev/null +++ b/SOURCES/cups-dbus-notifier.patch @@ -0,0 +1,104 @@ +diff -up cups-1.6.3/notifier/dbus.c.dbus-notifier cups-1.6.3/notifier/dbus.c +--- cups-1.6.3/notifier/dbus.c.dbus-notifier 2013-11-19 12:23:56.860249407 +0000 ++++ cups-1.6.3/notifier/dbus.c 2013-11-19 12:24:46.919476920 +0000 +@@ -4,7 +4,7 @@ + * D-Bus notifier for CUPS. + * + * Copyright 2008-2011 by Apple Inc. +- * Copyright (C) 2011 Red Hat, Inc. ++ * Copyright (C) 2011, 2013 Red Hat, Inc. + * Copyright (C) 2007 Tim Waugh + * Copyright 1997-2005 by Easy Software Products. + * +@@ -157,9 +157,16 @@ enum + + + /* ++ * Global variables... ++ */ ++ ++static char lock_filename[1024]; /* Lock filename */ ++ ++/* + * Local functions... + */ + ++static void release_lock(void); + static int acquire_lock(int *fd, char *lockfile, size_t locksize); + static const char *validate_utf8(const char *str); + +@@ -251,8 +258,6 @@ main(int argc, /* I - Number of comm + DBusMessage *message; /* Message to send */ + DBusMessageIter iter; /* Iterator for message data */ + int lock_fd = -1; /* Lock file descriptor */ +- char lock_filename[1024]; +- /* Lock filename */ + + + /* +@@ -651,7 +656,7 @@ main(int argc, /* I - Number of comm + if (lock_fd >= 0) + { + close(lock_fd); +- unlink(lock_filename); ++ release_lock(); + } + + return (0); +@@ -659,6 +664,27 @@ main(int argc, /* I - Number of comm + + + /* ++ * 'release_lock()' - Release the singleton lock. ++ */ ++ ++static void ++release_lock(void) ++{ ++ unlink(lock_filename); ++} ++ ++ ++/* ++ * 'handle_sigterm()' - Handle SIGTERM signal. ++ */ ++static void ++handle_sigterm(int signum) ++{ ++ release_lock(); ++ _exit (0); ++} ++ ++/* + * 'acquire_lock()' - Acquire a lock so we only have a single notifier running. + */ + +@@ -667,7 +692,8 @@ acquire_lock(int *fd, /* O - Lock fi + char *lockfile, /* I - Lock filename buffer */ + size_t locksize) /* I - Size of filename buffer */ + { +- const char *tmpdir; /* Temporary directory */ ++ const char *tmpdir; /* Temporary directory */ ++ struct sigaction action; /* POSIX sigaction data */ + + + /* +@@ -685,8 +711,16 @@ acquire_lock(int *fd, /* O - Lock fi + + if ((*fd = open(lockfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR)) < 0) + return (-1); +- else +- return (0); ++ ++ /* ++ * Set a SIGTERM handler to make sure we release the lock if the ++ * scheduler decides to stop us. ++ */ ++ memset(&action, 0, sizeof(action)); ++ action.sa_handler = handle_sigterm; ++ sigaction(SIGTERM, &action, NULL); ++ ++ return (0); + } + #else /* !HAVE_DBUS */ + int diff --git a/SOURCES/cups-str4326.patch b/SOURCES/cups-str4326.patch new file mode 100644 index 0000000..2683e25 --- /dev/null +++ b/SOURCES/cups-str4326.patch @@ -0,0 +1,21 @@ +diff -up cups-1.6.3/scheduler/ipp.c.str4326 cups-1.6.3/scheduler/ipp.c +--- cups-1.6.3/scheduler/ipp.c.str4326 2014-01-07 09:59:34.787935368 +0000 ++++ cups-1.6.3/scheduler/ipp.c 2014-01-07 09:59:34.855935681 +0000 +@@ -3,7 +3,7 @@ + * + * IPP routines for the CUPS scheduler. + * +- * Copyright 2007-2013 by Apple Inc. ++ * Copyright 2007-2014 by Apple Inc. + * Copyright 1997-2007 by Easy Software Products, all rights reserved. + * + * This file contains Kerberos support code, copyright 2006 by +@@ -6522,7 +6522,7 @@ get_jobs(cupsd_client_t *con, /* I - C + { + job_comparison = -1; + job_state = IPP_JOB_STOPPED; +- list = Jobs; ++ list = ActiveJobs; + } + else if (!strcmp(attr->values[0].string.text, "completed")) + { diff --git a/SOURCES/cups-str4327.patch b/SOURCES/cups-str4327.patch new file mode 100644 index 0000000..f5cb51f --- /dev/null +++ b/SOURCES/cups-str4327.patch @@ -0,0 +1,30 @@ +diff -up cups-1.7.0/cups/usersys.c.str4327 cups-1.7.0/cups/usersys.c +--- cups-1.7.0/cups/usersys.c.str4327 2013-07-10 15:08:39.000000000 +0100 ++++ cups-1.7.0/cups/usersys.c 2014-01-08 16:30:40.443026913 +0000 +@@ -875,7 +875,25 @@ _cupsSetDefaults(void) + cups_expiredcerts = getenv("CUPS_EXPIREDCERTS"); + + if ((cups_user = getenv("CUPS_USER")) == NULL) +- cups_user = getenv("USER"); ++ { ++ /* ++ * Try the USER environment variable... ++ */ ++ ++ if ((cups_user = getenv("USER")) != NULL) ++ { ++ /* ++ * Validate USER matches the current UID, otherwise don't allow it to ++ * override things... This makes sure that printing after doing su or ++ * sudo records the correct username. ++ */ ++ ++ struct passwd *pw; /* Account information */ ++ ++ if ((pw = getpwnam(cups_user)) == NULL || pw->pw_uid != getuid()) ++ cups_user = NULL; ++ } ++ } + + /* + * Then, if needed, read the ~/.cups/client.conf or /etc/cups/client.conf diff --git a/SOURCES/cups-usb-timeout.patch b/SOURCES/cups-usb-timeout.patch new file mode 100644 index 0000000..9d21dea --- /dev/null +++ b/SOURCES/cups-usb-timeout.patch @@ -0,0 +1,30 @@ +diff -up cups-1.7.0/backend/usb-libusb.c.usb-timeout cups-1.7.0/backend/usb-libusb.c +--- cups-1.7.0/backend/usb-libusb.c.usb-timeout 2013-07-17 16:51:43.000000000 +0100 ++++ cups-1.7.0/backend/usb-libusb.c 2013-11-28 16:44:03.785124015 +0000 +@@ -496,7 +496,7 @@ print_device(const char *uri, /* I - De + iostatus = libusb_bulk_transfer(g.printer->handle, + g.printer->write_endp, + print_buffer, g.print_bytes, +- &bytes, 60000); ++ &bytes, 0); + /* + * Ignore timeout errors, but retain the number of bytes written to + * avoid sending duplicate data... +@@ -519,7 +519,7 @@ print_device(const char *uri, /* I - De + iostatus = libusb_bulk_transfer(g.printer->handle, + g.printer->write_endp, + print_buffer, g.print_bytes, +- &bytes, 60000); ++ &bytes, 0); + } + + /* +@@ -534,7 +534,7 @@ print_device(const char *uri, /* I - De + iostatus = libusb_bulk_transfer(g.printer->handle, + g.printer->write_endp, + print_buffer, g.print_bytes, +- &bytes, 60000); ++ &bytes, 0); + } + + if (iostatus) diff --git a/SPECS/cups.spec b/SPECS/cups.spec index ab6fed6..1d1f46b 100644 --- a/SPECS/cups.spec +++ b/SPECS/cups.spec @@ -11,7 +11,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 1.6.3 -Release: 8%{?dist} +Release: 14%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ @@ -68,6 +68,10 @@ Patch37: cups-full-relro.patch Patch38: cups-web-devices-timeout.patch Patch39: cups-synconclose.patch Patch40: cups-final-content-type.patch +Patch41: cups-dbus-notifier.patch +Patch42: cups-usb-timeout.patch +Patch43: cups-str4326.patch +Patch44: cups-str4327.patch Patch100: cups-lspp.patch @@ -264,6 +268,14 @@ Sends IPP requests to the specified URI and tests and/or displays the results. # Reverted upstream change to FINAL_CONTENT_TYPE in order to fix # printing to remote CUPS servers (bug #1013040). %patch40 -p1 -b .final-content-type +# Avoid stale lockfile in dbus notifier (bug #1030666). +%patch41 -p1 -b .dbus-notifier +# Prevent USB timeouts causing incorrect print output (bug #1036057). +%patch42 -p1 -b .usb-timeout +# Return jobs in rank order when handling IPP-Get-Jobs (bug #1046841). +%patch43 -p1 -b .str4326 +# Apply upstream patch to improve cupsUser() (bug #1046845). +%patch44 -p1 -b .str4327 %if %lspp # LSPP support. @@ -278,7 +290,7 @@ perl -pi -e "s,^.SILENT:,," Makedefs.in f=CREDITS.txt mv "$f" "$f"~ iconv -f MACINTOSH -t UTF-8 "$f"~ > "$f" -rm "$f"~ +rm -f "$f"~ aclocal -I config-scripts autoconf -I config-scripts @@ -357,7 +369,7 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/cat? $RPM_BUILD_ROOT%{_mandir}/*/cat? rm -f $RPM_BUILD_ROOT%{_datadir}/applications/cups.desktop rm -rf $RPM_BUILD_ROOT%{_datadir}/icons # there are pdf-banners shipped with cups-filters (#919489) -rm $RPM_BUILD_ROOT%{_datadir}/cups/banners/{classified,confidential,secret,standard,topsecret,unclassified} +rm -f $RPM_BUILD_ROOT%{_datadir}/cups/banners/{classified,confidential,secret,standard,topsecret,unclassified} rm -f $RPM_BUILD_ROOT%{_datadir}/cups/data/testprint # install /usr/lib/tmpfiles.d/cups.conf (bug #656566, bug #893834) @@ -652,6 +664,26 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Fri Jan 24 2014 Daniel Mach - 1:1.6.3-14 +- Mass rebuild 2014-01-24 + +* Mon Jan 13 2014 Tim Waugh - 1:1.6.3-13 +- Apply upstream patch to improve cupsUser() (bug #1046845). + +* Tue Jan 7 2014 Tim Waugh - 1:1.6.3-12 +- Return jobs in rank order when handling IPP-Get-Jobs (bug #1046841). +- dbus notifier: call _exit when handling SIGTERM (STR #4314, bug #1030666). +- Use '-f' when using rm in %%setup section (bug #1046374). + +* Fri Dec 27 2013 Daniel Mach - 1:1.6.3-11 +- Mass rebuild 2013-12-27 + +* Thu Nov 28 2013 Tim Waugh - 1:1.6.3-10 +- Prevent USB timeouts causing incorrect print output (bug #1036057). + +* Tue Nov 19 2013 Tim Waugh - 1:1.6.3-9 +- Avoid stale lockfile in dbus notifier (bug #1030666). + * Thu Oct 31 2013 Tim Waugh - 1:1.6.3-8 - Set the default for SyncOnClose to Yes.