Hello community, here is the log from the commit of package cups.1147 for openSUSE:12.2:Update checked in at 2012-12-18 13:38:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.2:Update/cups.1147 (Old) and /work/SRC/openSUSE:12.2:Update/.cups.1147.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cups.1147", Maintainer is "" Changes: -------- New Changes file: --- /dev/null 2012-11-30 12:21:47.308011256 +0100 +++ /work/SRC/openSUSE:12.2:Update/.cups.1147.new/cups.changes 2012-12-18 13:38:20.000000000 +0100 @@ -0,0 +1,2813 @@ +------------------------------------------------------------------- +Wed Nov 28 21:54:57 UTC 2012 - [email protected] + +- newer poppler pdftops supports and needs '-origpagesizes' when called + from cups filter. The configure check requires poppler-tools + Fixes bnc#776080 (nonworking duplex printing) + +------------------------------------------------------------------- +Wed May 16 14:32:36 CEST 2012 - [email protected] + +- Upgraded to CUPS 1.5.3 (mainly a bugfix release) that fixes + a number of PostScript, SSL, authenticated printing, + and networking issues. + Excerpt: + * The scheduler could crash if a PPD file contained + an invalid paper size (STR #4049). + * Missing localizations caused empty output (STR #4033). + * Changed how timeouts are implemented in the LPD backend + (STR #4013). + * The default InputSlot setting was never used (STR #3957). + * Fixed the IPP backend's handling of HTTP/1.0 compatibility + (STR #3988). + For a complete list see the CHANGES.txt file. +- revert_cups-ssl.m4_to_1.5.2.patch reverts cups-ssl.m4 to what + it was in CUPS 1.5.2 so that autoconf produces a syntactically + correct configure script otherwise "bash -n configure" fails + with "syntax error: unexpected end of file", + see http://www.cups.org/str.php?L4084 + +------------------------------------------------------------------- +Thu Apr 12 10:53:55 CEST 2012 - [email protected] + +- No longer require Ghostscript but only "Recommends: ghostscript" + because the Ghostscript device "cups" is needed by several CUPS + filters (in particular the "rasterto..." filters) but those + filters are not used on all systems (e.g. on a print server + with only "raw" queues) so that a weak Recommends fits better. + Furthermore this avoids a build dependency cycle between the + main-packages cups and ghostscript. +- No longer require /usr/bin/pdftops but only a "Recommends" + because the CUPS filter /usr/lib/cups/filter/pdftops + (which calls /usr/bin/pdftops) is not used on all systems + (e.g. on a print server with only "raw" queues) so that + a weak Recommends fits better. + +------------------------------------------------------------------- +Tue Apr 10 16:25:24 CEST 2012 - [email protected] + +- In cups.spec only "Requires: ghostscript" but no longer require + ghostscript-fonts-std in cups.spec because in ghostscript.spec + there is already "Requires: ghostscript-fonts-std" + (related to openSUSE Bugzilla bnc#735824). +- In cups.spec remove the Obsoletes/Provides cups-SUSE-ppds-dat + because cups-SUSE-ppds-dat.rpm existed only up to SLE10 + but it does no longer exist since 11.1/SLE11 + and CUPS 1.5.x is not provided for SLE10. +- Use traditional bash scriptlets for post/postun with + an explicite "exit 0" line at the end to be fail safe and + therefore also "PreReq: /sbin/ldconfig" explicitly for the + cups-libs sub-package, see the "Shared_libraries" section in + http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets + +------------------------------------------------------------------- +Tue Feb 7 14:42:59 CET 2012 - [email protected] + +- Upgraded to CUPS 1.5.2 (mainly a bugfix release). This release + fixes a number of printing, encryption, and ipptool issues. + Excerpt: + * The scheduler incorrectly used free() on a POSIX ACL value, + which could cause a crash (STR #3970). + * Encryption was broken with OpenSSL (probably STR #3933 + and bnc#739410 ). + * Badly formed GIF files could cause the image filters + to crash (STR #3914). + For a complete list see the CHANGES.txt file. + +------------------------------------------------------------------- +Tue Jan 10 04:58:44 UTC 2012 - [email protected] + +- Use explicit buildrequires on the needed libraries. + otherwise build will fail after libtiff-devel deps cleanup +- Cleanup requires of -devel package, which only needs glibc-devel +- Fix up, cups-config script, which with option --libs adds: + LIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto + -lz -lpthread -lm -lcrypt " + IMGLIBS="-ltiff -ljpeg -lpng" + This only makes sense when using static linking but we don't ship + static libraries and will only help bloating dependant packages. + +------------------------------------------------------------------- +Sat Dec 17 18:19:14 UTC 2011 - [email protected] + +- Update systemd patch, Bind to datagram socket as well in + systemd cups.socket unit file, to prevent that port being + stolen by another service (from RH). +- There is no need to use -fno-strict-aliasing + in cflags any longer. + +------------------------------------------------------------------- +Sat Dec 3 20:09:32 UTC 2011 - [email protected] + +- Update systemd patch to a newer version that uses + libsystemd-daemon instead of bundling sd-daemon wrappers. + +------------------------------------------------------------------- +Sat Dec 3 19:11:36 UTC 2011 - [email protected] + +- Add complete systemd support, the hardware stuff is handled in + builtin udev rules (see /lib/udev/rules.d/99-systemd.rules). + See also http://0pointer.de/blog/projects/socket-activation2.html + +------------------------------------------------------------------- +Thu Oct 6 11:00:09 CEST 2011 - [email protected] + +- Upgraded to CUPS 1.5.0 (openSUSE Bugzilla bnc#722057) + Backward incompatible changes: + * The main header cups/cups.h no longer includes the PPD header + cups/ppd.h which may require code changes to applications. + * CUPS no longer supports the old ~/.cupsrc or ~/.lpoptions files + from CUPS 1.1.x. The ~/.cups/client.conf and ~/.cups/lpoptions + files that were introduced in CUPS 1.2 must now be used. + * The scheduler now requires that filters and backends + have group write permissions disabled (security). + * The HP-GL/2 filter is no longer included (STR #3322). + * The SCSI backend is no longer included (STR #3500). + Other changes: + * Updated the PostScript filter to support IncludeFeature + in more circumstances (STR #3417). + * The scheduler now sets the process group for child processes + and manages the group (STR #2829). + * The scheduler now more carefully creates and removes + configuration, cache, and state files (STR #3715). + * The lpadmin command now allows default option values + to be deleted (STR #2959). + * Restored support for GNU TLS and OpenSSL with threading + enabled (STR #3605, STR #3461). + Therefore cups-1.4.4-str3461-1.4.reverted.patch + is no longer needed (openSUSE Bugzilla bnc#617026). + * Increased the default RIPCache value to 128MB (STR #3535). + Therefore cups-1.4.4-set_default_RIPCache_128m.patch + is no longer needed (openSUSE Bugzilla bnc#628233). + * Updated PDF filter to support Ghostscript ps2write (STR #3766). + * Updated PDF filter to support Poppler option to preserve page + sizes in PDF files when the user has not selected a particular + media size (STR #3689). + * Added new PWG Raster filter for IPP Everywhere printer support. + * Added support for a new cupsFilter2 keyword in PPD files + to allow for the propagation of the actual MIME media type + produced by a filter. + * Name resolution errors no longer no longer cause + queues to stop (STR #3719, STR #3753). See also + https://bugzilla.novell.com/show_bug.cgi?id=337794#c16 + * Added a new cups-exec helper program that applies security + profiles to filters, port monitors, backends, CGI programs, + and mini-daemons. + * The web interface can now be disabled using the WebInterface + directive in cupsd.conf (STR #2625). + * The ipptest tool is now a first-class user program (STR #3484). + For a complete list see the CHANGES.txt file. +- cups-1.4.4-str3461-1.4.reverted.patch (bnc#617026) and + cups-1.4.4-set_default_RIPCache_128m.patch (bnc#628233) + are no longer needed because the issues are fixed upstream. + cups-1.5-additional_policies.patch (fate#303515) replaces the + cups-1.4-additional_policies.patch which does no longer apply. + +------------------------------------------------------------------- +Fri Sep 30 20:07:52 UTC 2011 - [email protected] + +- add libtool as buildrequire to make the spec file more reliable + +------------------------------------------------------------------- +Thu Sep 29 15:10:07 CEST 2011 - [email protected] + +- Reverted the change from meissner below dated + "Fri Sep 23 09:54:39 CEST 2011" so that baselibs.conf again + contains only one line "cups-libs" as before because the + submitrequest 85423 Printing/cups -> openSUSE:Factory/cups + was declined by coolo with the following reason: + "cups-devel-32bit requires cups-32bit (default requires), + which does not exist". + +------------------------------------------------------------------- +Thu Sep 29 11:51:21 CEST 2011 - [email protected] + +- Upgraded to CUPS 1.4.8 + * network backends could crash if a printer returned a value + of 0 for the maximum capacity for a supply (STR #3875) + * For a complete list see the CHANGES.txt file. +- Upgraded to CUPS 1.4.7 + * imageto* filters could crash with bad GIF files (STR #3867) + * CUPS did not work with some printers that incorrectly + implemented the HTTP/1.1 standard (STR #3778, STR #3791) + * Fixed crash in scheduler when the application/octet-stream + MIME type was not defined (STR #3690) + * The web interface no longer tries to use multi-part delivery + when adding printers (STR #3455) using Epiphany or IE + * "lp" and "lpr" failed with Kerberos enabled (STR #3768) ++++ 2616 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:12.2:Update/.cups.1147.new/cups.changes New: ---- PSLEVEL1.PPD.bz2 PSLEVEL2.PPD.bz2 baselibs.conf cups-0001-systemd-add-systemd-socket-activation-and-unit-files.patch cups-1.2rc1-template.patch cups-1.3.6-access_conf.patch cups-1.3.9-desktop_file.patch cups-1.4-do_not_strip_recommended_from_PPDs.patch cups-1.4.3-default-webcontent-path.patch cups-1.5-additional_policies.patch cups-1.5.3-source.tar.bz2 cups-client.conf cups-config-libs.patch cups-pam.diff cups.changes cups.init cups.spec cups.sysconfig cups.xinetd postscript.ppd.bz2 revert_cups-ssl.m4_to_1.5.2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cups.spec ++++++ ++++ 653 lines (skipped) ++++++ baselibs.conf ++++++ cups-libs ++++++ cups-0001-systemd-add-systemd-socket-activation-and-unit-files.patch ++++++ --- config.h.in.orig +++ config.h.in @@ -496,6 +496,13 @@ /* + * Do we have systemd support? + */ + +#undef HAVE_SYSTEMD + + +/* * Various scripting languages... */ --- /dev/null +++ config-scripts/cups-systemd.m4 @@ -0,0 +1,36 @@ +dnl +dnl "$Id$" +dnl +dnl systemd stuff for CUPS. + +dnl Find whether systemd is available + +SDLIBS="" +AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), + [], [with_systemdsystemunitdir=$($PKGCONFIG --variable=systemdsystemunitdir systemd)]) +if test "x$with_systemdsystemunitdir" != xno; then + AC_MSG_CHECKING(for libsystemd-daemon) + if $PKGCONFIG --exists libsystemd-daemon; then + AC_MSG_RESULT(yes) + SDCFLAGS=`$PKGCONFIG --cflags libsystemd-daemon` + SDLIBS=`$PKGCONFIG --libs libsystemd-daemon` + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) + AC_DEFINE(HAVE_SYSTEMD) + else + AC_MSG_RESULT(no) + fi +fi + +if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then + SYSTEMD_UNITS="cups.service cups.socket cups.path" +else + SYSTEMD_UNITS="" +fi + +AC_SUBST(SYSTEMD_UNITS) +AC_SUBST(SDLIBS) + +dnl +dnl "$Id$" +dnl --- configure.in.orig +++ configure.in @@ -37,6 +37,7 @@ sinclude(config-scripts/cups-pam.m4) sinclude(config-scripts/cups-largefile.m4) sinclude(config-scripts/cups-dnssd.m4) sinclude(config-scripts/cups-launchd.m4) +sinclude(config-scripts/cups-systemd.m4) sinclude(config-scripts/cups-defaults.m4) sinclude(config-scripts/cups-pdf.m4) sinclude(config-scripts/cups-scripting.m4) @@ -71,6 +72,9 @@ AC_OUTPUT(Makedefs conf/snmp.conf cups-config data/testprint + data/cups.service + data/cups.socket + data/cups.path desktop/cups.desktop doc/help/ref-cupsd-conf.html doc/help/standard.html --- cups/usersys.c.orig +++ cups/usersys.c @@ -750,7 +750,7 @@ cups_read_client_conf( struct stat sockinfo; /* Domain socket information */ if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) && - (sockinfo.st_mode & S_IRWXO) == S_IRWXO) + (sockinfo.st_mode & (S_IROTH | S_IWOTH)) == (S_IROTH | S_IWOTH)) cups_server = CUPS_DEFAULT_DOMAINSOCKET; else #endif /* CUPS_DEFAULT_DOMAINSOCKET */ --- /dev/null +++ data/cups.path.in @@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printer Service Spool + +[Path] +PathExistsGlob=@CUPS_REQUESTS@/d* + +[Install] +WantedBy=multi-user.target --- /dev/null +++ data/cups.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=CUPS Printing Service + +[Service] +ExecStart=@sbindir@/cupsd -f + +[Install] +Also=cups.socket cups.path +WantedBy=printer.target --- /dev/null +++ data/cups.socket.in @@ -0,0 +1,11 @@ +[Unit] +Description=CUPS Printing Service Sockets + +[Socket] +ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@ +ListenStream=631 +ListenDatagram=0.0.0.0:631 +BindIPv6Only=ipv6-only + +[Install] +WantedBy=sockets.target --- data/Makefile.orig +++ data/Makefile @@ -112,6 +112,12 @@ install-data: $(INSTALL_DATA) $$file $(DATADIR)/ppdc; \ done $(INSTALL_DIR) -m 755 $(DATADIR)/profiles + if test "x$(SYSTEMD_UNITS)" != "x" ; then \ + $(INSTALL_DIR) -m 755 $(SYSTEMDUNITDIR); \ + for file in $(SYSTEMD_UNITS); do \ + $(INSTALL_DATA) $$file $(SYSTEMDUNITDIR); \ + done; \ + fi # @@ -159,6 +165,9 @@ uninstall: -$(RMDIR) $(DATADIR)/charsets -$(RMDIR) $(DATADIR)/banners -$(RMDIR) $(DATADIR) + for file in $(SYSTEMD_UNITS); do \ + $(RM) $(SYSTEMDUNITDIR)/$$file; \ + done # --- Makedefs.in.orig +++ Makedefs.in @@ -143,6 +143,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ CXXLIBS = @CXXLIBS@ DBUS_NOTIFIER = @DBUS_NOTIFIER@ DBUS_NOTIFIERLIBS = @DBUS_NOTIFIERLIBS@ +SYSTEMD_UNITS = @SYSTEMD_UNITS@ DNSSD_BACKEND = @DNSSD_BACKEND@ DSOFLAGS = -L../cups @DSOFLAGS@ DSOLIBS = @DSOLIBS@ $(COMMONLIBS) @@ -151,6 +152,7 @@ FONTS = @FONTS@ IMGLIBS = @IMGLIBS@ IMGFILTERS = @IMGFILTERS@ LAUNCHDLIBS = @LAUNCHDLIBS@ +SDLIBS = @SDLIBS@ LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \ -L../scheduler @LDARCHFLAGS@ \ @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) @@ -267,6 +269,7 @@ PAMFILE = @PAMFILE@ DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@ DBUSDIR = @DBUSDIR@ +SYSTEMDUNITDIR = $(BUILDROOT)@systemdsystemunitdir@ # --- scheduler/client.h.orig +++ scheduler/client.h @@ -75,6 +75,9 @@ typedef struct int fd; /* File descriptor for this server */ http_addr_t address; /* Bind address of socket */ http_encryption_t encryption; /* To encrypt or not to encrypt... */ +#ifdef HAVE_SYSTEMD + int is_systemd; /* Is this a systemd socket? */ +#endif /* HAVE_SYSTEMD */ } cupsd_listener_t; --- scheduler/dirsvc.c.orig +++ scheduler/dirsvc.c @@ -1457,7 +1457,7 @@ cupsdStartBrowsing(void) } } - if (BrowseSocket >= 0) + if (BrowseSocket >= 0 && !BrowseSocketIsSystemd) { /* * Bind the socket to browse port... @@ -1501,13 +1501,17 @@ cupsdStartBrowsing(void) cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to set broadcast mode - %s.", strerror(errno)); + if (!BrowseSocketIsSystemd) + { #ifdef WIN32 - closesocket(BrowseSocket); + closesocket(BrowseSocket); #else - close(BrowseSocket); + close(BrowseSocket); #endif /* WIN32 */ - BrowseSocket = -1; + BrowseSocket = -1; + } + BrowseLocalProtocols &= ~BROWSE_CUPS; BrowseRemoteProtocols &= ~BROWSE_CUPS; @@ -1820,15 +1824,22 @@ cupsdStopBrowsing(void) if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS) && BrowseSocket >= 0) { - /* - * Close the socket and remove it from the input selection set. - */ + if (!BrowseSocketIsSystemd) + { + /* + * Close the socket. + */ #ifdef WIN32 - closesocket(BrowseSocket); + closesocket(BrowseSocket); #else - close(BrowseSocket); + close(BrowseSocket); #endif /* WIN32 */ + } + + /* + * Remove it from the input selection set. + */ cupsdRemoveSelect(BrowseSocket); BrowseSocket = -1; @@ -5146,11 +5157,14 @@ update_cups_browse(void) strerror(errno)); cupsdLogMessage(CUPSD_LOG_ERROR, "CUPS browsing turned off."); + if (!BrowseSocketIsSystemd) + { #ifdef WIN32 - closesocket(BrowseSocket); + closesocket(BrowseSocket); #else - close(BrowseSocket); + close(BrowseSocket); #endif /* WIN32 */ + } cupsdRemoveSelect(BrowseSocket); BrowseSocket = -1; --- scheduler/dirsvc.h.orig +++ scheduler/dirsvc.h @@ -96,6 +96,8 @@ VAR int Browsing VALUE(TRUE), /* Short names for remote printers? */ BrowseSocket VALUE(-1), /* Socket for browsing */ + BrowseSocketIsSystemd VALUE(0), + /* BrowseSocket is systemd-provided? */ BrowsePort VALUE(IPP_PORT), /* Port number for broadcasts */ BrowseInterval VALUE(DEFAULT_INTERVAL), --- scheduler/listen.c.orig +++ scheduler/listen.c @@ -401,7 +401,11 @@ cupsdStopListening(void) lis; lis = (cupsd_listener_t *)cupsArrayNext(Listeners)) { - if (lis->fd != -1) + if (lis->fd != -1 +#ifdef HAVE_SYSTEMD + && !lis->is_systemd +#endif /* HAVE_SYSTEMD */ + ) { #ifdef WIN32 closesocket(lis->fd); --- scheduler/main.c.orig +++ scheduler/main.c @@ -26,6 +26,8 @@ * launchd_checkin() - Check-in with launchd and collect the listening * fds. * launchd_checkout() - Update the launchd KeepAlive file as needed. + * systemd_checkin() - Check-in with systemd and collect the + * listening fds. * parent_handler() - Catch USR1/CHLD signals... * process_children() - Process all dead children... * select_timeout() - Calculate the select timeout value. @@ -62,6 +64,10 @@ # endif /* !LAUNCH_JOBKEY_SERVICEIPC */ #endif /* HAVE_LAUNCH_H */ +#ifdef HAVE_SYSTEMD +#include <systemd/sd-daemon.h> +#endif /* HAVE_SYSTEMD */ + #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) # include <malloc.h> #endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ @@ -78,6 +84,9 @@ static void launchd_checkin(void); static void launchd_checkout(void); #endif /* HAVE_LAUNCHD */ +#ifdef HAVE_SYSTEMD +static void systemd_checkin(void); +#endif /* HAVE_SYSTEMD */ static void parent_handler(int sig); static void process_children(void); static void sigchld_handler(int sig); @@ -519,6 +528,13 @@ main(int argc, /* I - Number of comm } #endif /* HAVE_LAUNCHD */ +#ifdef HAVE_SYSTEMD + /* + * If we were started by systemd get the listen sockets file descriptors... + */ + systemd_checkin(); +#endif /* HAVE_SYSTEMD */ + /* * Startup the server... */ @@ -730,6 +746,15 @@ main(int argc, /* I - Number of comm } #endif /* HAVE_LAUNCHD */ +#ifdef HAVE_SYSTEMD + /* + * If we were started by systemd get the listen sockets file + * descriptors... + */ + + systemd_checkin(); +#endif /* HAVE_SYSTEMD */ + /* * Startup the server... */ @@ -1535,6 +1560,147 @@ launchd_checkout(void) } #endif /* HAVE_LAUNCHD */ +#ifdef HAVE_SYSTEMD +static void +systemd_checkin(void) +{ + int n, fd; + + n = sd_listen_fds(0); + if (n < 0) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Failed to acquire sockets from systemd - %s", + strerror(-n)); + exit(EXIT_FAILURE); + return; + } + + if (n == 0) + return; + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) + { + http_addr_t addr; + socklen_t addrlen = sizeof (addr); + int r; + cupsd_listener_t *lis; + char s[256]; + + r = sd_is_socket(fd, AF_UNSPEC, SOCK_STREAM, 1); + if (r < 0) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Unable to verify socket type - %s", + strerror(-r)); + continue; + } + + if (!r) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "Browsing=%d", Browsing); + cupsdLogMessage(CUPSD_LOG_ERROR, + "BrowseLocalProtocols=%x", BrowseLocalProtocols); + cupsdLogMessage(CUPSD_LOG_ERROR, + "BrowseRemoteProtocols=%x", BrowseRemoteProtocols); + cupsdLogMessage(CUPSD_LOG_ERROR, + "BROWSE_CUPS=%x", BROWSE_CUPS); + if (Browsing && + ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS)) + { + r = sd_is_socket(fd, AF_UNSPEC, SOCK_DGRAM, 0); + if (r < 0) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Unable to verify socket type - %s", + strerror(-r)); + continue; + } + + if (r) + { + /* + * This is the browse socket. + */ + + char addrstr[256]; + if (getsockname(fd, (struct sockaddr*) &addr, &addrlen)) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Unable to get local address - %s", + strerror(errno)); + continue; + } + + httpAddrString (&addr, addrstr, sizeof (addrstr)); + BrowseSocket = fd; + BrowseSocketIsSystemd = 1; + cupsdLogMessage(CUPSD_LOG_DEBUG, + "systemd_checkin: Matched browse (port %d) with fd %d:%s...", + BrowsePort, fd, addrstr); + continue; + } + + } + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Socket not of the right type"); + continue; + } + + if (getsockname(fd, (struct sockaddr*) &addr, &addrlen)) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Unable to get local address - %s", + strerror(errno)); + continue; + } + + /* + * Try to match the systemd socket address to one of the listeners... + */ + + for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners); + lis; + lis = (cupsd_listener_t *)cupsArrayNext(Listeners)) + if (httpAddrEqual(&lis->address, &addr)) + break; + + if (lis) + { + cupsdLogMessage(CUPSD_LOG_DEBUG, + "systemd_checkin: Matched existing listener %s with fd %d...", + httpAddrString(&(lis->address), s, sizeof(s)), fd); + } + else + { + cupsdLogMessage(CUPSD_LOG_DEBUG, + "systemd_checkin: Adding new listener %s with fd %d...", + httpAddrString(&addr, s, sizeof(s)), fd); + + if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL) + { + cupsdLogMessage(CUPSD_LOG_ERROR, + "systemd_checkin: Unable to allocate listener - " + "%s.", strerror(errno)); + exit(EXIT_FAILURE); + } + + cupsArrayAdd(Listeners, lis); + + memcpy(&lis->address, &addr, sizeof(lis->address)); + } + + lis->fd = fd; + lis->is_systemd = 1; + +# ifdef HAVE_SSL + if (_httpAddrPort(&(lis->address)) == 443) + lis->encryption = HTTP_ENCRYPT_ALWAYS; +# endif /* HAVE_SSL */ + } +} +#endif /* HAVE_SYSTEMD */ /* * 'parent_handler()' - Catch USR1/CHLD signals... --- scheduler/Makefile.orig +++ scheduler/Makefile @@ -379,7 +379,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \ $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ $(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \ - $(LIBGSSAPI) $(LIBWRAP) + $(LIBGSSAPI) $(LIBWRAP) $(SDLIBS) cupsd-static: $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC) echo Linking $@... @@ -387,7 +387,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \ $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \ - $(LIBWRAP) + $(LIBWRAP) $(SDLIBS) # ++++++ cups-1.2rc1-template.patch ++++++ --- cups-1.2rc1/templates/choose-uri.tmpl.orig 2006-03-18 13:56:48.000000000 +0100 +++ cups-1.2rc1/templates/choose-uri.tmpl 2006-03-29 20:03:30.000000000 +0200 @@ -24,6 +24,9 @@ lpd://hostname/queue + smb://servername/printer + smb://username:password@workgroup/servername/printer + socket://hostname socket://hostname:9100 </PRE> ++++++ cups-1.3.6-access_conf.patch ++++++ --- cups-1.3.6/conf/cupsd.conf.in.orig 2008-02-28 20:08:52.000000000 +0100 +++ cups-1.3.6/conf/cupsd.conf.in 2008-02-28 20:13:47.000000000 +0100 @@ -29,6 +29,7 @@ # Restrict access to the server... <Location /> Order allow,deny + Allow 127.0.0.2 </Location> # Restrict access to the admin pages... ++++++ cups-1.3.9-desktop_file.patch ++++++ Index: desktop/cups.desktop.in =================================================================== --- desktop/cups.desktop.in.orig +++ desktop/cups.desktop.in @@ -1,6 +1,7 @@ [Desktop Entry] -Categories=System;Printing;HardwareSettings;X-Red-Hat-Base; -Exec=@CUPS_HTMLVIEW@ http://localhost:631/ +Categories=System;Printing;Settings;HardwareSettings; +Exec=desktop-launch http://localhost:631/ +NotShowIn=GNOME; Icon=cups StartupNotify=false Terminal=false ++++++ cups-1.4-do_not_strip_recommended_from_PPDs.patch ++++++ --- scheduler/cups-driverd.cxx.orig 2009-06-09 00:00:14.000000000 +0200 +++ scheduler/cups-driverd.cxx 2009-07-01 14:38:44.000000000 +0200 @@ -211,7 +211,6 @@ add_ppd(const char *filename, /* I - PP const char *scheme) /* I - PPD scheme */ { ppd_info_t *ppd; /* PPD */ - char *recommended; /* Foomatic driver string */ /* @@ -250,15 +249,6 @@ add_ppd(const char *filename, /* I - PP strlcpy(ppd->record.scheme, scheme, sizeof(ppd->record.scheme)); /* - * Strip confusing (and often wrong) "recommended" suffix added by - * Foomatic drivers... - */ - - if ((recommended = strstr(ppd->record.make_and_model, - " (recommended)")) != NULL) - *recommended = '\0'; - - /* * Add the PPD to the PPD arrays... */ ++++++ cups-1.4.3-default-webcontent-path.patch ++++++ --- config-scripts/cups-directories.m4.orig 2009-04-13 01:04:51.000000000 +0200 +++ config-scripts/cups-directories.m4 2010-05-06 11:34:04.000000000 +0200 @@ -323,11 +323,11 @@ fi AC_SUBST(MENUDIR) # Documentation files -AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="") +AC_ARG_WITH(docdir, [ --with-docdir set path and DocumentRoot directive for web content, default=datadir/cups/webcontent],docdir="$withval",docdir="") if test x$docdir = x; then - CUPS_DOCROOT="$datadir/doc/cups" - docdir="$datadir/doc/cups" + CUPS_DOCROOT="$datadir/cups/webcontent" + docdir="$datadir/cups/webcontent" else CUPS_DOCROOT="$docdir" fi ++++++ cups-1.5-additional_policies.patch ++++++ --- conf/cupsd.conf.in.orig 2010-12-09 22:24:51.000000000 +0100 +++ conf/cupsd.conf.in 2011-10-05 13:51:39.000000000 +0200 @@ -138,3 +138,25 @@ WebInterface @CUPS_WEBIF@ # # End of "$Id: cupsd.conf.in 9407 2010-12-09 21:24:51Z mike $". # + +# The policy below is added by SUSE during build of our cups package. +# The policy 'allowallforanybody' is totally open and insecure and therefore +# it can only be used within an internal network where only trused users exist +# and where the cupsd is not accessible at all from any external host, see +# http://en.opensuse.org/SDB:CUPS_and_SANE_Firewall_settings +# Have in mind that any user who is allowed to do printer admin tasks +# can change the print queues as he likes - e.g. send copies of confidental +# print jobs from an internal network to any external destination, see +# http://en.opensuse.org/SDB:CUPS_in_a_Nutshell +# For documentation regarding 'Managing Operation Policies' see +# http://www.cups.org/documentation.php/doc-1.5/policies.html +<Policy allowallforanybody> + <Limit All> + Order deny,allow + Allow from all + </Limit> +</Policy> +# Explicitly set the CUPS 'default' policy to be used by default: +DefaultPolicy default +# End of additions by SUSE. + ++++++ cups-client.conf ++++++ # Sample client configuration file for the Common UNIX Printing System # (CUPS). # # Copyright 1997-2005 by Easy Software Products, all rights reserved. # Klaus Singvogel <[email protected]> modified it for SUSE distribution. # # These coded instructions, statements, and computer programs are the # property of Easy Software Products and are protected by Federal # copyright law. Distribution and use rights are outlined in the file # "LICENSE.txt" which should have been included with this file. If this # file is missing or damaged please contact Easy Software Products # at: # # Attn: CUPS Licensing Information # Easy Software Products # 44141 Airport View Drive, Suite 204 # Hollywood, Maryland 20636 USA # # Voice: (301) 373-9600 # EMail: [email protected] # WWW: http://www.cups.org # ######################################################################## # # # This is the CUPS client configuration file. This file is used to # # define client-specific parameters, such as the default server or # # default encryption settings. # # # # Put this file on /etc/cups/client.conf (system use) or # # ~/.cups/client.conf (personal use). # # # # more information in the manual page client.conf(5) ######################################################################## # # Encryption: directive specifies the default encryption settings for # the client. # # Possible values: # # IfRequested # Never # Required # Always # # The default value is "IfRequested". # This parameter can also be set # using the CUPS_ENCRYPTION environment # variable. # #Encryption IfRequested #Encryption Never #Encryption Required #Encryption Always # # ServerName: directive specifies sets the remote server that is to be # used for all client operations. That is, it redirects all client # requests to the remote server. # # By default CUPS will use the domain socket /var/run/cups/cups.sock or # local server ("localhost"), if so configured. The value can be # overwritten by the CUPS_SERVER environment variable. # # The default port number is 631 but can be overridden by adding a colon # followed by the desired port number to the value. # # ONLY ONE SERVER NAME MAY BE SPECIFIED AT A TIME. To use more than one # server you must use a local scheduler with browsing and possibly # polling. # #ServerName /domain/socket #ServerName foo.bar.com #ServerName 11.22.33.444 #ServerName foo.bar.com:8631 ++++++ cups-config-libs.patch ++++++ --- cups-config.in.orig +++ cups-config.in @@ -35,8 +35,8 @@ INSTALLSTATIC=@INSTALLSTATIC@ # flags for C++ compiler: CFLAGS="" LDFLAGS="@EXPORT_LDFLAGS@" -LIBS="@LIBGSSAPI@ @EXPORT_SSLLIBS@ @EXPORT_LIBZ@ @LIBS@" -IMGLIBS="@EXPORT_LIBTIFF@ @EXPORT_LIBJPEG@ @EXPORT_LIBPNG@" +LIBS="" +IMGLIBS="" # Check for local invocation... selfdir=`dirname $0` ++++++ cups-pam.diff ++++++ --- conf/pam.suse 2003/02/07 11:09:32 1.1 +++ conf/pam.suse 2003/02/07 11:10:03 @@ -0,0 +1,2 @@ +auth include common-auth +account include common-account ++++++ cups.init ++++++ #! /bin/bash # # Copyright (C) 1995-2001 SuSE GmbH Nuernberg, Germany. # Copyright (C) 2002 SuSE Linux AG, Nuernberg, Germany. # Copyright (C) 2002--2008 Klaus Singvogel, SUSE / Novell Inc. # Copyright (C) 2010 Johannes Meixner, SUSE LINUX Products GmbH # # Author: Kurt Garloff, 2000 # Klaus Singvogel, 2002--2008 # Johannes Meixner, 2010 # # /etc/init.d/cups # and its symbolic link # /usr/sbin/rccups # # System startup script for the CUPS printer daemon # ### BEGIN INIT INFO # Provides: cupsd # Required-Start: $local_fs $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Should-Start: dbus $named $portmap ptal slpd printbill # Should-Stop: $portmap # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: CUPS printer daemon # Description: Start CUPS to provide spooling and printing files # functionality for local and remote printers. Also required if # printers are broadcasted ("Browsing") by remote CUPS servers. ### END INIT INFO # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - insufficient privilege # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signalling is not supported) are # considered a success. # Source SuSE config, only if exists with size greater zero test -s /etc/rc.config && . /etc/rc.config # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num><num> # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status if test -s /etc/rc.status then . /etc/rc.status else exit 1 fi # Reset status of this service: rc_reset CUPSD_BIN=/usr/sbin/cupsd test -x $CUPSD_BIN || exit 5 # Get CUPSD_OPTIONS test -s /etc/sysconfig/cups && . /etc/sysconfig/cups # Enforce default umask to avoid problems with wrong file permissions # for example of /etc/printcap (see Novell/Suse Bugzilla bnc#31567). umask 022 case "$1" in start) echo -n "Starting cupsd" ## Start daemon with startproc(8). ## If this fails the echo return value is set appropriate. # NOTE: startproc return 0, even if service is # already running to match LSB spec. startproc $CUPSD_BIN $CUPSD_OPTIONS # Remember status and be verbose: rc_status -v ;; stop) echo -n "Shutting down cupsd" ## Stop daemon with killproc(8). ## If this fails the echo return value is set appropriate. # NOTE: killproc with explicite signal specified # like "killproc -TERM" sends only SIGTERM and exits # to match LSB spec. (see Novell/Suse Bugzilla bnc#595796). # Without explicite signal the default signal SIGTERM is sent # and afterwards killproc waits by default only up to 5 seconds # before killproc sends SIGKILL if cupsd has not yet terminated. # Wait at most 10 seconds until the cupsd does actually no longer run # so that the cupsd should have sufficient time for its clean up: killproc -t 10 $CUPSD_BIN # Remember status and be verbose: rc_status -v ;; try-restart) ## Stop the service and if this succeeds (i.e. the ## service was running before), start it again. ## Note: try-restart is not (yet) part of LSB (as of 0.7.5) $0 status >/dev/null && $0 restart # Remember status and be quiet: rc_status ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop # The above waits at most 10 seconds until the cupsd does actually no longer run # otherwise "startproc $CUPSD_BIN" would not start a new cupsd # (see Novell/Suse Bugzilla bnc#622058). # Start a new cupsd: $0 start # Remember status and be quiet: rc_status ;; force-reload) ## Signal the daemon to reload its config. ## Most daemons do this on signal 1 (SIGHUP). ## If it does not support it, restart. if ps -C cupsd -o user | grep -q '^root$' then echo -n "Reload service cupsd" killproc -HUP $CUPSD_BIN rc_status -v else $0 restart fi ;; reload) ## Like force-reload, but if daemon does not support ## signalling, do nothing. # If it supports signalling: if ps -C cupsd -o user | grep -q '^root$' then echo -n "Reload service cupsd" killproc -HUP $CUPSD_BIN rc_status -v else echo -n '"reload" not possible (cupsd does not run as user root) use "restart" instead' rc_status -s fi ;; status) echo -n "Checking for cupsd: " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. # Status has a slightly different for the status command: # 0 - service running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running # NOTE: checkproc returns LSB compliant status values. checkproc $CUPSD_BIN rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, ## give out the argument which is required for a reload. rc_failed 3 ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" exit 1 ;; esac rc_exit ++++++ cups.sysconfig ++++++ ## Path: System/Printing/CUPS ## Description: Cups options ## Type: string ## Default: cups ## ServiceReload: cups ## ServiceRestart: cups # IDENT="cups" ## Type: string ## Default: "CUPS printer daemon" DESCRIPTIVE="CUPS printer daemon" ## Type: string ## Default: "" # # change CUPSD_OPTIONS for arguments of start of cupsd # e.g. CUPSD_OPTIONS="-c /etc/cups/cupsd.conf" CUPSD_OPTIONS="" ++++++ cups.xinetd ++++++ service printer { disable = yes flags = NAMEINARGS socket_type = stream protocol = tcp wait = no user = lp server = /usr/lib/cups/daemon/cups-lpd server_args = cups-lpd -o document-format=application/octet-stream } ++++++ revert_cups-ssl.m4_to_1.5.2.patch ++++++ --- cups-1.5.3/config-scripts/cups-ssl.m4 2012-03-21 05:45:48.000000000 +0100 +++ cups-1.5.2/config-scripts/cups-ssl.m4 2011-06-16 22:12:16.000000000 +0200 @@ -1,9 +1,9 @@ dnl -dnl "$Id: cups-ssl.m4 10371 2012-03-21 04:45:48Z mike $" +dnl "$Id: cups-ssl.m4 9837 2011-06-16 20:12:16Z mike $" dnl dnl OpenSSL/GNUTLS stuff for CUPS. dnl -dnl Copyright 2007-2012 by Apple Inc. +dnl Copyright 2007-2011 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -136,9 +136,9 @@ if test x$enable_ssl != xno; then dnl case the RSAREF libraries are needed. for libcrypto in \ - "-lcrypto" \ - "-lcrypto -lrsaref" \ - "-lcrypto -lRSAglue -lrsaref" + "-lcrypto" \ + "-lcrypto -lrsaref" \ + "-lcrypto -lRSAglue -lrsaref" do AC_CHECK_LIB(ssl,SSL_new, [have_ssl=1 @@ -149,9 +149,6 @@ if test x$enable_ssl != xno; then $libcrypto) if test "x${SSLLIBS}" != "x"; then - LIBS="$SAVELIBS $SSLLIBS" - AC_CHECK_FUNC(SSL_set_tlsext_host_name, - AC_DEFINE(HAVE_SSL_SET_TLSEXT_HOST_NAME)) break fi done @@ -176,6 +173,7 @@ AC_SUBST(SSLLIBS) EXPORT_SSLLIBS="$SSLLIBS" AC_SUBST(EXPORT_SSLLIBS) + dnl -dnl End of "$Id: cups-ssl.m4 10371 2012-03-21 04:45:48Z mike $". +dnl End of "$Id: cups-ssl.m4 9837 2011-06-16 20:12:16Z mike $". dnl -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
