On Tue, Jul 03, 2007 at 08:25:52PM +0200, Sven Wolf wrote:
> Hi,
>
> I think I've found an error within the cups-pdf port/package. With the
> default installation, on my 2 systems (4.1 and current) there weren't
> any files under /var/spool/cups/${user} created. Within the
> /var/log/cups/error_log I've found, that cups-pdf has to run under root.
> So I've changed the /usr/local/libexec/cups/backend/cups-pdf
> permission as described on the cups-pdf homepage to 0700 for root. Not
> everything runs as expected. If someone can confirm this error, could
> you please fix the port, so that
> /usr/local/libexec/cups/backend/cups-pdf gets the correct permissions?
>
> http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/documentation.shtm
> -> "Starting with version 1.2.0 CUPS implements the "RunAsOption" no
> longer. In order to ensure CUPS-PDF is running with the required root
> privileges you have to make 'root' the owner of the cups-pdf backend and
> set the file permissions of the backend to 0700 (root only)."
I can confirm this.
patch below cleans up the port in general. this port didn't respect
CFLAGS!
added a run-depend on print/ghostscript/gnu, since this thing uses
'gs'.
OK?
--
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org
Index: Makefile
===================================================================
RCS file: /home/cvs/OpenBSD/ports/print/cups-pdf/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile 26 Mar 2007 22:13:03 -0000 1.3
+++ Makefile 3 Jul 2007 21:06:12 -0000
@@ -18,20 +18,24 @@
WANTLIB= c
-RUN_DEPENDS= ::print/cups
+RUN_DEPENDS= ::print/cups \
+ ::print/ghostscript/gnu
+
+NO_REGRESS= Yes
do-build:
- @cc -O2 -o ${WRKDIR}/bin/cups-pdf ${WRKDIR}/${DISTNAME}/src/cups-pdf.c
+ ${CC} ${CFLAGS} -o ${WRKDIR}/bin/cups-pdf
${WRKDIR}/${DISTNAME}/src/cups-pdf.c
do-install:
- mkdir -p ${PREFIX}/libexec/cups/backend
- mkdir -p ${PREFIX}/share/cups/model
- mkdir -p ${PREFIX}/share/examples/cups
- cp ${WRKDIR}/bin/cups-pdf \
+ ${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/cups/backend
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/cups/model
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/cups
+ ${INSTALL_PROGRAM} ${WRKDIR}/bin/cups-pdf \
${PREFIX}/libexec/cups/backend/cups-pdf
- cp ${WRKDIR}/${DISTNAME}/extra/PostscriptColor.ppd \
+ chmod 0700 ${PREFIX}/libexec/cups/backend/cups-pdf
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/extra/PostscriptColor.ppd \
${PREFIX}/share/cups/model/PostscriptColor.ppd
- cp ${WRKDIR}/${DISTNAME}/extra/cups-pdf.conf \
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/extra/cups-pdf.conf \
${PREFIX}/share/examples/cups/
.include <bsd.port.mk>
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/OpenBSD/ports/print/cups-pdf/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- pkg/PLIST 3 Oct 2006 14:21:42 -0000 1.1.1.1
+++ pkg/PLIST 3 Jul 2007 21:06:12 -0000
@@ -1,5 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/10/03 14:21:42 mbalmer Exp $
[EMAIL PROTECTED] 0700
libexec/cups/backend/cups-pdf
[EMAIL PROTECTED]
share/cups/model/PostscriptColor.ppd
share/examples/cups/cups-pdf.conf
@sample ${SYSCONFDIR}/cups/cups-pdf.conf