upgrade lighttpd srpm from 1.4.50 to 1.4.51 version

CentOS repo upgraded lighttpd srpm recently. To avoid
srpm package missing, we need upgrade lighttpd to the
1.4.51 also.

Pass build and basic deploy test.

Story: 2004282
Task: 27832

Change-Id: I85c35be13abff454f955c19548d2dbea33dd8cac
Signed-off-by: slin14 <shuicheng.lin@intel.com>
This commit is contained in:
slin14 2018-11-07 21:01:49 +08:00
parent c4617d4c4b
commit f90da3be1a
8 changed files with 32 additions and 31 deletions

View File

@ -12,7 +12,7 @@ diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec
index 7acdc84..2f7b261 100644
--- a/SPECS/lighttpd.spec
+++ b/SPECS/lighttpd.spec
@@ -271,7 +271,7 @@ echo 'D /var/run/lighttpd 0750 lighttpd lighttpd -' > \
@@ -281,7 +281,7 @@ echo 'D /var/run/lighttpd 0750 lighttpd lighttpd -' > \
# WRS
CONFDIR=%{buildroot}%{_sysconfdir}/lighttpd
ROOTDIR=%{buildroot}/www

View File

@ -13,10 +13,10 @@ diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec
index 2f7b261..2553b27 100644
--- a/SPECS/lighttpd.spec
+++ b/SPECS/lighttpd.spec
@@ -45,7 +45,7 @@
@@ -46,7 +46,7 @@
Summary: Lightning fast webserver with light system requirements
Name: lighttpd
Version: 1.4.50
Version: 1.4.51
-Release: 1%{?dist}
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
License: BSD

View File

@ -11,7 +11,7 @@ diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec
index c27f78f..bc11989 100644
--- a/SPECS/lighttpd.spec
+++ b/SPECS/lighttpd.spec
@@ -82,6 +82,7 @@ Patch3: lighttpd-1.4.39-socket.patch
@@ -83,6 +83,7 @@ Patch3: lighttpd-1.4.39-socket.patch
# WRS Patches
Patch100: check-content-length.patch
@ -19,7 +19,7 @@ index c27f78f..bc11989 100644
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# For the target poweredby.png image (skip requirement + provide image on EL5)
@@ -189,6 +190,7 @@ Authentication module for lighttpd that uses GSSAPI
@@ -198,6 +199,7 @@ Authentication module for lighttpd that uses PAM.
# WRS Patches
%patch100 -p1 -b .content_length

View File

@ -13,7 +13,7 @@ diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec
index 2553b27..c27f78f 100644
--- a/SPECS/lighttpd.spec
+++ b/SPECS/lighttpd.spec
@@ -79,6 +79,10 @@ Patch3: lighttpd-1.4.39-socket.patch
@@ -80,6 +80,10 @@ Patch3: lighttpd-1.4.39-socket.patch
#Patch7: lighttpd-1.4.42-bignum.patch
#Patch8: lighttpd-1.4.43-mysql.patch
#Patch9: lighttpd-1.4.48-autoconf.patch
@ -24,7 +24,7 @@ index 2553b27..c27f78f 100644
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# For the target poweredby.png image (skip requirement + provide image on EL5)
%if %{with systemlogos}
@@ -182,6 +186,10 @@ Authentication module for lighttpd that uses GSSAPI
@@ -191,6 +195,10 @@ Authentication module for lighttpd that uses PAM.
#%patch7 -p0 -b .bignum
#%patch8 -p0 -b .mysql
#%patch9 -p0 -b .autoconf

View File

@ -11,7 +11,7 @@ diff --git a/SPECS/lighttpd.spec b/SPECS/lighttpd.spec
index de52e46..7acdc84 100644
--- a/SPECS/lighttpd.spec
+++ b/SPECS/lighttpd.spec
@@ -61,6 +61,14 @@ Source13: http://www.lighttpd.net/light_logo.png
@@ -62,6 +62,14 @@ Source13: http://www.lighttpd.net/light_logo.png
Source14: lighttpd-empty.png
#Source100: lighttpd-mod_geoip.c
#Source101: lighttpd-mod_geoip.txt
@ -26,10 +26,10 @@ index de52e46..7acdc84 100644
Patch0: lighttpd-1.4.39-defaultconf.patch
#Patch1: lighttpd-1.4.40-mod_geoip.patch
Patch2: lighttpd-1.4.35-system-crypto-policy.patch
@@ -184,17 +192,19 @@ autoreconf -if
%configure \
@@ -194,17 +202,19 @@ autoreconf -if
--libdir='%{_libdir}/lighttpd' \
%{confswitch mysql} \
%{confswitch pam} \
- %{confswitch ldap} \
+ --without-ldap \
%{confswitch attr} \
@ -53,7 +53,7 @@ index de52e46..7acdc84 100644
%{confswitch geoip} \
%{confswitch krb5}
make %{?_smp_mflags}
@@ -213,13 +223,14 @@ install -D -p -m 0644 %{SOURCE2} \
@@ -223,13 +233,14 @@ install -D -p -m 0644 %{SOURCE2} \
%{buildroot}%{_sysconfdir}/php.d/lighttpd.ini
# Install our own init script (included one is old style) or systemd service
@ -71,7 +71,7 @@ index de52e46..7acdc84 100644
# Install our own default web page and images
mkdir -p %{buildroot}%{webroot}
@@ -257,6 +268,20 @@ echo 'D /var/run/lighttpd 0750 lighttpd lighttpd -' > \
@@ -267,6 +278,20 @@ echo 'D /var/run/lighttpd 0750 lighttpd lighttpd -' > \
%{buildroot}%{_sysconfdir}/tmpfiles.d/lighttpd.conf
%endif
@ -92,7 +92,7 @@ index de52e46..7acdc84 100644
%clean
rm -rf %{buildroot}
@@ -305,11 +330,8 @@ fi
@@ -315,11 +340,8 @@ fi
%config %{_sysconfdir}/lighttpd/conf.d/mod.template
%config %{_sysconfdir}/lighttpd/vhosts.d/vhosts.template
%config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd
@ -104,7 +104,7 @@ index de52e46..7acdc84 100644
%if %{with tmpfiles}
%config(noreplace) %{_sysconfdir}/tmpfiles.d/lighttpd.conf
%endif
@@ -335,6 +357,11 @@ fi
@@ -345,6 +367,11 @@ fi
# This is not really configuration, but prevent loss of local changes
%config %{webroot}/index.html

View File

@ -1 +1 @@
mirror:Source/lighttpd-1.4.50-1.el7.src.rpm
mirror:Source/lighttpd-1.4.51-1.el7.src.rpm

View File

@ -12,7 +12,7 @@ diff --git a/src/request.c b/src/request.c
index 213a87e..8c97f45 100644
--- a/src/request.c
+++ b/src/request.c
@@ -8,10 +8,39 @@
@@ -9,11 +9,40 @@
#include "sock_addr.h"
#include <sys/stat.h>
@ -21,6 +21,7 @@ index 213a87e..8c97f45 100644
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <sys-strings.h>
+#include <errno.h>
+
+static size_t get_tempdirs_free_space(server *srv)
@ -53,9 +54,9 @@ index 213a87e..8c97f45 100644
static int request_check_hostname(buffer *host) {
enum { DOMAINLABEL, TOPLABEL } stage = TOPLABEL;
@@ -1287,6 +1316,22 @@ int http_request_parse(server *srv, connection *con) {
return 0;
@@ -1149,6 +1178,22 @@ int http_request_parse(server *srv, connection *con) {
con->http_status = 411;
goto failure;
}
+ /* content-length is larger than 64k */
+ if (con->request.content_length > 64*1024) {

View File

@ -36,7 +36,7 @@ index 2fe60b6..bddcd01 100644
struct fdevents; /* declaration */
struct stat_cache; /* declaration */
@@ -360,6 +375,13 @@ typedef struct {
@@ -344,6 +359,13 @@ typedef struct {
unsigned short high_precision_timestamps;
time_t loadts;
double loadavg[3];
@ -50,7 +50,7 @@ index 2fe60b6..bddcd01 100644
buffer *syslog_facility;
} server_config;
@@ -400,6 +422,8 @@ struct server {
@@ -384,6 +406,8 @@ struct server {
int con_written;
int con_closed;
@ -63,7 +63,7 @@ diff --git a/src/configfile.c b/src/configfile.c
index c3b0f16..dca2a29 100644
--- a/src/configfile.c
+++ b/src/configfile.c
@@ -276,8 +276,10 @@ static int config_insert(server *srv) {
@@ -273,8 +273,10 @@ static int config_insert(server *srv) {
{ "server.syslog-facility", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER }, /* 80 */
{ "server.socket-perms", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 81 */
{ "server.http-parseopts", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_SERVER }, /* 82 */
@ -75,7 +75,7 @@ index c3b0f16..dca2a29 100644
};
/* all T_CONFIG_SCOPE_SERVER options */
@@ -318,6 +320,8 @@ static int config_insert(server *srv) {
@@ -315,6 +317,8 @@ static int config_insert(server *srv) {
cv[80].destination = srv->srvconf.syslog_facility;
http_parseopts = array_init();
cv[82].destination = http_parseopts;
@ -88,7 +88,7 @@ diff --git a/src/mod_openssl.c b/src/mod_openssl.c
index 75e0873..4cb0335 100644
--- a/src/mod_openssl.c
+++ b/src/mod_openssl.c
@@ -422,6 +422,29 @@ error:
@@ -444,6 +444,29 @@ error:
return NULL;
}
@ -118,7 +118,7 @@ index 75e0873..4cb0335 100644
static EVP_PKEY *
evp_pkey_load_pem_file (server *srv, const char *file)
@@ -476,15 +499,23 @@ network_openssl_load_pemfile (server *srv, plugin_config *s, size_t ndx)
@@ -498,15 +521,23 @@ network_openssl_load_pemfile (server *srv, plugin_config *s, size_t ndx)
s->ssl_pemfile_x509 = x509_load_pem_file(srv, s->ssl_pemfile->ptr);
if (NULL == s->ssl_pemfile_x509) return -1;
@ -151,7 +151,7 @@ index 75e0873..4cb0335 100644
}
return 0;
@@ -651,6 +682,43 @@ network_init_ssl (server *srv, void *p_d)
@@ -673,6 +704,43 @@ network_init_ssl (server *srv, void *p_d)
force_assert(NULL != local_send_buffer);
}
@ -195,7 +195,7 @@ index 75e0873..4cb0335 100644
if (!buffer_string_is_empty(s->ssl_pemfile)) {
#ifdef OPENSSL_NO_TLSEXT
data_config *dc = (data_config *)srv->config_context->data[i];
@@ -911,29 +979,36 @@ network_init_ssl (server *srv, void *p_d)
@@ -935,29 +1003,36 @@ network_init_ssl (server *srv, void *p_d)
}
}
@ -246,7 +246,7 @@ diff --git a/src/server.c b/src/server.c
index f6409bb..2ace3f8 100644
--- a/src/server.c
+++ b/src/server.c
@@ -246,6 +246,11 @@ static server *server_init(void) {
@@ -247,6 +247,11 @@ static server *server_init(void) {
CLEAN(srvconf.pid_file);
CLEAN(srvconf.syslog_facility);
@ -258,7 +258,7 @@ index f6409bb..2ace3f8 100644
CLEAN(tmp_chunk_len);
#undef CLEAN
@@ -347,6 +352,14 @@ static void server_free(server *srv) {
@@ -348,6 +353,14 @@ static void server_free(server *srv) {
CLEAN(srvconf.xattr_name);
CLEAN(srvconf.syslog_facility);
@ -273,13 +273,13 @@ index f6409bb..2ace3f8 100644
CLEAN(tmp_chunk_len);
#undef CLEAN
@@ -776,7 +789,9 @@ static int log_error_open(server *srv) {
@@ -782,7 +795,9 @@ static int log_error_open(server *srv) {
if (-1 == (errfd = fdevent_open_devnull())) {
log_error_write(srv, __FILE__, __LINE__, "ss",
"opening /dev/null failed:", strerror(errno));
- return -1;
+ /* In version 1.4.45 it will also failed here but not check return value of openDevNull(STDERR_FILENO)
+ need further check with upstrean to see if there is a potential bug */
+ need further check with upstream to see if there is a potential bug */
+ //return -1;
}
}