2012-08-14 00:38:49 +02:00
|
|
|
#!/usr/bin/env bash
|
2011-02-16 09:25:19 +01:00
|
|
|
|
2011-06-10 15:31:20 +02:00
|
|
|
#root=$(readlink -f -- "$(dirname -- "$0")/..")
|
|
|
|
root=`perl -MCwd -e'print Cwd::abs_path(shift)' $(dirname -- "$0")/..`
|
2011-02-16 09:25:19 +01:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
info_txt=`perl -e 'print "\033[33m[INFO]\033[0m"'`
|
|
|
|
|
|
|
|
echo -n "ngx_openresty "
|
2012-08-14 00:38:49 +02:00
|
|
|
. ./util/ver
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2011-03-06 08:11:20 +01:00
|
|
|
|
2011-02-16 09:25:19 +01:00
|
|
|
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
|
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2011-02-16 09:25:19 +01:00
|
|
|
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
|
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the upstream-pipelining patch for nginx"
|
2012-03-21 14:29:32 +01:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-upstream_pipelining.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2012-03-21 14:29:32 +01:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the server_header patch for nginx"
|
2011-02-16 09:25:19 +01:00
|
|
|
cp $root/patches/nginx-$main_ver-server_header.patch server_header.patch || exit 1
|
2012-01-15 11:11:30 +01:00
|
|
|
sed $"s/NGINX_VERSION \".unknown\"/NGINX_VERSION \".$minor_ver\"/" server_header.patch \
|
|
|
|
> server_header.patch.tmp && mv -f server_header.patch.tmp server_header.patch || exit 1
|
2014-01-28 06:14:36 +01:00
|
|
|
patch -p1 < server_header.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2011-02-16 09:25:19 +01:00
|
|
|
|
2011-07-08 14:23:59 +02:00
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-redirect_memcpy_overlap.patch || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the no_error_pages patch for nginx"
|
2011-02-16 09:25:19 +01:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-no_error_pages.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2011-02-16 09:25:19 +01:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the no_Werror patch for nginx"
|
2011-06-27 14:00:19 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-no_Werror.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2011-06-27 14:00:19 +02:00
|
|
|
|
2012-04-05 10:00:32 +02:00
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-epoll_check_stale_wev.patch || exit 1
|
2011-07-05 10:33:12 +02:00
|
|
|
|
2011-10-07 07:44:20 +02:00
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-request_body_in_single_buf.patch || exit 1
|
2011-07-05 10:33:12 +02:00
|
|
|
|
2012-06-17 11:24:29 +02:00
|
|
|
#echo "INFO: applying the max_subrequests patch...";
|
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-max_subrequests.patch || exit 1
|
2012-02-20 09:04:30 +01:00
|
|
|
|
2012-06-17 11:24:29 +02:00
|
|
|
#echo "INFO: applying the subrequst_loop patch...";
|
|
|
|
#patch -p1 -l < $root/patches/nginx-$main_ver-subrequest_loop.patch || exit 1
|
2011-07-07 10:54:51 +02:00
|
|
|
|
2012-06-17 11:24:29 +02:00
|
|
|
#echo "INFO: applying the gzip_empty_flush_buf patch...";
|
|
|
|
#patch -p1 -l < $root/patches/nginx-$main_ver-gzip_empty_flush_buf.patch || exit 1
|
2011-09-14 10:01:01 +02:00
|
|
|
|
2012-04-05 10:00:32 +02:00
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-variable_header_ignore_no_hash.patch || exit 1
|
2011-10-07 07:44:20 +02:00
|
|
|
|
2012-06-17 11:24:29 +02:00
|
|
|
#echo "applying the named_location_clear_mods_ctx patch"
|
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-named_location_clear_mods_ctx.patch || exit 1
|
2011-10-13 15:25:15 +02:00
|
|
|
|
2013-01-27 05:01:12 +01:00
|
|
|
#echo "$info_txt applying the allow_request_body_updating patch for nginx"
|
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-allow_request_body_updating.patch || exit 1
|
|
|
|
#echo
|
2011-10-21 11:43:37 +02:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the log_escape_non_ascii patch for nginx"
|
2011-11-10 09:25:02 +01:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-log_escape_non_ascii.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2012-11-06 06:29:54 +01:00
|
|
|
|
2012-06-17 11:24:29 +02:00
|
|
|
#echo applying reset_wev_handler_in_named_locations.patch ...
|
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-reset_wev_handler_in_named_locations.patch || exit 1
|
2012-05-02 16:11:27 +02:00
|
|
|
|
2012-06-17 11:24:29 +02:00
|
|
|
#echo applying filter_finalize_hang.patch ...
|
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-filter_finalize_hang.patch || exit 1
|
2012-05-11 15:21:10 +02:00
|
|
|
|
2012-08-16 01:42:06 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.2.3`
|
2012-08-14 00:38:49 +02:00
|
|
|
if [ "$answer" = "N" ]; then
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the add_core_vars_polluting_globals patch for nginx"
|
2012-08-14 00:38:49 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-add_core_vars_polluting_globals.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2012-05-17 15:48:35 +02:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the resolver_debug_log_overflow patch for nginx"
|
2012-08-14 00:38:49 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-resolver_debug_log_overflow.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2012-06-01 12:21:55 +02:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the poll_del_event_at_exit patch for nginx"
|
2012-09-14 00:28:34 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-poll_del_event_at_exit.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2012-08-14 00:38:49 +02:00
|
|
|
fi
|
2012-06-07 11:50:33 +02:00
|
|
|
|
2012-04-05 10:00:32 +02:00
|
|
|
#echo "INFO: applying null-character-fixes patch"
|
|
|
|
#patch -p0 < $root/patches/nginx-$main_ver-null_character_fixes.patch || exit 1
|
2012-03-16 03:37:53 +01:00
|
|
|
|
2011-12-24 17:02:27 +01:00
|
|
|
#patch -p1 < $root/patches/nginx-$main_ver-gzip_ok_invalid_read_fix.patch || exit 1
|
2011-12-22 04:39:27 +01:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the location_if_inherits_proxy patch for nginx"
|
2012-09-14 00:28:34 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-location_if_inherits_proxy.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2012-06-24 14:43:10 +02:00
|
|
|
|
2013-08-30 21:41:13 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.5.3`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the upstream_truncation patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-upstream_truncation.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2012-09-06 00:11:52 +02:00
|
|
|
|
2013-08-30 21:41:13 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.5.3`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the channel-uninit-params patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-channel-uninit-params.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2012-09-17 20:47:04 +02:00
|
|
|
|
2012-11-06 06:59:27 +01:00
|
|
|
echo "$info_txt applying the dtrace patch for nginx"
|
2012-09-14 00:28:34 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-dtrace.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
|
|
|
|
2012-12-24 02:54:00 +01:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.2.6`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the upstream_test_connect_kqueue patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-upstream_test_connect_kqueue.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2012-07-26 19:59:33 +02:00
|
|
|
|
2012-12-06 05:54:05 +01:00
|
|
|
echo "$info_txt applying the slab_alloc_no_memory_as_info patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-slab_alloc_no_memory_as_info.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2013-02-18 21:16:45 +01:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.2.7`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the resolver_wev_handler_segfault_with_poll patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-resolver_wev_handler_segfault_with_poll.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2013-01-23 02:46:20 +01:00
|
|
|
|
2013-04-21 07:41:46 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.2.8`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the run_posted_requests_in_resolver patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-run_posted_requests_in_resolver.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2013-03-21 02:48:27 +01:00
|
|
|
|
2013-06-11 01:35:04 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.4.1`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying patches/nginx-$main_ver-cve-2013-2070.patch for nginx"
|
|
|
|
patch -p0 < $root/patches/nginx-$main_ver-cve-2013-2070.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2013-05-13 21:22:02 +02:00
|
|
|
|
2013-08-30 21:41:13 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.5.3`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying patches/nginx-$main_ver-invalid_referer_hash.patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-invalid_referer_hash.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2013-05-22 01:19:10 +02:00
|
|
|
|
2013-06-12 20:16:31 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.4.1`
|
|
|
|
if [ "$answer" = "Y" ]; then
|
|
|
|
echo "$info_txt applying patches/nginx-$main_ver-gcc-maybe-uninitialized-warning.patch for nginx"
|
|
|
|
patch -p1 < $root/patches/nginx-$main_ver-gcc-maybe-uninitialized-warning.patch
|
|
|
|
echo
|
|
|
|
fi
|
2013-06-11 22:05:30 +02:00
|
|
|
|
2013-08-30 21:41:13 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.5.3`
|
|
|
|
if [ "$answer" = "N" ]; then
|
2013-10-26 23:54:50 +02:00
|
|
|
echo "$info_txt applying the unix_socket_accept_over_read patch for nginx $ver"
|
2013-08-30 21:41:13 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$ver-unix_socket_accept_over_read.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2013-10-20 05:49:06 +02:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.5.3`
|
|
|
|
if [ "$answer" = "N" ]; then
|
2013-10-26 23:54:50 +02:00
|
|
|
echo "$info_txt applying the gzip_buffered_bug patch for nginx $ver"
|
2013-10-20 05:49:06 +02:00
|
|
|
patch -p1 < $root/patches/nginx-$ver-gzip_buffered_bug.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2013-12-15 22:21:56 +01:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.5.7`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the gzip_flush_bug patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-gzip_flush_bug.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2013-10-26 02:31:39 +02:00
|
|
|
|
2013-10-26 23:54:50 +02:00
|
|
|
echo "$info_txt applying the cache_lock_hang_in_subreq patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-cache_lock_hang_in_subreq.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2013-10-27 23:37:11 +01:00
|
|
|
echo "$info_txt applying the proxy_host_port_vars patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-proxy_host_port_vars.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2013-11-04 22:08:57 +01:00
|
|
|
echo "$info_txt applying the cache_manager_exit patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-cache_manager_exit.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2013-11-21 06:05:25 +01:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.4.4`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the CVE-2013-4547 patch for nginx $ver"
|
|
|
|
patch -p0 < $root/patches/patch.2013.space.txt || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
|
2013-12-06 05:33:30 +01:00
|
|
|
echo "$info_txt applying the larger_max_error_str patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-larger_max_error_str.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2013-12-10 19:18:15 +01:00
|
|
|
echo "$info_txt applying the pcre_conf_opt patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-pcre_conf_opt.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2014-01-28 06:14:36 +01:00
|
|
|
answer=`$root/util/ver-ge "$main_ver" 1.5.9`
|
|
|
|
if [ "$answer" = "N" ]; then
|
|
|
|
echo "$info_txt applying the resolve-names-with-a-trailing-dot patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-resolve-names-with-a-trailing-dot.patch || exit 1
|
|
|
|
echo
|
|
|
|
fi
|
2014-01-08 20:50:58 +01:00
|
|
|
|
2014-01-23 21:06:48 +01:00
|
|
|
echo "$info_txt applying the setting_args_invalidates_uri patch for nginx $ver"
|
|
|
|
patch -p1 < $root/patches/nginx-$ver-setting_args_invalidates_uri.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2011-02-16 09:25:19 +01:00
|
|
|
rm -f *.patch || exit 1
|
|
|
|
|
|
|
|
cd .. || exit 1
|
|
|
|
|
2011-08-05 04:04:23 +02:00
|
|
|
cp $root/patches/nginx-$main_ver-no_pool.patch ./nginx-no_pool.patch || exit 1
|
2012-01-15 11:11:30 +01:00
|
|
|
sed $"s/NGINX_VERSION \".unknown/NGINX_VERSION \".$minor_ver/" \
|
|
|
|
./nginx-no_pool.patch > ./nginx-no_pool.patch.tmp && \
|
|
|
|
mv ./nginx-no_pool.patch.tmp ./nginx-no_pool.patch \
|
|
|
|
|| exit 1
|
2011-08-05 04:04:23 +02:00
|
|
|
rm -rf no-pool-nginx-$ver
|
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2014-01-11 00:55:00 +01:00
|
|
|
ver=0.51
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/echo-nginx-module/tarball/v$ver" -O echo-nginx-module-$ver.tar.gz || exit 1
|
2011-08-05 04:04:23 +02:00
|
|
|
tar -xzf echo-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-echo-nginx-module-* echo-nginx-module-$ver || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2013-10-28 06:03:48 +01:00
|
|
|
ver=0.04
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/xss-nginx-module/tarball/v$ver" -O xss-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf xss-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-xss-nginx-module-* xss-nginx-module-$ver || exit 1
|
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2013-09-30 03:55:59 +02:00
|
|
|
ver=0.2.19
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/simpl/ngx_devel_kit/tarball/v$ver" -O ngx_devel_kit-$ver.tar.gz
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf ngx_devel_kit-$ver.tar.gz || exit 1
|
|
|
|
mv simpl-ngx_devel_kit-* ngx_devel_kit-$ver || exit 1
|
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2014-01-11 01:10:44 +01:00
|
|
|
ver=0.24
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/set-misc-nginx-module/tarball/v$ver" -O set-misc-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf set-misc-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-set-misc-nginx-module-* set-misc-nginx-module-$ver || exit 1
|
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2013-12-14 23:27:38 +01:00
|
|
|
ver=0.13
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/rds-json-nginx-module/tarball/v$ver" -O rds-json-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf rds-json-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-rds-json-nginx-module-* rds-json-nginx-module-$ver || exit 1
|
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2013-10-28 06:08:40 +01:00
|
|
|
ver=0.05
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/rds-csv-nginx-module/tarball/v$ver" -O rds-csv-nginx-module-$ver.tar.gz || exit 1
|
2011-08-31 07:12:44 +02:00
|
|
|
tar -xzf rds-csv-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-rds-csv-nginx-module-* rds-csv-nginx-module-$ver || exit 1
|
|
|
|
|
2012-07-12 20:38:31 +02:00
|
|
|
#################################
|
|
|
|
|
2014-01-11 01:04:19 +01:00
|
|
|
ver=0.25
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/headers-more-nginx-module/tarball/v$ver" -O headers-more-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf headers-more-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-headers-more-nginx-module-* headers-more-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-12-19 21:43:13 +01:00
|
|
|
ver=0.1.7
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/chaoslawful/drizzle-nginx-module/tarball/v$ver" -O drizzle-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf drizzle-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv chaoslawful-drizzle-nginx-module-* drizzle-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2014-01-11 00:43:51 +01:00
|
|
|
ver=0.9.4
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/chaoslawful/lua-nginx-module/tarball/v$ver" -O lua-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf lua-nginx-module-$ver.tar.gz || exit 1
|
2011-03-07 12:32:13 +01:00
|
|
|
mv chaoslawful-lua-nginx-module-* ngx_lua-$ver || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-12-10 06:10:29 +01:00
|
|
|
ver=0.03
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/array-var-nginx-module/tarball/v$ver" -O array-var-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf array-var-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-array-var-nginx-module-* array-var-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-12-15 00:32:54 +01:00
|
|
|
ver=0.14
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/memc-nginx-module/tarball/v$ver" -O memc-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf memc-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-memc-nginx-module-* memc-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2014-01-11 01:25:53 +01:00
|
|
|
ver=0.25
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/srcache-nginx-module/tarball/v$ver" -O srcache-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf srcache-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-srcache-nginx-module-* srcache-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-01-29 07:21:00 +01:00
|
|
|
ver=0.07
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/calio/form-input-nginx-module/tarball/v$ver" -O form-input-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf form-input-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv calio-form-input-nginx-module-* form-input-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-04-17 20:45:33 +02:00
|
|
|
ver=0.10
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/calio/iconv-nginx-module/tarball/v$ver" -O iconv-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf iconv-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv calio-iconv-nginx-module-* iconv-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-04-17 01:21:43 +02:00
|
|
|
ver=0.03
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/encrypted-session-nginx-module/tarball/v$ver" -O encrypted-session-nginx-module-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf encrypted-session-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-encrypted-session-nginx-module-* encrypted-session-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
|
|
|
|
2012-06-22 17:07:17 +02:00
|
|
|
#ver=0.7
|
|
|
|
#$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
|
2011-02-16 09:25:19 +01:00
|
|
|
|
|
|
|
#################################
|
|
|
|
|
|
|
|
ver=0.2
|
2011-03-07 10:50:56 +01:00
|
|
|
$root/util/get-tarball "http://mdounin.ru/files/ngx_http_auth_request_module-$ver.tar.gz" -O auth_request-$ver.tar.gz || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
tar -xzf auth_request-$ver.tar.gz || exit 1
|
|
|
|
mv ngx_http_auth_request_module-* auth-request-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-12-03 21:07:10 +01:00
|
|
|
ver=0.3.7
|
2012-05-12 09:04:43 +02:00
|
|
|
$root/util/get-tarball "http://people.freebsd.org/~osa/ngx_http_redis-$ver.tar.gz" -O redis-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
tar -xzf redis-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv ngx_http_redis-* redis-nginx-module-$ver || exit 1
|
|
|
|
|
2013-03-22 02:03:56 +01:00
|
|
|
cd redis-nginx-module-$ver
|
|
|
|
echo "applying ngx_http_redis-$ver-variables_in_redis_pass.patch"
|
|
|
|
patch -p1 < $root/patches/ngx_http_redis-$ver-variables_in_redis_pass.patch || exit 1
|
|
|
|
cd ..
|
|
|
|
|
2012-05-12 09:04:43 +02:00
|
|
|
#################################
|
2012-06-21 17:11:44 +02:00
|
|
|
|
2013-08-07 01:16:06 +02:00
|
|
|
ver=1.0rc3
|
2011-02-16 10:30:31 +01:00
|
|
|
$root/util/get-tarball "https://github.com/FRiCKLE/ngx_postgres/tarball/$ver" -O ngx_postgres-$ver.tar.gz || exit 1
|
2011-02-16 09:31:09 +01:00
|
|
|
tar -xzf ngx_postgres-$ver.tar.gz || exit 1
|
|
|
|
mv FRiCKLE-ngx_postgres-* ngx_postgres-$ver || exit 1
|
2011-02-16 09:25:19 +01:00
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2012-02-08 10:11:33 +01:00
|
|
|
ver=0.2rc1
|
2012-02-07 13:17:20 +01:00
|
|
|
$root/util/get-tarball "https://github.com/FRiCKLE/ngx_coolkit/tarball/$ver" -O ngx_coolkit-$ver.tar.gz || exit 1
|
|
|
|
tar -xzf ngx_coolkit-$ver.tar.gz || exit 1
|
|
|
|
mv FRiCKLE-ngx_coolkit-* ngx_coolkit-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-03-25 06:35:33 +01:00
|
|
|
ver=0.10
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/redis2-nginx-module/tarball/v$ver" -O redis2-nginx-module-$ver.tar.gz || exit 1
|
2011-03-10 11:15:39 +01:00
|
|
|
tar -xzf redis2-nginx-module-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-redis2-nginx-module-* redis2-nginx-module-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2012-07-05 04:58:13 +02:00
|
|
|
ver=5.1.5
|
2011-02-16 10:30:31 +01:00
|
|
|
$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
|
|
|
|
|
2012-07-05 04:58:13 +02:00
|
|
|
#$root/util/get-tarball "http://agentzh.org/misc/nginx/patch-lua-$ver-4" -O "patch-lua-$ver-4" || exit 1
|
2011-02-16 10:30:31 +01:00
|
|
|
|
2012-07-05 04:58:13 +02:00
|
|
|
#cd lua-$ver/src || exit 1
|
|
|
|
#patch -p0 < ../../patch-lua-$ver-4 || exit 1
|
|
|
|
#cd ../.. || exit 1
|
2011-02-16 10:30:31 +01:00
|
|
|
|
2012-07-05 04:58:13 +02:00
|
|
|
#rm "patch-lua-$ver-4" || exit 1
|
2011-02-16 10:30:31 +01:00
|
|
|
|
2013-04-21 08:10:26 +02:00
|
|
|
echo "$info_txt applying the makefile_install_fix patch for lua $ver"
|
2012-07-05 04:58:13 +02:00
|
|
|
patch -p0 < $root/patches/lua-$ver-makefile_install_fix.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
|
|
|
|
2013-04-21 08:10:26 +02:00
|
|
|
echo "$info_txt applying the disable_lua50_compat patch for lua $ver"
|
2012-07-05 04:58:13 +02:00
|
|
|
patch -p0 < $root/patches/lua-$ver-disable_lua50_compat.patch || exit 1
|
2012-11-06 06:59:27 +01:00
|
|
|
echo
|
2011-03-09 14:01:41 +01:00
|
|
|
|
2013-04-21 08:10:26 +02:00
|
|
|
echo "$info_txt applying the enable_debug_info patch for lua $ver"
|
|
|
|
patch -p0 < $root/patches/lua-$ver-enable_debug_info.patch || exit 1
|
|
|
|
echo
|
|
|
|
|
2011-02-16 10:30:31 +01:00
|
|
|
#################################
|
|
|
|
|
2014-01-10 07:03:26 +01:00
|
|
|
ver=2.1-20140109
|
2013-12-14 23:14:26 +01:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/luajit2/archive/v$ver.tar.gz" -O "LuaJIT-$ver.tar.gz" || exit 1
|
2011-02-16 10:33:55 +01:00
|
|
|
tar -xzf LuaJIT-$ver.tar.gz || exit 1
|
2013-12-14 23:14:26 +01:00
|
|
|
mv luajit2-* LuaJIT-$ver || exit 1
|
2011-02-16 10:33:55 +01:00
|
|
|
|
2013-06-08 07:23:45 +02:00
|
|
|
#echo "$info_txt applying luajit-$ver hotfix #1 patch for luajit $ver"
|
|
|
|
#$root/util/get-tarball http://luajit.org/download/v2.0.1_hotfix1.patch -O hotfix.patch
|
|
|
|
#cd LuaJIT-$ver || exit 1;
|
|
|
|
#patch -p1 < ../hotfix.patch || exit 1
|
|
|
|
#rm ../hotfix.patch
|
|
|
|
#cd .. || exit 1
|
2012-11-29 07:20:03 +01:00
|
|
|
|
2012-11-05 21:17:26 +01:00
|
|
|
#$root/util/get-tarball http://luajit.org/download/beta11_hotfix1.patch -O beta11_hotfix1.patch
|
|
|
|
#patch -p1 < beta11_hotfix1.patch || exit 1
|
|
|
|
#rm beta11_hotfix1.patch || exit 1
|
2012-02-24 07:49:55 +01:00
|
|
|
|
2012-05-13 15:34:16 +02:00
|
|
|
#cp $root/misc/unwind-generic.h ./unwind.h || exit 1
|
2012-11-05 21:17:26 +01:00
|
|
|
#cd ..
|
2011-05-26 09:36:51 +02:00
|
|
|
|
2011-02-16 10:33:55 +01:00
|
|
|
#################################
|
|
|
|
|
2011-09-19 06:33:03 +02:00
|
|
|
ver=1.0.3
|
2011-12-12 09:03:37 +01:00
|
|
|
$root/util/get-tarball "http://www.kyne.com.au/~mark/software/old/lua-cjson-$ver.tar.gz" -O "lua-cjson-$ver.tar.gz" || exit 1
|
2011-08-09 17:46:50 +02:00
|
|
|
tar -xzf lua-cjson-$ver.tar.gz || exit 1
|
2011-08-10 04:44:17 +02:00
|
|
|
cd lua-cjson-$ver || exit 1
|
2011-09-19 06:33:03 +02:00
|
|
|
#patch -p1 < $root/patches/lua_cjson-$ver-array_detection_fix.patch || exit 1
|
2011-08-10 04:44:17 +02:00
|
|
|
cd ..
|
2011-08-09 17:46:50 +02:00
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2012-09-19 21:28:29 +02:00
|
|
|
ver=0.10
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-redis-parser/tarball/v$ver" -O "lua-redis-parser-$ver.tar.gz" || exit 1
|
2011-08-11 04:04:00 +02:00
|
|
|
tar -xzf lua-redis-parser-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-redis-parser-* lua-redis-parser-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2012-05-13 04:46:38 +02:00
|
|
|
ver=0.05
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-rds-parser/tarball/v$ver" -O "lua-rds-parser-$ver.tar.gz" || exit 1
|
2011-08-31 07:57:49 +02:00
|
|
|
tar -xzf lua-rds-parser-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-rds-parser-* lua-rds-parser-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2014-01-11 02:18:15 +01:00
|
|
|
ver=0.11
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-dns/tarball/v$ver" -O "lua-resty-dns-$ver.tar.gz" || exit 1
|
2012-08-06 08:48:01 +02:00
|
|
|
tar -xzf lua-resty-dns-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-dns-* lua-resty-dns-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2014-01-11 01:59:12 +01:00
|
|
|
ver=0.13
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-memcached/tarball/v$ver" -O "lua-resty-memcached-$ver.tar.gz" || exit 1
|
2012-02-28 15:04:31 +01:00
|
|
|
tar -xzf lua-resty-memcached-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-memcached-* lua-resty-memcached-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2014-01-11 02:08:00 +01:00
|
|
|
ver=0.18
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-redis/tarball/v$ver" -O "lua-resty-redis-$ver.tar.gz" || exit 1
|
2012-02-28 15:15:29 +01:00
|
|
|
tar -xzf lua-resty-redis-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-redis-* lua-resty-redis-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-10-28 05:30:32 +01:00
|
|
|
ver=0.14
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-mysql/tarball/v$ver" -O "lua-resty-mysql-$ver.tar.gz" || exit 1
|
2012-02-28 15:34:40 +01:00
|
|
|
tar -xzf lua-resty-mysql-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-mysql-* lua-resty-mysql-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-10-28 05:33:12 +01:00
|
|
|
ver=0.09
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-upload/tarball/v$ver" -O "lua-resty-upload-$ver.tar.gz" || exit 1
|
2012-02-28 15:34:40 +01:00
|
|
|
tar -xzf lua-resty-upload-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-upload-* lua-resty-upload-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2012-11-20 20:36:42 +01:00
|
|
|
ver=0.08
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-string/tarball/v$ver" -O "lua-resty-string-$ver.tar.gz" || exit 1
|
2012-02-28 15:34:40 +01:00
|
|
|
tar -xzf lua-resty-string-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-string-* lua-resty-string-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2013-10-28 05:26:27 +01:00
|
|
|
ver=0.02
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-websocket/tarball/v$ver" -O "lua-resty-websocket-$ver.tar.gz" || exit 1
|
2013-09-28 00:37:00 +02:00
|
|
|
tar -xzf lua-resty-websocket-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-websocket-* lua-resty-websocket-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2014-01-11 01:44:53 +01:00
|
|
|
ver=0.02
|
2013-10-18 08:14:58 +02:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/lua-resty-lock/tarball/v$ver" -O "lua-resty-lock-$ver.tar.gz" || exit 1
|
2013-09-28 00:42:33 +02:00
|
|
|
tar -xzf lua-resty-lock-$ver.tar.gz || exit 1
|
|
|
|
mv agentzh-lua-resty-lock-* lua-resty-lock-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2014-01-11 01:29:29 +01:00
|
|
|
ver=0.0.3
|
2013-12-14 22:21:41 +01:00
|
|
|
$root/util/get-tarball "https://github.com/agentzh/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
|
|
|
|
mv agentzh-lua-resty-core-* lua-resty-core-$ver || exit 1
|
|
|
|
|
|
|
|
#################################
|
|
|
|
|
2011-02-16 09:25:19 +01:00
|
|
|
rm *.tar.gz
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
cp $root/util/configure ./
|
2013-10-18 01:21:24 +02:00
|
|
|
cp $root/README.markdown ./
|
2011-08-08 09:56:33 +02:00
|
|
|
cp $root/util/install bundle/
|
2012-06-11 04:54:02 +02:00
|
|
|
find bundle -name '*~' -delete
|
2011-02-16 09:25:19 +01:00
|
|
|
|
|
|
|
cd $root
|
|
|
|
|
2012-03-22 09:09:44 +01:00
|
|
|
tar cf $name.tar $name
|
|
|
|
gzip -f --best $name.tar
|
2011-02-16 09:25:19 +01:00
|
|
|
|