Re: [22490] trunk/dports/www/apache2/Portfile
Is this +no_startupitem variant really smart? I recently had a request to add a +without_startupitem variant to a port I maintain and rejected the request; since startupitems simply enable a port to be started at boot time, but do not cause a port to be booted at start time, it simply seems stupid to deliberately cripple a server port such that a user would have to reinstall it if they wanted to start the port at boot time later. BTW: If the variant is to be retained, can it be named +without_startupitem instead? On 2 Mar 2007, at 16:51, source_changes@macosforge.org wrote:
Revision 22490 Author blair@macports.org Date 2007-03-02 13:51:15 -0800 (Fri, 02 Mar 2007) Log MessageAdd a +no_startupitem variant that prevents the automatic startup of the Apache web server.Modified Paths trunk/dports/www/apache2/Portfile Diff Modified: trunk/dports/www/apache2/Portfile (22489 => 22490)--- trunk/dports/www/apache2/Portfile 2007-03-02 20:42:45 UTC (rev 22489) +++ trunk/dports/www/apache2/Portfile 2007-03-02 21:51:15 UTC (rev 22490) @@ -105,6 +105,10 @@ configure.args-append --with- mpm=event } +variant no_startupitem { + startupitem.create no +} + startupitem.create yes startupitem.start \ "\[ -x ${prefix}/apache2/ bin/apachectl \] && ${prefix}/apache2/bin/apachectl start > /dev/ null" @@ -112,4 +116,3 @@ "\[ -r ${prefix}/apache2/logs/httpd.pid \] && ${prefix}/apache2/bin/apachectl stop > /dev/null" startupitem.restart \ "\[ -r ${prefix}/apache2/logs/httpd.pid \] && ${prefix}/apache2/bin/apachectl restart > /dev/null" - _______________________________________________ macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
Randall Wood rhwood@mac.com "The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
On 03.03.2007, at 10:48, Randall Wood wrote:
Is this +no_startupitem variant really smart?
I recently had a request to add a +without_startupitem variant to a port I maintain and rejected the request; since startupitems simply enable a port to be started at boot time, but do not cause a port to be booted at start time, it simply seems stupid to deliberately cripple a server port such that a user would have to reinstall it if they wanted to start the port at boot time later.
BTW: If the variant is to be retained, can it be named +without_startupitem instead?
The best way out of this would be to perform some port magic (that needs to be developed first...); this would be something along the idea Landon proposed for the Python ports (py-/py24-/py25-): We need a "common code" file that gets included by multiple Portfiles. The best thing imho would be, if we enable ports not to be recognized by the name "Portfile" but by a suffix - this way multiple Portfiles can live in one directory - e. g. apache2. Then we can create a common file with e. g. version, distfiles, etc. and two Portfiles "apache2" and "apache2-server". Those would both include the common file with e. g. the description, version number, dependencies, etc. but would consist of the "base apache2 installation" and the "startup-foo" respectively. cheers, -Markus PS: Oh and yes: As long as we don't have a clean solution like this, I'd say: Nuke the whatever_startupitem variant and create a "-server" Port - this way everybody can get happy.
On 2 Mar 2007, at 16:51, source_changes@macosforge.org wrote:
Revision 22490 Author blair@macports.org Date 2007-03-02 13:51:15 -0800 (Fri, 02 Mar 2007) Log MessageAdd a +no_startupitem variant that prevents the automatic startup of the Apache web server.Modified Paths trunk/dports/www/apache2/Portfile Diff Modified: trunk/dports/www/apache2/Portfile (22489 => 22490)--- trunk/dports/www/apache2/Portfile 2007-03-02 20:42:45 UTC (rev 22489) +++ trunk/dports/www/apache2/Portfile 2007-03-02 21:51:15 UTC (rev 22490) @@ -105,6 +105,10 @@ configure.args-append --with- mpm=event } +variant no_startupitem { + startupitem.create no +} + startupitem.create yes startupitem.start \ "\[ -x ${prefix}/ apache2/bin/apachectl \] && ${prefix}/apache2/bin/apachectl start
/dev/null" @@ -112,4 +116,3 @@ "\[ -r ${prefix}/apache2/logs/ httpd.pid \] && ${prefix}/apache2/bin/apachectl stop > /dev/null" startupitem.restart \ "\[ -r ${prefix}/apache2/logs/httpd.pid \] && ${prefix}/apache2/bin/apachectl restart > /dev/null" -
macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
Randall Wood rhwood@mac.com
"The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
_______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-dev
--- Markus W. Weissmann http://www.mweissmann.de/ http://www.macports.org/
On Mar 3, 2007, at 1:48 AM, Randall Wood wrote:
Is this +no_startupitem variant really smart?
I recently had a request to add a +without_startupitem variant to a port I maintain and rejected the request; since startupitems simply enable a port to be started at boot time, but do not cause a port to be booted at start time, it simply seems stupid to deliberately cripple a server port such that a user would have to reinstall it if they wanted to start the port at boot time later.
BTW: If the variant is to be retained, can it be named +without_startupitem instead?
Unless I'm missing something, I see no reason whatsoever for the no_startupitem variant, or anything like it. Using the startup item strategy, we have two cases, systemstarter (pre tiger) and launchd (tiger++): SystemStarter: The code generated by port for system starter automatically looks for an enable flag from /etc/hostconfig, and this is -NO- by default. So by default the port won't be run. Launchd: Likewise, the launchd.plist file generated for a port is not enabled by default, so by default the server won't be run. The only reason I see for having a +server variant in some cases is if building the server is way too onerous (like perhaps in the case of mysql where somebody just wants to build the client but not the server). Still this is debatable. Okay, so what possible rationale did I miss? James
On 2 Mar 2007, at 16:51, source_changes@macosforge.org wrote:
Revision 22490 Author blair@macports.org Date 2007-03-02 13:51:15 -0800 (Fri, 02 Mar 2007) Log MessageAdd a +no_startupitem variant that prevents the automatic startup of the Apache web server.Modified Paths trunk/dports/www/apache2/Portfile Diff Modified: trunk/dports/www/apache2/Portfile (22489 => 22490)--- trunk/dports/www/apache2/Portfile 2007-03-02 20:42:45 UTC (rev 22489) +++ trunk/dports/www/apache2/Portfile 2007-03-02 21:51:15 UTC (rev 22490) @@ -105,6 +105,10 @@ configure.args-append --with- mpm=event } +variant no_startupitem { + startupitem.create no +} + startupitem.create yes startupitem.start \ "\[ -x ${prefix}/ apache2/bin/apachectl \] && ${prefix}/apache2/bin/apachectl start
/dev/null" @@ -112,4 +116,3 @@ "\[ -r ${prefix}/apache2/logs/ httpd.pid \] && ${prefix}/apache2/bin/apachectl stop > /dev/null" startupitem.restart \ "\[ -r ${prefix}/apache2/logs/httpd.pid \] && ${prefix}/apache2/bin/apachectl restart > /dev/null" -
macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
Randall Wood rhwood@mac.com
"The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
_______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-dev
Hi Randall, I have a MacPorts build on a portable firewire/USB drive and on this drive is a Python app that starts Apache and MySQL and then points a browser at the local running Apache. So given that the Apache is on a portable drive, when I build the port, I don't need the startupitem, hence the variant. BTW, MySQL doesn't enable the automatic startup of the server unless the +server variant is supplied. Regards, Blair Randall Wood wrote:
Is this +no_startupitem variant really smart?
I recently had a request to add a +without_startupitem variant to a port I maintain and rejected the request; since startupitems simply enable a port to be started at boot time, but do not cause a port to be booted at start time, it simply seems stupid to deliberately cripple a server port such that a user would have to reinstall it if they wanted to start the port at boot time later.
BTW: If the variant is to be retained, can it be named +without_startupitem instead?
On 2 Mar 2007, at 16:51, source_changes@macosforge.org wrote:
Revision 22490 Author blair@macports.org Date 2007-03-02 13:51:15 -0800 (Fri, 02 Mar 2007) Log MessageAdd a +no_startupitem variant that prevents the automatic startup of the Apache web server.Modified Paths trunk/dports/www/apache2/Portfile Diff Modified: trunk/dports/www/apache2/Portfile (22489 => 22490)--- trunk/dports/www/apache2/Portfile 2007-03-02 20:42:45 UTC (rev 22489) +++ trunk/dports/www/apache2/Portfile 2007-03-02 21:51:15 UTC (rev 22490) @@ -105,6 +105,10 @@ configure.args-append --with-mpm=event } +variant no_startupitem { + startupitem.create no +} + startupitem.create yes startupitem.start \ "\[ -x ${prefix}/apache2/bin/apachectl \] && ${prefix}/apache2/bin/apachectl start > /dev/null" @@ -112,4 +116,3 @@ "\[ -r ${prefix}/apache2/logs/httpd.pid \] && ${prefix}/apache2/bin/apachectl stop > /dev/null" startupitem.restart \ "\[ -r ${prefix}/apache2/logs/httpd.pid \] && ${prefix}/apache2/bin/apachectl restart > /dev/null" - _______________________________________________ macports-changes mailing list macports-changes@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-changes
Randall Wood rhwood@mac.com
"The rules are simple: The ball is round. The game lasts 90 minutes. All the rest is just philosophy."
_______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-dev
Weissmann Markus wrote:
On 03.03.2007, at 10:48, Randall Wood wrote:
Is this +no_startupitem variant really smart?
I recently had a request to add a +without_startupitem variant to a port I maintain and rejected the request; since startupitems simply enable a port to be started at boot time, but do not cause a port to be booted at start time, it simply seems stupid to deliberately cripple a server port such that a user would have to reinstall it if they wanted to start the port at boot time later.
BTW: If the variant is to be retained, can it be named +without_startupitem instead?
The best way out of this would be to perform some port magic (that needs to be developed first...); this would be something along the idea Landon proposed for the Python ports (py-/py24-/py25-): We need a "common code" file that gets included by multiple Portfiles. The best thing imho would be, if we enable ports not to be recognized by the name "Portfile" but by a suffix - this way multiple Portfiles can live in one directory - e. g. apache2. Then we can create a common file with e. g. version, distfiles, etc. and two Portfiles "apache2" and "apache2-server". Those would both include the common file with e. g. the description, version number, dependencies, etc. but would consist of the "base apache2 installation" and the "startup-foo" respectively.
cheers,
-Markus
PS: Oh and yes: As long as we don't have a clean solution like this, I'd say: Nuke the whatever_startupitem variant and create a "-server" Port - this way everybody can get happy.
That seems like a lot of work for one variant. I say keep it as is still the new include method can be worked out. While we're on the subject, it would be good to standardize on server startups. MySQL doesn't enable it by default. Blair
James Berry wrote:
On Mar 3, 2007, at 1:48 AM, Randall Wood wrote:
Is this +no_startupitem variant really smart?
I recently had a request to add a +without_startupitem variant to a port I maintain and rejected the request; since startupitems simply enable a port to be started at boot time, but do not cause a port to be booted at start time, it simply seems stupid to deliberately cripple a server port such that a user would have to reinstall it if they wanted to start the port at boot time later.
BTW: If the variant is to be retained, can it be named +without_startupitem instead?
Unless I'm missing something, I see no reason whatsoever for the no_startupitem variant, or anything like it. Using the startup item strategy, we have two cases, systemstarter (pre tiger) and launchd (tiger++):
SystemStarter: The code generated by port for system starter automatically looks for an enable flag from /etc/hostconfig, and this is -NO- by default. So by default the port won't be run.
Launchd: Likewise, the launchd.plist file generated for a port is not enabled by default, so by default the server won't be run.
The only reason I see for having a +server variant in some cases is if building the server is way too onerous (like perhaps in the case of mysql where somebody just wants to build the client but not the server). Still this is debatable.
I still don't need that stuff installed on the system at all for this use of MacPorts, even if it isn't enabled by default. Definitely not a standard use of MacPorts, but I have a client that ships Firewire/USB drives with a MacPorts install in /Volumes/SOMENAME/. People plugin in the drive, launch a Python app which starts Apache and MySQL. Regards, Blair -- Blair Zajac, Ph.D. <blair@orcaware.com> Subversion training, consulting and support http://www.orcaware.com/svn/
participants (4)
-
Blair Zajac
-
James Berry
-
Randall Wood
-
Weissmann Markus