Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Dec 2004 12:27:38 -0200
From:      =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= <jonny@jonny.eng.br>
To:        Jeremie Le Hen <jeremie@le-hen.org>
Cc:        freebsd-hubs@FreeBSD.org
Subject:   Re: cvsup-mirror rewrite
Message-ID:  <41B860DA.5080309@jonny.eng.br>
In-Reply-To: <20041208224605.GU79919@obiwan.tataz.chchile.org>
References:  <20041207231019.GL79919@obiwan.tataz.chchile.org> <XFMail.20041207193827.jdp@polstra.com> <20041208082000.GP79919@obiwan.tataz.chchile.org> <41B730B5.5040100@jonny.eng.br> <20041208224605.GU79919@obiwan.tataz.chchile.org>

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


Jeremie Le Hen wrote:
> First, thanks replying and sharing your opinion.
> 
> 
>>>>>  o I would also like to move etc/cvsup/update.sh to something like
>>>>>    /usr/local/libexec/cvsup-mirror.sh, following the example of the
>>>>>    atrun command executed from cron(8) [1].
>>
>>I'd expect more work on customizing update.sh to allow it's 
>>configuration to come from /etc/rc.conf or some other place not touched 
>>during upgrades.  As jdp stated, an upgrade is not easy right now.
> 
> 
> Yes, this is indeed a great goal.  The configuration variables would
> roughly use the config.sh ones and a another one which specifies where
> "bookkeeping files" are stored (which is /var/db for the base system).

     That's not true for every port.  Let take squid, for example.  It 
creates a ${PREFIX}/squid directory, under which it puts cache and log 
files.  Also, arpwatch uses ${PREFIX}/arpwatch to store constant and 
varying databases.  PostgreSQL is another example, which uses 
${PREFIX}/pgsql as home dir to the user pgsql, and under which it stores 
all config and database files.  Last but not least, every version of 
java I've used in FreeBSD creates a complete hierarchy under its own 
directory below ${PREFIX}/foo.

     I do agree that it breaks hier(7), but some packages are just to 
complex or tight to spread over lots of directories.  In my own servers, 
for example, I simply don't use the default squid port because of this 
spreading.  I personally prefer the original squid layout, with 
/usr/local/squid/{bin,sbin,lib,cache,log,etc.}.  It makes easier for me 
to find what I need quickier.

> I understand your point of view but there is no var/ directory under
> ${DESTDIR}.  It's also worth noting that usually logs from Apache or
> Postfix - which are installed from ports - are stored in /var/log and
> not in ${DESTDIR}/var/log.

     Well, postfix is a full replacement for a "system package" 
(sendmail), so it's reasonable to make its changes transparent, just 
like those that have been made recently with perl, until it has been 
taken off the base system.  I even would agree to completely remove 
sendmail and use a "slot" structure for mail ports.

     Also Apache is fully configurable in this aspect, and my hosts have 
NEVER written logs to /var/log.  I use a subdirectory for each virtual 
host, each one with its individual data and log directories.  And this 
is what most provider do, since they have to allow access for different 
users for each virtual host.

     The defaults for apache are just that: defaults.  But I don't know 
a single realworld server running on defaul.

 >   Furthermore, I can't think of any directory
> under ${DESTDIR} which would achieve the same purposes as /var/db.
> IMHO ${DESTDIR}/etc/cvsup is definitely not an option, according to
> hier(7).
> 
> However, I would be glad to adopt any proposition which succeeds in
> merging benefits of both solutions without the drawbacks :-).

     ${PREFIX}/cvsup-mirror

     ;-)

     I would put no file related to cvsup-mirror outside this directory, 
except maybe the config rules in /etc/rc.conf and rc_subr startup 
routines if any (I don't think so).

     Even the crontab files should not be touched by the port.  The best 
way is to teach the user what to do, and let him chose which parameters 
to put there.  For example, some places may want to sync just once a 
day, at night.  Others may want to sync every hour or so.  And even 
others may want to do a quick sync (cvsup -s) every hour and a full sync 
once a day.

>>With this and above changes a upgrade would be simply a matter of 
>>changing the scripts and keeping the site config files.
> 
> I'm wondering if it's better to keep backward compatibility and thus
> avoid all changes concerning the files storage location discussed above,
> or simply to fork cvs-mirror (and call it "cvsup-hubs" for example) to
> be able to be more hier(7) compliant.  It seems indeed that changing
> files location in cvsup-mirror is not an option since there would be no
> way to do a proper upgrade.  

     Indeed, upgrade is already a PITA.  I'd vote for a last big change 
in cvsup-mirror to make futures upgrades easier, even if it completely 
breaks the current install format.

     cvsup-mirror is a good name, there's no need to change it, IMHO. 
But it's functionality is definitly not good.

     Please, feel free to contact me in private to discuss more ideas 
and/or beta testing when you start coding.

     Cheers,

		Jonny



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