From d905e85d5f85117c6a68100cb15cac966d7c4076 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 10:51:55 +0000 Subject: import cups-1.6.3-40.el7 --- diff --git a/SOURCES/0001-Fix-stuck-multi-file-jobs-Issue-5359-Issue-5413.patch b/SOURCES/0001-Fix-stuck-multi-file-jobs-Issue-5359-Issue-5413.patch new file mode 100644 index 0000000..8c149c8 --- /dev/null +++ b/SOURCES/0001-Fix-stuck-multi-file-jobs-Issue-5359-Issue-5413.patch @@ -0,0 +1,54 @@ +diff -up cups-1.6.3/backend/socket.c.multifile-stuck cups-1.6.3/backend/socket.c +--- cups-1.6.3/backend/socket.c.multifile-stuck 2018-12-14 13:18:17.714146640 +0100 ++++ cups-1.6.3/backend/socket.c 2018-12-14 13:20:15.781155072 +0100 +@@ -430,8 +430,10 @@ main(int argc, /* I - Number of comm + lseek(print_fd, 0, SEEK_SET); + } + +- tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addrlist->addr), 1, +- 0, backendNetworkSideCB); ++ if ((bytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addrlist->addr), 1, 0, backendNetworkSideCB)) < 0) ++ tbytes = -1; ++ else ++ tbytes = bytes; + + if (print_fd != 0 && tbytes >= 0) + _cupsLangPrintFilter(stderr, "INFO", _("Print file sent.")); +@@ -448,7 +450,7 @@ main(int argc, /* I - Number of comm + break; + #endif /* __APPLE__ */ + +- if (waiteof) ++ if (waiteof && tbytes >= 0) + { + /* + * Shutdown the socket and wait for the other end to finish... +@@ -485,7 +487,7 @@ main(int argc, /* I - Number of comm + if (print_fd != 0) + close(print_fd); + +- return (CUPS_BACKEND_OK); ++ return (tbytes >= 0 ? CUPS_BACKEND_OK : CUPS_BACKEND_FAILED); + } + + +diff -up cups-1.6.3/scheduler/main.c.multifile-stuck cups-1.6.3/scheduler/main.c +--- cups-1.6.3/scheduler/main.c.multifile-stuck 2018-12-14 13:18:17.707146699 +0100 ++++ cups-1.6.3/scheduler/main.c 2018-12-14 13:18:17.726146539 +0100 +@@ -1855,9 +1855,16 @@ process_children(void) + (!job->filters[i] && WIFEXITED(old_status))) + { /* Backend and filter didn't crash */ + if (job->filters[i]) ++ { + job->status = status; /* Filter failed */ ++ } + else ++ { + job->status = -status; /* Backend failed */ ++ ++ if (job->current_file < job->num_files) ++ cupsdSetJobState(job, IPP_JOB_ABORTED, CUPSD_JOB_FORCE, "Canceling multi-file job due to backend failure."); ++ } + } + + if (job->state_value == IPP_JOB_PROCESSING && diff --git a/SOURCES/0001-The-scheduler-now-uses-the-getgrouplist-function-whe.patch b/SOURCES/0001-The-scheduler-now-uses-the-getgrouplist-function-whe.patch new file mode 100644 index 0000000..24431a2 --- /dev/null +++ b/SOURCES/0001-The-scheduler-now-uses-the-getgrouplist-function-whe.patch @@ -0,0 +1,111 @@ +diff -up cups-1.6.3/config.h.in.getgrouplist cups-1.6.3/config.h.in +--- cups-1.6.3/config.h.in.getgrouplist 2019-02-06 17:51:23.338680247 +0100 ++++ cups-1.6.3/config.h.in 2019-02-06 17:51:23.388679840 +0100 +@@ -550,6 +550,13 @@ + + + /* ++ * Do we have the getgrouplist() function? ++ */ ++ ++#undef HAVE_GETGROUPLIST ++ ++ ++/* + * Do we have OS X 10.4's mbr_XXX functions? + */ + +diff -up cups-1.6.3/config-scripts/cups-common.m4.getgrouplist cups-1.6.3/config-scripts/cups-common.m4 +--- cups-1.6.3/config-scripts/cups-common.m4.getgrouplist 2019-02-06 17:51:23.387679848 +0100 ++++ cups-1.6.3/config-scripts/cups-common.m4 2019-02-06 17:52:42.256037532 +0100 +@@ -202,6 +202,9 @@ AC_CHECK_FUNCS(sigaction) + dnl Checks for wait functions. + AC_CHECK_FUNCS(waitpid wait3) + ++dnl Check for getgrouplist ++AC_CHECK_FUNCS(getgrouplist) ++ + dnl See if the tm structure has the tm_gmtoff member... + AC_MSG_CHECKING(for tm_gmtoff member in tm structure) + AC_TRY_COMPILE([#include ],[struct tm t; +diff -up cups-1.6.3/configure.getgrouplist cups-1.6.3/configure +--- cups-1.6.3/configure.getgrouplist 2013-07-11 23:13:11.000000000 +0200 ++++ cups-1.6.3/configure 2019-02-06 17:51:23.391679815 +0100 +@@ -5155,6 +5155,18 @@ fi + done + + ++for ac_func in getgrouplist ++do : ++ ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist" ++if test "x$ac_cv_func_getgrouplist" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETGROUPLIST 1 ++_ACEOF ++ ++fi ++done ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff member in tm structure" >&5 + $as_echo_n "checking for tm_gmtoff member in tm structure... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +diff -up cups-1.6.3/scheduler/auth.c.getgrouplist cups-1.6.3/scheduler/auth.c +--- cups-1.6.3/scheduler/auth.c.getgrouplist 2019-02-06 17:51:23.003682975 +0100 ++++ cups-1.6.3/scheduler/auth.c 2019-02-06 17:51:23.391679815 +0100 +@@ -1489,6 +1489,21 @@ cupsdCheckGroup( + * Group exists, check it... + */ + ++#ifdef HAVE_GETGROUPLIST ++ if (user) ++ { ++ int ngroups; /* Number of groups */ ++ gid_t groups[2048]; /* Groups that user belongs to */ ++ ++ ngroups = (int)(sizeof(groups) / sizeof(groups[0])); ++ getgrouplist(username, user->pw_gid, groups, &ngroups); ++ ++ for (i = 0; i < ngroups; i ++) ++ if (group->gr_gid == groups[i]) ++ return (1); ++ } ++#endif /* HAVE_GETGROUPLIST */ ++ + for (i = 0; group->gr_mem[i]; i ++) + if (!_cups_strcasecmp(username, group->gr_mem[i])) + return (1); +diff -up cups-1.6.3/vcnet/config.h.getgrouplist cups-1.6.3/vcnet/config.h +--- cups-1.6.3/vcnet/config.h.getgrouplist 2013-06-07 03:12:52.000000000 +0200 ++++ cups-1.6.3/vcnet/config.h 2019-02-06 17:51:23.392679807 +0100 +@@ -599,6 +599,13 @@ + + + /* ++ * Do we have the getgrouplist() function? ++ */ ++ ++#undef HAVE_GETGROUPLIST ++ ++ ++/* + * Do we have OS X 10.4's mbr_XXX functions? + */ + +diff -up cups-1.6.3/xcode/config.h.getgrouplist cups-1.6.3/xcode/config.h +--- cups-1.6.3/xcode/config.h.getgrouplist 2019-02-06 17:51:23.392679807 +0100 ++++ cups-1.6.3/xcode/config.h 2019-02-06 17:53:54.616448200 +0100 +@@ -536,6 +536,13 @@ + + + /* ++ * Do we have the getgrouplist() function? ++ */ ++ ++#define HAVE_GETGROUPLIST 1 ++ ++ ++/* + * Do we have OS X 10.4's mbr_XXX functions? + */ + diff --git a/SOURCES/cups-dont-send-http-options-field.patch b/SOURCES/cups-dont-send-http-options-field.patch new file mode 100644 index 0000000..7504010 --- /dev/null +++ b/SOURCES/cups-dont-send-http-options-field.patch @@ -0,0 +1,12 @@ +diff --git a/scheduler/client.c b/scheduler/client.c +index 7e77017..7c87cbe 100644 +--- a/scheduler/client.c ++++ b/scheduler/client.c +@@ -1228,7 +1228,6 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ + return; + } + +- httpPrintf(HTTP(con), "Allow: GET, HEAD, OPTIONS, POST, PUT\r\n"); + httpPrintf(HTTP(con), "Content-Length: 0\r\n"); + httpPrintf(HTTP(con), "\r\n"); + diff --git a/SPECS/cups.spec b/SPECS/cups.spec index 5b3d2a2..d6ebbec 100644 --- a/SPECS/cups.spec +++ b/SPECS/cups.spec @@ -11,7 +11,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 1.6.3 -Release: 35%{?dist} +Release: 40%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ @@ -100,6 +100,9 @@ Patch69: cups-1.6.3-overriden-h.patch Patch70: cups-net-backends-etimedout-enotconn.patch Patch71: cups-1.6.3-tlsv12.patch Patch72: cups-1.6.3-page-count.patch +Patch73: 0001-Fix-stuck-multi-file-jobs-Issue-5359-Issue-5413.patch +Patch74: 0001-The-scheduler-now-uses-the-getgrouplist-function-whe.patch +Patch75: cups-dont-send-http-options-field.patch Patch100: cups-lspp.patch @@ -118,6 +121,8 @@ BuildRequires: avahi-devel BuildRequires: systemd, systemd-devel BuildRequires: dbus-devel BuildRequires: automake +# we need c++ compiler for f.e. cups-driverd binary +BuildRequires: gcc-c++ # Make sure we get postscriptdriver tags. BuildRequires: python-cups @@ -383,6 +388,12 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch71 -p1 -b .tlsv12 # CUPS print jobs show incorrect number under the "pages" column (bug #1434153) %patch72 -p1 -b .page-count +# 1622430 - Jobs with multiple files don't complete when backend fails +%patch73 -p1 -b .multifile-stuck +# 1570480 - CUPS cannot authorize users obtained from external identity servers by sssd +%patch74 -p1 -b .getgrouplist +# 1700637 - Stop advertising the HTTP methods that are supported +%patch75 -p1 -b .dont-send-http-options-field sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in @@ -395,10 +406,12 @@ iconv -f MACINTOSH -t UTF-8 "$f"~ > "$f" rm -f "$f"~ aclocal -I config-scripts -autoconf -I config-scripts +autoconf -f -I config-scripts %build export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1" +export CC=gcc +export CXX=g++ # --enable-debug to avoid stripping binaries %configure --with-docdir=%{_datadir}/%{name}/www --enable-debug \ %if %lspp @@ -774,6 +787,22 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Wed Apr 17 2019 Zdenek Dohnal - 1:1.6.3-40 +- 1700637 - Stop advertising the HTTP methods that are supported + +* Mon Feb 18 2019 Zdenek Dohnal - 1:1.6.3-39 +- resolve covscan issue found in fix for 1570480 +- automake sometimes fails to generate correct macros - so force autoconf + +* Wed Feb 06 2019 Zdenek Dohnal - 1:1.6.3-38 +- 1570480 - CUPS cannot authorize users obtained from external identity servers by sssd + +* Thu Jan 03 2019 Zdenek Dohnal - 1:1.6.3-37 +- 1659998 - cups fails to build if clang is installed + +* Fri Dec 14 2018 Zdenek Dohnal - 1:1.6.3-36 +- 1622430 - Jobs with multiple files don't complete when backend fails + * Fri Dec 15 2017 Zdenek Dohnal - 1:1.6.3-35 - 1466497 - Remove weak SSL/TLS ciphers from CUPS - fixing covscan issues