ports/125330: print/cups-base update fails when nscd running

Dorian Büttner dorian.buettner at gmx.de
Sun Jul 6 08:10:03 UTC 2008


>Number:         125330
>Category:       ports
>Synopsis:       print/cups-base update fails when nscd running
>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:   Sun Jul 06 08:10:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Dorian Büttner
>Release:        RELENG_7
>Organization:
>Environment:
doesn't matter
>Description:
When using nscd as lookup service, during deinstallation of port the cups-user and group get properly removed from the backend.
However, during reinstall, they get reported still valid from the nscd-cache, therefore breaking the cups-user creation part in the Makefile.
>How-To-Repeat:
Have nss make use of nscd, oviously

cd /usr/ports/devel/cups-base
make deinstall reinstall (clean)
>Fix:
expire the cache before asking for user id

Patch attached with submission follows:

--- /usr/ports/print/cups-base/Makefile.orig	2008-07-05 11:31:27.000000000 +0200
+++ /usr/ports/print/cups-base/Makefile	2008-07-06 09:50:13.000000000 +0200
@@ -203,6 +203,8 @@
 
 pre-su-install:
 	@${INSTALL} -d ${DESKTOPDIR}/
+#expire nscd cache if running, it prevents user cups from being recreated during upgrade
+	if test -e /var/run/nscd.pid; then /usr/sbin/nscd -i passwd; /usr/sbin/nscd -i group; fi
 	if ! pw groupshow ${CUPSGRP}; then pw groupadd ${CUPSGRP} -g 193; fi
 	if ! pw usershow ${CUPSOWN}; then pw useradd ${CUPSOWN} -g ${CUPSGRP} -u 193 \
 		-h - -d ${NONEXISTENT} -s /usr/sbin/nologin -c "CUPS Owner"; fi


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list