[oe] [meta-webserver] [PATCH] fix nginx with large files support

Khem Raj raj.khem at gmail.com
Wed Oct 25 00:31:52 UTC 2017


On Tue, Oct 24, 2017 at 3:27 PM, Wangchong Zhou <fffonion at gmail.com> wrote:
> Resend a patch using largefile DISTRO_FEATURES.
>
>
> Signed-off-by: Wangchong Zhou <fffonion at gmail.com>
> ---
>  meta-webserver/recipes-httpd/nginx/nginx.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc
> b/meta-webserver/recipes-httpd/nginx/nginx.inc
> index 4a97e2670..84ce0fb4d 100644
> --- a/meta-webserver/recipes-httpd/nginx/nginx.inc
> +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
> @@ -57,7 +57,7 @@ do_configure () {
>      --with-ptr-size=${PTRSIZE} \
>      --with-sig-atomic-t=${PTRSIZE} \
>      --with-size-t=${PTRSIZE} \
> -    --with-off-t=${PTRSIZE} \
> +
>  --with-off-t=${@bb.utils.contains('DISTRO_FEATURES','largefile','8','4',d)};
> \

Could you still keep using PTRSIZE in else case above ?

>      --with-time-t=${PTRSIZE} \
>      --with-sys-nerr=132 \
>      --conf-path=${sysconfdir}/nginx/nginx.conf \
> --
> 2.13.5
>
> On Tue, Oct 24, 2017 at 2:28 PM, Wangchong Zhou <fffonion at gmail.com> wrote:
>>
>> Hi,
>> The nginx receipt hardcoded size of off_t to be same as ptrsize, which
> can break large files support on 32bit machines. The http range header will
> fail with a code 416 on files bigger than 2G. Changing it to 8 will fix the
> problem.
>>
>> I don't think hardcode off_t to 8 is a neat way of fixing this. Is there
> a better way to detect large files support?
>>
>>
>> Author: Wangchong Zhou <fffonion at gmail.com>
>> Date:   Tue Oct 24 14:21:35 2017 -0400
>>
>>     fix large files support in nginx by setting off_t to 8 bytes
>>
>>     Signed-off-by: Wangchong Zhou <fffonion at gmail.com>
>>
>> diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc
> b/meta-webserver/recipes-httpd/nginx/nginx.inc
>> index 4a97e2670..4cdf892c7 100644
>> --- a/meta-webserver/recipes-httpd/nginx/nginx.inc
>> +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
>> @@ -57,7 +57,7 @@ do_configure () {
>>      --with-ptr-size=${PTRSIZE} \
>>      --with-sig-atomic-t=${PTRSIZE} \
>>      --with-size-t=${PTRSIZE} \
>> -    --with-off-t=${PTRSIZE} \
>> +    --with-off-t=8 \
>>      --with-time-t=${PTRSIZE} \
>>      --with-sys-nerr=132 \
>>      --conf-path=${sysconfdir}/nginx/nginx.conf \
>>
>>
>
>
>
> --
> Regards
> fffonion (B607 2745 84E8 D5E5)
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list