mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
Compare commits
66 Commits
Author | SHA1 | Date | |
---|---|---|---|
90fc91567f | |||
a0f6653c6a | |||
61586a75e3 | |||
9d36d4f069 | |||
b1a85d924b | |||
6994c5e125 | |||
2f20dac034 | |||
098889b2ed | |||
7a9c09de5d | |||
22d66022a6 | |||
e2c0799394 | |||
44540173ea | |||
843c260daf | |||
a864af25cf | |||
a21f5e4631 | |||
b0b9544aa5 | |||
3e69abf93c | |||
c408e5f68f | |||
2223edb87d | |||
adcff66454 | |||
68fdc6754b | |||
645530f76e | |||
24a6779879 | |||
9fcae3552f | |||
47907fa3a9 | |||
f9a2702f5a | |||
19c6e1fb5c | |||
11284ae527 | |||
cf01381428 | |||
7447076d56 | |||
4f54490595 | |||
3b500d7c96 | |||
3b74625ad3 | |||
b1400169a7 | |||
bc2068420c | |||
b81a5cea66 | |||
add30287e1 | |||
ce30f58339 | |||
6e74463f66 | |||
79520a30f8 | |||
5426551809 | |||
bcb9b3b698 | |||
9afb06f5eb | |||
d94772353a | |||
d7da4d6037 | |||
4950ec7f62 | |||
706dee9b7f | |||
5373add959 | |||
a5baad4b83 | |||
0ed12d446c | |||
ec8acae28e | |||
0ca75dbf45 | |||
e6152d3af4 | |||
1780a1dd5f | |||
509afa3d53 | |||
274808af32 | |||
6e8b2f4984 | |||
6b905f9eef | |||
12b67e3a5c | |||
7d5dd68ded | |||
7a7576319e | |||
e767256038 | |||
a8ea810fdc | |||
dafd10b27d | |||
eb8fc7771d | |||
79dc3c56aa |
26
.github/ISSUE_TEMPLATE.md
vendored
Normal file
26
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
This place is for bug reports and development discussions only. For general questions and
|
||||||
|
discussions, please join the openresty-en mailing list instead: https://groups.google.com/group/openresty-en.
|
||||||
|
If you want to use Chinese, please join the openresty (Chinese) mailing list instead: https://groups.google.com/group/openresty.
|
||||||
|
Do not use Chinese in this place.
|
||||||
|
|
||||||
|
Before you open a new issue, please search the internet and make sure it is not duplicate.
|
||||||
|
|
||||||
|
Ensure you have provided the following details while reporting a problem:
|
||||||
|
|
||||||
|
- [ ] The exact version of the related software, including but not limited to the OpenResty version
|
||||||
|
(if any), the NGINX core version, the `ngx_lua` module version(via `openresty -V` or `nginx -V`),
|
||||||
|
and your operating system version(via `uname -a`).
|
||||||
|
- [ ] **A minimal and standalone test case** that others can easily run on their side and
|
||||||
|
reproduce the issue you are seeing.
|
||||||
|
- [ ] Do not simply say "something is broken" or "something does not work". Always provide
|
||||||
|
as much details as possible. Always describe **the symptoms and your expected results**.
|
||||||
|
|
||||||
|
You can (temporarily) enable the nginx debugging logs to see the internal workings
|
||||||
|
of NGINX in your nginx''s `error.log` file. See http://nginx.org/en/docs/debugging_log.html
|
||||||
|
The same instructions apply equally well to OpenResty.
|
||||||
|
|
||||||
|
If you are seeing crashes, please provide the full backtrace for the crash. See
|
||||||
|
https://www.nginx.com/resources/wiki/start/topics/tutorials/debugging/#core-dump
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
Thanks for your cooperation.
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
I hereby granted the copyright of the changes in this pull request
|
||||||
|
to the authors of this openresty project.
|
323
COPYRIGHT
323
COPYRIGHT
@ -1,6 +1,7 @@
|
|||||||
Copyright (C) 2009-2015, by Yichun "agentzh" Zhang, OpenResty Inc.
|
Copyright (C) 2009-2015, by Yichun "agentzh" Zhang, OpenResty Inc.
|
||||||
|
|
||||||
Copyright (C) 2009-2014, by Xiaozhe Wang (chaoslawful) <chaoslawful@gmail.com>.
|
Copyright (C) 2009-2014, by Xiaozhe Wang (chaoslawful) <chaoslawful@gmail.
|
||||||
|
com>.
|
||||||
|
|
||||||
Copyright (C) 2010-2014, by FRiCKLE Piotr Sikora <info@frickle.com>.
|
Copyright (C) 2010-2014, by FRiCKLE Piotr Sikora <info@frickle.com>.
|
||||||
|
|
||||||
@ -12,19 +13,34 @@ Copyright (C) Guanlan Dai
|
|||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||||
|
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
|
||||||
|
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGE.
|
||||||
|
|
||||||
Copyright (c) 2010, Marcus Clyne, Simpl (simpl.it)
|
Copyright (c) 2010, Marcus Clyne, Simpl (simpl.it)
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright
|
* Redistributions of source code must retain the above copyright
|
||||||
notice, this list of conditions and the following disclaimer.
|
notice, this list of conditions and the following disclaimer.
|
||||||
@ -35,15 +51,18 @@ modification, are permitted provided that the following conditions are met:
|
|||||||
names of its contributors may be used to endorse or promote products
|
names of its contributors may be used to endorse or promote products
|
||||||
derived from this software without specific prior written permission.
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||||
|
IS" AND
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
DISCLAIMED. IN NO EVENT SHALL MARCUS CLYNE OR SIMPL BE LIABLE FOR ANY
|
DISCLAIMED. IN NO EVENT SHALL MARCUS CLYNE OR SIMPL BE LIABLE FOR ANY
|
||||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
AND
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
THIS
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@ -107,22 +126,29 @@ LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/
|
|||||||
|
|
||||||
Copyright (C) 2005-2015 Mike Pall. All rights reserved.
|
Copyright (C) 2005-2015 Mike Pall. All rights reserved.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
copy
|
||||||
|
of this software and associated documentation files (the "Software"), to
|
||||||
|
deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
[ MIT license: http://www.opensource.org/licenses/mit-license.php ]
|
[ MIT license: http://www.opensource.org/licenses/mit-license.php ]
|
||||||
@ -133,22 +159,29 @@ Lua License
|
|||||||
|
|
||||||
Copyright (C) 1994-2012 Lua.org, PUC-Rio.
|
Copyright (C) 1994-2012 Lua.org, PUC-Rio.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
copy
|
||||||
|
of this software and associated documentation files (the "Software"), to
|
||||||
|
deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@ -232,6 +265,250 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|||||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
SUCH DAMAGE.
|
SUCH DAMAGE.
|
||||||
|
|
||||||
|
The licence and distribution terms for any publically available version
|
||||||
|
or
|
||||||
|
derivative of this code cannot be changed. i.e. this code cannot simply
|
||||||
|
be
|
||||||
|
copied and put under another distribution licence
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
OpenSSL
|
||||||
|
|
||||||
|
Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
3. All advertising materials mentioning features or use of this
|
||||||
|
software must display the following acknowledgment:
|
||||||
|
"This product includes software developed by the OpenSSL Project
|
||||||
|
for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||||
|
|
||||||
|
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||||
|
endorse or promote products derived from this software without
|
||||||
|
prior written permission. For written permission, please contact
|
||||||
|
openssl-core@openssl.org.
|
||||||
|
|
||||||
|
5. Products derived from this software may not be called "OpenSSL"
|
||||||
|
nor may "OpenSSL" appear in their names without prior written
|
||||||
|
permission of the OpenSSL Project.
|
||||||
|
|
||||||
|
6. Redistributions of any form whatsoever must retain the following
|
||||||
|
acknowledgment:
|
||||||
|
"This product includes software developed by the OpenSSL Project
|
||||||
|
for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||||
|
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||||
|
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
|
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
This product includes cryptographic software written by Eric Young
|
||||||
|
(eay@cryptsoft.com). This product includes software written by Tim
|
||||||
|
Hudson (tjh@cryptsoft.com).
|
||||||
|
|
||||||
|
Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
This package is an SSL implementation written
|
||||||
|
by Eric Young (eay@cryptsoft.com).
|
||||||
|
The implementation was written so as to conform with Netscapes SSL.
|
||||||
|
|
||||||
|
This library is free for commercial and non-commercial use as long as
|
||||||
|
the following conditions are aheared to. The following conditions
|
||||||
|
apply to all code found in this distribution, be it the RC4, RSA,
|
||||||
|
lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||||
|
included with this distribution is covered by the same copyright terms
|
||||||
|
except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||||
|
|
||||||
|
Copyright remains Eric Young's, and as such any Copyright notices in
|
||||||
|
the code are not to be removed.
|
||||||
|
If this package is used in a product, Eric Young should be given attribution
|
||||||
|
as the author of the parts of the library used.
|
||||||
|
This can be in the form of a textual message at program startup or
|
||||||
|
in documentation (online or textual) provided with the package.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. All advertising materials mentioning features or use of this software
|
||||||
|
must display the following acknowledgement:
|
||||||
|
"This product includes cryptographic software written by
|
||||||
|
Eric Young (eay@cryptsoft.com)"
|
||||||
|
The word 'cryptographic' can be left out if the rouines from the library
|
||||||
|
being used are not cryptographic related :-).
|
||||||
|
|
||||||
|
4. If you include any Windows specific code (or a derivative thereof) from
|
||||||
|
the apps directory (application code) you must include an acknowledgement:
|
||||||
|
"This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGE.
|
||||||
|
|
||||||
The licence and distribution terms for any publically available version or
|
The licence and distribution terms for any publically available version or
|
||||||
derivative of this code cannot be changed. i.e. this code cannot simply be
|
derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||||
copied and put under another distribution licence
|
copied and put under another distribution licence
|
||||||
|
[including the GNU Public Licence.]
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
PCRE LICENCE
|
||||||
|
------------
|
||||||
|
|
||||||
|
PCRE is a library of functions to support regular expressions whose syntax
|
||||||
|
and semantics are as close as possible to those of the Perl 5 language.
|
||||||
|
|
||||||
|
Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
|
||||||
|
specified below. The documentation for PCRE, supplied in the "doc"
|
||||||
|
directory, is distributed under the same terms as the software itself. The data
|
||||||
|
in the testdata directory is not copyrighted and is in the public domain.
|
||||||
|
|
||||||
|
The basic library functions are written in C and are freestanding. Also
|
||||||
|
included in the distribution is a set of C++ wrapper functions, and a
|
||||||
|
just-in-time compiler that can be used to optimize pattern matching. These
|
||||||
|
are both optional features that can be omitted when the library is built.
|
||||||
|
|
||||||
|
|
||||||
|
THE BASIC LIBRARY FUNCTIONS
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
Written by: Philip Hazel
|
||||||
|
Email local part: ph10
|
||||||
|
Email domain: cam.ac.uk
|
||||||
|
|
||||||
|
University of Cambridge Computing Service,
|
||||||
|
Cambridge, England.
|
||||||
|
|
||||||
|
Copyright (c) 1997-2017 University of Cambridge
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
PCRE JUST-IN-TIME COMPILATION SUPPORT
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
Written by: Zoltan Herczeg
|
||||||
|
Email local part: hzmester
|
||||||
|
Emain domain: freemail.hu
|
||||||
|
|
||||||
|
Copyright(c) 2010-2017 Zoltan Herczeg
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
STACK-LESS JUST-IN-TIME COMPILER
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
Written by: Zoltan Herczeg
|
||||||
|
Email local part: hzmester
|
||||||
|
Emain domain: freemail.hu
|
||||||
|
|
||||||
|
Copyright(c) 2009-2017 Zoltan Herczeg
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
THE C++ WRAPPER FUNCTIONS
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Contributed by: Google Inc.
|
||||||
|
|
||||||
|
Copyright (c) 2007-2012, Google Inc.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
THE "BSD" LICENCE
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the University of Cambridge nor the name of Google
|
||||||
|
Inc. nor the names of their contributors may be used to endorse or
|
||||||
|
promote products derived from this software without specific prior
|
||||||
|
written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
zlib
|
||||||
|
|
||||||
|
(C) 1995-2013 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
|
Jean-loup Gailly Mark Adler
|
||||||
|
jloup@gzip.org madler@alumni.caltech.edu
|
||||||
|
|
||||||
|
If you use the zlib library in a product, we would appreciate *not* receiving
|
||||||
|
lengthy legal documents to sign. The sources are provided for free but without
|
||||||
|
warranty of any kind. The library has been entirely written by Jean-loup
|
||||||
|
Gailly and Mark Adler; it does not include third-party code.
|
||||||
|
|
||||||
|
If you redistribute modified sources, we would appreciate that you include in
|
||||||
|
the file ChangeLog history information documenting your changes. Please read
|
||||||
|
the FAQ for more information on the distribution of modified source versions.
|
||||||
|
@ -51,12 +51,12 @@ make
|
|||||||
|
|
||||||
at the top of the bundle source tree.
|
at the top of the bundle source tree.
|
||||||
|
|
||||||
Please note that you may need to install some extra dependencies, like `perl` and `dos2unix`.
|
Please note that you may need to install some extra dependencies, like `perl`, `dos2unix`, and `mercurial`.
|
||||||
On Fedora 22, for example, installing the dependencies
|
On Fedora 22, for example, installing the dependencies
|
||||||
is as simple as running the following commands:
|
is as simple as running the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dnf install perl dos2unix
|
sudo dnf install perl dos2unix mercurial
|
||||||
```
|
```
|
||||||
|
|
||||||
[Back to TOC](#table-of-contents)
|
[Back to TOC](#table-of-contents)
|
||||||
|
@ -196,6 +196,6 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file luajit.html
|
#From file luajit.html
|
||||||
# 8082 bytes of input
|
# 8082 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -82,6 +82,6 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file contact.html
|
#From file contact.html
|
||||||
# 2989 bytes of input
|
# 2989 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -170,7 +170,7 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file ext_c_api.html
|
#From file ext_c_api.html
|
||||||
# 6042 bytes of input
|
# 6042 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
# Deleting phrasal "code" element (`tt_18) because it has super-phrasal elements (`br_3) as children.
|
# Deleting phrasal "code" element (`tt_18) because it has super-phrasal elements (`br_3) as children.
|
||||||
|
@ -280,6 +280,6 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file ext_ffi.html
|
#From file ext_ffi.html
|
||||||
# 10336 bytes of input
|
# 10336 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -495,7 +495,7 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file ext_ffi_api.html
|
#From file ext_ffi_api.html
|
||||||
# 21471 bytes of input
|
# 21471 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
# Deleting phrasal "code" element (`tt_157) because it has super-phrasal elements (`br_3, `br_4) as children.
|
# Deleting phrasal "code" element (`tt_157) because it has super-phrasal elements (`br_3, `br_4) as children.
|
||||||
|
@ -1330,8 +1330,6 @@ exhibit suboptimal performance, especially when used in inner loops:
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item * Bitfield accesses and initializations.
|
|
||||||
|
|
||||||
=item * Vector operations.
|
=item * Vector operations.
|
||||||
|
|
||||||
=item * Table initializers.
|
=item * Table initializers.
|
||||||
@ -1341,7 +1339,7 @@ exhibit suboptimal performance, especially when used in inner loops:
|
|||||||
=item * Non-default initialization of VLA/VLS or large C types (E<gt>
|
=item * Non-default initialization of VLA/VLS or large C types (E<gt>
|
||||||
128 bytes or E<gt> 16 array elements.
|
128 bytes or E<gt> 16 array elements.
|
||||||
|
|
||||||
=item * Conversions from lightuserdata to C<void *>.
|
=item * Bitfield initializations.
|
||||||
|
|
||||||
=item * Pointer differences for element sizes that are not a power of
|
=item * Pointer differences for element sizes that are not a power of
|
||||||
two.
|
two.
|
||||||
@ -1381,7 +1379,7 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
|
|
||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file ext_ffi_semantics.html
|
#From file ext_ffi_semantics.html
|
||||||
# 53847 bytes of input
|
# 53769 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -616,7 +616,7 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file ext_ffi_tutorial.html
|
#From file ext_ffi_tutorial.html
|
||||||
# 22557 bytes of input
|
# 22557 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
# Deleting phrasal "code" element (`tt_100) because it has super-phrasal elements (`br_33, `br_34) as children.
|
# Deleting phrasal "code" element (`tt_100) because it has super-phrasal elements (`br_33, `br_34) as children.
|
||||||
|
@ -175,7 +175,7 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file ext_jit.html
|
#From file ext_jit.html
|
||||||
# 5903 bytes of input
|
# 5903 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
# Deleting phrasal "code" element (`tt_6) because it has super-phrasal elements (`br_2, `br_3) as children.
|
# Deleting phrasal "code" element (`tt_6) because it has super-phrasal elements (`br_2, `br_3) as children.
|
||||||
|
@ -353,6 +353,6 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file ext_profiler.html
|
#From file ext_profiler.html
|
||||||
# 13135 bytes of input
|
# 13135 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -276,11 +276,12 @@ functions.
|
|||||||
|
|
||||||
=item * C<debug.upvalueid()> and C<debug.upvaluejoin()>.
|
=item * C<debug.upvalueid()> and C<debug.upvaluejoin()>.
|
||||||
|
|
||||||
=item * Lua/C API extensions: C<lua_upvalueid()> C<lua_upvaluejoin()>
|
=item * Lua/C API extensions: C<lua_version()> C<lua_upvalueid()>
|
||||||
C<lua_loadx()> C<luaL_fileresult()> C<luaL_execresult()>
|
C<lua_upvaluejoin()> C<lua_loadx()> C<lua_copy()> C<lua_tonumberx()>
|
||||||
|
C<lua_tointegerx()> C<luaL_fileresult()> C<luaL_execresult()>
|
||||||
C<luaL_loadfilex()> C<luaL_loadbufferx()> C<luaL_traceback()>
|
C<luaL_loadfilex()> C<luaL_loadbufferx()> C<luaL_traceback()>
|
||||||
C<luaL_setfuncs()> C<luaL_pushmodule()> C<luaL_newlibtable()>
|
C<luaL_setfuncs()> C<luaL_pushmodule()> C<luaL_newlibtable()>
|
||||||
C<luaL_newlib()>
|
C<luaL_newlib()> C<luaL_testudata()> C<luaL_setmetatable()>
|
||||||
|
|
||||||
=item * Command line option C<-E>.
|
=item * Command line option C<-E>.
|
||||||
|
|
||||||
@ -351,6 +352,8 @@ a leading C<*>.
|
|||||||
|
|
||||||
=item * C<coroutine.isyieldable()>.
|
=item * C<coroutine.isyieldable()>.
|
||||||
|
|
||||||
|
=item * Lua/C API extensions: C<lua_isyieldable()>
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 C++ Exception Interoperability
|
=head2 C++ Exception Interoperability
|
||||||
@ -468,7 +471,7 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
|
|
||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file extensions.html
|
#From file extensions.html
|
||||||
# 17525 bytes of input
|
# 17733 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -219,6 +219,6 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file faq.html
|
#From file faq.html
|
||||||
# 7685 bytes of input
|
# 7685 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -203,8 +203,8 @@ you haven't already done so. Move it to a directory of your choice,
|
|||||||
open a terminal window and change to this directory. Now unpack the
|
open a terminal window and change to this directory. Now unpack the
|
||||||
archive and change to the newly created directory:
|
archive and change to the newly created directory:
|
||||||
|
|
||||||
tar zxf LuaJIT-2.0.4.tar.gz
|
tar zxf LuaJIT-2.0.5.tar.gz
|
||||||
cd LuaJIT-2.0.4
|
cd LuaJIT-2.0.5
|
||||||
|
|
||||||
=head2 Building LuaJIT
|
=head2 Building LuaJIT
|
||||||
|
|
||||||
@ -692,7 +692,7 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file install.html
|
#From file install.html
|
||||||
# 25250 bytes of input
|
# 25250 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
# Deleting phrasal "a" element (`a_34) because it has super-phrasal elements (`br_16) as children.
|
# Deleting phrasal "a" element (`a_34) because it has super-phrasal elements (`br_16) as children.
|
||||||
|
@ -197,7 +197,7 @@ They are mainly used for debugging the JIT compiler itself. For a
|
|||||||
description of their options and output format, please read the comment
|
description of their options and output format, please read the comment
|
||||||
block at the start of their source. They can be found in the C<lib>
|
block at the start of their source. They can be found in the C<lib>
|
||||||
directory of the source distribution or installed under the C<jit>
|
directory of the source distribution or installed under the C<jit>
|
||||||
directory. By default this is C</usr/local/share/luajit-2.0.4/jit> on
|
directory. By default this is C</usr/local/share/luajit-2.0.5/jit> on
|
||||||
POSIX systems.
|
POSIX systems.
|
||||||
|
|
||||||
=head2 C<-O[level]>
|
=head2 C<-O[level]>
|
||||||
@ -416,6 +416,6 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file running.html
|
#From file running.html
|
||||||
# 13720 bytes of input
|
# 13720 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
@ -108,6 +108,6 @@ Copyright E<copy> 2005-2017 Mike Pall E<middot> Contact
|
|||||||
#Pod::HTML2Pod conversion notes:
|
#Pod::HTML2Pod conversion notes:
|
||||||
#From file status.html
|
#From file status.html
|
||||||
# 3931 bytes of input
|
# 3931 bytes of input
|
||||||
#Sat Apr 8 14:31:44 2017 agentzh
|
#Sat May 13 16:35:32 2017 agentzh
|
||||||
# No a_name switch not specified, so will not try to render <a name='...'>
|
# No a_name switch not specified, so will not try to render <a name='...'>
|
||||||
# No a_href switch not specified, so will not try to render <a href='...'>
|
# No a_href switch not specified, so will not try to render <a href='...'>
|
||||||
|
27
patches/nginx-1.11.2-balancer_status_code.patch
Normal file
27
patches/nginx-1.11.2-balancer_status_code.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
|
||||||
|
index 0f6b3ae..56d44fc 100644
|
||||||
|
--- a/src/http/ngx_http_upstream.c
|
||||||
|
+++ b/src/http/ngx_http_upstream.c
|
||||||
|
@@ -1368,6 +1368,11 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
|
||||||
|
+ ngx_http_upstream_finalize_request(r, u, rc);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
u->state->peer = u->peer.name;
|
||||||
|
|
||||||
|
if (rc == NGX_BUSY) {
|
||||||
|
diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h
|
||||||
|
index b288f28..9b60e12 100644
|
||||||
|
--- a/src/http/ngx_http_upstream.h
|
||||||
|
+++ b/src/http/ngx_http_upstream.h
|
||||||
|
@@ -418,5 +418,6 @@ extern ngx_module_t ngx_http_upstream_module;
|
||||||
|
extern ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[];
|
||||||
|
extern ngx_conf_bitmask_t ngx_http_upstream_ignore_headers_masks[];
|
||||||
|
|
||||||
|
+#define HAVE_BALANCER_STATUS_CODE_PATCH
|
||||||
|
|
||||||
|
#endif /* _NGX_HTTP_UPSTREAM_H_INCLUDED_ */
|
13
patches/nginx-1.11.2-builtin_error_page_footer.patch
Normal file
13
patches/nginx-1.11.2-builtin_error_page_footer.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
|
||||||
|
index 64e5acd..f5374f6 100644
|
||||||
|
--- a/src/http/ngx_http_special_response.c
|
||||||
|
+++ b/src/http/ngx_http_special_response.c
|
||||||
|
@@ -26,7 +26,7 @@ static u_char ngx_http_error_full_tail[] =
|
||||||
|
|
||||||
|
|
||||||
|
static u_char ngx_http_error_tail[] =
|
||||||
|
-"<hr><center>nginx</center>" CRLF
|
||||||
|
+"<hr><center>openresty</center>" CRLF
|
||||||
|
"</body>" CRLF
|
||||||
|
"</html>" CRLF
|
||||||
|
;
|
98
patches/nginx-1.11.2-delayed_posted_events.patch
Normal file
98
patches/nginx-1.11.2-delayed_posted_events.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
|
||||||
|
index 57af8132..4853945f 100644
|
||||||
|
--- a/src/event/ngx_event.c
|
||||||
|
+++ b/src/event/ngx_event.c
|
||||||
|
@@ -196,6 +196,9 @@ ngx_process_events_and_timers(ngx_cycle_t *cycle)
|
||||||
|
ngx_uint_t flags;
|
||||||
|
ngx_msec_t timer, delta;
|
||||||
|
|
||||||
|
+ ngx_queue_t *q;
|
||||||
|
+ ngx_event_t *ev;
|
||||||
|
+
|
||||||
|
if (ngx_timer_resolution) {
|
||||||
|
timer = NGX_TIMER_INFINITE;
|
||||||
|
flags = 0;
|
||||||
|
@@ -215,6 +218,13 @@ ngx_process_events_and_timers(ngx_cycle_t *cycle)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!ngx_queue_empty(&ngx_posted_delayed_events)) {
|
||||||
|
+ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||||
|
+ "posted delayed event queue not empty"
|
||||||
|
+ " making poll timeout 0");
|
||||||
|
+ timer = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (ngx_use_accept_mutex) {
|
||||||
|
if (ngx_accept_disabled > 0) {
|
||||||
|
ngx_accept_disabled--;
|
||||||
|
@@ -257,6 +267,35 @@ ngx_process_events_and_timers(ngx_cycle_t *cycle)
|
||||||
|
}
|
||||||
|
|
||||||
|
ngx_event_process_posted(cycle, &ngx_posted_events);
|
||||||
|
+
|
||||||
|
+ while (!ngx_queue_empty(&ngx_posted_delayed_events)) {
|
||||||
|
+ q = ngx_queue_head(&ngx_posted_delayed_events);
|
||||||
|
+
|
||||||
|
+ ev = ngx_queue_data(q, ngx_event_t, queue);
|
||||||
|
+ if (ev->delayed) {
|
||||||
|
+ /* start of newly inserted nodes */
|
||||||
|
+ for (/* void */;
|
||||||
|
+ q != ngx_queue_sentinel(&ngx_posted_delayed_events);
|
||||||
|
+ q = ngx_queue_next(q))
|
||||||
|
+ {
|
||||||
|
+ ev = ngx_queue_data(q, ngx_event_t, queue);
|
||||||
|
+ ev->delayed = 0;
|
||||||
|
+
|
||||||
|
+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||||
|
+ "skipping delayed posted event %p,"
|
||||||
|
+ " till next iteration", ev);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||||
|
+ "delayed posted event %p", ev);
|
||||||
|
+
|
||||||
|
+ ngx_delete_posted_event(ev);
|
||||||
|
+
|
||||||
|
+ ev->handler(ev);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -600,6 +639,7 @@ ngx_event_process_init(ngx_cycle_t *cycle)
|
||||||
|
|
||||||
|
ngx_queue_init(&ngx_posted_accept_events);
|
||||||
|
ngx_queue_init(&ngx_posted_events);
|
||||||
|
+ ngx_queue_init(&ngx_posted_delayed_events);
|
||||||
|
|
||||||
|
if (ngx_event_timer_init(cycle->log) == NGX_ERROR) {
|
||||||
|
return NGX_ERROR;
|
||||||
|
diff --git a/src/event/ngx_event_posted.c b/src/event/ngx_event_posted.c
|
||||||
|
index d851f3d1..b6cea009 100644
|
||||||
|
--- a/src/event/ngx_event_posted.c
|
||||||
|
+++ b/src/event/ngx_event_posted.c
|
||||||
|
@@ -12,6 +12,7 @@
|
||||||
|
|
||||||
|
ngx_queue_t ngx_posted_accept_events;
|
||||||
|
ngx_queue_t ngx_posted_events;
|
||||||
|
+ngx_queue_t ngx_posted_delayed_events;
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
diff --git a/src/event/ngx_event_posted.h b/src/event/ngx_event_posted.h
|
||||||
|
index 145d30fe..6c388553 100644
|
||||||
|
--- a/src/event/ngx_event_posted.h
|
||||||
|
+++ b/src/event/ngx_event_posted.h
|
||||||
|
@@ -43,6 +43,9 @@ void ngx_event_process_posted(ngx_cycle_t *cycle, ngx_queue_t *posted);
|
||||||
|
|
||||||
|
extern ngx_queue_t ngx_posted_accept_events;
|
||||||
|
extern ngx_queue_t ngx_posted_events;
|
||||||
|
+extern ngx_queue_t ngx_posted_delayed_events;
|
||||||
|
+
|
||||||
|
+#define HAVE_POSTED_DELAYED_EVENTS_PATCH
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _NGX_EVENT_POSTED_H_INCLUDED_ */
|
60
patches/nginx-1.11.2-intercept_error_log.patch
Normal file
60
patches/nginx-1.11.2-intercept_error_log.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h
|
||||||
|
index c51b7ff..4c335b9 100644
|
||||||
|
--- a/src/core/ngx_cycle.h
|
||||||
|
+++ b/src/core/ngx_cycle.h
|
||||||
|
@@ -22,9 +22,14 @@
|
||||||
|
#define NGX_DEBUG_POINTS_ABORT 2
|
||||||
|
|
||||||
|
|
||||||
|
+#define HAVE_INTERCEPT_ERROR_LOG_PATCH
|
||||||
|
+
|
||||||
|
+
|
||||||
|
typedef struct ngx_shm_zone_s ngx_shm_zone_t;
|
||||||
|
|
||||||
|
typedef ngx_int_t (*ngx_shm_zone_init_pt) (ngx_shm_zone_t *zone, void *data);
|
||||||
|
+typedef ngx_int_t (*ngx_log_intercept_pt) (ngx_log_t *log, ngx_uint_t level,
|
||||||
|
+ u_char *buf, size_t len);
|
||||||
|
|
||||||
|
struct ngx_shm_zone_s {
|
||||||
|
void *data;
|
||||||
|
@@ -75,6 +80,10 @@ struct ngx_cycle_s {
|
||||||
|
ngx_str_t prefix;
|
||||||
|
ngx_str_t lock_file;
|
||||||
|
ngx_str_t hostname;
|
||||||
|
+
|
||||||
|
+ ngx_log_intercept_pt intercept_error_log_handler;
|
||||||
|
+ void *intercept_error_log_data;
|
||||||
|
+ unsigned entered_logger; /* :1 */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
|
||||||
|
index 8e9408d..ed9b11b 100644
|
||||||
|
--- a/src/core/ngx_log.c
|
||||||
|
+++ b/src/core/ngx_log.c
|
||||||
|
@@ -112,6 +112,8 @@ ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
|
||||||
|
ngx_uint_t wrote_stderr, debug_connection;
|
||||||
|
u_char errstr[NGX_MAX_ERROR_STR];
|
||||||
|
|
||||||
|
+ ngx_log_intercept_pt log_intercept = NULL;
|
||||||
|
+
|
||||||
|
last = errstr + NGX_MAX_ERROR_STR;
|
||||||
|
|
||||||
|
p = ngx_cpymem(errstr, ngx_cached_err_log_time.data,
|
||||||
|
@@ -153,6 +155,16 @@ ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
|
||||||
|
p = last - NGX_LINEFEED_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (ngx_cycle) {
|
||||||
|
+ log_intercept = ngx_cycle->intercept_error_log_handler;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (log_intercept && !ngx_cycle->entered_logger) {
|
||||||
|
+ ngx_cycle->entered_logger = 1;
|
||||||
|
+ log_intercept(log, level, errstr, p - errstr);
|
||||||
|
+ ngx_cycle->entered_logger = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
ngx_linefeed(p);
|
||||||
|
|
||||||
|
wrote_stderr = 0;
|
211
patches/nginx-1.11.2-privileged_agent_process.patch
Normal file
211
patches/nginx-1.11.2-privileged_agent_process.patch
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
diff --git a/src/core/nginx.c b/src/core/nginx.c
|
||||||
|
index 60f8fe7..4bd244b 100644
|
||||||
|
--- a/src/core/nginx.c
|
||||||
|
+++ b/src/core/nginx.c
|
||||||
|
@@ -981,6 +981,7 @@ ngx_core_module_create_conf(ngx_cycle_t *cycle)
|
||||||
|
|
||||||
|
ccf->daemon = NGX_CONF_UNSET;
|
||||||
|
ccf->master = NGX_CONF_UNSET;
|
||||||
|
+ ccf->privileged_agent = NGX_CONF_UNSET;
|
||||||
|
ccf->timer_resolution = NGX_CONF_UNSET_MSEC;
|
||||||
|
|
||||||
|
ccf->worker_processes = NGX_CONF_UNSET;
|
||||||
|
@@ -1009,6 +1010,7 @@ ngx_core_module_init_conf(ngx_cycle_t *cycle, void *conf)
|
||||||
|
|
||||||
|
ngx_conf_init_value(ccf->daemon, 1);
|
||||||
|
ngx_conf_init_value(ccf->master, 1);
|
||||||
|
+ ngx_conf_init_value(ccf->privileged_agent, 0);
|
||||||
|
ngx_conf_init_msec_value(ccf->timer_resolution, 0);
|
||||||
|
|
||||||
|
ngx_conf_init_value(ccf->worker_processes, 1);
|
||||||
|
diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h
|
||||||
|
index c51b7ff..3261f90 100644
|
||||||
|
--- a/src/core/ngx_cycle.h
|
||||||
|
+++ b/src/core/ngx_cycle.h
|
||||||
|
@@ -22,6 +22,9 @@
|
||||||
|
#define NGX_DEBUG_POINTS_ABORT 2
|
||||||
|
|
||||||
|
|
||||||
|
+#define HAVE_PRIVILEGED_PROCESS_PATCH 1
|
||||||
|
+
|
||||||
|
+
|
||||||
|
typedef struct ngx_shm_zone_s ngx_shm_zone_t;
|
||||||
|
|
||||||
|
typedef ngx_int_t (*ngx_shm_zone_init_pt) (ngx_shm_zone_t *zone, void *data);
|
||||||
|
@@ -81,6 +84,7 @@ struct ngx_cycle_s {
|
||||||
|
typedef struct {
|
||||||
|
ngx_flag_t daemon;
|
||||||
|
ngx_flag_t master;
|
||||||
|
+ ngx_flag_t privileged_agent;
|
||||||
|
|
||||||
|
ngx_msec_t timer_resolution;
|
||||||
|
|
||||||
|
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
|
||||||
|
index 7cee1c5..c4f70d6 100644
|
||||||
|
--- a/src/os/unix/ngx_process_cycle.c
|
||||||
|
+++ b/src/os/unix/ngx_process_cycle.c
|
||||||
|
@@ -15,6 +15,8 @@ static void ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n,
|
||||||
|
ngx_int_t type);
|
||||||
|
static void ngx_start_cache_manager_processes(ngx_cycle_t *cycle,
|
||||||
|
ngx_uint_t respawn);
|
||||||
|
+static void ngx_start_privileged_agent_processes(ngx_cycle_t *cycle,
|
||||||
|
+ ngx_uint_t respawn);
|
||||||
|
static void ngx_pass_open_channel(ngx_cycle_t *cycle, ngx_channel_t *ch);
|
||||||
|
static void ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo);
|
||||||
|
static ngx_uint_t ngx_reap_children(ngx_cycle_t *cycle);
|
||||||
|
@@ -24,6 +26,7 @@ static void ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker);
|
||||||
|
static void ngx_worker_process_exit(ngx_cycle_t *cycle);
|
||||||
|
static void ngx_channel_handler(ngx_event_t *ev);
|
||||||
|
static void ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data);
|
||||||
|
+static void ngx_privileged_agent_process_cycle(ngx_cycle_t *cycle, void *data);
|
||||||
|
static void ngx_cache_manager_process_handler(ngx_event_t *ev);
|
||||||
|
static void ngx_cache_loader_process_handler(ngx_event_t *ev);
|
||||||
|
|
||||||
|
@@ -51,6 +54,8 @@ sig_atomic_t ngx_noaccept;
|
||||||
|
ngx_uint_t ngx_noaccepting;
|
||||||
|
ngx_uint_t ngx_restart;
|
||||||
|
|
||||||
|
+ngx_uint_t ngx_is_privileged_agent;
|
||||||
|
+
|
||||||
|
|
||||||
|
static u_char master_process[] = "master process";
|
||||||
|
|
||||||
|
@@ -130,6 +135,7 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
|
||||||
|
ngx_start_worker_processes(cycle, ccf->worker_processes,
|
||||||
|
NGX_PROCESS_RESPAWN);
|
||||||
|
ngx_start_cache_manager_processes(cycle, 0);
|
||||||
|
+ ngx_start_privileged_agent_processes(cycle, 0);
|
||||||
|
|
||||||
|
ngx_new_binary = 0;
|
||||||
|
delay = 0;
|
||||||
|
@@ -224,6 +230,7 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
|
||||||
|
ngx_start_worker_processes(cycle, ccf->worker_processes,
|
||||||
|
NGX_PROCESS_RESPAWN);
|
||||||
|
ngx_start_cache_manager_processes(cycle, 0);
|
||||||
|
+ ngx_start_privileged_agent_processes(cycle, 0);
|
||||||
|
ngx_noaccepting = 0;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
@@ -243,6 +250,7 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
|
||||||
|
ngx_start_worker_processes(cycle, ccf->worker_processes,
|
||||||
|
NGX_PROCESS_JUST_RESPAWN);
|
||||||
|
ngx_start_cache_manager_processes(cycle, 1);
|
||||||
|
+ ngx_start_privileged_agent_processes(cycle, 1);
|
||||||
|
|
||||||
|
/* allow new processes to start */
|
||||||
|
ngx_msleep(100);
|
||||||
|
@@ -257,6 +265,7 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
|
||||||
|
ngx_start_worker_processes(cycle, ccf->worker_processes,
|
||||||
|
NGX_PROCESS_RESPAWN);
|
||||||
|
ngx_start_cache_manager_processes(cycle, 0);
|
||||||
|
+ ngx_start_privileged_agent_processes(cycle, 0);
|
||||||
|
live = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -424,6 +433,34 @@ ngx_start_cache_manager_processes(ngx_cycle_t *cycle, ngx_uint_t respawn)
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
+ngx_start_privileged_agent_processes(ngx_cycle_t *cycle, ngx_uint_t respawn)
|
||||||
|
+{
|
||||||
|
+ ngx_channel_t ch;
|
||||||
|
+ ngx_core_conf_t *ccf;
|
||||||
|
+
|
||||||
|
+ ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx,
|
||||||
|
+ ngx_core_module);
|
||||||
|
+
|
||||||
|
+ if (!ccf->privileged_agent) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ngx_spawn_process(cycle, ngx_privileged_agent_process_cycle,
|
||||||
|
+ "privileged agent process", "privileged agent process",
|
||||||
|
+ respawn ? NGX_PROCESS_JUST_RESPAWN : NGX_PROCESS_RESPAWN);
|
||||||
|
+
|
||||||
|
+ ngx_memzero(&ch, sizeof(ngx_channel_t));
|
||||||
|
+
|
||||||
|
+ ch.command = NGX_CMD_OPEN_CHANNEL;
|
||||||
|
+ ch.pid = ngx_processes[ngx_process_slot].pid;
|
||||||
|
+ ch.slot = ngx_process_slot;
|
||||||
|
+ ch.fd = ngx_processes[ngx_process_slot].channel[0];
|
||||||
|
+
|
||||||
|
+ ngx_pass_open_channel(cycle, &ch);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
ngx_pass_open_channel(ngx_cycle_t *cycle, ngx_channel_t *ch)
|
||||||
|
{
|
||||||
|
ngx_int_t i;
|
||||||
|
@@ -827,7 +864,10 @@ ngx_worker_process_init(ngx_cycle_t *cycle, ngx_int_t worker)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (geteuid() == 0) {
|
||||||
|
+ /*
|
||||||
|
+ * privileged agent process has the same permission as master process
|
||||||
|
+ */
|
||||||
|
+ if (!ngx_is_privileged_agent && geteuid() == 0) {
|
||||||
|
if (setgid(ccf->group) == -1) {
|
||||||
|
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||||
|
"setgid(%d) failed", ccf->group);
|
||||||
|
@@ -1144,6 +1184,47 @@ ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data)
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
+ngx_privileged_agent_process_cycle(ngx_cycle_t *cycle, void *data)
|
||||||
|
+{
|
||||||
|
+ char *name = data;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Set correct process type since closing listening Unix domain socket
|
||||||
|
+ * in a master process also removes the Unix domain socket file.
|
||||||
|
+ */
|
||||||
|
+ ngx_process = NGX_PROCESS_HELPER;
|
||||||
|
+ ngx_is_privileged_agent = 1;
|
||||||
|
+
|
||||||
|
+ ngx_close_listening_sockets(cycle);
|
||||||
|
+
|
||||||
|
+ /* Set a moderate number of connections for a helper process. */
|
||||||
|
+ cycle->connection_n = 512;
|
||||||
|
+
|
||||||
|
+ ngx_worker_process_init(cycle, -1);
|
||||||
|
+
|
||||||
|
+ ngx_use_accept_mutex = 0;
|
||||||
|
+
|
||||||
|
+ ngx_setproctitle(name);
|
||||||
|
+
|
||||||
|
+ for ( ;; ) {
|
||||||
|
+
|
||||||
|
+ if (ngx_terminate || ngx_quit) {
|
||||||
|
+ ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
|
||||||
|
+ ngx_worker_process_exit(cycle);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (ngx_reopen) {
|
||||||
|
+ ngx_reopen = 0;
|
||||||
|
+ ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs");
|
||||||
|
+ ngx_reopen_files(cycle, -1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ngx_process_events_and_timers(cycle);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
ngx_cache_manager_process_handler(ngx_event_t *ev)
|
||||||
|
{
|
||||||
|
time_t next, n;
|
||||||
|
diff --git a/src/os/unix/ngx_process_cycle.h b/src/os/unix/ngx_process_cycle.h
|
||||||
|
index 69495d5..5149396 100644
|
||||||
|
--- a/src/os/unix/ngx_process_cycle.h
|
||||||
|
+++ b/src/os/unix/ngx_process_cycle.h
|
||||||
|
@@ -45,6 +45,7 @@ extern ngx_pid_t ngx_new_binary;
|
||||||
|
extern ngx_uint_t ngx_inherited;
|
||||||
|
extern ngx_uint_t ngx_daemonized;
|
||||||
|
extern ngx_uint_t ngx_exiting;
|
||||||
|
+extern ngx_uint_t ngx_is_privileged_agent;
|
||||||
|
|
||||||
|
extern sig_atomic_t ngx_reap;
|
||||||
|
extern sig_atomic_t ngx_sigio;
|
@ -1,6 +1,6 @@
|
|||||||
--- nginx-1.11.2/src/http/modules/ngx_http_proxy_module.c 2013-10-08 05:07:14.000000000 -0700
|
--- nginx-1.11.2/src/http/modules/ngx_http_proxy_module.c 2017-07-16 14:02:51.000000000 +0800
|
||||||
+++ nginx-1.11.2-patched/src/http/modules/ngx_http_proxy_module.c 2013-10-27 15:29:41.619378592 -0700
|
+++ nginx-1.11.2-patched/src/http/modules/ngx_http_proxy_module.c 2017-07-16 14:02:51.000000000 +0800
|
||||||
@@ -602,10 +602,10 @@ static ngx_keyval_t ngx_http_proxy_cach
|
@@ -793,13 +793,13 @@ static ngx_keyval_t ngx_http_proxy_cach
|
||||||
static ngx_http_variable_t ngx_http_proxy_vars[] = {
|
static ngx_http_variable_t ngx_http_proxy_vars[] = {
|
||||||
|
|
||||||
{ ngx_string("proxy_host"), NULL, ngx_http_proxy_host_variable, 0,
|
{ ngx_string("proxy_host"), NULL, ngx_http_proxy_host_variable, 0,
|
||||||
@ -12,4 +12,8 @@
|
|||||||
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
|
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
|
||||||
|
|
||||||
{ ngx_string("proxy_add_x_forwarded_for"), NULL,
|
{ ngx_string("proxy_add_x_forwarded_for"), NULL,
|
||||||
ngx_http_proxy_add_x_forwarded_for_variable, 0, NGX_HTTP_VAR_NOHASH, 0 },
|
- ngx_http_proxy_add_x_forwarded_for_variable, 0, NGX_HTTP_VAR_NOHASH, 0 },
|
||||||
|
+ ngx_http_proxy_add_x_forwarded_for_variable, 0, 0, 0 },
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
{ ngx_string("proxy_add_via"), NULL, NULL, 0, NGX_HTTP_VAR_NOHASH, 0 },
|
||||||
|
53
patches/nginx-1.11.2-single_process_graceful_exit.patch
Normal file
53
patches/nginx-1.11.2-single_process_graceful_exit.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
--- nginx-1.11.2/src/os/unix/ngx_process_cycle.c 2016-07-05 08:56:16.000000000 -0700
|
||||||
|
+++ nginx-1.11.2-patched/src/os/unix/ngx_process_cycle.c 2017-05-14 09:59:52.301108274 -0700
|
||||||
|
@@ -304,11 +304,29 @@ ngx_single_process_cycle(ngx_cycle_t *cy
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( ;; ) {
|
||||||
|
+ if (ngx_exiting) {
|
||||||
|
+ ngx_event_cancel_timers();
|
||||||
|
+
|
||||||
|
+ if (ngx_event_timer_rbtree.root == ngx_event_timer_rbtree.sentinel)
|
||||||
|
+ {
|
||||||
|
+ ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
|
||||||
|
+
|
||||||
|
+ for (i = 0; cycle->modules[i]; i++) {
|
||||||
|
+ if (cycle->modules[i]->exit_process) {
|
||||||
|
+ cycle->modules[i]->exit_process(cycle);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ngx_master_process_exit(cycle);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle");
|
||||||
|
|
||||||
|
ngx_process_events_and_timers(cycle);
|
||||||
|
|
||||||
|
- if (ngx_terminate || ngx_quit) {
|
||||||
|
+ if (ngx_terminate) {
|
||||||
|
+ ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
|
||||||
|
|
||||||
|
for (i = 0; cycle->modules[i]; i++) {
|
||||||
|
if (cycle->modules[i]->exit_process) {
|
||||||
|
@@ -319,6 +337,19 @@ ngx_single_process_cycle(ngx_cycle_t *cy
|
||||||
|
ngx_master_process_exit(cycle);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (ngx_quit) {
|
||||||
|
+ ngx_quit = 0;
|
||||||
|
+ ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0,
|
||||||
|
+ "gracefully shutting down");
|
||||||
|
+ ngx_setproctitle("process is shutting down");
|
||||||
|
+
|
||||||
|
+ if (!ngx_exiting) {
|
||||||
|
+ ngx_exiting = 1;
|
||||||
|
+ ngx_close_listening_sockets(cycle);
|
||||||
|
+ ngx_close_idle_connections(cycle);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (ngx_reconfigure) {
|
||||||
|
ngx_reconfigure = 0;
|
||||||
|
ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reconfiguring");
|
1793
t/sanity.t
1793
t/sanity.t
File diff suppressed because it is too large
Load Diff
48
util/configure
vendored
48
util/configure
vendored
@ -129,6 +129,7 @@ my @ngx_rpaths;
|
|||||||
my $cc;
|
my $cc;
|
||||||
my $cores;
|
my $cores;
|
||||||
my $luajit_xcflags = '';
|
my $luajit_xcflags = '';
|
||||||
|
my $user_luajit_xcflags;
|
||||||
my $no_luajit_lua52;
|
my $no_luajit_lua52;
|
||||||
|
|
||||||
my (@ngx_opts, @ngx_cc_opts, @ngx_ld_opts);
|
my (@ngx_opts, @ngx_cc_opts, @ngx_ld_opts);
|
||||||
@ -256,7 +257,7 @@ for my $opt (@ARGV) {
|
|||||||
$resty_opts{luajit_path} = $1;
|
$resty_opts{luajit_path} = $1;
|
||||||
|
|
||||||
} elsif ($opt =~ /^--with-luajit-xcflags=(.*)/) {
|
} elsif ($opt =~ /^--with-luajit-xcflags=(.*)/) {
|
||||||
$luajit_xcflags .= " $1";
|
$user_luajit_xcflags .= " $1";
|
||||||
|
|
||||||
} elsif ($opt =~ /^--without-luajit-lua52/) {
|
} elsif ($opt =~ /^--without-luajit-lua52/) {
|
||||||
$no_luajit_lua52 = 1;
|
$no_luajit_lua52 = 1;
|
||||||
@ -474,7 +475,6 @@ _END_
|
|||||||
if (!$opts->{lua}
|
if (!$opts->{lua}
|
||||||
&& !$opts->{lua_path}
|
&& !$opts->{lua_path}
|
||||||
&& !$opts->{no_http_lua}
|
&& !$opts->{no_http_lua}
|
||||||
&& !$opts->{no_http_lua_upstream}
|
|
||||||
&& !$opts->{luajit_path})
|
&& !$opts->{luajit_path})
|
||||||
{
|
{
|
||||||
$opts->{luajit} = 1;
|
$opts->{luajit} = 1;
|
||||||
@ -531,6 +531,9 @@ _END_
|
|||||||
|
|
||||||
cd 'build';
|
cd 'build';
|
||||||
|
|
||||||
|
push @make_install_cmds, "mkdir -p \$(DESTDIR)$prefix/",
|
||||||
|
"-cp $root_dir/COPYRIGHT \$(DESTDIR)$prefix/";
|
||||||
|
|
||||||
# build 3rd-party C libraries if required
|
# build 3rd-party C libraries if required
|
||||||
|
|
||||||
if ($opts->{no_pool}) {
|
if ($opts->{no_pool}) {
|
||||||
@ -621,39 +624,68 @@ _END_
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$no_luajit_lua52
|
if (!$no_luajit_lua52
|
||||||
&& (!$luajit_xcflags || $luajit_xcflags !~ /-DLUAJIT_ENABLE_LUA52COMPAT\b/))
|
&& (!$user_luajit_xcflags
|
||||||
|
|| $user_luajit_xcflags !~ /-DLUAJIT_ENABLE_LUA52COMPAT\b/))
|
||||||
{
|
{
|
||||||
$luajit_xcflags .= " -DLUAJIT_ENABLE_LUA52COMPAT";
|
$luajit_xcflags .= " -DLUAJIT_ENABLE_LUA52COMPAT";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$user_luajit_xcflags
|
||||||
|
|| $user_luajit_xcflags !~ /-msse4\.2\b/)
|
||||||
{
|
{
|
||||||
# check -msse4.2
|
# check -msse4.2
|
||||||
my ($out, $cfile) = tempfile("resty-config-XXXXXX",
|
my ($out, $cfile) = tempfile("resty-config-XXXXXX",
|
||||||
SUFFIX => '.c', TMPDIR => 1,
|
SUFFIX => '.c', TMPDIR => 1,
|
||||||
UNLINK => 1);
|
UNLINK => 1);
|
||||||
|
|
||||||
print $out "int main(void) { return 0; }";
|
print $out "
|
||||||
|
int main(void) {
|
||||||
|
#ifndef __SSE4_2__
|
||||||
|
# error SSE 4.2 not found
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
";
|
||||||
close $out;
|
close $out;
|
||||||
|
|
||||||
my $ofile = tmpnam();
|
my $ofile = tmpnam();
|
||||||
my $comp = ($cc || 'cc');
|
my $comp = ($cc || 'cc');
|
||||||
|
my $found;
|
||||||
|
|
||||||
if (system("$comp -o $ofile -msse4.2 -c $cfile") == 0 && -s $ofile) {
|
if (system("$comp -o $ofile -msse4.2 -c $cfile") == 0 && -s $ofile) {
|
||||||
print "INFO: found -msse4.2 in $comp.\n";
|
|
||||||
$luajit_xcflags .= " -msse4.2";
|
|
||||||
unlink $ofile;
|
unlink $ofile;
|
||||||
|
|
||||||
} else {
|
if (system("$comp -o $ofile -march=native -c $cfile") == 0 && -s $ofile) {
|
||||||
|
print "INFO: found -msse4.2 in $comp.\n";
|
||||||
|
$found = 1;
|
||||||
|
$luajit_xcflags .= " -msse4.2";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-f $ofile) {
|
||||||
|
unlink $ofile;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$found) {
|
||||||
print "WARNING: -msse4.2 not supported in $comp.\n";
|
print "WARNING: -msse4.2 not supported in $comp.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($opts->{debug}) {
|
if ($opts->{debug}) {
|
||||||
$luajit_xcflags .= " -DLUA_USE_APICHECK -DLUA_USE_ASSERT";
|
$luajit_xcflags .= " -DLUA_USE_APICHECK -DLUA_USE_ASSERT";
|
||||||
|
|
||||||
|
if ($user_luajit_xcflags) {
|
||||||
|
$luajit_xcflags .= $user_luajit_xcflags;
|
||||||
|
}
|
||||||
$luajit_xcflags =~ s/^ +//;
|
$luajit_xcflags =~ s/^ +//;
|
||||||
|
|
||||||
$extra_opts .= qq{ Q= XCFLAGS='$luajit_xcflags'};
|
$extra_opts .= qq{ Q= XCFLAGS='$luajit_xcflags'};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if ($user_luajit_xcflags) {
|
||||||
|
$luajit_xcflags .= $user_luajit_xcflags;
|
||||||
|
}
|
||||||
|
|
||||||
if ($luajit_xcflags) {
|
if ($luajit_xcflags) {
|
||||||
$luajit_xcflags =~ s/^ +//;
|
$luajit_xcflags =~ s/^ +//;
|
||||||
$extra_opts .= qq{ XCFLAGS='$luajit_xcflags'};
|
$extra_opts .= qq{ XCFLAGS='$luajit_xcflags'};
|
||||||
@ -813,7 +845,7 @@ _END_
|
|||||||
print $in <<"_EOC_";
|
print $in <<"_EOC_";
|
||||||
|
|
||||||
ngx_lua_dquote='"'
|
ngx_lua_dquote='"'
|
||||||
CFLAGS="\$CFLAGS -DLUA_DEFAULT_PATH='\${ngx_lua_dquote}$site_lualib_prefix/?.lua;$site_lualib_prefix/?/init.lua;$lualib_prefix/?.lua;$lualib_prefix/?/init.lua\$ngx_lua_dquote'"
|
CFLAGS="\$CFLAGS -DLUA_DEFAULT_PATH='\${ngx_lua_dquote}$site_lualib_prefix/?.ljbc;$site_lualib_prefix/?/init.ljbc;$lualib_prefix/?.ljbc;$lualib_prefix/?/init.ljbc;$site_lualib_prefix/?.lua;$site_lualib_prefix/?/init.lua;$lualib_prefix/?.lua;$lualib_prefix/?/init.lua\$ngx_lua_dquote'"
|
||||||
CFLAGS="\$CFLAGS -DLUA_DEFAULT_CPATH='\${ngx_lua_dquote}$site_lualib_prefix/?.so;$lualib_prefix/?.so\$ngx_lua_dquote'"
|
CFLAGS="\$CFLAGS -DLUA_DEFAULT_CPATH='\${ngx_lua_dquote}$site_lualib_prefix/?.so;$lualib_prefix/?.so\$ngx_lua_dquote'"
|
||||||
_EOC_
|
_EOC_
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ sh "sudo $prefix/nginx/sbin/nginx";
|
|||||||
sh "curl -si localhost/lua|grep $lua";
|
sh "curl -si localhost/lua|grep $lua";
|
||||||
sh "curl -si localhost/lua|grep $ver";
|
sh "curl -si localhost/lua|grep $ver";
|
||||||
sh "curl -si localhost/cjson|grep 'json.safe: '";
|
sh "curl -si localhost/cjson|grep 'json.safe: '";
|
||||||
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
|
#sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
|
||||||
sh "sudo $prefix/nginx/sbin/nginx -sstop";
|
sh "sudo $prefix/nginx/sbin/nginx -sstop";
|
||||||
|
|
||||||
warn "\n=== --with-stream ===\n";
|
warn "\n=== --with-stream ===\n";
|
||||||
@ -137,7 +137,7 @@ sh "sudo $prefix/nginx/sbin/nginx";
|
|||||||
sh "curl -si localhost/lua|grep $lua";
|
sh "curl -si localhost/lua|grep $lua";
|
||||||
sh "curl -si localhost/lua|grep $ver";
|
sh "curl -si localhost/lua|grep $ver";
|
||||||
sh "curl -si localhost/cjson|grep 'json.safe: '";
|
sh "curl -si localhost/cjson|grep 'json.safe: '";
|
||||||
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
|
#sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
|
||||||
sh "sudo $prefix/nginx/sbin/nginx -sstop";
|
sh "sudo $prefix/nginx/sbin/nginx -sstop";
|
||||||
|
|
||||||
$cfg_opts .= " --with-http_iconv_module";
|
$cfg_opts .= " --with-http_iconv_module";
|
||||||
@ -263,7 +263,7 @@ sub cleanup () {
|
|||||||
__DATA__
|
__DATA__
|
||||||
|
|
||||||
user nobody;
|
user nobody;
|
||||||
worker_processes 1;
|
worker_processes 2;
|
||||||
error_log logs/error.log;
|
error_log logs/error.log;
|
||||||
pid logs/nginx.pid;
|
pid logs/nginx.pid;
|
||||||
|
|
||||||
@ -276,11 +276,11 @@ http {
|
|||||||
include mime.types;
|
include mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
init_by_lua '
|
init_by_lua_block {
|
||||||
if jit then
|
if jit then
|
||||||
require "resty.core"
|
require "resty.core"
|
||||||
end
|
end
|
||||||
';
|
}
|
||||||
|
|
||||||
upstream backend {
|
upstream backend {
|
||||||
server 0.0.0.1;
|
server 0.0.0.1;
|
||||||
@ -294,21 +294,21 @@ http {
|
|||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location = /lua {
|
location = /lua {
|
||||||
content_by_lua '
|
content_by_lua_block {
|
||||||
local upstream = require "ngx.upstream"
|
local upstream = require "ngx.upstream"
|
||||||
if jit then
|
if jit then
|
||||||
ngx.say(jit.version)
|
ngx.say(jit.version)
|
||||||
else
|
else
|
||||||
ngx.say(_VERSION)
|
ngx.say(_VERSION)
|
||||||
end
|
end
|
||||||
';
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /cjson {
|
location = /cjson {
|
||||||
content_by_lua '
|
content_by_lua_block {
|
||||||
local json = require "cjson.safe"
|
local json = require "cjson.safe"
|
||||||
ngx.say("cjson.safe: ", json.encode{foo = 123})
|
ngx.say("cjson.safe: ", json.encode{foo = 123})
|
||||||
';
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,48 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
answer=`$root/util/ver-ge "$main_ver" 1.11.2`
|
||||||
|
if [ "$answer" = "Y" ]; then
|
||||||
|
echo "$info_txt applying the balancer_status_code patch"
|
||||||
|
patch -p1 < $root/patches/nginx-$main_ver-balancer_status_code.patch || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
answer=`$root/util/ver-ge "$main_ver" 1.11.2`
|
||||||
|
if [ "$answer" = "Y" ]; then
|
||||||
|
echo "$info_txt applying the builtin_error_page_footer patch"
|
||||||
|
patch -p1 < $root/patches/nginx-$main_ver-builtin_error_page_footer.patch || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
answer=`$root/util/ver-ge "$main_ver" 1.11.2`
|
||||||
|
if [ "$answer" = "Y" ]; then
|
||||||
|
echo "$info_txt applying the delayed-posted-events patch"
|
||||||
|
patch -p1 < $root/patches/nginx-$main_ver-delayed_posted_events.patch || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
answer=`$root/util/ver-ge "$main_ver" 1.11.2`
|
||||||
|
if [ "$answer" = "Y" ]; then
|
||||||
|
echo "$info_txt applying the privileged-agent-process patch"
|
||||||
|
patch -p1 < $root/patches/nginx-$main_ver-privileged_agent_process.patch || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
answer=`$root/util/ver-ge "$main_ver" 1.11.2`
|
||||||
|
if [ "$answer" = "Y" ]; then
|
||||||
|
echo "$info_txt applying the single-process-graceful-exit patch"
|
||||||
|
patch -p1 < $root/patches/nginx-$main_ver-single_process_graceful_exit.patch || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
answer=`$root/util/ver-ge "$main_ver" 1.11.2`
|
||||||
|
if [ "$answer" = "Y" ]; then
|
||||||
|
echo "$info_txt applying the intercept-error-log patch"
|
||||||
|
patch -p1 < $root/patches/nginx-$main_ver-intercept_error_log.patch || exit 1
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$info_txt applying the upstream-pipelining patch for nginx"
|
echo "$info_txt applying the upstream-pipelining patch for nginx"
|
||||||
patch -p1 < $root/patches/nginx-$main_ver-upstream_pipelining.patch || exit 1
|
patch -p1 < $root/patches/nginx-$main_ver-upstream_pipelining.patch || exit 1
|
||||||
echo
|
echo
|
||||||
@ -358,7 +400,7 @@ rm -rf no-pool-nginx-$ver
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.60
|
ver=0.61
|
||||||
$root/util/get-tarball "https://github.com/openresty/echo-nginx-module/tarball/v$ver" -O echo-nginx-module-$ver.tar.gz || exit 1
|
$root/util/get-tarball "https://github.com/openresty/echo-nginx-module/tarball/v$ver" -O echo-nginx-module-$ver.tar.gz || exit 1
|
||||||
tar -xzf echo-nginx-module-$ver.tar.gz || exit 1
|
tar -xzf echo-nginx-module-$ver.tar.gz || exit 1
|
||||||
mv openresty-echo-nginx-module-* echo-nginx-module-$ver || exit 1
|
mv openresty-echo-nginx-module-* echo-nginx-module-$ver || exit 1
|
||||||
@ -414,14 +456,14 @@ mv openresty-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.10.8
|
ver=0.10.10
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1
|
||||||
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
|
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-nginx-module-* ngx_lua-$ver || exit 1
|
mv openresty-lua-nginx-module-* ngx_lua-$ver || exit 1
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.06
|
ver=0.07
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-upstream-nginx-module/tarball/v$ver" -O lua-upstream-nginx-module-$ver.tar.gz || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-upstream-nginx-module/tarball/v$ver" -O lua-upstream-nginx-module-$ver.tar.gz || exit 1
|
||||||
tar -xzf lua-upstream-nginx-module-$ver.tar.gz || exit 1
|
tar -xzf lua-upstream-nginx-module-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-upstream-nginx-module-* ngx_lua_upstream-$ver || exit 1
|
mv openresty-lua-upstream-nginx-module-* ngx_lua_upstream-$ver || exit 1
|
||||||
@ -495,10 +537,10 @@ cd ..
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=1.0rc7
|
ver=1.0
|
||||||
$root/util/get-tarball "https://github.com/FRiCKLE/ngx_postgres/tarball/$ver" -O ngx_postgres-$ver.tar.gz || exit 1
|
$root/util/get-tarball "https://github.com/openresty/ngx_postgres/tarball/$ver" -O ngx_postgres-$ver.tar.gz || exit 1
|
||||||
tar -xzf ngx_postgres-$ver.tar.gz || exit 1
|
tar -xzf ngx_postgres-$ver.tar.gz || exit 1
|
||||||
mv FRiCKLE-ngx_postgres-* ngx_postgres-$ver || exit 1
|
mv openresty-ngx_postgres-* ngx_postgres-$ver || exit 1
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
@ -516,7 +558,7 @@ mv openresty-redis2-nginx-module-* redis2-nginx-module-$ver || exit 1
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.17
|
ver=0.19
|
||||||
$root/util/get-tarball "https://github.com/openresty/resty-cli/tarball/v$ver" -O resty-cli-$ver.tar.gz || exit 1
|
$root/util/get-tarball "https://github.com/openresty/resty-cli/tarball/v$ver" -O resty-cli-$ver.tar.gz || exit 1
|
||||||
tar -xzf resty-cli-$ver.tar.gz || exit 1
|
tar -xzf resty-cli-$ver.tar.gz || exit 1
|
||||||
mv openresty-resty-cli-* resty-cli-$ver || exit 1
|
mv openresty-resty-cli-* resty-cli-$ver || exit 1
|
||||||
@ -557,7 +599,7 @@ mv openresty-opm-* opm-$ver || exit 1
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=2.1-20170405
|
ver=2.1-20170808
|
||||||
$root/util/get-tarball "https://github.com/openresty/luajit2/archive/v$ver.tar.gz" -O "LuaJIT-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/luajit2/archive/v$ver.tar.gz" -O "LuaJIT-$ver.tar.gz" || exit 1
|
||||||
tar -xzf LuaJIT-$ver.tar.gz || exit 1
|
tar -xzf LuaJIT-$ver.tar.gz || exit 1
|
||||||
mv luajit2-* LuaJIT-$ver || exit 1
|
mv luajit2-* LuaJIT-$ver || exit 1
|
||||||
@ -613,7 +655,7 @@ cd ..
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.18
|
ver=0.19
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-dns/tarball/v$ver" -O "lua-resty-dns-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-dns/tarball/v$ver" -O "lua-resty-dns-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-dns-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-dns-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-dns-* lua-resty-dns-$ver || exit 1
|
mv openresty-lua-resty-dns-* lua-resty-dns-$ver || exit 1
|
||||||
@ -649,7 +691,7 @@ mv openresty-lua-resty-redis-* lua-resty-redis-$ver || exit 1
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.19
|
ver=0.20
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-mysql/tarball/v$ver" -O "lua-resty-mysql-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-mysql/tarball/v$ver" -O "lua-resty-mysql-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-mysql-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-mysql-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-mysql-* lua-resty-mysql-$ver || exit 1
|
mv openresty-lua-resty-mysql-* lua-resty-mysql-$ver || exit 1
|
||||||
@ -661,7 +703,7 @@ cd ..
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.03
|
ver=0.04
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-limit-traffic/tarball/v$ver" -O "lua-resty-limit-traffic-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-limit-traffic/tarball/v$ver" -O "lua-resty-limit-traffic-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-limit-traffic-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-limit-traffic-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-limit-traffic-* lua-resty-limit-traffic-$ver || exit 1
|
mv openresty-lua-resty-limit-traffic-* lua-resty-limit-traffic-$ver || exit 1
|
||||||
@ -685,7 +727,7 @@ cd ..
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.09
|
ver=0.10
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-string/tarball/v$ver" -O "lua-resty-string-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-string/tarball/v$ver" -O "lua-resty-string-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-string-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-string-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-string-* lua-resty-string-$ver || exit 1
|
mv openresty-lua-resty-string-* lua-resty-string-$ver || exit 1
|
||||||
@ -709,7 +751,7 @@ cd ..
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.06
|
ver=0.07
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-lock/tarball/v$ver" -O "lua-resty-lock-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-lock/tarball/v$ver" -O "lua-resty-lock-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-lock-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-lock-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-lock-* lua-resty-lock-$ver || exit 1
|
mv openresty-lua-resty-lock-* lua-resty-lock-$ver || exit 1
|
||||||
@ -721,7 +763,7 @@ cd ..
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.06
|
ver=0.07
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-lrucache/tarball/v$ver" -O "lua-resty-lrucache-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-lrucache/tarball/v$ver" -O "lua-resty-lrucache-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-lrucache-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-lrucache-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-lrucache-* lua-resty-lrucache-$ver || exit 1
|
mv openresty-lua-resty-lrucache-* lua-resty-lrucache-$ver || exit 1
|
||||||
@ -733,7 +775,7 @@ cd ..
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.1.11
|
ver=0.1.12
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-core/tarball/v$ver" -O "lua-resty-core-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-core/tarball/v$ver" -O "lua-resty-core-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-core-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-core-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-core-* lua-resty-core-$ver || exit 1
|
mv openresty-lua-resty-core-* lua-resty-core-$ver || exit 1
|
||||||
@ -745,7 +787,7 @@ mv openresty-lua-resty-core-* lua-resty-core-$ver || exit 1
|
|||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
ver=0.04
|
ver=0.05
|
||||||
$root/util/get-tarball "https://github.com/openresty/lua-resty-upstream-healthcheck/tarball/v$ver" -O "lua-resty-upstream-healthcheck-$ver.tar.gz" || exit 1
|
$root/util/get-tarball "https://github.com/openresty/lua-resty-upstream-healthcheck/tarball/v$ver" -O "lua-resty-upstream-healthcheck-$ver.tar.gz" || exit 1
|
||||||
tar -xzf lua-resty-upstream-healthcheck-$ver.tar.gz || exit 1
|
tar -xzf lua-resty-upstream-healthcheck-$ver.tar.gz || exit 1
|
||||||
mv openresty-lua-resty-upstream-healthcheck-* lua-resty-upstream-healthcheck-$ver || exit 1
|
mv openresty-lua-resty-upstream-healthcheck-* lua-resty-upstream-healthcheck-$ver || exit 1
|
||||||
|
Reference in New Issue
Block a user