Skip to content

Commit fb76b7d

Browse files
committed
Update to openssl 1.1.1g and nginx 1.18.0
1 parent 9a5cc48 commit fb76b7d

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# rpmbuild
22

3-
Our rpmbuild repo for rpms we have built. You can check out all the options for
3+
Our rpmbuild repo for rpms we have built. You can check out all the options for
44
rpms to be built in the `SPECS` folder, and build any of them by doing:
55

66
```
77
vagrant up
88
vagrant ssh
99
# From inside the vagrant box
1010
cd rpmbuild
11+
cp -Rf /vagrant/* .
12+
rm -rf BUILD/*
13+
rm -rf SOURCES/*.gz
1114
spectool -g -R SPECS/whatever.spec
1215
rpmbuild -ba SPECS/whatever.spec
1316
```
1417

1518
`vagrant provision` should download all required source files and install all
16-
build dependencies. If any source versions change you'll have to re-run `vagrant
17-
provision`.
19+
build dependencies. If any source versions change you'll have to re-run `vagrant provision`.

SPECS/nginx.spec

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
%define nginx_user nginx
44
%define nginx_group nginx
55

6-
%define main_version 1.16.1
7-
%define main_release 2%{?dist}.levenlabs
6+
%define main_version 1.18.0
7+
%define main_release 1%{?dist}.levenlabs
8+
9+
%define openssl_version 1.1.1g
10+
%define pcre_version 8.44
11+
%define zlib_version 1.2.11
812

913
%define nginx_more_headers_version 0.33
1014
%define WITH_CC_OPT $(echo %{optflags} $(pcre-config --cflags)) -fPIC
@@ -25,14 +29,14 @@ Source4: nginx.conf
2529
Source5: nginx-default.conf
2630
Source8: nginx.service
2731
Source90: https://github.com/openresty/headers-more-nginx-module/archive/v%{nginx_more_headers_version}/headers-more-nginx-module-%{nginx_more_headers_version}.tar.gz
28-
Source91: https://www.openssl.org/source/openssl-1.1.1d.tar.gz
29-
Source92: https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
30-
Source93: https://www.zlib.net/zlib-1.2.11.tar.gz
31-
Source94: https://github.com/vozlt/nginx-module-vts/archive/master.tar.gz
32+
Source100: https://www.openssl.org/source/openssl-%{openssl_version}.tar.gz
33+
Source101: https://ftp.pcre.org/pub/pcre/pcre-%{pcre_version}.tar.gz
34+
Source102: https://www.zlib.net/zlib-%{zlib_version}.tar.gz
3235

3336
License: 2-clause BSD-like license
3437
Group: System Environment/Daemons
3538

39+
BuildRequires: git
3640
BuildRequires: gcc
3741
BuildRequires: perl
3842
BuildRequires: GeoIP-devel
@@ -48,10 +52,16 @@ nginx [engine x] is an HTTP and reverse proxy server
4852
%prep
4953
%setup -q
5054
tar xf %{SOURCE90} -C $RPM_BUILD_DIR
51-
tar xf %{SOURCE91} -C $RPM_BUILD_DIR
52-
tar xf %{SOURCE92} -C $RPM_BUILD_DIR
53-
tar xf %{SOURCE93} -C $RPM_BUILD_DIR
54-
tar xf %{SOURCE94} -C $RPM_BUILD_DIR
55+
56+
git clone https://github.com/vozlt/nginx-module-vts $RPM_BUILD_DIR/nginx-module-vts
57+
cd $RPM_BUILD_DIR/nginx-module-vts && git submodule update --init
58+
59+
git clone https://github.com/google/ngx_brotli $RPM_BUILD_DIR/ngx_brotli
60+
cd $RPM_BUILD_DIR/ngx_brotli && git submodule update --init
61+
62+
mkdir $RPM_BUILD_DIR/openssl && tar zxf %{SOURCE100} -C $RPM_BUILD_DIR/openssl --strip-components 1
63+
mkdir $RPM_BUILD_DIR/pcre && tar zxf %{SOURCE101} -C $RPM_BUILD_DIR/pcre --strip-components 1
64+
mkdir $RPM_BUILD_DIR/zlib && tar zxf %{SOURCE102} -C $RPM_BUILD_DIR/zlib --strip-components 1
5565

5666
%build
5767
./configure \
@@ -72,6 +82,7 @@ tar xf %{SOURCE94} -C $RPM_BUILD_DIR
7282
--group=%{nginx_group} \
7383
--with-debug \
7484
--with-file-aio \
85+
--with-threads \
7586
--with-http_addition_module \
7687
--with-http_auth_request_module \
7788
--with-http_dav_module \
@@ -95,15 +106,17 @@ tar xf %{SOURCE94} -C $RPM_BUILD_DIR
95106
--with-pcre-jit \
96107
--with-stream \
97108
--with-stream_ssl_module \
98-
--with-openssl=$RPM_BUILD_DIR/openssl-1.1.1d \
99-
--with-pcre=$RPM_BUILD_DIR/pcre-8.43 \
109+
--with-openssl=$RPM_BUILD_DIR/openssl --with-openssl-opt=enable-tls1_3 \
110+
--with-stream_ssl_preread_module \
111+
--with-pcre=$RPM_BUILD_DIR/pcre \
100112
--with-pcre-opt='-g -Ofast -fPIC -m64 -march=native -fstack-protector-strong -D_FORTIFY_SOURCE=2' \
101-
--with-zlib=$RPM_BUILD_DIR/zlib-1.2.11 \
113+
--with-zlib=$RPM_BUILD_DIR/zlib \
102114
--with-zlib-opt='-g -Ofast -fPIC -m64 -march=native -fstack-protector-strong -D_FORTIFY_SOURCE=2' \
103-
--add-module=$RPM_BUILD_DIR/nginx-module-vts-master \
115+
--add-module=$RPM_BUILD_DIR/nginx-module-vts \
104116
--with-cc-opt="%{WITH_CC_OPT}" \
105117
--with-ld-opt="%{WITH_LD_OPT}" \
106118
--add-module=$RPM_BUILD_DIR/headers-more-nginx-module-%{nginx_more_headers_version} \
119+
--add-module=$RPM_BUILD_DIR/ngx_brotli \
107120

108121
make %{?_smp_mflags}
109122

0 commit comments

Comments
 (0)