Re: 5.2-BETA and related ports issues

From: Melvyn Sopacua <freebsd-current_at_webteckies.org>
Date: Sun, 30 Nov 2003 17:46:21 +0100
On Sunday 30 November 2003 16:54, Richard Coleman wrote:

> But it doesn't help if you need a port to start earlier than something
> in the base.  This could happen if you've replaced sendmail with
> postfix, and use maps from a remote database (openldap, postgresql,
> etc).  I'm sure there are other examples as well (nss_ldap, etc).

Then you can just as easily nuke the entire mailer.conf principle and symlink 
bin/postfix to etc/rc.d/050.postfix.sh.
Point being: these are customized setups that require skill to get even 
remotely working, so one can assume that the person installing the port can 
read instructions given in pkg-message.

I don't think any ports/package system is capable of correctly setting all 
*runtime* dependencies especially when it allows it's users to change 
configurations after installation without recording the changes back into the 
ports/pkg system.

However - to allow this flexibility, the ports system should try to respect 
the installation prefix.
Nothing prevents a port from entering "If you need ${PORTNAME} to start before 
foo, symlink ${PREFIX}/etc/rc.d/${PORTNAME}.sh to /etc/rc.d/ and make sure 
it's lexically sorted before foo" into pkg-message.

Then the statement in UPDATING can read:
find /etc/rc.d \! -type l -print | xargs rm -vf

and it will always apply.

Perhaps the patch below (or something similar) should be added as well to make 
people aware of the local_startup system.

My 2c.
-- 
Melvyn

--- bsd.port.mk.orig	Sun Nov 30 17:22:22 2003
+++ bsd.port.mk	Sun Nov 30 17:29:21 2003
_at__at_ -766,6 +766,9 _at__at_
 #				  apply here.  It is recommended that you use
 #				  %%PREFIX%% for ${PREFIX}, %%LOCALBASE%% for
 #				  ${LOCALBASE} and %%X11BASE%% for ${X11BASE}.
+# INSTALLS_RCSCRIPT - If set, bsd.port.mk will check if ${LOCALBASE} is equal
+# 	 			  to ${PREFIX} or else suggest that ${PREFIX}/etc/rc.d should
+# 	 			  be added to local_startup in /etc/rc.conf
 # DOCSDIR		- Name of the directory to install the packages docs in
 #				  (default: ${PREFIX}/share/doc/${PORTNAME}).
 # EXAMPLESDIR		- Name of the directory to install the packages examples in
_at__at_ -3127,6 +3130,10 _at__at_
 	_at_${MKHTMLINDEX} ${PREFIX}/lib/X11/doc/html
 .endif
 .endif
+.endif
+.if defined(INSTALLS_RCSCRIPT) && ${LOCALBASE} != ${PREFIX}
+	_at_${ECHO_MSG} "You should verify if ${PREFIX}/etc/rc.d is in local_startup"
+	_at_${ECHO_MSG} "in /etc/rc.conf or /etc/defaults/rc.conf"
 .endif
 .endif
 

Received on Sun Nov 30 2003 - 07:46:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:31 UTC