Skip to content

Commit 1a1ec9b

Browse files
committed
Merge branch 'release/v1.8.0'
Conflicts: docs/manual/deploying.tex docs/manual/hacking.tex docs/manual/installing.tex docs/manual/managing.tex docs/manual/preamble.tex src/io.c
2 parents 5d60d87 + 6f4b788 commit 1a1ec9b

File tree

336 files changed

+28433
-5192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

336 files changed

+28433
-5192
lines changed

.dexy

+5
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
{
2+
"*.tex|jinja" : { "allinputs" : true },
3+
"*.py|pyg|l": {},
4+
"*.sh|pyg|l": {},
5+
"*.conf|dexy": {},
6+
"*.cfg": {}
27
}

.gitignore

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

22
bin/
3+
tools/config_modules/mongo-c-driver/
4+
35
# Compiled Object files
46
*.slo
57
*.lo
@@ -14,7 +16,6 @@ bin/
1416
*.a
1517
.*.sw*
1618
tests/*_tests
17-
tests/*_tests.*/*
1819
tests/config.sqlite
1920
tests/empty.sqlite
2021
*.log
@@ -25,13 +26,22 @@ tools/lemon/lemon
2526
tools/m2sh/build/
2627
tools/m2sh/tests/*_tests
2728
tools/m2sh/tests/tests.log
29+
tools/procer/procer
2830
run/*
2931
logs/*
3032
tmp/*
3133

34+
# dexy crap
35+
output/
36+
output-long/
37+
artifacts/
38+
3239
#Coverage generated files
3340
*.zcov
3441
tests/coverage
3542
*.gcno
3643
*.gcda
3744
*.dSYM
45+
46+
#OSX garbage
47+
.DS_Store

Makefile

+13-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ TEST_SRC=$(wildcard tests/*_tests.c)
1616
TESTS=$(patsubst %.c,%,${TEST_SRC})
1717
MAKEOPTS=OPTFLAGS="${NOEXTCFLAGS} ${OPTFLAGS}" OPTLIBS="${OPTLIBS}" LIBS="${LIBS}" DESTDIR="${DESTDIR}" PREFIX="${PREFIX}"
1818

19-
all: bin/mongrel2 tests m2sh
19+
all: bin/mongrel2 tests m2sh procer
2020

2121
dev: CFLAGS=-g -Wall -Isrc -Wall -Wextra $(OPTFLAGS) -D_FILE_OFFSET_BITS=64
2222
dev: all
@@ -50,6 +50,7 @@ clean:
5050
${MAKE} -C tools/filters OPTLIB=${OPTLIB} clean
5151
${MAKE} -C tests/filters OPTLIB=${OPTLIB} clean
5252
${MAKE} -C tools/config_modules OPTLIB=${OPTLIB} clean
53+
${MAKE} -C tools/procer OPTLIB=${OPTLIB} clean
5354

5455
pristine: clean
5556
sudo rm -rf examples/python/build examples/python/dist examples/python/m2py.egg-info
@@ -60,6 +61,7 @@ pristine: clean
6061
rm -f logs/*
6162
rm -f run/*
6263
${MAKE} -C tools/m2sh pristine
64+
${MAKE} -C tools/procer pristine
6365

6466
.PHONY: tests
6567
tests: tests/config.sqlite ${TESTS} test_filters filters config_modules
@@ -84,6 +86,9 @@ check:
8486
m2sh:
8587
${MAKE} ${MAKEOPTS} -C tools/m2sh all
8688

89+
procer:
90+
${MAKE} ${MAKEOPTS} -C tools/procer all
91+
8792
test_filters: build/libm2.a
8893
${MAKE} ${MAKEOPTS} -C tests/filters all
8994

@@ -93,12 +98,15 @@ filters: build/libm2.a
9398
config_modules: build/libm2.a
9499
${MAKE} ${MAKEOPTS} -C tools/config_modules all
95100

101+
# Try to install first before creating target directory and trying again
96102
install: all
97-
install -d $(DESTDIR)/$(PREFIX)/bin/
98-
install bin/mongrel2 $(DESTDIR)/$(PREFIX)/bin/
103+
install bin/mongrel2 $(DESTDIR)/$(PREFIX)/bin/ \
104+
|| ( install -d $(DESTDIR)/$(PREFIX)/bin/ \
105+
&& install bin/mongrel2 $(DESTDIR)/$(PREFIX)/bin/ )
99106
${MAKE} ${MAKEOPTS} -C tools/m2sh install
100107
${MAKE} ${MAKEOPTS} -C tools/config_modules install
101108
${MAKE} ${MAKEOPTS} -C tools/filters install
109+
${MAKE} ${MAKEOPTS} -C tools/procer install
102110

103111
examples/python/mongrel2/sql/config.sql: src/config/config.sql src/config/mimetypes.sql
104112
cat src/config/config.sql src/config/mimetypes.sql > $@
@@ -110,7 +118,7 @@ ragel:
110118
ragel -G2 src/http11/httpclient_parser.rl
111119

112120
valgrind:
113-
valgrind --leak-check=full --show-reachable=yes --log-file=valgrind.log --suppressions=tests/valgrind.sup ./bin/mongrel2 tests/config.sqlite localhost
121+
VALGRIND="valgrind --log-file=/tmp/valgrind-%p.log" ${MAKE}
114122

115123
%.o: %.S
116124
$(CC) $(CFLAGS) -c $< -o $@
@@ -163,6 +171,7 @@ openbsd: all
163171

164172
solaris: OPTFLAGS += -I/usr/local/include
165173
solaris: OPTLIBS += -L/usr/local/lib -R/usr/local/lib -lsocket -lnsl -lsendfile
174+
solaris: OPTLIBS += -L/lib -R/lib
166175
solaris: all
167176

168177

README

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This site design is *not* licensed under the BSD license. It is
2+
actually purchased from:
3+
4+
http://themeforest.net/item/cheerapp-premium-app-html-template/286942
5+
6+
and therefore you may NOT copy it.
7+

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Mongrel2 is now 1.7.5 as of *Wed Jun 22 09:23:16 PDT 2011*:
3939
Documentation
4040
-------------
4141

42-
There is a full manual available at [mongrel2.org](http://mongrel2.org/static/mongrel2-manual.html)
43-
covering every aspect of Mongrel2, with more as we write features.
42+
Go to [http://mongrel2.org](http://mongrel2.org) for more information.
4443

4544

docs/manual/.dexy

-6
This file was deleted.

docs/manual/Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ WEBSITE=$(USER)@mongrel2.org:/var/www/mongrel2.org/static/
44
FINAL=book-final
55

66
draft: book-final.dvi
7-
htlatex book-final.tex
8-
tidy -quiet -ashtml -omit -ic -m book-final.html || true
7+
htlatex book-final.tex "book,index=1,2,next,fn-in"
98

109
book-final.dvi:
1110
cp $(SOURCE).tex book-final.tex
@@ -26,5 +25,5 @@ release: clean book-final.pdf draft book-final.pdf sync
2625
sync:
2726
rsync -vz $(FINAL).pdf $(WEBSITE)/mongrel2-manual.pdf
2827
rsync -vz $(FINAL).html $(WEBSITE)/mongrel2-manual.html
29-
rsync -vz $(FINAL).css $(FINAL)[0-9]*.html $(WEBSITE)/
28+
rsync -vz $(FINAL).css $(FINAL)*.html $(WEBSITE)/
3029

docs/manual/book.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
\Preamble{html}
2+
\begin{document}
3+
\Css{}
4+
\EndPreamble

docs/manual/deploying.tex

+18-18
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ \subsection{Introducing procer}
7878
expected to be the one true init, poorly documented, not maintained, and definitely not
7979
going to work for this manual. My only choice was to shave a yak and write my own.
8080

81-
The end result is \shell{procer}, which lives in \file{examples/procer} and does
81+
The end result is \shell{procer}, which lives in \file{tools/procer} and does
8282
most of what you need in a USPM. It works a lot like daemontools or minit, but
8383
is much simpler, with these differences:
8484

@@ -129,11 +129,11 @@ \subsection{Introducing procer}
129129
\subsection{Installing procer}
130130

131131
Installing procer is very easy. It's a single little binary and it lives in
132-
\file{examples/procer} in the Mongrel2 source. Here's how you'd install it
133-
totally from scratch as if you hadn't even build Mongrel2 yet:
132+
\file{tools/procer} in the Mongrel2 source. Here's how you'd install it
133+
totally from scratch as if you hadn't even built Mongrel2 yet:
134134

135135
\begin{code}{Install procer}
136-
<< d['/docs/manual/inputs/install_procer.sh|pyg|l'] >>
136+
<< d['inputs/install_procer.sh|pyg|l'] >>
137137
\end{code}
138138

139139
That's the entire install process, and now procer is in \file{/usr/local/bin}
@@ -169,7 +169,7 @@ \section{Step 1: The Deployment Area}
169169
but feel free to change this up later if you find a better way.
170170

171171
\begin{code}{Make Deployment Directories}
172-
<< d['/docs/manual/inputs/make_deployment_directories.sh|pyg|l'] >>
172+
<< d['inputs/make_deployment_directories.sh|pyg|l'] >>
173173
\end{code}
174174

175175
Hopefully, you're starting to see how you could easily automate this so that you don't
@@ -218,7 +218,7 @@ \section{Step 2: The mongrel2.org Configuration}
218218
did with these commands:
219219

220220
\begin{code}{Testing The Initial Configuration}
221-
<< d['/docs/manual/inputs/testing_initial_config.sh|pyg|l'] >>
221+
<< d['inputs/testing_initial_config.sh|pyg|l'] >>
222222
\end{code}
223223

224224
That's enough to make sure it runs, but you've got nothing running,
@@ -240,13 +240,13 @@ \section{Step 3: Setup procer}
240240
and make sure procer can run everything:
241241

242242
\begin{code}{Skeleton procer Setup}
243-
<< d['/docs/manual/inputs/skeleton_procer_setup.sh|pyg|l'] >>
243+
<< d['inputs/skeleton_procer_setup.sh|pyg|l'] >>
244244
\end{code}
245245

246246
With all of that, you can then try to run \shell{procer} to watch
247247
it fail but still try to run everything:
248248

249-
<< d['/docs/manual/inputs/run_procer_first_time.sh|pyg|l'] >>
249+
<< d['inputs/run_procer_first_time.sh|pyg|l'] >>
250250

251251
This is assuming that you are still in the \file{profiles} directory.
252252
You should see the file \file{error.log} get created and
@@ -290,7 +290,7 @@ \section{Step 3: Setup procer}
290290
Next up, let's get Mongrel2 running inside \shell{procer}:
291291

292292
\begin{code}{procer Config For Mongrel2}
293-
<< d['/docs/manual/inputs/procer_config_for_mongrel2.sh|pyg|l'] >>
293+
<< d['inputs/procer_config_for_mongrel2.sh|pyg|l'] >>
294294
\end{code}
295295

296296
Obviously, you don't have to use a series of \shell{echo} commands to
@@ -303,7 +303,7 @@ \section{Step 3: Setup procer}
303303

304304

305305
\begin{code}{Using procer To Run Mongrel2}
306-
<< d['/docs/manual/inputs/using_procer_to_run_mongrel2.sh|pyg|l'] >>
306+
<< d['inputs/using_procer_to_run_mongrel2.sh|pyg|l'] >>
307307
\end{code}
308308

309309
To watch \shell{procer} in action, try doing \shell{m2sh stop -db config.sqlite
@@ -322,7 +322,7 @@ \subsection{The Python Examples}
322322
you will change \file{profiles/chat/run} to be like this:
323323

324324
\begin{code}{Run Script For Chat Demo}
325-
<< d['/docs/manual/inputs/procer_script_for_chat_demo.sh|pyg|l'] >>
325+
<< d['inputs/procer_script_for_chat_demo.sh|pyg|l'] >>
326326
\end{code}
327327

328328
This little script uses some funky features you might not be familiar
@@ -345,13 +345,13 @@ \subsection{The Python Examples}
345345

346346
When you run this manually, you should see something like this:
347347

348-
<< d['/docs/manual/inputs/run_procer_chat_demo.sh|pyg|l'] >>
348+
<< d['inputs/run_procer_chat_demo.sh|pyg|l'] >>
349349

350350
After all that, you can then try out \shell{procer} again to see if it
351351
properly runs the chat demo as well as mongrel2:
352352

353353
\begin{code}{Running procer With Chat Demo}
354-
<< d['/docs/manual/inputs/running_procer_with_chat_demo.sh|pyg|l'] >>
354+
<< d['inputs/running_procer_with_chat_demo.sh|pyg|l'] >>
355355
\end{code}
356356

357357
If you go look at \file{profiles/error.log}, you'll see that \shell{procer}
@@ -365,17 +365,17 @@ \subsection{The Python Examples}
365365
\file{profiles/handlertest/run}
366366
\hrule
367367

368-
<< d['/docs/manual/inputs/procer_handlertest_run.sh|pyg|l'] >>
368+
<< d['inputs/procer_handlertest_run.sh|pyg|l'] >>
369369

370370
\file{profiles/mp3stream/run}
371371
\hrule
372372

373-
<< d['/docs/manual/inputs/procer_mp3stream_run.sh|pyg|l'] >>
373+
<< d['inputs/procer_mp3stream_run.sh|pyg|l'] >>
374374

375375
\file{profiles/web/run}
376376
\hrule
377377

378-
<< d['/docs/manual/inputs/procer_web_run.sh|pyg|l'] >>
378+
<< d['inputs/procer_web_run.sh|pyg|l'] >>
379379
\end{code}
380380

381381

@@ -385,7 +385,7 @@ \subsection{Testing The New Setup}
385385
just need to see if things work. Here's some curl commands to try:
386386

387387
\begin{code}{Testing With Curl}
388-
<< d['/docs/manual/inputs/testing_procer_setup.sh|pyg|l'] >>
388+
<< d['inputs/testing_procer_setup.sh|pyg|l'] >>
389389
\end{code}
390390

391391

@@ -421,7 +421,7 @@ \section{Step 4: Static Content}
421421
out the chat demo:
422422

423423
\begin{code}{Setting Up Static Content}
424-
<< d['/docs/manual/inputs/setting_up_static_content.sh|pyg|l'] >>
424+
<< d['inputs/setting_up_static_content.sh|pyg|l'] >>
425425
\end{code}
426426

427427
If you get a good response then you should be able to go to

0 commit comments

Comments
 (0)