ports/155218: [PATCH] print/cups-base: fix handling of pam.d/cups
Martin Matuska
mm at FreeBSD.org
Thu Mar 3 00:00:24 UTC 2011
>Number: 155218
>Category: ports
>Synopsis: [PATCH] print/cups-base: fix handling of pam.d/cups
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 03 00:00:21 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Martin Matuska
>Release: FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.2-STABLE FreeBSD 8.2-STABLE #0 r219122M: Wed Mar 2 00:08:08
>Description:
${PREFIX}/etc/pam.d/cups is a user config and should not be deleted if
user-modified or overwritten by a new installation.
See security/sudo as an example.
Added file(s):
- files/patch-conf-Makefile
Port maintainer (dinoex at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- cups-base-1.4.6_2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/print/cups-base/Makefile,v
retrieving revision 1.153
diff -u -r1.153 Makefile
--- Makefile 20 Feb 2011 21:49:23 -0000 1.153
+++ Makefile 2 Mar 2011 23:45:49 -0000
@@ -362,6 +362,12 @@
${INSTALL_DATA} ${WRKSRC}/conf/${f} ${CUPS_ETCDIR}/${f}.N
cd ${CUPS_ETCDIR}/; if test ! -f ${f}; then ${CP} -p ${f}.N ${f}; fi
.endfor
+.if defined(WITH_PAM)
+ @if [ ! -f ${PREFIX}/etc/pam.d/cups ]; then \
+ ${CP} -p ${PREFIX}/etc/pam.d/cups.default \
+ ${PREFIX}/etc/pam.d/cups ; \
+ fi
+.endif
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/ulpt-cupsd.conf ${EXAMPLESDIR}/
${INSTALL_SCRIPT} ${WRKDIR}/ulpt-cupsd.sh ${PREFIX}/sbin/
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/print/cups-base/pkg-plist,v
retrieving revision 1.60
diff -u -r1.60 pkg-plist
--- pkg-plist 20 Feb 2011 21:49:23 -0000 1.60
+++ pkg-plist 2 Mar 2011 23:45:49 -0000
@@ -38,7 +38,9 @@
etc/cups/snmp.conf.N
@exec if test ! -f %D/etc/cups/snmp.conf; then cp -p %D/etc/cups/snmp.conf.N %D/etc/cups/snmp.conf; fi
@exec chgrp cups %D/etc/cups
-%%WITH_PAMD%%etc/pam.d/cups
+ at unexec if cmp -s %D/etc/pam.d/cups.default %D/etc/pam.d/cups; then rm -f %D/etc/pam.d/cups ; fi
+%%WITH_PAMD%%etc/pam.d/cups.default
+ at exec if [ ! -f %D/etc/pam.d/cups ] ; then cp -p %D/%F %B/cups; fi
bin/cancel
bin/cupstestdsc
bin/cupstestppd
Index: files/patch-conf-Makefile
===================================================================
RCS file: files/patch-conf-Makefile
diff -N files/patch-conf-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-conf-Makefile 2 Mar 2011 23:45:49 -0000
@@ -0,0 +1,16 @@
+--- conf/Makefile.orig 2011-03-03 00:19:41.555484014 +0100
++++ conf/Makefile 2011-03-03 00:20:17.791387420 +0100
+@@ -90,10 +90,10 @@
+ done
+ -if test x$(PAMDIR) != x; then \
+ $(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
+- if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
+- $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
++ if test -r $(BUILDROOT)$(PAMDIR)/cups.default ; then \
++ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.default.N ; \
+ else \
+- $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
++ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.default ; \
+ fi ; \
+ fi
+
--- cups-base-1.4.6_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list