5.2-BETA and related ports issues

Melvyn Sopacua freebsd-current at webteckies.org
Sun Nov 30 08:46:32 PST 2003


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
@@ -766,6 +766,9 @@
 #				  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
@@ -3127,6 +3130,10 @@
 	@${MKHTMLINDEX} ${PREFIX}/lib/X11/doc/html
 .endif
 .endif
+.endif
+.if defined(INSTALLS_RCSCRIPT) && ${LOCALBASE} != ${PREFIX}
+	@${ECHO_MSG} "You should verify if ${PREFIX}/etc/rc.d is in local_startup"
+	@${ECHO_MSG} "in /etc/rc.conf or /etc/defaults/rc.conf"
 .endif
 .endif
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20031130/19ac1930/attachment.bin


More information about the freebsd-current mailing list