-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
mirror-tarballs
executable file
·250 lines (173 loc) · 9.04 KB
/
mirror-tarballs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
#!/bin/bash
#root=$(readlink -f -- "$(dirname -- "$0")/..")
root=`perl -MCwd -e'print Cwd::abs_path(shift)' $(dirname -- "$0")/..`
. util/ver
name=ngx_openresty-$version
work=$root/work
if [ -z $debug ]; then
rm -rf $name || exit 1
mkdir -p $name/bundle || exit 1
fi
cd $name/bundle || exit 1
if [ ! -d $work ]; then
mkdir $work || exit 1
fi
ver="$main_ver"
$root/util/get-tarball "http://nginx.org/download/nginx-$ver.tar.gz" -O nginx-$ver.tar.gz || exit 1
tar -xzf nginx-$ver.tar.gz || exit 1
cd nginx-$ver || exit 1
# patch the patch
cp $root/patches/nginx-$main_ver-server_header.patch server_header.patch || exit 1
sed -i $"s/NGINX_VERSION \".unknown\"/NGINX_VERSION \".$minor_ver\"/" \
server_header.patch || exit 1
patch -p2 < server_header.patch || exit 1
#patch -p1 < $root/patches/nginx-$main_ver-redirect_memcpy_overlap.patch || exit 1
patch -p1 < $root/patches/nginx-$main_ver-no_error_pages.patch || exit 1
patch -p1 < $root/patches/nginx-$main_ver-no_Werror.patch || exit 1
#patch -p1 < $root/patches/nginx-$main_ver-request_body_preread_fix.patch || exit 1
#patch -p1 < $root/patches/nginx-$main_ver-request_body_in_single_buf.patch || exit 1
patch -p1 -l < $root/patches/nginx-$main_ver-subrequest_loop.patch || exit 1
patch -p1 -l < $root/patches/nginx-$main_ver-gzip_empty_flush_buf.patch || exit 1
patch -p1 < $root/patches/nginx-$main_ver-variable_header_ignore_no_hash.patch || exit 1
patch -p1 < $root/patches/nginx-$main_ver-named_location_clear_mods_ctx.patch || exit 1
rm -f *.patch || exit 1
cd .. || exit 1
cp $root/patches/nginx-$main_ver-no_pool.patch ./nginx-no_pool.patch || exit 1
sed -i $"s/NGINX_VERSION \".unknown/NGINX_VERSION \".$minor_ver/" \
./nginx-no_pool.patch || exit 1
rm -rf no-pool-nginx-$ver
ver=0.37rc6
$root/util/get-tarball "http://github.com/agentzh/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
mv agentzh-echo-nginx-module-* echo-nginx-module-$ver || exit 1
ver=0.03rc3
$root/util/get-tarball "http://github.com/agentzh/xss-nginx-module/tarball/v$ver" -O xss-nginx-module-$ver.tar.gz || exit 1
tar -xzf xss-nginx-module-$ver.tar.gz || exit 1
mv agentzh-xss-nginx-module-* xss-nginx-module-$ver || exit 1
ver=0.2.17
$root/util/get-tarball "http://github.com/simpl/ngx_devel_kit/tarball/v$ver" -O ngx_devel_kit-$ver.tar.gz
tar -xzf ngx_devel_kit-$ver.tar.gz || exit 1
mv simpl-ngx_devel_kit-* ngx_devel_kit-$ver || exit 1
ver=0.22rc3
$root/util/get-tarball "http://github.com/agentzh/set-misc-nginx-module/tarball/v$ver" -O set-misc-nginx-module-$ver.tar.gz || exit 1
tar -xzf set-misc-nginx-module-$ver.tar.gz || exit 1
mv agentzh-set-misc-nginx-module-* set-misc-nginx-module-$ver || exit 1
ver=0.12rc6
$root/util/get-tarball "http://github.com/agentzh/rds-json-nginx-module/tarball/v$ver" -O rds-json-nginx-module-$ver.tar.gz || exit 1
tar -xzf rds-json-nginx-module-$ver.tar.gz || exit 1
mv agentzh-rds-json-nginx-module-* rds-json-nginx-module-$ver || exit 1
ver=0.04
$root/util/get-tarball "http://github.com/agentzh/rds-csv-nginx-module/tarball/v$ver" -O rds-csv-nginx-module-$ver.tar.gz || exit 1
tar -xzf rds-csv-nginx-module-$ver.tar.gz || exit 1
mv agentzh-rds-csv-nginx-module-* rds-csv-nginx-module-$ver || exit 1
ver=0.16rc3
$root/util/get-tarball "http://github.com/agentzh/headers-more-nginx-module/tarball/v$ver" -O headers-more-nginx-module-$ver.tar.gz || exit 1
tar -xzf headers-more-nginx-module-$ver.tar.gz || exit 1
mv agentzh-headers-more-nginx-module-* headers-more-nginx-module-$ver || exit 1
#################################
ver=0.1.2rc2
$root/util/get-tarball "http://github.com/chaoslawful/drizzle-nginx-module/tarball/v$ver" -O drizzle-nginx-module-$ver.tar.gz || exit 1
tar -xzf drizzle-nginx-module-$ver.tar.gz || exit 1
mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
#################################
ver=0.3.1rc11
$root/util/get-tarball "http://github.com/chaoslawful/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
mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1
#################################
ver=0.03rc1
$root/util/get-tarball "http://github.com/agentzh/array-var-nginx-module/tarball/v$ver" -O array-var-nginx-module-$ver.tar.gz || exit 1
tar -xzf array-var-nginx-module-$ver.tar.gz || exit 1
mv agentzh-array-var-nginx-module-* array-var-nginx-module-$ver || exit 1
#################################
ver=0.13rc1
$root/util/get-tarball "http://github.com/agentzh/memc-nginx-module/tarball/v$ver" -O memc-nginx-module-$ver.tar.gz || exit 1
tar -xzf memc-nginx-module-$ver.tar.gz || exit 1
mv agentzh-memc-nginx-module-* memc-nginx-module-$ver || exit 1
#################################
ver=0.13rc1
$root/util/get-tarball "http://github.com/agentzh/srcache-nginx-module/tarball/v$ver" -O srcache-nginx-module-$ver.tar.gz || exit 1
tar -xzf srcache-nginx-module-$ver.tar.gz || exit 1
mv agentzh-srcache-nginx-module-* srcache-nginx-module-$ver || exit 1
#################################
ver=0.07rc5
$root/util/get-tarball "http://github.com/calio/form-input-nginx-module/tarball/v$ver" -O form-input-nginx-module-$ver.tar.gz || exit 1
tar -xzf form-input-nginx-module-$ver.tar.gz || exit 1
mv calio-form-input-nginx-module-* form-input-nginx-module-$ver || exit 1
#################################
ver=0.10rc5
$root/util/get-tarball "http://github.com/calio/iconv-nginx-module/tarball/v$ver" -O iconv-nginx-module-$ver.tar.gz || exit 1
tar -xzf iconv-nginx-module-$ver.tar.gz || exit 1
mv calio-iconv-nginx-module-* iconv-nginx-module-$ver || exit 1
#################################
ver=0.01
$root/util/get-tarball "http://github.com/agentzh/encrypted-session-nginx-module/tarball/v$ver" -O encrypted-session-nginx-module-$ver.tar.gz || exit 1
tar -xzf encrypted-session-nginx-module-$ver.tar.gz || exit 1
mv agentzh-encrypted-session-nginx-module-* encrypted-session-nginx-module-$ver || exit 1
#################################
ver=0.3
$root/util/get-tarball "http://mdounin.ru/files/ngx_http_upstream_keepalive-$ver.tar.gz" -O upstream_keepalive-$ver.tar.gz || exit 1
tar -xzf upstream_keepalive-$ver.tar.gz || exit 1
mv ngx_http_upstream_keepalive-* upstream-keepalive-nginx-module-$ver || exit 1
#################################
ver=0.2
$root/util/get-tarball "http://mdounin.ru/files/ngx_http_auth_request_module-$ver.tar.gz" -O auth_request-$ver.tar.gz || exit 1
tar -xzf auth_request-$ver.tar.gz || exit 1
mv ngx_http_auth_request_module-* auth-request-nginx-module-$ver || exit 1
#################################
ver=0.9rc1
$root/util/get-tarball "https://github.com/FRiCKLE/ngx_postgres/tarball/$ver" -O 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
#################################
ver=0.08rc1
$root/util/get-tarball "http://github.com/agentzh/redis2-nginx-module/tarball/v$ver" -O redis2-nginx-module-$ver.tar.gz || exit 1
tar -xzf redis2-nginx-module-$ver.tar.gz || exit 1
mv agentzh-redis2-nginx-module-* redis2-nginx-module-$ver || exit 1
#################################
ver=5.1.4
$root/util/get-tarball "http://www.lua.org/ftp/lua-$ver.tar.gz" -O "lua-$ver.tar.gz" || exit 1
tar -xzf lua-$ver.tar.gz || exit 1
$root/util/get-tarball "http://www.lua.org/ftp/patch-lua-$ver-3" -O "patch-lua-$ver-3" || exit 1
cd lua-$ver/src || exit 1
patch -p0 < ../../patch-lua-$ver-3 || exit 1
cd ../.. || exit 1
rm "patch-lua-$ver-3" || exit 1
cp $root/patches/lua-$ver-makefile_install_fix.patch lua-makefile-fix.patch || exit 1
patch -p0 < lua-makefile-fix.patch || exit 1
rm lua-makefile-fix.patch || exit 1
#################################
ver=2.0.0-beta8
$root/util/get-tarball "http://luajit.org/download/LuaJIT-$ver.tar.gz" -O "LuaJIT-$ver.tar.gz" || exit 1
tar -xzf LuaJIT-$ver.tar.gz || exit 1
cd LuaJIT-$ver || exit 1;
$root/util/get-tarball http://luajit.org/download/beta8_hotfix1.patch -O beta8_hotfix1.patch
patch -p1 < beta8_hotfix1.patch || exit 1
rm beta8_hotfix1.patch || exit 1
cp $root/misc/unwind-generic.h ./unwind.h || exit 1
cd ..
#################################
ver=1.0.3
$root/util/get-tarball "http://www.kyne.com.au/~mark/software/lua-cjson-$ver.tar.gz" -O "lua-cjson-$ver.tar.gz" || exit 1
tar -xzf lua-cjson-$ver.tar.gz || exit 1
cd lua-cjson-$ver || exit 1
#patch -p1 < $root/patches/lua_cjson-$ver-array_detection_fix.patch || exit 1
cd ..
#################################
ver=0.09rc5
$root/util/get-tarball "http://github.com/agentzh/lua-redis-parser/tarball/v$ver" -O "lua-redis-parser-$ver.tar.gz" || exit 1
tar -xzf lua-redis-parser-$ver.tar.gz || exit 1
mv agentzh-lua-redis-parser-* lua-redis-parser-$ver || exit 1
#################################
ver=0.03
$root/util/get-tarball "http://github.com/agentzh/lua-rds-parser/tarball/v$ver" -O "lua-rds-parser-$ver.tar.gz" || exit 1
tar -xzf lua-rds-parser-$ver.tar.gz || exit 1
mv agentzh-lua-rds-parser-* lua-rds-parser-$ver || exit 1
#################################
rm *.tar.gz
cd ..
cp $root/util/configure ./
cp $root/README ./
cp $root/util/install bundle/
cd $root
tar czf $name.tar.gz $name