Skip to contentSkip to conversation

apache2: use update-alternatives for httpd

PATCH Trevor Woerner 1 participant 1 message Sep 24, 2024 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Could this please be also added to scarthgap?

Quoted 44 lines · Trevor Woerner via lists.openembedded.org

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.

---
 meta-webserver/recipes-httpd/apache2/apache2_2.4.60.bb | 3 +++
 1 file changed, 3 insertions(+)
meta-webserver/recipes-httpd/apache2/apache2_2.4.60.bb +3 -0
index ab19ff1dc337..0c26a421c786 100644
@@ -190,6 +190,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"
 
Signature · 11 lines
2.44.0.501.g19981daefd7c



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#111410): https://lists.openembedded.org/g/openembedded-devel/message/111410
Mute This Topic: https://lists.openembedded.org/mt/107429240/900817
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-