Patchwork [meta-webserver,1/3] apache2: fix configuration

login
register
mail settings
Submitter Paul Eggleton
Date Oct. 7, 2012, 11:13 a.m.
Message ID <438b1be4a4a437a034365729a873964b7e44d0e8.1349608252.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/37879/
State Accepted
Commit 6d182b316f366e3491ee50ccd021eb7a79189136
Headers show

Comments

Paul Eggleton - Oct. 7, 2012, 11:13 a.m.
* Include conf files in /etc/apache2/modules.d and conf.d
* Add -D PHP5 to options so that PHP is enabled if installed
* Fix "reload" action in initscript

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../recipes-httpd/apache2/apache2_2.4.2.bb         |   10 +++++++---
 meta-webserver/recipes-httpd/apache2/files/init    |    6 +++---
 2 files changed, 10 insertions(+), 6 deletions(-)
Koen Kooi - Oct. 9, 2012, 12:23 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 07-10-12 13:13, Paul Eggleton schreef:
> * Include conf files in /etc/apache2/modules.d and conf.d * Add -D PHP5
> to options so that PHP is enabled if installed * Fix "reload" action in
> initscript
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

This is more likely related to your previous patch, but:

| /bin/sh:
/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/apr-1.4.6-r1/apr-1.4.6/arm-angstrom-linux-gnueabi-libtool:
No such file or directory
| make[3]: *** [unixd.lo] Error 127
| make[3]: Leaving directory
`/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os/unix'
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory
`/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os/unix'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory
`/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os'
| make: *** [all-recursive] Error 1
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (see
/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/apache2-2.4.2-r1/temp/log.do_compile.591
for further information)
ERROR: Task 6
(/OE/tentacle/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb,
do_compile) failed with exit code '1'

regards,

Koen


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQdBdPMkyGM64RGpERArmdAJ9DLRsJRcukSsV2bZlHNnovkpSSEACeOerO
6XGE5EYT0PCe3bRmWTwW8KU=
=TfsA
-----END PGP SIGNATURE-----
Paul Eggleton - Oct. 9, 2012, 12:30 p.m.
On Tuesday 09 October 2012 14:23:43 Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Op 07-10-12 13:13, Paul Eggleton schreef:
> > * Include conf files in /etc/apache2/modules.d and conf.d * Add -D PHP5
> > to options so that PHP is enabled if installed * Fix "reload" action in
> > initscript
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> 
> This is more likely related to your previous patch, but:
> | /bin/sh:
> /OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-li
> nux-gnueabi/apr-1.4.6-r1/apr-1.4.6/arm-angstrom-linux-gnueabi-libtool: No
> such file or directory
> 
> | make[3]: *** [unixd.lo] Error 127
> | make[3]: Leaving directory
> 
> `/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-l
> inux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os/unix'
> | make[2]: *** [all-recursive] Error 1
> | make[2]: Leaving directory
> 
> `/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-l
> inux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os/unix'
> | make[1]: *** [all-recursive] Error 1
> | make[1]: Leaving directory
> 
> `/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-l
> inux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os'
> | make: *** [all-recursive] Error 1
> | ERROR: oe_runmake failed
> | ERROR: Function failed: do_compile (see
> 
> /OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-li
> nux-gnueabi/apache2-2.4.2-r1/temp/log.do_compile.591 for further
> information)
> ERROR: Task 6
> (/OE/tentacle/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2
> /apache2_2.4.2.bb, do_compile) failed with exit code '1'

I'm guessing you are using rm_work? Obviously it's not supposed to be 
referring to anything in the WORKDIR for another recipe, but it would at least 
explain why I did not see that failure here.

Cheers,
Paul
Koen Kooi - Oct. 9, 2012, 12:35 p.m.
Op 9 okt. 2012, om 14:30 heeft Paul Eggleton <paul.eggleton@linux.intel.com> het volgende geschreven:

> On Tuesday 09 October 2012 14:23:43 Koen Kooi wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> 
>> Op 07-10-12 13:13, Paul Eggleton schreef:
>>> * Include conf files in /etc/apache2/modules.d and conf.d * Add -D PHP5
>>> to options so that PHP is enabled if installed * Fix "reload" action in
>>> initscript
>>> 
>>> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
>> 
>> This is more likely related to your previous patch, but:
>> | /bin/sh:
>> /OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-li
>> nux-gnueabi/apr-1.4.6-r1/apr-1.4.6/arm-angstrom-linux-gnueabi-libtool: No
>> such file or directory
>> 
>> | make[3]: *** [unixd.lo] Error 127
>> | make[3]: Leaving directory
>> 
>> `/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-l
>> inux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os/unix'
>> | make[2]: *** [all-recursive] Error 1
>> | make[2]: Leaving directory
>> 
>> `/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-l
>> inux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os/unix'
>> | make[1]: *** [all-recursive] Error 1
>> | make[1]: Leaving directory
>> 
>> `/OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-l
>> inux-gnueabi/apache2-2.4.2-r1/httpd-2.4.2/os'
>> | make: *** [all-recursive] Error 1
>> | ERROR: oe_runmake failed
>> | ERROR: Function failed: do_compile (see
>> 
>> /OE/tentacle/build/tmp-angstrom_next-eglibc/work/armv7a-vfp-neon-angstrom-li
>> nux-gnueabi/apache2-2.4.2-r1/temp/log.do_compile.591 for further
>> information)
>> ERROR: Task 6
>> (/OE/tentacle/sources/meta-openembedded/meta-webserver/recipes-httpd/apache2
>> /apache2_2.4.2.bb, do_compile) failed with exit code '1'
> 
> I'm guessing you are using rm_work? Obviously it's not supposed to be 
> referring to anything in the WORKDIR for another recipe, but it would at least 
> explain why I did not see that failure here.

I am indeed using rm_work.
Paul Eggleton - Oct. 9, 2012, 12:44 p.m.
On Tuesday 09 October 2012 14:35:25 Koen Kooi wrote:
> I am indeed using rm_work.

OK, I'll take a look at it. I am also aware of a bad rpath QA failure in 
modphp which I am looking into as well.

Cheers,
Paul

Patch

diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb
index 15c4d02..0eb5327 100644
--- a/meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.2.bb
@@ -6,7 +6,7 @@  DEPENDS = "libtool-native apache2-native openssl expat pcre apr apr-util"
 RDEPENDS_${PN} += "openssl libgcc"
 SECTION = "net"
 LICENSE = "Apache-2.0"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
            file://server-makefile.patch \
@@ -68,8 +68,12 @@  do_install_append() {
 	# Expat should be found in the staging area via DEPENDS...
 	rm -f ${D}/${libdir}/libexpat.*
 
-	# Ensure configuration file pulls in modules.d
-	printf "\nInclude ${sysconfdir}/${PN}/modules.d/*\n\n" >> ${D}/${sysconfdir}/${PN}/httpd.conf
+	install -d ${D}${sysconfdir}/${PN}/conf.d
+	install -d ${D}${sysconfdir}/${PN}/modules.d
+
+	# Ensure configuration file pulls in conf.d and modules.d
+	printf "\nIncludeOptional ${sysconfdir}/${PN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${PN}/httpd.conf
+	printf "\nIncludeOptional ${sysconfdir}/${PN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${PN}/httpd.conf
 }
 
 SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
diff --git a/meta-webserver/recipes-httpd/apache2/files/init b/meta-webserver/recipes-httpd/apache2/files/init
index 85af742..346dc0d 100755
--- a/meta-webserver/recipes-httpd/apache2/files/init
+++ b/meta-webserver/recipes-httpd/apache2/files/init
@@ -9,12 +9,12 @@ 
 #  implementing the current HTTP standards.
 ### END INIT INFO
 
-ARGS="-D SSL -k start"
+ARGS="-D SSL -D PHP5 -k start"
 NAME=apache2
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 DAEMON=/usr/sbin/httpd
 SUEXEC=/usr/lib/apache/suexec
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/apache2/logs/httpd.pid
 CONF=/etc/apache2/httpd.conf
 APACHECTL=/usr/sbin/apachectl 
 
@@ -40,7 +40,7 @@  case "$1" in
 
   reload)
     echo -n "Reloading $NAME configuration"
-    $APACHECTL reload
+    kill -HUP `cat $PIDFILE`
     ;;
 
   reload-modules)