From owner-freebsd-ports@FreeBSD.ORG Sun Aug 12 05:28:02 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17F0616A419 for ; Sun, 12 Aug 2007 05:28:02 +0000 (UTC) (envelope-from rakheshster@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.191]) by mx1.freebsd.org (Postfix) with ESMTP id 9219213C458 for ; Sun, 12 Aug 2007 05:28:01 +0000 (UTC) (envelope-from rakheshster@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so1287828mue for ; Sat, 11 Aug 2007 22:28:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:date:x-x-sender:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type:from:sender; b=spDC7fcey9WCP7/6QG310K47mnr3mIcmTQhc8IYDVDdt5HJ2UzeZ/7EdzZMYthT8jxsx+ILlgTmDUIpsTdD2lD7JB+9FxQIuAZ+UBhYdW4ukVjoZI8uUj+ypBEnP3rysSPDdsk0aFUOD7KY0Md/5D1R6XLuYuwosF9KUVBfrz6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:x-x-sender:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type:from:sender; b=mEYW1g3SQDdkdjPTfuBzKhP2TKm99MWN+QYk7khXVVE07CRRq5VwSd7BkU/gHIM29mzp+sHvCx47GgbJiXtkqntvWUjr0dVg39PgdOkCFWBwO9ig289oca6y188uVcscjwcWBDJWFKS6t9MSIMRryOXOzb6OLS7LjZT6ABU0fpg= Received: by 10.78.165.16 with SMTP id n16mr1783723hue.1186896479503; Sat, 11 Aug 2007 22:27:59 -0700 (PDT) Received: from smtp.home.rakhesh.com ( [82.178.137.21]) by mx.google.com with ESMTPS id p27sm1461829hub.2007.08.11.22.27.56 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Aug 2007 22:27:58 -0700 (PDT) Received: from obelix.home.rakhesh.com (obelix.home.rakhesh.com [192.168.17.13]) by smtp.home.rakhesh.com (Postfix) with ESMTP id 2BAFE5080A; Sun, 12 Aug 2007 09:27:26 +0400 (GST) Date: Sun, 12 Aug 2007 09:27:26 +0400 (GST) X-X-Sender: rakhesh@obelix.home.rakhesh.com To: Jeremy Chadwick In-Reply-To: <20070811203322.GA78245@eos.sc1.parodius.com> Message-ID: <20070812091319.I34444@obelix.home.rakhesh.com> References: <20070811115642.L34115@obelix.home.rakhesh.com> <20070811083357.GA34007@eos.sc1.parodius.com> <20070811145314.A47727@obelix.home.rakhesh.com> <20070811203322.GA78245@eos.sc1.parodius.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed From: Rakhesh Sasidharan Sender: Rakhesh Sasidharan Cc: freebsd-ports@freebsd.org Subject: Re: How did upgrading applications happen before portupgrade etc? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2007 05:28:02 -0000 Jeremy Chadwick wrote: > On Sat, Aug 11, 2007 at 03:02:53PM +0400, Rakhesh Sasidharan wrote: >>> 5. pkg_delete port >> >> I see. In step 5, "pkg_delete port" wont work if port is required by others >> right? So you delete those apps too? Could be a lot of stuff to uninstall, >> right? > > Absolutely correct. That might seem like a nightmare to most people, > but to me it's not. I suppose this is also why I avoid ports that have > too many dependencies (mail/p5-Mail-SpamAssassin, for example, is > starting to make me consider using dspam instead). It did to me. But yeah, if you limit yourself to ports without too many dependencies, then its fine. And also, if you are doing this only once in a while, it limits downtime too. Makes sense. >>> Note that we keep all of our configuration files in a directory called >>> /conf/ME and in /usr/local simply use symlinks. (Matt Dillon might be >>> grinning over /conf/ME, since it's a Best Internet-ism :) ). I don't >>> trust that all ports will "play nice" with existing configuration files >>> in /usr/local, and I have seen much evidence of this in the past (nuking >>> files without your knowledge, mainly. "Oh crap! It nuked our entire >>> configuration for the apache/mail/whatever server!!!"). >> >> That's a smashing idea! Thanks for mentioning that here. :-) >> >> What does the "ME" stand for in /conf/ME btw? > > "ME" stands for me, e.g. "myself". I guess it'd help if I explained how > it worked: > > The /conf directory on all machines contained the configuration files > for itself as well as every other machine on the network. So for > shell01.whatever.com you'd find this in /conf: > > /conf/ME --> /conf/shell01.whatever.com > /conf/mail01.whatever.com/ > /conf/shell01.whatever.com/ > /conf/shell02.whatever.com/ > /conf/sql01.whatever.com/ > /conf/test.whatever.com/ > > Each directory contained configuration files specific to that system. Wicked! I just take backups of the /etc and /usr/local/etc of each machine onto every other machine but the method above is even better. Esp in light of what you mention later on ... > During system install, either done automatically or manually (I forget), > the /conf directory on a machine is populated, and the ME symlink is > made. Then the script would populate /usr/local with symlinks, and I > believe also did a mkdir -p on directories. For example, if /conf/ME > contained: > > etc/Muttrc > etc/apache22/httpd.conf > etc/mail/spamassassin/local.cf > etc/pine.conf > etc/sudoers > > You'd find this in /usr/local: > > etc/Muttrc --> /conf/ME/etc/Muttrc > etc/apache22/httpd.conf --> /conf/ME/etc/apache22/httpd.conf > etc/mail/spamassassin/local.cf --> /conf/ME/etc/mail/spamassassin/local.cf > etc/pine.conf --> /conf/ME/etc/pine.conf > etc/sudoers --> /conf/ME/etc/sudoers Dodo question maybe: but instead of symlinking specific files, why not just symlink /usr/local/etc to something like /conf/ME/etc? The way you described it, would you also have to keep track of new config files, move them over to /conf/ME/etc, and then symlink from /usr/local/etc? If you symlink the whole directory, you save that hassle right? Plus, later on, when you want the machine to switch roles, its just a matter of changing the directory symlink rather than of each file ... > I believe the reason each machine had a copy of all the other machines' > configs was in case one got munged on the repository server (or if you > needed to "roll back" and didn't make a backup of your changes, oops), > and/or if you wanted to change the "role" of a machine on the fly. > > All of the packages/ports installed on all the machines were 100% > identical; that is, every machine, regardless of role, had the same > packages/ports installed. A very interesting tip btw. So you essentially have all the machines ready to switch roles at the change of a symlink. Neat! This idea was by Matt Dillon eh? :-) You have any scripts etc to keep this running? Would be nice if you could drop a copy so I can poke around ... Thanks, Rakhesh