Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] package/php: Add Apache support
Date: Sun, 22 Feb 2015 15:39:42 +0100	[thread overview]
Message-ID: <20150222153942.586eb56e@free-electrons.com> (raw)
In-Reply-To: <1423305664-29877-2-git-send-email-bernd.kuhls@t-online.de>

Dear Bernd Kuhls,

On Sat,  7 Feb 2015 11:41:04 +0100, Bernd Kuhls wrote:

> +-  ac_output=`$APXS_HTTPD -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
> ++  ac_output='Server version: Apache/2.4.10 (Unix)'
> +   ac_IFS=$IFS
> + IFS="- /.
> + "
> +@@ -7626,7 +7626,7 @@
> + 
> +   # Test that we're trying to configure with apache 2.x
> + 
> +-  ac_output=`$APXS_HTTPD -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
> ++  ac_output='Server version: Apache/2.4.10 (Unix)'

What is this used for? What is the impact if the real version of Apache
doesn't match?

> +-    APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
> ++    APACHE_THREADED_MPM="threaded:     yes (fixed thread count)"

I am not really happy with this because it makes the PHP package assume
that the selected MPM model in apache is "worker". Even though that is
true today, it could be changed later on to also support the prefork
MPM, which I believe doesn't require thread support.

Maybe we could have one BR2_PACKAGE_APACHE_MPM_WORKER option, which the
PHP Apache support could depend on. For now, this option could be
blind and always on, and later on changed to something allowing to also
build support for the prefork MPM.

> +ifeq ($(BR2_PACKAGE_PHP_APACHE),y)
> +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
> +define PHP_FIX_THREADS_DETECTION
> +	$(SED) 's/pthreads_working\=no/pthreads_working\=yes/' $(@D)/configure
> +endef
> +# PHP assumes pthreads are not working when cross-compiling,
> +# needed for Apache-MPM worker

Even with --enable-pthreads ?

> +PHP_POST_PATCH_HOOKS += PHP_FIX_THREADS_DETECTION
> +endif
> +PHP_CONF_OPTS += \
> +	--with-apxs2=$(STAGING_DIR)/usr/bin/apxs \
> +	--with-config-file-path=/etc/apache2 \
> +	--with-config-file-scan-dir=/etc/apache2/php \
> +	--oldincludedir=$(STAGING_DIR)/usr/include \

Why is passing --oldincludedir necessary? An additional comment in
the code could be useful here.

Could you look into those issues and resend an updated version?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-02-22 14:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-07 10:41 [Buildroot] [PATCH v2 1/2] Apache: New package Bernd Kuhls
2015-02-07 10:41 ` [Buildroot] [PATCH v2 2/2] package/php: Add Apache support Bernd Kuhls
2015-02-22 14:39   ` Thomas Petazzoni [this message]
2015-02-22 14:31 ` [Buildroot] [PATCH v2 1/2] Apache: New package Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150222153942.586eb56e@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox