Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Aug 2004 10:08:12 +0200
From:      Jan Srzednicki <w@expro.pl>
To:        Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc:        current@freebsd.org
Subject:   Re: RFC: Alternate patch to have true new-style rc.d scripts in ports (without touching localpkg)
Message-ID:  <20040817080812.GF37212@miranda.expro.pl>
In-Reply-To: <6B9BDB86-EFD9-11D8-924A-00039312D914@fillmore-labs.com>
References:  <20040816155653.GA2405@rogue.acs-et.com> <6B9BDB86-EFD9-11D8-924A-00039312D914@fillmore-labs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 17, 2004 at 01:10:09AM +0200, Oliver Eikemeier wrote:
> Mike Makonnen wrote:
> 
> >I have thought about this considerably, and I think the best solution
> >is to have ports rc.d scripts installed to /etc/rc.d.
> 
> This is what I currently do with slapd, but this approach has multiple 
> problems:
> 
> - it violates the law that packages have to be PREFIX-clean, which has 
> some very unfortunate consequences from a packaging point of view.

Indeed, unfortunately.

> - mergemaster barfs ever time (PR 64476)

That's why my suggestion would be: /etc/rc.d/local/ (or
/etc/rc.d/ports/, or whatever you want to call it). In this way you can
easily separate both directories, and as new-style ports rc-scripts have
to be placed in the new location, there is absolutely no confusion about
them. Old scripts in /usr/local/etc/rc.d would be run with localpkg as
they have been before.

> - you can not be sure that the script is not started before the needed 
> filesystems are available.

And what if I'd like to make a port that is just a script that makes
something in the base system, before mountcritical stuff or whatever?
If a script requires all mounts to be done, it REQUIREs them. If a port
maintainer breaks his script, that'd be his own fault.

The point is, that rcorder(8) would read and sort both directories in
just one step. It doesn't have to enforce any artificial requirements
for the ports directory, it just goes as it should. And
/etc/rc.d/localpkg works as it doas.

It's all a bit code aesthetics, but I think this one is the cleanest.
The only hack that needs to be done is to specify /etc/rc.d/local/ in
bsd.port.mk, so that noone will complain about the broken PREFIX. This
would probably require some new variable, which would add the thing to
the already generated package-list and include it in the port's data
(so, no changes to the portdir/pkg-plist, just a change in making the
real package's filelist).

I hope that wasn't too much bikeshed. ;)

greets,
-- 
Jan 'wrzask' Srzednicki
w@expro.pl



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