From owner-freebsd-ports-bugs@FreeBSD.ORG Sat May 7 16:50:02 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2427106566C for ; Sat, 7 May 2011 16:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0BB8FC16 for ; Sat, 7 May 2011 16:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p47Go2ZU007942 for ; Sat, 7 May 2011 16:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p47Go2bL007941; Sat, 7 May 2011 16:50:02 GMT (envelope-from gnats) Resent-Date: Sat, 7 May 2011 16:50:02 GMT Resent-Message-Id: <201105071650.p47Go2bL007941@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Deiter Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C5B1065672 for ; Sat, 7 May 2011 16:48:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id EE7898FC17 for ; Sat, 7 May 2011 16:48:12 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p47GmCia026555 for ; Sat, 7 May 2011 16:48:12 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p47GmCUE026554; Sat, 7 May 2011 16:48:12 GMT (envelope-from nobody) Message-Id: <201105071648.p47GmCUE026554@red.freebsd.org> Date: Sat, 7 May 2011 16:48:12 GMT From: Alex Deiter To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/156866: [PATCH] change cachedir location/permission for print/cups-base X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 16:50:02 -0000 >Number: 156866 >Category: ports >Synopsis: [PATCH] change cachedir location/permission for print/cups-base >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 07 16:50:02 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Alex Deiter >Release: 9.0-CURRENT-r221271 >Organization: Fine Solution >Environment: FreeBSD blackbox.deiter.ru 9.0-CURRENT-r221271 FreeBSD 9.0-CURRENT-r221271 #0: Sun May 1 11:01:45 MSD 2011 root@blackbox.deiter.net.ru:/usr/obj/usr/src/sys/BLACKBOX i386 >Description: 1. Change default location for Cups cachedir from /var/cache/cups to /var/db/cups according to man 7 hier: /var/ multi-purpose log, temporary, transient, and spool files db/ miscellaneous automatically generated system-spe‐ cific database files 2. Change permission for Cups cachedir from 755 to 775: Cups original cups-1.4.6/scheduler/Makefile used 775 permission for cups CACHEDIR: echo Creating $(CACHEDIR)... $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR) with 755 permission we have errors in cups errorlog: E [07/May/2011:18:57:55 +0400] [cups-driverd] Unable to write "/var/cache/cups/ppds.dat" - Permission denied Could you please review attached patch ? >How-To-Repeat: cd /usr/ports/print/cups-base && make install >Fix: cd /usr/ports/print/cups-base && patch -p0 < patch-cups-cachedir.txt && make install Patch attached with submission follows: --- Makefile.orig 2011-05-07 19:28:06.081328256 +0400 +++ Makefile 2011-05-07 20:08:21.721264845 +0400 @@ -37,6 +37,7 @@ --with-icondir=${PREFIX}/share/icons \ --with-menudir=${DESKTOPDIR} \ --with-domainsocket=${CUPS_SOCKET} \ + --with-cachedir=${CUPS_CACHEDIR} \ --with-pam-module="unix" \ --enable-ssl @@ -54,6 +55,7 @@ XDG_OPEN "Build with XDG_OPEN as browser" off CUPS_ETCDIR= ${PREFIX}/etc/cups +CUPS_CACHEDIR?= /var/db/cups CUPS_SPOOLDIR= /var/spool/cups CUPS_SOCKET?= /var/run/cups.sock WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} @@ -107,6 +109,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libcups.a:${PORTSDIR}/${PKGCATEGORY}/cups-client COMMENT2= Server USE_RC_SUBR= cupsd +PLIST_SUB+= CACHEDIR="${CUPS_CACHEDIR}" .if ${ARCH} == "ia64" BROKEN= stack-protector not supported on ia64 .endif @@ -377,8 +380,7 @@ ${INSTALL} -d ${CUPS_SPOOLDIR}/tmp/ ${CHOWN} -R ${CUPSOWN}:${CUPSGRP} ${CUPS_SPOOLDIR}/ ${CHMOD} -R g+w ${CUPS_SPOOLDIR}/ - ${INSTALL} -d /var/cache/cups/ - ${CHOWN} root:${CUPSGRP} /var/cache/cups/ + ${INSTALL} -d -m 775 -g ${CUPSGRP} ${CUPS_CACHEDIR} .endif .if defined(CUPS_CLIENT) --- pkg-plist.orig 2011-05-07 19:42:51.096314756 +0400 +++ pkg-plist 2011-05-07 19:56:40.569382232 +0400 @@ -3,15 +3,15 @@ @unexec if pw usershow cups; then pw userdel cups; fi @exec mkdir -p /var/spool/cups/tmp || true @exec chown -R root:daemon /var/spool/cups -@exec mkdir -p /var/cache/cups || true -@exec chown root:cups /var/cache/cups +@exec mkdir -p %%CACHEDIR%% || true +@exec chown root:cups %%CACHEDIR%% +@exec chmod 775 %%CACHEDIR%% @exec mkdir -p /var/log/cups || true @exec chown cups:daemon /var/log/cups @exec mkdir -p %D/etc/cups/ppd || true @exec mkdir -p %D/etc/cups/interfaces || true @unexec rm -rf /var/spool/cups 2>/dev/null || true -@unexec rm -rf /var/cache/cups 2>/dev/null || true -@unexec rmdir /var/cache 2>/dev/null || true +@unexec rm -rf %%CACHEDIR%% 2>/dev/null || true @unexec rmdir /var/log/cups 2>/dev/null || true @unexec rmdir /var/run/cups/certs 2>/dev/null || true @unexec rmdir /var/run/cups 2>/dev/null || true >Release-Note: >Audit-Trail: >Unformatted: