Commit 4105a488 authored by Gervase Markham's avatar Gervase Markham Committed by Gervase Markham

Bug 912064 - convert docs to ReStructured Text (.rst) format. r,a=justdave.

parent 22c96de3
.htaccess
/lib/*
/template/en/custom
/docs/bugzilla.ent
/docs/en/xml/bugzilla.ent
/docs/en/txt
/docs/definitions.rst
/docs/en/html
/docs/en/pdf
/docs/en/txt
/docs/en/latex
/docs/en/doctrees
/skins/custom
/graphs
/data
......
RST files:
* Produce simple style guide and canonicalise usages to follow it
* Get rid of, or use proper Sphinx markup for, glossary
HTML Output:
* Styling for Cautions and Tips
* Stop replacement of "--" with em-dash
* Auto-highlighter thinks # in "bash#" is a comment char
* Style definition lists to have the term in bold
* Fix bug lifecycle image original doc link
<!ENTITY bz-ver "4.5.1">
<!ENTITY bz-date "2013-10-16">
<!ENTITY current-year "2013">
<!ENTITY min-perl-ver "5.10.1">
<!ENTITY landfillbase "http://landfill.bugzilla.org/bugzilla-tip/">
<!ENTITY bzg-bugs "http://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla;component=Documentation">
.. |min-perl-ver| replace:: 5.10.1
.. |landfillbase| replace:: http://landfill.bugzilla.org/bugzilla-tip/
.. |bzg-bugs| replace:: http://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&component=Documentation
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = .
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) rst
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) rst
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Bugzilla.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Bugzilla.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Bugzilla"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Bugzilla"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/txt
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/txt."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
Welcome to the Bugzilla documentation project!
You'll find these directories and files here:
README.docs # This README file
html/ # The compiled HTML docs from XML sources (do not edit)
txt/ # The compiled text docs from XML sources (do not edit)
pdf/ # The compiled PDF docs from XML sources (do not edit)
xml/ # The original XML doc sources (edit these)
A note about the XML:
The documentation is written in DocBook 4.2, and attempts to adhere
to the LinuxDoc standards where applicable (http://www.tldp.org).
If you need to edit the documentation, feel free to use any text editor
to make the changes. XML is not rocket science -- simply make sure your
text appears between appropriate tags (like <para>This is a paragraph</para>)
and we'll be fine. If you are making more extensive changes, please ensure
you at least validate your XML before checking it in by running makedocs.pl.
Thanks for taking the time to read these notes and consulting the
documentation. Please address comments and questions to the newsgroup:
news://news.mozilla.org/mozilla.support.bugzilla.
==========
HOW TO SET UP YOUR OWN XML EDITING ENVIRONMENT:
==========
All you need to compile the documentation are the xmlto and dblatex
scripts. All major Linux distributions have these packages and so
it's very easy to install them. If these packages are correctly configured,
all required dependencies such as xsltproc and pdftex will be installed
at the same time, and so you don't have to worry about them.
Once these applications are installed, all you need to do to compile
the documentation is to run either:
makedocs.pl
to compile the documentation in HTML and text formats only, or:
makedocs.pl --with-pdf
to also compile the documentation in PDF format.
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=.
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% rst
set I18NSPHINXOPTS=%SPHINXOPTS% rst
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Bugzilla.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Bugzilla.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/txt
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/txt.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
:end
@import 'default.css';
dt { font-weight: bold; }
.. _about:
================
About This Guide
================
.. _introduction:
Introduction
############
This is the documentation for version |version| of Bugzilla, a
bug-tracking system from mozilla.org.
Bugzilla is an enterprise-class piece of software
that tracks millions of bugs and issues for hundreds of
organizations around the world.
The most current version of this document can always be found on the
`Bugzilla
Documentation Page <http://www.bugzilla.org/docs/>`_.
.. _copyright:
Copyright Information
#####################
This document is copyright (c) 2000-2012 by the various
Bugzilla contributors who wrote it.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.1 or any later version published by the
Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and with no Back-Cover Texts. A copy of
the license is included in :ref:`gfdl`.
If you have any questions regarding this document, its
copyright, or publishing this document in non-electronic form,
please contact the Bugzilla Team.
.. _disclaimer:
Disclaimer
##########
No liability for the contents of this document can be accepted.
Follow the instructions herein at your own risk.
This document may contain errors
and inaccuracies that may damage your system, cause your partner
to leave you, your boss to fire you, your cats to
pee on your furniture and clothing, and global thermonuclear
war. Proceed with caution.
Naming of particular products or brands should not be seen as
endorsements, with the exception of the term "GNU/Linux". We
wholeheartedly endorse the use of GNU/Linux; it is an extremely
versatile, stable,
and robust operating system that offers an ideal operating
environment for Bugzilla.
Although the Bugzilla development team has taken great care to
ensure that all exploitable bugs have been fixed, security holes surely
exist in any piece of code. Great care should be taken both in
the installation and usage of this software. The Bugzilla development
team members assume no liability for your use of Bugzilla. You have
the source code, and are responsible for auditing it yourself to ensure
your security needs are met.
.. COMMENT: Section 2: New Versions
.. _newversions:
New Versions
############
This is version |version| of The Bugzilla Guide. It is so named
to match the current version of Bugzilla.
.. todo:: BZ-DEVEL This version of the guide, like its associated Bugzilla version, is a
development version.
The latest version of this guide can always be found at `<http://www.bugzilla.org/docs/>`_. However, you should read
the version which came with the Bugzilla release you are using.
In addition, there are Bugzilla template localization projects in
`several languages <http://www.bugzilla.org/download/#localizations>`_.
They may have translated documentation available. If you would like to
volunteer to translate the Guide into additional languages, please visit the
`Bugzilla L10n team <https://wiki.mozilla.org/Bugzilla:L10n>`_
page.
.. _credits:
Credits
#######
The people listed below have made enormous contributions to the
creation of this Guide, through their writing, dedicated hacking efforts,
numerous e-mail and IRC support sessions, and overall excellent
contribution to the Bugzilla community:
.. COMMENT: TODO: This is evil... there has to be a valid way to get this look
Matthew P. Barnson mbarnson@sisna.com
for the Herculean task of pulling together the Bugzilla Guide
and shepherding it to 2.14.
Terry Weissman terry@mozilla.org
for initially writing Bugzilla and creating the README upon
which the UNIX installation documentation is largely based.
Tara Hernandez tara@tequilarists.org
for keeping Bugzilla development going strong after Terry left
mozilla.org and for running landfill.
Dave Lawrence dkl@redhat.com
for providing insight into the key differences between Red
Hat's customized Bugzilla.
Dawn Endico endico@mozilla.org
for being a hacker extraordinaire and putting up with Matthew's
incessant questions and arguments on irc.mozilla.org in #mozwebtools
Jacob Steenhagen jake@bugzilla.org
for taking over documentation during the 2.17 development
period.
Dave Miller justdave@bugzilla.org
for taking over as project lead when Tara stepped down and
continually pushing for the documentation to be the best it can be.
Thanks also go to the following people for significant contributions
to this documentation:
Kevin Brannen, Vlad Dascalu, Ben FrantzDale, Eric Hanson, Zach Lipton, Gervase Markham, Andrew Pearson, Joe Robins, Spencer Smith, Ron Teitelbaum, Shane Travis, Martin Wulffeld.
Also, thanks are due to the members of the
`mozilla.support.bugzilla <news://news.mozilla.org/mozilla.support.bugzilla>`_
newsgroup (and its predecessor, netscape.public.mozilla.webtools).
Without your discussions, insight, suggestions, and patches,
this could never have happened.
.. _conventions:
Document Conventions
####################
This document uses the following conventions:
.. caution:: This is a caution. Make sure to read this to not be in trouble!
.. tip:: This is a hint or tip, especially about some configuration tweaks.
.. note:: This is just a note, for your information.
.. warning:: This is a warning, something you should take care of.
A filename or a path to a filename is displayed like this:
:file:`/path/to/filename.ext`
A command to type in the shell is displayed like this:
:command:`command --arguments`
bash$ represents a normal user's prompt under bash shell
bash# represents a root user's prompt under bash shell
A word which is in the glossary will appear like this:
Bugzilla
A sample of code is illustrated like this:
::
First Line of Code
Second Line of Code
...
This documentation is maintained in ReStructured Text format.
Changes are best submitted as diffs, attached
to a bug filed in the `Bugzilla Documentation <https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla;component=Documentation>`_
component.
# -*- coding: utf-8 -*-
#
# Bugzilla documentation build configuration file, created by
# sphinx-quickstart on Tue Sep 3 16:11:00 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# 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('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.todo']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Bugzilla'
copyright = u'2013, The Bugzilla Team'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '4.5'
# The full version, including alpha/beta/rc tags.
release = '4.5'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'Bugzilladoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Bugzilla.tex', u'Bugzilla Documentation',
u'The Bugzilla Team', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'bugzilla', u'Bugzilla Documentation',
[u'The Bugzilla Team'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Bugzilla', u'Bugzilla Documentation',
u'The Bugzilla Team', 'Bugzilla', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
definitions = "../../definitions.rst"
if os.path.exists(definitions):
execfile(definitions)
.. Bugzilla documentation master file, created by
sphinx-quickstart on Tue Sep 3 16:11:00 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Bugzilla Documentation
======================
Contents:
.. toctree::
:maxdepth: 3
:numbered:
about
installation
administration
security
using
customization
troubleshooting
patches
modules
gfdl
glossary
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`
.. _install-perlmodules-manual:
===================================
Manual Installation of Perl Modules
===================================
.. _modules-manual-instructions:
Instructions
############
If you need to install Perl modules manually, here's how it's done.
Download the module using the link given in the next section, and then
apply this magic incantation, as root:
::
bash# tar -xzvf <module>.tar.gz
bash# cd <module>
bash# perl Makefile.PL
bash# make
bash# make test
bash# make install
.. note:: In order to compile source code under Windows you will need to obtain
a 'make' utility. The :command:`nmake` utility provided with
Microsoft Visual C++ may be used. As an alternative, there is a
utility called :command:`dmake` available from CPAN which is
written entirely in Perl.
As described in :ref:`modules-manual-download`, however, most
packages already exist and are available from ActiveState or theory58S.
We highly recommend that you install them using the ppm GUI available with
ActiveState and to add the theory58S repository to your list of repositories.
.. _modules-manual-download:
Download Locations
##################
.. note:: Running Bugzilla on Windows requires the use of ActiveState
Perl |min-perl-ver| or higher. Many modules already exist in the core
distribution of ActiveState Perl. Additional modules can be downloaded
from `<http://cpan.uwinnipeg.ca/PPMPackages/10xx/>`_
if you use Perl |min-perl-ver|.
CGI:
::
CPAN Download Page: `<http://search.cpan.org/dist/CGI.pm/>`_
Documentation: `<http://perldoc.perl.org/CGI.html>`_
Data-Dumper:
::
CPAN Download Page: `<http://search.cpan.org/dist/Data-Dumper/>`_
Documentation: `<http://search.cpan.org/dist/Data-Dumper/Dumper.pm>`_
Date::Format (part of TimeDate):
::
CPAN Download Page: `<http://search.cpan.org/dist/TimeDate/>`_
Documentation: `<http://search.cpan.org/dist/TimeDate/lib/Date/Format.pm>`_
DBI:
::
CPAN Download Page: `<http://search.cpan.org/dist/DBI/>`_
Documentation: `<http://dbi.perl.org/docs/>`_
DBD::mysql:
::
CPAN Download Page: `<http://search.cpan.org/dist/DBD-mysql/>`_
Documentation: `<http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm>`_
DBD::Pg:
::
CPAN Download Page: `<http://search.cpan.org/dist/DBD-Pg/>`_
Documentation: `<http://search.cpan.org/dist/DBD-Pg/Pg.pm>`_
Template-Toolkit:
::
CPAN Download Page: `<http://search.cpan.org/dist/Template-Toolkit/>`_
Documentation: `<http://www.template-toolkit.org/docs.html>`_
GD:
::
CPAN Download Page: `<http://search.cpan.org/dist/GD/>`_
Documentation: `<http://search.cpan.org/dist/GD/GD.pm>`_
Template::Plugin::GD:
::
CPAN Download Page: `<http://search.cpan.org/dist/Template-GD/>`_
Documentation: `<http://www.template-toolkit.org/docs/aqua/Modules/index.html>`_
MIME::Parser (part of MIME-tools):
::
CPAN Download Page: `<http://search.cpan.org/dist/MIME-tools/>`_
Documentation: `<http://search.cpan.org/dist/MIME-tools/lib/MIME/Parser.pm>`_
.. _modules-manual-optional:
Optional Modules
################
Chart::Lines:
::
CPAN Download Page: `<http://search.cpan.org/dist/Chart/>`_
Documentation: `<http://search.cpan.org/dist/Chart/Chart.pod>`_
GD::Graph:
::
CPAN Download Page: `<http://search.cpan.org/dist/GDGraph/>`_
Documentation: `<http://search.cpan.org/dist/GDGraph/Graph.pm>`_
GD::Text::Align (part of GD::Text::Util):
::
CPAN Download Page: `<http://search.cpan.org/dist/GDTextUtil/>`_
Documentation: `<http://search.cpan.org/dist/GDTextUtil/Text/Align.pm>`_
XML::Twig:
::
CPAN Download Page: `<http://search.cpan.org/dist/XML-Twig/>`_
Documentation: `<http://standards.ieee.org/resources/spasystem/twig/twig_stable.html>`_
PatchReader:
::
CPAN Download Page: `<http://search.cpan.org/author/JKEISER/PatchReader/>`_
Documentation: `<http://www.johnkeiser.com/mozilla/Patch_Viewer.html>`_
.. _patches:
=======
Contrib
=======
There are a number of unofficial Bugzilla add-ons in the
:file:`$BUGZILLA_ROOT/contrib/`
directory. This section documents them.
.. _cmdline:
Command-line Search Interface
#############################
There are a suite of Unix utilities for searching Bugzilla from the
command line. They live in the
:file:`contrib/cmdline` directory.
There are three files - :file:`query.conf`,
:file:`buglist` and :file:`bugs`.
.. warning:: These files pre-date the templatization work done as part of the
2.16 release, and have not been updated.
:file:`query.conf` contains the mapping from
options to field names and comparison types. Quoted option names
are ``grepped`` for, so it should be easy to edit this
file. Comments (#) have no effect; you must make sure these lines
do not contain any quoted ``option``.
:file:`buglist` is a shell script that submits a
Bugzilla query and writes the resulting HTML page to stdout.
It supports both short options, (such as ``-Afoo``
or ``-Rbar``) and long options (such
as ``--assignedto=foo`` or ``--reporter=bar``).
If the first character of an option is not ``-``, it is
treated as if it were prefixed with ``--default=``.
The column list is taken from the COLUMNLIST environment variable.
This is equivalent to the ``Change Columns`` option
that is available when you list bugs in buglist.cgi. If you have
already used Bugzilla, grep for COLUMNLIST in your cookies file
to see your current COLUMNLIST setting.
:file:`bugs` is a simple shell script which calls
:file:`buglist` and extracts the
bug numbers from the output. Adding the prefix
``http://bugzilla.mozilla.org/buglist.cgi?bug_id=``
turns the bug list into a working link if any bugs are found.
Counting bugs is easy. Pipe the results through
:command:`sed -e 's/,/ /g' | wc | awk '{printf $2 "\\n"}'`
Akkana Peck says she has good results piping
:file:`buglist` output through
:command:`w3m -T text/html -dump`
.. _cmdline-bugmail:
Command-line 'Send Unsent Bug-mail' tool
########################################
Within the :file:`contrib` directory
exists a utility with the descriptive (if compact) name
of :file:`sendunsentbugmail.pl`. The purpose of this
script is, simply, to send out any bug-related mail that should
have been sent by now, but for one reason or another has not.
To accomplish this task, :file:`sendunsentbugmail.pl` uses
the same mechanism as the :file:`sanitycheck.cgi` script;
it scans through the entire database looking for bugs with changes that
were made more than 30 minutes ago, but where there is no record of
anyone related to that bug having been sent mail. Having compiled a list,
it then uses the standard rules to determine who gets mail, and sends it
out.
As the script runs, it indicates the bug for which it is currently
sending mail; when it has finished, it gives a numerical count of how
many mails were sent and how many people were excluded. (Individual
user names are not recorded or displayed.) If the script produces
no output, that means no unsent mail was detected.
*Usage*: move the sendunsentbugmail.pl script
up into the main directory, ensure it has execute permission, and run it
from the command line (or from a cron job) with no parameters.
.. _security:
=================
Bugzilla Security
=================
While some of the items in this chapter are related to the operating
system Bugzilla is running on or some of the support software required to
run Bugzilla, it is all related to protecting your data. This is not
intended to be a comprehensive guide to securing Linux, Apache, MySQL, or
any other piece of software mentioned. There is no substitute for active
administration and monitoring of a machine. The key to good security is
actually right in the middle of the word: *U R It*.
While programmers in general always strive to write secure code,
accidents can and do happen. The best approach to security is to always
assume that the program you are working with isn't 100% secure and restrict
its access to other parts of your machine as much as possible.
.. _security-os:
Operating System
################
.. _security-os-ports:
TCP/IP Ports
============
.. COMMENT: TODO: Get exact number of ports
The TCP/IP standard defines more than 65,000 ports for sending
and receiving traffic. Of those, Bugzilla needs exactly one to operate
(different configurations and options may require up to 3). You should
audit your server and make sure that you aren't listening on any ports
you don't need to be. It's also highly recommended that the server
Bugzilla resides on, along with any other machines you administer, be
placed behind some kind of firewall.
.. _security-os-accounts:
System User Accounts
====================
Many daemons, such
as Apache's :file:`httpd` or MySQL's
:file:`mysqld`, run as either ``root`` or
``nobody``. This is even worse on Windows machines where the
majority of services
run as ``SYSTEM``. While running as ``root`` or
``SYSTEM`` introduces obvious security concerns, the
problems introduced by running everything as ``nobody`` may
not be so obvious. Basically, if you run every daemon as
``nobody`` and one of them gets compromised it can
compromise every other daemon running as ``nobody`` on your
machine. For this reason, it is recommended that you create a user
account for each daemon.
.. note:: You will need to set the ``webservergroup`` option
in :file:`localconfig` to the group your web server runs
as. This will allow :file:`./checksetup.pl` to set file
permissions on Unix systems so that nothing is world-writable.
.. _security-os-chroot:
The :file:`chroot` Jail
=======================
If your system supports it, you may wish to consider running
Bugzilla inside of a :file:`chroot` jail. This option
provides unprecedented security by restricting anything running
inside the jail from accessing any information outside of it. If you
wish to use this option, please consult the documentation that came
with your system.
.. _security-webserver:
Web server
##########
.. _security-webserver-access:
Disabling Remote Access to Bugzilla Configuration Files
=======================================================
There are many files that are placed in the Bugzilla directory
area that should not be accessible from the web server. Because of the way
Bugzilla is currently layed out, the list of what should and should not
be accessible is rather complicated. A quick way is to run
:file:`testserver.pl` to check if your web server serves
Bugzilla files as expected. If not, you may want to follow the few
steps below.
.. tip:: Bugzilla ships with the ability to create :file:`.htaccess`
files that enforce these rules. Instructions for enabling these
directives in Apache can be found in :ref:`http-apache`
- In the main Bugzilla directory, you should:
- Block: :file:`*.pl`, :file:`*localconfig*`
- In :file:`data`:
- Block everything
- In :file:`data/webdot`:
- If you use a remote webdot server:
- Block everything
- But allow :file:`*.dot`
only for the remote webdot server
- Otherwise, if you use a local GraphViz:
- Block everything
- But allow: :file:`*.png`, :file:`*.gif`, :file:`*.jpg`, :file:`*.map`
- And if you don't use any dot:
- Block everything
- In :file:`Bugzilla`:
- Block everything
- In :file:`template`:
- Block everything
Be sure to test that data that should not be accessed remotely is
properly blocked. Of particular interest is the localconfig file which
contains your database password. Also, be aware that many editors
create temporary and backup files in the working directory and that
those should also not be accessible. For more information, see
`bug 186383 <http://bugzilla.mozilla.org/show_bug.cgi?id=186383>`_
or
`Bugtraq ID 6501 <http://online.securityfocus.com/bid/6501>`_.
To test, simply run :file:`testserver.pl`, as said above.
.. tip:: Be sure to check :ref:`http` for instructions
specific to the web server you use.
.. _security-bugzilla:
Bugzilla
########
.. _security-bugzilla-charset:
Prevent users injecting malicious Javascript
============================================
If you installed Bugzilla version 2.22 or later from scratch,
then the *utf8* parameter is switched on by default.
This makes Bugzilla explicitly set the character encoding, following
`a
CERT advisory <http://www.cert.org/tech_tips/malicious_code_mitigation.html#3>`_ recommending exactly this.
The following therefore does not apply to you; just keep
*utf8* turned on.
If you've upgraded from an older version, then it may be possible
for a Bugzilla user to take advantage of character set encoding
ambiguities to inject HTML into Bugzilla comments.
This could include malicious scripts.
This is because due to internationalization concerns, we are unable to
turn the *utf8* parameter on by default for upgraded
installations.
Turning it on manually will prevent this problem.
.. _troubleshooting:
===============
Troubleshooting
===============
This section gives solutions to common Bugzilla installation
problems. If none of the section headings seems to match your
problem, read the general advice.
.. _general-advice:
General Advice
##############
If you can't get :file:`checksetup.pl` to run to
completion, it normally explains what's wrong and how to fix it.
If you can't work it out, or if it's being uncommunicative, post
the errors in the
`mozilla.support.bugzilla <news://news.mozilla.org/mozilla.support.bugzilla>`_
newsgroup.
If you have made it all the way through
:ref:`installation` (Installation) and
:ref:`configuration` (Configuration) but accessing the Bugzilla
URL doesn't work, the first thing to do is to check your web server error
log. For Apache, this is often located at
:file:`/etc/logs/httpd/error_log`. The error messages
you see may be self-explanatory enough to enable you to diagnose and
fix the problem. If not, see below for some commonly-encountered
errors. If that doesn't help, post the errors to the newsgroup.
Bugzilla can also log all user-based errors (and many code-based errors)
that occur, without polluting the web server's error log. To enable
Bugzilla error logging, create a file that Bugzilla can write to, named
:file:`errorlog`, in the Bugzilla :file:`data`
directory. Errors will be logged as they occur, and will include the type
of the error, the IP address and username (if available) of the user who
triggered the error, and the values of all environment variables; if a
form was being submitted, the data in the form will also be included.
To disable error logging, delete or rename the
:file:`errorlog` file.
.. _trbl-testserver:
The Apache web server is not serving Bugzilla pages
###################################################
After you have run :command:`checksetup.pl` twice,
run :command:`testserver.pl http://yoursite.yourdomain/yoururl`
to confirm that your web server is configured properly for
Bugzilla.
::
bash$ ./testserver.pl http://landfill.bugzilla.org/bugzilla-tip
TEST-OK Webserver is running under group id in $webservergroup.
TEST-OK Got ant picture.
TEST-OK Webserver is executing CGIs.
TEST-OK Webserver is preventing fetch of http://landfill.bugzilla.org/bugzilla-tip/localconfig.
.. _trbl-perlmodule:
I installed a Perl module, but :file:`checksetup.pl` claims it's not installed!
###############################################################################
This could be caused by one of two things:
#. You have two versions of Perl on your machine. You are installing
modules into one, and Bugzilla is using the other. Rerun the CPAN
commands (or manual compile) using the full path to Perl from the
top of :file:`checksetup.pl`. This will make sure you
are installing the modules in the right place.
#. The permissions on your library directories are set incorrectly.
They must, at the very least, be readable by the web server user or
group. It is recommended that they be world readable.
.. _trbl-dbdSponge:
DBD::Sponge::db prepare failed
##############################
The following error message may appear due to a bug in DBD::mysql
(over which the Bugzilla team have no control):
::
DBD::Sponge::db prepare failed: Cannot determine NUM_OF_FIELDS at D:/Perl/site/lib/DBD/mysql.pm line 248.
SV = NULL(0x0) at 0x20fc444
REFCNT = 1
FLAGS = (PADBUSY,PADMY)
To fix this, go to
:file:`<path-to-perl>/lib/DBD/sponge.pm`
in your Perl installation and replace
::
my $numFields;
if ($attribs->{'NUM_OF_FIELDS'}) {
$numFields = $attribs->{'NUM_OF_FIELDS'};
} elsif ($attribs->{'NAME'}) {
$numFields = @{$attribs->{NAME}};
with
::
my $numFields;
if ($attribs->{'NUM_OF_FIELDS'}) {
$numFields = $attribs->{'NUM_OF_FIELDS'};
} elsif ($attribs->{'NAMES'}) {
$numFields = @{$attribs->{NAMES}};
(note the S added to NAME.)
.. _paranoid-security:
cannot chdir(/var/spool/mqueue)
###############################
If you are installing Bugzilla on SuSE Linux, or some other
distributions with ``paranoid`` security options, it is
possible that the checksetup.pl script may fail with the error:
::
cannot chdir(/var/spool/mqueue): Permission denied
This is because your :file:`/var/spool/mqueue`
directory has a mode of ``drwx------``.
Type :command:`chmod 755 :file:`/var/spool/mqueue``
as root to fix this problem. This will allow any process running on your
machine the ability to *read* the
:file:`/var/spool/mqueue` directory.
.. _trbl-relogin-everyone:
Everybody is constantly being forced to relogin
###############################################
The most-likely cause is that the ``cookiepath`` parameter
is not set correctly in the Bugzilla configuration. You can change this (if
you're a Bugzilla administrator) from the editparams.cgi page via the web interface.
The value of the cookiepath parameter should be the actual directory
containing your Bugzilla installation, *as seen by the end-user's
web browser*. Leading and trailing slashes are mandatory. You can
also set the cookiepath to any directory which is a parent of the Bugzilla
directory (such as '/', the root directory). But you can't put something
that isn't at least a partial match or it won't work. What you're actually
doing is restricting the end-user's browser to sending the cookies back only
to that directory.
How do you know if you want your specific Bugzilla directory or the
whole site?
If you have only one Bugzilla running on the server, and you don't
mind having other applications on the same server with it being able to see
the cookies (you might be doing this on purpose if you have other things on
your site that share authentication with Bugzilla), then you'll want to have
the cookiepath set to "/", or to a sufficiently-high enough directory that
all of the involved apps can see the cookies.
.. _trbl-relogin-everyone-share:
Examples of urlbase/cookiepath pairs for sharing login cookies
==============================================================
| urlbase is http://bugzilla.mozilla.org/
| cookiepath is /
| urlbase is http://tools.mysite.tld/bugzilla/
| but you have http://tools.mysite.tld/someotherapp/ which shares
| authentication with your Bugzilla
|
| cookiepath is /
On the other hand, if you have more than one Bugzilla running on the
server (some people do - we do on landfill) then you need to have the
cookiepath restricted enough so that the different Bugzillas don't
confuse their cookies with one another.
.. _trbl-relogin-everyone-restrict:
Examples of urlbase/cookiepath pairs to restrict the login cookie
=================================================================
| urlbase is http://landfill.bugzilla.org/bugzilla-tip/
| cookiepath is /bugzilla-tip/
| urlbase is http://landfill.bugzilla.org/bugzilla-4.0-branch/
| cookiepath is /bugzilla-4.0-branch/
If you had cookiepath set to ``/`` at any point in the
past and need to set it to something more restrictive
(i.e. ``/bugzilla/``), you can safely do this without
requiring users to delete their Bugzilla-related cookies in their
browser (this is true starting with Bugzilla 2.18 and Bugzilla 2.16.5).
.. _trbl-index:
:file:`index.cgi` doesn't show up unless specified in the URL
#############################################################
You probably need to set up your web server in such a way that it
will serve the index.cgi page as an index page.
If you are using Apache, you can do this by adding
:file:`index.cgi` to the end of the
``DirectoryIndex`` line
as mentioned in :ref:`http-apache`.
.. _trbl-passwd-encryption:
checksetup.pl reports "Client does not support authentication protocol requested by server..."
##############################################################################################
This error is occurring because you are using the new password
encryption that comes with MySQL 4.1, while your
:file:`DBD::mysql` module was compiled against an
older version of MySQL. If you recompile :file:`DBD::mysql`
against the current MySQL libraries (or just obtain a newer version
of this module) then the error may go away.
If that does not fix the problem, or if you cannot recompile the
existing module (e.g. you're running Windows) and/or don't want to
replace it (e.g. you want to keep using a packaged version), then a
workaround is available from the MySQL docs:
`<http://dev.mysql.com/doc/mysql/en/Old_client.html>`_
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % myents SYSTEM "bugzilla.ent">
%myents;
]>
<!-- Coding standards for this document
* Other than the GFDL, please use the "section" tag instead of "sect1",
"sect2", etc.
* Use Entities to include files for new chapters in Bugzilla-Guide.xml.
* Try to use Entities for frequently-used passages of text as well.
* Ensure all documents compile cleanly to HTML after modification.
The warning, "DTDDECL catalog types not supported" is normal.
* Try to index important terms wherever possible.
* Use "glossterm" whenever you introduce a new term.
* Follow coding standards at http://www.tldp.org, and
check out the KDE guidelines (they are nice, too)
http://i18n.kde.org/doc/markup.html
* All tags should be lowercase.
* Please use sensible spacing. The comments at the very end of each
file define reasonable defaults for PSGML mode in EMACS.
* Double-indent tags, use double spacing whenever possible, and
try to avoid clutter and feel free to waste space in the code to make it
more readable.
-->
<book id="index">
<!-- Header -->
<bookinfo>
<title>The Bugzilla Guide - &bz-ver;
<!-- BZ-DEVEL -->Development <!-- /BZ-DEVEL -->
Release</title>
<authorgroup>
<corpauthor>The Bugzilla Team</corpauthor>
</authorgroup>
<pubdate>&bz-date;</pubdate>
<abstract>
<para>
This is the documentation for Bugzilla, a
bug-tracking system from mozilla.org.
Bugzilla is an enterprise-class piece of software
that tracks millions of bugs and issues for hundreds of
organizations around the world.
</para>
<para>
The most current version of this document can always be found on the
<ulink url="http://www.bugzilla.org/docs/">Bugzilla
Documentation Page</ulink>.
</para>
</abstract>
<keywordset>
<keyword>Bugzilla</keyword>
<keyword>Guide</keyword>
<keyword>installation</keyword>
<keyword>FAQ</keyword>
<keyword>administration</keyword>
<keyword>integration</keyword>
<keyword>MySQL</keyword>
<keyword>Mozilla</keyword>
<keyword>webtools</keyword>
</keywordset>
</bookinfo>
<!-- About This Guide -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="about.xml"/>
<!-- Installing Bugzilla -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installation.xml"/>
<!-- Administering Bugzilla -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="administration.xml"/>
<!-- Securing Bugzilla -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="security.xml"/>
<!-- Using Bugzilla -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="using.xml"/>
<!-- Customizing Bugzilla -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="customization.xml"/>
<!-- Appendix: Troubleshooting -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="troubleshooting.xml"/>
<!-- Appendix: Custom Patches -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patches.xml"/>
<!-- Appendix: Manually Installing Perl Modules -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules.xml"/>
<!-- Appendix: GNU Free Documentation License -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gfdl.xml"/>
<!-- Glossary -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glossary.xml"/>
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t
sgml-indent-step:2
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-minimize-attributes:nil
sgml-namecase-general:t
sgml-omittag:t
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
sgml-shorttag:t
sgml-tag-region-if-active:t
End:
-->
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % myents SYSTEM "bugzilla.ent">
%myents;
]>
<chapter id="about">
<title>About This Guide</title>
<section id="copyright">
<title>Copyright Information</title>
<para>This document is copyright (c) 2000-&current-year; by the various
Bugzilla contributors who wrote it.</para>
<blockquote>
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.1 or any later version published by the
Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and with no Back-Cover Texts. A copy of
the license is included in <xref linkend="gfdl"/>.
</para>
</blockquote>
<para>
If you have any questions regarding this document, its
copyright, or publishing this document in non-electronic form,
please contact the Bugzilla Team.
</para>
</section>
<section id="disclaimer">
<title>Disclaimer</title>
<para>
No liability for the contents of this document can be accepted.
Follow the instructions herein at your own risk.
This document may contain errors
and inaccuracies that may damage your system, cause your partner
to leave you, your boss to fire you, your cats to
pee on your furniture and clothing, and global thermonuclear
war. Proceed with caution.
</para>
<para>
Naming of particular products or brands should not be seen as
endorsements, with the exception of the term "GNU/Linux". We
wholeheartedly endorse the use of GNU/Linux; it is an extremely
versatile, stable,
and robust operating system that offers an ideal operating
environment for Bugzilla.
</para>
<para>
Although the Bugzilla development team has taken great care to
ensure that all exploitable bugs have been fixed, security holes surely
exist in any piece of code. Great care should be taken both in
the installation and usage of this software. The Bugzilla development
team members assume no liability for your use of Bugzilla. You have
the source code, and are responsible for auditing it yourself to ensure
your security needs are met.
</para>
</section>
<!-- Section 2: New Versions -->
<section id="newversions">
<title>New Versions</title>
<para>
This is the &bz-ver; version of The Bugzilla Guide. It is so named
to match the current version of Bugzilla.
<!-- BZ-DEVEL --> This version of the guide, like its associated Bugzilla version, is a
development version.<!-- /BZ-DEVEL -->
</para>
<para>
The latest version of this guide can always be found at <ulink
url="http://www.bugzilla.org/docs/"/>. However, you should read
the version which came with the Bugzilla release you are using.
</para>
<para>
In addition, there are Bugzilla template localization projects in
<ulink url="http://www.bugzilla.org/download/#localizations">several languages</ulink>.
They may have translated documentation available. If you would like to
volunteer to translate the Guide into additional languages, please visit the
<ulink url="https://wiki.mozilla.org/Bugzilla:L10n">Bugzilla L10n team</ulink>
page.
</para>
</section>
<section id="credits">
<title>Credits</title>
<para>
The people listed below have made enormous contributions to the
creation of this Guide, through their writing, dedicated hacking efforts,
numerous e-mail and IRC support sessions, and overall excellent
contribution to the Bugzilla community:
</para>
<!-- TODO: This is evil... there has to be a valid way to get this look -->
<variablelist>
<varlistentry>
<term>Matthew P. Barnson <email>mbarnson@sisna.com</email></term>
<listitem>
<para>for the Herculean task of pulling together the Bugzilla Guide
and shepherding it to 2.14.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Terry Weissman <email>terry@mozilla.org</email></term>
<listitem>
<para>for initially writing Bugzilla and creating the README upon
which the UNIX installation documentation is largely based.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Tara Hernandez <email>tara@tequilarists.org</email></term>
<listitem>
<para>for keeping Bugzilla development going strong after Terry left
mozilla.org and for running landfill.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Dave Lawrence <email>dkl@redhat.com</email></term>
<listitem>
<para>for providing insight into the key differences between Red
Hat's customized Bugzilla.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Dawn Endico <email>endico@mozilla.org</email></term>
<listitem>
<para>for being a hacker extraordinaire and putting up with Matthew's
incessant questions and arguments on irc.mozilla.org in #mozwebtools
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Jacob Steenhagen <email>jake@bugzilla.org</email></term>
<listitem>
<para>for taking over documentation during the 2.17 development
period.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Dave Miller <email>justdave@bugzilla.org</email></term>
<listitem>
<para>for taking over as project lead when Tara stepped down and
continually pushing for the documentation to be the best it can be.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Thanks also go to the following people for significant contributions
to this documentation:
<simplelist type="inline">
<member>Kevin Brannen</member>
<member>Vlad Dascalu</member>
<member>Ben FrantzDale</member>
<member>Eric Hanson</member>
<member>Zach Lipton</member>
<member>Gervase Markham</member>
<member>Andrew Pearson</member>
<member>Joe Robins</member>
<member>Spencer Smith</member>
<member>Ron Teitelbaum</member>
<member>Shane Travis</member>
<member>Martin Wulffeld</member>
</simplelist>.
</para>
<para>
Also, thanks are due to the members of the
<ulink url="news://news.mozilla.org/mozilla.support.bugzilla">
mozilla.support.bugzilla</ulink>
newsgroup (and its predecessor, netscape.public.mozilla.webtools).
Without your discussions, insight, suggestions, and patches,
this could never have happened.
</para>
</section>
<!-- conventions used here (didn't want to give it a chapter of its own) -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="conventions.xml" />
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t
sgml-indent-step:2
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-minimize-attributes:nil
sgml-namecase-general:t
sgml-omittag:t
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
sgml-shorttag:t
sgml-tag-region-if-active:t
End: -->
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % myents SYSTEM "bugzilla.ent">
%myents;
]>
<section id="conventions">
<title>Document Conventions</title>
<para>This document uses the following conventions:</para>
<caution>
<para>This is a caution. Make sure to read this to not be in trouble!</para>
</caution>
<tip>
<para>This is a hint or tip, especially about some configuration tweaks.</para>
</tip>
<note>
<para>This is just a note, for your information.</para>
</note>
<warning>
<para>This is a warning, something you should take care of.</para>
</warning>
<para>
A filename or a path to a filename is displayed like this:
<filename>/path/to/filename.ext</filename>
</para>
<para>
A command to type in the shell is displayed like this:
<command>command --arguments</command>
</para>
<para>bash$ represents a normal user's prompt under bash shell</para>
<para>bash# represents a root user's prompt under bash shell</para>
<para>
A word which is in the glossary will appear like this:
<glossterm linkend="gloss-bugzilla">Bugzilla</glossterm>
</para>
<para>
A sample of code is illustrated like this:
<programlisting>
First Line of Code
Second Line of Code
...
</programlisting>
</para>
<para>
This documentation is maintained in DocBook 4.2 XML format.
Changes are best submitted as plain text or XML diffs, attached
to a bug filed in the <ulink url="&bzg-bugs;">Bugzilla Documentation</ulink>
component.
</para>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t
sgml-indent-step:2
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-minimize-attributes:nil
sgml-namecase-general:t
sgml-omittag:t
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
sgml-shorttag:t
sgml-tag-region-if-active:t
End:
-->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t
sgml-indent-step:2
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-minimize-attributes:nil
sgml-namecase-general:t
sgml-omittag:t
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
sgml-shorttag:t
sgml-tag-region-if-active:t
End:
-->
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % myents SYSTEM "bugzilla.ent">
%myents;
]>
<appendix id="install-perlmodules-manual">
<title>Manual Installation of Perl Modules</title>
<section id="modules-manual-instructions">
<title>Instructions</title>
<para>
If you need to install Perl modules manually, here's how it's done.
Download the module using the link given in the next section, and then
apply this magic incantation, as root:
</para>
<para>
<screen><prompt>bash#</prompt> tar -xzvf &lt;module&gt;.tar.gz
<prompt>bash#</prompt> cd &lt;module&gt;
<prompt>bash#</prompt> perl Makefile.PL
<prompt>bash#</prompt> make
<prompt>bash#</prompt> make test
<prompt>bash#</prompt> make install</screen>
</para>
<note>
<para>
In order to compile source code under Windows you will need to obtain
a 'make' utility. The <command>nmake</command> utility provided with
Microsoft Visual C++ may be used. As an alternative, there is a
utility called <command>dmake</command> available from CPAN which is
written entirely in Perl.
</para>
<para>
As described in <xref linkend="modules-manual-download" />, however, most
packages already exist and are available from ActiveState or theory58S.
We highly recommend that you install them using the ppm GUI available with
ActiveState and to add the theory58S repository to your list of repositories.
</para>
</note>
</section>
<section id="modules-manual-download">
<title>Download Locations</title>
<note>
<para>
Running Bugzilla on Windows requires the use of ActiveState
Perl &min-perl-ver; or higher. Most modules already exist in the core
distribution of ActiveState Perl.
</para>
</note>
<para>
CGI:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/CGI.pm/"/>
Documentation: <ulink url="http://perldoc.perl.org/CGI.html"/>
</literallayout>
</para>
<para>
Data-Dumper:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Data-Dumper/"/>
Documentation: <ulink url="http://search.cpan.org/dist/Data-Dumper/Dumper.pm"/>
</literallayout>
</para>
<para>
Date::Format (part of TimeDate):
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/TimeDate/"/>
Documentation: <ulink url="http://search.cpan.org/dist/TimeDate/lib/Date/Format.pm"/>
</literallayout>
</para>
<para>
DBI:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/DBI/"/>
Documentation: <ulink url="http://dbi.perl.org/docs/"/>
</literallayout>
</para>
<para>
DBD::mysql:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/DBD-mysql/"/>
Documentation: <ulink url="http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm"/>
</literallayout>
</para>
<para>
DBD::Pg:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/DBD-Pg/"/>
Documentation: <ulink url="http://search.cpan.org/dist/DBD-Pg/Pg.pm"/>
</literallayout>
</para>
<para>
Template-Toolkit:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Template-Toolkit/"/>
Documentation: <ulink url="http://www.template-toolkit.org/docs.html"/>
</literallayout>
</para>
<para>
GD:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/GD/"/>
Documentation: <ulink url="http://search.cpan.org/dist/GD/GD.pm"/>
</literallayout>
</para>
<para>
Template::Plugin::GD:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Template-GD/" />
Documentation: <ulink url="http://www.template-toolkit.org/docs/aqua/Modules/index.html" />
</literallayout>
</para>
<para>
MIME::Parser (part of MIME-tools):
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/MIME-tools/"/>
Documentation: <ulink url="http://search.cpan.org/dist/MIME-tools/lib/MIME/Parser.pm"/>
</literallayout>
</para>
</section>
<section id="modules-manual-optional">
<title>Optional Modules</title>
<para>
Chart::Lines:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/Chart/"/>
Documentation: <ulink url="http://search.cpan.org/dist/Chart/Chart.pod"/>
</literallayout>
</para>
<para>
GD::Graph:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/GDGraph/"/>
Documentation: <ulink url="http://search.cpan.org/dist/GDGraph/Graph.pm"/>
</literallayout>
</para>
<para>
GD::Text::Align (part of GD::Text::Util):
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/GDTextUtil/"/>
Documentation: <ulink url="http://search.cpan.org/dist/GDTextUtil/Text/Align.pm"/>
</literallayout>
</para>
<para>
XML::Twig:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/dist/XML-Twig/"/>
Documentation: <ulink url="http://standards.ieee.org/resources/spasystem/twig/twig_stable.html"/>
</literallayout>
</para>
<para>
PatchReader:
<literallayout>
CPAN Download Page: <ulink url="http://search.cpan.org/author/JKEISER/PatchReader/"/>
Documentation: <ulink url="http://www.johnkeiser.com/mozilla/Patch_Viewer.html"/>
</literallayout>
</para>
</section>
</appendix>
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % myents SYSTEM "bugzilla.ent">
%myents;
]>
<appendix id="patches" xreflabel="Useful Patches and Utilities for Bugzilla">
<title>Contrib</title>
<para>
There are a number of unofficial Bugzilla add-ons in the
<filename class="directory">$BUGZILLA_ROOT/contrib/</filename>
directory. This section documents them.
</para>
<section id="cmdline">
<title>Command-line Search Interface</title>
<para>
There are a suite of Unix utilities for searching Bugzilla from the
command line. They live in the
<filename class="directory">contrib/cmdline</filename> directory.
There are three files - <filename>query.conf</filename>,
<filename>buglist</filename> and <filename>bugs</filename>.
</para>
<warning>
<para>
These files pre-date the templatization work done as part of the
2.16 release, and have not been updated.
</para>
</warning>
<para>
<filename>query.conf</filename> contains the mapping from
options to field names and comparison types. Quoted option names
are <quote>grepped</quote> for, so it should be easy to edit this
file. Comments (#) have no effect; you must make sure these lines
do not contain any quoted <quote>option</quote>.
</para>
<para>
<filename>buglist</filename> is a shell script that submits a
Bugzilla query and writes the resulting HTML page to stdout.
It supports both short options, (such as <quote>-Afoo</quote>
or <quote>-Rbar</quote>) and long options (such
as <quote>--assignedto=foo</quote> or <quote>--reporter=bar</quote>).
If the first character of an option is not <quote>-</quote>, it is
treated as if it were prefixed with <quote>--default=</quote>.
</para>
<para>
The column list is taken from the COLUMNLIST environment variable.
This is equivalent to the <quote>Change Columns</quote> option
that is available when you list bugs in buglist.cgi. If you have
already used Bugzilla, grep for COLUMNLIST in your cookies file
to see your current COLUMNLIST setting.
</para>
<para>
<filename>bugs</filename> is a simple shell script which calls
<filename>buglist</filename> and extracts the
bug numbers from the output. Adding the prefix
<quote>http://bugzilla.mozilla.org/buglist.cgi?bug_id=</quote>
turns the bug list into a working link if any bugs are found.
Counting bugs is easy. Pipe the results through
<command>sed -e 's/,/ /g' | wc | awk '{printf $2 "\n"}'</command>
</para>
<para>
Akkana Peck says she has good results piping
<filename>buglist</filename> output through
<command>w3m -T text/html -dump</command>
</para>
</section>
<section id="cmdline-bugmail">
<title>Command-line 'Send Unsent Bug-mail' tool</title>
<para>
Within the <filename class="directory">contrib</filename> directory
exists a utility with the descriptive (if compact) name
of <filename>sendunsentbugmail.pl</filename>. The purpose of this
script is, simply, to send out any bug-related mail that should
have been sent by now, but for one reason or another has not.
</para>
<para>
To accomplish this task, <filename>sendunsentbugmail.pl</filename> uses
the same mechanism as the <filename>sanitycheck.cgi</filename> script;
it scans through the entire database looking for bugs with changes that
were made more than 30 minutes ago, but where there is no record of
anyone related to that bug having been sent mail. Having compiled a list,
it then uses the standard rules to determine who gets mail, and sends it
out.
</para>
<para>
As the script runs, it indicates the bug for which it is currently
sending mail; when it has finished, it gives a numerical count of how
many mails were sent and how many people were excluded. (Individual
user names are not recorded or displayed.) If the script produces
no output, that means no unsent mail was detected.
</para>
<para>
<emphasis>Usage</emphasis>: move the sendunsentbugmail.pl script
up into the main directory, ensure it has execute permission, and run it
from the command line (or from a cron job) with no parameters.
</para>
</section>
</appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-always-quote-attributes:t
sgml-auto-insert-required-elements:t
sgml-balanced-tag-edit:t
sgml-exposed-tags:nil
sgml-general-insert-case:lower
sgml-indent-data:t
sgml-indent-step:2
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
sgml-minimize-attributes:nil
sgml-namecase-general:t
sgml-omittag:t
sgml-parent-document:("Bugzilla-Guide.xml" "book" "chapter")
sgml-shorttag:t
sgml-tag-region-if-active:t
End:
-->
......@@ -7,6 +7,19 @@
# defined by the Mozilla Public License, v. 2.0.
# This script compiles all the documentation.
#
# Required software:
#
# 1) Sphinx documentation builder (python-sphinx package on Debian/Ubuntu)
#
# 2) pdflatex, which means the following Debian/Ubuntu packages:
# * texlive-latex-base
# * texlive-latex-recommended
# * texlive-latex-extra
# * texlive-fonts-recommended
#
# All these TeX packages together are close to a gig :-| But after you've
# installed them, you can remove texlive-latex-extra-doc to save 400MB.
use 5.10.1;
use strict;
......@@ -33,7 +46,7 @@ if (eval { require Pod::Simple }) {
$pod_simple = 1;
};
use Bugzilla::Install::Requirements
use Bugzilla::Install::Requirements
qw(REQUIRED_MODULES OPTIONAL_MODULES);
use Bugzilla::Constants qw(DB_MODULE BUGZILLA_VERSION);
......@@ -46,15 +59,19 @@ my $opt_modules = OPTIONAL_MODULES;
my $template;
{
open(TEMPLATE, '<', 'bugzilla.ent.tmpl')
or die('Could not open bugzilla.ent.tmpl: ' . $!);
open(TEMPLATE, '<', 'definitions.rst.tmpl')
or die('Could not open definitions.rst.tmpl: ' . $!);
local $/;
$template = <TEMPLATE>;
close TEMPLATE;
}
open(ENTITIES, '>', 'bugzilla.ent') or die('Could not open bugzilla.ent: ' . $!);
print ENTITIES "$template\n";
print ENTITIES '<!-- Module Versions -->' . "\n";
# This file is included at the end of Sphinx's conf.py. Unfortunately there's
# no way to 'epilog' a file, only text.
open(SUBSTS, '>', 'definitions.rst') or die('Could not open definitions.rst: ' . $!);
print SUBSTS 'rst_epilog = """' . "\n$template\n";
print SUBSTS ".. Module Versions\n\n";
foreach my $module (@$modules, @$opt_modules)
{
my $name = $module->{'module'};
......@@ -63,10 +80,10 @@ foreach my $module (@$modules, @$opt_modules)
#This needs to be a string comparison, due to the modules having
#version numbers like 0.9.4
my $version = $module->{'version'} eq 0 ? 'any' : $module->{'version'};
print ENTITIES '<!ENTITY min-' . $name . '-ver "'.$version.'">' . "\n";
print SUBSTS '.. |min-' . $name . '-ver| replace:: ' . $version . "\n";
}
print ENTITIES "\n <!-- Database Versions --> \n";
print SUBSTS "\n.. Database Versions\n\n";
my $db_modules = DB_MODULE;
foreach my $db (keys %$db_modules) {
......@@ -76,28 +93,28 @@ foreach my $db (keys %$db_modules) {
$name = lc($name);
my $version = $dbd->{version} || 'any';
my $db_version = $db_modules->{$db}->{'db_version'};
print ENTITIES '<!ENTITY min-' . $name . '-ver "'.$version.'">' . "\n";
print ENTITIES '<!ENTITY min-' . lc($db) . '-ver "'.$db_version.'">' . "\n";
print SUBSTS '.. |min-' . $name . '-ver| replace:: ' . $version . "\n";
print SUBSTS '.. |min-' . lc($db) . '-ver| replace:: ' . $db_version . "\n";
}
close(ENTITIES);
print SUBSTS '"""';
close(SUBSTS);
###############################################################################
# Subs
###############################################################################
sub MakeDocs {
my ($name, $cmdline) = @_;
say "Creating $name documentation ..." if defined $name;
say "$cmdline\n";
system $cmdline;
print "\n";
}
sub make_pod {
say "Creating API documentation...";
my $converter = Pod::Simple::HTMLBatch::Bugzilla->new;
......@@ -122,9 +139,11 @@ END_HTML
$converter->contents_page_start($contents_start);
$converter->contents_page_end("</body></html>");
$converter->add_css('./../../../style.css');
$converter->add_css('./../../../../style.css');
$converter->javascript_flurry(0);
$converter->css_flurry(0);
mkdir("html");
mkdir("html/api");
$converter->batch_convert(['../../'], 'html/api/');
print "\n";
......@@ -135,11 +154,11 @@ END_HTML
###############################################################################
my @langs;
# search for sub directories which have a 'xml' sub-directory
# search for sub directories which have a 'rst' sub-directory
opendir(LANGS, './');
foreach my $dir (readdir(LANGS)) {
next if (($dir eq '.') || ($dir eq '..') || (! -d $dir));
if (-d "$dir/xml") {
if (-d "$dir/rst") {
push(@langs, $dir);
}
}
......@@ -148,34 +167,10 @@ closedir(LANGS);
my $docparent = getcwd();
foreach my $lang (@langs) {
chdir "$docparent/$lang";
MakeDocs(undef, 'cp ../bugzilla.ent ./xml/');
if (!-d 'txt') {
unlink 'txt';
mkdir 'txt', 0755;
}
if (!-d 'pdf') {
unlink 'pdf';
mkdir 'pdf', 0755;
}
if (!-d 'html') {
unlink 'html';
mkdir 'html', 0755;
}
if (!-d 'html/api') {
unlink 'html/api';
mkdir 'html/api', 0755;
}
make_pod() if $pod_simple;
MakeDocs('separate HTML', 'xmlto -m ../xsl/chunks.xsl -o html html xml/Bugzilla-Guide.xml');
MakeDocs('big HTML', 'xmlto -m ../xsl/nochunks.xsl -o html html-nochunks xml/Bugzilla-Guide.xml');
MakeDocs('big text', 'lynx -dump -justify=off -nolist html/Bugzilla-Guide.html > txt/Bugzilla-Guide.txt');
if (! grep($_ eq "--with-pdf", @ARGV)) {
next;
}
MakeDocs('PDF', 'dblatex -p ../xsl/pdf.xsl -o pdf/Bugzilla-Guide.pdf xml/Bugzilla-Guide.xml');
MakeDocs('HTML', 'make html');
MakeDocs('TXT', 'make text');
MakeDocs('PDF', 'make latexpdf');
}
......@@ -6,6 +6,8 @@
* defined by the Mozilla Public License, v. 2.0.
*/
/* This style file is used by the API documentation */
body {
background: white;
color: #111;
......@@ -92,4 +94,4 @@ pre.code, pre.programlisting, pre.screen {
background-color: #eee;
}
.pod_desc_table
.pod_desc_table
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Nicer Filenames -->
<xsl:param name="use.id.as.filename" select="1"/>
<!-- Label sections if they aren't automatically labeled -->
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.label.includes.component.label" select="1"/>
<!-- Table of Contents Depth -->
<xsl:param name="toc.section.depth">2</xsl:param>
<xsl:param name="generate.section.toc.level" select="0"/>
<!-- Show titles of next/previous page -->
<xsl:param name="navig.showtitles">1</xsl:param>
<!-- Tidy up the HTML a bit... -->
<xsl:param name="html.cleanup" select="1"/>
<xsl:param name="make.valid.html" select="1"/>
<xsl:param name="html.stylesheet">../../style.css</xsl:param>
<xsl:param name="highlight.source" select="1"/>
<!-- Use Graphics, specify their Path and Extension -->
<xsl:param name="admon.graphics" select="1"/>
<xsl:param name="admon.graphics.path">../images/</xsl:param>
<xsl:param name="admon.graphics.extension">.gif</xsl:param>
<xsl:param name="admon.textlabel" select="0"/>
<xsl:param name="admon.style">margin-left: 1em; margin-right: 1em</xsl:param>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Include default bugzilla XSL -->
<xsl:include href="bugzilla-docs.xsl"/>
<!-- Set Chunk Specific XSL Params -->
<xsl:param name="chunker.output.doctype-public">-//W3C//DTD HTML 4.01 Transitional//EN</xsl:param>
<xsl:param name="chunker.output.doctype-system">http://www.w3.org/TR/html4/loose.dtd</xsl:param>
<xsl:param name="chunk.section.depth" select="1"/>
<xsl:param name="chunk.first.sections" select="1"/>
<xsl:param name="chunker.output.encoding" select="UTF-8"/>
<xsl:param name="chunk.quietly" select="1"/>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="UTF-8" indent="no"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
<!-- Include default bugzilla XSL -->
<xsl:include href="bugzilla-docs.xsl"/>
<!-- No other params necessary -->
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<!-- Some layout parameters -->
<xsl:param name="generate.index" select="0"/>
<xsl:param name="doc.collab.show" select="0"/>
<xsl:param name="latex.output.revhistory" select="0"/>
<xsl:param name="doc.lot.show"></xsl:param>
<xsl:param name="latex.encoding">utf8</xsl:param>
<xsl:param name="imagedata.default.scale">pagebound</xsl:param>
<xsl:param name="latex.hyperparam">colorlinks,linkcolor=blue,urlcolor=blue</xsl:param>
<!-- Show <ulink>s as footnotes -->
<xsl:param name="ulink.footnotes" select="1"/>
<xsl:param name="ulink.show" select="1"/>
<!-- Don't use Graphics -->
<xsl:param name="admon.graphics" select="0"/>
<xsl:param name="callout.graphics" select="0"/>
<!-- Make pdflatex shut up about <prompt> and <command> within <programlisting>, -->
<!-- see http://dblatex.sourceforge.net/doc/manual/sec-verbatim.html -->
<xsl:template match="prompt|command" mode="latex.programlisting">
<xsl:param name="co-tagin" select="'&lt;:'"/>
<xsl:param name="rnode" select="/"/>
<xsl:param name="probe" select="0"/>
<xsl:call-template name="verbatim.boldseq">
<xsl:with-param name="co-tagin" select="$co-tagin"/>
<xsl:with-param name="rnode" select="$rnode"/>
<xsl:with-param name="probe" select="$probe"/>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment