Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dso module #24

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
402952f
1 fix bugs of the limit_req module(please read this issue https://git…
monadbobo May 31, 2012
efe6f85
add limit_req module(enhanced) test case.
monadbobo Jun 1, 2012
361f599
fixed code style.
monadbobo Jun 11, 2012
ab9e717
fix compile warning.
monadbobo Jun 11, 2012
5e52981
Merge remote-tracking branch 'upstream/master' into upstream
monadbobo Jul 11, 2012
36f9fe1
add Dynamic Shared Object(dso) module.
monadbobo Jul 11, 2012
2c8dca0
add some configure help message.
monadbobo Jul 11, 2012
9be9564
add dso test scripts
yaoweibin Jul 11, 2012
9610c45
Merge remote-tracking branch 'origin/dso' into dso
yaoweibin Jul 11, 2012
84b3648
Merge pull request #1 from yaoweibin/dso
monadbobo Jul 11, 2012
cfa9521
Merge remote-tracking branch 'upstream/master' into tengine-dso
monadbobo Jul 12, 2012
935bb19
Merge branch 'dso' of github.com:monadbobo/tengine into tengine-dso
monadbobo Jul 12, 2012
195c6ac
1 modify some warn message.
monadbobo Jul 20, 2012
a061068
add chinese doc of dso.
monadbobo Jul 20, 2012
85dcf9a
1 modify the name of compiled dso module name.
Jul 27, 2012
12fc82b
1 modify the name of dso module chinese doc.
monadbobo Jul 31, 2012
6da5567
fixed test-nginx with new dso module
yaoweibin Aug 6, 2012
ec6a5fc
Merge pull request #2 from yaoweibin/dso
monadbobo Aug 6, 2012
1f2258d
to make right for compute of the flag_postion.
monadbobo Aug 7, 2012
70c67b8
Merge branch 'dso' of github.com:monadbobo/tengine into dso
monadbobo Aug 7, 2012
78ad1d8
1 fix some code style
monadbobo Aug 9, 2012
a46cad0
1 modify help message of configure.
monadbobo Aug 15, 2012
871b459
update doc of dso module.
monadbobo Aug 15, 2012
ff13cc8
modify doc of dso module (via shudu).
monadbobo Aug 21, 2012
1107b2e
1 modify order directive of dso module.
monadbobo Aug 22, 2012
b16d884
modify module_order command to module_stub.
monadbobo Aug 28, 2012
2885aae
add command of dso module in show directive(nginx -l).
monadbobo Aug 29, 2012
cc279d9
1 fix code style.
monadbobo Aug 29, 2012
8dd2239
modify error message
monadbobo Aug 30, 2012
fd5c94b
Merge remote-tracking branch 'upstream/master' into dso
monadbobo Aug 30, 2012
6ce5137
merge 1.2.3 for dso patch
monadbobo Aug 30, 2012
c3d638f
1 remove some dead code.
monadbobo Aug 31, 2012
a9e8d1a
fix code style.
monadbobo Aug 31, 2012
e80b4c2
1 fix code style.
monadbobo Sep 3, 2012
94ffb50
1 modify document.
monadbobo Sep 4, 2012
02c1c81
1 compatible with nginx config option.
monadbobo Sep 4, 2012
9bf0f59
modify test nginx.
monadbobo Sep 4, 2012
7a9f8d0
1 modify dso_tool
monadbobo Sep 5, 2012
375f1ff
1 fix compile error in Darwin.
monadbobo Sep 5, 2012
8b1e249
fix bug for duplicate load.
monadbobo Sep 5, 2012
4efe343
fix some code style
monadbobo Sep 5, 2012
a62ae88
modify comment
monadbobo Sep 5, 2012
f81ecb2
fix bug for reload.
monadbobo Sep 5, 2012
e167210
fix code style.
monadbobo Sep 5, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions auto/init
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ NGX_AUTOCONF_ERR=$NGX_OBJS/autoconf.err
NGX_ERR=$NGX_OBJS/autoconf.err
MAKEFILE=$NGX_OBJS/Makefile

# dso
NGX_DSO_COMPILE=$NGX_OBJS/dso_tool
NGX_MODULE_STUBS=$NGX_OBJS/module_stubs

NGX_PCH=
NGX_USE_PCH=
Expand Down
74 changes: 74 additions & 0 deletions auto/install
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ case ".$NGX_HTTP_LOG_PATH" in
esac


case ".$NGX_DSO_PATH" in
./*)
;;

*)
NGX_DSO_PATH=$NGX_PREFIX/$NGX_DSO_PATH
;;
esac


if test -f man/nginx.8 ; then
NGX_MAN=man/nginx.8
else
Expand All @@ -96,8 +106,41 @@ $NGX_OBJS/nginx.8: $NGX_MAN $NGX_AUTO_CONFIG_H
-e "s|%%ERROR_LOG_PATH%%|${NGX_ERROR_LOG_PATH:-stderr}|" \\
< $NGX_MAN > \$@

END

if test -n "$NGX_SHARED_MODULES"; then

cat << END >> $NGX_MAKEFILE

dso_install: all
END

for ngx_dso_module in $NGX_DSO_ALL_TARGETS
do
cat << END >> $NGX_MAKEFILE

cp $ngx_dso_module \$(DESTDIR)$NGX_DSO_PATH

END
done

cat << END >> $NGX_MAKEFILE

install: all \
$NGX_INSTALL_PERL_MODULES
END

else
cat << END >> $NGX_MAKEFILE

install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \
$NGX_INSTALL_PERL_MODULES
END

fi

cat << END >> $NGX_MAKEFILE

test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX'

test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \
Expand Down Expand Up @@ -173,6 +216,34 @@ END
fi


if [ $NGX_DSO = YES ] ; then

cat << END >> $NGX_MAKEFILE
test -d '\$(DESTDIR)$NGX_DSO_PATH' \
|| mkdir -p '\$(DESTDIR)$NGX_DSO_PATH'
END

for ngx_dso_module in $NGX_DSO_ALL_TARGETS
do
cat << END >> $NGX_MAKEFILE

cp $ngx_dso_module \$(DESTDIR)$NGX_DSO_PATH

END
done

cat << END >> $NGX_MAKEFILE

test -f '\$(DESTDIR)$NGX_CONF_PREFIX/module_stubs' \
|| cp $NGX_MODULE_STUBS '\$(DESTDIR)$NGX_CONF_PREFIX'
cp $NGX_MODULE_STUBS '\$(DESTDIR)$NGX_CONF_PREFIX/module_stubs'
chmod 0755 $NGX_DSO_COMPILE
cp $NGX_DSO_COMPILE '$NGX_PREFIX/sbin'
END

fi


# create Makefile

cat << END >> Makefile
Expand All @@ -184,6 +255,9 @@ build:
install:
\$(MAKE) -f $NGX_MAKEFILE install

dso_install:
\$(MAKE) -f $NGX_MAKEFILE dso_install

upgrade:
$NGX_SBIN_PATH -t

Expand Down
4 changes: 2 additions & 2 deletions auto/lib/conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ if [ $USE_PERL = YES ]; then
. auto/lib/perl/conf
fi

if [ $HTTP_LUA = YES ]; then
if [ $HTTP_LUA = YES ] || [ $HTTP_LUA_SHARED = YES ]; then
. auto/lib/lua/conf
fi

if [ $HTTP_GEOIP = YES ]; then
if [ $HTTP_GEOIP = YES ] || [ $HTTP_GEOIP_SHARED = YES ]; then
. auto/lib/geoip/conf
fi

Expand Down
7 changes: 5 additions & 2 deletions auto/lib/geoip/conf
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ fi


if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"

if [ $HTTP_GEOIP_SHARED = YES ]; then
DSO_LIBS="$DSO_LIBS|$HTTP_GEOIP_MODULE:$ngx_feature_libs"
else
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
fi
else

cat << END
Expand Down
16 changes: 12 additions & 4 deletions auto/lib/lua/conf
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,13 @@ END
fi

if [ $ngx_found = yes ]; then
CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
if [ $HTTP_LUA_SHARED = YES ]; then
DSO_INCS="$DSO_INCS|$NGX_HTTP_LUA_MODULE:$ngx_feature_path"
DSO_LIBS="$DSO_LIBS|$NGX_HTTP_LUA_MODULE:$ngx_feature_libs"
else
CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
fi
else
cat << END
$0: error: ngx_http_lua_module requires the Lua library.
Expand All @@ -150,6 +155,9 @@ ngx_feature_test='printf("hello");'
. auto/feature

if [ $ngx_found = yes ]; then
CORE_LIBS="-Wl,-E $CORE_LIBS"
if [ $HTTP_LUA_SHARED = YES ]; then
DSO_LIBS="$DSO_LIBS $ngx_feature_libs"
else
CORE_LIBS="-Wl,-E $CORE_LIBS"
fi
fi

Loading