Accepting request 247808 from home:MargueriteSu:branches:server:http

update 1.6.1

OBS-URL: https://build.opensuse.org/request/show/247808
OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=46
This commit is contained in:
Tomáš Chvátal 2014-09-15 14:04:39 +00:00 committed by Git OBS Bridge
parent 74eda1c420
commit 85f9956054
5 changed files with 142 additions and 91 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:23b8ff4a76817090678f91b0efbfcef59a93492f6612dc8370c44c1f1ce1b626
size 769153

View File

@ -1,6 +1,6 @@
Index: conf/nginx.conf Index: conf/nginx.conf
=================================================================== ===================================================================
--- conf/nginx.conf.orig --- conf.orig/nginx.conf
+++ conf/nginx.conf +++ conf/nginx.conf
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
@ -64,6 +64,15 @@ Index: conf/nginx.conf
} }
# proxy the PHP scripts to Apache listening on 127.0.0.1:80 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
@@ -63,7 +66,7 @@ http {
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
- # root html;
+ # root /srv/www/htdocs/;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
@@ -87,7 +90,7 @@ http { @@ -87,7 +90,7 @@ http {
# server_name somename alias another.alias; # server_name somename alias another.alias;
@ -73,8 +82,8 @@ Index: conf/nginx.conf
# index index.html index.htm; # index index.html index.htm;
# } # }
#} #}
@@ -110,9 +113,10 @@ http { @@ -109,9 +112,11 @@ http {
# ssl_prefer_server_ciphers on; # ssl_prefer_server_ciphers on;
# location / { # location / {
- # root html; - # root html;
@ -84,4 +93,5 @@ Index: conf/nginx.conf
#} #}
+ include vhosts.d/*.conf; + include vhosts.d/*.conf;
+
} }

3
nginx-1.6.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5cfe682a1aeef4602c2ca705402d5049b748f946563f41d8256c18674836067
size 803301

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Fri Sep 5 18:43:37 UTC 2014 - i@marguerite.su
- use /run as pid/lock directory on openSUSE Factory (13.2=+)
-------------------------------------------------------------------
Mon Aug 18 15:46:49 UTC 2014 - i@marguerite.su
- disable passenger for 1320 as rubygem-passenger isn't in Factory
-------------------------------------------------------------------
Mon Aug 18 14:48:13 UTC 2014 - i@marguerite.su
- update version 1.6.1 stable
* Security: pipelined commands were not discarded after STARTTLS
command in SMTP proxy (CVE-2014-3556)
* Bugfix: the $uri variable might contain garbage when returning
errors with code 400
* Bugfix: in the "none" parameter in the "smtp_auth" directive
- drop nginx-1.0.4_default_config.patch
- add nginx-1.6.1-default_config.patch
-------------------------------------------------------------------
Mon Aug 18 14:43:55 UTC 2014 - i@marguerite.su
- clean specfile
- fix for x86_64 builds for 11.4-
* can't build with -fPIE
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jun 6 13:54:27 UTC 2014 - lars@linux-schulserver.de Fri Jun 6 13:54:27 UTC 2014 - lars@linux-schulserver.de

View File

@ -16,42 +16,81 @@
# #
Name: nginx
Version: 1.4.7
Release: 0
#
%define pkg_name nginx %define pkg_name nginx
#
%define ngx_prefix %{_prefix} %define ngx_prefix %{_prefix}
%define ngx_sbin_path %{_sbindir}/nginx %define ngx_sbin_path %{_sbindir}/nginx
%define ngx_conf_dir %{_sysconfdir}/nginx %define ngx_conf_dir %{_sysconfdir}/nginx
%define ngx_conf_path %{ngx_conf_dir}/nginx.conf %define ngx_conf_path %{ngx_conf_dir}/nginx.conf
%define ngx_log_dir /var/log/nginx %define ngx_log_dir %{_localstatedir}/log/nginx
%define ngx_error_log %{ngx_log_dir}/error.log %define ngx_error_log %{ngx_log_dir}/error.log
%define ngx_access_log %{ngx_log_dir}/access.log %define ngx_access_log %{ngx_log_dir}/access.log
%define ngx_pid_path /var/run/nginx.pid %if 0%{?suse_version} <= 1310
%define ngx_lock_path /var/run/nginx.lock %define ngx_pid_path %{_localstatedir}/run/nginx.pid
%define ngx_home /var/lib/nginx %define ngx_lock_path %{_localstatedir}/run/nginx.lock
%else
%define ngx_pid_path /run/nginx.pid
%define ngx_lock_path /run/nginx.lock
%endif
%define ngx_home %{_localstatedir}/lib/nginx
%define ngx_tmp_http %{ngx_home}/tmp/ %define ngx_tmp_http %{ngx_home}/tmp/
%define ngx_tmp_proxy %{ngx_home}/proxy/ %define ngx_tmp_proxy %{ngx_home}/proxy/
%define ngx_tmp_fcgi %{ngx_home}/fastcgi/ %define ngx_tmp_fcgi %{ngx_home}/fastcgi/
%define ngx_tmp_scgi %{ngx_home}/scgi/ %define ngx_tmp_scgi %{ngx_home}/scgi/
%define ngx_tmp_uwsgi %{ngx_home}/uwsgi/ %define ngx_tmp_uwsgi %{ngx_home}/uwsgi/
%define ngx_user_group nginx %define ngx_user_group nginx
%define fancyindex_version 0.3.3
%define with_cpp_test 0 %define with_cpp_test 0
%define with_google_perftools 0 %define with_google_perftools 0
%if 0%{?suse_version} >= 1110 %define with_fancyindex 1
%define fancyindex_version 0.3.3
%define with_libatomic 1 %define with_libatomic 1
%endif
%if 0%{?suse_version} >= 1220 %if 0%{?suse_version} >= 1220
# passenger is required by webyast # passenger is required by webyast
%if 0%{?suse_version} > 1310
%define with_passenger 0
%else
%define with_passenger 1 %define with_passenger 1
%endif %endif
%define with_fancyindex 1 %endif
# %if 0%{?suse_version} >= 1210
%define with_systemd 1
BuildRequires: systemd
%{?systemd_requires}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build Name: nginx
Version: 1.6.1
Release: 0
Summary: A HTTP server and IMAP/POP3 proxy server
License: BSD-2-Clause
Group: Productivity/Networking/Web/Proxy
Url: http://nginx.org/
Source: http://nginx.org/download/nginx-%{version}.tar.gz
Source1: nginx.init
Source2: nginx.logrotate
Source3: nginx.service
Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{fancyindex_version}.zip
Source100: nginx.rpmlintrc
# PATCH-FIX-UPSTREAM nginx-0.4.0-no_Werror.patch
Patch0: nginx-0.4.0-no_Werror.patch
# PATCH-FIX-UPSTREAM nginx-0.6.38-html.patch
Patch2: nginx-0.6.38-html.patch
# PATCH-FIX-UPSTREAM nginx-1.2.4-perl_vendor_install.patch
Patch3: nginx-1.2.4-perl_vendor_install.patch
# PATCH-FIX-UPSTREAM fix /etc/nginx/nginx.conf to suit Linux env
Patch4: nginx-1.6.1-default_config.patch
# PATCH for fixing docs/html path
Patch5: nginx-1.0.15_docs.patch
# PATCH-FIX-UPSTREAM nginx-aio.patch fix support for Linux AIO
Patch6: nginx-aio.patch
%if 0%{?suse_version} > 1310
Patch7: nginx-1.4.4-passenger-4.0.33_fix.patch
%else
%if 0%{?suse_version} == 1310
Patch7: nginx-1.4.2-passenger_fix.patch
%else
Patch7: nginx-1.4.4-passenger-3.0.12_fix.patch
%endif
%endif
BuildRequires: GeoIP-devel BuildRequires: GeoIP-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: gd-devel BuildRequires: gd-devel
@ -71,55 +110,21 @@ BuildRequires: curl-devel
BuildRequires: ruby-devel BuildRequires: ruby-devel
BuildRequires: rubygem-passenger BuildRequires: rubygem-passenger
BuildRequires: rubygem-passenger-devel-static BuildRequires: rubygem-passenger-devel-static
BuildRequires: unzip
Recommends: packageand(rubygem-passenger:rubygem-passenger-nginx) Recommends: packageand(rubygem-passenger:rubygem-passenger-nginx)
%endif %endif
%if 0%{?suse_version} >= 1210 %if 0%{?with_fancyindex}
BuildRequires: systemd BuildRequires: unzip
%{?systemd_requires}
%define has_systemd 1
%endif %endif
Recommends: logrotate Conflicts: nginx-0.5 nginx-0.6 nginx-0.7 nginx-0.8 nginx-0.9 nginx-1.0 nginx-1.2 nginx-1.3 nginx-1.4 nginx-1.5 nginx-1.7
Provides: nginx-1.6 = %{version}
%requires_eq perl
PreReq: %fillup_prereq PreReq: %fillup_prereq
PreReq: %insserv_prereq PreReq: %insserv_prereq
PreReq: pwdutils Requires(pre): pwdutils
# Recommends: logrotate
Conflicts: nginx-0.5 nginx-0.6 nginx-0.7 nginx-0.8 nginx-0.9 nginx-1.0 nginx-1.2 nginx-1.3
%requires_eq perl
#
Url: http://nginx.org/
Source: http://nginx.org/download/nginx-%{version}.tar.gz
Source1: nginx.init
Source2: nginx.logrotate
Source3: nginx.service
Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{fancyindex_version}.zip
Source100: nginx.rpmlintrc
# PATCH-FIX-UPSTREAM nginx-0.4.0-no_Werror.patch
Patch: nginx-0.4.0-no_Werror.patch
# PATCH-FIX-UPSTREAM nginx-0.6.38-html.patch
Patch2: nginx-0.6.38-html.patch
# PATCH-FIX-UPSTREAM nginx-1.2.4-perl_vendor_install.patch
Patch3: nginx-1.2.4-perl_vendor_install.patch
# PATCH-FIX-UPSTREAM nginx-1.0.4_default_config.patch
Patch4: nginx-1.0.4_default_config.patch
# PATCH for fixing docs/html path
Patch5: nginx-1.0.15_docs.patch
# PATCH-FIX-UPSTREAM nginx-aio.patch fix support for Linux AIO
Patch6: nginx-aio.patch
%if 0%{?suse_version} > 1310
Patch7: nginx-1.4.4-passenger-4.0.33_fix.patch
%else
%if 0%{?suse_version} == 1310
Patch7: nginx-1.4.2-passenger_fix.patch
%else
Patch7: nginx-1.4.4-passenger-3.0.12_fix.patch
%endif
%endif
Summary: A HTTP server and IMAP/POP3 proxy server
License: BSD-2-Clause
Group: Productivity/Networking/Web/Proxy
Provides: http_daemon Provides: http_daemon
Provides: httpd Provides: httpd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev.
@ -130,8 +135,12 @@ Author:
Igor Sysoev Igor Sysoev
%prep %prep
%setup -n %{pkg_name}-%{version} -b4 %if 0%{?with_fancyindex}
%patch %setup -q -n %{pkg_name}-%{version} -b4
%else
%setup -q -n %{pkg_name}-%{version}
%endif
%patch0
%patch2 %patch2
%patch3 %patch3
%patch4 %patch4
@ -142,7 +151,7 @@ perl -pi -e 's|\r\n|\n|g' contrib/geo2nginx.pl
%if 0%{?with_passenger} %if 0%{?with_passenger}
cp -a %{_libdir}/ruby/gems/%{rb_ver}/gems/passenger-* passenger cp -a %{_libdir}/ruby/gems/%{rb_ver}/gems/passenger-* passenger
%if 0%{suse_version} < 1310 %if 0%{?suse_version} < 1310
if [[ -f "passenger/ext/common/libpassenger_common.a" ]] || \ if [[ -f "passenger/ext/common/libpassenger_common.a" ]] || \
[[ -f "passenger/ext/common/libboost_oxt.a" ]]; then [[ -f "passenger/ext/common/libboost_oxt.a" ]]; then
rm -r passenger/ext/common/libboost_oxt* passenger/ext/common/libpassenger_common* rm -r passenger/ext/common/libboost_oxt* passenger/ext/common/libpassenger_common*
@ -150,6 +159,7 @@ fi
%endif %endif
%patch7 %patch7
%endif %endif
%if 0%{with_fancyindex} %if 0%{with_fancyindex}
mkdir -p ngx-fancyindex-%{fancyindex_version} mkdir -p ngx-fancyindex-%{fancyindex_version}
pushd ../ngx-fancyindex-%{fancyindex_version} pushd ../ngx-fancyindex-%{fancyindex_version}
@ -157,6 +167,10 @@ cp -r template* LICENSE *.rst $RPM_BUILD_DIR/%{pkg_name}-%{version}/ngx-fancyind
popd popd
%endif %endif
%if 0%{?suse_version} > 1310
sed -i "s/\/var\/run/\/run/" %{_sourcedir}/nginx.init
%endif
%build %build
./configure \ ./configure \
--prefix=%{ngx_prefix}/ \ --prefix=%{ngx_prefix}/ \
@ -175,11 +189,9 @@ popd
--without-select_module \ --without-select_module \
--without-poll_module \ --without-poll_module \
--with-ipv6 \ --with-ipv6 \
%if 0%{?suse_version} > 1110
--with-file-aio \ --with-file-aio \
%endif
--with-http_ssl_module \ --with-http_ssl_module \
%if 0%{suse_version} > 1220 %if 0%{?suse_version} > 1220
--with-http_spdy_module \ --with-http_spdy_module \
%endif %endif
--with-http_realip_module \ --with-http_realip_module \
@ -219,7 +231,7 @@ popd
%endif %endif
--with-md5=/usr \ --with-md5=/usr \
--with-sha1=/usr \ --with-sha1=/usr \
%if 0%{?suse_version} > 1000 || 0%{?fedora_version} > 4 || 0%{?mandriva_version} > 2006 %if 0%{?suse_version} > 1220
--with-cc-opt="%{optflags} -fPIE -D_GNU_SOURCE -std=gnu99 -fstack-protector" \ --with-cc-opt="%{optflags} -fPIE -D_GNU_SOURCE -std=gnu99 -fstack-protector" \
--with-ld-opt="-Wl,-z,relro,-z,now -pie" --with-ld-opt="-Wl,-z,relro,-z,now -pie"
%else %else
@ -228,54 +240,54 @@ popd
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
make install DESTDIR="%buildroot" make DESTDIR=%{buildroot} install %{?_smp_mflags}
%perl_process_packlist %perl_process_packlist
#
%{__install} -d -m 0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi}
#
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
%{__install} -D -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/%{pkg_name} install -d -m 0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi}
%if 0%{?has_systemd} install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
%{__install} -D -m 0644 %{S:3} %{buildroot}%{_unitdir}/nginx.service ln -s -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{pkg_name}
%if 0%{?with_systemd}
install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service
%endif %endif
%{__rm} %{buildroot}/srv/www/htdocs/index.html rm %{buildroot}/srv/www/htdocs/index.html
%post %post
%fillup_and_insserv %{pkg_name} %fillup_and_insserv %{pkg_name}
%if 0%{?has_systemd} %if 0%{?with_systemd}
%service_add_post nginx.service %service_add_post nginx.service
%endif %endif
%preun %preun
%stop_on_removal %{pkg_name} %stop_on_removal %{pkg_name}
%if 0%{?has_systemd} %if 0%{?with_systemd}
%service_del_preun nginx.service %service_del_preun nginx.service
%endif %endif
%postun %postun
%restart_on_update %{pkg_name} %restart_on_update %{pkg_name}
%{insserv_cleanup} %insserv_cleanup
%if 0%{?has_systemd} %if 0%{?with_systemd}
%service_del_postun nginx.service %service_del_postun nginx.service
%endif %endif
%pre %pre
/usr/sbin/groupadd -r %{ngx_user_group} &>/dev/null ||: %{_sbindir}/groupadd -r %{ngx_user_group} &>/dev/null ||:
/usr/sbin/useradd -g %{ngx_user_group} -s /bin/false -r -c "user for %{ngx_user_group}" -d %{ngx_home} %{ngx_user_group} &>/dev/null ||: %{_sbindir}/useradd -g %{ngx_user_group} -s /bin/false -r -c "user for %{ngx_user_group}" -d %{ngx_home} %{ngx_user_group} &>/dev/null ||:
%if 0%{?has_systemd} %if 0%{?with_systemd}
%service_add_pre nginx.service %service_add_pre nginx.service
%endif %endif
%files %files
%defattr(-,root,root,-) %defattr(-,root,root)
%dir %{ngx_conf_dir}/ %dir %{ngx_conf_dir}/
%config(noreplace) %{ngx_conf_dir}/koi-utf %config(noreplace) %{ngx_conf_dir}/koi-utf
%config(noreplace) %{ngx_conf_dir}/koi-win %config(noreplace) %{ngx_conf_dir}/koi-win
@ -303,7 +315,7 @@ make install DESTDIR="%buildroot"
%{_sysconfdir}/init.d/%{pkg_name} %{_sysconfdir}/init.d/%{pkg_name}
%{_sbindir}/rc%{pkg_name} %{_sbindir}/rc%{pkg_name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{pkg_name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{pkg_name}
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) /var/log/nginx/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{_localstatedir}/log/nginx/
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_http} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_http}
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_proxy} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_proxy}
@ -311,11 +323,11 @@ make install DESTDIR="%buildroot"
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_scgi} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_scgi}
%dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_uwsgi} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_uwsgi}
%doc CHANGES* %doc CHANGES*
%doc conf/ contrib/ %doc conf/ contrib/
%if 0%{with_fancyindex} %if 0%{with_fancyindex}
%doc ngx-fancyindex-%{fancyindex_version}/ %doc ngx-fancyindex-%{fancyindex_version}/
%endif %endif
%if 0%{?has_systemd} %if 0%{?with_systemd}
%{_unitdir}/nginx.service %{_unitdir}/nginx.service
%endif %endif