RFC: Proper way of adding Apache modules
cover RFC: Proper way of adding Apache modules
Hi,
Here is a simple module for the Apache web server. The build process uses a tool, apxs, that builds the module. But it seems its configuration file, output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/build/config_vars.mk is not quite right as the install steps failed. I worked around by calling libtool --install directly from the apache-mod-auth-tkt.mk file.
I have another module to build that is more complicated, mod_fcgid. This one will not build with apxs configured the way it is.
In my old openembedded environment, I unpacked the mod_fcgid directly inside the apache source tree and built all from there, simply adding fcgid to the apache --enable-mods-shared= configure option.
What should I do in buildroot?
Mickael Chazaux (1):
Apache mod_auth_tkt : new package
package/Config.in | 1 + package/apache-mod-auth-tkt/Config.in | 5 ++++ package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk | 31 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 package/apache-mod-auth-tkt/Config.in create mode 100644 package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk
Signature · 1 line
2.1.4
PATCH 1/1 Apache mod_auth_tkt : new package
--- package/Config.in | 1 + package/apache-mod-auth-tkt/Config.in | 5 ++++ package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk | 31 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 package/apache-mod-auth-tkt/Config.in create mode 100644 package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk
package/Config.in +1 -0
@@ -1366,6 +1366,7 @@ menu "Networking applications" source "package/aiccu/Config.in" source "package/aircrack-ng/Config.in" source "package/apache/Config.in" + source "package/apache-mod-auth-tkt/Config.in" source "package/argus/Config.in" source "package/arptables/Config.in" source "package/atftp/Config.in"
package/apache-mod-auth-tkt/Config.in new file +5 -0
@@ -0,0 +1,5 @@ +config BR2_PACKAGE_APACHE_MOD_AUTH_TKT + bool "Apache Module mod_auth_tkt" + help + Lightweight single-signon authentication module for Apache +
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +31 -0
@@ -0,0 +1,31 @@ +################################################################################ +# +# mod_auth_tkt +# +################################################################################ + +APACHE_MOD_AUTH_TKT_DEPENDENCIES=apache + +APACHE_MOD_AUTH_TKT_VERSION=2.3.99b1 +APACHE_MOD_AUTH_TKT_SITE="https://github.com/gavincarr/mod_auth_tkt/archive/" +APACHE_MOD_AUTH_TKT_SOURCE=2.3.99b1.tar.gz + + +define APACHE_MOD_AUTH_TKT_BUILD_CMDS + (cd $(@D) && ./configure --apxs=$(STAGING_DIR)/usr/bin/apxs --apachever=2.4) + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) +endef + +define APACHE_MOD_AUTH_TKT_INSTALL_TARGET_CMDS + (cd $(@D)/src && \ + $(LIBTOOL) --mode=install install mod_auth_tkt.la $(TARGET_DIR)/usr/modules/ \ + ) +endef + +define APACHE_MOD_AUTH_TKT_INSTALL_STAGING_CMDS + (cd $(@D)/src && \ + $(LIBTOOL) --mode=install install mod_auth_tkt.la $(STAGING_DIR)/usr/modules/ \ + ) +endef + +$(eval $(generic-package))
Signature · 1 line
2.1.4
PATCH 1/1 Apache mod_auth_tkt : new package
Mickael, All,
On 2016-06-10 13:00 +0200, Mickael Chazaux spake thusly:
Quoted 14 lines
Signed-off-by Mickael Chazaux <[email protected]>--- package/Config.in | 1 + package/apache-mod-auth-tkt/Config.in | 5 ++++ package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk | 31 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 package/apache-mod-auth-tkt/Config.in create mode 100644 package/apache-mod-auth-tkt/apache-mod-auth-tkt.mkpackage/Config.in +0
-0
package/Config.in menu "Networking applications" · line 1369
Quoted 4 lines
package/Config.in +1
-0@@ -1366,6 +1366,7 @@ menu "Networking applications" source "package/aiccu/Config.in" source "package/aircrack-ng/Config.in" source "package/apache/Config.in" + source "package/apache-mod-auth-tkt/Config.in"
Indentation is a TAB, not 8 spaces.
package/apache-mod-auth-tkt/Config.in line 2
Quoted 11 lines
package/Config.in +0
-0source "package/argus/Config.in" source "package/arptables/Config.in" source "package/atftp/Config.in"package/apache-mod-auth-tkt/Config.in new file +2
-0@@ -0,0 +1,5 @@ +config BR2_PACKAGE_APACHE_MOD_AUTH_TKT + bool "Apache Module mod_auth_tkt"
This should depend on apache, no?
Quoted 14 lines
package/apache-mod-auth-tkt/Config.in new file +3
-0+ help + Lightweight single-signon authentication module for Apache +package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +5
-0@@ -0,0 +1,31 @@ +################################################################################ +# +# mod_auth_tkt +# +################################################################################
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 15
Quoted 10 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +10
-0+ +APACHE_MOD_AUTH_TKT_DEPENDENCIES=apache + +APACHE_MOD_AUTH_TKT_VERSION=2.3.99b1 +APACHE_MOD_AUTH_TKT_SITE="https://github.com/gavincarr/mod_auth_tkt/archive/" +APACHE_MOD_AUTH_TKT_SOURCE=2.3.99b1.tar.gz + + +define APACHE_MOD_AUTH_TKT_BUILD_CMDS + (cd $(@D) && ./configure --apxs=$(STAGING_DIR)/usr/bin/apxs --apachever=2.4)
This first line should go in APACHE_MOD_AUTH_TKT_CONFIGURE_CMDS. Besides, parenthesis are not needed:
define APACHE_MOD_AUTH_TKT_CONFIGURE_CMDS
cd $(@D) && ./configure --apxs=$(STAGING_DIR)/usr/bin/apxs \
--apachever=2.4
endefpackage/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 16
Quoted 1 line
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +1
-0+ $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D)
What about CFLAGS and LDFLAGS?
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 22
Quoted 6 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +6
-0+endef + +define APACHE_MOD_AUTH_TKT_INSTALL_TARGET_CMDS + (cd $(@D)/src && \ + $(LIBTOOL) --mode=install install mod_auth_tkt.la $(TARGET_DIR)/usr/modules/ \ + )
Parenthesis not required.
And yes, that's probably the simplest solution. The install procedure for that module is definitely not cross-aware; it's not possible to install out of tree.
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 28
Quoted 6 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +6
-0+endef + +define APACHE_MOD_AUTH_TKT_INSTALL_STAGING_CMDS + (cd $(@D)/src && \ + $(LIBTOOL) --mode=install install mod_auth_tkt.la $(STAGING_DIR)/usr/modules/ \ + )
Why is it necessary to install it in staging? I would expect apache modules to only be needed at runtime, since they are dlopened.
Regards,
Yann E. MORIN.
Quoted 10 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +3
-0+endef + +$(eval $(generic-package))Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Apache mod_auth_tkt : new package
Mickael, All,
On 2016-06-18 14:57 +0200, Yann E. MORIN spake thusly:
Quoted 9 lines
On 2016-06-10 13:00 +0200, Mickael Chazaux spake thusly:
Quoted 8 lines
Signed-off-by Mickael Chazaux <[email protected]>--- package/Config.in | 1 + package/apache-mod-auth-tkt/Config.in | 5 ++++ package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk | 31 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 package/apache-mod-auth-tkt/Config.in create mode 100644 package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk
I've made some comments on this patch about a month ago. I've now marked it as Changes Requested in our patchwork while waiting for your next iteration of the patch.
Thanks! :-)
Regards,
Yann E. MORIN.
Quoted 111 lines
package/Config.in menu "Networking applications" · line 1369
Quoted 9 lines
package/Config.in +1
-0@@ -1366,6 +1366,7 @@ menu "Networking applications" source "package/aiccu/Config.in" source "package/aircrack-ng/Config.in" source "package/apache/Config.in" + source "package/apache-mod-auth-tkt/Config.in"Indentation is a TAB, not 8 spaces.
package/apache-mod-auth-tkt/Config.in line 2
Quoted 11 lines
package/Config.in +0
-0source "package/argus/Config.in" source "package/arptables/Config.in" source "package/atftp/Config.in"package/apache-mod-auth-tkt/Config.in new file +2
-0@@ -0,0 +1,5 @@ +config BR2_PACKAGE_APACHE_MOD_AUTH_TKT + bool "Apache Module mod_auth_tkt"This should depend on apache, no?
Quoted 14 lines
package/apache-mod-auth-tkt/Config.in new file +3
-0+ help + Lightweight single-signon authentication module for Apache +package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +5
-0@@ -0,0 +1,31 @@ +################################################################################ +# +# mod_auth_tkt +# +################################################################################package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 15
Quoted 10 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +10
-0+ +APACHE_MOD_AUTH_TKT_DEPENDENCIES=apache + +APACHE_MOD_AUTH_TKT_VERSION=2.3.99b1 +APACHE_MOD_AUTH_TKT_SITE="https://github.com/gavincarr/mod_auth_tkt/archive/" +APACHE_MOD_AUTH_TKT_SOURCE=2.3.99b1.tar.gz + + +define APACHE_MOD_AUTH_TKT_BUILD_CMDS + (cd $(@D) && ./configure --apxs=$(STAGING_DIR)/usr/bin/apxs --apachever=2.4)This first line should go in
APACHE_MOD_AUTH_TKT_CONFIGURE_CMDS. Besides, parenthesis are not needed:define APACHE_MOD_AUTH_TKT_CONFIGURE_CMDS cd $(@D) && ./configure --apxs=$(STAGING_DIR)/usr/bin/apxs \ --apachever=2.4 endefpackage/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 16
Quoted 1 line
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +1
-0+ $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D)What about CFLAGS and LDFLAGS?
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 22
Quoted 6 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +6
-0+endef + +define APACHE_MOD_AUTH_TKT_INSTALL_TARGET_CMDS + (cd $(@D)/src && \ + $(LIBTOOL) --mode=install install mod_auth_tkt.la $(TARGET_DIR)/usr/modules/ \ + )Parenthesis not required.
And yes, that's probably the simplest solution. The install procedure for that module is definitely not cross-aware; it's not possible to install out of tree.
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk line 28
Quoted 6 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +6
-0+endef + +define APACHE_MOD_AUTH_TKT_INSTALL_STAGING_CMDS + (cd $(@D)/src && \ + $(LIBTOOL) --mode=install install mod_auth_tkt.la $(STAGING_DIR)/usr/modules/ \ + )Why is it necessary to install it in staging? I would expect apache modules to only be needed at runtime, since they are dlopened.
Regards,
Yann E. MORIN.Quoted 10 lines
package/apache-mod-auth-tkt/apache-mod-auth-tkt.mk new file +3
-0+endef + +$(eval $(generic-package))Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildrootSignature · 10 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'