From 5b01ebdb9d5a0594474a88fa68884505ca8e8a0f Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Apr 19 2013 10:52:50 +0000 Subject: 1.7b1 --- diff --git a/.gitignore b/.gitignore index 579590a..9fcca22 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ cups-1.4.4-source.tar.bz2 /cups-1.5.4-source.tar.bz2 /cups-1.6.1-source.tar.bz2 /cups-1.6.2-source.tar.bz2 +/cups-1.7b1-source.tar.bz2 diff --git a/cups-driverd-timeout.patch b/cups-driverd-timeout.patch index cb9e5cf..b7240a3 100644 --- a/cups-driverd-timeout.patch +++ b/cups-driverd-timeout.patch @@ -1,7 +1,7 @@ -diff -up cups-1.5.0/scheduler/ipp.c.driverd-timeout cups-1.5.0/scheduler/ipp.c ---- cups-1.5.0/scheduler/ipp.c.driverd-timeout 2011-10-10 17:03:41.801690962 +0100 -+++ cups-1.5.0/scheduler/ipp.c 2011-10-10 17:03:41.861689834 +0100 -@@ -5723,7 +5723,7 @@ copy_model(cupsd_client_t *con, /* I - +diff -up cups-1.7b1/scheduler/ipp.c.driverd-timeout cups-1.7b1/scheduler/ipp.c +--- cups-1.7b1/scheduler/ipp.c.driverd-timeout 2013-04-19 12:24:43.003841810 +0200 ++++ cups-1.7b1/scheduler/ipp.c 2013-04-19 12:24:43.204839107 +0200 +@@ -4556,7 +4556,7 @@ copy_model(cupsd_client_t *con, /* I - close(temppipe[1]); /* @@ -10,7 +10,7 @@ diff -up cups-1.5.0/scheduler/ipp.c.driverd-timeout cups-1.5.0/scheduler/ipp.c */ total = 0; -@@ -5743,7 +5743,7 @@ copy_model(cupsd_client_t *con, /* I - +@@ -4576,7 +4576,7 @@ copy_model(cupsd_client_t *con, /* I - FD_SET(temppipe[0], &input); FD_SET(CGIPipes[0], &input); diff --git a/cups-eggcups.patch b/cups-eggcups.patch index 981d920..45770e4 100644 --- a/cups-eggcups.patch +++ b/cups-eggcups.patch @@ -1,7 +1,7 @@ -diff -up cups-1.5.3/backend/ipp.c.eggcups cups-1.5.3/backend/ipp.c ---- cups-1.5.3/backend/ipp.c.eggcups 2012-05-05 01:00:01.000000000 +0200 -+++ cups-1.5.3/backend/ipp.c 2012-05-15 16:50:41.142868986 +0200 -@@ -138,6 +138,70 @@ static cups_array_t *state_reasons; /* A +diff -up cups-1.7b1/backend/ipp.c.eggcups cups-1.7b1/backend/ipp.c +--- cups-1.7b1/backend/ipp.c.eggcups 2013-04-01 20:49:19.000000000 +0200 ++++ cups-1.7b1/backend/ipp.c 2013-04-19 12:01:05.022934745 +0200 +@@ -160,6 +160,70 @@ static cups_array_t *state_reasons; /* A static char tmpfilename[1024] = ""; /* Temporary spool file name */ @@ -72,8 +72,8 @@ diff -up cups-1.5.3/backend/ipp.c.eggcups cups-1.5.3/backend/ipp.c /* * Local functions... -@@ -1520,6 +1584,15 @@ main(int argc, /* I - Number of comm - _("Print file accepted - job ID %d."), job_id); +@@ -1665,6 +1729,15 @@ main(int argc, /* I - Number of comm + fprintf(stderr, "DEBUG: Print job accepted - job ID %d.\n", job_id); } +#if HAVE_DBUS @@ -85,13 +85,13 @@ diff -up cups-1.5.3/backend/ipp.c.eggcups cups-1.5.3/backend/ipp.c + getenv ("PRINTER")); +#endif /* HAVE_DBUS */ + - fprintf(stderr, "DEBUG: job-id=%d\n", job_id); ippDelete(response); -diff -up cups-1.5.3/backend/Makefile.eggcups cups-1.5.3/backend/Makefile ---- cups-1.5.3/backend/Makefile.eggcups 2012-04-23 19:42:12.000000000 +0200 -+++ cups-1.5.3/backend/Makefile 2012-05-15 16:48:17.253871982 +0200 -@@ -212,7 +212,7 @@ dnssd: dnssd.o ../cups/$(LIBCUPS) libbac + if (job_canceled) +diff -up cups-1.7b1/backend/Makefile.eggcups cups-1.7b1/backend/Makefile +--- cups-1.7b1/backend/Makefile.eggcups 2012-12-07 22:45:35.000000000 +0100 ++++ cups-1.7b1/backend/Makefile 2013-04-19 11:27:33.914224959 +0200 +@@ -245,7 +245,7 @@ dnssd: dnssd.o ../cups/$(LIBCUPS) libbac ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a echo Linking $@... @@ -100,9 +100,9 @@ diff -up cups-1.5.3/backend/Makefile.eggcups cups-1.5.3/backend/Makefile $(RM) http $(LN) ipp http -diff -up cups-1.5.3/scheduler/subscriptions.c.eggcups cups-1.5.3/scheduler/subscriptions.c ---- cups-1.5.3/scheduler/subscriptions.c.eggcups 2012-02-12 06:48:09.000000000 +0100 -+++ cups-1.5.3/scheduler/subscriptions.c 2012-05-15 16:48:17.253871982 +0200 +diff -up cups-1.7b1/scheduler/subscriptions.c.eggcups cups-1.7b1/scheduler/subscriptions.c +--- cups-1.7b1/scheduler/subscriptions.c.eggcups 2012-02-11 23:10:54.000000000 +0100 ++++ cups-1.7b1/scheduler/subscriptions.c 2013-04-19 11:27:33.916224934 +0200 @@ -1314,13 +1314,13 @@ cupsd_send_dbus(cupsd_eventmask_t event, what = "PrinterAdded"; else if (event & CUPSD_EVENT_PRINTER_DELETED) diff --git a/cups-lspp.patch b/cups-lspp.patch index d3bf086..598f587 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,7 +1,7 @@ -diff -up cups-1.6.2/config.h.in.lspp cups-1.6.2/config.h.in ---- cups-1.6.2/config.h.in.lspp 2013-03-18 19:00:30.704448157 +0100 -+++ cups-1.6.2/config.h.in 2013-03-18 19:00:30.724447879 +0100 -@@ -746,6 +746,13 @@ static __inline int _cups_abs(int i) { r +diff -up cups-1.7b1/config.h.in.lspp cups-1.7b1/config.h.in +--- cups-1.7b1/config.h.in.lspp 2013-04-19 12:03:41.085867788 +0200 ++++ cups-1.7b1/config.h.in 2013-04-19 12:03:41.189866410 +0200 +@@ -710,6 +710,13 @@ static __inline int _cups_abs(int i) { r # endif /* __GNUC__ || __STDC_VERSION__ */ #endif /* !HAVE_ABS && !abs */ @@ -15,9 +15,9 @@ diff -up cups-1.6.2/config.h.in.lspp cups-1.6.2/config.h.in #endif /* !_CUPS_CONFIG_H_ */ /* -diff -up cups-1.6.2/config-scripts/cups-lspp.m4.lspp cups-1.6.2/config-scripts/cups-lspp.m4 ---- cups-1.6.2/config-scripts/cups-lspp.m4.lspp 2013-03-18 19:00:30.724447879 +0100 -+++ cups-1.6.2/config-scripts/cups-lspp.m4 2013-03-18 19:00:30.724447879 +0100 +diff -up cups-1.7b1/config-scripts/cups-lspp.m4.lspp cups-1.7b1/config-scripts/cups-lspp.m4 +--- cups-1.7b1/config-scripts/cups-lspp.m4.lspp 2013-04-19 12:03:41.192866371 +0200 ++++ cups-1.7b1/config-scripts/cups-lspp.m4 2013-04-19 12:03:41.191866384 +0200 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -55,9 +55,9 @@ diff -up cups-1.6.2/config-scripts/cups-lspp.m4.lspp cups-1.6.2/config-scripts/c + ;; + esac +fi -diff -up cups-1.6.2/configure.in.lspp cups-1.6.2/configure.in ---- cups-1.6.2/configure.in.lspp 2013-03-18 19:00:30.705448143 +0100 -+++ cups-1.6.2/configure.in 2013-03-18 19:00:30.724447879 +0100 +diff -up cups-1.7b1/configure.in.lspp cups-1.7b1/configure.in +--- cups-1.7b1/configure.in.lspp 2013-04-19 12:03:41.090867721 +0200 ++++ cups-1.7b1/configure.in 2013-04-19 12:03:41.193866357 +0200 @@ -37,6 +37,8 @@ sinclude(config-scripts/cups-systemd.m4) sinclude(config-scripts/cups-defaults.m4) sinclude(config-scripts/cups-scripting.m4) @@ -67,9 +67,9 @@ diff -up cups-1.6.2/configure.in.lspp cups-1.6.2/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -up cups-1.6.2/filter/common.c.lspp cups-1.6.2/filter/common.c ---- cups-1.6.2/filter/common.c.lspp 2011-05-20 05:49:49.000000000 +0200 -+++ cups-1.6.2/filter/common.c 2013-03-18 19:00:30.725447865 +0100 +diff -up cups-1.7b1/filter/common.c.lspp cups-1.7b1/filter/common.c +--- cups-1.7b1/filter/common.c.lspp 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.7b1/filter/common.c 2013-04-19 12:03:41.196866318 +0200 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -238,10 +238,10 @@ diff -up cups-1.6.2/filter/common.c.lspp cups-1.6.2/filter/common.c /* -diff -up cups-1.6.2/filter/pstops.c.lspp cups-1.6.2/filter/pstops.c ---- cups-1.6.2/filter/pstops.c.lspp 2012-04-23 21:19:19.000000000 +0200 -+++ cups-1.6.2/filter/pstops.c 2013-03-18 19:00:30.726447852 +0100 -@@ -3202,6 +3202,18 @@ write_label_prolog(pstops_doc_t *doc, /* +diff -up cups-1.7b1/filter/pstops.c.lspp cups-1.7b1/filter/pstops.c +--- cups-1.7b1/filter/pstops.c.lspp 2012-12-14 20:12:39.000000000 +0100 ++++ cups-1.7b1/filter/pstops.c 2013-04-19 12:03:41.201866251 +0200 +@@ -3203,6 +3203,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ const char *ptr; /* Temporary string pointer */ @@ -260,7 +260,7 @@ diff -up cups-1.6.2/filter/pstops.c.lspp cups-1.6.2/filter/pstops.c /* -@@ -3224,6 +3236,124 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3225,6 +3237,124 @@ write_label_prolog(pstops_doc_t *doc, /* return; } @@ -385,7 +385,7 @@ diff -up cups-1.6.2/filter/pstops.c.lspp cups-1.6.2/filter/pstops.c /* * Set the classification + page label string... */ -@@ -3302,7 +3432,10 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3303,7 +3433,10 @@ write_label_prolog(pstops_doc_t *doc, /* doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0); doc_puts(doc, "pop\n"); doc_puts(doc, "}bind put\n"); @@ -396,9 +396,9 @@ diff -up cups-1.6.2/filter/pstops.c.lspp cups-1.6.2/filter/pstops.c /* -diff -up cups-1.6.2/Makedefs.in.lspp cups-1.6.2/Makedefs.in ---- cups-1.6.2/Makedefs.in.lspp 2013-03-18 19:00:30.706448129 +0100 -+++ cups-1.6.2/Makedefs.in 2013-03-18 19:00:30.726447852 +0100 +diff -up cups-1.7b1/Makedefs.in.lspp cups-1.7b1/Makedefs.in +--- cups-1.7b1/Makedefs.in.lspp 2013-04-19 12:03:41.102867563 +0200 ++++ cups-1.7b1/Makedefs.in 2013-04-19 12:03:41.203866225 +0200 @@ -146,7 +146,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) @@ -408,9 +408,9 @@ diff -up cups-1.6.2/Makedefs.in.lspp cups-1.6.2/Makedefs.in OPTIM = @OPTIM@ OPTIONS = PAMLIBS = @PAMLIBS@ -diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c ---- cups-1.6.2/scheduler/client.c.lspp 2013-01-21 16:29:47.000000000 +0100 -+++ cups-1.6.2/scheduler/client.c 2013-03-18 19:00:30.727447838 +0100 +diff -up cups-1.7b1/scheduler/client.c.lspp cups-1.7b1/scheduler/client.c +--- cups-1.7b1/scheduler/client.c.lspp 2013-04-09 21:26:08.000000000 +0200 ++++ cups-1.7b1/scheduler/client.c 2013-04-19 12:10:27.236409248 +0200 @@ -41,6 +41,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -419,12 +419,15 @@ diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c */ /* -@@ -49,10 +50,16 @@ +@@ -49,6 +50,7 @@ #include "cupsd.h" +#define _GNU_SOURCE - #ifdef HAVE_TCPD_H + #ifdef __APPLE__ + # include + #endif /* __APPLE__ */ +@@ -56,6 +58,11 @@ # include #endif /* HAVE_TCPD_H */ @@ -436,7 +439,7 @@ diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c /* * Local globals... -@@ -371,6 +378,57 @@ cupsdAcceptClient(cupsd_listener_t *lis) +@@ -378,6 +385,57 @@ cupsdAcceptClient(cupsd_listener_t *lis) } #endif /* HAVE_TCPD_H */ @@ -493,8 +496,8 @@ diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c + #ifdef AF_LOCAL if (con->http.hostaddr->addr.sa_family == AF_LOCAL) - cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Accepted from %s (Domain)", -@@ -678,6 +736,13 @@ cupsdReadClient(cupsd_client_t *con) /* + { +@@ -708,6 +766,13 @@ cupsdReadClient(cupsd_client_t *con) /* mime_type_t *type; /* MIME type of file */ cupsd_printer_t *p; /* Printer */ static unsigned request_id = 0; /* Request ID for temp files */ @@ -508,7 +511,7 @@ diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c status = HTTP_CONTINUE; -@@ -2134,6 +2199,67 @@ cupsdReadClient(cupsd_client_t *con) /* +@@ -2225,6 +2290,67 @@ cupsdReadClient(cupsd_client_t *con) /* fchmod(con->file, 0640); fchown(con->file, RunUser, Group); fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC); @@ -575,8 +578,8 @@ diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c +#endif /* WITH_LSPP */ } - if (con->http.state != HTTP_POST_SEND) -@@ -3572,6 +3698,49 @@ is_path_absolute(const char *path) /* I + if (con->http.state != HTTP_STATE_POST_SEND) +@@ -3674,6 +3800,49 @@ is_path_absolute(const char *path) /* I return (1); } @@ -626,9 +629,9 @@ diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. -diff -up cups-1.6.2/scheduler/client.h.lspp cups-1.6.2/scheduler/client.h ---- cups-1.6.2/scheduler/client.h.lspp 2013-03-18 19:00:30.706448129 +0100 -+++ cups-1.6.2/scheduler/client.h 2013-03-18 19:00:30.727447838 +0100 +diff -up cups-1.7b1/scheduler/client.h.lspp cups-1.7b1/scheduler/client.h +--- cups-1.7b1/scheduler/client.h.lspp 2013-04-19 12:03:41.104867536 +0200 ++++ cups-1.7b1/scheduler/client.h 2013-04-19 12:03:41.213866093 +0200 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -664,9 +667,9 @@ diff -up cups-1.6.2/scheduler/client.h.lspp cups-1.6.2/scheduler/client.h #ifdef HAVE_SSL extern int cupsdEndTLS(cupsd_client_t *con); -diff -up cups-1.6.2/scheduler/conf.c.lspp cups-1.6.2/scheduler/conf.c ---- cups-1.6.2/scheduler/conf.c.lspp 2013-03-18 19:00:30.643449003 +0100 -+++ cups-1.6.2/scheduler/conf.c 2013-03-18 19:00:30.728447824 +0100 +diff -up cups-1.7b1/scheduler/conf.c.lspp cups-1.7b1/scheduler/conf.c +--- cups-1.7b1/scheduler/conf.c.lspp 2013-04-19 12:03:40.728872515 +0200 ++++ cups-1.7b1/scheduler/conf.c 2013-04-19 12:03:41.218866026 +0200 @@ -34,6 +34,7 @@ * read_location() - Read a definition. * read_policy() - Read a definition. @@ -706,7 +709,7 @@ diff -up cups-1.6.2/scheduler/conf.c.lspp cups-1.6.2/scheduler/conf.c /* -@@ -851,6 +862,25 @@ cupsdReadConfiguration(void) +@@ -850,6 +861,25 @@ cupsdReadConfiguration(void) RunUser = getuid(); @@ -732,7 +735,7 @@ diff -up cups-1.6.2/scheduler/conf.c.lspp cups-1.6.2/scheduler/conf.c cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", RemotePort ? "enabled" : "disabled"); -@@ -1253,7 +1283,19 @@ cupsdReadConfiguration(void) +@@ -1252,7 +1282,19 @@ cupsdReadConfiguration(void) cupsdClearString(&Classification); if (Classification) @@ -752,7 +755,7 @@ diff -up cups-1.6.2/scheduler/conf.c.lspp cups-1.6.2/scheduler/conf.c /* * Check the MaxClients setting, and then allocate memory for it... -@@ -3639,6 +3681,18 @@ read_location(cups_file_t *fp, /* I - C +@@ -3638,6 +3680,18 @@ read_location(cups_file_t *fp, /* I - C return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum); } @@ -771,10 +774,10 @@ diff -up cups-1.6.2/scheduler/conf.c.lspp cups-1.6.2/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -up cups-1.6.2/scheduler/conf.h.lspp cups-1.6.2/scheduler/conf.h ---- cups-1.6.2/scheduler/conf.h.lspp 2013-03-18 19:00:30.643449003 +0100 -+++ cups-1.6.2/scheduler/conf.h 2013-03-18 19:00:30.729447810 +0100 -@@ -249,6 +249,13 @@ VAR int SSLOptions VALUE(CUPSD_SSL_NO +diff -up cups-1.7b1/scheduler/conf.h.lspp cups-1.7b1/scheduler/conf.h +--- cups-1.7b1/scheduler/conf.h.lspp 2013-04-19 12:03:40.730872489 +0200 ++++ cups-1.7b1/scheduler/conf.h 2013-04-19 12:03:41.221865987 +0200 +@@ -248,6 +248,13 @@ VAR int SSLOptions VALUE(CUPSD_SSL_NO /* SSL/TLS options */ #endif /* HAVE_SSL */ @@ -788,7 +791,7 @@ diff -up cups-1.6.2/scheduler/conf.h.lspp cups-1.6.2/scheduler/conf.h #ifdef HAVE_LAUNCHD VAR int LaunchdTimeout VALUE(10); /* Time after which an idle cupsd will exit */ -@@ -267,6 +274,9 @@ int HaveServerCreds VALUE(0); +@@ -266,6 +273,9 @@ int HaveServerCreds VALUE(0); gss_cred_id_t ServerCreds; /* Server's GSS credentials */ #endif /* HAVE_GSSAPI */ @@ -798,9 +801,9 @@ diff -up cups-1.6.2/scheduler/conf.h.lspp cups-1.6.2/scheduler/conf.h /* * Prototypes... -diff -up cups-1.6.2/scheduler/cupsd.h.lspp cups-1.6.2/scheduler/cupsd.h ---- cups-1.6.2/scheduler/cupsd.h.lspp 2012-12-17 23:17:08.000000000 +0100 -+++ cups-1.6.2/scheduler/cupsd.h 2013-03-18 19:00:30.729447810 +0100 +diff -up cups-1.7b1/scheduler/cupsd.h.lspp cups-1.7b1/scheduler/cupsd.h +--- cups-1.7b1/scheduler/cupsd.h.lspp 2013-03-08 01:45:54.000000000 +0100 ++++ cups-1.7b1/scheduler/cupsd.h 2013-04-19 12:03:41.223865960 +0200 @@ -13,6 +13,8 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -832,9 +835,9 @@ diff -up cups-1.6.2/scheduler/cupsd.h.lspp cups-1.6.2/scheduler/cupsd.h /* * Some OS's don't have hstrerror(), most notably Solaris... */ -diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c ---- cups-1.6.2/scheduler/ipp.c.lspp 2013-03-18 19:00:30.668448656 +0100 -+++ cups-1.6.2/scheduler/ipp.c 2013-03-18 19:05:00.416706472 +0100 +diff -up cups-1.7b1/scheduler/ipp.c.lspp cups-1.7b1/scheduler/ipp.c +--- cups-1.7b1/scheduler/ipp.c.lspp 2013-04-19 12:03:40.906870158 +0200 ++++ cups-1.7b1/scheduler/ipp.c 2013-04-19 12:12:37.348640325 +0200 @@ -35,6 +35,7 @@ * cancel_all_jobs() - Cancel all or selected print jobs. * cancel_job() - Cancel a print job. @@ -878,7 +881,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p); static void close_job(cupsd_client_t *con, ipp_attribute_t *uri); static void copy_attrs(ipp_t *to, ipp_t *from, cups_array_t *ra, -@@ -1300,6 +1315,21 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1302,6 +1317,21 @@ add_job(cupsd_client_t *con, /* I - Cl "time-at-creation", "time-at-processing" }; @@ -900,8 +903,8 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1640,6 +1670,106 @@ add_job(cupsd_client_t *con, /* I - Cl - } +@@ -1619,6 +1649,106 @@ add_job(cupsd_client_t *con, /* I - Cl + return (NULL); } +#ifdef WITH_LSPP @@ -1007,7 +1010,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1648,6 +1778,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1627,6 +1757,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1040,7 +1043,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE); job->attrs = con->request; job->dirty = 1; -@@ -1857,6 +2013,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1836,6 +1992,29 @@ add_job(cupsd_client_t *con, /* I - Cl attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]); attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]); } @@ -1070,7 +1073,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c job->job_sheets = attr; -@@ -1887,6 +2066,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1866,6 +2045,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1080,7 +1083,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1905,6 +2087,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1884,6 +2066,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1090,7 +1093,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1925,6 +2110,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1904,6 +2089,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1100,7 +1103,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1965,8 +2153,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1944,8 +2132,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1153,7 +1156,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c /* * See if we need to add the starting sheet... -@@ -3730,6 +3962,111 @@ check_rss_recipient( +@@ -3717,6 +3949,111 @@ check_rss_recipient( } @@ -1265,7 +1268,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c /* * 'check_quotas()' - Check quotas for a printer and user. */ -@@ -4182,6 +4519,15 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4173,6 +4510,15 @@ copy_banner(cupsd_client_t *con, /* I - char attrname[255], /* Name of attribute */ *s; /* Pointer into name */ ipp_attribute_t *attr; /* Attribute */ @@ -1281,7 +1284,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -4217,6 +4563,82 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4208,6 +4554,82 @@ copy_banner(cupsd_client_t *con, /* I - fchmod(cupsFileNumber(out), 0640); fchown(cupsFileNumber(out), RunUser, Group); @@ -1364,7 +1367,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c /* * Try the localized banner file under the subdirectory... -@@ -4311,6 +4733,24 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4302,6 +4724,24 @@ copy_banner(cupsd_client_t *con, /* I - else s = attrname; @@ -1389,7 +1392,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6388,6 +6828,22 @@ get_job_attrs(cupsd_client_t *con, /* I +@@ -6162,6 +6602,22 @@ get_job_attrs(cupsd_client_t *con, /* I exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username); @@ -1412,7 +1415,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c /* * Copy attributes... */ -@@ -6741,6 +7197,11 @@ get_jobs(cupsd_client_t *con, /* I - C +@@ -6504,6 +6960,11 @@ get_jobs(cupsd_client_t *con, /* I - C if (username[0] && _cups_strcasecmp(username, job->username)) continue; @@ -1424,7 +1427,7 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c if (count > 0) ippAddSeparator(con->response); -@@ -11303,6 +11764,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -11068,6 +11529,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -1436,9 +1439,9 @@ diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c /* * Check the username against the owner... */ -diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c ---- cups-1.6.2/scheduler/job.c.lspp 2013-03-18 19:00:30.686448406 +0100 -+++ cups-1.6.2/scheduler/job.c 2013-03-18 19:00:30.735447727 +0100 +diff -up cups-1.7b1/scheduler/job.c.lspp cups-1.7b1/scheduler/job.c +--- cups-1.7b1/scheduler/job.c.lspp 2013-04-19 12:03:40.982869152 +0200 ++++ cups-1.7b1/scheduler/job.c 2013-04-19 12:15:01.516685390 +0200 @@ -68,6 +68,9 @@ * update_job_attrs() - Update the job-printer-* attributes. */ @@ -1479,9 +1482,9 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -1071,6 +1090,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I - } - } +@@ -1092,6 +1111,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I + if (final_content_type[0]) + envp[envc ++] = final_content_type; +#ifdef WITH_LSPP + if (is_lspp_config()) @@ -1547,7 +1550,7 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c if (Classification && !banner_page) { if ((attr = ippFindAttribute(job->attrs, "job-sheets", -@@ -1845,6 +1925,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J +@@ -1863,6 +1943,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J ippSetString(job->attrs, &job->reasons, 0, "none"); } @@ -1568,7 +1571,7 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER); job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME); -@@ -2235,6 +2329,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2251,6 +2345,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J { char filename[1024]; /* Job control filename */ cups_file_t *fp; /* Job file */ @@ -1583,7 +1586,7 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p", -@@ -2247,6 +2349,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2263,6 +2365,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J fchown(cupsFileNumber(fp), RunUser, Group); @@ -1660,7 +1663,7 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3756,6 +3928,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3812,6 +3984,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -1679,10 +1682,10 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -4480,6 +4664,19 @@ static void - start_job(cupsd_job_t *job, /* I - Job ID */ +@@ -4538,6 +4722,18 @@ start_job(cupsd_job_t *job, /* I - cupsd_printer_t *printer) /* I - Printer to print job */ { + const char *filename; /* Support filename */ +#ifdef WITH_LSPP + char *audit_message = NULL; /* Audit message string */ + char *printerfile = NULL; /* Device file pointed to by the printer */ @@ -1695,11 +1698,10 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c + security_class_t tclass; /* Object class for the SELinux check */ + access_vector_t avr; /* Access method being requested */ +#endif /* WITH_LSPP */ -+ - cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", - job, job->id, printer, printer->name); -@@ -4622,6 +4819,108 @@ start_job(cupsd_job_t *job, /* I - + + cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", +@@ -4701,6 +4897,108 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -1808,9 +1810,9 @@ diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c /* * Now start the first file in the job... */ -diff -up cups-1.6.2/scheduler/job.h.lspp cups-1.6.2/scheduler/job.h ---- cups-1.6.2/scheduler/job.h.lspp 2012-05-23 03:36:50.000000000 +0200 -+++ cups-1.6.2/scheduler/job.h 2013-03-18 19:00:30.736447713 +0100 +diff -up cups-1.7b1/scheduler/job.h.lspp cups-1.7b1/scheduler/job.h +--- cups-1.7b1/scheduler/job.h.lspp 2012-05-23 03:36:50.000000000 +0200 ++++ cups-1.7b1/scheduler/job.h 2013-04-19 12:03:41.248865629 +0200 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -1836,9 +1838,9 @@ diff -up cups-1.6.2/scheduler/job.h.lspp cups-1.6.2/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -up cups-1.6.2/scheduler/main.c.lspp cups-1.6.2/scheduler/main.c ---- cups-1.6.2/scheduler/main.c.lspp 2013-03-18 19:00:30.708448101 +0100 -+++ cups-1.6.2/scheduler/main.c 2013-03-18 19:05:36.422206888 +0100 +diff -up cups-1.7b1/scheduler/main.c.lspp cups-1.7b1/scheduler/main.c +--- cups-1.7b1/scheduler/main.c.lspp 2013-04-19 12:03:41.112867430 +0200 ++++ cups-1.7b1/scheduler/main.c 2013-04-19 12:17:28.185701322 +0200 @@ -38,6 +38,8 @@ * usage() - Show scheduler usage. */ @@ -1865,10 +1867,10 @@ diff -up cups-1.6.2/scheduler/main.c.lspp cups-1.6.2/scheduler/main.c +#if WITH_LSPP + auditfail_t failmode; /* Action for audit_open failure */ +#endif /* WITH_LSPP */ - #ifdef __sgi - cups_file_t *fp; /* Fake lpsched lock file */ - struct stat statbuf; /* Needed for checking lpsched FIFO */ -@@ -522,6 +530,25 @@ main(int argc, /* I - Number of comm + int run_as_child = 0; + /* Needed for background fork/exec */ + #ifdef __APPLE__ +@@ -515,6 +523,25 @@ main(int argc, /* I - Number of comm #endif /* DEBUG */ } @@ -1894,7 +1896,7 @@ diff -up cups-1.6.2/scheduler/main.c.lspp cups-1.6.2/scheduler/main.c /* * Set the timezone info... */ -@@ -1216,6 +1243,11 @@ main(int argc, /* I - Number of comm +@@ -1175,6 +1202,11 @@ main(int argc, /* I - Number of comm cupsdStopSelect(); @@ -1906,10 +1908,10 @@ diff -up cups-1.6.2/scheduler/main.c.lspp cups-1.6.2/scheduler/main.c return (!stop_scheduler); } -diff -up cups-1.6.2/scheduler/printers.c.lspp cups-1.6.2/scheduler/printers.c ---- cups-1.6.2/scheduler/printers.c.lspp 2013-03-18 19:00:30.649448920 +0100 -+++ cups-1.6.2/scheduler/printers.c 2013-03-18 19:07:48.244377673 +0100 -@@ -56,6 +56,8 @@ +diff -up cups-1.7b1/scheduler/printers.c.lspp cups-1.7b1/scheduler/printers.c +--- cups-1.7b1/scheduler/printers.c.lspp 2013-04-19 12:03:40.756872145 +0200 ++++ cups-1.7b1/scheduler/printers.c 2013-04-19 12:03:41.261865457 +0200 +@@ -52,6 +52,8 @@ * write_xml_string() - Write a string with XML escaping. */ @@ -1918,7 +1920,7 @@ diff -up cups-1.6.2/scheduler/printers.c.lspp cups-1.6.2/scheduler/printers.c /* * Include necessary headers... */ -@@ -80,6 +82,10 @@ +@@ -76,6 +78,10 @@ # include #endif /* __APPLE__ */ @@ -1929,7 +1931,7 @@ diff -up cups-1.6.2/scheduler/printers.c.lspp cups-1.6.2/scheduler/printers.c /* * Local functions... -@@ -2090,6 +2096,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2046,6 +2052,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) ipp_attribute_t *attr; /* Attribute data */ char *name, /* Current user/group name */ *filter; /* Current filter */ @@ -1943,7 +1945,7 @@ diff -up cups-1.6.2/scheduler/printers.c.lspp cups-1.6.2/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2212,6 +2225,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2168,6 +2181,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -1989,11 +1991,3 @@ diff -up cups-1.6.2/scheduler/printers.c.lspp cups-1.6.2/scheduler/printers.c } p->raw = 0; -@@ -5298,7 +5350,6 @@ write_irix_state(cupsd_printer_t *p) /* - } - #endif /* __sgi */ - -- - /* - * 'write_xml_string()' - Write a string with XML escaping. - */ diff --git a/cups-res_init.patch b/cups-res_init.patch index 94a81a4..3866521 100644 --- a/cups-res_init.patch +++ b/cups-res_init.patch @@ -1,7 +1,7 @@ -diff -up cups-1.6b1/cups/http-addr.c.res_init cups-1.6b1/cups/http-addr.c ---- cups-1.6b1/cups/http-addr.c.res_init 2012-05-17 00:57:03.000000000 +0200 -+++ cups-1.6b1/cups/http-addr.c 2012-05-25 15:51:51.323916352 +0200 -@@ -254,7 +254,8 @@ httpAddrLookup( +diff -up cups-1.7b1/cups/http-addr.c.res_init cups-1.7b1/cups/http-addr.c +--- cups-1.7b1/cups/http-addr.c.res_init 2013-03-20 19:14:10.000000000 +0100 ++++ cups-1.7b1/cups/http-addr.c 2013-04-19 12:01:36.927512159 +0200 +@@ -319,7 +319,8 @@ httpAddrLookup( if (error) { @@ -11,10 +11,10 @@ diff -up cups-1.6b1/cups/http-addr.c.res_init cups-1.6b1/cups/http-addr.c cg->need_res_init = 1; return (httpAddrString(addr, name, namelen)); -diff -up cups-1.6b1/cups/http-addrlist.c.res_init cups-1.6b1/cups/http-addrlist.c ---- cups-1.6b1/cups/http-addrlist.c.res_init 2012-04-23 19:26:57.000000000 +0200 -+++ cups-1.6b1/cups/http-addrlist.c 2012-05-25 16:05:05.930377452 +0200 -@@ -540,7 +540,8 @@ httpAddrGetList(const char *hostname, /* +diff -up cups-1.7b1/cups/http-addrlist.c.res_init cups-1.7b1/cups/http-addrlist.c +--- cups-1.7b1/cups/http-addrlist.c.res_init 2013-04-19 12:01:36.930512119 +0200 ++++ cups-1.7b1/cups/http-addrlist.c 2013-04-19 12:03:13.769229554 +0200 +@@ -581,7 +581,8 @@ httpAddrGetList(const char *hostname, /* } else { @@ -23,4 +23,4 @@ diff -up cups-1.6b1/cups/http-addrlist.c.res_init cups-1.6b1/cups/http-addrlist. + error == EAI_NONAME) cg->need_res_init = 1; - _cupsSetError(IPP_INTERNAL_ERROR, gai_strerror(error), 0); + _cupsSetError(IPP_STATUS_ERROR_INTERNAL, gai_strerror(error), 0); diff --git a/cups.spec b/cups.spec index 3b3f11d..108957f 100644 --- a/cups.spec +++ b/cups.spec @@ -1,6 +1,9 @@ %global use_alternatives 1 %global lspp 1 +%global prever b1 +%global VERSION %{version}%{prever} + # {_exec_prefix}/lib/cups is correct, even on x86_64. # It is not used for shared objects but for executables. # It's more of a libexec-style ({_libexecdir}) usage, @@ -10,12 +13,12 @@ Summary: CUPS printing system Name: cups Epoch: 1 -Version: 1.6.2 -Release: 4%{?dist} +Version: 1.7 +Release: 0.1.%{prever}%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ -Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 +Source: http://ftp.easysw.com/pub/cups/%{VERSION}/cups-%{VERSION}-source.tar.bz2 # Pixmap for desktop file Source2: cupsprinter.png # socket unit for cups-lpd service @@ -168,7 +171,7 @@ lpd emulation. Sends IPP requests to the specified URI and tests and/or displays the results. %prep -%setup -q +%setup -q -n cups-%{VERSION} # Don't gzip man pages in the Makefile, let rpmbuild do it. %patch1 -p1 -b .no-gzip-man # Use the system pam configuration. @@ -342,7 +345,7 @@ d /var/spool/cups/tmp - - - 30d EOF # /usr/lib/tmpfiles.d/cups-lp.conf (bug #812641) -cat > ${RPM_BUILD_ROOT}%{_prefix}/lib/tmpfiles.d/cups-lp.conf < ${RPM_BUILD_ROOT}%{_tmpfilesdir}/cups-lp.conf < - 1:1.7-0.1.b1 +- 1.7b1 +- use _tmpfilesdir macro + * Wed Apr 10 2013 Tim Waugh - cups-dbus-utf.patch: now that the scheduler only accepts valid UTF-8 strings for job-name, there's no need to validate it as UTF-8 in the diff --git a/sources b/sources index 3f710d0..a0a2334 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -13c8b2b2336d42001abe4899766b62dc cups-1.6.2-source.tar.bz2 +549308e40bcf810f69775e5e843997c2 cups-1.7b1-source.tar.bz2