summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/php/php_8.2.9.bb
diff options
context:
space:
mode:
authorEmil Kronborg <emil.kronborg@protonmail.com>2024-01-31 19:13:13 +0000
committerKhem Raj <raj.khem@gmail.com>2024-01-31 14:18:31 -0800
commit4cefe0196f7a2471b144413510d072d525e1a041 (patch)
treee29460d618dbb405eb0e99782bce7ce1f0c341bf /meta-oe/recipes-devtools/php/php_8.2.9.bb
parent0ffbe2a79a5d49b2719c934ca0e73822fa3cbc2e (diff)
downloadmeta-openembedded-4cefe0196f7a2471b144413510d072d525e1a041.tar.gz
php-fpm: fix systemd
2848cc99a186 ("php-fpm: Add support for systemd") introduced a systemd service file, where ExecStart and ExecStop uses /etc/init.d/php-fpm, which does not exist if systemd is enabled. Consequently, the php-fpm service fails to start even though it is correctly installed. This is fixed by this commit in which the service file is identical to the one from the PHP source code except for the use of BitBake variables. Also, use ${systemd_system_unitdir} instead of ${systemd_unitdir}/system. Signed-off-by: Emil Kronborg <emil.kronborg@protonmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/php/php_8.2.9.bb')
-rw-r--r--meta-oe/recipes-devtools/php/php_8.2.9.bb17
1 files changed, 10 insertions, 7 deletions
diff --git a/meta-oe/recipes-devtools/php/php_8.2.9.bb b/meta-oe/recipes-devtools/php/php_8.2.9.bb
index cb9d0060a3..e645a284d5 100644
--- a/meta-oe/recipes-devtools/php/php_8.2.9.bb
+++ b/meta-oe/recipes-devtools/php/php_8.2.9.bb
@@ -44,7 +44,7 @@ CVE_STATUS_PHP = " \
44 CVE-2007-4596 \ 44 CVE-2007-4596 \
45" 45"
46 46
47inherit autotools pkgconfig python3native gettext multilib_header multilib_script 47inherit autotools pkgconfig python3native gettext multilib_header multilib_script systemd
48 48
49# phpize is not scanned for absolute paths by default (but php-config is). 49# phpize is not scanned for absolute paths by default (but php-config is).
50# 50#
@@ -193,11 +193,11 @@ do_install:append:class-target() {
193 install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf 193 install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
194 194
195 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then 195 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
196 install -d ${D}${systemd_unitdir}/system 196 install -d ${D}${systemd_system_unitdir}
197 install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/ 197 install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_system_unitdir}/php-fpm.service
198 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ 198 sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_system_unitdir}/php-fpm.service
199 -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ 199 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/php-fpm.service
200 ${D}${systemd_unitdir}/system/php-fpm.service 200 sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/php-fpm.service
201 fi 201 fi
202 202
203 if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then 203 if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then
@@ -259,7 +259,7 @@ FILES:${PN}-cli = "${bindir}/php"
259FILES:${PN}-phpdbg = "${bindir}/phpdbg" 259FILES:${PN}-phpdbg = "${bindir}/phpdbg"
260FILES:${PN}-phar = "${bindir}/phar*" 260FILES:${PN}-phar = "${bindir}/phar*"
261FILES:${PN}-cgi = "${bindir}/php-cgi" 261FILES:${PN}-cgi = "${bindir}/php-cgi"
262FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service ${sysconfdir}/php-fpm.d/www.conf.default" 262FILES:${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${sysconfdir}/php-fpm.d/www.conf.default"
263FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" 263FILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
264CONFFILES:${PN}-fpm = "${sysconfdir}/php-fpm.conf" 264CONFFILES:${PN}-fpm = "${sysconfdir}/php-fpm.conf"
265CONFFILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" 265CONFFILES:${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
@@ -290,6 +290,9 @@ RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
290RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}" 290RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
291RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}" 291RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
292 292
293SYSTEMD_SERVICE:${PN}-fpm = "php-fpm.service"
294SYSTEMD_PACKAGES += "${PN}-fpm"
295
293do_install:append:class-native() { 296do_install:append:class-native() {
294 create_wrapper ${D}${bindir}/php \ 297 create_wrapper ${D}${bindir}/php \
295 PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ 298 PHP_PEAR_SYSCONF_DIR=${sysconfdir}/