[RFC/P] Port System Re-Engineering

Tom McLaughlin tmclaugh at sdf.lonestar.org
Mon Dec 3 16:49:36 PST 2007


On Mon, 2007-12-03 at 10:41 -0800, Brian wrote:
> Here is a simple example of where improvement would be good.
> 
> I add a package the easiest way I know on a slow system.
> 
> mybox# pkg_add -r dnetc
> Fetching 
> ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/dnetc.tbz... 
> Done.
> => Added group "dnetc".
> => Added user "dnetc".
> 
> ***************************************************************************
> 
> Note: dnetc has been installed with a sample configuration.
> 
> To change this run:
> 
>      /usr/local/distributed.net/dnetc -config
> 
> ***************************************************************************
> 
> So now, if I follow the instructions, I still dont have a running program. 
> I haven't been told I need dnetc_enable="YES" in /etc/rc.conf, and the one 
> I should run to start it is in /usr/local/etc/etc/rc.d, I would never 
> infer that from the above if I were a novice user.  Additionally, pkg_add 
> -r will often also give an out of date package.
> 
> Brian

It's typically considered "bad form" for a port, especially one for a
network service, to automatically enable itself.  That is my job as the
box admin.  As for the rc.d issues that's explained in handbook.  In the
ports ports section under "Post-installation Activities" it reads:

"Ports that should start at boot (such as Internet servers) will usually
install a sample script in /usr/local/etc/rc.d. You should review this
script for correctness and edit or rename it if needed. See Starting
Services for more information."

Under "Starting Services" there is a section which I think gives enough
of an overview of rcNG to point a user to the fact that they need to
check the rc.d script for the appropriate rc.conf variable to add.  Many
rcNG scripts also have a very handy comment such as the following:

# Add the following line to /etc/rc.conf to enable `foo':
#
#foo_enable="YES"

I don't think all this needs to be reiterated every time a port with an
rcNG script is installed since it's been explained in our user
documentation.

As for the pkg-message problem that does suck.  One thing OpenBSD's
pkg_add (which doubles as their package upgrade utility) does is display
all pkg-message info at the end of a run and I find is rather nice.  I
don't do C or ruby so anyone interested can feel free to implement that
if they care.

tom

-- 
| tmclaugh at sdf.lonestar.org                 tmclaugh at FreeBSD.org |
| FreeBSD                                       http://www.FreeBSD.org |



More information about the freebsd-ports mailing list