svn commit: r372260 - in head/print/cups-base: . files

Tijl Coosemans tijl at FreeBSD.org
Fri Nov 7 13:03:11 UTC 2014


Author: tijl
Date: Fri Nov  7 13:03:09 2014
New Revision: 372260
URL: https://svnweb.freebsd.org/changeset/ports/372260
QAT: https://qat.redports.org/buildarchive/r372260/

Log:
  - Let the rc script require the mdnsd or avahi_daemon rc scripts [1]
  - Fix two getsockopt calls so they return peer credentials correctly [2]
  
  PR:		194856 [1], 191515 [2]
  Submitted by:	Adrian Waters <draenan at gmail.com> [1]
  Submitted by:	Bengt Ahlgren <bengta at sics.se> [2]

Added:
  head/print/cups-base/files/patch-scheduler__auth.c   (contents, props changed)
Modified:
  head/print/cups-base/Makefile
  head/print/cups-base/files/cupsd.in

Modified: head/print/cups-base/Makefile
==============================================================================
--- head/print/cups-base/Makefile	Fri Nov  7 12:52:21 2014	(r372259)
+++ head/print/cups-base/Makefile	Fri Nov  7 13:03:09 2014	(r372260)
@@ -67,7 +67,7 @@ OPTIONS_SINGLE_SSL=	GNUTLS OPENSSL
 OPTIONS_DEFAULT=	OPENSSL
 OPTIONS_SUB=		yes
 .else
-PORTREVISION=	1
+PORTREVISION=	2
 CUPS_SUFFIX=	-base
 # No DOCS option.  Files are needed by web interface.
 OPTIONS_DEFINE=		DBUS ICONS LIBPAPER LIBUSB PAM XDG_OPEN
@@ -175,12 +175,15 @@ LIB_DEPENDS+=		libpaper.so:${PORTSDIR}/p
 LIB_DEPENDS+=		libdns_sd.so:${PORTSDIR}/net/mDNSResponder
 CONFIGURE_ARGS+=	--with-dnssd-includes=${LOCALBASE}/include
 CONFIGURE_ARGS+=	--disable-avahi
+SUB_LIST+=		ZEROCONF="mdnsd"
 .elif !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && ${PORT_OPTIONS:MAVAHI}
 CONFIGURE_ARGS+=	--enable-avahi
 LIB_DEPENDS+=		libavahi-client.so:${PORTSDIR}/net/avahi-app
+SUB_LIST+=		ZEROCONF="avahi_daemon"
 .else
 CONFIGURE_ARGS+=	--disable-dnssd
 CONFIGURE_ARGS+=	--disable-avahi
+SUB_LIST+=		ZEROCONF=""
 .endif
 
 .if !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && ${PORT_OPTIONS:MPAM}

Modified: head/print/cups-base/files/cupsd.in
==============================================================================
--- head/print/cups-base/files/cupsd.in	Fri Nov  7 12:52:21 2014	(r372259)
+++ head/print/cups-base/files/cupsd.in	Fri Nov  7 13:03:09 2014	(r372260)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 # PROVIDE: cupsd
-# REQUIRE: DAEMON
+# REQUIRE: DAEMON %%ZEROCONF%%
 # KEYWORD: shutdown
 #
 # Add the following to /etc/rc.conf[.local] to enable this service

Added: head/print/cups-base/files/patch-scheduler__auth.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/print/cups-base/files/patch-scheduler__auth.c	Fri Nov  7 13:03:09 2014	(r372260)
@@ -0,0 +1,20 @@
+--- scheduler/auth.c.orig
++++ scheduler/auth.c
+@@ -556,7 +556,7 @@
+ 
+     peersize = sizeof(peercred);
+ 
+-#  ifdef __APPLE__
++#  if defined(__APPLE__) || defined(__FreeBSD__)
+     if (getsockopt(con->http.fd, 0, LOCAL_PEERCRED, &peercred, &peersize))
+ #  else
+     if (getsockopt(con->http.fd, SOL_SOCKET, SO_PEERCRED, &peercred, &peersize))
+@@ -1155,7 +1155,7 @@
+ 
+       peersize = sizeof(peercred);
+ 
+-#    ifdef __APPLE__
++#    if defined(__APPLE__) || defined(__FreeBSD__)
+       if (getsockopt(con->http.fd, 0, LOCAL_PEERCRED, &peercred, &peersize))
+ #    else
+       if (getsockopt(con->http.fd, SOL_SOCKET, SO_PEERCRED, &peercred,


More information about the svn-ports-all mailing list