Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2008 08:00:52 GMT
From:      Dorian Büttner <dorian.buettner@gmx.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/125330: print/cups-base update fails when nscd running
Message-ID:  <200807060800.m6680qBt043665@www.freebsd.org>
Resent-Message-ID: <200807060810.m668A238061112@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807060800.m6680qBt043665>