From owner-freebsd-current@FreeBSD.ORG Sat Aug 6 00:07:57 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 86190106566B; Sat, 6 Aug 2011 00:07:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 12-207-105-211.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 064B3162108; Sat, 6 Aug 2011 00:07:56 +0000 (UTC) Message-ID: <4E3C85DC.8070104@FreeBSD.org> Date: Fri, 05 Aug 2011 17:07:56 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110706 Thunderbird/5.0 MIME-Version: 1.0 To: Ed Schouten References: <201108051733.p75HXCrZ015026@svn.freebsd.org> In-Reply-To: <201108051733.p75HXCrZ015026@svn.freebsd.org> X-Enigmail-Version: 1.2pre OpenPGP: id=1A1ABC84 Content-Type: multipart/mixed; boundary="------------000801010006000804010505" Cc: svn-src-all@freebsd.org, FreeBSD Current , re@FreeBSD.org Subject: Re: svn commit: r224659 - head/etc X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2011 00:07:57 -0000 This is a multi-part message in MIME format. --------------000801010006000804010505 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Ed, First off, thanks for taking a look at this. I've always been uncomfortable with our default nsswitch.conf file because most users do not use nis, and although everything works with our (previous) default it produces errors in the logs that are very non-obvious. That said, I think the approach you have here needs some tweaking. You only posted it to -current yesterday, and I hadn't even gotten past thinking "Ok, that's a good direction to start looking" before it was committed already. :) I know deadlines are tight prior to the release, but I don't think they are _that_ tight. I have 2 suggestions. The first is that if we go this way that we tweak the sed statements to comment out the _compat entries rather than deleting them. This will accomplish the same thing but be slightly less confusing for users who eventually want to implement nis. This can be accomplished like this: -e 's/.*_compat:/# &/' -e 's/compat$/files/' The other issue is that due to the way that mergemaster works by default users who have existing /etc/nsswitch.conf files (which should be pretty close to 100%) won't see this change because it doesn't affect the $FreeBSD$ tag. If we decide to keep things this way then I would suggest adding a comment to that file so that it will get picked up. However, I would much rather see us actually change the default file. Users who are going to enable nis will already know that this file needs to be tweaked, and by using more sensible defaults we'll be more relevant to the majority of our userbase. So I propose the attached (along with reverting your change obviously). hth, Doug On 08/05/2011 10:33, Ed Schouten wrote: > Author: ed > Date: Fri Aug 5 17:33:12 2011 > New Revision: 224659 > URL: http://svn.freebsd.org/changeset/base/224659 > > Log: > Remove NIS entries from /etc/nsswitch.conf for WITHOUT_NIS. > > We already modify various configuration files in /etc based on build > configuration. This is not done for nsswitch.conf right now when setting > WITHOUT_NIS. This breaks various utilities, including crond, that depend > on working databases. > > Approved by: re (kib) > MFC after: 1 month > > Modified: > head/etc/Makefile > > Modified: head/etc/Makefile > ============================================================================== > --- head/etc/Makefile Fri Aug 5 17:15:46 2011 (r224658) > +++ head/etc/Makefile Fri Aug 5 17:33:12 2011 (r224659) > @@ -256,6 +256,10 @@ distribution: > ${DESTDIR}/boot/device.hints > .endif > .endif > +.if ${MK_NIS} == "no" > + sed -i "" -e '/_compat:/d' -e 's/compat/files/' \ > + ${DESTDIR}/etc/nsswitch.conf > +.endif > > distrib-dirs: > mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ > -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ --------------000801010006000804010505 Content-Type: text/plain; name="nsswitch.conf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="nsswitch.conf" # # $FreeBSD: head/etc/nsswitch.conf 158266 2006-05-03 15:14:47Z ume $ # # To enable NIS the commented entries should replace their uncommented # equivalents. See nsswitch.conf(5) for more information. # group: files #group_compat: nis #group: compat passwd: files #passwd_compat: nis #passwd: compat services: files #services_compat: nis #services: compat hosts: files dns networks: files shells: files protocols: files rpc: files --------------000801010006000804010505--