Nginx spec changed for better mainline comaptibility. Gitea update
This commit is contained in:
@@ -10,15 +10,11 @@
|
||||
%global modsecver 3.0.2
|
||||
%global vtsversion 0.1.18
|
||||
%global headervers 0.33
|
||||
%global with_aio 1
|
||||
|
||||
# gperftools exist only on selected arches
|
||||
%global with_gperftools 0
|
||||
|
||||
%global with_aio 1
|
||||
|
||||
%if 0%{?rhel} > 6 || 0%{?fedora} > 24
|
||||
%global with_mailcap_mimetypes 1
|
||||
%endif
|
||||
# Disable strict symbol checks in the link editor.
|
||||
# See: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19
|
||||
%undefine _strict_symbol_defs_build
|
||||
|
||||
Name: nginx
|
||||
Epoch: 1
|
||||
@@ -30,7 +26,7 @@ Group: System Environment/Daemons
|
||||
# BSD License (two clause)
|
||||
# http://www.freebsd.org/copyright/freebsd-license.html
|
||||
License: BSD
|
||||
URL: http://nginx.org/
|
||||
URL: https://nginx.org/
|
||||
|
||||
Source0: https://nginx.org/download/nginx-%{version}.tar.gz
|
||||
Source1: ngx_http_auth_ldap_module.tar.gz
|
||||
@@ -59,11 +55,7 @@ Source210: UPGRADE-NOTES-1.6-to-1.10
|
||||
# removes -Werror in upstream build scripts. -Werror conflicts with
|
||||
# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
|
||||
Patch0: nginx-auto-cc-gcc.patch
|
||||
#Patch1: ngx_user_crypt.patch
|
||||
|
||||
%if 0%{?with_gperftools}
|
||||
BuildRequires: gperftools-devel
|
||||
%endif
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: zlib-devel
|
||||
@@ -301,7 +293,9 @@ sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' nginx.conf
|
||||
# to error out. This is is also the reason for the DESTDIR environment
|
||||
# variable.
|
||||
export DESTDIR=%{buildroot}
|
||||
./configure \
|
||||
# So the perl module finds its symbols:
|
||||
nginx_ldopts="$RPM_LD_FLAGS -Wl,-E"
|
||||
if ! ./configure \
|
||||
--prefix=%{_datadir}/nginx \
|
||||
--sbin-path=%{_sbindir}/nginx \
|
||||
--modules-path=%{_libdir}/nginx/modules \
|
||||
@@ -317,19 +311,16 @@ export DESTDIR=%{buildroot}
|
||||
--lock-path=/run/lock/subsys/nginx \
|
||||
--user=%{nginx_user} \
|
||||
--group=%{nginx_user} \
|
||||
--with-compat \
|
||||
%if 0%{?with_aio}
|
||||
--with-file-aio \
|
||||
%endif
|
||||
--with-ipv6 \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_addition_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-http_xslt_module=dynamic \
|
||||
--with-http_image_filter_module=dynamic \
|
||||
--with-http_geoip_module=dynamic \
|
||||
--with-http_sub_module \
|
||||
--with-http_dav_module \
|
||||
--with-http_flv_module \
|
||||
--with-http_mp4_module \
|
||||
@@ -339,11 +330,10 @@ export DESTDIR=%{buildroot}
|
||||
--with-http_secure_link_module \
|
||||
--with-http_degradation_module \
|
||||
--with-http_slice_module \
|
||||
--with-http_ssl_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_sub_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_perl_module=dynamic \
|
||||
--with-http_auth_request_module \
|
||||
--with-mail=dynamic \
|
||||
--with-mail_ssl_module \
|
||||
--with-pcre \
|
||||
@@ -351,10 +341,7 @@ export DESTDIR=%{buildroot}
|
||||
--with-stream=dynamic \
|
||||
--with-stream_ssl_module \
|
||||
%if 0%{?with_vts_module}
|
||||
--add-dynamic-module=%{_builddir}/nginx-module-vts-%{vtsversion} \
|
||||
%endif
|
||||
%if 0%{?with_gperftools}
|
||||
--with-google_perftools_module \
|
||||
--add-dynamic-module=%{_builddir}/nginx-module-vts-%{vtsversion} \
|
||||
%endif
|
||||
%if 0%{?with_ldap_module}
|
||||
--add-dynamic-module=%{_builddir}/ngx_http_auth_ldap_module \
|
||||
@@ -367,7 +354,6 @@ export DESTDIR=%{buildroot}
|
||||
%endif
|
||||
%if 0%{?with_modsecurity_module}
|
||||
--add-dynamic-module=%{_builddir}/modsecurity-nginx-%{modsecver} \
|
||||
--with-compat \
|
||||
%endif
|
||||
%if 0%{?with_set_misc_module}
|
||||
--add-dynamic-module=%{_builddir}/ngx_devel_kit-master \
|
||||
@@ -376,9 +362,13 @@ export DESTDIR=%{buildroot}
|
||||
--with-debug \
|
||||
--with-threads \
|
||||
--with-cc-opt="%{optflags} $(pcre-config --cflags)" \
|
||||
--with-ld-opt="$RPM_LD_FLAGS -Wl,-E" # so the perl module finds its symbols
|
||||
--with-ld-opt="$nginx_ldopts"; then
|
||||
: configure failed
|
||||
cat objs/autoconf.err
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot} INSTALLDIRS=vendor
|
||||
@@ -389,9 +379,9 @@ find %{buildroot} -type f -empty -exec rm -f '{}' \;
|
||||
find %{buildroot} -type f -iname '*.so' -exec chmod 0755 '{}' \;
|
||||
|
||||
install -p -D -m 0644 ./nginx.service \
|
||||
%{buildroot}%{_unitdir}/nginx.service
|
||||
%{buildroot}%{_unitdir}/nginx.service
|
||||
install -p -D -m 0644 %{SOURCE11} \
|
||||
%{buildroot}%{_sysconfdir}/logrotate.d/nginx
|
||||
%{buildroot}%{_sysconfdir}/logrotate.d/nginx
|
||||
|
||||
install -p -d -m 0755 %{buildroot}%{_sysconfdir}/nginx/conf.d
|
||||
install -p -d -m 0755 %{buildroot}%{_sysconfdir}/nginx/default.d
|
||||
@@ -415,74 +405,74 @@ install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/nginx/modsec/modsecurity
|
||||
install -p -D -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/nginx/modsec/main.conf
|
||||
install -p -D -m 0644 %{S:5} %{buildroot}%{_sysconfdir}/nginx/modsec/rules.conf
|
||||
for f in CHANGES AUTHORS README.md LICENSE; do
|
||||
install -p -D -m 0644 %{_builddir}/modsecurity-nginx-%{modsecver}/$f %{buildroot}%{_defaultdocdir}/%{name}-mod-security/$f
|
||||
install -p -D -m 0644 %{_builddir}/modsecurity-nginx-%{modsecver}/$f %{buildroot}%{_defaultdocdir}/%{name}-mod-security/$f
|
||||
done
|
||||
%endif
|
||||
|
||||
install -p -m 0644 ./nginx.conf \
|
||||
%{buildroot}%{_sysconfdir}/nginx
|
||||
%{buildroot}%{_sysconfdir}/nginx
|
||||
install -p -m 0644 %{SOURCE100} \
|
||||
%{buildroot}%{_datadir}/nginx/html
|
||||
%{buildroot}%{_datadir}/nginx/html
|
||||
install -p -m 0644 %{SOURCE101} %{SOURCE102} \
|
||||
%{buildroot}%{_datadir}/nginx/html
|
||||
%{buildroot}%{_datadir}/nginx/html
|
||||
install -p -m 0644 %{SOURCE103} %{SOURCE104} \
|
||||
%{buildroot}%{_datadir}/nginx/html
|
||||
%{buildroot}%{_datadir}/nginx/html
|
||||
|
||||
install -p -D -m 0644 %{_builddir}/nginx-%{version}/man/nginx.8 \
|
||||
%{buildroot}%{_mandir}/man8/nginx.8
|
||||
%{buildroot}%{_mandir}/man8/nginx.8
|
||||
|
||||
install -p -D -m 0755 %{SOURCE13} %{buildroot}%{_bindir}/nginx-upgrade
|
||||
install -p -D -m 0644 %{SOURCE14} %{buildroot}%{_mandir}/man8/nginx-upgrade.8
|
||||
|
||||
for i in ftdetect indent syntax; do
|
||||
install -p -D -m644 contrib/vim/${i}/nginx.vim \
|
||||
%{buildroot}%{_datadir}/vim/vimfiles/${i}/nginx.vim
|
||||
install -p -D -m644 contrib/vim/${i}/nginx.vim \
|
||||
%{buildroot}%{_datadir}/vim/vimfiles/${i}/nginx.vim
|
||||
done
|
||||
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_geoip_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-geoip.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-geoip.conf
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_image_filter_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-image-filter.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-image-filter.conf
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_perl_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-perl.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-perl.conf
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_xslt_filter_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-xslt-filter.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http-xslt-filter.conf
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_mail_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-mail.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-mail.conf
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_stream_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-stream.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-stream.conf
|
||||
%if 0%{?with_vts_module}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_vhost_traffic_status_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-vts.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-vts.conf
|
||||
%endif
|
||||
%if 0%{?with_ldap_module}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_auth_ldap_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http_auth-ldap.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http_auth-ldap.conf
|
||||
%endif
|
||||
%if 0%{?with_modsecurity_module}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_modsecurity_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http_modsecurity.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-http_modsecurity.conf
|
||||
%endif
|
||||
%if 0%{?with_header_more_module}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_headers_more_filter_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-header-more.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-header-more.conf
|
||||
%endif
|
||||
%if 0%{?with_echo_module}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_echo_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-echo.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-echo.conf
|
||||
%endif
|
||||
%if 0%{?with_set_misc_module}
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ndk_http_module.so";' \
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-set-misc.conf
|
||||
> %{buildroot}%{_datadir}/nginx/modules/mod-set-misc.conf
|
||||
echo 'load_module "%{_libdir}/nginx/modules/ngx_http_set_misc_module.so";' \
|
||||
>> %{buildroot}%{_datadir}/nginx/modules/mod-set-misc.conf
|
||||
>> %{buildroot}%{_datadir}/nginx/modules/mod-set-misc.conf
|
||||
%endif
|
||||
|
||||
%pre filesystem
|
||||
getent group %{nginx_user} > /dev/null || groupadd -r %{nginx_user}
|
||||
getent passwd %{nginx_user} > /dev/null || \
|
||||
useradd -r -d %{_localstatedir}/lib/nginx -g %{nginx_user} \
|
||||
-s /sbin/nologin -c "Nginx web server" %{nginx_user}
|
||||
useradd -r -d %{_localstatedir}/lib/nginx -g %{nginx_user} \
|
||||
-s /sbin/nologin -c "Nginx web server" %{nginx_user}
|
||||
exit 0
|
||||
|
||||
%post
|
||||
@@ -490,73 +480,73 @@ exit 0
|
||||
|
||||
%post mod-http-geoip
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%post mod-http-image-filter
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%post mod-http-perl
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%post mod-http-xslt-filter
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%post mod-mail
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%post mod-stream
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%if 0%{?with_vts_module}
|
||||
%post mod-vts
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?with_ldap_module}
|
||||
%post mod-auth-ldap
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?with_modsecurity_module}
|
||||
%post mod-security
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?with_header_more_module}
|
||||
%post mod-header-more
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?with_echo_module}
|
||||
%post mod-echo
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if 0%{?with_set_misc_module}
|
||||
%post mod-set-misc
|
||||
if [ $1 -eq 1 ]; then
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
@@ -566,7 +556,7 @@ fi
|
||||
%postun
|
||||
%systemd_postun nginx.service
|
||||
if [ $1 -ge 1 ]; then
|
||||
/usr/bin/nginx-upgrade >/dev/null 2>&1 || :
|
||||
/usr/bin/nginx-upgrade >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%files
|
||||
@@ -591,11 +581,8 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/nginx/fastcgi_params.default
|
||||
%config(noreplace) %{_sysconfdir}/nginx/koi-utf
|
||||
%config(noreplace) %{_sysconfdir}/nginx/koi-win
|
||||
%if ! 0%{?with_mailcap_mimetypes}
|
||||
%config(noreplace) %{_sysconfdir}/nginx/mime.types
|
||||
%endif
|
||||
%config(noreplace) %{_sysconfdir}/nginx/mime.types.default
|
||||
%config(noreplace) %{_sysconfdir}/nginx/mime.types
|
||||
%config(noreplace) %{_sysconfdir}/nginx/nginx.conf
|
||||
%config(noreplace) %{_sysconfdir}/nginx/nginx.conf.default
|
||||
%config(noreplace) %{_sysconfdir}/nginx/scgi_params
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: gitea
|
||||
Version: 1.14.3
|
||||
Version: 1.14.4
|
||||
Release: 1%{?dist}
|
||||
Summary: Gitea is a painless self-hosted Git service.
|
||||
%define MyVersion %version
|
||||
@@ -82,39 +82,42 @@ getent passwd gitea > /dev/null || \
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jun 23 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Sat Jul 10 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to 1.14.4.
|
||||
|
||||
* Wed Jun 23 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to 1.14.3.
|
||||
|
||||
* Fri May 21 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Fri May 21 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- First build on Fedora 34.
|
||||
|
||||
* Mon May 10 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Mon May 10 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.14.2.
|
||||
|
||||
* Thu Apr 22 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Thu Apr 22 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.14.1.
|
||||
|
||||
* Fri Apr 9 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Fri Apr 9 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.13.7.
|
||||
|
||||
* Sun Apr 4 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Sun Apr 4 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.13.6.
|
||||
|
||||
* Sun Mar 7 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Sun Mar 7 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.13.3.
|
||||
|
||||
* Sun Feb 7 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Sun Feb 7 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.13.2.
|
||||
|
||||
* Wed Jan 6 2021 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Wed Jan 6 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.13.1.
|
||||
|
||||
* Sun Dec 20 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Sun Dec 20 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.13.0.
|
||||
|
||||
* Sun Nov 29 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Sun Nov 29 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- Update to version 1.12.6.
|
||||
|
||||
* Sat Oct 31 2020 Daniel Steiner <daniel.steiner@daniel-steiner.org>
|
||||
* Sat Oct 31 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||
- First build for Fedora 33.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user