* [meta-webserver][PATCH 1/3] apache2: fix configuration
2012-10-07 11:13 [meta-webserver][PATCH 0/3] meta-webserver improvements Paul Eggleton
@ 2012-10-07 11:13 ` Paul Eggleton
2012-10-09 12:23 ` Koen Kooi
2012-10-07 11:13 ` [meta-webserver][PATCH 2/3] modphp: fix default php.ini & add PACKAGECONFIG Paul Eggleton
2012-10-07 11:13 ` [meta-webserver][PATCH 3/3] phpmyadmin: add new recipe Paul Eggleton
2 siblings, 1 reply; 8+ messages in thread
From: Paul Eggleton @ 2012-10-07 11:13 UTC (permalink / raw)
To: openembedded-devel
* 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(-)
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)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [meta-webserver][PATCH 1/3] apache2: fix configuration
2012-10-07 11:13 ` [meta-webserver][PATCH 1/3] apache2: fix configuration Paul Eggleton
@ 2012-10-09 12:23 ` Koen Kooi
2012-10-09 12:30 ` Paul Eggleton
0 siblings, 1 reply; 8+ messages in thread
From: Koen Kooi @ 2012-10-09 12:23 UTC (permalink / raw)
To: openembedded-devel
-----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-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-webserver][PATCH 1/3] apache2: fix configuration
2012-10-09 12:23 ` Koen Kooi
@ 2012-10-09 12:30 ` Paul Eggleton
2012-10-09 12:35 ` Koen Kooi
0 siblings, 1 reply; 8+ messages in thread
From: Paul Eggleton @ 2012-10-09 12:30 UTC (permalink / raw)
To: Koen Kooi; +Cc: openembedded-devel
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
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [meta-webserver][PATCH 1/3] apache2: fix configuration
2012-10-09 12:30 ` Paul Eggleton
@ 2012-10-09 12:35 ` Koen Kooi
2012-10-09 12:44 ` Paul Eggleton
0 siblings, 1 reply; 8+ messages in thread
From: Koen Kooi @ 2012-10-09 12:35 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-devel
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [meta-webserver][PATCH 2/3] modphp: fix default php.ini & add PACKAGECONFIG
2012-10-07 11:13 [meta-webserver][PATCH 0/3] meta-webserver improvements Paul Eggleton
2012-10-07 11:13 ` [meta-webserver][PATCH 1/3] apache2: fix configuration Paul Eggleton
@ 2012-10-07 11:13 ` Paul Eggleton
2012-10-07 11:13 ` [meta-webserver][PATCH 3/3] phpmyadmin: add new recipe Paul Eggleton
2 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2012-10-07 11:13 UTC (permalink / raw)
To: openembedded-devel
* Add "mysql" PACKAGECONFIG option
* Add "pgsql" PACKAGECONFIG option (untested)
* Use the correct template php.ini filename so that we actually get
some content in the default file
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta-webserver/recipes-php/modphp/modphp5.inc | 34 ++++++++++----------
meta-webserver/recipes-php/modphp/modphp_5.3.14.bb | 2 +-
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc
index 82b5ce1..344eb31 100644
--- a/meta-webserver/recipes-php/modphp/modphp5.inc
+++ b/meta-webserver/recipes-php/modphp/modphp5.inc
@@ -20,27 +20,27 @@ CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \
--enable-maintainer-zts \
--without-mysql \
- --enable-force-cgi-redirect \
- --disable-cgi \
- --disable-cli \
- --disable-pdo \
- --without-pear \
- --without-iconv \
- --disable-ipv6 \
- --disable-xml \
- --disable-xmlreader \
- --disable-xmlwriter \
- --disable-simplexml \
- --disable-libxml \
- --disable-dom \
+ --enable-force-cgi-redirect \
+ --disable-cgi \
+ --disable-cli \
+ --disable-pdo \
+ --without-pear \
+ --without-iconv \
+ --disable-ipv6 \
+ --disable-xml \
+ --disable-xmlreader \
+ --disable-xmlwriter \
+ --disable-simplexml \
+ --disable-libxml \
+ --disable-dom \
--disable-rpath \
--libdir=${libdir}/php5 \
--with-zlib --with-zlib-dir=${STAGING_DIR_TARGET}${exec_prefix} \
--with-config-file-path=${sysconfdir}/php/apache2-php5"
-# to get postgres support, add it to the DEPENDS above
-# and uncomment this line. similar for mysql
-#EXTRA_OECONF += " --with-pgsql=${STAGING_DIR_HOST}${layout_exec_prefix}"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5"
+PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5"
acpaths = ""
@@ -60,7 +60,7 @@ do_install () {
install -d ${D}${sysconfdir}/php/apache2-php5
install -m 755 libs/libphp5.so ${D}${libdir}/apache2/modules
install -m 644 ${WORKDIR}/70_mod_php5.conf ${D}${sysconfdir}/apache2/modules.d
- cat ${S}/php.ini-dist | \
+ cat ${S}/php.ini-production | \
sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \
> ${D}${sysconfdir}/php/apache2-php5/php.ini
diff --git a/meta-webserver/recipes-php/modphp/modphp_5.3.14.bb b/meta-webserver/recipes-php/modphp/modphp_5.3.14.bb
index b6a5126..707f5f9 100644
--- a/meta-webserver/recipes-php/modphp/modphp_5.3.14.bb
+++ b/meta-webserver/recipes-php/modphp/modphp_5.3.14.bb
@@ -1,5 +1,5 @@
include modphp5.inc
-PR = "r0"
+PR = "r1"
SRC_URI[md5sum] = "7caac4f71e2f21426c11ac153e538392"
SRC_URI[sha256sum] = "c8075b6e83c5db0d26cc8426a7456856421089a76c963813b1fcac3ced041cb3"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [meta-webserver][PATCH 3/3] phpmyadmin: add new recipe
2012-10-07 11:13 [meta-webserver][PATCH 0/3] meta-webserver improvements Paul Eggleton
2012-10-07 11:13 ` [meta-webserver][PATCH 1/3] apache2: fix configuration Paul Eggleton
2012-10-07 11:13 ` [meta-webserver][PATCH 2/3] modphp: fix default php.ini & add PACKAGECONFIG Paul Eggleton
@ 2012-10-07 11:13 ` Paul Eggleton
2 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2012-10-07 11:13 UTC (permalink / raw)
To: openembedded-devel
Add new recipe for phpMyAdmin 3.5.2.2, borrowing the apache.conf file
from Debian (with the addition of "Require all granted" to enable
access).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
.../recipes-php/phpmyadmin/phpmyadmin/apache.conf | 42 ++++++++++++++++++++
.../recipes-php/phpmyadmin/phpmyadmin_3.5.2.2.bb | 30 ++++++++++++++
2 files changed, 72 insertions(+)
create mode 100644 meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf
create mode 100644 meta-webserver/recipes-php/phpmyadmin/phpmyadmin_3.5.2.2.bb
diff --git a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf
new file mode 100644
index 0000000..94cbd86
--- /dev/null
+++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf
@@ -0,0 +1,42 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin /usr/share/phpmyadmin
+
+<Directory /usr/share/phpmyadmin>
+ Options FollowSymLinks
+ DirectoryIndex index.php
+ Require all granted
+
+ <IfModule mod_php5.c>
+ AddType application/x-httpd-php .php
+
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_flag register_globals Off
+ php_admin_flag allow_url_fopen Off
+ php_value include_path .
+ php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
+ php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
+ </IfModule>
+</Directory>
+
+# Authorize for setup
+<Directory /usr/share/phpmyadmin/setup>
+ <IfModule mod_authn_file.c>
+ AuthType Basic
+ AuthName "phpMyAdmin Setup"
+ AuthUserFile /etc/phpmyadmin/htpasswd.setup
+ </IfModule>
+ Require valid-user
+</Directory>
+
+# Disallow web access to directories that don't need it
+<Directory /usr/share/phpmyadmin/libraries>
+ Order Deny,Allow
+ Deny from All
+</Directory>
+<Directory /usr/share/phpmyadmin/setup/lib>
+ Order Deny,Allow
+ Deny from All
+</Directory>
+
diff --git a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_3.5.2.2.bb b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_3.5.2.2.bb
new file mode 100644
index 0000000..e3a581c
--- /dev/null
+++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_3.5.2.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Web-based MySQL administration interface"
+HOMEPAGE = "http://www.phpmyadmin.net"
+# Main code is GPLv2, libraries/tcpdf is under LGPLv3, js/jquery is under MIT
+LICENSE = "GPLv2 & LGPLv3 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a \
+ file://libraries/tcpdf/LICENSE.TXT;md5=5c87b66a5358ebcc495b03e0afcd342c"
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/phpmyadmin/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \
+ file://apache.conf"
+
+SRC_URI[md5sum] = "3f8993fe0f2fee1a022768278c6a270b"
+SRC_URI[sha256sum] = "d02de081c522d3026f4a8418538f7ff05adf280afa404851a5f7f4ef895b4a7d"
+
+S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages"
+
+inherit allarch
+
+do_install() {
+ install -d ${D}${datadir}/${PN}
+ cp -a * ${D}${datadir}/${PN}
+
+ install -d ${D}${sysconfdir}/apache2/conf.d
+ install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf
+}
+
+FILES_${PN} = "${datadir}/${PN} \
+ ${sysconfdir}/apache2/conf.d"
+
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread