]> git.pld-linux.org Git - packages/cups.git/commitdiff
- switch to OpenPrinting cups 2.4.8
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 19 May 2024 20:40:37 +0000 (22:40 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 19 May 2024 20:42:22 +0000 (22:42 +0200)
- update patches and remove obsolete

cups-avahi-address.patch [deleted file]
cups-avahi-no-threaded.patch [deleted file]
cups-certs_FHS.patch
cups-logrotate.patch [deleted file]
cups-lspp.patch
cups-no-polluted-krb5config.patch
cups-nostrip.patch
cups-systemd-socket.patch [deleted file]
cups.spec
job-name-too-long.patch
scx3400w-quirks.patchs [deleted file]

diff --git a/cups-avahi-address.patch b/cups-avahi-address.patch
deleted file mode 100644 (file)
index b8090ea..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-diff -up cups-2.2b2/cups/http-support.c.avahi-address cups-2.2b2/cups/http-support.c
---- cups-2.2b2/cups/http-support.c.avahi-address       2016-06-24 17:43:35.000000000 +0200
-+++ cups-2.2b2/cups/http-support.c     2016-06-27 15:31:34.201361844 +0200
-@@ -2340,7 +2340,7 @@ http_resolve_cb(
-     const char             *type,     /* I - Registration type */
-     const char             *domain,   /* I - Domain (unused) */
-     const char             *hostTarget,       /* I - Hostname */
--    const AvahiAddress     *address,  /* I - Address (unused) */
-+    const AvahiAddress     *address,  /* I - Address */
-     uint16_t               port,      /* I - Port number */
-     AvahiStringList        *txt,      /* I - TXT record */
-     AvahiLookupResultFlags flags,     /* I - Lookup flags (unused) */
-@@ -2493,39 +2493,62 @@ http_resolve_cb(
-     * getting the IP address of the .local name and then do reverse-lookups...
-     */
--    http_addrlist_t   *addrlist,      /* List of addresses */
--                      *addr;          /* Current address */
-+    http_addr_t addr;
-+    size_t addrlen;
-+    int error;
-     DEBUG_printf(("5http_resolve_cb: Looking up \"%s\".", hostTarget));
--    snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port));
--    if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL)
-+    switch (address->proto)
-     {
--      for (addr = addrlist; addr; addr = addr->next)
-+    case AVAHI_PROTO_INET:
-+      addr.ipv4.sin_family = AF_INET;
-+      addrlen = sizeof (addr.ipv4.sin_addr);
-+      memcpy (&addr.ipv4.sin_addr, &address->data, addrlen);
-+      break;
-+    case AVAHI_PROTO_INET6:
-+      addr.ipv6.sin6_family = AF_INET6;
-+      addrlen = sizeof (addr.ipv6.sin6_addr);
-+      memcpy (&addr.ipv6.sin6_addr, &address->data, addrlen);
-+      break;
-+    default:
-+      DEBUG_printf(("8http_resolve_cb: unknown address family %d",
-+                  address->proto));
-+      addrlen = 0;
-+    }
-+
-+    if (addrlen > 0) {
-+      error = getnameinfo(&addr.addr, httpAddrLength (&addr),
-+                        fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
-+
-+      if (!error)
-       {
--        int error = getnameinfo(&(addr->addr.addr), (socklen_t)httpAddrLength(&(addr->addr)), fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
-+      DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
--        if (!error)
--      {
--        DEBUG_printf(("5http_resolve_cb: Found \"%s\".", fqdn));
-+      if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
-+          _cups_strcasecmp(hostptr, ".local"))
--        if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
--            _cups_strcasecmp(hostptr, ".local"))
--        {
--          hostTarget = fqdn;
--          break;
--        }
-+      {
-+        hostTarget = fqdn;
-       }
-+      } else {
-+      avahi_address_snprint (fqdn, sizeof (fqdn), address);
-+      hostTarget = fqdn;
-+
- #ifdef DEBUG
--      else
--        DEBUG_printf(("5http_resolve_cb: \"%s\" did not resolve: %d",
--                      httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
--                      error));
-+      DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
-+                    fqdn, error));
- #endif /* DEBUG */
-       }
--      httpAddrFreeList(addrlist);
-     }
-+  } else {
-+   /*
-+    * Use the IP address that responded...
-+    */
-+
-+   avahi_address_snprint (fqdn, sizeof (fqdn), address);
-+   hostTarget = fqdn;
-   }
-  /*
diff --git a/cups-avahi-no-threaded.patch b/cups-avahi-no-threaded.patch
deleted file mode 100644 (file)
index b81c497..0000000
+++ /dev/null
@@ -1,1029 +0,0 @@
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/Makefile cups-2.3.3/scheduler/Makefile
---- cups-2.3.3.org/scheduler/Makefile  2020-04-27 20:04:29.000000000 +0200
-+++ cups-2.3.3/scheduler/Makefile      2021-04-20 22:45:53.873155054 +0200
-@@ -12,6 +12,7 @@ include ../Makedefs
- CUPSDOBJS =   \
-               auth.o \
-+              avahi.o \
-               banners.o \
-               cert.o \
-               classes.o \
-@@ -35,7 +36,8 @@ CUPSDOBJS =  \
-               server.o \
-               statbuf.o \
-               subscriptions.o \
--              sysman.o
-+              sysman.o \
-+              timeout.o
- LIBOBJS =     \
-               filter.o \
-               mime.o \
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/avahi.c cups-2.3.3/scheduler/avahi.c
---- cups-2.3.3.org/scheduler/avahi.c   1970-01-01 01:00:00.000000000 +0100
-+++ cups-2.3.3/scheduler/avahi.c       2021-04-20 22:45:53.873155054 +0200
-@@ -0,0 +1,441 @@
-+/*
-+ * "$Id$"
-+ *
-+ *   Avahi poll implementation for the CUPS scheduler.
-+ *
-+ *   Copyright (C) 2010, 2011 Red Hat, Inc.
-+ *   Authors:
-+ *    Tim Waugh <twaugh@redhat.com>
-+ *
-+ *   Redistribution and use in source and binary forms, with or without
-+ *   modification, are permitted provided that the following conditions
-+ *   are met:
-+ *
-+ *   Redistributions of source code must retain the above copyright
-+ *   notice, this list of conditions and the following disclaimer.
-+ *
-+ *   Redistributions in binary form must reproduce the above copyright
-+ *   notice, this list of conditions and the following disclaimer in the
-+ *   documentation and/or other materials provided with the distribution.
-+ *
-+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-+ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-+ *   COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-+ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-+ *   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-+ *   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ *   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ *   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-+ *   OF THE POSSIBILITY OF SUCH DAMAGE.
-+ *
-+ * Contents:
-+ *
-+ *   watch_read_cb         - Read callback for file descriptor
-+ *   watch_write_cb        - Write callback for file descriptor
-+ *   watched_fd_add_select() - Call cupsdAddSelect() as needed
-+ *   watch_new()           - Create a new file descriptor watch
-+ *   watch_free()          - Free a file descriptor watch
-+ *   watch_update()        - Update watched events for a file descriptor
-+ *   watch_get_events()    - Get events that happened for a file descriptor
-+ *   timeout_cb()          - Run a timed Avahi callback
-+ *   timeout_new()         - Set a wakeup time
-+ *   timeout_update()      - Update the expiration time for a timeout
-+ *   timeout_free()        - Free a timeout
-+ *   compare_watched_fds() - Compare watched file descriptors for array sorting
-+ *   avahi_cups_poll_new() - Create a new Avahi main loop object for CUPS
-+ *   avahi_cups_poll_free() - Free an Avahi main loop object for CUPS
-+ *   avahi_cups_poll_get() - Get the abstract poll API structure
-+ */
-+
-+#include <config.h>
-+
-+#ifdef HAVE_AVAHI /* Applies to entire file... */
-+
-+/*
-+ * Include necessary headers...
-+ */
-+
-+#include "cupsd.h"
-+
-+#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
-+#  include <malloc.h>
-+#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */
-+
-+#ifdef HAVE_AVAHI
-+#  include <avahi-common/timeval.h>
-+#endif /* HAVE_AVAHI */
-+
-+
-+typedef struct
-+{
-+  AvahiCupsPoll *cups_poll;
-+
-+  int fd;
-+  AvahiWatchEvent occurred;
-+  cups_array_t *watches;
-+} cupsd_watched_fd_t;
-+
-+struct AvahiWatch
-+{
-+  cupsd_watched_fd_t *watched_fd;
-+
-+  AvahiWatchEvent events;
-+  AvahiWatchCallback callback;
-+  void *userdata;
-+};
-+
-+struct AvahiTimeout
-+{
-+  AvahiCupsPoll *cups_poll;
-+  AvahiTimeoutCallback callback;
-+  void *userdata;
-+  cupsd_timeout_t *cupsd_timeout;
-+};
-+
-+/*
-+ * Local functions...
-+ */
-+
-+static AvahiWatch *   watch_new(const AvahiPoll *api,
-+                                int fd,
-+                                AvahiWatchEvent events,
-+                                AvahiWatchCallback callback,
-+                                void *userdata);
-+static void           watch_free(AvahiWatch *watch);
-+static void           watch_update(AvahiWatch *watch,
-+                                   AvahiWatchEvent events);
-+static AvahiWatchEvent        watch_get_events(AvahiWatch *watch);
-+
-+
-+/*
-+ * 'watch_read_cb' - Read callback for file descriptor
-+ */
-+
-+static void
-+watch_read_cb (void *userdata)
-+{
-+  AvahiWatch *watch;
-+  cupsd_watched_fd_t *watched_fd = userdata;
-+  watched_fd->occurred |= AVAHI_WATCH_IN;
-+  for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches);
-+       watch;
-+       watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches))
-+  {
-+    if (watch->events & watched_fd->occurred)
-+    {
-+      (watch->callback) (watch, watched_fd->fd,
-+                       AVAHI_WATCH_IN, watch->userdata);
-+      watched_fd->occurred &= ~AVAHI_WATCH_IN;
-+      break;
-+    }
-+  }
-+}
-+
-+
-+/*
-+ * 'watch_write_cb' - Write callback for file descriptor
-+ */
-+
-+static void
-+watch_write_cb (void *userdata)
-+{
-+  AvahiWatch *watch;
-+  cupsd_watched_fd_t *watched_fd = userdata;
-+  watched_fd->occurred |= AVAHI_WATCH_OUT;
-+  for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches);
-+       watch;
-+       watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches))
-+  {
-+    if (watch->events & watched_fd->occurred)
-+    {
-+      (watch->callback) (watch, watched_fd->fd,
-+                       AVAHI_WATCH_OUT, watch->userdata);
-+      watched_fd->occurred &= ~AVAHI_WATCH_OUT;
-+      break;
-+    }
-+  }
-+}
-+
-+
-+/*
-+ * 'watched_fd_add_select' - Call cupsdAddSelect() as needed
-+ */
-+
-+static int                                            /* O - Watches? */
-+watched_fd_add_select (cupsd_watched_fd_t *watched_fd)
-+{
-+  AvahiWatch *watch;
-+  cupsd_selfunc_t read_cb = NULL, write_cb = NULL;
-+  int any_watches = 0;
-+
-+  for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches);
-+       watch;
-+       watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches))
-+  {
-+    any_watches = 1;
-+    if (watch->events & (AVAHI_WATCH_IN |
-+                           AVAHI_WATCH_ERR |
-+                           AVAHI_WATCH_HUP))
-+    {
-+      read_cb = (cupsd_selfunc_t)watch_read_cb;
-+      if (write_cb != NULL)
-+      break;
-+    }
-+
-+    if (watch->events & AVAHI_WATCH_OUT)
-+    {
-+      write_cb = (cupsd_selfunc_t)watch_write_cb;
-+      if (read_cb != NULL)
-+      break;
-+    }
-+  }
-+
-+  if (read_cb || write_cb)
-+    cupsdAddSelect (watched_fd->fd, read_cb, write_cb, watched_fd);
-+  else
-+    cupsdRemoveSelect (watched_fd->fd);
-+
-+  return (any_watches);
-+}
-+
-+/*
-+ * 'watch_new' - Create a new file descriptor watch
-+ */
-+
-+static AvahiWatch *
-+watch_new (const AvahiPoll *api,
-+         int fd,
-+         AvahiWatchEvent events,
-+         AvahiWatchCallback callback,
-+         void *userdata)
-+{
-+  cupsd_watched_fd_t key, *watched_fd;
-+  AvahiCupsPoll *cups_poll = api->userdata;
-+  AvahiWatch *watch = malloc(sizeof(AvahiWatch));
-+  if (watch == NULL)
-+    return (NULL);
-+
-+  watch->events = events;
-+  watch->callback = callback;
-+  watch->userdata = userdata;
-+
-+  key.fd = fd;
-+  watched_fd = cupsArrayFind (cups_poll->watched_fds, &key);
-+  if (watched_fd == NULL)
-+  {
-+    watched_fd = malloc(sizeof(cupsd_watched_fd_t));
-+    if (watched_fd == NULL)
-+    {
-+      free (watch);
-+      return (NULL);
-+    }
-+
-+    watched_fd->fd = fd;
-+    watched_fd->occurred = 0;
-+    watched_fd->cups_poll = cups_poll;
-+    watched_fd->watches = cupsArrayNew (NULL, NULL);
-+    cupsArrayAdd (cups_poll->watched_fds, watched_fd);
-+  }
-+
-+  watch->watched_fd = watched_fd;
-+  cupsArrayAdd(watched_fd->watches, watch);
-+  watched_fd_add_select (watched_fd);
-+  return (watch);
-+}
-+
-+
-+/*
-+ * 'watch_free' - Free a file descriptor watch
-+ */
-+
-+static void
-+watch_free (AvahiWatch *watch)
-+{
-+  cupsd_watched_fd_t *watched_fd = watch->watched_fd;
-+  AvahiCupsPoll *cups_poll = watched_fd->cups_poll;
-+
-+  cupsArrayRemove (watched_fd->watches, watch);
-+  free (watch);
-+
-+  if (!watched_fd_add_select (watched_fd))
-+  {
-+    /* No more watches */
-+    cupsArrayRemove (cups_poll->watched_fds, watched_fd);
-+    free (watched_fd);
-+  }
-+}
-+
-+
-+/*
-+ * 'watch_update' - Update watched events for a file descriptor
-+ */
-+
-+static void
-+watch_update (AvahiWatch *watch,
-+            AvahiWatchEvent events)
-+{
-+  watch->events = events;
-+  watched_fd_add_select (watch->watched_fd);
-+}
-+
-+
-+/*
-+ * 'watch_get_events' - Get events that happened for a file descriptor
-+ */
-+
-+static AvahiWatchEvent
-+watch_get_events (AvahiWatch *watch)
-+{
-+  return (watch->watched_fd->occurred);
-+}
-+
-+
-+/*
-+ * 'timeout_cb()' - Run a timed Avahi callback
-+ */
-+
-+static void
-+timeout_cb (cupsd_timeout_t *cupsd_timeout, void *userdata)
-+{
-+  AvahiTimeout *timeout = userdata;
-+  (timeout->callback) (timeout, timeout->userdata);
-+}
-+
-+
-+/*
-+ * 'timeout_new' - Set a wakeup time
-+ */
-+
-+static AvahiTimeout *
-+timeout_new (const AvahiPoll *api,
-+           const struct timeval *tv,
-+           AvahiTimeoutCallback callback,
-+           void *userdata)
-+{
-+  AvahiTimeout *timeout;
-+  AvahiCupsPoll *cups_poll = api->userdata;
-+
-+  timeout = malloc(sizeof(AvahiTimeout));
-+  if (timeout == NULL)
-+    return (NULL);
-+
-+  timeout->cups_poll = cups_poll;
-+  timeout->callback = callback;
-+  timeout->userdata = userdata;
-+  timeout->cupsd_timeout = cupsdAddTimeout (tv,
-+                                          (cupsd_timeoutfunc_t)timeout_cb,
-+                                          timeout);
-+  cupsArrayAdd (cups_poll->timeouts, timeout);
-+  return (timeout);
-+}
-+
-+
-+/*
-+ * 'timeout_update' - Update the expiration time for a timeout
-+ */
-+
-+static void
-+timeout_update (AvahiTimeout *timeout,
-+              const struct timeval *tv)
-+{
-+  cupsdUpdateTimeout (timeout->cupsd_timeout, tv);
-+}
-+
-+
-+/*
-+ * ' timeout_free' - Free a timeout
-+ */
-+
-+static void
-+timeout_free (AvahiTimeout *timeout)
-+{
-+  cupsArrayRemove (timeout->cups_poll->timeouts, timeout);
-+  cupsdRemoveTimeout (timeout->cupsd_timeout);
-+  free (timeout);
-+}
-+
-+
-+/*
-+ * 'compare_watched_fds' - Compare watched file descriptors for array sorting
-+ */
-+static int
-+compare_watched_fds(cupsd_watched_fd_t *p0,
-+                  cupsd_watched_fd_t *p1)
-+{
-+  /*
-+   * Compare by fd (no two elements have the same fd)
-+   */
-+
-+  if (p0->fd == p1->fd)
-+    return 0;
-+
-+  return (p0->fd < p1->fd ? -1 : 1);
-+}
-+
-+
-+/*
-+ * 'avahi_cups_poll_new' - Create a new Avahi main loop object for CUPS
-+ */
-+
-+AvahiCupsPoll *
-+avahi_cups_poll_new (void)
-+{
-+  AvahiCupsPoll *cups_poll = malloc(sizeof(AvahiCupsPoll));
-+  if (cups_poll == NULL)
-+    return (NULL);
-+
-+  cups_poll->watched_fds = cupsArrayNew ((cups_array_func_t)compare_watched_fds,
-+                                       NULL);
-+  cups_poll->timeouts = cupsArrayNew (NULL, NULL);
-+
-+  cups_poll->api.userdata = cups_poll;
-+  cups_poll->api.watch_new = watch_new;
-+  cups_poll->api.watch_free = watch_free;
-+  cups_poll->api.watch_update = watch_update;
-+  cups_poll->api.watch_get_events = watch_get_events;
-+
-+  cups_poll->api.timeout_new = timeout_new;
-+  cups_poll->api.timeout_update = timeout_update;
-+  cups_poll->api.timeout_free = timeout_free;
-+
-+  return (cups_poll);
-+}
-+
-+
-+/*
-+ * 'avahi_cups_poll_free' - Free an Avahi main loop object for CUPS
-+ */
-+void
-+avahi_cups_poll_free (AvahiCupsPoll *cups_poll)
-+{
-+  cupsd_watched_fd_t *watched_fd;
-+
-+  for (watched_fd = (cupsd_watched_fd_t*)cupsArrayFirst(cups_poll->watched_fds);
-+       watched_fd;
-+       watched_fd = (cupsd_watched_fd_t*)cupsArrayNext(cups_poll->watched_fds))
-+    cupsArrayClear (watched_fd->watches);
-+
-+  cupsArrayClear (cups_poll->watched_fds);
-+  cupsArrayClear (cups_poll->timeouts);
-+}
-+
-+
-+/*
-+ * 'avahi_cups_poll_get' - Get the abstract poll API structure
-+ */
-+
-+const AvahiPoll *
-+avahi_cups_poll_get (AvahiCupsPoll *cups_poll)
-+{
-+  return (&cups_poll->api);
-+}
-+
-+
-+#endif /* HAVE_AVAHI ... from top of file */
-+
-+/*
-+ * End of "$Id$".
-+ */
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/avahi.h cups-2.3.3/scheduler/avahi.h
---- cups-2.3.3.org/scheduler/avahi.h   1970-01-01 01:00:00.000000000 +0100
-+++ cups-2.3.3/scheduler/avahi.h       2021-04-20 22:45:53.873155054 +0200
-@@ -0,0 +1,69 @@
-+/*
-+ * "$Id$"
-+ *
-+ *   Avahi poll implementation for the CUPS scheduler.
-+ *
-+ *   Copyright (C) 2010, 2011 Red Hat, Inc.
-+ *   Authors:
-+ *    Tim Waugh <twaugh@redhat.com>
-+ *
-+ *   Redistribution and use in source and binary forms, with or without
-+ *   modification, are permitted provided that the following conditions
-+ *   are met:
-+ *
-+ *   Redistributions of source code must retain the above copyright
-+ *   notice, this list of conditions and the following disclaimer.
-+ *
-+ *   Redistributions in binary form must reproduce the above copyright
-+ *   notice, this list of conditions and the following disclaimer in the
-+ *   documentation and/or other materials provided with the distribution.
-+ *
-+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-+ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-+ *   COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-+ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-+ *   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-+ *   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ *   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ *   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-+ *   OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <config.h>
-+
-+#ifdef HAVE_AVAHI
-+#  include <avahi-client/client.h>
-+#  include <avahi-client/publish.h>
-+#endif /* HAVE_AVAHI */
-+
-+#ifdef HAVE_AUTHORIZATION_H
-+#  include <Security/Authorization.h>
-+#endif /* HAVE_AUTHORIZATION_H */
-+
-+
-+#ifdef HAVE_AVAHI
-+typedef struct
-+{
-+    AvahiPoll api;
-+    cups_array_t *watched_fds;
-+    cups_array_t *timeouts;
-+} AvahiCupsPoll;
-+#endif /* HAVE_AVAHI */
-+
-+/*
-+ * Prototypes...
-+ */
-+
-+#ifdef HAVE_AVAHI
-+extern AvahiCupsPoll *        avahi_cups_poll_new(void);
-+extern void           avahi_cups_poll_free(AvahiCupsPoll *cups_poll);
-+extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll);
-+#endif /* HAVE_AVAHI */
-+
-+
-+/*
-+ * End of "$Id$".
-+ */
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/cupsd.h cups-2.3.3/scheduler/cupsd.h
---- cups-2.3.3.org/scheduler/cupsd.h   2020-04-27 20:04:29.000000000 +0200
-+++ cups-2.3.3/scheduler/cupsd.h       2021-04-20 22:45:53.873155054 +0200
-@@ -115,6 +115,7 @@ extern const char *cups_hstrerror(int);
- #include "colorman.h"
- #include "conf.h"
- #include "banners.h"
-+#include "avahi.h"
- #include "dirsvc.h"
- #include "network.h"
- #include "subscriptions.h"
-@@ -135,6 +136,15 @@ extern const char *cups_hstrerror(int);
- typedef void (*cupsd_selfunc_t)(void *data);
-+#ifdef HAVE_AVAHI
-+/*
-+ * Timeout callback function type...
-+ */
-+
-+typedef struct _cupsd_timeout_s cupsd_timeout_t;
-+typedef void (*cupsd_timeoutfunc_t)(cupsd_timeout_t *timeout, void *data);
-+#endif /* HAVE_AVAHI */
-+
- /*
-  * Globals...
-@@ -159,6 +169,9 @@ VAR int                    OnDemand        VALUE(0);
-                                       /* Launched on demand */
- #endif /* HAVE_ONDEMAND */
-+#ifdef HAVE_AVAHI
-+VAR cups_array_t *Timeouts;           /* Timed callbacks for main loop */
-+#endif /* HAVE_AVAHI */
- /*
-  * Prototypes...
-@@ -220,3 +233,15 @@ extern void               cupsdStopSelect(void);
- /* server.c */
- extern void           cupsdStartServer(void);
- extern void           cupsdStopServer(void);
-+
-+#ifdef HAVE_AVAHI
-+extern void     cupsdInitTimeouts(void);
-+extern cupsd_timeout_t *cupsdAddTimeout (const struct timeval *tv,
-+                                       cupsd_timeoutfunc_t cb,
-+                                       void *data);
-+extern cupsd_timeout_t *cupsdNextTimeout (long *delay);
-+extern void     cupsdRunTimeout (cupsd_timeout_t *timeout);
-+extern void     cupsdUpdateTimeout (cupsd_timeout_t *timeout,
-+                                  const struct timeval *tv);
-+extern void     cupsdRemoveTimeout (cupsd_timeout_t *timeout);
-+#endif /* HAVE_AVAHI */
-\ No newline at end of file
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/dirsvc.c cups-2.3.3/scheduler/dirsvc.c
---- cups-2.3.3.org/scheduler/dirsvc.c  2020-04-27 20:04:29.000000000 +0200
-+++ cups-2.3.3/scheduler/dirsvc.c      2021-04-20 22:45:53.873155054 +0200
-@@ -190,7 +190,7 @@ cupsdStartBrowsing(void)
-     cupsdUpdateDNSSDName();
- #  else /* HAVE_AVAHI */
--    if ((DNSSDMaster = avahi_threaded_poll_new()) == NULL)
-+    if ((DNSSDMaster = avahi_cups_poll_new()) == NULL)
-     {
-       cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create DNS-SD thread.");
-@@ -201,7 +201,7 @@ cupsdStartBrowsing(void)
-     {
-       int error;                      /* Error code, if any */
--      DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
-+      DNSSDClient = avahi_client_new(avahi_cups_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
-       if (DNSSDClient == NULL)
-       {
-@@ -212,11 +212,9 @@ cupsdStartBrowsing(void)
-         if (FatalErrors & CUPSD_FATAL_BROWSE)
-         cupsdEndProcess(getpid(), 0);
--        avahi_threaded_poll_free(DNSSDMaster);
-+        avahi_cups_poll_free(DNSSDMaster);
-         DNSSDMaster = NULL;
-       }
--      else
--      avahi_threaded_poll_start(DNSSDMaster);
-     }
- #  endif /* HAVE_DNSSD */
-   }
-@@ -632,7 +630,7 @@ dnssdClientCallback(
-         * Renew Avahi client...
-         */
--        DNSSDClient = avahi_client_new(avahi_threaded_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
-+        DNSSDClient = avahi_client_new(avahi_cups_poll_get(DNSSDMaster), AVAHI_CLIENT_NO_FAIL, dnssdClientCallback, NULL, &error);
-         if (!DNSSDClient)
-         {
-@@ -698,17 +696,11 @@ dnssdDeregisterInstance(
-   *srv = NULL;
- #  else /* HAVE_AVAHI */
--  if (!from_callback)
--    avahi_threaded_poll_lock(DNSSDMaster);
--
-   if (*srv)
-   {
-     avahi_entry_group_free(*srv);
-     *srv = NULL;
-   }
--
--  if (!from_callback)
--    avahi_threaded_poll_unlock(DNSSDMaster);
- #  endif /* HAVE_DNSSD */
- }
-@@ -1027,16 +1019,10 @@ dnssdRegisterInstance(
-   (void)commit;
- #  else /* HAVE_AVAHI */
--  if (!from_callback)
--    avahi_threaded_poll_lock(DNSSDMaster);
--
-   if (!*srv)
-     *srv = avahi_entry_group_new(DNSSDClient, dnssdRegisterCallback, NULL);
-   if (!*srv)
-   {
--    if (!from_callback)
--      avahi_threaded_poll_unlock(DNSSDMaster);
--
-     cupsdLogMessage(CUPSD_LOG_WARN, "DNS-SD registration of \"%s\" failed: %s",
-                     name, dnssdErrorString(avahi_client_errno(DNSSDClient)));
-     return (0);
-@@ -1151,9 +1137,6 @@ dnssdRegisterInstance(
-       cupsdLogMessage(CUPSD_LOG_DEBUG, "DNS-SD commit of \"%s\" failed.",
-                       name);
-   }
--
--  if (!from_callback)
--    avahi_threaded_poll_unlock(DNSSDMaster);
- #  endif /* HAVE_DNSSD */
-   if (error)
-@@ -1324,9 +1307,6 @@ dnssdStop(void)
-   DNSSDMaster = NULL;
- #  else /* HAVE_AVAHI */
--  if (DNSSDMaster)
--    avahi_threaded_poll_stop(DNSSDMaster);
--
-   if (DNSSDClient)
-   {
-     avahi_client_free(DNSSDClient);
-@@ -1335,7 +1315,7 @@ dnssdStop(void)
-   if (DNSSDMaster)
-   {
--    avahi_threaded_poll_free(DNSSDMaster);
-+    avahi_cups_poll_free(DNSSDMaster);
-     DNSSDMaster = NULL;
-   }
- #  endif /* HAVE_DNSSD */
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/dirsvc.h cups-2.3.3/scheduler/dirsvc.h
---- cups-2.3.3.org/scheduler/dirsvc.h  2020-04-27 20:04:29.000000000 +0200
-+++ cups-2.3.3/scheduler/dirsvc.h      2021-04-20 22:45:53.873155054 +0200
-@@ -45,7 +45,7 @@ VAR cups_array_t     *DNSSDPrinters  VALUE(NU
- VAR DNSServiceRef     DNSSDMaster     VALUE(NULL);
-                                       /* Master DNS-SD service reference */
- #  else /* HAVE_AVAHI */
--VAR AvahiThreadedPoll *DNSSDMaster    VALUE(NULL);
-+VAR AvahiCupsPoll     *DNSSDMaster    VALUE(NULL);
-                                       /* Master polling interface for Avahi */
- VAR AvahiClient               *DNSSDClient    VALUE(NULL);
-                                       /* Client information */
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/main.c cups-2.3.3/scheduler/main.c
---- cups-2.3.3.org/scheduler/main.c    2021-04-20 22:45:53.709821838 +0200
-+++ cups-2.3.3/scheduler/main.c        2021-04-20 22:45:53.873155054 +0200
-@@ -132,7 +132,10 @@ main(int  argc,                           /* I - Number of comm
-   int                 service_idle_exit = 0;
-                                       /* Idle exit on select timeout? */
- #endif /* HAVE_ONDEMAND */
--
-+#ifdef HAVE_AVAHI
-+  cupsd_timeout_t     *tmo;           /* Next scheduled timed callback */
-+  long                        tmo_delay;      /* Time before it must be called */
-+#endif /* HAVE_AVAHI */
- #ifdef HAVE_GETEUID
-  /*
-@@ -600,6 +603,14 @@ main(int  argc,                           /* I - Number of comm
-   httpInitialize();
-+#ifdef HAVE_AVAHI
-+ /*
-+  * Initialize timed callback structures.
-+  */
-+
-+  cupsdInitTimeouts();
-+#endif /* HAVE_AVAHI */
-+
-   cupsdStartServer();
-  /*
-@@ -934,6 +945,16 @@ main(int  argc,                           /* I - Number of comm
-     }
- #endif /* __APPLE__ */
-+#ifdef HAVE_AVAHI
-+   /*
-+    * If a timed callback is due, run it.
-+    */
-+
-+    tmo = cupsdNextTimeout (&tmo_delay);
-+    if (tmo && tmo_delay == 0)
-+      cupsdRunTimeout (tmo);
-+#endif /* HAVE_AVAHI */
-+
- #ifndef __APPLE__
-    /*
-     * Update the network interfaces once a minute...
-@@ -1643,6 +1664,10 @@ select_timeout(int fds)                 /* I - Number
-   cupsd_client_t      *con;           /* Client information */
-   cupsd_job_t         *job;           /* Job information */
-   const char          *why;           /* Debugging aid */
-+#ifdef HAVE_AVAHI
-+  cupsd_timeout_t     *tmo;           /* Timed callback */
-+  long                        tmo_delay;      /* Seconds before calling it */
-+#endif /* HAVE_AVAHI */
-   cupsdLogMessage(CUPSD_LOG_DEBUG2, "select_timeout: JobHistoryUpdate=%ld",
-@@ -1688,6 +1713,19 @@ select_timeout(int fds)                 /* I - Number
-   }
- #endif /* __APPLE__ */
-+#ifdef HAVE_AVAHI
-+ /*
-+  * See if there are any scheduled timed callbacks to run.
-+  */
-+
-+  if ((tmo = cupsdNextTimeout(&tmo_delay)) != NULL &&
-+      (now + tmo_delay) < timeout)
-+  {
-+    timeout = tmo_delay;
-+    why = "run a timed callback";
-+  }
-+#endif /* HAVE_AVAHI */
-+
-  /*
-   * Check whether we are accepting new connections...
-   */
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/timeout.c cups-2.3.3/scheduler/timeout.c
---- cups-2.3.3.org/scheduler/timeout.c 1970-01-01 01:00:00.000000000 +0100
-+++ cups-2.3.3/scheduler/timeout.c     2021-04-20 22:45:53.873155054 +0200
-@@ -0,0 +1,235 @@
-+/*
-+ * "$Id$"
-+ *
-+ *   Timeout functions for the Common UNIX Printing System (CUPS).
-+ *
-+ *   Copyright (C) 2010, 2011 Red Hat, Inc.
-+ *   Authors:
-+ *     Tim Waugh <twaugh@redhat.com>
-+ *
-+ *   Redistribution and use in source and binary forms, with or without
-+ *   modification, are permitted provided that the following conditions
-+ *   are met:
-+ *
-+ *   Redistributions of source code must retain the above copyright
-+ *   notice, this list of conditions and the following disclaimer.
-+ *
-+ *   Redistributions in binary form must reproduce the above copyright
-+ *   notice, this list of conditions and the following disclaimer in the
-+ *   documentation and/or other materials provided with the distribution.
-+ *
-+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-+ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-+ *   COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-+ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-+ *   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-+ *   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-+ *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ *   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ *   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-+ *   OF THE POSSIBILITY OF SUCH DAMAGE.
-+ *
-+ * Contents:
-+ *
-+ *   cupsdInitTimeouts()  - Initialise timeout structure.
-+ *   cupsdAddTimeout()    - Add a timed callback.
-+ *   cupsdNextTimeout()   - Find the next enabled timed callback.
-+ *   cupsdUpdateTimeout() - Adjust the time of a timed callback or disable it.
-+ *   cupsdRemoveTimeout() - Discard a timed callback.
-+ *   compare_timeouts()   - Compare timed callbacks for array sorting.
-+ */
-+
-+#include <config.h>
-+
-+#ifdef HAVE_AVAHI /* Applies to entire file... */
-+
-+/*
-+ * Include necessary headers...
-+ */
-+
-+#include "cupsd.h"
-+
-+#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
-+#  include <malloc.h>
-+#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */
-+
-+#ifdef HAVE_AVAHI
-+#  include <avahi-common/timeval.h>
-+#endif /* HAVE_AVAHI */
-+
-+
-+struct _cupsd_timeout_s
-+{
-+  struct timeval when;
-+  int enabled;
-+  cupsd_timeoutfunc_t callback;
-+  void *data;
-+};
-+
-+/*
-+ * Local functions...
-+ */
-+
-+/*
-+ * 'compare_timeouts()' - Compare timed callbacks for array sorting.
-+ */
-+
-+static int
-+compare_addrs (void *p0, void *p1)
-+{
-+  if (p0 == p1)
-+    return (0);
-+  if (p0 < p1)
-+    return (-1);
-+  return (1);
-+}
-+
-+static int
-+compare_timeouts (cupsd_timeout_t *p0, cupsd_timeout_t *p1)
-+{
-+  int addrsdiff = compare_addrs (p0, p1);
-+  int tvdiff;
-+
-+  if (addrsdiff == 0)
-+    return (0);
-+
-+  if (!p0->enabled || !p1->enabled)
-+  {
-+    if (!p0->enabled && !p1->enabled)
-+      return (addrsdiff);
-+
-+    return (p0->enabled ? -1 : 1);
-+  }
-+
-+  tvdiff = avahi_timeval_compare (&p0->when, &p1->when);
-+  if (tvdiff != 0)
-+    return (tvdiff);
-+
-+  return (addrsdiff);
-+}
-+
-+
-+/*
-+ * 'cupsdInitTimeouts()' - Initialise timeout structures.
-+ */
-+
-+void
-+cupsdInitTimeouts(void)
-+{
-+  Timeouts = cupsArrayNew ((cups_array_func_t)compare_timeouts, NULL);
-+}
-+
-+
-+/*
-+ * 'cupsdAddTimeout()' - Add a timed callback.
-+ */
-+
-+cupsd_timeout_t *                             /* O - Timeout handle */
-+cupsdAddTimeout(const struct timeval *tv,     /* I - Absolute time */
-+              cupsd_timeoutfunc_t cb,         /* I - Callback function */
-+              void *data)                     /* I - User data */
-+{
-+  cupsd_timeout_t *timeout;
-+
-+  timeout = malloc (sizeof(cupsd_timeout_t));
-+  if (timeout != NULL)
-+  {
-+    timeout->enabled = (tv != NULL);
-+    if (tv)
-+    {
-+      timeout->when.tv_sec = tv->tv_sec;
-+      timeout->when.tv_usec = tv->tv_usec;
-+    }
-+
-+    timeout->callback = cb;
-+    timeout->data = data;
-+    cupsArrayAdd (Timeouts, timeout);
-+  }
-+
-+  return timeout;
-+}
-+
-+
-+/*
-+ * 'cupsdNextTimeout()' - Find the next enabled timed callback.
-+ */
-+
-+cupsd_timeout_t *             /* O - Next enabled timeout or NULL */
-+cupsdNextTimeout(long *delay) /* O - Seconds before scheduled */
-+{
-+  cupsd_timeout_t *first = cupsArrayFirst (Timeouts);
-+  struct timeval curtime;
-+
-+  if (first && !first->enabled)
-+    first = NULL;
-+
-+  if (first && delay)
-+  {
-+    gettimeofday (&curtime, NULL);
-+    if (avahi_timeval_compare (&curtime, &first->when) > 0)
-+    {
-+      *delay = 0;
-+    } else {
-+      *delay = 1 + first->when.tv_sec - curtime.tv_sec;
-+      if (first->when.tv_usec < curtime.tv_usec)
-+      (*delay)--;
-+    }
-+  }
-+
-+  return (first);
-+}
-+
-+
-+/*
-+ * 'cupsdRunTimeout()' - Run a timed callback.
-+ */
-+
-+void
-+cupsdRunTimeout(cupsd_timeout_t *timeout)     /* I - Timeout */
-+{
-+  if (!timeout)
-+    return;
-+  timeout->enabled = 0;
-+  if (!timeout->callback)
-+    return;
-+  timeout->callback (timeout, timeout->data);
-+}
-+
-+/*
-+ * 'cupsdUpdateTimeout()' - Adjust the time of a timed callback or disable it.
-+ */
-+
-+void
-+cupsdUpdateTimeout(cupsd_timeout_t *timeout,  /* I - Timeout */
-+                 const struct timeval *tv)    /* I - Absolute time or NULL */
-+{
-+  cupsArrayRemove (Timeouts, timeout);
-+  timeout->enabled = (tv != NULL);
-+  if (tv)
-+  {
-+    timeout->when.tv_sec = tv->tv_sec;
-+    timeout->when.tv_usec = tv->tv_usec;
-+  }
-+  cupsArrayAdd (Timeouts, timeout);
-+}
-+
-+
-+/*
-+ * 'cupsdRemoveTimeout()' - Discard a timed callback.
-+ */
-+
-+void
-+cupsdRemoveTimeout(cupsd_timeout_t *timeout)  /* I - Timeout */
-+{
-+  cupsArrayRemove (Timeouts, timeout);
-+  free (timeout);
-+}
-+
-+
-+#endif /* HAVE_AVAHI ... from top of file */
-+
-+/*
-+ * End of "$Id$".
-+ */
index d00d5869c11d5cca01512586b21248306818075d..0dad6f79fa301c6ef125f3c065016dbf836f9522 100644 (file)
@@ -2,9 +2,9 @@ diff -urNp -x '*.orig' cups-2.3.3.org/config-scripts/cups-directories.m4 cups-2.
 --- cups-2.3.3.org/config-scripts/cups-directories.m4  2020-04-27 20:04:29.000000000 +0200
 +++ cups-2.3.3/config-scripts/cups-directories.m4      2021-04-20 22:45:49.526491490 +0200
 @@ -295,5 +295,12 @@ AC_ARG_WITH(rundir, [  --with-rundir
-                       CUPS_STATEDIR="$localstatedir/run/cups"
-                       ;;
      esac])
+       CUPS_STATEDIR="$localstatedir/run/cups"
+     ])
+ ])
 +AC_ARG_WITH(logdir, [  --with-statedir           set path for certs state],statedir="$withval",statedir="")
 +
 +if test x$logdir = x; then
@@ -12,17 +12,17 @@ diff -urNp -x '*.orig' cups-2.3.3.org/config-scripts/cups-directories.m4 cups-2.
 +else
 +              CUPS_STATEDIR="$statedir"
 +fi
- AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
- AC_SUBST(CUPS_STATEDIR)
+ AC_DEFINE_UNQUOTED([CUPS_STATEDIR], ["$CUPS_STATEDIR"], [Location of transient state files.])
+ AC_SUBST([CUPS_STATEDIR])
 diff -urNp -x '*.orig' cups-2.3.3.org/config-scripts/cups-network.m4 cups-2.3.3/config-scripts/cups-network.m4
 --- cups-2.3.3.org/config-scripts/cups-network.m4      2020-04-27 20:04:29.000000000 +0200
 +++ cups-2.3.3/config-scripts/cups-network.m4  2021-04-20 22:45:49.526491490 +0200
 @@ -48,7 +48,7 @@ if test x$enable_domainsocket != xno -a
-                               ;;
-                       *)
-                               # All others use FHS standard...
--                              CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
-+                              CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cups/cups.sock"
-                               ;;
-               esac
-       else
+           CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
+       ], [*], [
+           # All others use FHS standard...
+-          CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock"
++          CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cups/cups.sock"
+       ])
+     ], [
+       CUPS_DEFAULT_DOMAINSOCKET="$default_domainsocket"
diff --git a/cups-logrotate.patch b/cups-logrotate.patch
deleted file mode 100644 (file)
index 6b8eb8c..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -up cups-2.1b1/scheduler/log.c.logrotate cups-2.1b1/scheduler/log.c
---- cups-2.1b1/scheduler/log.c.logrotate       2015-06-04 20:00:31.000000000 +0200
-+++ cups-2.1b1/scheduler/log.c 2015-06-29 13:25:09.623350218 +0200
-@@ -26,6 +26,9 @@
- #  include <systemd/sd-journal.h>
- #endif /* HAVE_ASL_H */
- #include <syslog.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
- /*
-@@ -135,12 +138,10 @@ cupsdCheckLogFile(cups_file_t **lf,      /* I
-   }
-  /*
--  * Format the filename as needed...
-+  * Format the filename...
-   */
--  if (!*lf ||
--      (strncmp(logname, "/dev/", 5) && cupsFileTell(*lf) > MaxLogSize &&
--       MaxLogSize > 0))
-+  if (strncmp(logname, "/dev/", 5))
-   {
-    /*
-     * Handle format strings...
-@@ -254,6 +255,34 @@ cupsdCheckLogFile(cups_file_t **lf,       /* I
-      /*
-       * Change ownership and permissions of non-device logs...
-       */
-+
-+      fchown(cupsFileNumber(*lf), RunUser, Group);
-+      fchmod(cupsFileNumber(*lf), LogFilePerm);
-+    }
-+  }
-+
-+ /*
-+  * Has someone else (i.e. logrotate) already rotated the log for us?
-+  */
-+  else if (strncmp(filename, "/dev/", 5))
-+  {
-+    struct stat st;
-+    if (stat(filename, &st) || st.st_size == 0)
-+    {
-+      /* File is either missing or has zero size. */
-+
-+      cupsFileClose(*lf);
-+      if ((*lf = cupsFileOpen(filename, "a")) == NULL)
-+      {
-+      syslog(LOG_ERR, "Unable to open log file \"%s\" - %s", filename,
-+             strerror(errno));
-+
-+      return (0);
-+      }
-+
-+     /*
-+      * Change ownership and permissions of non-device logs...
-+      */
-       fchown(cupsFileNumber(*lf), RunUser, Group);
-       fchmod(cupsFileNumber(*lf), LogFilePerm);
index 7c094d210e453316157b3ce8c2d0ddf9709c856f..cfa9f967703d348e480feba6d32ef39e5710eed3 100644 (file)
@@ -1,21 +1,23 @@
-diff -up cups-2.3.0/config.h.in.lspp cups-2.3.0/config.h.in
---- cups-2.3.0/config.h.in.lspp        2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/config.h.in     2019-10-07 12:24:43.058597468 +0200
-@@ -684,4 +684,11 @@ static __inline int _cups_abs(int i) { r
- #  endif /* __GNUC__ || __STDC_VERSION__ */
- #endif /* !HAVE_ABS && !abs */
+diff -up cups-2.4.8/config.h.in.lspp cups-2.4.8/config.h.in
+--- cups-2.4.8/config.h.in.lspp        2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/config.h.in     2024-05-14 13:15:22.457678901 +0200
+@@ -685,6 +685,13 @@ static __inline int _cups_abs(int i) { r
  
-+/*
+ /*
 + * Are we trying to meet LSPP requirements?
 + */
 +
 +#undef WITH_LSPP
 +
 +
- #endif /* !_CUPS_CONFIG_H_ */
-diff -up cups-2.3.0/config-scripts/cups-lspp.m4.lspp cups-2.3.0/config-scripts/cups-lspp.m4
---- cups-2.3.0/config-scripts/cups-lspp.m4.lspp        2019-10-07 12:24:43.058597468 +0200
-+++ cups-2.3.0/config-scripts/cups-lspp.m4     2019-10-07 12:24:43.058597468 +0200
++/*
+  * Building as a snap (snapcraft.io)?
+  */
+diff -up cups-2.4.8/config-scripts/cups-lspp.m4.lspp cups-2.4.8/config-scripts/cups-lspp.m4
+--- cups-2.4.8/config-scripts/cups-lspp.m4.lspp        2024-05-14 13:15:22.457678901 +0200
++++ cups-2.4.8/config-scripts/cups-lspp.m4     2024-05-14 13:15:22.457678901 +0200
 @@ -0,0 +1,36 @@
 +dnl
 +dnl   LSPP code for the Common UNIX Printing System (CUPS).
@@ -53,22 +55,22 @@ diff -up cups-2.3.0/config-scripts/cups-lspp.m4.lspp cups-2.3.0/config-scripts/c
 +            ;;
 +    esac
 +fi
-diff -up cups-2.3.0/configure.ac.lspp cups-2.3.0/configure.ac
---- cups-2.3.0/configure.ac.lspp       2019-10-07 12:24:43.058597468 +0200
-+++ cups-2.3.0/configure.ac    2019-10-07 12:39:20.122546282 +0200
-@@ -34,6 +34,8 @@ sinclude(config-scripts/cups-dnssd.m4)
+diff -up cups-2.4.8/configure.ac.lspp cups-2.4.8/configure.ac
+--- cups-2.4.8/configure.ac.lspp       2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/configure.ac    2024-05-14 13:15:22.457678901 +0200
+@@ -40,6 +40,8 @@ sinclude(config-scripts/cups-container.m
  sinclude(config-scripts/cups-startup.m4)
  sinclude(config-scripts/cups-defaults.m4)
  
 +sinclude(config-scripts/cups-lspp.m4)
 +
+ dnl See what languages are available and make sure we generate the localization
+ dnl files as needed...
  INSTALL_LANGUAGES=""
- UNINSTALL_LANGUAGES=""
- LANGFILES=""
-diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
---- cups-2.3.0/filter/common.c.lspp    2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/filter/common.c 2019-10-07 12:24:43.059597461 +0200
-@@ -11,6 +11,12 @@
+diff -up cups-2.4.8/filter/common.c.lspp cups-2.4.8/filter/common.c
+--- cups-2.4.8/filter/common.c.lspp    2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/filter/common.c 2024-05-14 13:15:22.457678901 +0200
+@@ -12,6 +12,12 @@
   * Include necessary headers...
   */
  
@@ -81,7 +83,7 @@ diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
  #include "common.h"
  #include <locale.h>
  
-@@ -293,6 +299,18 @@ WriteLabelProlog(const char *label,       /* I
+@@ -294,6 +300,18 @@ WriteLabelProlog(const char *label,       /* I
  {
    const char  *classification;        /* CLASSIFICATION environment variable */
    const char  *ptr;                   /* Temporary string pointer */
@@ -100,7 +102,7 @@ diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
  
  
   /*
-@@ -315,6 +333,124 @@ WriteLabelProlog(const char *label,      /* I
+@@ -316,6 +334,124 @@ WriteLabelProlog(const char *label,      /* I
      return;
    }
  
@@ -225,7 +227,7 @@ diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
   /*
    * Set the classification + page label string...
    */
-@@ -395,7 +531,10 @@ WriteLabelProlog(const char *label,       /* I
+@@ -396,7 +532,10 @@ WriteLabelProlog(const char *label,       /* I
    printf("  %.0f moveto ESPpl show\n", top - 14.0);
    puts("pop");
    puts("}bind put");
@@ -236,10 +238,10 @@ diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
  
  
  /*
-diff -up cups-2.3.0/filter/pstops.c.lspp cups-2.3.0/filter/pstops.c
---- cups-2.3.0/filter/pstops.c.lspp    2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/filter/pstops.c 2019-10-07 12:24:43.059597461 +0200
-@@ -3170,6 +3170,18 @@ write_label_prolog(pstops_doc_t *doc,   /*
+diff -up cups-2.4.8/filter/pstops.c.lspp cups-2.4.8/filter/pstops.c
+--- cups-2.4.8/filter/pstops.c.lspp    2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/filter/pstops.c 2024-05-14 13:15:22.458678907 +0200
+@@ -3171,6 +3171,18 @@ write_label_prolog(pstops_doc_t *doc,   /*
  {
    const char  *classification;        /* CLASSIFICATION environment variable */
    const char  *ptr;                   /* Temporary string pointer */
@@ -258,7 +260,7 @@ diff -up cups-2.3.0/filter/pstops.c.lspp cups-2.3.0/filter/pstops.c
  
  
   /*
-@@ -3192,6 +3204,124 @@ write_label_prolog(pstops_doc_t *doc,  /*
+@@ -3193,6 +3205,124 @@ write_label_prolog(pstops_doc_t *doc,  /*
      return;
    }
  
@@ -383,7 +385,7 @@ diff -up cups-2.3.0/filter/pstops.c.lspp cups-2.3.0/filter/pstops.c
   /*
    * Set the classification + page label string...
    */
-@@ -3270,7 +3400,10 @@ write_label_prolog(pstops_doc_t *doc,   /*
+@@ -3271,7 +3401,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");
@@ -394,22 +396,10 @@ diff -up cups-2.3.0/filter/pstops.c.lspp cups-2.3.0/filter/pstops.c
  
  
  /*
-diff -up cups-2.3.0/Makedefs.in.lspp cups-2.3.0/Makedefs.in
---- cups-2.3.0/Makedefs.in.lspp        2019-10-07 12:24:43.059597461 +0200
-+++ cups-2.3.0/Makedefs.in     2019-10-07 12:37:19.200565805 +0200
-@@ -174,7 +174,7 @@ IPPFIND_MAN        =       @IPPFIND_MAN@
- LDFLAGS               =       @LDFLAGS@
- LINKCUPS      =       @LINKCUPS@
- LINKCUPSSTATIC        =       ../cups/$(LIBCUPSSTATIC) $(LIBS)
--LIBS          =       $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ) $(COMMONLIBS)
-+LIBS          =       $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@
- ONDEMANDFLAGS =       @ONDEMANDFLAGS@
- ONDEMANDLIBS  =       @ONDEMANDLIBS@
- OPTIM         =       @OPTIM@
-diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
---- cups-2.3.0/scheduler/client.c.lspp 2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/scheduler/client.c      2019-10-07 12:33:10.459693580 +0200
-@@ -19,12 +19,20 @@
+diff -up cups-2.4.8/scheduler/client.c.lspp cups-2.4.8/scheduler/client.c
+--- cups-2.4.8/scheduler/client.c.lspp 2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/client.c      2024-05-14 13:15:22.458678907 +0200
+@@ -20,12 +20,20 @@
  #define _HTTP_NO_PRIVATE
  #include "cupsd.h"
  
@@ -430,7 +420,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
  
  
  /*
-@@ -265,6 +273,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)
+@@ -264,6 +272,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)
    }
  #endif /* HAVE_TCPD_H */
  
@@ -490,7 +480,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
  #ifdef AF_LOCAL
    if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL)
    {
-@@ -558,6 +619,13 @@ cupsdReadClient(cupsd_client_t *con)      /*
+@@ -565,6 +626,13 @@ cupsdReadClient(cupsd_client_t *con)      /*
    struct stat         filestats;      /* File information */
    mime_type_t         *type;          /* MIME type of file */
    static unsigned     request_id = 0; /* Request ID for temp files */
@@ -504,7 +494,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
  
  
    status = HTTP_STATUS_CONTINUE;
-@@ -1679,6 +1747,73 @@ cupsdReadClient(cupsd_client_t *con)    /*
+@@ -1712,6 +1780,73 @@ cupsdReadClient(cupsd_client_t *con)    /*
              fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
          }
  
@@ -578,7 +568,7 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
          if (httpGetState(con->http) != HTTP_STATE_POST_SEND)
          {
            if (!httpWait(con->http, 0))
-@@ -3174,6 +3309,49 @@ is_path_absolute(const char *path)      /* I
+@@ -3208,6 +3343,49 @@ is_path_absolute(const char *path)      /* I
    return (1);
  }
  
@@ -628,10 +618,10 @@ diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
  
  /*
   * 'pipe_command()' - Pipe the output of a command to the remote client.
-diff -up cups-2.3.0/scheduler/client.h.lspp cups-2.3.0/scheduler/client.h
---- cups-2.3.0/scheduler/client.h.lspp 2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/scheduler/client.h      2019-10-07 12:24:43.113597079 +0200
-@@ -13,6 +13,13 @@
+diff -up cups-2.4.8/scheduler/client.h.lspp cups-2.4.8/scheduler/client.h
+--- cups-2.4.8/scheduler/client.h.lspp 2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/client.h      2024-05-14 13:15:22.458678907 +0200
+@@ -14,6 +14,13 @@
  #endif /* HAVE_AUTHORIZATION_H */
  
  
@@ -645,7 +635,7 @@ diff -up cups-2.3.0/scheduler/client.h.lspp cups-2.3.0/scheduler/client.h
  /*
   * HTTP client structure...
   */
-@@ -63,6 +70,10 @@ struct cupsd_client_s
+@@ -66,6 +73,10 @@ struct cupsd_client_s
  #ifdef HAVE_AUTHORIZATION_H
    AuthorizationRef    authref;        /* Authorization ref */
  #endif /* HAVE_AUTHORIZATION_H */
@@ -656,20 +646,21 @@ diff -up cups-2.3.0/scheduler/client.h.lspp cups-2.3.0/scheduler/client.h
  };
  
  #define HTTP(con) ((con)->http)
-@@ -136,6 +147,9 @@ extern void        cupsdStartListening(void);
- extern void   cupsdStopListening(void);
+@@ -138,6 +149,10 @@ extern void       cupsdStopListening(void);
  extern void   cupsdUpdateCGI(void);
  extern void   cupsdWriteClient(cupsd_client_t *con);
 +#ifdef WITH_LSPP
 +extern uid_t  client_pid_to_auid(pid_t clipid);
 +#endif /* WITH_LSPP */
- #ifdef HAVE_SSL
++
+ #ifdef HAVE_TLS
  extern int    cupsdEndTLS(cupsd_client_t *con);
-diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
---- cups-2.3.0/scheduler/conf.c.lspp   2019-10-07 12:24:43.049597531 +0200
-+++ cups-2.3.0/scheduler/conf.c        2019-10-07 12:24:43.113597079 +0200
-@@ -37,6 +37,9 @@
+ extern int    cupsdStartTLS(cupsd_client_t *con);
+diff -up cups-2.4.8/scheduler/conf.c.lspp cups-2.4.8/scheduler/conf.c
+--- cups-2.4.8/scheduler/conf.c.lspp   2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/conf.c        2024-05-14 13:15:22.459678912 +0200
+@@ -38,6 +38,9 @@
  #  define INADDR_NONE 0xffffffff
  #endif /* !INADDR_NONE */
  
@@ -679,7 +670,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
  
  /*
   * Configuration variable structure...
-@@ -131,6 +134,10 @@ static const cupsd_var_t  cupsd_vars[] =
+@@ -129,6 +132,10 @@ static const cupsd_var_t  cupsd_vars[] =
    { "ServerName",             &ServerName,            CUPSD_VARTYPE_STRING },
    { "StrictConformance",      &StrictConformance,     CUPSD_VARTYPE_BOOLEAN },
    { "Timeout",                        &Timeout,               CUPSD_VARTYPE_TIME },
@@ -690,7 +681,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
    { "WebInterface",           &WebInterface,          CUPSD_VARTYPE_BOOLEAN }
  };
  static const cupsd_var_t      cupsfiles_vars[] =
-@@ -544,6 +551,9 @@ cupsdReadConfiguration(void)
+@@ -539,6 +546,9 @@ cupsdReadConfiguration(void)
    const char  *tmpdir;                /* TMPDIR environment variable */
    struct stat tmpinfo;                /* Temporary directory info */
    cupsd_policy_t *p;                  /* Policy */
@@ -700,7 +691,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
  
  
   /*
-@@ -864,6 +874,25 @@ cupsdReadConfiguration(void)
+@@ -854,6 +864,25 @@ cupsdReadConfiguration(void)
  
    RunUser = getuid();
  
@@ -726,7 +717,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
    cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
                    RemotePort ? "enabled" : "disabled");
  
-@@ -1275,7 +1304,19 @@ cupsdReadConfiguration(void)
+@@ -1282,7 +1311,19 @@ cupsdReadConfiguration(void)
      cupsdClearString(&Classification);
  
    if (Classification)
@@ -746,7 +737,7 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
  
   /*
    * Check the MaxClients setting, and then allocate memory for it...
-@@ -3830,6 +3871,18 @@ read_location(cups_file_t *fp,          /* I - C
+@@ -3881,6 +3922,18 @@ read_location(cups_file_t *fp,          /* I - C
    return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
  }
  
@@ -765,12 +756,12 @@ diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
  
  /*
   * 'read_policy()' - Read a <Policy name> definition.
-diff -up cups-2.3.0/scheduler/conf.h.lspp cups-2.3.0/scheduler/conf.h
---- cups-2.3.0/scheduler/conf.h.lspp   2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/scheduler/conf.h        2019-10-07 12:24:43.113597079 +0200
-@@ -243,6 +243,13 @@ VAR char          *ServerKeychain         VALUE(NULL);
+diff -up cups-2.4.8/scheduler/conf.h.lspp cups-2.4.8/scheduler/conf.h
+--- cups-2.4.8/scheduler/conf.h.lspp   2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/conf.h        2024-05-14 13:15:22.459678912 +0200
+@@ -242,6 +242,13 @@ VAR char          *ServerKeychain         VALUE(NULL);
                                        /* Keychain holding cert + key */
- #endif /* HAVE_SSL */
+ #endif /* HAVE_TLS */
  
 +#ifdef WITH_LSPP
 +VAR int                       AuditLog                VALUE(-1),
@@ -782,7 +773,7 @@ diff -up cups-2.3.0/scheduler/conf.h.lspp cups-2.3.0/scheduler/conf.h
  #ifdef HAVE_ONDEMAND
  VAR int                       IdleExitTimeout         VALUE(60);
                                        /* Time after which an idle cupsd will exit */
-@@ -261,6 +268,9 @@ VAR int                    HaveServerCreds         VALUE(0);
+@@ -260,6 +267,9 @@ VAR int                    HaveServerCreds         VALUE(0);
  VAR gss_cred_id_t     ServerCreds;    /* Server's GSS credentials */
  #endif /* HAVE_GSSAPI */
  
@@ -792,10 +783,10 @@ diff -up cups-2.3.0/scheduler/conf.h.lspp cups-2.3.0/scheduler/conf.h
  
  /*
   * Prototypes...
-diff -up cups-2.3.0/scheduler/cupsd.h.lspp cups-2.3.0/scheduler/cupsd.h
---- cups-2.3.0/scheduler/cupsd.h.lspp  2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/scheduler/cupsd.h       2019-10-07 12:31:38.458480578 +0200
-@@ -8,6 +8,8 @@
+diff -up cups-2.4.8/scheduler/cupsd.h.lspp cups-2.4.8/scheduler/cupsd.h
+--- cups-2.4.8/scheduler/cupsd.h.lspp  2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/cupsd.h       2024-05-14 13:15:22.459678912 +0200
+@@ -9,6 +9,8 @@
   * information.
   */
  
@@ -804,7 +795,7 @@ diff -up cups-2.3.0/scheduler/cupsd.h.lspp cups-2.3.0/scheduler/cupsd.h
  
  /*
   * Include necessary headers.
-@@ -33,6 +35,14 @@
+@@ -34,6 +36,14 @@
  #  include <unistd.h>
  #endif /* _WIN32 */
  
@@ -819,10 +810,10 @@ diff -up cups-2.3.0/scheduler/cupsd.h.lspp cups-2.3.0/scheduler/cupsd.h
  #include "mime.h"
  
  #if defined(HAVE_CDSASSL)
-diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
---- cups-2.3.0/scheduler/ipp.c.lspp    2019-10-07 12:24:43.016597764 +0200
-+++ cups-2.3.0/scheduler/ipp.c 2019-10-07 12:31:01.243798920 +0200
-@@ -11,6 +11,9 @@
+diff -up cups-2.4.8/scheduler/ipp.c.lspp cups-2.4.8/scheduler/ipp.c
+--- cups-2.4.8/scheduler/ipp.c.lspp    2024-05-14 13:15:22.447678849 +0200
++++ cups-2.4.8/scheduler/ipp.c 2024-05-14 13:15:22.460678917 +0200
+@@ -12,6 +12,9 @@
   * information.
   */
  
@@ -832,7 +823,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  /*
   * Include necessary headers...
   */
-@@ -27,6 +30,14 @@ extern int mbr_group_name_to_uuid(const
+@@ -28,6 +31,14 @@ extern int mbr_group_name_to_uuid(const
  extern int mbr_check_membership_by_id(uuid_t user, gid_t group, int* ismember);
  #endif /* __APPLE__ */
  
@@ -847,7 +838,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  
  /*
   * Local functions...
-@@ -51,6 +62,9 @@ static void  cancel_all_jobs(cupsd_client
+@@ -52,6 +63,9 @@ static void  cancel_all_jobs(cupsd_client
  static void   cancel_job(cupsd_client_t *con, ipp_attribute_t *uri);
  static void   cancel_subscription(cupsd_client_t *con, int id);
  static int    check_rss_recipient(const char *recipient);
@@ -857,7 +848,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/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,
-@@ -1240,6 +1254,21 @@ add_job(cupsd_client_t  *con,           /* I - Cl
+@@ -1188,6 +1202,21 @@ add_job(cupsd_client_t  *con,           /* I - Cl
      "time-at-creation",
      "time-at-processing"
    };
@@ -879,7 +870,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  
  
    cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
-@@ -1568,6 +1597,106 @@ add_job(cupsd_client_t  *con,          /* I - Cl
+@@ -1516,6 +1545,106 @@ add_job(cupsd_client_t  *con,          /* I - Cl
  
    attr = ippFindAttribute(con->request, "requesting-user-name", IPP_TAG_NAME);
  
@@ -986,7 +977,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
    if ((job = cupsdAddJob(priority, printer->name)) == NULL)
    {
      send_ipp_status(con, IPP_INTERNAL_ERROR,
-@@ -1576,6 +1705,32 @@ add_job(cupsd_client_t  *con,           /* I - Cl
+@@ -1524,6 +1653,32 @@ add_job(cupsd_client_t  *con,           /* I - Cl
      return (NULL);
    }
  
@@ -1019,7 +1010,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
    job->dtype   = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
    job->attrs   = con->request;
    job->dirty   = 1;
-@@ -1763,6 +1918,29 @@ add_job(cupsd_client_t  *con,           /* I - Cl
+@@ -1711,6 +1866,29 @@ add_job(cupsd_client_t  *con,           /* I - Cl
        ippSetString(job->attrs, &attr, 0, printer->job_sheets[0]);
        ippSetString(job->attrs, &attr, 1, printer->job_sheets[1]);
      }
@@ -1049,7 +1040,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  
      job->job_sheets = attr;
  
-@@ -1793,6 +1971,9 @@ add_job(cupsd_client_t  *con,            /* I - Cl
+@@ -1741,6 +1919,9 @@ add_job(cupsd_client_t  *con,            /* I - Cl
                                             "job-sheets=\"%s,none\", "
                                             "job-originating-user-name=\"%s\"",
                      Classification, job->username);
@@ -1059,7 +1050,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
        }
        else if (attr->num_values == 2 &&
                 strcmp(attr->values[0].string.text,
-@@ -1811,6 +1992,9 @@ add_job(cupsd_client_t  *con,            /* I - Cl
+@@ -1759,6 +1940,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);
@@ -1069,7 +1060,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
        }
        else if (strcmp(attr->values[0].string.text, Classification) &&
                 strcmp(attr->values[0].string.text, "none") &&
-@@ -1831,6 +2015,9 @@ add_job(cupsd_client_t  *con,            /* I - Cl
+@@ -1779,6 +1963,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);
@@ -1079,7 +1070,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
          }
        }
        else if (strcmp(attr->values[0].string.text, Classification) &&
-@@ -1871,8 +2058,52 @@ add_job(cupsd_client_t  *con,           /* I - Cl
+@@ -1819,8 +2006,52 @@ add_job(cupsd_client_t  *con,           /* I - Cl
                      "job-sheets=\"%s\", "
                      "job-originating-user-name=\"%s\"",
                      Classification, job->username);
@@ -1132,7 +1123,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  
     /*
      * See if we need to add the starting sheet...
-@@ -3648,6 +3879,128 @@ check_rss_recipient(
+@@ -3647,6 +3878,128 @@ check_rss_recipient(
  }
  
  
@@ -1261,7 +1252,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  /*
   * 'check_quotas()' - Check quotas for a printer and user.
   */
-@@ -4103,6 +4456,15 @@ copy_banner(cupsd_client_t *con,        /* I -
+@@ -4102,6 +4455,15 @@ copy_banner(cupsd_client_t *con,        /* I -
    char                attrname[255],          /* Name of attribute */
                *s;                     /* Pointer into name */
    ipp_attribute_t *attr;              /* Attribute */
@@ -1277,7 +1268,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  
  
    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -4138,6 +4500,85 @@ copy_banner(cupsd_client_t *con,        /* I -
+@@ -4137,6 +4499,85 @@ copy_banner(cupsd_client_t *con,        /* I -
  
    fchmod(cupsFileNumber(out), 0640);
    fchown(cupsFileNumber(out), RunUser, Group);
@@ -1363,7 +1354,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
  
   /*
    * Try the localized banner file under the subdirectory...
-@@ -4232,6 +4673,24 @@ copy_banner(cupsd_client_t *con,        /* I -
+@@ -4231,6 +4672,24 @@ copy_banner(cupsd_client_t *con,        /* I -
        else
          s = attrname;
  
@@ -1388,7 +1379,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
        if (!strcmp(s, "printer-name"))
        {
          cupsFilePuts(out, job->dest);
-@@ -6439,6 +6898,22 @@ get_job_attrs(cupsd_client_t  *con,     /* I
+@@ -6681,6 +7140,22 @@ get_job_attrs(cupsd_client_t  *con,     /* I
  
    exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username);
  
@@ -1411,7 +1402,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
   /*
    * Copy attributes...
    */
-@@ -6836,6 +7311,11 @@ get_jobs(cupsd_client_t  *con,          /* I - C
+@@ -7079,6 +7554,11 @@ get_jobs(cupsd_client_t  *con,          /* I - C
        if (username[0] && _cups_strcasecmp(username, job->username))
        continue;
  
@@ -1423,7 +1414,7 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
        if (count > 0)
        ippAddSeparator(con->response);
  
-@@ -11445,6 +11925,11 @@ validate_user(cupsd_job_t    *job,    /* I
+@@ -11810,6 +12290,11 @@ validate_user(cupsd_job_t    *job,    /* I
  
    strlcpy(username, get_username(con), userlen);
  
@@ -1435,10 +1426,10 @@ diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
   /*
    * Check the username against the owner...
    */
-diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
---- cups-2.3.0/scheduler/job.c.lspp    2019-10-07 12:24:43.024597707 +0200
-+++ cups-2.3.0/scheduler/job.c 2019-10-07 12:30:13.092210820 +0200
-@@ -8,6 +8,9 @@
+diff -up cups-2.4.8/scheduler/job.c.lspp cups-2.4.8/scheduler/job.c
+--- cups-2.4.8/scheduler/job.c.lspp    2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/job.c 2024-05-14 13:16:41.100084985 +0200
+@@ -9,6 +9,9 @@
   * information.
   */
  
@@ -1448,7 +1439,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
  /*
   * Include necessary headers...
   */
-@@ -23,6 +26,14 @@
+@@ -24,6 +27,14 @@
  #  endif /* HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H */
  #endif /* __APPLE__ */
  
@@ -1464,9 +1455,9 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
  /*
   * Design Notes for Job Management
 @@ -544,6 +555,14 @@ cupsdContinueJob(cupsd_job_t *job)        /* I
+                                       /* PRINTER env variable */
+                       *printer_state_reasons = NULL;
                                        /* PRINTER_STATE_REASONS env var */
-                       rip_max_cache[255];
-                                       /* RIP_MAX_CACHE env variable */
 +#ifdef WITH_LSPP
 +  char                        *audit_message = NULL;  /* Audit message string */
 +  context_t           jobcon;         /* SELinux context of the job */
@@ -1478,7 +1469,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
  
  
    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -1080,6 +1099,67 @@ cupsdContinueJob(cupsd_job_t *job)      /* I
+@@ -1070,6 +1089,67 @@ cupsdContinueJob(cupsd_job_t *job)      /* I
    if (final_content_type[0])
      envp[envc ++] = final_content_type;
  
@@ -1546,8 +1537,8 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
    if (Classification && !banner_page)
    {
      if ((attr = ippFindAttribute(job->attrs, "job-sheets",
-@@ -1858,6 +1938,22 @@ cupsdLoadJob(cupsd_job_t *job)          /* I - J
-       ippSetString(job->attrs, &job->reasons, 0, "none");
+@@ -1856,6 +1936,22 @@ cupsdLoadJob(cupsd_job_t *job)          /* I - J
+     ippSetString(job->attrs, &job->reasons, 0, "job-completed-successfully");
    }
  
 +#ifdef WITH_LSPP
@@ -1569,7 +1560,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
    job->impressions = ippFindAttribute(job->attrs, "job-impressions-completed", IPP_TAG_INTEGER);
    job->sheets      = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER);
    job->job_sheets  = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
-@@ -2273,6 +2369,14 @@ cupsdSaveJob(cupsd_job_t *job)          /* I - J
+@@ -2268,6 +2364,14 @@ cupsdSaveJob(cupsd_job_t *job)          /* I - J
  {
    char                filename[1024];         /* Job control filename */
    cups_file_t *fp;                    /* Job file */
@@ -1584,7 +1575,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
  
  
    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
-@@ -2295,6 +2399,78 @@ cupsdSaveJob(cupsd_job_t *job)          /* I - J
+@@ -2290,6 +2394,78 @@ cupsdSaveJob(cupsd_job_t *job)          /* I - J
  
    fchown(cupsFileNumber(fp), RunUser, Group);
  
@@ -1663,7 +1654,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
    job->attrs->state = IPP_IDLE;
  
    if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
-@@ -3995,6 +4171,19 @@ get_options(cupsd_job_t *job,           /* I - Jo
+@@ -4020,6 +4196,19 @@ get_options(cupsd_job_t *job,           /* I - Jo
          banner_page)
          continue;
  
@@ -1683,7 +1674,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
       /*
        * Otherwise add them to the list...
        */
-@@ -4805,6 +4994,18 @@ start_job(cupsd_job_t     *job,         /* I -
+@@ -4834,6 +5023,18 @@ start_job(cupsd_job_t     *job,         /* I -
            cupsd_printer_t *printer)   /* I - Printer to print job */
  {
    const char  *filename;              /* Support filename */
@@ -1702,7 +1693,7 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
    ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
                                                   "job-cancel-after",
                                                   IPP_TAG_INTEGER);
-@@ -4993,6 +5194,113 @@ start_job(cupsd_job_t     *job,                /* I -
+@@ -5022,6 +5223,113 @@ start_job(cupsd_job_t     *job,                /* I -
    fcntl(job->side_pipes[1], F_SETFD,
        fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
  
@@ -1816,10 +1807,10 @@ diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
   /*
    * Now start the first file in the job...
    */
-diff -up cups-2.3.0/scheduler/job.h.lspp cups-2.3.0/scheduler/job.h
---- cups-2.3.0/scheduler/job.h.lspp    2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/scheduler/job.h 2019-10-07 12:29:54.364371023 +0200
-@@ -7,6 +7,13 @@
+diff -up cups-2.4.8/scheduler/job.h.lspp cups-2.4.8/scheduler/job.h
+--- cups-2.4.8/scheduler/job.h.lspp    2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/job.h 2024-05-14 13:15:22.461678922 +0200
+@@ -8,6 +8,13 @@
   * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
   */
  
@@ -1833,7 +1824,7 @@ diff -up cups-2.3.0/scheduler/job.h.lspp cups-2.3.0/scheduler/job.h
  /*
   * Constants...
   */
-@@ -84,6 +91,10 @@ struct cupsd_job_s                  /**** Job request *
+@@ -85,6 +92,10 @@ struct cupsd_job_s                  /**** Job request *
    int                 progress;       /* Printing progress */
    int                 num_keywords;   /* Number of PPD keywords */
    cups_option_t               *keywords;      /* PPD keywords */
@@ -1844,10 +1835,10 @@ diff -up cups-2.3.0/scheduler/job.h.lspp cups-2.3.0/scheduler/job.h
  };
  
  typedef struct cupsd_joblog_s         /**** Job log message ****/
-diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
---- cups-2.3.0/scheduler/main.c.lspp   2019-10-07 12:24:43.037597616 +0200
-+++ cups-2.3.0/scheduler/main.c        2019-10-07 12:24:43.119597037 +0200
-@@ -57,6 +57,9 @@
+diff -up cups-2.4.8/scheduler/main.c.lspp cups-2.4.8/scheduler/main.c
+--- cups-2.4.8/scheduler/main.c.lspp   2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/main.c        2024-05-14 13:15:22.461678922 +0200
+@@ -58,6 +58,9 @@
  #  include <sys/param.h>
  #endif /* HAVE_SYS_PARAM_H */
  
@@ -1857,7 +1848,7 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
  
  /*
   * Local functions...
-@@ -123,6 +126,9 @@ main(int  argc,                            /* I - Number of comm
+@@ -124,6 +127,9 @@ main(int  argc,                            /* I - Number of comm
  #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
    struct sigaction    action;         /* Actions for POSIX signals */
  #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@@ -1867,7 +1858,7 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
  #ifdef __APPLE__
    int                 use_sysman = 1; /* Use system management functions? */
  #else
-@@ -495,6 +501,25 @@ main(int  argc,                           /* I - Number of comm
+@@ -494,6 +500,25 @@ main(int  argc,                           /* I - Number of comm
      exit(errno);
    }
  
@@ -1893,7 +1884,7 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
   /*
    * Let the system know we are busy while we bring up cupsd...
    */
-@@ -1201,6 +1226,11 @@ main(int  argc,                         /* I - Number of comm
+@@ -1203,6 +1228,11 @@ main(int  argc,                         /* I - Number of comm
  
    cupsdStopSelect();
  
@@ -1905,10 +1896,10 @@ diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
    return (!stop_scheduler);
  }
  
-diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
---- cups-2.3.0/scheduler/printers.c.lspp       2019-08-23 17:19:38.000000000 +0200
-+++ cups-2.3.0/scheduler/printers.c    2019-10-07 12:29:17.956658129 +0200
-@@ -8,6 +8,8 @@
+diff -up cups-2.4.8/scheduler/printers.c.lspp cups-2.4.8/scheduler/printers.c
+--- cups-2.4.8/scheduler/printers.c.lspp       2024-04-26 13:38:21.000000000 +0200
++++ cups-2.4.8/scheduler/printers.c    2024-05-14 13:15:22.462678928 +0200
+@@ -9,6 +9,8 @@
   * information.
   */
  
@@ -1917,7 +1908,7 @@ diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
  /*
   * Include necessary headers...
   */
-@@ -32,6 +34,10 @@
+@@ -33,6 +35,10 @@
  #  include <asl.h>
  #endif /* __APPLE__ */
  
@@ -1928,7 +1919,7 @@ diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
  
  /*
   * Local functions...
-@@ -2252,6 +2258,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -2184,6 +2190,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
    ipp_attribute_t *attr;              /* Attribute data */
    char                *name,                  /* Current user/group name */
                *filter;                /* Current filter */
@@ -1942,7 +1933,7 @@ diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
  
  
   /*
-@@ -2378,6 +2391,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -2309,6 +2322,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
        attr->values[1].string.text = _cupsStrAlloc(Classification ?
                                           Classification : p->job_sheets[1]);
      }
index d038afa505ee3cbac8bcc92cf527d6e17edd046d..48dea0efefff48146b776c9503e29a445c7b0306 100644 (file)
@@ -1,15 +1,15 @@
 --- cups-1.5rc1/config-scripts/cups-gssapi.m4~ 2011-05-12 07:21:56.000000000 +0200
 +++ cups-1.5rc1/config-scripts/cups-gssapi.m4  2011-06-15 21:40:54.182690659 +0200
 @@ -46,9 +46,9 @@
-                               ;;
-                       *)
-                               # Other platforms just ask for GSSAPI
--                              CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"
--                              CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"
--                              LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
-+                              CFLAGS="`CFLAGS= LDFLAGS= $KRB5CONFIG --cflags gssapi` $CFLAGS"
-+                              CPPFLAGS="`CFLAGS= LDFLAGS= $KRB5CONFIG --cflags gssapi` $CPPFLAGS"
-+                              LIBGSSAPI="`CFLAGS= LDFLAGS= $KRB5CONFIG --libs gssapi`"
-                               ;;
-               esac
-               AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
+           AC_MSG_ERROR([--enable-gssapi specified but krb5-config cannot be found.])
+       ], [
+           AC_DEFINE([HAVE_GSSAPI], [1], [Is GSSAPI available?])
+-          CFLAGS="$($KRB5CONFIG --cflags gssapi) $CFLAGS"
+-          CPPFLAGS="$($KRB5CONFIG --cflags gssapi) $CPPFLAGS"
+-          LIBGSSAPI="$($KRB5CONFIG --libs gssapi)"
++          CFLAGS="$(CFLAGS= LDFLAGS= $KRB5CONFIG --cflags gssapi) $CFLAGS"
++          CPPFLAGS="$(CFLAGS= LDFLAGS= $KRB5CONFIG --cflags gssapi) $CPPFLAGS"
++          LIBGSSAPI="$(CFLAGS= LDFLAGS= $KRB5CONFIG --libs gssapi)"
+       ])
+     ])
index f62295fcb7df4241c5ccbc65c774e5871248fdef..d5028b7d3ef64a268795c340078a176cbd20580e 100644 (file)
@@ -1,12 +1,12 @@
 diff -urNp -x '*.orig' cups-2.3.3.org/config-scripts/cups-compiler.m4 cups-2.3.3/config-scripts/cups-compiler.m4
 --- cups-2.3.3.org/config-scripts/cups-compiler.m4     2020-04-27 20:04:29.000000000 +0200
 +++ cups-2.3.3/config-scripts/cups-compiler.m4 2021-04-20 22:45:49.129825106 +0200
-@@ -25,8 +25,6 @@ AC_ARG_ENABLE(unit_tests, [  --enable-un
+@@ -30,8 +30,6 @@
  dnl For debugging, keep symbols, otherwise strip them...
- if test x$enable_debug = xyes -a "x$OPTIM" = x; then
-       OPTIM="-g"
--else
--      INSTALL_STRIP="-s"
- fi
+ AS_IF([test x$enable_debug = xyes -a "x$OPTIM" = x], [
+     OPTIM="-g"
+-], [
+-    INSTALL_STRIP="-s"
+ ])
  
  dnl Debug printfs can slow things down, so provide a separate option for that
diff --git a/cups-systemd-socket.patch b/cups-systemd-socket.patch
deleted file mode 100644 (file)
index 06fb6e1..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/main.c cups-2.3.3/scheduler/main.c
---- cups-2.3.3.org/scheduler/main.c    2020-04-27 20:04:29.000000000 +0200
-+++ cups-2.3.3/scheduler/main.c        2021-04-20 22:45:51.479823429 +0200
-@@ -681,8 +681,16 @@ main(int  argc,                           /* I - Number of comm
- #ifdef HAVE_ONDEMAND
-   if (OnDemand)
-+  {
-     cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
--  else
-+# ifdef HAVE_SYSTEMD
-+    sd_notifyf(0, "READY=1\n"
-+               "STATUS=Scheduler is running...\n"
-+               "MAINPID=%lu",
-+               (unsigned long) getpid());
-+# endif /* HAVE_SYSTEMD */
-+  } else
-+
- #endif /* HAVE_ONDEMAND */
-   if (fg)
-     cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
-diff -urNp -x '*.orig' cups-2.3.3.org/scheduler/org.cups.cupsd.service.in cups-2.3.3/scheduler/org.cups.cupsd.service.in
---- cups-2.3.3.org/scheduler/org.cups.cupsd.service.in 2020-04-27 20:04:29.000000000 +0200
-+++ cups-2.3.3/scheduler/org.cups.cupsd.service.in     2021-04-20 22:45:51.479823429 +0200
-@@ -1,11 +1,11 @@
- [Unit]
- Description=CUPS Scheduler
- Documentation=man:cupsd(8)
--After=sssd.service
-+After=sssd.service network.target
- [Service]
- ExecStart=@sbindir@/cupsd -l
--Type=simple
-+Type=notify
- Restart=on-failure
- [Install]
index 2fd23cbd2ef55d25fa73e40f492f6a01722ef7ca..34540aa991d7e21e2cb21959b58f73b92cb70671 100644 (file)
--- a/cups.spec
+++ b/cups.spec
 Summary(pl.UTF-8):     Ogólny system druku dla Uniksa
 Summary(pt_BR.UTF-8):  Sistema Unix de Impressão
 Name:          cups
-Version:       2.3.6
-Release:       1
+Version:       2.4.8
+Release:       0.1
 Epoch:         1
 License:       LGPL v2 (libraries), GPL v2 (the rest)
 Group:         Applications/Printing
-Source0:       https://github.com/apple/cups/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 1bfba624d19092b20db4807323417efe
+Source0:       https://github.com/OpenPrinting/cups/releases/download/v%{version}/cups-%{version}-source.tar.gz
+# Source0-md5: 3fdd9a5249f090cd35e324246ef0e3e4
 Source1:       %{name}.init
 Source2:       %{name}.pamd
 Source3:       %{name}.logrotate
@@ -37,19 +37,14 @@ Patch9:             %{name}-verbose-compilation.patch
 Patch10:       %{name}-peercred.patch
 Patch11:       %{name}-usb.patch
 Patch12:       %{name}-desktop.patch
-Patch13:       %{name}-systemd-socket.patch
 Patch15:       reactivate_recommended_driver.patch
 Patch16:       read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch
 Patch18:       %{name}-final-content-type.patch
 Patch19:       job-name-too-long.patch
-# avahi patches from fedora
-Patch100:      %{name}-avahi-address.patch
-Patch101:      %{name}-avahi-no-threaded.patch
 Patch102:      cups-banners.patch
 Patch103:      cups-pid.patch
 Patch104:      cups-eggcups.patch
 Patch105:      cups-driverd-timeout.patch
-Patch106:      cups-logrotate.patch
 Patch107:      cups-res_init.patch
 Patch108:      cups-filter-debug.patch
 Patch110:      cups-dnssd-deviceid.patch
@@ -59,8 +54,7 @@ Patch114:     cups-freebind.patch
 Patch115:      cups-ipp-multifile.patch
 Patch116:      cups-web-devices-timeout.patch
 Patch117:      cups-lspp.patch
-Patch118:      scx3400w-quirks.patchs
-URL:           http://www.cups.org/
+URL:           https://openprinting.github.io/cups/
 BuildRequires: acl-devel
 %{?with_lspp:BuildRequires:    audit-libs-devel}
 BuildRequires: autoconf >= 2.60
@@ -281,22 +275,15 @@ bibliotecas do CUPS.
 # why it hasn't been merged for so long (and why no other distro uses it)
 #%patch11 -p1
 %patch12 -p1
-%patch13 -p1
 %patch15 -p1
 %patch16 -p1
 %patch18 -p1
 %patch19 -p1
 
-%if %{with avahi}
-%patch100 -p1
-%patch101 -p1
-%endif
-
 %patch102 -p1
 %patch103 -p1
 %patch104 -p1
 %patch105 -p1
-%patch106 -p1
 %patch107 -p1
 %patch108 -p1
 %patch110 -p1
@@ -306,13 +293,11 @@ bibliotecas do CUPS.
 %patch115 -p1
 %patch116 -p1
 %patch117 -p1
-%patch118 -p1
 
 %build
 %{__aclocal} -I config-scripts
 %{__autoconf}
 %configure \
-       --libdir=%{_ulibdir} \
        --enable-acl \
        --enable-avahi%{!?with_avahi:=no} \
        --disable-cdsassl \
@@ -335,6 +320,7 @@ bibliotecas do CUPS.
        --with-log-file-perm=0640 \
        --with-dbusdir=/etc/dbus-1 \
        --with-docdir=%{_ulibdir}/%{name}/cgi-bin \
+       --with-pkgconfpath=%{_pkgconfigdir} \
        --with-printcap=/etc/printcap \
        %{?with_dnssd:--with-dnssd-libs=x} \
        %{?with_dnssd:--with-dnssd-includes=x} \
@@ -356,14 +342,6 @@ install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,logrotate.d,modprobe.d,securit
        CUPS_USER=$(id -u) \
        CUPS_GROUP=$(id -g)
 
-if [ "%{_lib}" != "lib" ] ; then
-       install -d $RPM_BUILD_ROOT%{_libdir}
-       %{__mv} $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir}
-%if %{with static_libs}
-       %{__mv} $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir}
-%endif
-fi
-
 %if %{with avahi}
 ln -s %{_ulibdir}/cups/backend/dnssd $RPM_BUILD_ROOT%{_ulibdir}/cups/backend/mdns
 %endif
@@ -420,20 +398,20 @@ fi
 /sbin/chkconfig --add cups
 %service cups restart "cups daemon"
 /sbin/rmmod usblp > /dev/null 2>&1 || :
-%systemd_post org.cups.cupsd.service org.cups.cupd.socket org.cups.cupsd.path
+%systemd_post cups.service cups.socket cups.path
 
 %preun
 if [ "$1" = "0" ]; then
        %service cups stop
        /sbin/chkconfig --del cups
 fi
-%systemd_preun org.cups.cupsd.service org.cups.cupsd.socket org.cups.cupsd.path
+%systemd_preun cups.service cups.socket cups.path
 
 %postun
 %systemd_reload
 
 %triggerpostun -- cups < 1:1.5.2-1
-%systemd_trigger org.cups.cupsd.service org.cups.cupsd.socket org.cups.cupsd.path
+%systemd_trigger cups.service cups.socket cups.path
 
 %post  lib -p /sbin/ldconfig
 %postun        lib -p /sbin/ldconfig
@@ -456,9 +434,9 @@ fi
 /etc/dbus-1/system.d/cups.conf
 /etc/modprobe.d/cups.conf
 %if %{with systemd}
-%{systemdunitdir}/org.cups.cupsd.service
-%{systemdunitdir}/org.cups.cupsd.socket
-%{systemdunitdir}/org.cups.cupsd.path
+%{systemdunitdir}/cups.service
+%{systemdunitdir}/cups.socket
+%{systemdunitdir}/cups.path
 %{systemdtmpfilesdir}/%{name}.conf
 %endif
 %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/classes.conf
@@ -502,8 +480,10 @@ fi
 %{_ulibdir}/cups/cgi-bin/*.html
 %{_ulibdir}/cups/cgi-bin/*.png
 %{_ulibdir}/cups/cgi-bin/*.txt
+%lang(da) %{_ulibdir}/cups/cgi-bin/da
 %lang(de) %{_ulibdir}/cups/cgi-bin/de
 %lang(es) %{_ulibdir}/cups/cgi-bin/es
+%lang(fr) %{_ulibdir}/cups/cgi-bin/fr
 %lang(ja) %{_ulibdir}/cups/cgi-bin/ja
 %lang(pt_BR) %{_ulibdir}/cups/cgi-bin/pt_BR
 %lang(ru) %{_ulibdir}/cups/cgi-bin/ru
@@ -550,6 +530,7 @@ fi
 
 %dir %{_datadir}/cups/templates
 %{_datadir}/cups/templates/*.tmpl
+%lang(da) %{_datadir}/cups/templates/da
 %lang(de) %{_datadir}/cups/templates/de
 %lang(es) %{_datadir}/cups/templates/es
 %lang(fr) %{_datadir}/cups/templates/fr
@@ -611,8 +592,8 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/cups-lpd
 %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-lpd
 %if %{with systemd}
-%{systemdunitdir}/org.cups.cups-lpd.socket
-%{systemdunitdir}/org.cups.cups-lpd@.service
+%{systemdunitdir}/cups-lpd.socket
+%{systemdunitdir}/cups-lpd@.service
 %endif
 %{_mandir}/man8/cups-lpd.8*
 
@@ -684,6 +665,7 @@ fi
 %dir %{_datadir}/cups
 %lang(ca) %{_localedir}/ca/cups_ca.po
 %lang(cs) %{_localedir}/cs/cups_cs.po
+%lang(da) %{_localedir}/da/cups_da.po
 %lang(de) %{_localedir}/de/cups_de.po
 %{_localedir}/en/cups_en.po
 %lang(es) %{_localedir}/es/cups_es.po
@@ -704,6 +686,7 @@ fi
 %attr(755,root,root) %{_libdir}/libcups.so
 %attr(755,root,root) %{_libdir}/libcupsimage.so
 %{_includedir}/cups
+%{_pkgconfigdir}/cups.pc
 %{_mandir}/man1/cups-config.1*
 
 %if %{with static_libs}
index 6e15d25d62edd6a5801961fe0e12b81db7a8e1c7..25364c5c02632935d91710a08c4b164f9c4dc8e1 100644 (file)
@@ -1,6 +1,6 @@
 --- cups-2.3.6/backend/ipp.c.orig      2024-05-19 14:12:43.566004590 +0200
 +++ cups-2.3.6/backend/ipp.c   2024-05-19 14:49:20.758512651 +0200
-@@ -1519,14 +1519,13 @@
+@@ -1519,18 +1519,17 @@
  
    if (create_job)
    {
@@ -9,6 +9,10 @@
    }
    else
    {
+    /*
+     * TODO: make this compatible with UTF-8 - possible UTF-8 truncation here..
+     */
 -    snprintf(print_job_name, sizeof(print_job_name), "%s - %s", argv[1],
 -             argv[3]);
 -    monitor.job_name = print_job_name;
diff --git a/scx3400w-quirks.patchs b/scx3400w-quirks.patchs
deleted file mode 100644 (file)
index b5037a8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From 231c3a3e3ee12e0078be772647707c7d63a6c098 Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Tue, 12 Oct 2021 06:31:15 +0200
-Subject: [PATCH] org.cups.usb-quirks: Samsung SCX-3405W works without quirks
-
----
- CHANGES.md                  | 4 ++--
- backend/org.cups.usb-quirks | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/backend/org.cups.usb-quirks b/backend/org.cups.usb-quirks
-index b4e12a25e..5aa0d41af 100644
---- a/backend/org.cups.usb-quirks
-+++ b/backend/org.cups.usb-quirks
-@@ -194,6 +194,9 @@
- # All Samsung devices (https://bugs.launchpad.net/bugs/1032456)
- 0x04e8 soft-reset
-+# Samsung SCX-3405W works without quirks (https://github.com/OpenPrinting/cups/issues/270)
-+0x04e8 0x344f whitelist
-+
- # Samsung ML-2160 Series (https://bugzilla.redhat.com/show_bug.cgi?id=873123)
- 0x04e8 0x330f unidir
This page took 0.157565 seconds and 4 git commands to generate.