-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebkaos.spec
1201 lines (939 loc) · 40.5 KB
/
webkaos.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
################################################################################
# rpmbuilder:qa-rpaths 0x0001,0x0002
################################################################################
%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd
################################################################################
%define _cachedir %{_localstatedir}/cache
%define _logdir %{_localstatedir}/log
%define _rundir %{_localstatedir}/run
%define __service %{_sbin}/service
%define __chkconfig %{_sbin}/chkconfig
%define __sysctl %{_bindir}/systemctl
################################################################################
%define service_user %{name}
%define service_group %{name}
%define service_name %{name}
%define service_home %{_cachedir}/%{service_name}
%define nginx_version 1.26.2
%define lua_module_ver 0.10.27
%define lua_resty_core_ver 0.1.29
%define lua_resty_lru_ver 0.14
%define mh_module_ver 0.37
%define pcre_ver 8.45
%define zlib_ver 1.3.1
%define luajit_ver 2.1-20240314
%define luajit_raw_ver 2.1
# 1. Open https://chromiumdash.appspot.com/releases?platform=Linux and note the latest stable version.
# 2. Open https://chromium.googlesource.com/chromium/src/+/refs/tags/<version>/DEPS and note <boringssl_revision>.
%define boring_commit 4fa4804c8ab4521079af62dba5260a99c34b8a29
################################################################################
Summary: Superb high performance web server
Name: webkaos
Version: %{nginx_version}
Release: 0%{?dist}
License: 2-clause BSD-like license
Group: System Environment/Daemons
URL: https://kaos.sh/webkaos
Source0: https://nginx.org/download/nginx-%{version}.tar.gz
Source1: %{name}.logrotate
Source2: %{name}.init
Source3: %{name}.sysconfig
Source4: %{name}.conf
Source5: %{name}.service
Source6: %{name}-debug.service
Source7: modules.conf
Source8: nginx-wrapper
Source20: ssl.conf
Source21: ssl-wildcard.conf
Source22: common.conf
Source23: bots.conf
Source25: cloudflare-ips.conf
Source30: %{name}-index.html
Source31: default.key
Source32: default.crt
Source50: https://github.com/openresty/lua-nginx-module/archive/v%{lua_module_ver}.tar.gz
Source51: https://boringssl.googlesource.com/boringssl/+archive/%{boring_commit}.tar.gz
Source52: https://github.com/openresty/headers-more-nginx-module/archive/v%{mh_module_ver}.tar.gz
Source53: https://downloads.sourceforge.net/project/pcre/pcre/%{pcre_ver}/pcre-%{pcre_ver}.tar.gz
Source54: https://zlib.net/zlib-%{zlib_ver}.tar.gz
Source55: https://github.com/openresty/luajit2/archive/v%{luajit_ver}.tar.gz
Source59: https://github.com/openresty/lua-resty-core/archive/v%{lua_resty_core_ver}.tar.gz
Source60: https://github.com/openresty/lua-resty-lrucache/archive/v%{lua_resty_lru_ver}.tar.gz
Source100: checksum.sha512
Patch0: %{name}.patch
Patch1: mime.patch
# https://github.com/cloudflare/sslconfig/blob/master/patches/nginx__1.11.5_dynamic_tls_records.patch
Patch2: %{name}-dynamic-tls-records.patch
# https://github.com/ajhaydock/BoringNginx/blob/master/patches
Patch3: boringssl.patch
Patch5: boringssl-tls13-support.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: make perl golang cmake
%if 0%{?rhel} <= 8
BuildRequires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-binutils
%else
BuildRequires: gcc-c++
%endif
Requires: initscripts >= 8.36 kaosv >= 2.17
Requires: gd libXpm libxslt
Requires: systemd
Requires(pre): shadow-utils
Provides: %{name} = %{version}-%{release}
Provides: webserver = %{version}-%{release}
################################################################################
%description
Superb high performance webserver based on Nginx code, with many
optimizations and improvements.
################################################################################
%package debug
Summary: Debug version of webkaos
Group: System Environment/Daemons
Requires: %{name} >= %{version}
%description debug
Not stripped version of webkaos with the debugging log support
################################################################################
%package nginx
Summary: Links for nginx compatibility
Group: System Environment/Daemons
Requires: %{name} >= %{version}
Conflicts: nginx nginx-kaos tengine openresty
BuildArch: noarch
%description nginx
Links for nginx compatibility.
################################################################################
%prep
%{crc_check}
%setup -qn nginx-%{nginx_version}
mkdir boringssl
tar xzvf %{SOURCE50}
tar xzvf %{SOURCE51} -C boringssl
tar xzvf %{SOURCE52}
tar xzvf %{SOURCE53}
tar xzvf %{SOURCE54}
tar xzvf %{SOURCE55}
tar xzvf %{SOURCE59}
tar xzvf %{SOURCE60}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
pushd boringssl
%patch5 -p1
popd
%build
# Renaming and moving docs
mv CHANGES NGINX-CHANGES
mv CHANGES.ru NGINX-CHANGES.ru
mv LICENSE NGINX-LICENSE
mv README NGINX-README
mv lua-nginx-module-%{lua_module_ver}/README.markdown ./LUA-MODULE-README.markdown
mv lua-resty-core-%{lua_resty_core_ver}/README.markdown ./LUA-RESTY-CORE-README.markdown
mv lua-resty-lrucache-%{lua_resty_lru_ver}/README.markdown ./LUA-RESTY-LRU-README.markdown
mv headers-more-nginx-module-%{mh_module_ver}/README.markdown ./HEADERS-MORE-MODULE-README.markdown
%if 0%{?rhel} <= 8
# Use gcc and gcc-c++ from DevToolSet 11
export PATH="/opt/rh/gcc-toolset-11/root/usr/bin:$PATH"
%endif
# LuaJIT2 Build ################################################################
export LUAJIT2_DIR=$(pwd)/luajit2-%{luajit_ver}
pushd luajit2-%{luajit_ver}
%{__make} %{?_smp_mflags} PREFIX=%{_datadir}/%{name}/luajit
%{__make} install DESTDIR=$LUAJIT2_DIR/build \
PREFIX=%{_datadir}/%{name}/luajit
popd
export LUAJIT_LIB="$LUAJIT2_DIR/build%{_datadir}/%{name}/luajit/lib"
export LUAJIT_INC="$LUAJIT2_DIR/build%{_datadir}/%{name}/luajit/include/luajit-2.1"
# BoringSSL Build ##############################################################
mkdir boringssl/build
pushd boringssl/build &> /dev/null
cmake3 -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-as-needed -ldl -lstdc++" ../
%{__make} %{?_smp_mflags}
popd
mkdir -p "boringssl/.openssl/lib"
pushd boringssl/.openssl &> /dev/null
ln -s ../include
popd
cp boringssl/build/crypto/libcrypto.a boringssl/build/ssl/libssl.a boringssl/.openssl/lib
################################################################################
# perfecto:ignore
./configure \
--prefix=%{_sysconfdir}/%{name} \
--sbin-path=%{_sbindir}/%{name} \
--modules-path=%{_libdir}/%{name}/modules \
--conf-path=%{_sysconfdir}/%{name}/%{name}.conf \
--error-log-path=%{_logdir}/%{name}/error.log \
--http-log-path=%{_logdir}/%{name}/access.log \
--pid-path=%{_rundir}/%{name}.pid \
--lock-path=%{_rundir}/%{name}.lock \
--http-client-body-temp-path=%{service_home}/client_temp \
--http-proxy-temp-path=%{service_home}/proxy_temp \
--http-fastcgi-temp-path=%{service_home}/fastcgi_temp \
--http-uwsgi-temp-path=%{service_home}/uwsgi_temp \
--http-scgi-temp-path=%{service_home}/scgi_temp \
--user=%{service_user} \
--group=%{service_group} \
%{?_with_http_random_index_module} \
%{?_with_http_xslt_module} \
%{?_with_http_flv_module} \
--with-http_v2_module \
--with-http_gunzip_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gzip_static_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-http_auth_request_module \
--with-stream \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-mail \
--with-mail_ssl_module \
--with-file-aio \
--with-ipv6 \
--with-debug \
--with-zlib=zlib-%{zlib_ver} \
--with-pcre-jit \
--with-pcre=pcre-%{pcre_ver} \
--with-openssl=boringssl \
--add-module=lua-nginx-module-%{lua_module_ver} \
--add-module=headers-more-nginx-module-%{mh_module_ver} \
--with-cc-opt="-g -O2 -fPIE -fstack-protector-all -DTCP_FASTOPEN=23 -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -I ../boringssl/.openssl/include/" \
--with-ld-opt="-Wl,-Bsymbolic-functions -Wl,-z,relro -L ../boringssl/.openssl/lib -L ../luajit2-%{luajit_ver}/lib -Wl,-rpath -Wl,%{_datadir}/%{name}/luajit/lib -ldl -lstdc++" \
--with-compat \
$*
# Fix "Error 127" during build with BoringSSL
touch boringssl/.openssl/include/openssl/ssl.h
%{__make} %{?_smp_mflags}
mv %{_builddir}/nginx-%{nginx_version}/objs/nginx \
%{_builddir}/nginx-%{nginx_version}/objs/%{name}.debug
# perfecto:ignore
./configure \
--prefix=%{_sysconfdir}/%{name} \
--sbin-path=%{_sbindir}/%{name} \
--modules-path=%{_libdir}/%{name}/modules \
--conf-path=%{_sysconfdir}/%{name}/%{name}.conf \
--error-log-path=%{_logdir}/%{name}/error.log \
--http-log-path=%{_logdir}/%{name}/access.log \
--pid-path=%{_rundir}/%{name}.pid \
--lock-path=%{_rundir}/%{name}.lock \
--http-client-body-temp-path=%{service_home}/client_temp \
--http-proxy-temp-path=%{service_home}/proxy_temp \
--http-fastcgi-temp-path=%{service_home}/fastcgi_temp \
--http-uwsgi-temp-path=%{service_home}/uwsgi_temp \
--http-scgi-temp-path=%{service_home}/scgi_temp \
--user=%{service_user} \
--group=%{service_group} \
%{?_with_http_random_index_module} \
%{?_with_http_xslt_module} \
%{?_with_http_flv_module} \
--with-http_v2_module \
--with-http_gunzip_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_mp4_module \
--with-http_gzip_static_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-http_auth_request_module \
--with-stream \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-mail \
--with-mail_ssl_module \
--with-file-aio \
--with-ipv6 \
--with-zlib=zlib-%{zlib_ver} \
--with-pcre-jit \
--with-pcre=pcre-%{pcre_ver} \
--with-openssl=boringssl \
--add-module=lua-nginx-module-%{lua_module_ver} \
--add-module=headers-more-nginx-module-%{mh_module_ver} \
--with-cc-opt="-g -O2 -fPIE -fstack-protector-all -DTCP_FASTOPEN=23 -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -I ../boringssl/.openssl/include/" \
--with-ld-opt="-Wl,-Bsymbolic-functions -Wl,-z,relro -L ../boringssl/.openssl/lib -L ../luajit2-%{luajit_ver}/lib -Wl,-rpath -Wl,%{_datadir}/%{name}/luajit/lib -ldl -lstdc++" \
--with-compat \
$*
# Fix "Error 127" during build with BoringSSL
touch boringssl/.openssl/include/openssl/ssl.h
%{__make} %{?_smp_mflags}
%install
rm -rf %{buildroot}
%{make_install}
install -dm 755 %{buildroot}%{_datadir}/%{name}
rm -f %{buildroot}%{_sysconfdir}/%{name}/nginx.conf
rm -f %{buildroot}%{_sysconfdir}/%{name}/*.default
rm -f %{buildroot}%{_sysconfdir}/%{name}/fastcgi.conf
rm -rf %{buildroot}%{_sysconfdir}/%{name}/html
install -dm 755 %{buildroot}%{_sysconfdir}/%{name}/conf.d
install -dm 755 %{buildroot}%{_sysconfdir}/%{name}/stream.conf.d
install -dm 755 %{buildroot}%{_logdir}/%{name}
install -dm 755 %{buildroot}%{_rundir}/%{name}
install -dm 755 %{buildroot}%{_cachedir}/%{name}
install -dm 755 %{buildroot}%{_datadir}/%{name}/html
# Install modules dirs
install -dm 755 %{buildroot}%{_libdir}/%{name}/modules
install -dm 755 %{buildroot}%{_datadir}/%{name}/modules
ln -sf %{_datadir}/%{name}/modules \
%{buildroot}%{_sysconfdir}/%{name}/modules
# Install html pages
install -pm 644 %{SOURCE30} \
%{buildroot}%{_datadir}/%{name}/html/index.html
ln -sf %{_datadir}/%{name}/html \
%{buildroot}%{_sysconfdir}/%{name}/html
# Install SYSV init stuff
install -dm 755 %{buildroot}%{_initrddir}
install -pm 755 %{SOURCE2} \
%{buildroot}%{_initrddir}/%{service_name}
install -dm 755 %{buildroot}%{_unitdir}
install -pm 644 %{SOURCE5} \
%{buildroot}%{_unitdir}/
install -pm 644 %{SOURCE6} \
%{buildroot}%{_unitdir}/
# Install log rotation stuff
install -dm 755 %{buildroot}%{_sysconfdir}/logrotate.d
install -pm 644 %{SOURCE1} \
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# Directory for extra configs
install -dm 755 %{buildroot}%{_sysconfdir}/%{name}/xtra
# Install configs
install -pm 644 %{SOURCE4} \
%{buildroot}%{_sysconfdir}/%{name}/
install -pm 644 %{SOURCE7} \
%{buildroot}%{_sysconfdir}/%{name}/
# Install extra configs
install -pm 644 %{SOURCE20} \
%{buildroot}%{_sysconfdir}/%{name}/xtra/
install -pm 644 %{SOURCE21} \
%{buildroot}%{_sysconfdir}/%{name}/xtra/
install -pm 644 %{SOURCE22} \
%{buildroot}%{_sysconfdir}/%{name}/xtra/
install -pm 644 %{SOURCE23} \
%{buildroot}%{_sysconfdir}/%{name}/xtra/
install -pm 644 %{SOURCE25} \
%{buildroot}%{_sysconfdir}/%{name}/xtra/
install -dm 755 %{buildroot}%{_sysconfdir}/sysconfig
install -pm 644 %{SOURCE3} \
%{buildroot}%{_sysconfdir}/sysconfig/%{name}
install -pm 644 %{_builddir}/nginx-%{nginx_version}/objs/%{name}.debug \
%{buildroot}%{_sbindir}/%{name}.debug
# Create directory for certificates and copy dummy certificate
install -dm 755 %{buildroot}%{_sysconfdir}/%{name}/ssl
install -pm 600 %{SOURCE31} \
%{buildroot}%{_sysconfdir}/%{name}/ssl
install -pm 600 %{SOURCE32} \
%{buildroot}%{_sysconfdir}/%{name}/ssl
# Install LuaJIT
install -dm 755 %{buildroot}%{_datadir}/%{name}/luajit
cp -rp luajit2-%{luajit_ver}/build%{_datadir}/%{name}/luajit/* \
%{buildroot}%{_datadir}/%{name}/luajit/
rm -f %{buildroot}%{_datadir}/%{name}/luajit/lib/*.a
rm -rf %{buildroot}%{_datadir}/%{name}/luajit/bin
cp -rp lua-resty-core-%{lua_resty_core_ver}/lib/* \
%{buildroot}%{_datadir}/%{name}/luajit/share/luajit-%{luajit_raw_ver}/
cp -rp lua-resty-lrucache-%{lua_resty_lru_ver}/lib/resty/* \
%{buildroot}%{_datadir}/%{name}/luajit/share/luajit-%{luajit_raw_ver}/resty/
find %{buildroot}%{_datadir}/%{name}/luajit/share/luajit-%{luajit_raw_ver}/ -name '*.md' -delete
# Create links and scripts for compatibility with nginx
install -pm 755 %{SOURCE8} %{buildroot}%{_sbindir}/nginx
ln -sf %{_sysconfdir}/%{name}/ %{buildroot}%{_sysconfdir}/nginx
ln -sf %{_sysconfdir}/%{name}/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}/nginx.conf
ln -sf %{_logdir}/%{name}/ %{buildroot}%{_logdir}/nginx
ln -sf %{_initrddir}/%{service_name} %{buildroot}%{_initrddir}/nginx
ln -sf %{_unitdir}/%{name}.service %{buildroot}%{_unitdir}/nginx.service
ln -sf %{_unitdir}/%{name}-debug.service %{buildroot}%{_unitdir}/nginx-debug.service
################################################################################
%pre
getent group %{service_group} >/dev/null || groupadd -r %{service_group}
getent passwd %{service_user} >/dev/null || useradd -r -g %{service_group} -s /sbin/nologin -d %{service_home} %{service_user}
exit 0
%post
# Ensure secure permissions (CVE-2013-0337)
chown -h root:root %{_logdir}/%{name}
if [[ $1 -eq 1 ]] ; then
%{__sysctl} enable %{name}.service &>/dev/null || :
# Generate unique nonce for common.conf
sed -i "s/{RANDOM}/`mktemp -u XXXXXXXXXXXX`/" \
%{_sysconfdir}/%{name}/xtra/common.conf
fi
# Increasing bucket size for x64
%ifarch %ix86
sed -i 's/{BUCKET_SIZE}/32/g' \
%{_sysconfdir}/%{name}/%{name}.conf &>/dev/null || :
sed -i 's/{BUCKET_SIZE}/32/g' \
%{_sysconfdir}/%{name}/%{name}.conf.rpmnew &>/dev/null || :
%else
sed -i 's/{BUCKET_SIZE}/64/g' \
%{_sysconfdir}/%{name}/%{name}.conf &>/dev/null || :
sed -i 's/{BUCKET_SIZE}/64/g' \
%{_sysconfdir}/%{name}/%{name}.conf.rpmnew &>/dev/null || :
%endif
################################################################################
%preun
if [[ $1 -eq 0 ]] ; then
%{__sysctl} --no-reload disable %{name}.service &>/dev/null || :
%{__sysctl} stop %{name}.service &>/dev/null || :
fi
%postun
if [[ $1 -ge 1 ]] ; then
%{__sysctl} daemon-reload &>/dev/null || :
fi
%clean
rm -rf %{buildroot}
################################################################################
%files
%defattr(-,root,root)
%doc NGINX-CHANGES NGINX-CHANGES.ru NGINX-LICENSE NGINX-README
%doc *-README.markdown
%{_sbindir}/%{name}
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/conf.d
%dir %{_sysconfdir}/%{name}/stream.conf.d
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/modules.conf
%config(noreplace) %{_sysconfdir}/%{name}/xtra/bots.conf
%config(noreplace) %{_sysconfdir}/%{name}/xtra/cloudflare-ips.conf
%config(noreplace) %{_sysconfdir}/%{name}/xtra/common.conf
%config(noreplace) %{_sysconfdir}/%{name}/xtra/ssl-wildcard.conf
%config(noreplace) %{_sysconfdir}/%{name}/xtra/ssl.conf
%config(noreplace) %{_sysconfdir}/%{name}/ssl/default.key
%config(noreplace) %{_sysconfdir}/%{name}/ssl/default.crt
%config %{_sysconfdir}/%{name}/mime.types
%config %{_sysconfdir}/%{name}/fastcgi_params
%config %{_sysconfdir}/%{name}/scgi_params
%config %{_sysconfdir}/%{name}/uwsgi_params
%config %{_sysconfdir}/%{name}/koi-utf
%config %{_sysconfdir}/%{name}/koi-win
%config %{_sysconfdir}/%{name}/win-utf
%{_sysconfdir}/%{name}/html
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_initrddir}/%{service_name}
%{_unitdir}/%{name}.service
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/html
%{_datadir}/%{name}/html/*
%{_datadir}/%{name}/luajit/*
%dir %{_datadir}/%{name}/modules
%{_sysconfdir}/%{name}/modules
%{_logdir}/%{name}
%attr(0755,%{service_user},%{service_group}) %dir %{_cachedir}/%{name}
%attr(0755,%{service_user},%{service_group}) %dir %{_libdir}/%{name}/modules
%files debug
%defattr(-,root,root)
%attr(0755,root,root) %{_sbindir}/%{name}.debug
%{_unitdir}/%{name}-debug.service
%files nginx
%defattr(-,root,root)
%{_sysconfdir}/%{name}/nginx.conf
%{_sysconfdir}/nginx
%{_logdir}/nginx
%{_sbindir}/nginx
%{_initrddir}/nginx
%{_unitdir}/nginx.service
%{_unitdir}/nginx-debug.service
################################################################################
%changelog
* Thu Aug 15 2024 Anton Novojilov <[email protected]> - 1.26.2-0
- Nginx updated to 1.26.2 with fixes for CVE-2024-7347
- More Headers module updated to 0.37
- lua-nginx-module updated to 0.10.27
- lua-resty-lru updated to 0.14
- lua-resty-core updated to 0.1.29
* Fri Jun 14 2024 Anton Novojilov <[email protected]> - 1.26.1-0
- Nginx updated to 1.26.1
* Sun Jun 02 2024 Anton Novojilov <[email protected]> - 1.26.0-2
- ngx_brotli module removed due to serious problems and lack of support
* Fri May 31 2024 Anton Novojilov <[email protected]> - 1.26.0-1
- Brotli updated to the latest commit to fix a bug that caused workers to
shut down
* Fri May 03 2024 Anton Novojilov <[email protected]> - 1.26.0-0
- Nginx updated to 1.26.0
- BoringSSL updated to the latest stable version for Chromium
- Zlib updated to 1.3.1
- Brotli updated to the latest version
- LuaJIT updated to 2.1-20240314
- lua-nginx-module updated to 0.10.26
- lua-resty-core updated to 0.1.28
- NAXSI module removed due to discontinued development
- End of support for CentOS 7
* Wed Jun 21 2023 Anton Novojilov <[email protected]> - 1.24.0-0
- Nginx updated to 1.24.0 (mainline → stable)
- BoringSSL updated to the latest stable version for Chromium
* Wed Mar 29 2023 Anton Novojilov <[email protected]> - 1.23.4-0
- Nginx updated to 1.23.4
- lua-nginx-module updated to 0.10.24
- lua-resty-core updated to 0.1.26
- BoringSSL updated to the latest stable version for Chromium
* Thu Dec 01 2022 Anton Novojilov <[email protected]> - 1.23.3-0
- Nginx updated to 1.23.3
- zlib updated to 1.2.13 with fixes for CVE-2022-37434
- BoringSSL updated to the latest stable version for Chromium
- ngx_brotli updated to the latest commit
- brotli updated to the latest commit
* Sat Oct 22 2022 Anton Novojilov <[email protected]> - 1.23.2-0
- Nginx updated to 1.23.2 with fixes for CVE-2022-41741, CVE-2022-41742
- BoringSSL updated to the latest stable version for Chromium
- LuaJIT updated to 2.1-20220915
- lua-resty-core updated to 0.1.24
- lua-nginx-module updated to 0.10.22
- Added extra config with Cloudflare IPs
* Tue Aug 02 2022 Anton Novojilov <[email protected]> - 1.23.1-0
- Nginx updated to 1.23.1
- More Headers module updated to 0.34
* Mon Jul 04 2022 Anton Novojilov <[email protected]> - 1.23.0-0
- Nginx updated to 1.23.0
- BoringSSL updated to the latest stable version
- LuaJIT updated to 2.1-20220411
- lua-nginx-module updated to 0.10.21
- lua-resty-core updated to 0.1.23
- lua-resty-lru updated to 0.13
- Using GCC 9 for build
* Thu Jan 27 2022 Anton Novojilov <[email protected]> - 1.21.6-0
- Nginx updated to 1.21.6
- LuaJIT updated to 2.1-20220111
* Tue Jan 11 2022 Anton Novojilov <[email protected]> - 1.21.5-0
- Nginx updated to 1.21.5
- BoringSSL updated to the latest stable version
- LuaJIT updated to 2.1-20211210
* Sat Dec 11 2021 Anton Novojilov <[email protected]> - 1.21.4-1
- Removed duplicate of $http_referer from timed_combined log format
* Sat Nov 13 2021 Anton Novojilov <[email protected]> - 1.21.4-0
- Nginx updated to 1.21.4
- BoringSSL updated to the latest version
- lua-nginx-module updated to 0.10.20
- Updated link to PCRE
* Wed Sep 08 2021 Anton Novojilov <[email protected]> - 1.21.3-0
- Nginx updated to 1.21.3
- BoringSSL updated to the latest version
- PCRE updated to 8.45
- lua-resty-core updated to 0.1.22
- lua-resty-lru updated to 0.11
- Improved default configuration file
* Wed May 26 2021 Anton Novojilov <[email protected]> - 1.21.0-0
- Nginx updated to 1.21.0 with fix for CVE-2021-23017
- BoringSSL updated to the latest version
- LuaJIT updated to 2.1-20210510
* Wed Apr 07 2021 Anton Novojilov <[email protected]> - 1.19.9-0
- Nginx updated to 1.19.9
- BoringSSL updated to the latest version
* Tue Mar 09 2021 Anton Novojilov <[email protected]> - 1.19.7-0
- Nginx updated to 1.19.7
- BoringSSL updated to the latest version
- LuaJIT updated to 2.1-20201027
- Lua module updated to 0.10.19
* Thu Dec 03 2020 Anton Novojilov <[email protected]> - 1.19.5-0
- Nginx updated to 1.19.5
* Wed Dec 02 2020 Anton Novojilov <[email protected]> - 1.19.4-0
- Nginx updated to 1.19.4
- BoringSSL updated to the latest version
- LuaJIT updated to 2.1-20201027
- NAXSI module updated to 1.3
* Mon Oct 26 2020 Anton Novojilov <[email protected]> - 1.19.3-0
- Nginx updated to 1.19.3
- BoringSSL updated to the latest version
- brotli module updated to the latest stable release
- LuaJIT updated to 2.1-20201012-2
- NAXSI module updated to 1.1a
- Fixed bug with using system LuaJIT instead of OpenResty's fork
* Sat Jun 13 2020 Anton Novojilov <[email protected]> - 1.19.0-1
- Fixed bug with unclosed if condition in postun scriptlet
- Added dark mode support to error pages
* Wed May 27 2020 Anton Novojilov <[email protected]> - 1.19.0-0
- Nginx updated to 1.19.0
- Fixed minor bug in init script
- Updated dynamic TLS records patch for compatibility with the latest version
* Wed May 27 2020 Anton Novojilov <[email protected]> - 1.17.10-0
- Nginx updated to 1.17.10
- BoringSSL updated to the latest version
- brotli module updated to the latest stable release
- Improved init script
- Dropped CentOS 6 support
* Wed Mar 11 2020 Anton Novojilov <[email protected]> - 1.17.9-1
- Added http_auth_request_module
* Sun Mar 08 2020 Anton Novojilov <[email protected]> - 1.17.9-0
- Nginx updated to 1.17.9
- BoringSSL updated to the latest version
* Tue Feb 18 2020 Anton Novojilov <[email protected]> - 1.17.8-0
- Nginx updated to 1.17.8
- LuaJIT updated to 2.1-20200102
- PCRE updated to 8.44
- BoringSSL updated to the latest version
- Using DevToolSet 7 for build
* Wed Dec 25 2019 Anton Novojilov <[email protected]> - 1.17.7-0
- Nginx updated to 1.17.7
* Wed Nov 20 2019 Anton Novojilov <[email protected]> - 1.17.6-0
- Nginx updated to 1.17.6
* Fri Nov 08 2019 Anton Novojilov <[email protected]> - 1.17.5-0
- Nginx updated to 1.17.5
- BoringSSL updated to the latest version
- Removed ssl_dhparam from default configuration
* Fri Nov 08 2019 Anton Novojilov <[email protected]> - 1.17.4-1
- Added webserver to Provides
* Wed Sep 25 2019 Anton Novojilov <[email protected]> - 1.17.4-0
- Nginx updated to 1.17.4
- BoringSSL updated to the latest version
- Switched to official ngx_brotli repository
* Thu Aug 29 2019 Anton Novojilov <[email protected]> - 1.17.3-1
- Improved dynamic modules support
- Added brotli dynamic module
- Added NAXSI dynamic module
* Wed Aug 14 2019 Anton Novojilov <[email protected]> - 1.17.3-0
- Nginx updated to 1.17.3 with fixes for CVE-2019-9511 (Data dribble),
CVE-2019-9513 (Resource loop) and CVE-2019-9516 (Zero‑length headers leak)
- BoringSSL updated to the latest version
- Added checksums for all sources
* Wed Jul 24 2019 Anton Novojilov <[email protected]> - 1.17.2-1
- resty-core disabled by default
* Wed Jul 24 2019 Anton Novojilov <[email protected]> - 1.17.2-0
- Nginx updated to 1.17.2
- BoringSSL updated to the latest version
* Sat Jun 29 2019 Anton Novojilov <[email protected]> - 1.17.1-0
- Nginx updated to 1.17.1
- BoringSSL updated to the latest version
- LuaJIT updated to 2.1-20190626
- Lua module updated to 0.10.15
- Using cmake3 for BoringSSL build
* Wed Jun 12 2019 Anton Novojilov <[email protected]> - 1.17.0-1
- Init script improvements
* Tue May 21 2019 Anton Novojilov <[email protected]> - 1.17.0-0
- Nginx updated to 1.17.0
- Improved styles for error and index pages
- Dropped SPDY support
* Thu May 16 2019 Anton Novojilov <[email protected]> - 1.15.12-0
- Nginx updated to 1.15.12
- BoringSSL updated to the latest version
- LuaJIT updated to 2.1-20190507
* Wed May 15 2019 Anton Novojilov <[email protected]> - 1.15.11-0
- Nginx updated to 1.15.11
* Tue Apr 09 2019 Anton Novojilov <[email protected]> - 1.15.10-0
- Nginx updated to 1.15.10
- BoringSSL updated to the latest version
- LuaJIT updated to 2.1-20190329
- Updated BoringSSL patch for compatibility with the latest version
* Thu Feb 28 2019 Anton Novojilov <[email protected]> - 1.15.9-0
- Nginx updated to 1.15.9
- LuaJIT replaced by OpenResty's fork
- Fixed exit code for failed validation while restart in init script
* Thu Feb 28 2019 Anton Novojilov <[email protected]> - 1.15.8-0
- Nginx updated to 1.15.8
- PCRE updated to 8.43
- Lua module updated to 0.10.14
- BoringSSL updated to the latest version
- Updated dynamic TLS records patch for compatibility with the latest version
- Added patch for building BoringSSL on CentOS 6
* Thu Nov 29 2018 Anton Novojilov <[email protected]> - 1.15.7-0
- Nginx updated to 1.15.7
- BoringSSL updated
* Thu Nov 08 2018 Anton Novojilov <[email protected]> - 1.15.6-0
- Nginx updated to 1.15.6 with fixes for CVE-2018-16843, CVE-2018-16844
and CVE-2018-16845
- BoringSSL updated to the latest version
* Wed Oct 03 2018 Anton Novojilov <[email protected]> - 1.15.5-1
- BoringSSL updated to the latest version
* Tue Oct 02 2018 Anton Novojilov <[email protected]> - 1.15.5-0
- Nginx updated to 1.15.5
* Thu Sep 27 2018 Anton Novojilov <[email protected]> - 1.15.4-0
- Nginx updated to 1.15.4
- PageSpeed removed
- Updated dynamic TLS records patch for compatibility with the latest version
- Updated BoringSSL patch for compatibility with the latest version
* Sun Sep 02 2018 Anton Novojilov <[email protected]> - 1.15.3-0
- Nginx updated to 1.15.3
- BoringSSL updated to latest version
- Updated dynamic TLS records patch for compatibility with the latest version
* Thu Jul 26 2018 Anton Novojilov <[email protected]> - 1.15.2-0
- Nginx updated to 1.15.2
- BoringSSL updated to the latest version
* Wed Jul 04 2018 Anton Novojilov <[email protected]> - 1.15.1-1
- Dropped TLSv1 support
- Dropped support of TLS_RSA_WITH_AES_256_CBC_SHA and
TLS_RSA_WITH_AES_128_CBC_SHA
* Wed Jul 04 2018 Anton Novojilov <[email protected]> - 1.15.1-0
- Nginx updated to 1.15.1
- BoringSSL updated to latest version
* Thu May 31 2018 Anton Novojilov <[email protected]> - 1.14.0-0
- Nginx updated to 1.14.0
- Lua module updated to 0.10.13
- BoringSSL updated to latest version
- Improved default settings
- Improved init script
* Fri Apr 13 2018 Anton Novojilov <[email protected]> - 1.13.12-0
- Nginx updated to 1.13.12
- BoringSSL updated to latest version
* Wed Apr 04 2018 Anton Novojilov <[email protected]> - 1.13.11-0
- Nginx updated to 1.13.11
* Tue Apr 03 2018 Anton Novojilov <[email protected]> - 1.13.10-1
- Google Public DNS replaced by Cloudflare Public DNS
- Using devtoolset-3 for build on all systems
- BoringSSL updated to latest version
- Lua module updated to 0.10.12rc2
* Tue Mar 20 2018 Anton Novojilov <[email protected]> - 1.13.10-0
- Nginx updated to 1.13.10
- PCRE updated to 8.42
- BoringSSL updated to latest version
* Fri Mar 09 2018 Anton Novojilov <[email protected]> - 1.13.9-1
- Improved configuration files
* Sun Feb 25 2018 Anton Novojilov <[email protected]> - 1.13.9-0
- Nginx updated to 1.13.9
- BoringSSL updated to latest version
- HTTP2+SPDY patch recreated for compatibility with latest version
* Mon Jan 22 2018 Anton Novojilov <[email protected]> - 1.13.8-0
- Nginx updated to 1.13.8
- BoringSSL updated to latest version
- PageSpeed updated to 1.12.34.3-stable
- Improved PageSpeed build
* Tue Nov 28 2017 Anton Novojilov <[email protected]> - 1.13.7-0
- Nginx updated to 1.13.7
- BoringSSL updated to latest version
- Lua module updated to 0.10.11
- More Headers module updated to 0.33
- Fixed bug with autostart on CentOS6
* Tue Nov 07 2017 Anton Novojilov <[email protected]> - 1.13.6-2
- Added '--with-compat' option for improved compatibility with dynamic modules
- Improved extended preferences
* Wed Oct 18 2017 Anton Novojilov <[email protected]> - 1.13.6-1
- Fixed TLS 1.3 support
* Sat Oct 14 2017 Anton Novojilov <[email protected]> - 1.13.6-0
- Nginx updated to 1.13.6
- BoringSSL updated to latest version
* Wed Sep 20 2017 Anton Novojilov <[email protected]> - 1.13.5-0
- Nginx updated to 1.13.5
- BoringSSL updated to latest version
* Mon Aug 21 2017 Anton Novojilov <[email protected]> - 1.13.4-2
- Added support of HTTP status code 418 (I'm a teapot)
* Sat Aug 12 2017 Anton Novojilov <[email protected]> - 1.13.4-1
- Added Cloudflare's patch for SPDY support
* Thu Aug 10 2017 Anton Novojilov <[email protected]> - 1.13.4-0
- Nginx updated to 1.13.4
- BoringSSL updated to latest version
- Lua module updated to 0.10.10
* Wed Jul 12 2017 Anton Novojilov <[email protected]> - 1.13.3-0
- Nginx updated to 1.13.3 with CVE-2017-7529 fix
* Fri Jul 07 2017 Anton Novojilov <[email protected]> - 1.13.2-0
- Nginx updated to 1.13.2
- BoringSSL updated to latest version
- PCRE updated to 8.41
- Lua module updated to 0.10.8
- PageSpeed updated to 1.12.34.2-stable
* Wed Apr 26 2017 Anton Novojilov <[email protected]> - 1.13.0-0
- Nginx updated to 1.13.0
- BoringSSL updated to latest version
- TLS 1.3 enabled by default
* Wed Apr 19 2017 Anton Novojilov <[email protected]> - 1.11.13-1
- Added AES128-SHA to list of supported ciphers
* Sun Apr 09 2017 Anton Novojilov <[email protected]> - 1.11.13-0
- Nginx updated to 1.11.13
* Thu Apr 06 2017 Anton Novojilov <[email protected]> - 1.11.12-1
- BoringSSL updated to latest version
- Improved SSL preferences
- Enabled dynamic TLS records by default
- PCRE JIT enabled by default
* Mon Mar 27 2017 Anton Novojilov <[email protected]> - 1.11.12-0
- Nginx updated to 1.11.12
- Specs for CentOS6 and CentOS7 merged into one spec
* Thu Mar 23 2017 Anton Novojilov <[email protected]> - 1.11.11-0
- Nginx updated to 1.11.11
- BoringSSL updated to latest version
* Mon Feb 20 2017 Anton Novojilov <[email protected]> - 1.11.10-1
- Webserver name removed from error pages for security purposes
* Fri Feb 17 2017 Anton Novojilov <[email protected]> - 1.11.10-0
- Nginx updated to 1.11.10
- BoringSSL updated to latest version
- Added directory stream.conf.d for stream configs
- Fixed bugs in systemd unit files
* Thu Jan 19 2017 Anton Novojilov <[email protected]> - 1.11.8-0
- Nginx updated to 1.11.8
- PageSpeed updated to 1.12.34.2
- PCRE updated to 8.40
- zlib updated to 1.2.11
- BoringSSL updated to latest version
- Fixed bug in systemd unit file
* Fri Nov 18 2016 Anton Novojilov <[email protected]> - 1.11.6-0
- Nginx updated to 1.11.6
- BoringSSL updated to latest version
* Sun Nov 13 2016 Anton Novojilov <[email protected]> - 1.11.5-2
- Added dynamic modules support
- Added systemd support
* Wed Nov 09 2016 Anton Novojilov <[email protected]> - 1.11.5-1
- BoringSSL updated to latest version
- Lua module updated to 0.10.7
- More Headers module updated to 0.32
- Added request_id to log output and X-Request-ID header
* Fri Oct 14 2016 Anton Novojilov <[email protected]> - 1.11.5-0
- Nginx updated to 1.11.5
- OpenSSL replaced by BoringSSL
* Fri Sep 23 2016 Gleb Goncharov <[email protected]> - 1.11.4-0
- Nginx updated to 1.11.4
- OpenSSL updated to 1.0.2i
- PageSpeed updated to 1.11.33.4
- Lua module updated to 0.10.6
- More Headers module updated to 0.31
* Fri Aug 19 2016 Anton Novojilov <[email protected]> - 1.11.3-1
- Fixed bug with log format
* Tue Aug 09 2016 Gleb Goncharov <[email protected]> - 1.11.3-0
- Nginx updated to 1.11.3
* Wed Jul 13 2016 Anton Novojilov <[email protected]> - 1.11.2-0
- Nginx updated to 1.11.2
- PCRE updated to 8.39
* Fri Jun 17 2016 Anton Novojilov <[email protected]> - 1.11.1-2
- Added TCP Fast Open support