diff --git a/doc.old/INSTALL.rst b/doc.old/INSTALL.rst new file mode 120000 index 0000000000..37675c714b --- /dev/null +++ b/doc.old/INSTALL.rst @@ -0,0 +1 @@ +../../INSTALL \ No newline at end of file diff --git a/doc/cluster.rst b/doc.old/cluster.rst similarity index 100% rename from doc/cluster.rst rename to doc.old/cluster.rst diff --git a/doc/components/binpac/README.rst b/doc.old/components/binpac/README.rst similarity index 100% rename from doc/components/binpac/README.rst rename to doc.old/components/binpac/README.rst diff --git a/doc/components/bro-aux/README.rst b/doc.old/components/bro-aux/README.rst similarity index 100% rename from doc/components/bro-aux/README.rst rename to doc.old/components/bro-aux/README.rst diff --git a/doc/components/broccoli-python/README.rst b/doc.old/components/broccoli-python/README.rst similarity index 100% rename from doc/components/broccoli-python/README.rst rename to doc.old/components/broccoli-python/README.rst diff --git a/doc/components/broccoli-ruby/README.rst b/doc.old/components/broccoli-ruby/README.rst similarity index 100% rename from doc/components/broccoli-ruby/README.rst rename to doc.old/components/broccoli-ruby/README.rst diff --git a/doc/components/broccoli/README.rst b/doc.old/components/broccoli/README.rst similarity index 100% rename from doc/components/broccoli/README.rst rename to doc.old/components/broccoli/README.rst diff --git a/doc/components/broccoli/broccoli-manual.rst b/doc.old/components/broccoli/broccoli-manual.rst similarity index 100% rename from doc/components/broccoli/broccoli-manual.rst rename to doc.old/components/broccoli/broccoli-manual.rst diff --git a/doc/components/broctl/README.rst b/doc.old/components/broctl/README.rst similarity index 100% rename from doc/components/broctl/README.rst rename to doc.old/components/broctl/README.rst diff --git a/doc/components/btest/README.rst b/doc.old/components/btest/README.rst similarity index 100% rename from doc/components/btest/README.rst rename to doc.old/components/btest/README.rst diff --git a/doc/components/capstats/README.rst b/doc.old/components/capstats/README.rst similarity index 100% rename from doc/components/capstats/README.rst rename to doc.old/components/capstats/README.rst diff --git a/doc/components/pysubnettree/README.rst b/doc.old/components/pysubnettree/README.rst similarity index 100% rename from doc/components/pysubnettree/README.rst rename to doc.old/components/pysubnettree/README.rst diff --git a/doc/components/trace-summary/README.rst b/doc.old/components/trace-summary/README.rst similarity index 100% rename from doc/components/trace-summary/README.rst rename to doc.old/components/trace-summary/README.rst diff --git a/doc/faq.rst b/doc.old/faq.rst similarity index 100% rename from doc/faq.rst rename to doc.old/faq.rst diff --git a/doc/geoip.rst b/doc.old/geoip.rst similarity index 100% rename from doc/geoip.rst rename to doc.old/geoip.rst diff --git a/doc.old/index.rst b/doc.old/index.rst new file mode 100644 index 0000000000..ed14be1dd2 --- /dev/null +++ b/doc.old/index.rst @@ -0,0 +1,90 @@ +.. Bro documentation master file + +================= +Bro Documentation +================= + +Guides +------ + +.. toctree:: + :maxdepth: 1 + + INSTALL + quickstart + upgrade + faq + reporting-problems + +Frameworks +---------- + +.. toctree:: + :maxdepth: 1 + + notice + logging + input + cluster + signatures + +How-Tos +------- + +.. toctree:: + :maxdepth: 1 + + geoip + +Script Reference +---------------- + +.. toctree:: + :maxdepth: 1 + + scripts/packages + scripts/index + scripts/builtins + scripts/bifs + +Other Bro Components +-------------------- + +The following are snapshots of documentation for components that come +with this version of Bro (|version|). Since they can also be used +independently, see the `download page +`_ for documentation of any +current, independent component releases. + +.. toctree:: + :maxdepth: 1 + + BinPAC - A protocol parser generator + Broccoli - The Bro Client Communication Library (README) + Broccoli - User Manual + Broccoli Python Bindings + Broccoli Ruby Bindings + BroControl - Interactive Bro management shell + Bro-Aux - Small auxiliary tools for Bro + BTest - A unit testing framework + Capstats - Command-line packet statistic tool + PySubnetTree - Python module for CIDR lookups + trace-summary - Script for generating break-downs of network traffic + +The `Broccoli API Reference `_ may also be of +interest. + +Other Indices and References +---------------------------- + +* :ref:`General Index ` +* `Notice Index `_ +* :ref:`search` + +Internal References +------------------- + +.. toctree:: + :maxdepth: 1 + + scripts/internal diff --git a/doc/input.rst b/doc.old/input.rst similarity index 100% rename from doc/input.rst rename to doc.old/input.rst diff --git a/doc/logging-dataseries.rst b/doc.old/logging-dataseries.rst similarity index 100% rename from doc/logging-dataseries.rst rename to doc.old/logging-dataseries.rst diff --git a/doc/logging-elasticsearch.rst b/doc.old/logging-elasticsearch.rst similarity index 100% rename from doc/logging-elasticsearch.rst rename to doc.old/logging-elasticsearch.rst diff --git a/doc/logging.rst b/doc.old/logging.rst similarity index 100% rename from doc/logging.rst rename to doc.old/logging.rst diff --git a/doc/notice.rst b/doc.old/notice.rst similarity index 100% rename from doc/notice.rst rename to doc.old/notice.rst diff --git a/doc/quickstart.rst b/doc.old/quickstart.rst similarity index 100% rename from doc/quickstart.rst rename to doc.old/quickstart.rst diff --git a/doc/reporting-problems.rst b/doc.old/reporting-problems.rst similarity index 100% rename from doc/reporting-problems.rst rename to doc.old/reporting-problems.rst diff --git a/doc/signatures.rst b/doc.old/signatures.rst similarity index 100% rename from doc/signatures.rst rename to doc.old/signatures.rst diff --git a/doc/upgrade.rst b/doc.old/upgrade.rst similarity index 100% rename from doc/upgrade.rst rename to doc.old/upgrade.rst diff --git a/doc/INSTALL.rst b/doc/INSTALL.rst deleted file mode 120000 index 99d491b4f8..0000000000 --- a/doc/INSTALL.rst +++ /dev/null @@ -1 +0,0 @@ -../INSTALL \ No newline at end of file diff --git a/doc/LICENSE b/doc/LICENSE new file mode 100644 index 0000000000..88a76c9ec7 --- /dev/null +++ b/doc/LICENSE @@ -0,0 +1,5 @@ +This work is licensed under the Creative Commons +Attribution-NonCommercial 3.0 Unported License. To view a copy of this +license, visit http://creativecommons.org/licenses/by-nc/3.0/ or send +a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain +View, California, 94041, USA. diff --git a/doc/conf.py.in b/doc/conf.py.in index 2e93e82502..e91b48d079 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -12,11 +12,28 @@ import sys, os +extensions = [] + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('sphinx-sources/ext')) +# ----- Begin of BTest configuration. ----- +btest = os.path.abspath("@CMAKE_SOURCE_DIR@/aux/btest") +brocut = os.path.abspath("@CMAKE_SOURCE_DIR@/aux/bro-aux/bro-cut") +bro = os.path.abspath("@CMAKE_SOURCE_DIR@/build/src") + +os.environ["PATH"] += (":%s:%s/sphinx:%s:%s" % (btest, btest, bro, brocut)) +sys.path.append(os.path.join(btest, "sphinx")) + +extensions += ["btest-sphinx"] + +btest_base="@CMAKE_SOURCE_DIR@/testing/btest" +btest_tests="doc/sphinx" +# ----- End of BTest configuration. ----- + + # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -24,7 +41,7 @@ sys.path.insert(0, os.path.abspath('sphinx-sources/ext')) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['bro', 'rst_directive', 'sphinx.ext.todo', 'adapt-toc'] +extensions += ['bro', 'rst_directive', 'sphinx.ext.todo', 'adapt-toc'] # Add any paths that contain templates here, relative to this directory. templates_path = ['sphinx-sources/_templates', 'sphinx-sources/_static'] diff --git a/doc/index.rst b/doc/index.rst index ed14be1dd2..36a38ac0a8 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,90 +1,27 @@ + .. Bro documentation master file ================= Bro Documentation ================= -Guides ------- - .. toctree:: - :maxdepth: 1 + :maxdepth: 2 + :numbered: - INSTALL - quickstart - upgrade - faq - reporting-problems + user-manual/index + reference/index -Frameworks ----------- +Just Testing +============ -.. toctree:: - :maxdepth: 1 +.. code:: bro - notice - logging - input - cluster - signatures + print "Hey Bro!" -How-Tos -------- +.. btest:: test -.. toctree:: - :maxdepth: 1 + @TEST-COPY-FILE: ${TRACES}/wikipedia.trace + @TEST-EXEC: btest-rst-cmd bro -r wikipedia.trace + @TEST-EXEC: btest-rst-cmd "cat http.log | bro-cut ts id.orig_h | head -5" - geoip - -Script Reference ----------------- - -.. toctree:: - :maxdepth: 1 - - scripts/packages - scripts/index - scripts/builtins - scripts/bifs - -Other Bro Components --------------------- - -The following are snapshots of documentation for components that come -with this version of Bro (|version|). Since they can also be used -independently, see the `download page -`_ for documentation of any -current, independent component releases. - -.. toctree:: - :maxdepth: 1 - - BinPAC - A protocol parser generator - Broccoli - The Bro Client Communication Library (README) - Broccoli - User Manual - Broccoli Python Bindings - Broccoli Ruby Bindings - BroControl - Interactive Bro management shell - Bro-Aux - Small auxiliary tools for Bro - BTest - A unit testing framework - Capstats - Command-line packet statistic tool - PySubnetTree - Python module for CIDR lookups - trace-summary - Script for generating break-downs of network traffic - -The `Broccoli API Reference `_ may also be of -interest. - -Other Indices and References ----------------------------- - -* :ref:`General Index ` -* `Notice Index `_ -* :ref:`search` - -Internal References -------------------- - -.. toctree:: - :maxdepth: 1 - - scripts/internal diff --git a/doc/reference/events.rst b/doc/reference/events.rst new file mode 100644 index 0000000000..bcb3adae42 --- /dev/null +++ b/doc/reference/events.rst @@ -0,0 +1,5 @@ + +================ +Events (Missing) +================ + diff --git a/doc/reference/frameworks.rst b/doc/reference/frameworks.rst new file mode 100644 index 0000000000..20824b03bc --- /dev/null +++ b/doc/reference/frameworks.rst @@ -0,0 +1,5 @@ + +==================== +Frameworks (Missing) +==================== + diff --git a/doc/reference/index.rst b/doc/reference/index.rst new file mode 100644 index 0000000000..cba512cd1c --- /dev/null +++ b/doc/reference/index.rst @@ -0,0 +1,13 @@ + +========= +Reference +========= + +.. toctree:: + :maxdepth: 2 + :numbered: + + frameworks.rst + events.rst + language.rst + subsystems.rst diff --git a/doc/reference/language.rst b/doc/reference/language.rst new file mode 100644 index 0000000000..dd50997672 --- /dev/null +++ b/doc/reference/language.rst @@ -0,0 +1,7 @@ + +================== +Language (Missing) +================== + + + diff --git a/doc/reference/subsystems.rst b/doc/reference/subsystems.rst new file mode 100644 index 0000000000..9caafba8b3 --- /dev/null +++ b/doc/reference/subsystems.rst @@ -0,0 +1,4 @@ + +==================== +Subsystems (Missing) +==================== diff --git a/doc/user-manual/index.rst b/doc/user-manual/index.rst new file mode 100644 index 0000000000..971d3e386b --- /dev/null +++ b/doc/user-manual/index.rst @@ -0,0 +1,12 @@ + +=========== +User Manual +=========== + +.. toctree:: + :maxdepth: 2 + :numbered: + + intro.rst + starting.rst + diff --git a/doc/user-manual/intro.rst b/doc/user-manual/intro.rst new file mode 100644 index 0000000000..c7a210747d --- /dev/null +++ b/doc/user-manual/intro.rst @@ -0,0 +1,4 @@ + +====================== +Introduction (Missing) +====================== diff --git a/doc/user-manual/starting.rst b/doc/user-manual/starting.rst new file mode 100644 index 0000000000..f25746a533 --- /dev/null +++ b/doc/user-manual/starting.rst @@ -0,0 +1,4 @@ + +========================= +Getting Started (Missing) +========================= diff --git a/testing/btest/Baseline/doc.sphinx.test/btest-doc.sphinx.test.rst b/testing/btest/Baseline/doc.sphinx.test/btest-doc.sphinx.test.rst new file mode 100644 index 0000000000..6b59bf64a2 --- /dev/null +++ b/testing/btest/Baseline/doc.sphinx.test/btest-doc.sphinx.test.rst @@ -0,0 +1,13 @@ +.. code-block:: none + + # bro -r wikipedia.trace + +.. code-block:: none + + # cat http.log | bro-cut ts id.orig_h | head -5 + 1300475168.843894 141.142.220.118 + 1300475168.975800 141.142.220.118 + 1300475168.976327 141.142.220.118 + 1300475168.979160 141.142.220.118 + 1300475169.012666 141.142.220.118 + diff --git a/testing/btest/btest.cfg b/testing/btest/btest.cfg index d86b45d8a9..021121760a 100644 --- a/testing/btest/btest.cfg +++ b/testing/btest/btest.cfg @@ -4,6 +4,7 @@ TmpDir = %(testbase)s/.tmp BaselineDir = %(testbase)s/Baseline IgnoreDirs = .svn CVS .tmp IgnoreFiles = *.tmp *.swp #* *.trace .DS_Store +Finalizer = btest-diff-rst [environment] BROPATH=`bash -c %(testbase)s/../../build/bro-path-dev` @@ -11,7 +12,7 @@ BRO_SEED_FILE=%(testbase)s/random.seed TZ=UTC LC_ALL=C BTEST_PATH=%(testbase)s/../../aux/btest -PATH=%(testbase)s/../../build/src:%(testbase)s/../scripts:%(testbase)s/../../aux/btest:%(default_path)s +PATH=%(testbase)s/../../build/src:%(testbase)s/../scripts:%(testbase)s/../../aux/btest:%(testbase)s/../../aux/btest/sphinx:%(default_path)s TRACES=%(testbase)s/Traces SCRIPTS=%(testbase)s/../scripts DIST=%(testbase)s/../.. diff --git a/testing/btest/doc/sphinx/test.btest b/testing/btest/doc/sphinx/test.btest new file mode 100644 index 0000000000..f2f1bcff53 --- /dev/null +++ b/testing/btest/doc/sphinx/test.btest @@ -0,0 +1,3 @@ +@TEST-COPY-FILE: ${TRACES}/wikipedia.trace +@TEST-EXEC: btest-rst-cmd bro -r wikipedia.trace +@TEST-EXEC: btest-rst-cmd "cat http.log | bro-cut ts id.orig_h | head -5"