From 5233cd7eb0f54e040c71e2f469f74e5e64eb8b86 Mon Sep 17 00:00:00 2001 From: Tim Theisen Date: Sat, 2 Nov 2019 11:45:20 -0500 Subject: [PATCH] (#7301) Build man pages for RPM and deb packages using Sphinx --- build/cmake/CondorConfigure.cmake | 3 +- build/packaging/new-debian/control | 6 +- .../new-debian/patches/old-sphinx.patch | 24 + build/packaging/new-debian/patches/series | 1 + build/packaging/new-debian/rules | 8 +- build/packaging/srpm/condor.spec | 24 +- build/packaging/srpm/old-sphinx.patch | 47 + doc/.cvsignore | 5 - doc/.gitignore | 38 - doc/.latex2html-init | 25 - doc/Makefile | 153 - doc/README | 141 - doc/condor-macros.sty | 187 - doc/condor-macros.tex | 1 - doc/just-man-pages.tex | 58 - doc/makeman/Makefile | 19 - doc/makeman/hard-test.html | 1026 ----- doc/makeman/makeman.C | 934 ---- doc/makeman/test.html | 39 - doc/man-macros.tex | 31 - doc/man-pages/bosco_cluster.tex | 52 - doc/man-pages/bosco_findplatform.tex | 35 - doc/man-pages/bosco_install.tex | 56 - doc/man-pages/bosco_ssh_start.tex | 20 - doc/man-pages/bosco_start.tex | 24 - doc/man-pages/bosco_start.tex.old | 86 - doc/man-pages/bosco_stop.tex | 23 - doc/man-pages/bosco_uninstall.tex | 22 - doc/man-pages/cleanup_release.tex | 33 - doc/man-pages/condor_advertise.tex | 171 - doc/man-pages/condor_analyze.tex | 73 - doc/man-pages/condor_annex.tex | 177 - doc/man-pages/condor_check_userlogs.tex | 32 - doc/man-pages/condor_checkpoint.tex | 75 - doc/man-pages/condor_chirp.tex | 185 - doc/man-pages/condor_cod.tex | 116 - doc/man-pages/condor_cold_start.tex | 184 - doc/man-pages/condor_cold_stop.tex | 150 - doc/man-pages/condor_compile.tex | 94 - doc/man-pages/condor_config_bind.tex | 57 - doc/man-pages/condor_config_val.tex | 315 -- doc/man-pages/condor_configure.tex | 319 -- doc/man-pages/condor_continue.tex | 52 - doc/man-pages/condor_convert_history.tex | 71 - doc/man-pages/condor_dagman.tex | 325 -- .../condor_dagman_metrics_reporter.tex | 102 - doc/man-pages/condor_drain.tex | 112 - doc/man-pages/condor_fetchlog.tex | 101 - doc/man-pages/condor_findhost.tex | 99 - doc/man-pages/condor_gather_info.tex | 126 - doc/man-pages/condor_gpu_discovery.tex | 153 - doc/man-pages/condor_history.tex | 162 - doc/man-pages/condor_hold.tex | 103 - doc/man-pages/condor_install.tex | 315 -- doc/man-pages/condor_job_router_info.tex | 42 - doc/man-pages/condor_master.tex | 46 - doc/man-pages/condor_now.tex | 61 - doc/man-pages/condor_off.tex | 85 - doc/man-pages/condor_on.tex | 72 - doc/man-pages/condor_ping.tex | 102 - doc/man-pages/condor_pool_job_report.tex | 30 - doc/man-pages/condor_power.tex | 67 - doc/man-pages/condor_preen.tex | 62 - doc/man-pages/condor_prio.tex | 57 - doc/man-pages/condor_procd.tex | 113 - doc/man-pages/condor_q.tex | 934 ---- doc/man-pages/condor_qedit.tex | 87 - doc/man-pages/condor_qsub.tex | 295 -- doc/man-pages/condor_reconfig.tex | 77 - doc/man-pages/condor_release.tex | 61 - doc/man-pages/condor_reschedule.tex | 67 - doc/man-pages/condor_restart.tex | 88 - doc/man-pages/condor_rm.tex | 76 - doc/man-pages/condor_rmdir.tex | 67 - doc/man-pages/condor_router_history.tex | 50 - doc/man-pages/condor_router_q.tex | 59 - doc/man-pages/condor_router_rm.tex | 39 - doc/man-pages/condor_run.tex | 167 - doc/man-pages/condor_set_shutdown.tex | 57 - doc/man-pages/condor_sos.tex | 55 - doc/man-pages/condor_ssh_to_job.tex | 243 - doc/man-pages/condor_stats.tex | 154 - doc/man-pages/condor_status.tex | 443 -- doc/man-pages/condor_store_cred.tex | 105 - doc/man-pages/condor_submit.tex | 569 --- doc/man-pages/condor_submit_dag.tex | 429 -- doc/man-pages/condor_suspend.tex | 57 - doc/man-pages/condor_tail.tex | 58 - doc/man-pages/condor_top.tex | 156 - doc/man-pages/condor_transfer_data.tex | 65 - doc/man-pages/condor_transform_ads.tex | 124 - doc/man-pages/condor_update_machine_ad.tex | 93 - doc/man-pages/condor_updates_stats.tex | 134 - doc/man-pages/condor_urlfetch.tex | 66 - doc/man-pages/condor_userlog.tex | 121 - doc/man-pages/condor_userprio.tex | 311 -- doc/man-pages/condor_vacate.tex | 70 - doc/man-pages/condor_vacate_job.tex | 103 - doc/man-pages/condor_version.tex | 39 - doc/man-pages/condor_wait.tex | 111 - doc/man-pages/condor_who.tex | 206 - doc/man-pages/daemoncore_common.tex | 74 - doc/man-pages/filelock_midwife.tex | 46 - doc/man-pages/filelock_undertaker.tex | 47 - doc/man-pages/gidd_alloc.tex | 33 - doc/man-pages/install_release.tex | 79 - doc/man-pages/man.tex | 85 - doc/man-pages/procd_ctl.tex | 96 - doc/man-pages/submitcmds.tex | 3927 ----------------- doc/man-pages/tool_common.tex | 117 - doc/man-pages/uniq_pid_midwife.tex | 51 - doc/man-pages/uniq_pid_undertaker.tex | 46 - doc/symbol.tex | 20 - doc/tex-dependencies.pl | 30 - docs/conf.py | 6 +- ...bosco_sshstart.rst => bosco_ssh_start.rst} | 0 docs/man-pages/conf.txt | 6 +- .../{giddalloc.rst => gidd_alloc.rst} | 0 docs/man-pages/index.rst | 6 +- .../man-pages/{procdctl.rst => procd_ctl.rst} | 0 nmi_tools/condor_nmi_submit | 2 +- 121 files changed, 107 insertions(+), 17927 deletions(-) create mode 100644 build/packaging/new-debian/patches/old-sphinx.patch create mode 100644 build/packaging/srpm/old-sphinx.patch delete mode 100644 doc/.cvsignore delete mode 100644 doc/.gitignore delete mode 100644 doc/.latex2html-init delete mode 100644 doc/Makefile delete mode 100644 doc/README delete mode 100644 doc/condor-macros.sty delete mode 120000 doc/condor-macros.tex delete mode 100644 doc/just-man-pages.tex delete mode 100644 doc/makeman/Makefile delete mode 100644 doc/makeman/hard-test.html delete mode 100644 doc/makeman/makeman.C delete mode 100644 doc/makeman/test.html delete mode 100644 doc/man-macros.tex delete mode 100644 doc/man-pages/bosco_cluster.tex delete mode 100644 doc/man-pages/bosco_findplatform.tex delete mode 100644 doc/man-pages/bosco_install.tex delete mode 100644 doc/man-pages/bosco_ssh_start.tex delete mode 100644 doc/man-pages/bosco_start.tex delete mode 100644 doc/man-pages/bosco_start.tex.old delete mode 100644 doc/man-pages/bosco_stop.tex delete mode 100644 doc/man-pages/bosco_uninstall.tex delete mode 100644 doc/man-pages/cleanup_release.tex delete mode 100644 doc/man-pages/condor_advertise.tex delete mode 100644 doc/man-pages/condor_analyze.tex delete mode 100644 doc/man-pages/condor_annex.tex delete mode 100644 doc/man-pages/condor_check_userlogs.tex delete mode 100644 doc/man-pages/condor_checkpoint.tex delete mode 100644 doc/man-pages/condor_chirp.tex delete mode 100644 doc/man-pages/condor_cod.tex delete mode 100644 doc/man-pages/condor_cold_start.tex delete mode 100644 doc/man-pages/condor_cold_stop.tex delete mode 100644 doc/man-pages/condor_compile.tex delete mode 100644 doc/man-pages/condor_config_bind.tex delete mode 100644 doc/man-pages/condor_config_val.tex delete mode 100644 doc/man-pages/condor_configure.tex delete mode 100644 doc/man-pages/condor_continue.tex delete mode 100644 doc/man-pages/condor_convert_history.tex delete mode 100644 doc/man-pages/condor_dagman.tex delete mode 100644 doc/man-pages/condor_dagman_metrics_reporter.tex delete mode 100644 doc/man-pages/condor_drain.tex delete mode 100644 doc/man-pages/condor_fetchlog.tex delete mode 100644 doc/man-pages/condor_findhost.tex delete mode 100644 doc/man-pages/condor_gather_info.tex delete mode 100644 doc/man-pages/condor_gpu_discovery.tex delete mode 100644 doc/man-pages/condor_history.tex delete mode 100644 doc/man-pages/condor_hold.tex delete mode 100644 doc/man-pages/condor_install.tex delete mode 100644 doc/man-pages/condor_job_router_info.tex delete mode 100644 doc/man-pages/condor_master.tex delete mode 100644 doc/man-pages/condor_now.tex delete mode 100644 doc/man-pages/condor_off.tex delete mode 100644 doc/man-pages/condor_on.tex delete mode 100644 doc/man-pages/condor_ping.tex delete mode 100644 doc/man-pages/condor_pool_job_report.tex delete mode 100644 doc/man-pages/condor_power.tex delete mode 100644 doc/man-pages/condor_preen.tex delete mode 100644 doc/man-pages/condor_prio.tex delete mode 100644 doc/man-pages/condor_procd.tex delete mode 100644 doc/man-pages/condor_q.tex delete mode 100644 doc/man-pages/condor_qedit.tex delete mode 100644 doc/man-pages/condor_qsub.tex delete mode 100644 doc/man-pages/condor_reconfig.tex delete mode 100644 doc/man-pages/condor_release.tex delete mode 100644 doc/man-pages/condor_reschedule.tex delete mode 100644 doc/man-pages/condor_restart.tex delete mode 100644 doc/man-pages/condor_rm.tex delete mode 100644 doc/man-pages/condor_rmdir.tex delete mode 100644 doc/man-pages/condor_router_history.tex delete mode 100644 doc/man-pages/condor_router_q.tex delete mode 100644 doc/man-pages/condor_router_rm.tex delete mode 100644 doc/man-pages/condor_run.tex delete mode 100644 doc/man-pages/condor_set_shutdown.tex delete mode 100644 doc/man-pages/condor_sos.tex delete mode 100644 doc/man-pages/condor_ssh_to_job.tex delete mode 100644 doc/man-pages/condor_stats.tex delete mode 100644 doc/man-pages/condor_status.tex delete mode 100644 doc/man-pages/condor_store_cred.tex delete mode 100644 doc/man-pages/condor_submit.tex delete mode 100644 doc/man-pages/condor_submit_dag.tex delete mode 100644 doc/man-pages/condor_suspend.tex delete mode 100644 doc/man-pages/condor_tail.tex delete mode 100644 doc/man-pages/condor_top.tex delete mode 100644 doc/man-pages/condor_transfer_data.tex delete mode 100644 doc/man-pages/condor_transform_ads.tex delete mode 100644 doc/man-pages/condor_update_machine_ad.tex delete mode 100644 doc/man-pages/condor_updates_stats.tex delete mode 100644 doc/man-pages/condor_urlfetch.tex delete mode 100644 doc/man-pages/condor_userlog.tex delete mode 100644 doc/man-pages/condor_userprio.tex delete mode 100644 doc/man-pages/condor_vacate.tex delete mode 100644 doc/man-pages/condor_vacate_job.tex delete mode 100644 doc/man-pages/condor_version.tex delete mode 100644 doc/man-pages/condor_wait.tex delete mode 100644 doc/man-pages/condor_who.tex delete mode 100644 doc/man-pages/daemoncore_common.tex delete mode 100644 doc/man-pages/filelock_midwife.tex delete mode 100644 doc/man-pages/filelock_undertaker.tex delete mode 100644 doc/man-pages/gidd_alloc.tex delete mode 100644 doc/man-pages/install_release.tex delete mode 100644 doc/man-pages/man.tex delete mode 100644 doc/man-pages/procd_ctl.tex delete mode 100644 doc/man-pages/submitcmds.tex delete mode 100644 doc/man-pages/tool_common.tex delete mode 100644 doc/man-pages/uniq_pid_midwife.tex delete mode 100644 doc/man-pages/uniq_pid_undertaker.tex delete mode 100644 doc/symbol.tex delete mode 100755 doc/tex-dependencies.pl rename docs/man-pages/{bosco_sshstart.rst => bosco_ssh_start.rst} (100%) rename docs/man-pages/{giddalloc.rst => gidd_alloc.rst} (100%) rename docs/man-pages/{procdctl.rst => procd_ctl.rst} (100%) diff --git a/build/cmake/CondorConfigure.cmake b/build/cmake/CondorConfigure.cmake index 57c1697b0b0..fc432e72509 100644 --- a/build/cmake/CondorConfigure.cmake +++ b/build/cmake/CondorConfigure.cmake @@ -1424,8 +1424,7 @@ message(STATUS "----- End compiler options/flags check -----") message(STATUS "----- Begin CMake Var DUMP -----") message(STATUS "CMAKE_STRIP: ${CMAKE_STRIP}") message(STATUS "LN: ${LN}") -message(STATUS "LATEX: ${LATEX}") -message(STATUS "LATEX2HTML: ${LATEX2HTML}") +message(STATUS "SPHINXBUILD: ${SPHINXBUILD}") # if you are building in-source, this is the same as CMAKE_SOURCE_DIR, otherwise # this is the top level directory of your build tree diff --git a/build/packaging/new-debian/control b/build/packaging/new-debian/control index 3074cf5923f..a40e5f2e8bd 100644 --- a/build/packaging/new-debian/control +++ b/build/packaging/new-debian/control @@ -13,9 +13,7 @@ Build-Depends: autotools-dev, dh-autoreconf, dh-python, flex, - gsoap (>= 2.7.17-1~), help2man, - latex2html, libboost-filesystem-dev, libboost-program-options-dev, libboost-python-dev, @@ -43,8 +41,8 @@ Build-Depends: autotools-dev, libxss-dev, po-debconf, python-dev, - texlive-font-utils, - transfig, + python-sphinx, + python-sphinx-rtd-theme, uuid-dev, zlib1g-dev Build-Conflicts: liblog4cpp5-dev diff --git a/build/packaging/new-debian/patches/old-sphinx.patch b/build/packaging/new-debian/patches/old-sphinx.patch new file mode 100644 index 00000000000..950eed772f6 --- /dev/null +++ b/build/packaging/new-debian/patches/old-sphinx.patch @@ -0,0 +1,24 @@ +These patches allow the man pages to be built using older version +of Sphinx. These patches may be dropped for more recent versions. +Currently, our man pages are built on submit-3.batlab.org and +python-sphinx10 is installed from EPEL 6. (version 1.0.8) +These components are not used for the man pages. + +* sphnix.ext.napoleon appears in version 1.3 +* sphinx.ext.autosectionlabel appears in version 1.4 + +diff --git a/docs/conf.py b/docs/conf.py +index eb88a06..2da06e6 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -32,10 +32,8 @@ sys.path.append(os.path.abspath('extensions')) + # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom + # ones. + extensions = [ +- 'sphinx.ext.autosectionlabel', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autodoc', +- 'sphinx.ext.napoleon', + 'ticket', + 'macro', + 'index', diff --git a/build/packaging/new-debian/patches/series b/build/packaging/new-debian/patches/series index 3c817edab1c..3f9818a969e 100644 --- a/build/packaging/new-debian/patches/series +++ b/build/packaging/new-debian/patches/series @@ -1 +1,2 @@ # in order of upstream compatibility and invasiveness +old-sphinx.patch diff --git a/build/packaging/new-debian/rules b/build/packaging/new-debian/rules index 3744d163210..7519dd59218 100755 --- a/build/packaging/new-debian/rules +++ b/build/packaging/new-debian/rules @@ -70,12 +70,12 @@ override_dh_shlibdeps: doc/build: mkdir -p $@ - # Need a more recent version htlatex for this + # TODO: Build the manual now that we are using Sphinx # $(MAKE) -C doc ref.html # mv doc/ref.html $@/html - $(MAKE) -C doc just-man-pages + $(MAKE) -C docs man mkdir -p $@/man - mv doc/man/man1/* $@/man + mv docs/_build/man/* $@/man override_dh_auto_install: @@ -115,7 +115,7 @@ override_dh_auto_clean: src/condor_tests/batch_test.pl -rm src/condor_utils/param_info.c # docs - $(MAKE) -C doc clean + $(MAKE) -C docs clean -rm -f doc/condor-*-Manual.tar -rm -rf doc/just-man-pages -rm -rf doc/build diff --git a/build/packaging/srpm/condor.spec b/build/packaging/srpm/condor.spec index a203f74016c..b08babce74a 100644 --- a/build/packaging/srpm/condor.spec +++ b/build/packaging/srpm/condor.spec @@ -214,6 +214,7 @@ Source122: glibc-2.5-20061008T1257-x86_64-p0.tar.gz Source123: zlib-1.2.3.tar.gz %endif +Patch1: old-sphinx.patch #% if 0%osg Patch8: osg_sysconfig_in_init_script.patch @@ -354,10 +355,15 @@ BuildRequires: systemd-units Requires: systemd %endif -BuildRequires: transfig -BuildRequires: latex2html -# We don't build the manual (yet) -#BuildRequires: texlive-epstopdf +%if 0%{?rhel} == 6 +BuildRequires: python-sphinx10 python-sphinx_rtd_theme +%else +%ifarch %{ix86} +BuildRequires: python-sphinx +%else +BuildRequires: python-sphinx python-sphinx_rtd_theme +%endif +%endif Requires: /usr/sbin/sendmail Requires: condor-classads = %{version}-%{release} @@ -823,6 +829,8 @@ exit 0 %setup -q -n %{name}-%{tarball_version} %endif +%patch1 -p1 + %if 0%{?osg} || 0%{?hcc} %patch8 -p1 %endif @@ -838,7 +846,11 @@ find src -perm /a+x -type f -name "*.[Cch]" -exec chmod a-x {} \; %build # build man files -make -C doc just-man-pages +%if 0%{?rhel} == 6 +make -C docs SPHINXBUILD=sphinx-1.0-build man +%else +make -C docs man +%endif export CMAKE_PREFIX_PATH=/usr @@ -1007,7 +1019,7 @@ populate %_libexecdir/condor %{buildroot}/usr/libexec/* # man pages go under %{_mandir} mkdir -p %{buildroot}/%{_mandir} -mv %{buildroot}/usr/man/man1 %{buildroot}/%{_mandir} +mv %{buildroot}/usr/man %{buildroot}/%{_mandir}/man1 mkdir -p %{buildroot}/%{_sysconfdir}/condor # the default condor_config file is not architecture aware and thus diff --git a/build/packaging/srpm/old-sphinx.patch b/build/packaging/srpm/old-sphinx.patch new file mode 100644 index 00000000000..63816041e96 --- /dev/null +++ b/build/packaging/srpm/old-sphinx.patch @@ -0,0 +1,47 @@ +These patches allow the man pages to be built using older version +of Sphinx. These patches may be dropped for more recent versions. +Currently, our man pages are built on submit-3.batlab.org and +python-sphinx10 is installed from EPEL 6. (version 1.0.8) +These components are not used for the man pages. + +* process_index_entry appears in version 1.1 +* sphnix.ext.napoleon appears in version 1.3 +* sphinx.ext.autosectionlabel appears in version 1.4 + +diff --git a/docs/conf.py b/docs/conf.py +index eb88a06..2da06e6 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -32,10 +32,8 @@ sys.path.append(os.path.abspath('extensions')) + # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom + # ones. + extensions = [ +- 'sphinx.ext.autosectionlabel', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autodoc', +- 'sphinx.ext.napoleon', + 'ticket', + 'macro', + 'index', +diff --git a/docs/extensions/index.py b/docs/extensions/index.py +index 7565e0b..c02bf21 100644 +--- a/docs/extensions/index.py ++++ b/docs/extensions/index.py +@@ -5,7 +5,7 @@ from docutils import nodes, utils + from docutils.parsers.rst import Directive + from sphinx import addnodes + from sphinx.errors import SphinxError +-from sphinx.util.nodes import split_explicit_title, process_index_entry, \ ++from sphinx.util.nodes import split_explicit_title, \ + set_role_source_info + + def dump(obj): +@@ -23,7 +23,7 @@ def index_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): + title = utils.unescape(title) + target = utils.unescape(target) + # if an explicit target is given, we can process it as a full entry +- if has_explicit_title: ++ if False: + entries = process_index_entry(target, targetid) + # otherwise we just create a "single" entry + else: diff --git a/doc/.cvsignore b/doc/.cvsignore deleted file mode 100644 index af31349b20f..00000000000 --- a/doc/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -ref.idx -ref.ind -ref.out -ref.pdf - diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 1934963b2c7..00000000000 --- a/doc/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -admin-man/pool-arch.eps -user-man/dagman-connect.eps -user-man/dagman-diamond.eps -user-man/dagman-node.eps -admin-man/activities.pdf -admin-man/pool-arch.pdf -admin-man/states.pdf -contrib/view-screenshot.pdf -user-man/dagman-connect.pdf -user-man/dagman-diamond.pdf -user-man/dagman-node.pdf -user-man/splice-X.pdf -user-man/splice-complex.pdf -user-man/splice-s1.pdf -user-man/splice-simple.pdf -ref.aux -ref.idx -ref.log -ref.out -ref.pdf -ref.toc -ref.ilg -ref.ind -ref.html/ -man/ -makeman/makeman -idxmake.dvi -idxmake.log -ref.4ct -ref.4dx -ref.4ix -ref.4tc -ref.css -ref.dvi -ref.idv -ref.lg -ref.tmp -ref.xref diff --git a/doc/.latex2html-init b/doc/.latex2html-init deleted file mode 100644 index c4328e44d3b..00000000000 --- a/doc/.latex2html-init +++ /dev/null @@ -1,25 +0,0 @@ -# This removes the old filename generation function -BEGIN { -undef &custom_title_hook; -} - -# And here is our new one. We want to remove leading -# section names, remove slash characters, -# spaces. -sub custom_title_hook { - my $header = shift; - $header =~ s,/,,g; - $header =~ s, ,,g; - $header =~ s,\<[^>]*\>,,g; - $header =~ s,^\d+\.(\d+)?,,; -print "GGT GGT GGT header is $header\n"; - if ($header eq "Index") { - $header = "TheIndex"; - } - return $header; -} - -$ADDRESS = ""; - -1; - diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 9799ddba665..00000000000 --- a/doc/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# This TeXLive installation (on ingwe) has the TikZ fix. -TEX_DIR = /scratch/tlmiller/install/texlive/2017/bin/x86_64-linux/ -export PATH := $(TEX_DIR):$(PATH) - -# The .fig sources are stored in git. -FIG_FIGS = user-man/dagman-node.eps \ - user-man/dagman-diamond.eps \ - user-man/dagman-connect.eps - -# The .dia sources are stored in git, but Make doesn't make the .eps files. -DIA_FIGS = admin-man/states.eps \ - admin-man/activities.eps - -# The .dot sources are stored in git, but Make doesn't make the .eps files. -DOT_FIGS = user-man/splice-simple.eps \ - user-man/splice-X.eps \ - user-man/splice-s1.eps \ - user-man/splice-complex.eps - -# The .ps file is stored in git; there is no "source." -PS_FIGS = contrib/view-screenshot.ps - -FIGURES = $(FIG_FIGS:%.eps=%.pdf) \ - $(DIA_FIGS:%.eps=%.pdf) \ - $(DOT_FIGS:%.eps=%.pdf) \ - $(PS_FIGS:%.ps=%.pdf) - -LATEX_ARGS = -file-line-error-style -halt-on-error - -# Convert the list of each ${manpage}.tex sourced to build the manual -# into the list of ${manpage}.html generate by latex2html. This is -# rather a hack, but I don't care enough about the man pages to fix it. -MANPAGES = $(shell grep '^\\input' man-pages/man.tex | grep -v condor_dagman_metrics_reporter.tex | grep -v tool_common.tex | awk -F/ '{print $$2}' | awk -F. '{printf "%s.html ",$$1}') - -all : ref.pdf - -# Only helpful for debugging. Do NOT insert this as a dependency -# of ref.pdf; that will force it to be rebuilt every time. -figures : $(FIGURES) - -# -# Moved the ref.pdf rule to the bottom of this file because rebuilding -# was either never or always happening otherwise. -# - -# 'ref' is what we're building. '3' is how many sections deep to split -# the pages. 'sec-filename' is to use the symbolic section names in -# the URLs, which should make the links more stable. 'next' adds the 'next' -# link to the header and footer. 'info' is a debugging option? -# -# 'NoFonts' disables the broken-ass default that uses SVG's tspan tags. -# 'fonts' turns on something that's based on span tags with classes -# corresponding to LaTeX font classes (textit, textbf, and texttt). -HTLATEX_OPTIONS=ref,3,sec-filename,next,info,NoFonts,fonts -ref.html : ref.tex condor-macros.4ht ref.cfg $(FIGURES) $(LATEX_SOURCES) - @make tex-clean - @rm -fr ref.html - @htlatex ref.tex $(HTLATEX_OPTIONS) - @tex '\def\filename{{ref}{idx}{4dx}{ind}} \input idxmake.4ht' - @makeindex -o ref.ind ref.4dx - @htlatex ref.tex $(HTLATEX_OPTIONS) - @mkdir ref && cd ref && mv ../ref.css ../*.html ../*.svg ../*.png . && cd .. && mv ref ref.html - -just-man-pages : just-man-pages.tex $(MANUAL_SOURCES) - @cd makeman ; make clean && make makeman - @latex2html -split 4 -link 2 -antialias -tmp /tmp -long_titles 3 -toc_depth 2 -local_icons just-man-pages.tex - @cd just-man-pages; for html in $(MANPAGES); do \ - ../makeman/makeman -v -i $${html} -s 1; \ - done - @cd just-man-pages; mv condor_dagman_metrics_repor.html condor_dagman_metrics_reporter.html; ../makeman/makeman -v -i condor_dagman_metrics_reporter.html -s 1 - @rm -fr man - @mkdir man - @mkdir man/man1 - @mv just-man-pages/*.1 man/man1 -# @rm -fr just-man-pages - -%.pdf : %.ps - @ps2pdf -dEPSCrop $< $@ - -%.pdf : %.eps - @epstopdf $< > $@ - -%.eps : %.fig - @fig2dev -L eps -m .6 $< > $@ - -# Make automatically deletes intermediate files (files created as the -# result of a implicit rule whose result is not a target). The special -# target .SECONDARY says to not delete the listed intermediate files; -# this -- as far as I know -- is the only way to prevent Make from reporting -# that they're being deleted (which is just confusing noise). -.SECONDARY : $(FIG_FIGS) - -clean : figures-clean tex-clean pdf-clean html-clean man-clean - -figures-clean : - @rm -f $(FIG_FIGS) - @rm -f $(FIGURES) - -tex-clean : - @rm -f ref.log ref.aux ref.toc ref.ind ref.idx ref.ilg ref.out - -pdf-clean : - @rm -f ref.pdf - -html-clean : - @rm -fr *.html *.png ref ref.html - @rm -fr ref.dvi texput.log - @rm -fr idxmake.dvi idxmake.log - @rm -fr ref.4ct ref.4dx ref.4ix ref.4tc ref.css ref.idv ref.lg ref.tmp ref.xref - -man-clean : - @rm -fr man just-man-pages - @cd makeman; make clean > /dev/null 2>&1 - -release : ref.pdf ref.html - @/bin/bash -e make-release - -# -# Originally generated by 'tex-dependencies.pl ref.tex' and edited for -# ease of updating (and to make the manual and man pages rebuild correctly -# after changes). In order by sub-directory. -# - -MANUAL_SOURCES = \ - man-macros.tex \ - man-pages/man.tex man-pages/tool_common.tex man-pages/bosco_cluster.tex man-pages/bosco_findplatform.tex man-pages/bosco_install.tex man-pages/bosco_ssh_start.tex man-pages/bosco_start.tex man-pages/bosco_stop.tex man-pages/bosco_uninstall.tex man-pages/condor_advertise.tex man-pages/condor_annex.tex man-pages/condor_check_userlogs.tex man-pages/condor_checkpoint.tex man-pages/condor_chirp.tex man-pages/condor_cod.tex man-pages/condor_compile.tex man-pages/condor_config_val.tex man-pages/condor_configure.tex man-pages/condor_continue.tex man-pages/condor_convert_history.tex man-pages/condor_dagman.tex man-pages/condor_dagman_metrics_reporter.tex man-pages/condor_drain.tex man-pages/condor_fetchlog.tex man-pages/condor_findhost.tex man-pages/condor_gather_info.tex man-pages/condor_gpu_discovery.tex man-pages/condor_history.tex man-pages/condor_hold.tex man-pages/condor_install.tex man-pages/condor_job_router_info.tex man-pages/condor_master.tex man-pages/condor_off.tex man-pages/condor_on.tex man-pages/condor_ping.tex man-pages/condor_pool_job_report.tex man-pages/condor_power.tex man-pages/condor_preen.tex man-pages/condor_prio.tex man-pages/condor_procd.tex man-pages/condor_q.tex man-pages/condor_qedit.tex man-pages/condor_qsub.tex man-pages/condor_reconfig.tex man-pages/condor_release.tex man-pages/condor_reschedule.tex man-pages/condor_restart.tex man-pages/condor_rm.tex man-pages/condor_rmdir.tex man-pages/condor_router_history.tex man-pages/condor_router_q.tex man-pages/condor_router_rm.tex man-pages/condor_run.tex man-pages/condor_set_shutdown.tex man-pages/condor_ssh_to_job.tex man-pages/condor_sos.tex man-pages/condor_stats.tex man-pages/condor_status.tex man-pages/condor_store_cred.tex man-pages/condor_submit.tex man-pages/submitcmds.tex man-pages/condor_submit_dag.tex man-pages/condor_suspend.tex man-pages/condor_tail.tex man-pages/condor_top.tex man-pages/condor_transfer_data.tex man-pages/condor_transform_ads.tex man-pages/condor_update_machine_ad.tex man-pages/condor_updates_stats.tex man-pages/condor_urlfetch.tex man-pages/condor_userlog.tex man-pages/condor_userprio.tex man-pages/condor_vacate.tex man-pages/condor_vacate_job.tex man-pages/condor_version.tex man-pages/condor_wait.tex man-pages/condor_who.tex man-pages/gidd_alloc.tex man-pages/procd_ctl.tex man-pages/condor_now.tex - -LATEX_SOURCES = $(MANUAL_SOURCES) \ - condor-macros.sty \ - symbol.tex license.tex faq.tex \ - admin-man/if-else.tex admin-man/function-macros.tex admin-man/admin.tex admin-man/intro.tex admin-man/install.tex admin-man/install-windows.tex admin-man/configure-intro.tex admin-man/if-else.tex admin-man/function-macros.tex admin-man/configure-metaknobs.tex admin-man/configure.tex admin-man/userprio.tex admin-man/policy.tex admin-man/multi-core.tex admin-man/security.tex admin-man/networking.tex admin-man/ports.tex admin-man/shared-port-daemon.tex admin-man/multiple-interfaces.tex admin-man/ccb.tex admin-man/tcp-update.tex admin-man/ipv6.tex admin-man/ckpt-server.tex admin-man/daemoncore.tex admin-man/monitoring.tex admin-man/absent.tex admin-man/high-availability.tex admin-man/ha.tex admin-man/special.tex admin-man/afs.tex admin-man/url-transfer.tex admin-man/multiple-platforms.tex admin-man/full-condor-compile.tex admin-man/kbdd.tex admin-man/condor-view-server.tex admin-man/virtual-machines.tex admin-man/dedicated.tex admin-man/backfill.tex admin-man/PID-namespaces.tex admin-man/group-tracking.tex admin-man/limits.tex admin-man/limits-cgroup.tex admin-man/concurrency.tex admin-man/java.tex admin-man/vm.tex admin-man/singularity.tex admin-man/power.tex \ - clouds/cloud-computing.tex clouds/introduction.tex clouds/user-guide.tex clouds/customization.tex clouds/aws.tex clouds/azure.tex clouds/gcp.tex clouds/softlayer.tex clouds/config.tex \ - contrib/contrib.tex contrib/hdfs.tex contrib/condor-view-client.tex contrib/logview.tex \ - grids/grid-computing.tex grids/intro.tex grids/flocking.tex grids/grid-universe.tex grids/condor-c.tex grids/condor-g.tex grids/using.tex grids/grid-monitor.tex grids/nordugrid.tex grids/unicore.tex grids/batch.tex grids/amazon.tex grids/gce.tex grids/cream.tex grids/boinc.tex grids/grid-matchmaking.tex grids/job_router.tex \ - misc/misc.tex misc/classad.tex misc/ckpt.tex misc/cod.tex misc/hooks.tex misc/job-hooks.tex misc/logging.tex misc/attributes.tex misc/jobad.tex misc/machad.tex misc/masterad.tex misc/scheddad.tex misc/negotiatorad.tex misc/submitterad.tex misc/defragad.tex misc/collectorad.tex misc/statsattributes.tex misc/numbers.tex misc/API.tex misc/pythonbindings.tex misc/chirp.tex misc/user-log.tex misc/commandline.tex misc/drmaa.tex \ - overview/overview.tex overview/contributions.tex \ - platforms/platforms.tex platforms/linux.tex platforms/windows.tex platforms/macosx.tex \ - user-man/limitations.tex user-man/user.tex user-man/limitations.tex user-man/filetransfer.tex user-man/interactive.tex user-man/managing.tex user-man/java.tex user-man/parallel.tex user-man/dagman.tex user-man/vm.tex user-man/docker.tex user-man/time-scheduling.tex \ - version-history/history.tex version-history/upgradingto8-8.tex version-history/8-8.history.tex version-history/8-7.history.tex version-history/8-6.history.tex - -# Only the v8.7 branch requires the fourth run to remove the 'labels may -# changed' warning. We should figure out why. -# -# The index files (ref.ind, at least) produced by htlatex confuse pdflatex, -# so we need to make sure that they're gone before building. We don't -# depend on tex-clean because then we always rebuild. -ref.pdf : ref.tex $(FIGURES) $(LATEX_SOURCES) - @make tex-clean - @pdflatex $(LATEX_ARGS) ref.tex - @makeindex ref - @pdflatex $(LATEX_ARGS) ref.tex - @pdflatex $(LATEX_ARGS) ref.tex - @pdflatex $(LATEX_ARGS) ref.tex diff --git a/doc/README b/doc/README deleted file mode 100644 index b71878ab0d2..00000000000 --- a/doc/README +++ /dev/null @@ -1,141 +0,0 @@ -Target documents ----------------- -There are four documents that can be made: - 1. The Administrators' Guide - 2. The Users' Guide - 3. The Command Reference - 4. The Reference Manual (which consists of all the above) - -Systemwide convenience macros ------------------------------ -\Prog{progname} - Any executable program - -\Cmd{command}{section} - Commands from man pages. E.g., talk(1) ==> \Cmd{talk}{1} - -\Sinful{sinfulstring} - Don't put in the wakka's (i.e., < and >) --- they will be put in - automatically. E.g., \Sinful{perdita.cs.wisc.edu} - -\Condor{command} - A condor *executable* (i.e., will be typeset with \Prog). Also removes the - pain of typing in an escaped underscore (underscore is special in TeX). - Thus, type \Condor{q} for condor_q. - -\condor{file} - A condor *non-executable* --- does the same as \Condor{} above, but is not - typeset as a \Prog{}. Mostly useful for things like config file names, e.g., - \condor{config} and \condor{config.local} - -\File{filename} - Any file of importance. E.g., \File{/etc/passwd} and \File{\condor{config}} - -Other macros for punctuation (such as | [ ] \ etc.) also available. See -condor-macros.tex - - - -Writing man pages ------------------ -The following four points are *required* to be observed for *every* man page. - -1. A man page is written in a ManPage environment, which is delimited by - \begin{ManPage} and \end{ManPage}. The \begin{ManPage} requires three - arguments: the name of the command being documented, the section it - belongs to (i.e., 1 for user commands, 8 for admin, etc.) and a short - (1--5 line) description of the function of the command. E.g., - - \begin{ManPage}{\condor{q}}{1}{Displays the request queue.} - ... - \end{ManPage} - - -2. Inside the environment, the first part is the synopsis. This is demarked - by \Synopsis immediately followed by a \SynProg{progname}. The contents - of this section are the options allowed. E.g. - - \begin{ManPage}{\condor{q}}{1}{Displays the request queue} - \Synopsis \SynProg{\Condor{q}} - \oOpt{-global} \oOptArg{-submittor}{submittor} \oOpt{-help} - \oOptArg{-name}{name} \oOptArg{-constraint}{expression} - \oOpt{-long} \oArg{cluster} \oArg{cluster.process} \oArg{owner} - ... - \end{ManPage} - - The macros which should be used for this purpose are: - \Opt{option} - A required option (e.g., -foo) - \Arg{argument} - A required argument (e.g., inputfile) - \OptArg{opt}{arg} - Reqd. option with an argument (e.g., -o a.out) - \oOpt{option} - An optional option (e.g., [-global]) - \oArg{option} - An optional argument (e.g., [cluster]) - \oOptArg{opt}{arg} - Optional option with argument (e.g., [-o a.out]) - - "Required option" and "optional option" are a little meaningless, but the - intentions are clear, so I'll leave it at that. - - -3. Following the synopsis is a description, which is a normal LaTeX paragraph - that is commenced with a \Description. - - \begin{ManPage}{\Condor{q}}{1}{Displays the request queue} - \Synopsis \SynProg{\Condor{q}} - \oOpt{-global} \oOptArg{-submittor}{submittor} \oOpt{-help} - \oOptArg{-name}{name} \oOptArg{-constraint}{expression} - \oOpt{-long} \oArg{cluster} \oArg{cluster.process} \oArg{owner} - - \Description - \Condor{q} displays information about jobs in the local condor job - queue. If a \Arg{cluster} and a \Arg{process} are both specified, - \Condor{q} displays information about the specified process. If a - \Arg{cluster} is specified without a \Arg{process}, \Condor{q} displays - information about ... - - \end{ManPage} - - To differentiate the concept "cluster" from the argument "cluster", and for - consistancy, please use \Arg, \Opt, \Condor, et al. in the entire man page. - However, do not use the \oXXX variants (i.e., optional variants); just use - /XXX even if the argument is optional. (This ensures that the text is - typeset as -name instead of [-name], which doesn't make sense in running - text.) - - -4. Following the description is a detailed description of the options and - their efficacy. This is performed in an option table. Each item in the - option table is a pair (option,description) which describes the option of - interest. Again, do not use the \oXXX variants. - - \begin{ManPage}{\Condor{q}}{1}{Displays the request queue} - \Synopsis \SynProg{\Condor{q}} - \oOpt{-global} \oOptArg{-submittor}{submittor} \oOpt{-help} - \oOptArg{-name}{name} \oOptArg{-constraint}{expression} - \oOpt{-long} \oArg{cluster} \oArg{cluster.process} \oArg{owner} - - \Description - \Condor{q} displays information about jobs in the local condor job - queue. If a \Arg{cluster} and a \Arg{process} are both specified, - \Condor{q} displays information about the specified process. If a - \Arg{cluster} is specified without a \Arg{process}, \Condor{q} - displays information about ... - - \begin{Options} - \OptItem{\Opt{-help}} {Get a brief description of the supported - options} - - \OptItem{\Opt{-long}} {Get verbose output} - - \OptItem{\OptArg{-name}{name}} {Get the request queue of the - schedd named \Arg{name}}. - ... - - \end{Options} - - \end{ManPage} - - -In addition to the previous four required parts, a given man page may also -contain several optional parts. Each optional part is one or more normal -LaTeX paragraphs preceded by one of \Examples, \SeeAlso, \Files and \GenRem -(for general remarks). [NOTE: \Files and \File{filename} are different -creatures!!] diff --git a/doc/condor-macros.sty b/doc/condor-macros.sty deleted file mode 100644 index f292d47441d..00000000000 --- a/doc/condor-macros.sty +++ /dev/null @@ -1,187 +0,0 @@ -% Define a registered trademark sign for something -\newcommand{\Reg}[1]{{#1}\textsuperscript{\scriptsize{\textregistered}}} -\newcommand{\TM}[1]{{#1}\textsuperscript{\scriptsize{\texttrademark}}} - -% -% Set up version, author and copyright notices -% -\newcommand{\AuthorNotice}{Center for High Throughput Computing, University of Wisconsin--Madison} -\newcommand{\VersionNotice}{Version 8.8.3} -%\newcommand{\CondorR}{\Reg{Condor}} -\newcommand{\CondorTM}{\TM{HTCondor}} - -\newcommand{\CopyrightNotice}{ - Copyright \copyright\ 1990-2019 Center for High Throughput Computing, - Computer Sciences Department, - University of Wisconsin-Madison, Madison, WI. All Rights Reserved. - Licensed under the Apache License, Version 2.0. } - - -% -% Common motifs -% -\newcommand{\Shell}[1]{\texttt{#1}} % A shell command -\newcommand{\Prog}[1]{\textit{#1}} % Program name -\newcommand{\Term}[1]{\emph{#1}} % Use this to introduce terminology -\newcommand{\Cmd}[2]{\textit{#1}(#2)} % Command w/ section number -\newcommand{\Sinful}[1]{\lt{}#1\gt{}} % Sinful string -\newcommand{\SinfulAny}{\lt{}a.b.c.d:port\gt{}} % Arbitrary Sinful string -\newcommand{\URL}[1]{\htmladdnormallink{#1}{#1}} % a URL -\newcommand{\Email}[1]{\htmladdnormallink{#1}{mailto:#1}} -\newcommand{\File}[1]{\texttt{#1}} % File name -\input{symbol.tex} % various symbols -\newcommand{\Meta}[1]{\lt{#1}\gt} % -\newcommand{\Opt}[1]{\mbox{\textbf{#1}}} % Option -\newcommand{\Arg}[1]{\mbox{\textit{#1}}} % Argument -\newcommand{\OptArg}[2]{\mbox{\Opt{#1\ }\Arg{#2}}} % Option with Argument -\newcommand{\oArg}[1]{\mbox{[\Arg{#1}]}} % optional Argument -\newcommand{\oOpt}[1]{\mbox{[\Opt{#1}]}} % optional Option -\newcommand{\oOptArg}[2]{\mbox{[\OptArg{#1\ }{#2}]}} % optional Option w/ Arg -\newcommand{\Optnm}[1]{\textbf{#1}} % Option w/o mbox -\newcommand{\Argnm}[1]{\textit{#1}} % Argument w/o mbox -\newcommand{\OptArgnm}[2]{\Optnm{#1\ }\Argnm{#2}} % Option with Argument w/o mbox -\newcommand{\oArgnm}[1]{[\Argnm{#1}]} % optional Argument w/o mbox -\newcommand{\oOptnm}[1]{[\Optnm{#1}]} % optional Option w/o mbox -\newcommand{\oOptArgnm}[2]{[\OptArgnm{#1\ }{#2}]} % optional Option w/Arg w/o mbox -\newcommand{\Env}[1]{\texttt{#1}} % Environment variable -\newcommand{\DCPerm}[1]{\texttt{#1}} % DC Permission -\newcommand{\ShortExpr}[1]{\mbox{\texttt{#1}}} % A pithy config file expression -\newcommand{\Expr}[1]{\mbox{\texttt{#1}}} % Config file expression - -\newcommand{\PyBindNI}[1]{\texttt{#1}} -\newcommand{\PyBind}[1]{\texttt{#1}\index{#1 pybind@\texttt{#1} (Python binding)}\index{Python binding!\texttt{#1}}} - -\newcommand{\MacroNI}[1]{\texttt{#1}} % Config file macro, NO index -\newcommand{\Macro}[1]{\texttt{#1} -\index{#1 macro@\texttt{#1} macro} -\index{configuration macro!\texttt{#1}}} % Config file macro and index -\newcommand{\MacroIndex}[1]{\index{#1 macro@\texttt{#1} macro}\index{configuration macro!\texttt{#1}}} % index only of config file macro -\newcommand{\MacroB}[1]{\texttt{#1}\index{configuration macro!\texttt{#1}}} % bracketted Config file macro and index - -\newcommand{\MacroUNI}[1]{\texttt{\$(#1)}} % Config file macro's use, NO index -\newcommand{\MacroU}[1]{\texttt{\$(#1)}\index{#1 macro@\texttt{#1} macro}\index{configuration macro!\texttt{#1}}} % Config file macro's use and index -\newcommand{\AdAttr}[1]{\texttt{#1}} % ClassAd Attribute name -\newcommand{\Attr}[1]{\texttt{#1}} % ClassAd Attribute name again -\newcommand{\AdStr}[1]{\texttt{"#1"}} % ClassAd Attribute string -\newcommand{\Dflag}[1]{\texttt{D\_{#1}}} % Debug flag name -\newcommand{\Bold}[1]{\textbf{#1}} % Something you want bold -\newcommand{\Note}{\underline{NOTE}: } % NOTE: -\newcommand{\Warn}{\underline{WARNING}: } % WARNING: -\newcommand{\Security}{\underline{\textit{Security Item}}: } % To identify release notes that pertain to security items -\newcommand{\Todo}{\begin{center} \fbox{This section has not yet been written} \end{center}} -\newcommand{\MoreTodo}{\begin{center} \fbox{This section has not yet been completed} \end{center}} -\newcommand{\Revision}{\begin{center} \fbox{This section is under revision, and has not yet been completed} \end{center}} -\newcommand{\Syscall}[1]{\texttt{#1()}} % The name of a syscall -\newcommand{\Login}[1] {{\tt #1}} % login name like root or nobody -\newcommand{\Username}[1]{``\textbf{#1}''} % A username for an account - -% A keyword in a meta-language -\newcommand{\Keyword}[1] {{\tt #1}} - -% A reference to a Condor GitTrac ticket number, typically used -% in the Version History. -\newcommand{\Ticket}[1]{\htmladdnormallink{(Ticket \#{#1}).}{https://condor-wiki.cs.wisc.edu/index.cgi/tktview?tn=#1}} - -% The name of a procedure -\newcommand{\Procedure}[1] {{\tt #1()}} - -% ==== C/C++ functions & methods ==== - -% \BaseFunctionDef {1:name} {2:return type} {3:return description} -% {4:static/{}} {5:const/{}} -% {6:parameter list} {7:synopsys} {8:Method/Function} -\newcommand{\BaseFunctionDef}[8] - { {\tt{#4}{#2}} {\tt{#1}({#6})} {#5} - \\ {\textbf{Synopsis:} {#7}} - \\ {\textbf{Returns:} {#2}{#3}} - \\ {\textbf{#8} parameters:} } -% \MethodDef {1:class} {2:method} {3:return type} {4:return description} -% {5:parameter list} {6:synopsys} -\newcommand{\MethodDef}[6] - { \BaseFunctionDef{{#1}::{#2}} {#3} {; #4} {} {} {#5} {#6} {Method} } -\newcommand{\ConstMethodDef}[6] - { \BaseFunctionDef{{#1}::{#2}} {#3} {; #4} {} {\Type{const}} {#5} {#6} {Method} } -\newcommand{\StaticMethodDef}[6] - { \BaseFunctionDef{{#1}::{#2}} {#3} {; #4} {static } {} {#5} {#6} {Method} } -% \FunctionDef {1:function} {2:return type} {3:return description} -% {4:static/{}} {5:parameter list} {6:synopsys} -\newcommand{\FunctionDef}[6] - { \BaseFunctionDef{#1} {#2} {; #3} {#4} {#5} {} {#6} {Function} } -\newcommand{\MethodRef}[2] {{\tt{{#1}::{#2}}}} -\newcommand{\FunctionRef}[1] {{\tt{#1}}} - -% \Constructor {class} {param list} {synopsis} -\newcommand{\Constructor}[3] - { \BaseFunctionDef {{#1}::{#1}} {} {None} {} {} {#2} - {Constructor {#3}} {Constructor} } -% \Destructor {class} -\newcommand{\Destructor}[1] - { \BaseFunctionDef {{#1}::{\~{}#1}} {} {None} {} {} {void} - {Destructor} {Destructor} - \begin{itemize}\item None. \end{itemize} } - -% ==== Function parameters ==== - -% Optional param -\newcommand{\ParamDefOpt}[3] - { \texttt{#2} \texttt{#1} (\textit{Optional with default} = {#3}) \\ } -% Required parameter -\newcommand{\ParamDef}[2] { \texttt{#2} \texttt{#1} \\ } -% Parameter reference -\newcommand{\Param}[1] {\texttt{#1}} -% Constant expression -\newcommand{\Const}[1] {\texttt{#1}} -% Custom type -\newcommand{\Type}[1] {\texttt{#1}} - - -% A program code snippet -%\newcommand{\Code}[1] {{\tt #1}} -\newcommand{\Code}[1]{\texttt{#1}} % code in courier font - -% A command that is in a submit description file -\newcommand{\SubmitCmd}[1]{\textbf{#1}\index{submit commands!#1}} % Submit command -\newcommand{\SubmitCmdNI}[1]{\textbf{#1}} % Submit command, no index entry - -% Make a nice box with a header to point out a tricky feature -\newcommand{\Notice}[1] {\noindent {\bf Notice: }\\ \fbox{\parbox[t]{\textwidth}{#1}}} - -% Release directory entry -\newcommand{\Release}[1]{\texttt{/#1}} - -% -% Talking about SQL entities -% -% Name of a Table -\newcommand{\SQLTable}[1] {\Bold{#1}} -% Defining a Table -\newcommand{\SQLTableDef}[2] {\SQLTable{#1} \Bold{(}#2\Bold{)}} -% Name of a View -\newcommand{\SQLView}[1] {\Bold{#1}} -% Defining a View -\newcommand{\SQLViewDef}[2] {\Keyword{CREATE VIEW} \SQLView{#1} \Keyword{as} #2\Bold{;}} - -% -% To help with typing in names of condor commands -% e.g., condor_submit == \Condor{submit} -\newcommand{\Condor}[1]{\Prog{condor\_{#1}}} -\newcommand{\condor}[1]{condor\_{#1}} - -% for names of bosco commands -% e.g., bosco_install == \Bosco{install} -\newcommand{\Bosco}[1]{\Prog{bosco\_{#1}}} - -\usepackage{xcolor} -\definecolor{terminalcolor}{RGB}{238,238,238} % #EEE -\definecolor{terminalborder}{RGB}{102,102,102} % #666 -% This box is "indented" on both sides, but that ends up being rather narrow. -% \newcommand{\terminal}[1]{\fcolorbox{terminalborder}{terminalcolor}{\parbox{\dimexpr\textwidth-2\fboxsep-2\parindent\relax}{\texttt{#1}}}} -% This "full-width" box is still only 77 characters wide. -% \newcommand{\terminal}[1]{\noindent\fcolorbox{terminalborder}{terminalcolor}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\texttt{#1}}}} -% This one is 2em wider, and fits 80 characters. -\newcommand{\terminal}[1]{\begin{list}{}{\setlength{\leftmargin}{-1em}\setlength{\rightmargin}{-1em}}\item\vbox{\fcolorbox{terminalborder}{terminalcolor}{\parbox{\dimexpr\textwidth-2\fboxsep+2em\relax}{\texttt{#1}}}}\end{list}} - -\definecolor{filenamecolor}{RGB}{238,255,238} % #DFD -\definecolor{filebodycolor}{RGB}{205,238,205} % #CEC -\definecolor{fileborder}{RGB}{102,102,102} % #666 -\newcommand{\fileinal}[2]{\begin{samepage}\begin{list}{}{\setlength{\leftmargin}{-1em}\setlength{\rightmargin}{-1em}}\item\vbox{\colorbox{filenamecolor}{\parbox{\dimexpr\textwidth-2\fboxsep+2em\relax}{\emph{\texttt{#1}}}} \fcolorbox{fileborder}{filebodycolor}{\parbox{\dimexpr\textwidth-2\fboxsep+2em\relax}{\texttt{#2}}}}\end{list}\end{samepage}} diff --git a/doc/condor-macros.tex b/doc/condor-macros.tex deleted file mode 120000 index 7e148fab105..00000000000 --- a/doc/condor-macros.tex +++ /dev/null @@ -1 +0,0 @@ -condor-macros.sty \ No newline at end of file diff --git a/doc/just-man-pages.tex b/doc/just-man-pages.tex deleted file mode 100644 index c4b18565cd1..00000000000 --- a/doc/just-man-pages.tex +++ /dev/null @@ -1,58 +0,0 @@ -\documentclass[titlepage,oneside]{book} -% -% For use with latex2html -% -\usepackage{html} - -% -% Set the size of the margins and text area -% -\setlength{\evensidemargin}{0.5in} -\setlength{\oddsidemargin}{0.5in} -\setlength{\textwidth}{5.5in} -\setlength{\topmargin}{0.2in} -\setlength{\headsep}{0.5in} -\setlength{\topskip}{0in} -\setlength{\marginparwidth}{1in} -\setlength{\marginparsep}{0in} -\setlength{\footskip}{0.75in} -\setlength{\parskip}{.8em} - -% -% latex2html ignores .sty files. -% -\input{condor-macros.tex} - -% -% Define the manpage macros. -% -\input{man-macros.tex} - -% -% hyphenation of our terms -% -\hyphenation{Class-Ads Class-Ad} - -% -% Fix the headers and footers -% -\latex{ - \pagestyle{fancy} - \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} - \renewcommand{\headrulewidth}{0.4pt} - \renewcommand{\footrulewidth}{0.4pt} - \addtolength{\headwidth}{\oddsidemargin} -} - -\begin{document} - -\pagenumbering{roman} - -\sloppy - -\newpage -\pagenumbering{arabic} - -\input{man-pages/man.tex} - -\end{document} diff --git a/doc/makeman/Makefile b/doc/makeman/Makefile deleted file mode 100644 index 0f08c830317..00000000000 --- a/doc/makeman/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -CC = g++ -CFLAGS = -g - -.C.o: - $(CC) $(CFLAGS) -c $< - -all: makeman - -makeman: makeman.o - $(CC) $(CFLAGS) -o makeman makeman.o - -test: makeman - ./makeman -i test.html -o test.1 - -make hard: makeman - ./makeman -i hard-test.html -o hard-test.1 - -clean: - rm -f *.o makeman *.out *~ test.1 hard-test.1 diff --git a/doc/makeman/hard-test.html b/doc/makeman/hard-test.html deleted file mode 100644 index bbb61ebb6a6..00000000000 --- a/doc/makeman/hard-test.html +++ /dev/null @@ -1,1026 +0,0 @@ - - -condor_submit - - - - - - - - - - - - -
- -

   -
-condor_submit -

Queue jobs for execution on remote machines - -

-Synopsis -

condor_submit -[-] -[-v] -[-n schedd_name] -[-r schedd_name] -[-d] -submit-description file - -

-  -  - -

- -

-Description -

- -

-condor_submit is the program for submitting jobs to Condor. -condor_submit requires a submit-description file which contains commands -to direct the queuing of jobs. One description file may contain -specifications for the queuing of many condor jobs at once. All jobs queued by a -single invocation of condor_submit must share the same executable, and -are referred to as a ``job cluster''. It is advantageous to submit -multiple jobs as a single cluster because: -

    -
  • Only one copy of the checkpoint file is needed to -represent all jobs in a cluster until they begin execution. -
  • There is much less overhead involved for Condor to start the next -job in a cluster than for Condor to start a new cluster. This can make -a big difference if you are submitting lots of short running jobs. -
-

-SUBMIT DESCRIPTION FILE COMMANDS - -

-Each condor job description file describes one cluster of jobs to be -placed in the condor execution pool. All jobs in a cluster must share -the same executable, but they may have different input and output files, -and different program arguments, etc. The submit-description file is then -used as the only command-line argument to condor_submit. - -

-The submit-description file must contain one executable command and at least one -queue command. All of the other commands have default actions. - -

-The commands which can appear in the submit-description file are: - -

-

-

-

executable = <name> -
The name of the executable file for this -job cluster. Only one executable command may be present in a description -file. If submitting into the Standard Universe, which is the default, -then the named executable must have been re-linked with the Condor -libraries (such as via the condor_compile command). If submitting into -the Vanilla Universe, then the named executable need not be re-linked and -can be any process which can run in the background (shell scripts work -fine as well). - -

-

input = <pathname> -
Condor assumes that its jobs are -long-running, and that the user will not wait at the terminal for their -completion. Because of this, the standard files which normally access -the terminal, (stdin, stdout, and stderr), must refer to files. Thus, -the filename specified with input should contain any keyboard -input the program requires (i.e. this file becomes stdin). If not -specified, the default value of /dev/null is used. - -

-

output = <pathname> -
The output filename will capture -any information the program would normally write to the screen (i.e. -this file becomes stdout). If not specified, the default value of -/dev/null is used. More than one job should not use the same output -file, since this will cause one job to overwrite the output of -another. - -

-

error = <pathname> -
The error filename will capture any -error messages the program would normally write to the screen (i.e. this -file becomes stderr). If not specified, the default value of /dev/null -is used. More than one job should not use the same error file, since -this will cause one job to overwrite the errors of another. - -

-

arguments = <argument_list> -
List of arguments to be supplied -to the program on the command line. - -

-

initialdir = <directory-path> -
Used to specify the current -working directory for the Condor job. Should be a path to a preexisting -directory. If not specified, condor_submit will automatically insert -the user's current working directory at the time condor_submit was run -as the value for initialdir. - -

-

requirements = <ClassAd Boolean Expression> -
The requirements -command is a boolean ClassAd expression which uses C-like operators. In -order for any job in this cluster to run on a given machine, this -requirements expression must evaluate to true on the given machine. For -example, to require that whatever machine executes your program has a -least 64 Meg of RAM and has a MIPS performance rating greater than 45, -use: -
-        requirements = Memory >= 64 && Mips > 45
-
Only one requirements command may be present in a -description file. By default, condor_submit -appends the following clauses to the requirements expression: -
-
1. -
Arch and OpSys are set equal to the Arch and OpSys of the -submit machine. In other words: unless you request otherwise, Condor will give your -job machines with the same architecture and operating system version as -the machine running condor_submit. -
2. -
Disk > ExecutableSize. To ensure there is enough disk space on the -target machine for Condor to copy over your executable. -
3. -
VirtualMemory >= ImageSize. To ensure the target machine -has enough virtual memory to run your job. -
4. -
If Universe is set to Vanilla, FileSystemDomain is set equal to -the submit machine's FileSystemDomain. -
You can view the requirements of a job -which has already been submitted (along with everything else about the -job ClassAd) with the command condor_q -l; see the command reference for -condor_q on page [*]. Also, see the Condor Users -Manual for complete information on the syntax and available attributes -that can be used in the ClassAd expression. - -

-

rank = <ClassAd Float Expression> -
A ClassAd Floating-Point -expression that states how to rank machines which have already met the requirements -expression. Essentially, rank expresses preference. A higher numeric value -equals better rank. Condor will give the job the machine with the -highest rank. For example, -
-        requirements = Memory > 60
-        rank = Memory
-
asks Condor to find all available machines with more than 60 megabytes of memory -and give the job the one with the most amount of memory. See the Condor Users -Manual for complete information on the syntax and available attributes -that can be used in the ClassAd expression. - -

-

on_exit_remove = <ClassAd Boolean Expression> -
This expression -is checked when the job exits and if true, then it allows the job to leave the -queue normally. If false, then the job is placed back into the Idle state. -If the user job is a vanilla job then it restarts from the beginning. If the -user job is a standard job, then it restarts from the last checkpoint. - -

-For example: -Suppose you have a job that occasionally segfaults but you know if you run it -again on the same data, chances are it will finish successfully. This is -how you would represent that with on_exit_remove(assuming the -signal identifier for segmentation fault is 4): - -

-

-	on_exit_remove = (ExitBySignal == True) && (ExitSignal != 4)
-
-

-The above expression will not let the job exit if it exited by a signal and -that signal number was 4(representing segmentaion fault). In any other case -of the job exiting, it will leave the queue as it normally would have done. - -

-If left unspecified, this will default to True. - -

-periodic_* expressions(defined elsewhere in this man page) take -precedent over on_exit_* expressions and a *_hold expression takes -precedent over a *_remove expression. - -

-This expression is available only under UNIX and only for the standard and -vanilla universes. - -

-

on_exit_hold = <ClassAd Boolean Expression> -
This expression -is checked when the job exits and if true, places the job on hold. If false -then nothing happens and the on_exit_remove expression is -checked to determine if that needs to be applied. - -

-For example: -Suppose you have a job that you know will run for an hour minimum. If -the job exits after less than an hour, you would like it to be placed on -hold and notified by e-mail instead of being allowed to leave the queue. - -

-

-	on_exit_hold = (ServerStartTime - JobStartDate) < 3600
-
-

-The above expression will place the job on hold if it exits for any reason -before running for an hour. An e-mail will be sent to the user explaining -that the job was placed on hold because this expression became true. - -

-periodic_* expressions(defined elsewhere in this man page) take -precedent over on_exit_* expressions and any *_hold expression takes -precedent over a *_remove expression. - -

-If left unspecified, this will default to False. - -

-This expression is available only under UNIX and only for the standard and -vanilla universes. - -

-

periodic_remove = <ClassAd Boolean Expression> -
This expression is checked every 20 seconds(non-configurable, -but might be in future) and if it becomes true, the job will -leave the queue. periodic_remove takes precedent over -on_exit_remove if the two describe conflicting states. - -

-For example: -Suppose you would like your job removed if the total suspension time of the -job is more than half of the run time of the job. - -

-

-	periodic_remove = CumulativeSuspensionTime > (RemoteWallClockTime / 2.0)
-
-

-The above expression will remove the job once the conditions have become true. - -

-Notice: -
- -\fbox{\parbox[t]{\textwidth}{Currently, this option will force a \lq\lq terminate'' e...
-...ully
-and a job where the \texttt{periodic\_remove} expression had become true.}} - -

-periodic_* expressions(defined elsewhere in this man page) take -precedent over on_exit_* expressions and any *_hold expression takes -precedent over a *_remove expression. - -

-If left unspecified, this will default to False. - -

-This expression is available only under UNIX and only for the standard and -vanilla universes. - -

-

periodic_hold = <ClassAd Boolean Expression> -
This expression -is checked every 20 seconds(non-configurable, but might be in future) and -if it becomes true, the job will be placed on hold. - -

-For example: -Suppose you would like your job held if the total suspension time of the -job is more than half of the total run time of the job. - -

-

-	periodic_hold = CumulativeSuspensionTime > (RemoteWallClockTime / 2.0)
-
-

-The above expression will place the job on hold if it suspends longer -than half the amount of time it has totally run. An e-mail will be -sent to the user explaining that the job was placed on hold because this -expression became true. - -

-If left unspecified, this will default to False. - -

-periodic_* expressions(defined elsewhere in this man page) take -precedent over on_exit_* expressions and any *_hold expression takes -precedent over a *_remove expression. - -

-This expression is available only under UNIX and only for the standard and -vanilla universes. - -

-

priority = <priority> -
Condor job priorities range from -20 to -+20, with 0 being the default. Jobs with higher numerical priority will -run before jobs with lower numerical priority. Note that this priority -is on a per user basis; setting the priority will determine the order in -which your own jobs are executed, but will have no effect on whether or -not your jobs will run ahead of another user's jobs. - -

-

notification = <when> -
  Owners of condor jobs are notified by -email when certain events occur. -If when is set to Always, the owner will be notified -whenever the job is checkpointed, and when it completes. -If when is set to Complete (the default), the owner will -be notified when the job terminates. -If when is set to Error, the owner will only be notified -if the job terminates abnormally. -If when is set to Never, the owner will not be mailed, -regardless what happens to the job. -The statistics included in the email are documented in -section 2.6.5 on -page [*]. - -

-

notify_user = <email-address> -
  Used to specify the email -address to use when Condor sends email about a job. If not specified, -Condor will default to using : -
-        job-owner@UID_DOMAIN
-
where UID_DOMAIN     is specified by the Condor site administrator. If -UID_DOMAIN     has not been specified, Condor will send the email -to : -
-        job-owner@submit-machine-name
-
-

-

copy_to_spool = <True | False> -
If copy_to_spool is set to -True, then condor_submit will copy the executable to the local spool -directory before running it on a remote host. Oftentimes this can be quite -time consuming and unnecessary. By setting it to False, condor_submit -will skip this step. Defaults to True. - -

-

getenv = <True | False> -
If getenv is set to -True, then condor_submit will copy all of the user's current -shell environment variables at the time of job submission into the job -ClassAd. The job will therefore execute with the same set of environment -variables that the user had at submit time. Defaults to False. -You must be careful when using this feature, since the maximum allowed -size of the environment in Condor is 10240 characters. -If your environment is larger than that, Condor will not allow you to -submit your job, and you will have to use the ``Environment'' setting -described below, instead. - -

-

hold = <True | False> -
If hold is set to -True, then the job will be submitted in the hold state. Jobs in -the hold state will not run until released by condor_release. - -

-

environment = <parameter_list> -
List of environment variables -of the form : -
-        <parameter> = <value>
-
Multiple environment variables can be specified by separating them with a -semicolon (`` ; ''). These environment variables will be placed into the -job's environment before execution. The length of all characters -specified in the environment is currently limited to 10240 characters. - -

-

log = <pathname> -
Use log to specify a filename where -Condor will write a log file of what is happening with this job cluster. -For example, Condor will log into this file when and where the job -begins running, when the job is checkpointed and/or migrated, when the -job completes, etc. Most users find specifying a log file to be very -handy; its use is recommended. If no log entry is specified, -Condor does not create a log for this cluster. - -

-

universe = <vanilla | standard | pvm | scheduler -| globus | mpi> -
Specifies which Condor Universe to use when running this job. The Condor -Universe specifies a Condor execution environment. The standard -Universe is the default, and tells Condor that this job has been re-linked -via condor_compile with the Condor libraries and therefore supports -checkpointing and remote system calls. The vanilla Universe is an -execution environment for jobs which have not been linked with the -Condor libraries. Note: use the vanilla Universe to -submit shell scripts to Condor. The pvm Universe is for a -parallel job written with PVM 3.4. The scheduler is for a job that -should act as a metascheduler. -The globus universe uses the Globus -GRAM API to contact the Globus resource specifed and requests it run the job. -The mpi universe is -for running mpi jobs made with the MPICH package. -See the Condor User's Manual for more information about using Universe. - -

-

image_size = <size> -
This command tells Condor the maximum -virtual image size to which you believe your program will grow during -its execution. Condor will then execute your job only on machines which -have enough resources, (such as virtual memory), to support executing -your job. If you do not specify the image size of your job in the -description file, Condor will automatically make a (reasonably accurate) -estimate about its size and adjust this estimate as your program runs. -If the image size of your job is underestimated, it may crash due to -inability to acquire more address space, e.g. malloc() fails. If the image -size is overestimated, Condor may have difficulty finding machines which -have the required resources. size must be in kbytes, e.g. for -an image size of 8 megabytes, use a size of 8000. - -

-

machine_count = <min..max> | <max> -
If machine_count is -specified, Condor will not start the job until it can simultaneously -supply the job with min machines. Condor will continue to try -to provide up -to max machines, but will not delay starting of the job to do so. -If the job is started with fewer than max machines, the job -will be notified via a usual PvmHostAdd notification as additional -hosts come on line. -Important: only use machine_count if an only if -submitting into the PVM or MPI Universes. Use min..max for the PVM -universe, and just max for the MPI universe. - -

-

coresize = <size> -
Should the user's program abort and produce -a core file, coresize specifies the maximum size in bytes of the -core file which the user wishes to keep. If coresize is not -specified in the command file, the system's user resource limit -``coredumpsize'' is used (except on HP-UX). - -

-

nice_user = <True | False> -
 Normally, when a machine -becomes available to Condor, Condor decides which job to run based upon -user and job priorities. Setting nice_user equal to True -tells Condor not to use your regular user priority, but that this job -should have last priority amongst all users and all jobs. So jobs -submitted in this fashion run only on machines which no other -non-nice_user job wants -- a true ``bottom-feeder'' job! This is very -handy if a user has some jobs they wish to run, but do not wish to use -resources that could instead be used to run other people's Condor jobs. Jobs -submitted in this fashion have ``nice-user.'' pre-appended in front of -the owner name when viewed from condor_q or condor_userprio. The -default value is False. - -

-

kill_sig = <signal-number> -
When Condor needs to kick a job -off of a machine, it will send the job the signal specified by -signal-number. signal-number needs to be an integer which -represents a valid signal on the execution machine. For jobs submitted -to the Standard Universe, the default value is the number for -SIGTSTP which tells the Condor libraries to initiate a checkpoint -of the process. For jobs submitted to the Vanilla Universe, the default -is SIGTERM which is the standard way to terminate a program in UNIX. - -

-

compress_files = file1, file2, ... -

-If your job attempts to access any of the files mentioned in this list, -Condor will automatically compress them (if writing) or decompress them (if reading). -The compress format is the same as used by GNU gzip. - -

-The files given in this list may be simple filenames or complete paths and may -include * as a wildcard. For example, this list causes the file /tmp/data.gz, -any file named event.gz, and any file ending in .gzip to be automatically -compressed or decompressed as needed: - -

-

-compress_files = /tmp/data.gz, event.gz, *.gzip
-
-

-Due to the nature of the compression format, compressed files must only -be accessed sequentially. Random access reading is allowed but is very slow, -while random access writing is simply not possible. This restriction may be -avoided by using both compress_files and fetch_files at the same time. When -this is done, a file is kept in the decompressed state at the execution -machine, but is compressed for transfer to its original location. - -

-This option only applies to standard-universe jobs. - -

-

fetch_files = file1, file2, ... -

-If your job attempts to access a file mentioned in this list, -Condor will automatically copy the whole file to the executing machine, -where it can be accessed quickly. When your job closes the file, -it will be copied back to its original location. -This list uses the same syntax as compress_files, shown above. - -

-This option only applies to standard-universe jobs. - -

-

append_files = file1, file2, ... -

-If your job attempts to access a file mentioned in this list, -Condor will force all writes to that file to be appended to the end. -Furthermore, condor_submit will not truncate it. -This list uses the same syntax as compress_files, shown above. - -

-This option may yield some surprising results. If several -jobs attempt to write to the same file, their output may be intermixed. -If a job is evicted from one or more machines during the course of its -lifetime, such an output file might contain several copies of the results. -This option should be only be used when you wish a certain file to be -treated as a running log instead of a precise result. - -

-This option only applies to standard-universe jobs. - -

-

local_files = file1, file2, ... -

-If your job attempts to access a file mentioned in this list, -Condor will cause it to be read or written at the execution machine. -This is most useful for temporary files not used for input or output. -This list uses the same syntax as compress_files, shown above. - -

-

-local_files = /tmp/*
-
-

-This option only applies to standard-universe jobs. - -

-

file_remaps = < `` name = newname ; name2 = newname2 ... ''> -

-Directs Condor to use a new filename in place of an old one. name -describes a filename that your job may attempt to open, and newname -describes the filename it should be replaced with. -newname may include an optional leading -access specifier, local: or remote:. If left unspecified, -the default access specifier is remote:. Multiple remaps can be -specified by separating each with a semicolon. - -

-This option only applies to standard-universe jobs. - -

-If you wish to remap file names that contain equals signs or semicolons, -these special chracaters may be escaped with a backslash. - -

-This option only applies to standard-universe jobs. - -

-

-
Example One: -
Suppose that your job reads a file named dataset.1. To instruct Condor -to force your job to read other.dataset instead, -add this to the submit file: -
-file_remaps = "dataset.1=other.dataset"
-
Example Two: -
Suppose that your run many jobs which all read in the same large file, -called very.big. If this file can be found in the same place on -a local disk in every machine in the pool, -(say /bigdisk/bigfile,) you can -instruct Condor of this fact by remapping very.big to -/bigdisk/bigfile and specifying that the file is to be read locally, -which will be much faster than reading over the network. -
-file_remaps = "very.big = local:/bigdisk/bigfile"
-
Example Three: -
Several remaps can be applied at once by separating each with a semicolon. -
-file_remaps = "very.big = local:/bigdisk/bigfile ; dataset.1 = other.dataset"
-
-

-

buffer_files = < `` name = (size,block-size) ; name2 = (size,block-size) ... '' > -
buffer_size = <bytes-in-buffer> -
buffer_block_size = <bytes-in-block> -
Condor keeps a buffer of recently-used data for each file a job accesses. -This buffer is used both to cache commonly-used data and to consolidate small -reads and writes into larger operations that get better throughput. -The default settings should produce reasonable results for most programs. - -

-These options only apply to standard-universe jobs. - -

-If needed, you may set the buffer controls individually for each file using -the buffer_files option. For example, to set the buffer size to 1MB and -the block size to 256KB for the file 'input.data', use this command: - -

-

-buffer_files = "input.data=(1000000,256000)"
-
-

-Alternatively, you may use these two options to set -the default sizes for all files used by your job: - -

-

-buffer_size = 1000000
-buffer_block_size = 256000
-
-

-If you do not set these, Condor will use the values given by these -two config file macros: - -

-

-DEFAULT_IO_BUFFER_SIZE = 1000000
-DEFAULT_IO_BUFFER_BLOCK_SIZE = 256000
-
-

-Finally, if no other settings are present, Condor will use a buffer of 512KB -and a block size of 32KB. - -

-

rendezvousdir = <directory-path> -
Used to specify the -shared-filesystem directory to be used for filesystem authentication -when submitting to a remote scheduler. Should be a path to a preexisting -directory. - -

-

x509directory = <directory-path> -
Used to specify the directory -which contains the certificate, private key, and trusted certificate directory -for GSS authentication. If this attribute is set, the environment variables -X509_USER_KEY, X509_USER_CERT, and X509_CERT_DIR are exported with -default values. See section 3.9 for more info. - -

-

x509userproxy = <full-pathname> -
Used to override the default -pathname for X509 user certificates. The default location for X509 proxies -is the /tmp directory, which is generally a local filesystem. Setting -this value would allow Condor to access the proxy in a shared filesystem -(e.g., AFS). Condor will use the proxy specified in the submit file -first. If nothing is specified in the submit file, it will use the -environment variable X509_USER_CERT. If that variable is not present, -it will search in the default location. See -section 3.9 for more info. - -

-

globusscheduler = <scheduler-name> -
Used to specify the -Globus resource to which the job should be submitted. More than one scheduler -can be submitted to, simply place a queue command after each instance -of globusscheduler. Each instance should be a valid Globus scheduler, using -either the full Globus contact string or the host/scheduler format shown below: -
-
Example: -
To submit to the LSF scheduler of the Globus gatekeeper on lego at -Boston University: -
-...
-GlobusScheduler = lego.bu.edu/jobmanager-lsf
-queue
-
-

-

globus_rsl = <RSL-string> -
Used to provide any additional Globus RSL -string attributes which are not covered by regular submit file parameters. - -

-

transfer_executable = <True | False> -
If transfer_executable is set to -false, then Condor look for the executable on the remote machine, and -not transfer it over. This is useful if you have already pre-staged your -executable, and wish to have Condor behave more like rsh. Defaults to True. -This option is only used in the Globus universe. - -

-

+<attribute> = <value> -
A line which begins with a '+' -(plus) character instructs condor_submit to simply insert the -following attribute into the job ClasssAd with the given -value. - -

-

queue [number-of-procs -
] Places one or more copies of the job into -the Condor queue. If desired, new input, output, -error, initialdir, arguments, nice_user, -priority, kill_sig, coresize, or image_size -commands may be issued between queue commands. This is very handy -when submitting multiple runs into one cluster with one submit file; for -example, by issuing an initialdir between each queue -command, each run can work in its own subdirectory. The optional -argument number-of-procs specifies how many times to submit the -job to the queue, and defaults to 1. - -

-

-

-In addition to commands, the submit-description file can contain macros -and comments: - -

-

-

-

Macros -
Parameterless macros in the form of $(macro_name)   -may be inserted anywhere in condor description files. Macros can be -defined by lines in the form of -
- 
-        <macro_name> = <string>
-
-Two pre-defined macros are supplied by the description file parser. The -$(Cluster)   macro supplies the number of the job cluster, and the -$(Process)   macro supplies the number of the job. These macros are -intended to aid in the specification of input/output files, arguments, -etc., for clusters with lots of jobs, and/or could be used to supply a -Condor process with its own cluster and process numbers on the command -line. The $(Process)   macro should not be used for PVM jobs. - -

-If you happen to want a ``$'' as a literal character, then you must use -

-$(DOLLAR)
-
-

-In addition to the normal macro, there is also a special kind of macro -called a ``Substitution Macro'' that allows you to substitue -expressions defined on the resource machine itself(gotten after a match -to the machine has been performed) into specific expressions in your -submit description file. The special substitution macro is of the form: -

- 
-$$(attribute)
-
-

-The substitution macro can only be used in three expressions in the -submit description file: executable    , environment    , and -arguments    . The most common use of this macro is for heterogeneous -submission of an executable: -

-executable = povray.$$(opsys).$$(arch)
-
The opsys and arch attributes will be substituted at -match time for any given resource. This will allow Condor to automatically -choose the right executable for the right machine. - -

-

Comments -
Blank lines and lines beginning with a '#' (pound-sign) -character are ignored by the submit-description file parser. - -

-

-

- -

-Options -

- Supported options are as follows: - -

-

-

-

- -
Accept the command file from stdin. -
-
-v -
Verbose output - display the created job class-ad -
- -

-

-n schedd_name -
Submit to the specified schedd. This option is used when there is more than one schedd running on the submitting machine -
- -

-

-r schedd_name -
Submit to a remote schedd. The jobs - will be submitted to the schedd on the specified remote host. On Unix - systems, the Condor administrator for you site must override the default - AUTHENTICATION_METHODS configuration setting to enable remote filesystem - (FS_REMOTE) authentication. -
- -

-

-d -
Disable file permission checks. -
- -

-

-a command -
Augment the commands in the submit - file with the given command. This command will be considered to - immediately precede the Queue command in the submit file and come - after all other previous commands. The submit file is not - modified. You can append multiple commands by using the -a option - multiple times. If your command has spaces in it, make sure you - quote it. -
- -

-

-

- -

- -

-Exit Status -

- -

-condor_submit will exit with a status value of 0 (zero) upon success, and a -non-zero value upon failure. - -

- -

-Examples -

- -

-Example 1: The below example queues three jobs for -execution by Condor. The first will be given command line arguments of -'15' and '2000', and will write its standard output to 'foo.out1'. The -second will be given command line arguments of '30' and '2000', and will -write its standard output to 'foo.out2'. Similarly the third will have -arguments of '45' and '6000', and will use 'foo.out3' for its standard -output. Standard error output, (if any), from all three programs will -appear in 'foo.error'. - -

-

-      ####################
-      #
-      # Example 1: queueing multiple jobs with differing
-      # command line arguments and output files.
-      #                                                                      
-      ####################                                                   
-                                                                         
-      Executable     = foo                                                   
-                                                                         
-      Arguments      = 15 2000                                               
-      Output  = foo.out1                                                     
-      Error   = foo.err1
-      Queue                                                                  
-                                                                         
-      Arguments      = 30 2000                                               
-      Output  = foo.out2                                                     
-      Error   = foo.err2
-      Queue                                                                  
-                                                                         
-      Arguments      = 45 6000                                               
-      Output  = foo.out3                                                     
-      Error   = foo.err3
-      Queue
-
-

-Example 2: This submit-description file example queues 150 -runs of program 'foo' which must have been compiled and linked for -Silicon Graphics workstations running IRIX 6.x. Condor will not attempt -to run the processes on machines which have less than 32 megabytes of -physical memory, and will run them on machines which have at least 64 -megabytes if such machines are available. Stdin, stdout, and stderr will -refer to ``in.0'', ``out.0'', and ``err.0'' for the first run of this program -(process 0). Stdin, stdout, and stderr will refer to ``in.1'', ``out.1'', -and ``err.1'' for process 1, and so forth. A log file containing entries -about where/when Condor runs, checkpoints, and migrates processes in this -cluster will be written into file ``foo.log''. - -

-

-      ####################                                                    
-      #                                                                       
-      # Example 2: Show off some fancy features including                            
-      # use of pre-defined macros and logging.                                
-      #                                                                       
-      ####################                                                    
-                                                                          
-      Executable     = foo                                                    
-      Requirements   = Memory >= 32 && OpSys == "IRIX6" && Arch =="SGI"     
-      Rank           = Memory >= 64
-      Image_Size     = 28 Meg                                                 
-                                                                          
-      Error   = err.$(Process)                                                
-      Input   = in.$(Process)                                                 
-      Output  = out.$(Process)                                                
-      Log = foo.log                                                                       
-                                                                          
-      Queue 150
-
-

- -

-General Remarks -

-
    -

    -

  • For security reasons, Condor will refuse to run any jobs submitted -by user root (UID = 0) or by a user whose default group is group wheel -(GID = 0). Jobs submitted by user root or a user with a default group of -wheel will appear to sit forever in the queue in an idle state. - -

    -

  • All pathnames specified in the submit-description file must be -less than 256 characters in length, and command line arguments must be -less than 4096 characters in length; otherwise, condor_submit gives a -warning message but the jobs will not execute properly. - -

    -

  • Somewhat understandably, behavior gets bizzare if the user makes -the mistake of requesting multiple Condor jobs to write to the -same file, and/or if the user alters any files that need to be accessed -by a Condor job which is still in the queue (i.e. compressing of data or -output files before a Condor job has completed is a common mistake). - -

    -

  • To disable checkpointing for Standard Universe jobs, include the -line: -
    -      +WantCheckpoint = False
    -
    in the submit-description file before the queue command(s). -
-

- -

-See Also -

-Condor User Manual - -

- -

-Author -

Condor Team, University of Wisconsin-Madison - -

-Copyright -

Copyright © 1990-2007 HTCondor Team, Computer Sciences Department, - University of Wisconsin-Madison, Madison, WI. - - This source code is covered by the Apache License, Version 2.0, which - can be found in the accompanying LICENSE-2.0.txt file, or online at - http://www.apache.org/licenses/ . - - This product includes software developed by and/or derived from the - Globus Project (http://www.globus.org/) to which the U.S. Government - retains certain rights. Copyright (c) 1999 University of Chicago and - The University of Southern California. All Rights Reserved. - - Some distributions of Condor include software developed by the - Info-ZIP Project (http://www.info-zip.org/). Complete conditions - and disclaimers for Info-ZIP can be found at - http://www.info-zip.org/doc/LICENSE - - Some distributions of Condor include MAKEMSI software developed by - Dennis Bareis (http://dennisbareis.com/makemsi.htm). Complete - conditions and disclaimers for MAKEMSI can be found at - http://makemsi-manual.dennisbareis.com/disclaimer.htm - - Some distributions of Condor include a compiled, unmodified version - of the GNU C library. The complete source code to GNU glibc can be - found at http://www.gnu.org/software/libc/. - - Part of the software embedded in this product is gSOAP software. - Portions created by gSOAP are Copyright (C) 2001-2004 Robert A. van - Engelen, Genivia inc. All Rights Reserved. - THE SOFTWARE IN THIS PRODUCT WAS IN PART PROVIDED BY GENIVIA INC AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -

-See the HTCondor Manual for additional notices. -

- -


-
-condor-admin@cs.wisc.edu -
- - diff --git a/doc/makeman/makeman.C b/doc/makeman/makeman.C deleted file mode 100644 index 5806f070246..00000000000 --- a/doc/makeman/makeman.C +++ /dev/null @@ -1,934 +0,0 @@ -/************************************************************************** - * - * makeman.C - * by Alain Roy - * December 19, 2001 - * - * makeman is a program for generating nroff man pages from our HTML - * manual pages. It works pretty well, but there are some things to note - * about it. - * - * 1) This is not a generic HTML to nroff converter. It does a decent job - * with the HTML that we get from latex2html for our current man pages, - * but it certainly does not handle all HTML. One big example is that - * tables are not handled. Images are not handled, and probably can - * never be. - * - * 2) This was a quick weekend hack. I started it without knowing a whole - * lot about what problems I would encounter on the way. The resulting - * is is not particularly beautiful. It was written on my own time, - * since it wasn't on anyone's priority list for Condor. It will be - * improved on my time. That is, it probably won't be improved much. - * - * 3) Because it's a quick weekend hack, it is more fragile than you might - * expect. Handling a new HTML tag may disrupt how other tags are handled, - * unless you are fairly familiar with how it all works. - * - * 4) It's a good idea not to use groff-specific stuff, but limit yourself - * to nroff. - * - * 5) Here are some web pages I found useful in developing this program. - * - * http://sunsite.ualberta.ca/Documentation/Gnu/groff-1.16/html_node/groff_toc.html - * http://unix.about.com/cs/nroffandtroff/ - * http://www-oss.fnal.gov/~mengel/man_page_notes.html - * - **************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -// A very simple class for parsing the command-line parameters -class Parameters -{ -public: - bool debug; - bool verbose; - string input_file; - string output_file; - string section_number; - - void parse_parameters(int argc, char **argv); -}; - -enum TokenType -{ - tokenType_EOF, - tokenType_Text, - tokenType_Tag -}; - -// The list of HTML tags that we recognize. -// Note that this is much less than the entire list of tags. -// Also note that if we don't recognize a tag while reading a file, -// a message is printed to stdout. -// Finally, note that just because we recognize a tag doesn't mean -// that we actually do anything with it. -enum TagType -{ - tagType_NotATag, // Therefore, text. - tagType_Anchor, // - tagType_Paragraph, //

- tagType_BreakLine, //
- tagType_Image, // - tagType_Bold, // - tagType_Strong, // - tagType_Underline, // - tagType_Doctype, // - tagType_HTML, // - tagType_Head, // - tagType_Meta, // - tagType_Link, // - tagType_Title, // - tagType_Body, // <body> - tagType_H1, // <h1> - tagType_H2, // <h2> - tagType_H3, // <h3> - tagType_Italic, // <i> - tagType_Emphasized, // <em> - tagType_OrderedList, // <ol> - tagType_UnorderedList, // <ul> - tagType_DefinitionList, // <dl> - tagType_ListElem, // <li> - tagType_DefinitionTerm, // <dt> - tagType_Definition, // <dd> - tagType_Preformatted, // <pre> - tagType_Code, // <code> - tagType_Typewriter, // <tt> - tagType_Rule, // <hr> - tagType_Address, // <address> - tagType_Comment, // <!-- some text --> - tagType_Unknown // Anything we don't yet parse. -}; - -// Some constants for dealing with lists. -enum -{ - MAX_LIST_DEPTH = 6, - UNORDERED_LIST = -1, - DEFINITION_LIST = -2, - COMPACT_DEFINITION_LIST -}; - -// Our representation of a token. -// Given the simplicity of the class, you may ask why this isn't -// just a struct, or why I didn't add methods to it. Recall, this -// was a quick weekend hack. -class Token -{ -public: - TokenType type; - TagType tag_type; - bool tag_begin; // true, for example if <p>, false if </p> - string text; - bool compact; -}; - -// We find stuff that is bracketed by comments, and we want to ignore it. -// For example, we have: -// <!--Navigation Panel--> -// <!--End of Navigation Panel--> -// And we want to ignore everything in between. That is what these -// comment_markers are for -#define NUMBER_OF_COMMENT_MARKERS (sizeof(comment_markers) / sizeof(char *)) -const char *comment_markers[] = -{ - "Navigation Panel", - "Child-Links" -}; - -// Function prototypes -static void process_file(ifstream &input_file, ofstream &output_file, const Parameters ¶meters); -static string html_to_nroff(const string html_text, const Parameters ¶meters); -static Token *extract_token(int *token_start, const string &line, bool skip_whitespace); -static void discover_tag_type(Token *token); -static void add_fixed_characters(string &source, string &dest, bool in_pre_text); - -/************************************************************************** - * - * Function: main - * - **************************************************************************/ -int main(int argc, char **argv) -{ - Parameters parameters; - - parameters.parse_parameters(argc, argv); - - ifstream input_file(parameters.input_file.c_str()); - ofstream output_file(parameters.output_file.c_str()); - if (!input_file) { - cout << "Can't open file: \"" << parameters.input_file - << "\"\n"; - } else if (!output_file) { - cout << "Can't open file: \"" << parameters.input_file - << "\"\n"; - } else { - if (parameters.verbose) { - printf("Converting %s to %s\n", - parameters.input_file.c_str(), parameters.output_file.c_str()); - } -#if (__GNUC__<3) - input_file.flags(0); -#else - input_file.flags((std::ios_base::fmtflags)0); -#endif - process_file(input_file, output_file, parameters); - } - - return 0; -} - -/************************************************************************** - * - * Function: process_file - * Purpose: Read in the input file, convert it to nroff, stuff it into - * the output file. - * - **************************************************************************/ -static void process_file( - ifstream &input_file, - ofstream &output_file, - const Parameters ¶meters) -{ - int line_number; - string line; - string html_text; - string nroff_text; - - line_number = 0; - while (1) { - getline(input_file, line, '\n'); - line += '\n'; - if (input_file.eof()) { - break; - } else { - line_number++; - html_text += line; - } - } - nroff_text = html_to_nroff(html_text, parameters); - output_file << nroff_text; - return; -} - -/************************************************************************** - * - * Function: html_to_nroff - * Purpose: Convert a bunch of html (in a string) into nroff. - * Returns: A string containing the nroff. - * - **************************************************************************/ -static string html_to_nroff( - const string html_text, - const Parameters ¶meters) -{ - int token_start, length, i; - string *nroff_text; - string command_name; - Token *token; - - int lists_status[MAX_LIST_DEPTH]; - int current_list = -1; - - time_t seconds; - - nroff_text = new string; - - // Find the name of the command, presuming it is the name - // of the HTML file, up to the period. For example, if the input - // file is condor_submit.html, we'll decide the command name is condor_submit. - // (Is this a good idea, or should we allow a parameter to specify it?) - // We then use the command_name within nroff. - length = parameters.input_file.size(); - for (i = 0; i < length; i++) { - if (parameters.input_file[i] == '.') { - break; - } else { - command_name += parameters.input_file[i]; - } - } - - // Begin with a comment header. - *nroff_text += ".\\\"Man page for "; - *nroff_text += command_name; - *nroff_text += "\n"; - *nroff_text += ".\\\"Generated by makeman on "; - time(&seconds); - *nroff_text += ctime(&seconds); // Note that ctime will give us a newline. - - // Next the .TH command, to set up the man page. - *nroff_text += ".TH "; - *nroff_text += command_name; - *nroff_text += " 1 "; // The section number - *nroff_text += "date\n"; // To be filled in. - - token_start = 0; - - // Here is the big loop that considers each token in the HTML - // and converts it to nroff. - bool ignore_region = false; - bool in_title = false; - bool in_paragraph = false; - bool in_pre_text = false; - bool just_finished_pre_text = false; - bool last_output_did_newline = true; - while (1) { - char num_string[10]; - - token = extract_token(&token_start, html_text, !in_pre_text); - if (token->type == tokenType_EOF) { - break; - } else if (ignore_region && token->tag_type != tagType_Comment) { - // Recall that we ignore regions of HTML based on - // the begin/end comments that Latex2HTML thoughtfully provides us. - continue; - } else if (in_title && token->tag_type != tagType_Title) { - // We also ignore anything within <title> - continue; - } else if (token->type == tokenType_Text) { - // A "token" of text isn't just a single word, but - // it is a whole block of text. We spit it out in - // a couple of different possible ways. - if (just_finished_pre_text == true) { - if (current_list >= 0) { - *nroff_text += ".IP \"\" "; - sprintf(num_string, "%d\n", (current_list+1) * 3); - *nroff_text += num_string; - } else { - *nroff_text += ".P\n"; - } - just_finished_pre_text = false; - last_output_did_newline = true; - } - // We might end up spitting out a period at the beginning of a line. - // This will be interpreted as a command to nroff, so we escape it. - // Note that we end up with a problem. If someone has something like: - // "blah.", we will output the period on a line by itself, and - // nroff will put a space after blah, before the period. I'm not - // sure how to get around that. - if (last_output_did_newline && token->text[0] == '.') { - *nroff_text += "\\&"; - } - add_fixed_characters(token->text, *nroff_text, in_pre_text); - last_output_did_newline = in_pre_text; - } else { - assert(token->type == tokenType_Tag); - switch (token->tag_type) { - case tagType_H1: - break; - case tagType_H2: - if (token->tag_begin) { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - *nroff_text += ".SH "; - last_output_did_newline = false; - } else { - *nroff_text += "\n"; - last_output_did_newline = true; - } - break; - case tagType_H3: - if (token->tag_begin) { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - *nroff_text += ".SS "; - last_output_did_newline = false; - } else { - *nroff_text += "\n"; - last_output_did_newline = true; - } - break; - case tagType_Anchor: - break; - case tagType_Paragraph: - if (token->tag_begin) { - in_paragraph = true; - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - if (current_list >= 0) { - *nroff_text += ".IP \"\" "; - sprintf(num_string, "%d\n", (current_list+1) * 3); - *nroff_text += num_string; - } else { - *nroff_text += ".P\n"; - } - last_output_did_newline = true; - } else { - in_paragraph = false; - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - last_output_did_newline = true; - } - break; - case tagType_Preformatted: - in_pre_text = token->tag_begin; - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - if (token->tag_begin) { - *nroff_text += ".P\n"; - } else { - just_finished_pre_text = true; - } - break; - case tagType_Italic: - case tagType_Underline: - case tagType_Emphasized: - if (token->tag_begin) { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - last_output_did_newline = false; - *nroff_text += ".I "; - } else { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - last_output_did_newline = true; - } - break; - case tagType_Bold: - case tagType_Strong: - if (token->tag_begin) { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - last_output_did_newline = false; - *nroff_text += ".B "; - } else { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - last_output_did_newline = true; - } - break; - case tagType_OrderedList: - if (token->tag_begin) { - current_list++; - if (current_list < MAX_LIST_DEPTH) { - lists_status[current_list] = 0; - } - } else { - if (current_list >= 0) { - current_list--; - } - } - break; - case tagType_UnorderedList: - if (token->tag_begin) { - current_list++; - if (current_list < MAX_LIST_DEPTH) { - lists_status[current_list] = UNORDERED_LIST; - } - } else { - if (current_list >= 0) { - current_list--; - } - } - break; - case tagType_DefinitionList: - if (token->tag_begin) { - current_list++; - if (current_list < MAX_LIST_DEPTH) { - if (token->compact) { - lists_status[current_list] = COMPACT_DEFINITION_LIST; - } else { - lists_status[current_list] = DEFINITION_LIST; - } - } - } else { - if (current_list >= 0) { - current_list--; - } - } - break; - case tagType_ListElem: - if (token->tag_begin && current_list < MAX_LIST_DEPTH) { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - - *nroff_text += ".IP \"\" "; - sprintf(num_string, "%d\n", (current_list+1) * 3); - *nroff_text += num_string; - - if (lists_status[current_list] == UNORDERED_LIST) { - *nroff_text += "* "; - } else { - lists_status[current_list]++; - sprintf(num_string, "%d. ", - lists_status[current_list]); - *nroff_text += num_string; - } - last_output_did_newline = false; - } - break; - case tagType_DefinitionTerm: - if (current_list < MAX_LIST_DEPTH) { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - if (token->tag_begin) { - if (current_list > 0) { - *nroff_text += ".IP \"\" "; - if (lists_status[current_list] == DEFINITION_LIST) { - sprintf(num_string, "%d\n", current_list * 3); - last_output_did_newline = true; - } else { - // A compact list - sprintf(num_string, "%d\n", (current_list+1) * 3); - last_output_did_newline = true; - } - *nroff_text += num_string; - } else { - *nroff_text += ".P\n"; - } - } - } - break; - case tagType_Definition: - if (current_list < MAX_LIST_DEPTH - && lists_status[current_list] != COMPACT_DEFINITION_LIST) { - if (!last_output_did_newline) { - *nroff_text += "\n"; - } - *nroff_text += ".IP \"\" "; - sprintf(num_string, "%d\n", (current_list+1) * 3); - *nroff_text += num_string; - - last_output_did_newline = true; - } - break; - case tagType_Comment: - for (int i = 0; i < NUMBER_OF_COMMENT_MARKERS; i++) { - if (token->text.find(comment_markers[i]) != -1) { - ignore_region = !ignore_region; - } - } - break; - case tagType_Title: - if (token->tag_begin) { - *nroff_text += ".SH Name\n.P\n"; - in_title = true; - last_output_did_newline = true; - } else { - in_title = false; - // We hold over the newline from the begin tag, - // since nothing was output for the title. - last_output_did_newline = true; - } - break; - case tagType_BreakLine: - case tagType_Image: - break; - case tagType_Code: - case tagType_Typewriter: - // incorrectly injects space character before - // punctuation marks, but without, words are - // mashed together - *nroff_text += " "; - break; - case tagType_Head: - case tagType_Meta: - case tagType_Link: - case tagType_Doctype: - case tagType_HTML: - case tagType_Body: - case tagType_Rule: - case tagType_Address: - // We ignore these tags. - break; - case tagType_Unknown: - cout << "Ignoring unknown tag: " << token->text << endl; - break; - case tagType_NotATag: - // Ignore things that aren't tags. - break; - } // end of switch on tag type - } - if (token->tag_type != tagType_Preformatted) { - just_finished_pre_text = false; - } - delete token; - } - - *nroff_text += "\n"; - - return *nroff_text; -} - -/************************************************************************** - * - * Function: extract_token - * Purpose: Pull out the next token from our html text. - * Returns: A token, freshly allocated. It's up to the caller to delete it. - * - **************************************************************************/ -static Token *extract_token(int *token_start, const string &line, bool skip_whitespace) -{ - int token_end; - unsigned int line_size; - bool in_tag, in_quote; - Token *token; - - token = new Token; - line_size = line.size(); - if ((unsigned int) *token_start >= line_size) { - token->type = tokenType_EOF; - token->text = ""; - } - else { - // First, skip whitespace - if (skip_whitespace) { - while (isspace(line[*token_start])) { - (*token_start)++; - } - } - if (line[*token_start] == '<') { - in_tag = true; - token->type = tokenType_Tag; - } else { - in_tag = false; - token->type = tokenType_Text; - } - token_end = *token_start; - - if (in_tag) { - // Scan until the end of the tag. - while (token_end < line_size && line[token_end] != '>') { - token_end++; - } - } else { - // Scan until we reach a tag. - while (token_end < line_size && line[token_end] != '<') { - token_end++; - } - if (line[token_end] == '<') { - token_end--; - } - } - if (*token_start == token_end + 1) { // Read no charaters - token->text = ""; - token->type = tokenType_EOF; - token->tag_type = tagType_NotATag; - } - else { - token->text = line.substr(*token_start, token_end-(*token_start) + 1); - *token_start = token_end + 1; - if (token->type == tokenType_Text) { - token->tag_type = tagType_NotATag; - } else { - discover_tag_type(token); - if (token->tag_type == tagType_Image){ - // Check for some special cases we know about that - // latex2html does. - if (token->text.find("ALT=\"$<$\"") != -1) { - token->type = tokenType_Text; - token->tag_type = tagType_NotATag; - token->text = "<"; - } else if (token->text.find("ALT=\"$>$\"") != -1) { - token->type = tokenType_Text; - token->tag_type = tagType_NotATag; - token->text = ">"; - } else if (token->text.find("ALT=\"$<=$\"") != -1) { - token->type = tokenType_Text; - token->tag_type = tagType_NotATag; - token->text = ">="; - } else if (token->text.find("ALT=\"$>=$\"") != -1) { - token->type = tokenType_Text; - token->tag_type = tagType_NotATag; - token->text = ">="; - } - } - } - } - } - return token; -} - -/************************************************************************** - * - * Function: discover_tag_type - * Purpose: Given a token that begins with a less than symbol, we know - * that we have an HTML tag. This is essentially a big case - * to extract the type of the tag. For instance, if we have - *

, the type is tagType_DefinitionList. - * - **************************************************************************/ -static void discover_tag_type(Token *token) -{ - int i, len; - string tag_name; - TagType type; - - assert(token->text[0] == '<'); - - token->compact = false; - // We have to check comments separately, because there isn't - // necessarily a whitespace after the two hyphens, and the - // rest of the tag checking assumes that there is whitespace - // after the tag name. - if (!strncmp(token->text.c_str(), "