All of lore.kernel.org
 help / color / mirror / Atom feed
* [scarthgap][meta-webserver][PATCH] apache2: use update-alternatives for httpd
@ 2024-09-26 22:45 Trevor Woerner
  0 siblings, 0 replies; only message in thread
From: Trevor Woerner @ 2024-09-26 22:45 UTC (permalink / raw)
  To: openembedded-devel

Busybox can optionally provide an httpd server, but by default The Yocto
Project defconfig for busybox does not enable it. If it is enabled,
busybox puts the resulting /usr/sbin/httpd object under the control of
update-alternatives.

apache2, on the other hand, does not put /usr/sbin/httpd under the control
of update-alternatives. Therefore, in the off chance a user enables the
busybox httpd server, it does not play well with apache2.

Add update-alternatives information to apache2 so that it plays nicely with
busybox which can optionally provide an httpd server at /usr/sbin/httpd.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb
index dc6a1530baed..66a017a864ee 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.62.bb
@@ -175,6 +175,9 @@ INITSCRIPT_PARAMS = "defaults 91 20"
 SYSTEMD_SERVICE:${PN} = "apache2.service"
 SYSTEMD_AUTO_ENABLE:${PN} = "enable"
 
+ALTERNATIVE:${PN} = "httpd"
+ALTERNATIVE_LINK_NAME[httpd] = "${sbindir}/httpd"
+ALTERNATIVE_PRIORITY[httpd] = "60"
 ALTERNATIVE:${PN}-doc = "htpasswd.1"
 ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
 
-- 
2.44.0.501.g19981daefd7c



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-26 22:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 22:45 [scarthgap][meta-webserver][PATCH] apache2: use update-alternatives for httpd Trevor Woerner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.