Discussion:
[yocto] [PATCH] nginx: module: add ngx-http-auth-pam-module
Kosta Zertsekel
2018-11-01 18:50:42 UTC
Permalink
NGINX support adding third-party modules.
These modules are created and maintained by members of the NGINX community.
NGINX, Inc. provides support for some of these modules.

Each module is developed as a separate git project, but can be compiled
only as part of NGINX compilation using `--add-module` parameter.

Signed-off-by: Kosta Zertsekel <***@gmail.com>
---
recipes-httpd/nginx/nginx_%.bbappend | 5 ++++
.../ngx-http-auth-pam-module_git.bb | 24 +++++++++++++++++++
2 files changed, 29 insertions(+)
create mode 100644 recipes-httpd/nginx/nginx_%.bbappend
create mode 100644 recipes-ngx-http-auth-pam-module/ngx-http-auth-pam-module/ngx-http-auth-pam-module_git.bb

diff --git a/recipes-httpd/nginx/nginx_%.bbappend b/recipes-httpd/nginx/nginx_%.bbappend
new file mode 100644
index 0000000..d3ed1bf
--- /dev/null
+++ b/recipes-httpd/nginx/nginx_%.bbappend
@@ -0,0 +1,5 @@
+DEPENDS += "ngx-http-auth-pam-module"
+
+EXTRA_OECONF += " \
+ --add-module=${STAGING_DIR_TARGET}/ngx-http-auth-pam-module \
+"
diff --git a/recipes-ngx-http-auth-pam-module/ngx-http-auth-pam-module/ngx-http-auth-pam-module_git.bb b/recipes-ngx-http-auth-pam-module/ngx-http-auth-pam-module/ngx-http-auth-pam-module_git.bb
new file mode 100644
index 0000000..8f13c3f
--- /dev/null
+++ b/recipes-ngx-http-auth-pam-module/ngx-http-auth-pam-module/ngx-http-auth-pam-module_git.bb
@@ -0,0 +1,24 @@
+LICENSE = "Unknown"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1eccc8f95bc958cb0e1569c433286a22"
+
+SRC_URI = "git://github.com/sto/ngx_http_auth_pam_module;protocol=https"
+
+PV = "1.5+git${SRCPV}"
+SRCREV = "d9286fc7b52e1a3584da2cb20423f912ec99169f"
+
+S = "${WORKDIR}/git"
+
+SYSROOT_DIRS += "/${PN}"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+# Nginx module is compiled as part of nginx build using --add-module,
+# hence, just copy the sources here to be picked up by nginx later.
+do_install () {
+ cd ${S}
+ git checkout-index -a --prefix=${D}/${PN}/
+ cd -
+}
+
+FILES_${PN} = "${PN}/*"
--
2.17.1

--
Kosta Zertsekel
2018-11-01 18:53:22 UTC
Permalink
Guys,

I sent the commit to discuss if this is the right way to include NGINX
module in the customization layer.
It actully compiles OK and works in run-time on target.
But, again, I'm looking for the **right** way to do it.
I'll be happy to get some feedback.

Thanks,
--- Kosta Z
--

Loading...