[nginx/f18] Update to 1.2.4 and numerous bug fixes
Jamie Nguyen
jamielinux at fedoraproject.org
Sun Oct 28 15:35:57 UTC 2012
commit 08e01611bb7a05f775afe9470bad181d9f11e32f
Author: Jamie Nguyen <j at jamielinux.com>
Date: Sun Oct 28 15:35:30 2012 +0000
Update to 1.2.4 and numerous bug fixes
.gitignore | 1 +
README.fedora | 15 ------
default.conf | 53 -------------------
nginx-upgrade.8 | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
nginx.conf | 129 ++++++++++++++++++++++++++++++++++-------------
nginx.spec | 93 ++++++++++++++++-----------------
sources | 2 +-
ssl.conf | 24 ---------
virtual.conf | 15 ------
9 files changed, 291 insertions(+), 192 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a306d7e..4f6a282 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ x86_64/
/nginx-1.2.0.tar.gz
/nginx-1.2.1.tar.gz
/nginx-1.2.3.tar.gz
+/nginx-1.2.4.tar.gz
diff --git a/nginx-upgrade b/nginx-upgrade
old mode 100755
new mode 100644
diff --git a/nginx-upgrade.8 b/nginx-upgrade.8
new file mode 100644
index 0000000..2a435ab
--- /dev/null
+++ b/nginx-upgrade.8
@@ -0,0 +1,151 @@
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "NGINX-UPGRADE 8"
+.TH NGINX-UPGRADE 8 "2012-10-28" " " " "
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+nginx\-upgrade \- tool to upgrade nginx without any downtime
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fInginx-upgrade\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This downstream shell script updates nginx without any downtime. After
+upgrading nginx via the package manager, running this script will create
+a new nginx master. This master takes over all new requests. The old
+masters and workers are then gracefully shutdown without breaking any
+existing connections.
+.PP
+For further information, see: <http://nginx.org/en/docs/control.html>
+.SH "BUGS"
+.IX Header "BUGS"
+If you find any bugs, please send an email to the author.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Jamie Nguyen <jamielinux at fedoraproject.org>
diff --git a/nginx.conf b/nginx.conf
index 6116a14..88812a4 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -1,21 +1,8 @@
-#######################################################################
-#
-# This is the main Nginx configuration file.
-#
-# More information about the configuration options is available on
-# * the English wiki - http://wiki.nginx.org/Main
-# * the Russian documentation - http://sysoev.ru/nginx/
-#
-#######################################################################
-
-#----------------------------------------------------------------------
-# Main Module - directives that cover basic functionality
-#
-# http://wiki.nginx.org/NginxHttpMainModule
-#
-#----------------------------------------------------------------------
-
-user nginx;
+# For more information on configuration, see:
+# * Official English Documentation: http://nginx.org/en/docs/
+# * Official Russian Documentation: http://nginx.org/ru/docs/
+
+user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
@@ -25,25 +12,11 @@ error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
-#----------------------------------------------------------------------
-# Events Module
-#
-# http://wiki.nginx.org/NginxHttpEventsModule
-#
-#----------------------------------------------------------------------
-
events {
worker_connections 1024;
}
-#----------------------------------------------------------------------
-# HTTP Core Module
-#
-# http://wiki.nginx.org/NginxHttpCoreModule
-#
-#----------------------------------------------------------------------
-
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
@@ -61,9 +34,93 @@ http {
keepalive_timeout 65;
#gzip on;
-
- # Load config files from the /etc/nginx/conf.d directory
- # The default server is in conf.d/default.conf
- include /etc/nginx/conf.d/*.conf;
+
+ server {
+ listen 80;
+ server_name localhost;
+
+ #charset koi8-r;
+
+ #access_log /var/log/nginx/host.access.log main;
+
+ location / {
+ root /usr/share/nginx/html;
+ index index.html index.htm;
+ }
+
+ # redirect server error pages to the static page /40x.html
+ #
+ error_page 404 /404.html;
+ location = /40x.html {
+ root /usr/share/nginx/html;
+ }
+
+ # redirect server error pages to the static page /50x.html
+ #
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root /usr/share/nginx/html;
+ }
+
+ # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+ #
+ #location ~ \.php$ {
+ # proxy_pass http://127.0.0.1;
+ #}
+
+ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
+ #
+ #location ~ \.php$ {
+ # root html;
+ # fastcgi_pass 127.0.0.1:9000;
+ # fastcgi_index index.php;
+ # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
+ # include fastcgi_params;
+ #}
+
+ # deny access to .htaccess files, if Apache's document root
+ # concurs with nginx's one
+ #
+ #location ~ /\.ht {
+ # deny all;
+ #}
+ }
+
+
+ # another virtual host using mix of IP-, name-, and port-based configuration
+ #
+ #server {
+ # listen 8000;
+ # listen somename:8080;
+ # server_name somename alias another.alias;
+
+ # location / {
+ # root html;
+ # index index.html index.htm;
+ # }
+ #}
+
+
+ # HTTPS server
+ #
+ #server {
+ # listen 443;
+ # server_name localhost;
+
+ # ssl on;
+ # ssl_certificate cert.pem;
+ # ssl_certificate_key cert.key;
+
+ # ssl_session_timeout 5m;
+
+ # ssl_protocols SSLv2 SSLv3 TLSv1;
+ # ssl_ciphers HIGH:!aNULL:!MD5;
+ # ssl_prefer_server_ciphers on;
+
+ # location / {
+ # root html;
+ # index index.html index.htm;
+ # }
+ #}
}
diff --git a/nginx.spec b/nginx.spec
index 4b9d629..2cbdd5e 100644
--- a/nginx.spec
+++ b/nginx.spec
@@ -10,7 +10,7 @@
Name: nginx
Epoch: 1
-Version: 1.2.3
+Version: 1.2.4
Release: 1%{?dist}
Summary: A high performance web server and reverse proxy server
@@ -24,11 +24,8 @@ Source0: http://nginx.org/download/nginx-%{version}.tar.gz
Source1: nginx.service
Source2: nginx.logrotate
Source3: nginx.conf
-Source4: default.conf
-Source5: ssl.conf
-Source6: virtual.conf
-Source7: nginx-upgrade
-Source8: README.fedora
+Source4: nginx-upgrade
+Source5: nginx-upgrade.8
Source100: index.html
Source101: poweredby.png
Source102: nginx-logo.png
@@ -47,16 +44,16 @@ BuildRequires: pcre-devel
BuildRequires: perl-devel
BuildRequires: perl(ExtUtils::Embed)
BuildRequires: zlib-devel
-BuildRequires: systemd-units
+BuildRequires: systemd
Requires: GeoIP
Requires: gd
Requires: openssl
Requires: pcre
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires(pre): shadow-utils
-Requires(post): chkconfig, systemd-units
-Requires(preun): chkconfig, initscripts, systemd-units
-Requires(postun): initscripts, systemd-units
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
Provides: webserver
%description
@@ -68,7 +65,6 @@ memory usage.
%prep
%setup -q
%patch0 -p0
-cp -a %{SOURCE8} .
%build
@@ -138,8 +134,6 @@ install -p -d -m 0755 %{buildroot}%{nginx_webroot}
install -p -m 0644 %{SOURCE3} \
%{buildroot}%{nginx_confdir}
-install -p -m 0644 %{SOURCE4} %{SOURCE5} %{SOURCE6} \
- %{buildroot}%{nginx_confdir}/conf.d
install -p -m 0644 %{SOURCE100} \
%{buildroot}%{nginx_webroot}
install -p -m 0644 %{SOURCE101} %{SOURCE102} \
@@ -147,7 +141,11 @@ install -p -m 0644 %{SOURCE101} %{SOURCE102} \
install -p -m 0644 %{SOURCE103} %{SOURCE104} \
%{buildroot}%{nginx_webroot}
-install -p -D -m 0755 %{SOURCE7} %{buildroot}%{_bindir}/nginx-upgrade
+install -p -D -m 0644 %{_builddir}/nginx-%{version}/man/nginx.8 \
+ %{buildroot}%{_mandir}/man8/nginx.8
+
+install -p -D -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/nginx-upgrade
+install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man8/nginx-upgrade.8
%pre
@@ -160,36 +158,22 @@ if [ $1 -eq 1 ]; then
fi
%post
-if [ $1 -eq 1 ]; then
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
-
-%triggerun -- nginx < 1:1.0.12-2
-if /sbin/chkconfig --level 3 nginx; then
- /bin/systemctl enable nginx.service >/dev/null 2>&1 || :
-fi
-/sbin/chkconfig --del nginx >/dev/null 2>&1 || :
-/bin/systemctl try-restart nginx.service >/dev/null 2>&1 || :
+%systemd_post nginx.service
%preun
-if [ $1 -eq 0 ]; then
- /bin/systemctl --no-reload disable nginx.service >/dev/null 2>&1 || :
- /bin/systemctl stop nginx.service >/dev/null 2>&1 || :
-fi
+%systemd_preun nginx.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -gt 1 ]; then
- /bin/systemctl try-restart nginx.service >/dev/null 2>&1 || :
-fi
-
+%systemd_postun nginx.service
%files
-%doc LICENSE CHANGES README README.fedora
+%doc LICENSE CHANGES README
%{nginx_datadir}/
%{_bindir}/nginx-upgrade
%{_sbindir}/nginx
-%{_mandir}/man3/nginx.3pm.gz
+%{_mandir}/man3/nginx.3pm*
+%{_mandir}/man8/nginx.8*
+%{_mandir}/man8/nginx-upgrade.8*
%{_unitdir}/nginx.service
%dir %{nginx_confdir}
%dir %{nginx_confdir}/conf.d
@@ -209,7 +193,6 @@ fi
%config(noreplace) %{nginx_confdir}/uwsgi_params
%config(noreplace) %{nginx_confdir}/uwsgi_params.default
%config(noreplace) %{nginx_confdir}/win-utf
-%config(noreplace) %{nginx_confdir}/conf.d/*.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/nginx
%dir %{perl_vendorarch}/auto/nginx
%{perl_vendorarch}/nginx.pm
@@ -219,7 +202,21 @@ fi
%changelog
-* Fri Sep 21 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.2.3-1
+* Sun Oct 28 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.2.4-1
+- update to upstream release 1.2.4
+- introduce new systemd-rpm macros (#850228)
+- link to official documentation not the community wiki (#870733)
+- do not run systemctl try-restart after package upgrade to allow the
+ administrator to run nginx-upgrade and avoid downtime
+- add nginx man page (#870738)
+- add nginx-upgrade man page and remove README.fedora
+- remove chkconfig from Requires(post/preun)
+- remove initscripts from Requires(preun/postun)
+- remove separate configuration files in "/etc/nginx/conf.d" directory
+ and revert to upstream default of a centralized nginx.conf file
+ (#803635) (#842738)
+
+* Fri Sep 21 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.2.3-1
- update to upstream release 1.2.3
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:1.2.1-3
@@ -228,16 +225,16 @@ fi
* Thu Jun 28 2012 Petr Pisar <ppisar at redhat.com> - 1:1.2.1-2
- Perl 5.16 rebuild
-* Sun Jun 10 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.2.1-1
+* Sun Jun 10 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.2.1-1
- update to upstream release 1.2.1
* Fri Jun 08 2012 Petr Pisar <ppisar at redhat.com> - 1:1.2.0-2
- Perl 5.16 rebuild
-* Wed May 16 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.2.0-1
+* Wed May 16 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.2.0-1
- update to upstream release 1.2.0
-* Wed May 16 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.15-4
+* Wed May 16 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.15-4
- add nginx-upgrade to replace functionality from the nginx initscript
that was lost after migration to systemd
- add README.fedora to describe usage of nginx-upgrade
@@ -248,32 +245,32 @@ fi
advice from nginx-devel
- nginx.service: use private /tmp
-* Mon May 14 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.15-3
+* Mon May 14 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.15-3
- fix incorrect postrotate script in nginx.logrotate
-* Thu Apr 19 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.15-2
+* Thu Apr 19 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.15-2
- renable auto-cc-gcc patch due to warnings on rawhide
-* Sat Apr 14 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.15-1
+* Sat Apr 14 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.15-1
- update to upstream release 1.0.15
- no need to apply auto-cc-gcc patch
- add %%global _hardened_build 1
-* Thu Mar 15 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.14-1
+* Thu Mar 15 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.14-1
- update to upstream release 1.0.14
- amend some %%changelog formatting
-* Tue Mar 06 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.13-1
+* Tue Mar 06 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.13-1
- update to upstream release 1.0.13
- amend --pid-path and --log-path
-* Sun Mar 04 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.12-5
+* Sun Mar 04 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.12-5
- change pid path in nginx.conf to match systemd service file
-* Sun Mar 04 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.12-3
+* Sun Mar 04 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.12-3
- fix %%pre scriptlet
-* Mon Feb 20 2012 Jamie Nguyen <jamie at tomoyolinux.co.uk> - 1:1.0.12-2
+* Mon Feb 20 2012 Jamie Nguyen <jamielinux at fedoraproject.org> - 1:1.0.12-2
- update upstream URL
- replace %%define with %%global
- remove obsolete BuildRoot tag, %%clean section and %%defattr
diff --git a/sources b/sources
index c47c874..ebefa9d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0a986e60826d9e3b453dbefc36bf8f6c nginx-1.2.3.tar.gz
+a7c9a515f632c8cbb07ab67392208088 nginx-1.2.4.tar.gz
More information about the scm-commits
mailing list