diff mbox

[1/1] nginx-upload-module: add openssl lib dependency

Message ID 1500782443-1515-1-git-send-email-matthew.weber@rockwellcollins.com
State Superseded
Headers show

Commit Message

Matt Weber July 23, 2017, 4 a.m. UTC
When building against nginx 1.11.2+, requires additional
-lcrypto dependency. (Nginx changed crypto approach
and dependencies for openssl are no longer default)

Upstream pull request:
https://github.com/vkholodkov/nginx-upload-module/pull/93

Fixes:
http://autobuild.buildroot.net/results/e25f8ba8d8743e47a77707cf582e58477e1860e6
http://autobuild.buildroot.net/results/c4aa6e22033be934bd311cd9761f646d44618dc0
http://autobuild.buildroot.net/results/75e935d248b46df11c32c95526423a2287ac8c62

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
 ...-upload-module-add-openssl-lib-dependency.patch | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 package/nginx-upload/0001-nginx-upload-module-add-openssl-lib-dependency.patch

Comments

Arnout Vandecappelle July 23, 2017, 12:56 p.m. UTC | #1
On 23-07-17 06:00, Matt Weber wrote:
[snip]
> +From dcfb052988b333382fc7696fd811eb547734797a Mon Sep 17 00:00:00 2001
> +From: Matt Weber <matthew.weber@rockwellcollins.com>
> +Date: Sat, 22 Jul 2017 22:24:50 -0500
> +Subject: [PATCH 1/1] nginx-upload-module: add openssl lib dependency

 Please use git format-patch -N

[snip]
> +diff --git a/config b/config
> +index cabd4f1..4a77858 100644
> +--- a/config
> ++++ b/config
> +@@ -1,14 +1,13 @@
> +-USE_MD5=YES
> +-USE_SHA1=YES
> + ngx_addon_name=ngx_http_upload_module
> + 
> + if test -n "$ngx_module_link"; then
> +     ngx_module_type=HTTP
> +     ngx_module_name=$ngx_addon_name
> +     ngx_module_srcs="$ngx_addon_dir/ngx_http_upload_module.c"
> ++    ngx_module_libs=-lcrypto

 Is there any reason not to use pkg-config, like we do in nginx itself (in
0006-auto-lib-openssl-conf-use-pkg-config.patch)?

> + 
> +     . auto/module
> + else
> +     HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module"
> +     NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c"
> +-fi
> +\ No newline at end of file
> ++fi

 This hunk is not needed.

 Regards,
 Arnout

> +-- 
> +1.9.1
> +
>
Matt Weber July 23, 2017, 1:19 p.m. UTC | #2
Arnout,

On Sun, Jul 23, 2017 at 7:56 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
> On 23-07-17 06:00, Matt Weber wrote:
> [snip]
>> +From dcfb052988b333382fc7696fd811eb547734797a Mon Sep 17 00:00:00 2001
>> +From: Matt Weber <matthew.weber@rockwellcollins.com>
>> +Date: Sat, 22 Jul 2017 22:24:50 -0500
>> +Subject: [PATCH 1/1] nginx-upload-module: add openssl lib dependency
>
>  Please use git format-patch -N
>

Sure.

> [snip]
>> +diff --git a/config b/config
>> +index cabd4f1..4a77858 100644
>> +--- a/config
>> ++++ b/config
>> +@@ -1,14 +1,13 @@
>> +-USE_MD5=YES
>> +-USE_SHA1=YES
>> + ngx_addon_name=ngx_http_upload_module
>> +
>> + if test -n "$ngx_module_link"; then
>> +     ngx_module_type=HTTP
>> +     ngx_module_name=$ngx_addon_name
>> +     ngx_module_srcs="$ngx_addon_dir/ngx_http_upload_module.c"
>> ++    ngx_module_libs=-lcrypto
>
>  Is there any reason not to use pkg-config, like we do in nginx itself (in
> 0006-auto-lib-openssl-conf-use-pkg-config.patch)?

Yeah that should work, I'll rework and test.

>
>> +
>> +     . auto/module
>> + else
>> +     HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module"
>> +     NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c"
>> +-fi
>> +\ No newline at end of file
>> ++fi
>
>  This hunk is not needed.

Sure.

Thanks for the review,
Matt
Matt Weber July 23, 2017, 2:31 p.m. UTC | #3
Arnout/All,

On Sun, Jul 23, 2017 at 8:19 AM, Matthew Weber
<matthew.weber@rockwellcollins.com> wrote:
> Arnout,
>
> On Sun, Jul 23, 2017 at 7:56 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
>>
>>
>> On 23-07-17 06:00, Matt Weber wrote:
>> [snip]
>>> +From dcfb052988b333382fc7696fd811eb547734797a Mon Sep 17 00:00:00 2001
>>> +From: Matt Weber <matthew.weber@rockwellcollins.com>
>>> +Date: Sat, 22 Jul 2017 22:24:50 -0500
>>> +Subject: [PATCH 1/1] nginx-upload-module: add openssl lib dependency
>>
>>  Please use git format-patch -N
>>
>
> Sure.
>
>> [snip]
>>> +diff --git a/config b/config
>>> +index cabd4f1..4a77858 100644
>>> +--- a/config
>>> ++++ b/config
>>> +@@ -1,14 +1,13 @@
>>> +-USE_MD5=YES
>>> +-USE_SHA1=YES
>>> + ngx_addon_name=ngx_http_upload_module
>>> +
>>> + if test -n "$ngx_module_link"; then
>>> +     ngx_module_type=HTTP
>>> +     ngx_module_name=$ngx_addon_name
>>> +     ngx_module_srcs="$ngx_addon_dir/ngx_http_upload_module.c"
>>> ++    ngx_module_libs=-lcrypto
>>
>>  Is there any reason not to use pkg-config, like we do in nginx itself (in
>> 0006-auto-lib-openssl-conf-use-pkg-config.patch)?
>
> Yeah that should work, I'll rework and test.
>
>>
>>> +
>>> +     . auto/module
>>> + else
>>> +     HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module"
>>> +     NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c"
>>> +-fi
>>> +\ No newline at end of file
>>> ++fi
>>
>>  This hunk is not needed.
>
> Sure.
>

Superseded by:
https://patchwork.ozlabs.org/patch/792562/


Thanks!
diff mbox

Patch

diff --git a/package/nginx-upload/0001-nginx-upload-module-add-openssl-lib-dependency.patch b/package/nginx-upload/0001-nginx-upload-module-add-openssl-lib-dependency.patch
new file mode 100644
index 0000000..6cf3063
--- /dev/null
+++ b/package/nginx-upload/0001-nginx-upload-module-add-openssl-lib-dependency.patch
@@ -0,0 +1,61 @@ 
+From dcfb052988b333382fc7696fd811eb547734797a Mon Sep 17 00:00:00 2001
+From: Matt Weber <matthew.weber@rockwellcollins.com>
+Date: Sat, 22 Jul 2017 22:24:50 -0500
+Subject: [PATCH 1/1] nginx-upload-module: add openssl lib dependency
+
+When building against nginx 1.11.2+, requires additional
+-lcrypto dependency. (Nginx changed crypto approach
+and dependencies for openssl are no longer default)
+
+More details found here:
+https://github.com/vkholodkov/nginx-upload-module/issues/79
+
+Upstream pull request:
+https://github.com/vkholodkov/nginx-upload-module/pull/93
+
+Resolves build failure:
+objs/addon/nginx-upload-70bee48f1811eecd255ed094ce9f0fb560c390c3/ngx_http_upload_module.o \
+objs/ngx_modules.o \
+-ldl -lpthread -lpthread -lpcre -lz -latomic_ops \
+-Wl,-E
+ngx_http_upload_module.o: In function `ngx_http_upload_flush_output_buffer':
+ngx_http_upload_module.c:1625: undefined reference to `MD5_Update'
+ngx_http_upload_module.c:1628: undefined reference to `SHA1_Update'
+ngx_http_upload_module.c:1631: undefined reference to `SHA256_Update'
+ngx_http_upload_module.c:1634: undefined reference to `SHA512_Update'
+
+Fixes:
+http://autobuild.buildroot.net/results/e25f8ba8d8743e47a77707cf582e58477e1860e6
+http://autobuild.buildroot.net/results/c4aa6e22033be934bd311cd9761f646d44618dc0
+http://autobuild.buildroot.net/results/75e935d248b46df11c32c95526423a2287ac8c62
+
+Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
+---
+ config | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/config b/config
+index cabd4f1..4a77858 100644
+--- a/config
++++ b/config
+@@ -1,14 +1,13 @@
+-USE_MD5=YES
+-USE_SHA1=YES
+ ngx_addon_name=ngx_http_upload_module
+ 
+ if test -n "$ngx_module_link"; then
+     ngx_module_type=HTTP
+     ngx_module_name=$ngx_addon_name
+     ngx_module_srcs="$ngx_addon_dir/ngx_http_upload_module.c"
++    ngx_module_libs=-lcrypto
+ 
+     . auto/module
+ else
+     HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module"
+     NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c"
+-fi
+\ No newline at end of file
++fi
+-- 
+1.9.1
+