* [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1
@ 2014-10-05 13:45 Bernd Kuhls
2014-10-05 13:45 ` [Buildroot] [PATCH 2/8] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
` (7 more replies)
0 siblings, 8 replies; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
apr-0001-cross-compile.patch: Fix cross compilation
Fix top_builddir in usr/build-1/apr_rules.mk
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/apr/apr-0001-cross-compile.patch | 53 ++++++++++++++++++++++++++++++
package/apr/apr.mk | 7 +++-
2 files changed, 59 insertions(+), 1 deletion(-)
create mode 100644 package/apr/apr-0001-cross-compile.patch
diff --git a/package/apr/apr-0001-cross-compile.patch b/package/apr/apr-0001-cross-compile.patch
new file mode 100644
index 0000000..6bd1194
--- /dev/null
+++ b/package/apr/apr-0001-cross-compile.patch
@@ -0,0 +1,53 @@
+Fix cross-compilation
+
+Patch submitted upstream:
+https://issues.apache.org/bugzilla/show_bug.cgi?id=57058
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr apr-1.5.1.org/configure.in apr-1.5.1/configure.in
+--- apr-1.5.1.org/configure.in 2014-01-25 16:17:29.000000000 +0100
++++ apr-1.5.1/configure.in 2014-10-05 11:20:40.080746760 +0200
+@@ -118,6 +118,16 @@
+ echo "Configuring APR library"
+ echo "Platform: $host"
+
++dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
++dnl we got already CC_FOR_BUILD from environment.
++if test "x${build_alias}" != "x${host_alias}"; then
++ if test "x${CC_FOR_BUILD}" = "x"; then
++ CC_FOR_BUILD=cc
++ fi
++fi
++AC_SUBST(CC_FOR_BUILD)
++AC_SUBST(CFLAGS_FOR_BUILD)
++
+ dnl Some initial steps for configuration. We setup the default directory
+ dnl and which files are to be configured.
+
+diff -uNr apr-1.5.1.org/Makefile.in apr-1.5.1/Makefile.in
+--- apr-1.5.1.org/Makefile.in 2014-03-17 16:10:26.000000000 +0100
++++ apr-1.5.1/Makefile.in 2014-10-05 11:22:53.031070519 +0200
+@@ -8,6 +8,8 @@
+ # APR (Apache Portable Runtime) library Makefile.
+ #
+ CPP = @CPP@
++CC_FOR_BUILD = @CC_FOR_BUILD@
++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+
+ # get substituted into some targets
+ APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
+@@ -134,8 +136,13 @@
+
+ OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
+ tools/gen_test_char.lo: make_tools_dir
++ifdef CC_FOR_BUILD
++tools/gen_test_char at EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS)
++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
++else
+ tools/gen_test_char at EXEEXT@: $(OBJECTS_gen_test_char)
+ $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
++endif
+
+ include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
+ $(APR_MKDIR) include/private
diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index 1a4c0e2..bdf4c78 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -4,12 +4,15 @@
#
################################################################################
-APR_VERSION = 1.4.8
+APR_VERSION = 1.5.1
APR_SITE = http://archive.apache.org/dist/apr
APR_LICENSE = Apache-2.0
APR_LICENSE_FILES = LICENSE
APR_INSTALL_STAGING = YES
+APR_AUTORECONF = YES
APR_CONF_ENV = \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
ac_cv_file__dev_zero=yes \
ac_cv_func_setpgrp_void=yes \
apr_cv_process_shared_works=yes \
@@ -35,6 +38,8 @@ define APR_FIXUP_RULES_MK
$(STAGING_DIR)/usr/build-1/apr_rules.mk
$(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \
$(STAGING_DIR)/usr/build-1/apr_rules.mk
+ $(SED) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \
+ $(STAGING_DIR)/usr/build-1/apr_rules.mk
endef
APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/8] package/apr: Fix detection of rlimit and large file support
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
@ 2014-10-05 13:45 ` Bernd Kuhls
2014-10-05 14:48 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies Bernd Kuhls
` (6 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
Snippets from configure log:
before:
checking whether to enable -D_LARGEFILE64_SOURCE... no
...
checking struct rlimit... no
after
checking whether to enable -D_LARGEFILE64_SOURCE... (cached) yes
...
checking struct rlimit... (cached) yes
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/apr/apr.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index bdf4c78..82b1ad2 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -19,6 +19,7 @@ APR_CONF_ENV = \
apr_cv_mutex_robust_shared=no \
apr_cv_tcp_nodelay_with_cork=yes \
ac_cv_sizeof_struct_iovec=8 \
+ ac_cv_struct_rlimit=yes \
apr_cv_mutex_recursive=yes
APR_CONFIG_SCRIPTS = apr-1-config
@@ -27,6 +28,11 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
endif
+# Fix lfs detection when cross compiling
+ifeq ($(BR2_LARGEFILE),y)
+APR_CONF_ENV += apr_cv_use_lfs64=yes
+endif
+
define APR_CLEANUP_UNNEEDED_FILES
$(RM) -rf $(TARGET_DIR)/usr/build-1/
endef
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
2014-10-05 13:45 ` [Buildroot] [PATCH 2/8] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
@ 2014-10-05 13:45 ` Bernd Kuhls
2014-10-05 14:45 ` Yann E. MORIN
2014-10-05 16:01 ` Thomas Petazzoni
2014-10-05 13:45 ` [Buildroot] [PATCH 4/8] package/apr-util: Bump version to 1.5.4 Bernd Kuhls
` (5 subsequent siblings)
7 siblings, 2 replies; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/apr-util/Config.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in
index 3d4ec23..fcef693 100644
--- a/package/apr-util/Config.in
+++ b/package/apr-util/Config.in
@@ -12,3 +12,7 @@ config BR2_PACKAGE_APR_UTIL
The utility library for the apache runtime project
http://apr.apache.org/
+
+comment "apr-util needs a toolchain w/ dynamic library"
+ depends on BR2_USE_MMU
+ depends on BR2_PREFER_STATIC_LIB
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 4/8] package/apr-util: Bump version to 1.5.4
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
2014-10-05 13:45 ` [Buildroot] [PATCH 2/8] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
2014-10-05 13:45 ` [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies Bernd Kuhls
@ 2014-10-05 13:45 ` Bernd Kuhls
2014-10-05 13:45 ` [Buildroot] [PATCH 5/8] package/apr-util: Rework dependencies Bernd Kuhls
` (4 subsequent siblings)
7 siblings, 0 replies; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/apr-util/apr-util.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index bdb3004..3e9ce54 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -4,7 +4,7 @@
#
################################################################################
-APR_UTIL_VERSION = 1.5.2
+APR_UTIL_VERSION = 1.5.4
APR_UTIL_SITE = http://archive.apache.org/dist/apr
APR_UTIL_LICENSE = Apache-2.0
APR_UTIL_LICENSE_FILES = LICENSE
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 5/8] package/apr-util: Rework dependencies
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
` (2 preceding siblings ...)
2014-10-05 13:45 ` [Buildroot] [PATCH 4/8] package/apr-util: Bump version to 1.5.4 Bernd Kuhls
@ 2014-10-05 13:45 ` Bernd Kuhls
2014-10-05 15:00 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 6/8] package/apr: Fix for Apache when listening to multiple ports Bernd Kuhls
` (3 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
- add expat hard-dependency, when missing apr-util compiles its own expat
- all database libs are optional
- add optional OpenSSL support
- remove unused dependencies neon and zlib
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/apr-util/Config.in | 5 +----
package/apr-util/apr-util.mk | 37 ++++++++++++++++++++++++++++++++++++-
2 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in
index fcef693..6757e7e 100644
--- a/package/apr-util/Config.in
+++ b/package/apr-util/Config.in
@@ -1,10 +1,7 @@
config BR2_PACKAGE_APR_UTIL
bool "apr-util"
select BR2_PACKAGE_APR
- select BR2_PACKAGE_SQLITE
- select BR2_PACKAGE_NEON
- select BR2_PACKAGE_NEON_ZLIB
- select BR2_PACKAGE_ZLIB
+ select BR2_PACKAGE_EXPAT
# apr really needs shared library support
depends on !BR2_PREFER_STATIC_LIB
depends on BR2_USE_MMU # apr
diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
index 3e9ce54..4d5d988 100644
--- a/package/apr-util/apr-util.mk
+++ b/package/apr-util/apr-util.mk
@@ -9,7 +9,7 @@ APR_UTIL_SITE = http://archive.apache.org/dist/apr
APR_UTIL_LICENSE = Apache-2.0
APR_UTIL_LICENSE_FILES = LICENSE
APR_UTIL_INSTALL_STAGING = YES
-APR_UTIL_DEPENDENCIES = apr sqlite neon zlib
+APR_UTIL_DEPENDENCIES = apr expat
APR_UTIL_CONF_OPTS = \
--with-apr=$(STAGING_DIR)/usr/bin/apr-1-config
APR_UTIL_CONFIG_SCRIPTS = apu-1-config
@@ -18,4 +18,39 @@ APR_UTIL_CONFIG_SCRIPTS = apu-1-config
# features.
APR_UTIL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
+APR_UTIL_CONF_OPTS += --with-dbm=db53 --with-berkeley-db="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += berkeleydb
+else
+APR_UTIL_CONF_OPTS += --without-berkeley-db
+endif
+
+ifeq ($(BR2_PACKAGE_GDBM),y)
+APR_UTIL_CONF_OPTS += --with-gdbm="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += gdbm
+else
+APR_UTIL_CONF_OPTS += --without-gdbm
+endif
+
+ifeq ($(BR2_PACKAGE_MYSQL),y)
+APR_UTIL_CONF_OPTS += --with-mysql="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += mysql
+else
+APR_UTIL_CONF_OPTS += --without-mysql
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+APR_UTIL_CONF_OPTS += --with-crypto --with-openssl="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += openssl
+else
+APR_UTIL_CONF_OPTS += --without-ssl
+endif
+
+ifeq ($(BR2_PACKAGE_SQLITE),y)
+APR_UTIL_CONF_OPTS += --with-sqlite3="$(STAGING_DIR)/usr"
+APR_UTIL_DEPENDENCIES += sqlite
+else
+APR_UTIL_CONF_OPTS += --without-sqlite3
+endif
+
$(eval $(autotools-package))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 6/8] package/apr: Fix for Apache when listening to multiple ports
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
` (3 preceding siblings ...)
2014-10-05 13:45 ` [Buildroot] [PATCH 5/8] package/apr-util: Rework dependencies Bernd Kuhls
@ 2014-10-05 13:45 ` Bernd Kuhls
2014-10-05 15:04 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 7/8] Apache: New package Bernd Kuhls
` (2 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
For details:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56727#c6
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/apr/apr.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index 82b1ad2..7eda611 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -20,6 +20,7 @@ APR_CONF_ENV = \
apr_cv_tcp_nodelay_with_cork=yes \
ac_cv_sizeof_struct_iovec=8 \
ac_cv_struct_rlimit=yes \
+ ac_cv_o_nonblock_inherited=no \
apr_cv_mutex_recursive=yes
APR_CONFIG_SCRIPTS = apr-1-config
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 7/8] Apache: New package
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
` (4 preceding siblings ...)
2014-10-05 13:45 ` [Buildroot] [PATCH 6/8] package/apr: Fix for Apache when listening to multiple ports Bernd Kuhls
@ 2014-10-05 13:45 ` Bernd Kuhls
2014-10-05 15:23 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 8/8] package/php: Add Apache support Bernd Kuhls
2014-10-05 14:42 ` [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Yann E. MORIN
7 siblings, 1 reply; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/Config.in | 1 +
package/apache/Config.in | 19 ++++++++
package/apache/apache-0001-cross-compile.patch | 58 ++++++++++++++++++++++++
package/apache/apache.mk | 42 +++++++++++++++++
4 files changed, 120 insertions(+)
create mode 100644 package/apache/Config.in
create mode 100644 package/apache/apache-0001-cross-compile.patch
create mode 100644 package/apache/apache.mk
diff --git a/package/Config.in b/package/Config.in
index 318b743..3b22d25 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -945,6 +945,7 @@ endmenu
menu "Networking applications"
source "package/aiccu/Config.in"
source "package/aircrack-ng/Config.in"
+ source "package/apache/Config.in"
source "package/argus/Config.in"
source "package/arptables/Config.in"
source "package/atftp/Config.in"
diff --git a/package/apache/Config.in b/package/apache/Config.in
new file mode 100644
index 0000000..172346c
--- /dev/null
+++ b/package/apache/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_APACHE
+ bool "apache"
+ select BR2_PACKAGE_APR_UTIL
+ select BR2_PACKAGE_PCRE
+ depends on !BR2_PREFER_STATIC_LIB
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_USE_MMU # apr
+ help
+ The Apache HTTP Server Project is an effort to develop and maintain an
+ open-source HTTP server for modern operating systems including UNIX
+ and Windows NT. The goal of this project is to provide a secure,
+ efficient and extensible server that provides HTTP services in sync
+ with the current HTTP standards.
+
+ http://httpd.apache.org
+
+comment "apache needs a toolchain w/ dynamic library, threads"
+ depends on BR2_USE_MMU
+ depends on BR2_PREFER_STATIC_LIB || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/apache/apache-0001-cross-compile.patch b/package/apache/apache-0001-cross-compile.patch
new file mode 100644
index 0000000..05e99dd
--- /dev/null
+++ b/package/apache/apache-0001-cross-compile.patch
@@ -0,0 +1,58 @@
+Fix cross-compilation
+
+Fetched httpd-2.4.x-cross_compile.diff from upstream bugtracker:
+https://issues.apache.org/bugzilla/show_bug.cgi?id=51257#c6
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+Index: server/Makefile.in
+===================================================================
+--- a/server/Makefile.in (revision 1328714)
++++ b/server/Makefile.in (working copy)
+@@ -22,9 +22,14 @@
+ include $(top_builddir)/build/rules.mk
+ include $(top_srcdir)/build/library.mk
+
++ifdef CC_FOR_BUILD
++gen_test_char: gen_test_char.c
++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
++else
+ gen_test_char_OBJECTS = gen_test_char.lo
+ gen_test_char: $(gen_test_char_OBJECTS)
+ $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
++endif
+
+ test_char.h: gen_test_char
+ ./gen_test_char > test_char.h
+Index: configure.in
+===================================================================
+--- a/configure.in (revision 1328714)
++++ b/configure.in (working copy)
+@@ -193,6 +193,14 @@
+ dnl Try to get c99 support for variadic macros
+ ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99])
+
++dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
++dnl we got already CC_FOR_BUILD from environment.
++if test "x${build_alias}" != "x${host_alias}"; then
++ if test "x${CC_FOR_BUILD}" = "x"; then
++ CC_FOR_BUILD=cc
++ fi
++fi
++
+ if test "x${cache_file}" = "x/dev/null"; then
+ # Likewise, ensure that CC and CPP are passed through to the pcre
+ # configure script iff caching is disabled (the autoconf 2.5x default).
+Index: acinclude.m4
+===================================================================
+--- a/acinclude.m4 (revision 1328714)
++++ ab/cinclude.m4 (working copy)
+@@ -53,6 +53,8 @@
+ APACHE_SUBST(CPPFLAGS)
+ APACHE_SUBST(CFLAGS)
+ APACHE_SUBST(CXXFLAGS)
++ APACHE_SUBST(CC_FOR_BUILD)
++ APACHE_SUBST(CFLAGS_FOR_BUILD)
+ APACHE_SUBST(LTFLAGS)
+ APACHE_SUBST(LDFLAGS)
+ APACHE_SUBST(LT_LDFLAGS)
diff --git a/package/apache/apache.mk b/package/apache/apache.mk
new file mode 100644
index 0000000..d525024
--- /dev/null
+++ b/package/apache/apache.mk
@@ -0,0 +1,42 @@
+################################################################################
+#
+# apache
+#
+################################################################################
+
+APACHE_VERSION = 2.4.10
+APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
+APACHE_SITE = http://archive.apache.org/dist/httpd
+APACHE_LICENSE = Apache-2.0
+APACHE_LICENSE_FILES = LICENSE
+APACHE_INSTALL_STAGING = YES
+APACHE_AUTORECONF = YES
+APACHE_DEPENDENCIES = apr-util pcre
+
+APACHE_CONF_ENV= \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
+ ap_cv_void_ptr_lt_long=no \
+ PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config
+
+APACHE_CONF_OPTS = \
+ --sysconfdir=/etc/apache2 \
+ --with-apr=$(STAGING_DIR)/usr \
+ --with-apr-util=$(STAGING_DIR)/usr \
+ --with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
+ --enable-http \
+ --enable-dbd \
+ --enable-proxy \
+ --enable-mime-magic \
+ --without-suexec-bin \
+ --enable-mods-shared=all \
+ --with-mpm=worker \
+ --enable-nonportable-atomics=yes
+
+define APACHE_FIX_STAGING_APACHE_CONFIG
+ $(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
+ $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
+endef
+APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
+
+$(eval $(autotools-package))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 8/8] package/php: Add Apache support
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
` (5 preceding siblings ...)
2014-10-05 13:45 ` [Buildroot] [PATCH 7/8] Apache: New package Bernd Kuhls
@ 2014-10-05 13:45 ` Bernd Kuhls
2014-10-05 15:56 ` Yann E. MORIN
2014-10-05 14:42 ` [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Yann E. MORIN
7 siblings, 1 reply; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 13:45 UTC (permalink / raw)
To: buildroot
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/php/Config.in | 17 +++
package/php/php-04-cross-compile.only-for-apache | 131 ++++++++++++++++++++++
package/php/php.mk | 16 +++
3 files changed, 164 insertions(+)
create mode 100644 package/php/php-04-cross-compile.only-for-apache
diff --git a/package/php/Config.in b/package/php/Config.in
index 32faa32..db4e647 100644
--- a/package/php/Config.in
+++ b/package/php/Config.in
@@ -11,6 +11,9 @@ if BR2_PACKAGE_PHP
source "package/php/Config.ext"
+config BR2_PACKAGE_PHP_APACHE
+ bool
+
config BR2_PACKAGE_PHP_CLI
bool
@@ -26,6 +29,20 @@ choice
help
Select the PHP interface(s).
+config BR2_PACKAGE_PHP_SAPI_APACHE
+ bool "Apache"
+ select BR2_PACKAGE_APACHE
+ select BR2_PACKAGE_PHP_APACHE
+ depends on !BR2_PREFER_STATIC_LIB # apache
+ depends on BR2_TOOLCHAIN_HAS_THREADS # apache
+ depends on BR2_USE_MMU # apr
+ help
+ Apache module
+
+comment "apache module needs a toolchain w/ dynamic library, threads"
+ depends on BR2_USE_MMU
+ depends on BR2_PREFER_STATIC_LIB || !BR2_TOOLCHAIN_HAS_THREADS
+
config BR2_PACKAGE_PHP_SAPI_CGI
bool "CGI"
# CGI uses fork()
diff --git a/package/php/php-04-cross-compile.only-for-apache b/package/php/php-04-cross-compile.only-for-apache
new file mode 100644
index 0000000..a72befc
--- /dev/null
+++ b/package/php/php-04-cross-compile.only-for-apache
@@ -0,0 +1,131 @@
+Fix cross-compilation when used as Apache module.
+
+Apache is configured to use the worker MPM which depends on threads.
+As PHP?s phtread detection is broken in a cross-compile environment, it is not
+possible to apply this patch unconditionally, since php itself works without
+thread support,
+
+Also avoid calling the Apache httpd target binary to check for its presence.
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr php-5.5.17.org/configure php-5.5.17/configure
+--- php-5.5.17.org/configure 2014-09-16 14:53:57.000000000 +0200
++++ php-5.5.17/configure 2014-10-05 15:06:12.162625672 +0200
+@@ -4062,7 +4062,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+ $as_echo_n "checking whether we are cross compiling... " >&6; }
+ if test "$cross_compiling" != yes; then
+- { { ac_try="$ac_link"
++ { { ac_try="false"
+ case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+@@ -5772,7 +5772,7 @@
+
+ if test "$cross_compiling" = yes; then :
+
+- pthreads_working=no
++ pthreads_working=yes
+ case $host_alias in
+ *netware*)
+ pthreads_working=yes
+@@ -5828,7 +5828,7 @@
+
+ if test "$cross_compiling" = yes; then :
+
+- pthreads_working=no
++ pthreads_working=yes
+ case $host_alias in
+ *netware*)
+ pthreads_working=yes
+@@ -5894,7 +5894,7 @@
+
+ if test "$cross_compiling" = yes; then :
+
+- pthreads_working=no
++ pthreads_working=yes
+ case $host_alias in
+ *netware*)
+ pthreads_working=yes
+@@ -6342,7 +6342,7 @@
+
+ # Test that we're trying to configure with apache 1.x
+
+- 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)'
+ ac_IFS=$IFS
+ IFS="- /.
+ "
+@@ -8332,7 +8332,7 @@
+
+ fi
+ else
+- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
++ APACHE_THREADED_MPM="threaded: yes (fixed thread count)"
+ if test -n "$APACHE_THREADED_MPM"; then
+
+ enable_maintainer_zts=yes
+@@ -8450,7 +8450,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)'
+ ac_IFS=$IFS
+ IFS="- /.
+ "
+@@ -9156,7 +9156,7 @@
+
+ fi
+ else
+- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'`
++ APACHE_THREADED_MPM="threaded: yes (fixed thread count)"
+ if test -n "$APACHE_THREADED_MPM"; then
+
+ enable_maintainer_zts=yes
+@@ -9255,7 +9255,7 @@
+
+ # Test that we're trying to configure with apache 1.x
+
+- 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="- /.
+ "
+@@ -104127,7 +104127,7 @@
+
+ if test "$cross_compiling" = yes; then :
+
+- pthreads_working=no
++ pthreads_working=yes
+ case $host_alias in
+ *netware*)
+ pthreads_working=yes
+@@ -104183,7 +104183,7 @@
+
+ if test "$cross_compiling" = yes; then :
+
+- pthreads_working=no
++ pthreads_working=yes
+ case $host_alias in
+ *netware*)
+ pthreads_working=yes
+@@ -104249,7 +104249,7 @@
+
+ if test "$cross_compiling" = yes; then :
+
+- pthreads_working=no
++ pthreads_working=yes
+ case $host_alias in
+ *netware*)
+ pthreads_working=yes
diff --git a/package/php/php.mk b/package/php/php.mk
index 2e97c9a..0b32bca 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -50,6 +50,22 @@ PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CLI),,--disable-cli)
PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CGI),,--disable-cgi)
PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_FPM),--enable-fpm,--disable-fpm)
+ifeq ($(BR2_PACKAGE_PHP_APACHE),y)
+# this patchset is only needed when cross-compiling mod_php for Apache
+define PHP_PATCH_FOR_APACHE
+ patch -d $(@D) -p1 -E -i $(TOPDIR)/$(PKGDIR)php-04-cross-compile.only-for-apache
+endef
+PHP_POST_PATCH_HOOKS += PHP_PATCH_FOR_APACHE
+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 \
+ --enable-pthreads \
+ --localstatedir=/var
+PHP_DEPENDENCIES += apache
+endif
+
### Extensions
PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \
$(if $(BR2_PACKAGE_PHP_EXT_POSIX),--enable-posix) \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
` (6 preceding siblings ...)
2014-10-05 13:45 ` [Buildroot] [PATCH 8/8] package/php: Add Apache support Bernd Kuhls
@ 2014-10-05 14:42 ` Yann E. MORIN
2014-10-05 16:16 ` Thomas Petazzoni
7 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2014-10-05 14:42 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-10-05 15:45 +0200, Bernd Kuhls spake thusly:
> apr-0001-cross-compile.patch: Fix cross compilation
> Fix top_builddir in usr/build-1/apr_rules.mk
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/apr/apr-0001-cross-compile.patch | 53 ++++++++++++++++++++++++++++++
> package/apr/apr.mk | 7 +++-
> 2 files changed, 59 insertions(+), 1 deletion(-)
> create mode 100644 package/apr/apr-0001-cross-compile.patch
>
> diff --git a/package/apr/apr-0001-cross-compile.patch b/package/apr/apr-0001-cross-compile.patch
> new file mode 100644
> index 0000000..6bd1194
> --- /dev/null
> +++ b/package/apr/apr-0001-cross-compile.patch
> @@ -0,0 +1,53 @@
> +Fix cross-compilation
> +
> +Patch submitted upstream:
> +https://issues.apache.org/bugzilla/show_bug.cgi?id=57058
which is a bundle of upstream revisions:
http://svn.apache.org/viewvc?view=revision&revision=1327907
http://svn.apache.org/viewvc?view=revision&revision=1328390
http://svn.apache.org/viewvc?view=revision&revision=1328714
[--SNIP rest of patch--]
> diff --git a/package/apr/apr.mk b/package/apr/apr.mk
> index 1a4c0e2..bdf4c78 100644
> --- a/package/apr/apr.mk
> +++ b/package/apr/apr.mk
> @@ -4,12 +4,15 @@
> #
> ################################################################################
>
> -APR_VERSION = 1.4.8
> +APR_VERSION = 1.5.1
> APR_SITE = http://archive.apache.org/dist/apr
> APR_LICENSE = Apache-2.0
> APR_LICENSE_FILES = LICENSE
> APR_INSTALL_STAGING = YES
> +APR_AUTORECONF = YES
Usually, we explicit why autoreconf is needed:
# We have a patch touching configure.in and Makefile.in,
# so we need to autoreconf:
APR_AUTORECONF = YES
With the above two, you can add my:
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> APR_CONF_ENV = \
> + CC_FOR_BUILD="$(HOSTCC)" \
> + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
> ac_cv_file__dev_zero=yes \
> ac_cv_func_setpgrp_void=yes \
> apr_cv_process_shared_works=yes \
> @@ -35,6 +38,8 @@ define APR_FIXUP_RULES_MK
> $(STAGING_DIR)/usr/build-1/apr_rules.mk
> $(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \
> $(STAGING_DIR)/usr/build-1/apr_rules.mk
> + $(SED) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \
> + $(STAGING_DIR)/usr/build-1/apr_rules.mk
> endef
>
> APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK
> --
> 1.7.10.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies
2014-10-05 13:45 ` [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies Bernd Kuhls
@ 2014-10-05 14:45 ` Yann E. MORIN
2014-10-05 16:01 ` Thomas Petazzoni
1 sibling, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2014-10-05 14:45 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-10-05 15:45 +0200, Bernd Kuhls spake thusly:
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
However, this should go first in the series.
Regards,
Yann E. MORIN.
> ---
> package/apr-util/Config.in | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in
> index 3d4ec23..fcef693 100644
> --- a/package/apr-util/Config.in
> +++ b/package/apr-util/Config.in
> @@ -12,3 +12,7 @@ config BR2_PACKAGE_APR_UTIL
> The utility library for the apache runtime project
>
> http://apr.apache.org/
> +
> +comment "apr-util needs a toolchain w/ dynamic library"
> + depends on BR2_USE_MMU
> + depends on BR2_PREFER_STATIC_LIB
> --
> 1.7.10.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 2/8] package/apr: Fix detection of rlimit and large file support
2014-10-05 13:45 ` [Buildroot] [PATCH 2/8] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
@ 2014-10-05 14:48 ` Yann E. MORIN
0 siblings, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2014-10-05 14:48 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-10-05 15:45 +0200, Bernd Kuhls spake thusly:
> Snippets from configure log:
>
> before:
> checking whether to enable -D_LARGEFILE64_SOURCE... no
> ...
> checking struct rlimit... no
>
> after
> checking whether to enable -D_LARGEFILE64_SOURCE... (cached) yes
> ...
> checking struct rlimit... (cached) yes
Is that a failure introduced with the bump to 1.5.1?
If so, this should be done in the same patch as the bump.
If not, and it was already present with 1.4.8, it should be done before
the bump.
Regards,
Yann E. MORIN.
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/apr/apr.mk | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/package/apr/apr.mk b/package/apr/apr.mk
> index bdf4c78..82b1ad2 100644
> --- a/package/apr/apr.mk
> +++ b/package/apr/apr.mk
> @@ -19,6 +19,7 @@ APR_CONF_ENV = \
> apr_cv_mutex_robust_shared=no \
> apr_cv_tcp_nodelay_with_cork=yes \
> ac_cv_sizeof_struct_iovec=8 \
> + ac_cv_struct_rlimit=yes \
> apr_cv_mutex_recursive=yes
> APR_CONFIG_SCRIPTS = apr-1-config
>
> @@ -27,6 +28,11 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
> APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
> endif
>
> +# Fix lfs detection when cross compiling
> +ifeq ($(BR2_LARGEFILE),y)
> +APR_CONF_ENV += apr_cv_use_lfs64=yes
> +endif
> +
> define APR_CLEANUP_UNNEEDED_FILES
> $(RM) -rf $(TARGET_DIR)/usr/build-1/
> endef
> --
> 1.7.10.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 5/8] package/apr-util: Rework dependencies
2014-10-05 13:45 ` [Buildroot] [PATCH 5/8] package/apr-util: Rework dependencies Bernd Kuhls
@ 2014-10-05 15:00 ` Yann E. MORIN
0 siblings, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2014-10-05 15:00 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-10-05 15:45 +0200, Bernd Kuhls spake thusly:
> - add expat hard-dependency, when missing apr-util compiles its own expat
> - all database libs are optional
> - add optional OpenSSL support
> - remove unused dependencies neon and zlib
I'd prefer those are done in separate patches:
- add hard-dependency to expat
- remove unused neon and zlib
- make sqlite optional
- add optional bdb
- add optional gdbm
- add optional mysql
- add optional openssl
Also, see below for additional comments...
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[--SNIP--]
> diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk
> index 3e9ce54..4d5d988 100644
> --- a/package/apr-util/apr-util.mk
> +++ b/package/apr-util/apr-util.mk
> @@ -9,7 +9,7 @@ APR_UTIL_SITE = http://archive.apache.org/dist/apr
> APR_UTIL_LICENSE = Apache-2.0
> APR_UTIL_LICENSE_FILES = LICENSE
> APR_UTIL_INSTALL_STAGING = YES
> -APR_UTIL_DEPENDENCIES = apr sqlite neon zlib
> +APR_UTIL_DEPENDENCIES = apr expat
> APR_UTIL_CONF_OPTS = \
> --with-apr=$(STAGING_DIR)/usr/bin/apr-1-config
> APR_UTIL_CONFIG_SCRIPTS = apu-1-config
> @@ -18,4 +18,39 @@ APR_UTIL_CONFIG_SCRIPTS = apu-1-config
> # features.
> APR_UTIL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
>
> +ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
> +APR_UTIL_CONF_OPTS += --with-dbm=db53 --with-berkeley-db="$(STAGING_DIR)/usr"
> +APR_UTIL_DEPENDENCIES += berkeleydb
> +else
> +APR_UTIL_CONF_OPTS += --without-berkeley-db
> +endif
> +
> +ifeq ($(BR2_PACKAGE_GDBM),y)
> +APR_UTIL_CONF_OPTS += --with-gdbm="$(STAGING_DIR)/usr"
> +APR_UTIL_DEPENDENCIES += gdbm
> +else
> +APR_UTIL_CONF_OPTS += --without-gdbm
> +endif
> +
> +ifeq ($(BR2_PACKAGE_MYSQL),y)
> +APR_UTIL_CONF_OPTS += --with-mysql="$(STAGING_DIR)/usr"
> +APR_UTIL_DEPENDENCIES += mysql
> +else
> +APR_UTIL_CONF_OPTS += --without-mysql
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENSSL),y)
> +APR_UTIL_CONF_OPTS += --with-crypto --with-openssl="$(STAGING_DIR)/usr"
> +APR_UTIL_DEPENDENCIES += openssl
> +else
> +APR_UTIL_CONF_OPTS += --without-ssl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_SQLITE),y)
> +APR_UTIL_CONF_OPTS += --with-sqlite3="$(STAGING_DIR)/usr"
> +APR_UTIL_DEPENDENCIES += sqlite
> +else
> +APR_UTIL_CONF_OPTS += --without-sqlite3
> +endif
I see you use an alphabetical order. I would prefer they be sorted by
category, and then alphabetically:
- bdb
- gdbm
- mysql
- sqlite
- openssl
It seems more logical to me (personal preference), but I won't care much
either way.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 6/8] package/apr: Fix for Apache when listening to multiple ports
2014-10-05 13:45 ` [Buildroot] [PATCH 6/8] package/apr: Fix for Apache when listening to multiple ports Bernd Kuhls
@ 2014-10-05 15:04 ` Yann E. MORIN
0 siblings, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2014-10-05 15:04 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-10-05 15:45 +0200, Bernd Kuhls spake thusly:
> For details:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=56727#c6
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> package/apr/apr.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/apr/apr.mk b/package/apr/apr.mk
> index 82b1ad2..7eda611 100644
> --- a/package/apr/apr.mk
> +++ b/package/apr/apr.mk
> @@ -20,6 +20,7 @@ APR_CONF_ENV = \
> apr_cv_tcp_nodelay_with_cork=yes \
> ac_cv_sizeof_struct_iovec=8 \
> ac_cv_struct_rlimit=yes \
> + ac_cv_o_nonblock_inherited=no \
> apr_cv_mutex_recursive=yes
> APR_CONFIG_SCRIPTS = apr-1-config
>
> --
> 1.7.10.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 7/8] Apache: New package
2014-10-05 13:45 ` [Buildroot] [PATCH 7/8] Apache: New package Bernd Kuhls
@ 2014-10-05 15:23 ` Yann E. MORIN
0 siblings, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2014-10-05 15:23 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-10-05 15:45 +0200, Bernd Kuhls spake thusly:
[--SNIP--]
> diff --git a/package/apache/apache-0001-cross-compile.patch b/package/apache/apache-0001-cross-compile.patch
> new file mode 100644
> index 0000000..05e99dd
> --- /dev/null
> +++ b/package/apache/apache-0001-cross-compile.patch
> @@ -0,0 +1,58 @@
> +Fix cross-compilation
> +
> +Fetched httpd-2.4.x-cross_compile.diff from upstream bugtracker:
> +https://issues.apache.org/bugzilla/show_bug.cgi?id=51257#c6
which is a bundle of upstream revisions:
http://svn.apache.org/viewvc?view=revision&revision=1327907
http://svn.apache.org/viewvc?view=revision&revision=1328390
http://svn.apache.org/viewvc?view=revision&revision=1328714
;-)
[--SNIP--]
> diff --git a/package/apache/apache.mk b/package/apache/apache.mk
> new file mode 100644
> index 0000000..d525024
> --- /dev/null
> +++ b/package/apache/apache.mk
> @@ -0,0 +1,42 @@
> +################################################################################
> +#
> +# apache
> +#
> +################################################################################
> +
> +APACHE_VERSION = 2.4.10
> +APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
> +APACHE_SITE = http://archive.apache.org/dist/httpd
> +APACHE_LICENSE = Apache-2.0
> +APACHE_LICENSE_FILES = LICENSE
> +APACHE_INSTALL_STAGING = YES
Why do you meed to install it in staging?
Answer: I guess that's becasue apache installs headers and libs so that
it is possible to build out-of-apache modules. Right?
Say so, because it is not obvious.
> +APACHE_AUTORECONF = YES
Ditto as for apr: short explanation why autoreconf is needed.
> +APACHE_DEPENDENCIES = apr-util pcre
Apache does not need apr directly, too?
> +APACHE_CONF_ENV= \
> + CC_FOR_BUILD="$(HOSTCC)" \
> + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
> + ap_cv_void_ptr_lt_long=no \
> + PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config
> +
> +APACHE_CONF_OPTS = \
> + --sysconfdir=/etc/apache2 \
> + --with-apr=$(STAGING_DIR)/usr \
> + --with-apr-util=$(STAGING_DIR)/usr \
> + --with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
> + --enable-http \
> + --enable-dbd \
> + --enable-proxy \
> + --enable-mime-magic \
> + --without-suexec-bin \
> + --enable-mods-shared=all \
> + --with-mpm=worker \
This could later be made a choice option.
> + --enable-nonportable-atomics=yes
Can you shade some explanations to this one? How would it work with:
BR2_ARCH_HAS_ATOMICS
Regards,
Yann E. MORIN.
> +define APACHE_FIX_STAGING_APACHE_CONFIG
> + $(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
> + $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
> +endef
> +APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG
> +
> +$(eval $(autotools-package))
> --
> 1.7.10.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 8/8] package/php: Add Apache support
2014-10-05 13:45 ` [Buildroot] [PATCH 8/8] package/php: Add Apache support Bernd Kuhls
@ 2014-10-05 15:56 ` Yann E. MORIN
2014-10-05 16:48 ` Gustavo Zacarias
0 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2014-10-05 15:56 UTC (permalink / raw)
To: buildroot
Bernd, All,
On 2014-10-05 15:45 +0200, Bernd Kuhls spake thusly:
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/php/Config.in | 17 +++
> package/php/php-04-cross-compile.only-for-apache | 131 ++++++++++++++++++++++
> package/php/php.mk | 16 +++
> 3 files changed, 164 insertions(+)
> create mode 100644 package/php/php-04-cross-compile.only-for-apache
>
> diff --git a/package/php/Config.in b/package/php/Config.in
> index 32faa32..db4e647 100644
> --- a/package/php/Config.in
> +++ b/package/php/Config.in
> @@ -11,6 +11,9 @@ if BR2_PACKAGE_PHP
>
> source "package/php/Config.ext"
>
> +config BR2_PACKAGE_PHP_APACHE
> + bool
> +
> config BR2_PACKAGE_PHP_CLI
> bool
>
> @@ -26,6 +29,20 @@ choice
> help
> Select the PHP interface(s).
>
> +config BR2_PACKAGE_PHP_SAPI_APACHE
> + bool "Apache"
> + select BR2_PACKAGE_APACHE
> + select BR2_PACKAGE_PHP_APACHE
> + depends on !BR2_PREFER_STATIC_LIB # apache
> + depends on BR2_TOOLCHAIN_HAS_THREADS # apache
> + depends on BR2_USE_MMU # apr
> + help
> + Apache module
> +
> +comment "apache module needs a toolchain w/ dynamic library, threads"
> + depends on BR2_USE_MMU
> + depends on BR2_PREFER_STATIC_LIB || !BR2_TOOLCHAIN_HAS_THREADS
> +
Unrelated to your patch, but this choice is getting ugly. Maybe we should
switch to something like:
config BR2_PACKAGE_PHP
bool "php"
select BR2_PACKAGE_PHP_SAPI_CGI if !BR2_PACKAGE_PHP_HAS_SAPI
config BR2_PACKAGE_PHP_HAS_SAPI
bool
config BR2_PACKAGE_PHP_SAPI_CGI
bool "CGI"
config BR2_PACKAGE_PHP_SAPI_CLI
bool "CLI"
select BR2_PACKAGE_PHP_HAS_SAPI
config BR2_PACKAGE_PHP_SAPI_APACHE
bool "Apache"
select BR2_PACKAGE_PHP_HAS_SAPI
config BR2_PACKAGE_PHP_SAPI_FPM
bool "FPM"
select BR2_PACKAGE_PHP_HAS_SAPI
That way, we ensure at least one is selected, which was the initial
reason for the choice, while stil allowing multiple to be selected.
Then, if some are incompatible, we could do, for example:
config BR2_PACKAGE_PHP_SAPI_APACHE
bool "Apache"
depends on !BR2_PACKAGE_PHP_SAPI_CLI
select BR2_PACKAGE_PHP_HAS_SAPI
> config BR2_PACKAGE_PHP_SAPI_CGI
> bool "CGI"
> # CGI uses fork()
> diff --git a/package/php/php-04-cross-compile.only-for-apache b/package/php/php-04-cross-compile.only-for-apache
> new file mode 100644
> index 0000000..a72befc
> --- /dev/null
> +++ b/package/php/php-04-cross-compile.only-for-apache
> @@ -0,0 +1,131 @@
> +Fix cross-compilation when used as Apache module.
> +
> +Apache is configured to use the worker MPM which depends on threads.
> +As PHP?s phtread detection is broken in a cross-compile environment, it is not
> +possible to apply this patch unconditionally, since php itself works without
> +thread support,
I have to say I do not like this much. How complex would it be to have a
proper patch that would work both with apache enabled or disabled?
We should try to have such a patch, and push it upstream.
[--SNIP--]
> diff --git a/package/php/php.mk b/package/php/php.mk
> index 2e97c9a..0b32bca 100644
> --- a/package/php/php.mk
> +++ b/package/php/php.mk
> @@ -50,6 +50,22 @@ PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CLI),,--disable-cli)
> PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CGI),,--disable-cgi)
> PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_FPM),--enable-fpm,--disable-fpm)
>
> +ifeq ($(BR2_PACKAGE_PHP_APACHE),y)
> +# this patchset is only needed when cross-compiling mod_php for Apache
> +define PHP_PATCH_FOR_APACHE
> + patch -d $(@D) -p1 -E -i $(TOPDIR)/$(PKGDIR)php-04-cross-compile.only-for-apache
Yes, $(PKGDIR) already has a trailing '/', for for readability, I'd
prefer we add one here. Multiple '/' in a path are innocuous.
Regards,
Yann E. MORIN.
> +endef
> +PHP_POST_PATCH_HOOKS += PHP_PATCH_FOR_APACHE
> +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 \
> + --enable-pthreads \
> + --localstatedir=/var
> +PHP_DEPENDENCIES += apache
> +endif
> +
> ### Extensions
> PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \
> $(if $(BR2_PACKAGE_PHP_EXT_POSIX),--enable-posix) \
> --
> 1.7.10.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies
2014-10-05 13:45 ` [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies Bernd Kuhls
2014-10-05 14:45 ` Yann E. MORIN
@ 2014-10-05 16:01 ` Thomas Petazzoni
1 sibling, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2014-10-05 16:01 UTC (permalink / raw)
To: buildroot
Dear Bernd Kuhls,
On Sun, 5 Oct 2014 15:45:13 +0200, Bernd Kuhls wrote:
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/apr-util/Config.in | 4 ++++
> 1 file changed, 4 insertions(+)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1
2014-10-05 14:42 ` [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Yann E. MORIN
@ 2014-10-05 16:16 ` Thomas Petazzoni
2014-10-05 16:30 ` Bernd Kuhls
0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2014-10-05 16:16 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Sun, 5 Oct 2014 16:42:48 +0200, Yann E. MORIN wrote:
> > diff --git a/package/apr/apr-0001-cross-compile.patch b/package/apr/apr-0001-cross-compile.patch
> > new file mode 100644
> > index 0000000..6bd1194
> > --- /dev/null
> > +++ b/package/apr/apr-0001-cross-compile.patch
> > @@ -0,0 +1,53 @@
> > +Fix cross-compilation
> > +
> > +Patch submitted upstream:
> > +https://issues.apache.org/bugzilla/show_bug.cgi?id=57058
>
> which is a bundle of upstream revisions:
> http://svn.apache.org/viewvc?view=revision&revision=1327907
> http://svn.apache.org/viewvc?view=revision&revision=1328390
> http://svn.apache.org/viewvc?view=revision&revision=1328714
I'm confused: if some pieces of code are already upstream and
backported, why do they need to be submitted upstream again?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1
2014-10-05 16:16 ` Thomas Petazzoni
@ 2014-10-05 16:30 ` Bernd Kuhls
0 siblings, 0 replies; 19+ messages in thread
From: Bernd Kuhls @ 2014-10-05 16:30 UTC (permalink / raw)
To: buildroot
Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
@public.gmane.org> wrote in news:20141005181638.2614c86f at free-electrons.com:
> I'm confused: if some pieces of code are already upstream and
> backported, why do they need to be submitted upstream again?
Hi Thomas,
both Apache httpd and standalone apr contain the source for gen_test_char,
the cross-compile patches were only applied to the build system of httpd, not
apr, therefore the need for the backport.
Regards, Bernd
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Buildroot] [PATCH 8/8] package/php: Add Apache support
2014-10-05 15:56 ` Yann E. MORIN
@ 2014-10-05 16:48 ` Gustavo Zacarias
0 siblings, 0 replies; 19+ messages in thread
From: Gustavo Zacarias @ 2014-10-05 16:48 UTC (permalink / raw)
To: buildroot
On 10/05/2014 12:56 PM, Yann E. MORIN wrote:
> Unrelated to your patch, but this choice is getting ugly. Maybe we should
> switch to something like:
>
> config BR2_PACKAGE_PHP
> bool "php"
> select BR2_PACKAGE_PHP_SAPI_CGI if !BR2_PACKAGE_PHP_HAS_SAPI
>
> config BR2_PACKAGE_PHP_HAS_SAPI
> bool
>
> config BR2_PACKAGE_PHP_SAPI_CGI
> bool "CGI"
>
> config BR2_PACKAGE_PHP_SAPI_CLI
> bool "CLI"
> select BR2_PACKAGE_PHP_HAS_SAPI
>
> config BR2_PACKAGE_PHP_SAPI_APACHE
> bool "Apache"
> select BR2_PACKAGE_PHP_HAS_SAPI
>
> config BR2_PACKAGE_PHP_SAPI_FPM
> bool "FPM"
> select BR2_PACKAGE_PHP_HAS_SAPI
>
> That way, we ensure at least one is selected, which was the initial
> reason for the choice, while stil allowing multiple to be selected.
+1 the choice is going wild.
> Then, if some are incompatible, we could do, for example:
AFAIK you can combine anything the way you like as long as the
dependencies are met since the php build system rebuilds for each case.
Regards.
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2014-10-05 16:48 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-05 13:45 [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Bernd Kuhls
2014-10-05 13:45 ` [Buildroot] [PATCH 2/8] package/apr: Fix detection of rlimit and large file support Bernd Kuhls
2014-10-05 14:48 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 3/8] package/apr-util: Add comment to describe toolchain dependencies Bernd Kuhls
2014-10-05 14:45 ` Yann E. MORIN
2014-10-05 16:01 ` Thomas Petazzoni
2014-10-05 13:45 ` [Buildroot] [PATCH 4/8] package/apr-util: Bump version to 1.5.4 Bernd Kuhls
2014-10-05 13:45 ` [Buildroot] [PATCH 5/8] package/apr-util: Rework dependencies Bernd Kuhls
2014-10-05 15:00 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 6/8] package/apr: Fix for Apache when listening to multiple ports Bernd Kuhls
2014-10-05 15:04 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 7/8] Apache: New package Bernd Kuhls
2014-10-05 15:23 ` Yann E. MORIN
2014-10-05 13:45 ` [Buildroot] [PATCH 8/8] package/php: Add Apache support Bernd Kuhls
2014-10-05 15:56 ` Yann E. MORIN
2014-10-05 16:48 ` Gustavo Zacarias
2014-10-05 14:42 ` [Buildroot] [PATCH 1/8] package/apr: Bump version to 1.5.1 Yann E. MORIN
2014-10-05 16:16 ` Thomas Petazzoni
2014-10-05 16:30 ` Bernd Kuhls
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).