| Submitter | Eric BENARD |
|---|---|
| Date | Nov. 25, 2012, 5:25 p.m. |
| Message ID | <1353864310-20097-7-git-send-email-eric@eukrea.com> |
| Download | mbox | patch |
| Permalink | /patch/39583/ |
| State | Accepted |
| Commit | e4236266b7ac6103e4b9400eb51b5cb0037f3ba9 |
| Headers | show |
Comments
On 25/11/12 17:25, Eric Bénard wrote: > - add CONFFILES so that configuration files don't get overwritten > during upgrade > - add an example on how to launch php-cgi using php-fcgi > > Signed-off-by: Eric Bénard <eric@eukrea.com> > --- > meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb b/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb > index 2e6955e..7dcbe9e 100644 > --- a/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb > +++ b/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb > @@ -4,6 +4,8 @@ LICENSE = "GPLv2" > LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" > DEPENDS = "libxml2 libxslt" > > +PR = "r1" > + > SECTION = "net" > > SRC_URI = "http://hiawatha-webserver.org/files/${PN}-${PV}.tar.gz \ > @@ -36,10 +38,20 @@ EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \ > -DWORK_DIR=/var/lib/hiawatha " > > do_install_append() { > - > # Copy over init script and sed in the correct sbin path > sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init > mkdir -p ${D}${sysconfdir}/init.d > install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha > > + # configure php-fcgi to have a working configuration > + # by default if php is installed > + echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf > } > + > +CONFFILES_${PN} = " \ > + ${sysconfdir}/hiawatha/cgi-wrapper.conf \ > + ${sysconfdir}/hiawatha/hiawatha.conf \ > + ${sysconfdir}/hiawatha/index.xslt \ > + ${sysconfdir}/hiawatha/mimetype.conf \ > + ${sysconfdir}/hiawatha/php-fcgi.conf \ > + " Looks good to me, thanks for the improvements Eric! Regards,
Hi Jack, Le Mon, 26 Nov 2012 10:27:26 +0000, Jack Mitchell <ml@communistcode.co.uk> a écrit : > On 25/11/12 17:25, Eric Bénard wrote: > > + # configure php-fcgi to have a working configuration > > + # by default if php is installed > > + echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf > > } > > Looks good to me, thanks for the improvements Eric! > I still have to find a good way to provide a default ${sysconfdir}/php/hiawatha-php5/php.ini and launch php-fcgi in the init script if php is enabled. Do you think we could provide the file php.ini in the hiawatha recipe (as hiawatha's doc recommends setting some options : http://www.hiawatha-webserver.org/howto/php_configuration ) ? Eric
On 26/11/12 10:30, Eric Bénard wrote: > Hi Jack, > > Le Mon, 26 Nov 2012 10:27:26 +0000, > Jack Mitchell <ml@communistcode.co.uk> a écrit : > >> On 25/11/12 17:25, Eric Bénard wrote: >>> + # configure php-fcgi to have a working configuration >>> + # by default if php is installed >>> + echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf >>> } >> Looks good to me, thanks for the improvements Eric! >> > I still have to find a good way to provide a default > ${sysconfdir}/php/hiawatha-php5/php.ini and launch php-fcgi in the init > script if php is enabled. > Do you think we could provide the file php.ini in the hiawatha recipe > (as hiawatha's doc recommends setting some options : > http://www.hiawatha-webserver.org/howto/php_configuration ) ? > > Eric The only way I could think of doing it would be to have some sort of test to see if PHP is installed and then possibly sed the php.ini file to set the correct values. On the other hand, a note in the BB file may be enough and OE users shouldn't really need their hands holding to this level. As for the init file, I use PHP and Hiawatha as normal CGI rather than using a fastCGI daemon, therefore I don't think it would be appropriate to automatically start the fcgi daemon. We could possibly ship a seperate fastCGI init file, although not automatically enable it? Regards,
Le Mon, 26 Nov 2012 10:45:05 +0000, Jack Mitchell <ml@communistcode.co.uk> a écrit : > On 26/11/12 10:30, Eric Bénard wrote: > > Hi Jack, > > > > Le Mon, 26 Nov 2012 10:27:26 +0000, > > Jack Mitchell <ml@communistcode.co.uk> a écrit : > > > >> On 25/11/12 17:25, Eric Bénard wrote: > >>> + # configure php-fcgi to have a working configuration > >>> + # by default if php is installed > >>> + echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf > >>> } > >> Looks good to me, thanks for the improvements Eric! > >> > > I still have to find a good way to provide a default > > ${sysconfdir}/php/hiawatha-php5/php.ini and launch php-fcgi in the init > > script if php is enabled. > > Do you think we could provide the file php.ini in the hiawatha recipe > > (as hiawatha's doc recommends setting some options : > > http://www.hiawatha-webserver.org/howto/php_configuration ) ? > > > > Eric > > The only way I could think of doing it would be to have some sort of > test to see if PHP is installed and then possibly sed the php.ini file > to set the correct values. > > On the other hand, a note in the BB file may be enough and OE users > shouldn't really need their hands holding to this level. > > As for the init file, I use PHP and Hiawatha as normal CGI rather than > using a fastCGI daemon, therefore I don't think it would be appropriate > to automatically start the fcgi daemon. We could possibly ship a > seperate fastCGI init file, although not automatically enable it? yes the idea is to provide default confi/init files which work so that users can enable them with .bbappend in their overlay. Eric
On Sunday 25 November 2012 18:25:10 Eric Bénard wrote: > - add CONFFILES so that configuration files don't get overwritten > during upgrade > - add an example on how to launch php-cgi using php-fcgi > > Signed-off-by: Eric Bénard <eric@eukrea.com> > --- I've tested building and running phpMyAdmin with these changes and it all works perfectly, thanks. I've merged this, 2/7, 3/7 and 4/7. The rest are against meta-oe (although I acknowledge php ought to be moved to meta-webserver and eventually merged to a common .inc with modphp). Cheers, Paul
Patch
diff --git a/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb b/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb index 2e6955e..7dcbe9e 100644 --- a/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb +++ b/meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb @@ -4,6 +4,8 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" DEPENDS = "libxml2 libxslt" +PR = "r1" + SECTION = "net" SRC_URI = "http://hiawatha-webserver.org/files/${PN}-${PV}.tar.gz \ @@ -36,10 +38,20 @@ EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \ -DWORK_DIR=/var/lib/hiawatha " do_install_append() { - # Copy over init script and sed in the correct sbin path sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init mkdir -p ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha + # configure php-fcgi to have a working configuration + # by default if php is installed + echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf } + +CONFFILES_${PN} = " \ + ${sysconfdir}/hiawatha/cgi-wrapper.conf \ + ${sysconfdir}/hiawatha/hiawatha.conf \ + ${sysconfdir}/hiawatha/index.xslt \ + ${sysconfdir}/hiawatha/mimetype.conf \ + ${sysconfdir}/hiawatha/php-fcgi.conf \ + "
- add CONFFILES so that configuration files don't get overwritten during upgrade - add an example on how to launch php-cgi using php-fcgi Signed-off-by: Eric Bénard <eric@eukrea.com> --- meta-webserver/recipes-httpd/hiawatha/hiawatha_8.6.bb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)