Re: [PATCH v2] Omit User-Agent: header by default
[notmuch-archives.git] / e8 / c9ea0c48dddcfca905de8d1a1f929792b1a5fb
1 Return-Path: <bremner@tesseract.cs.unb.ca>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 4312F431FB6\r
6         for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 08:56:11 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id rYHZkS1ABWhk for <notmuch@notmuchmail.org>;\r
16         Sun, 18 Jan 2015 08:56:08 -0800 (PST)\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
18         [87.98.215.224])\r
19         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id E0381431FAF\r
22         for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 08:56:07 -0800 (PST)\r
23 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
24         4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
25         id 1YCt8I-0007jp-1t; Sun, 18 Jan 2015 16:55:26 +0000\r
26 Received: (nullmailer pid 20082 invoked by uid 1000); Sun, 18 Jan 2015\r
27         16:55:12 -0000\r
28 From: David Bremner <david@tethera.net>\r
29 To: David Bremner <david@tethera.net>, "notmuch@notmuchmail.org"\r
30         <notmuch@notmuchmail.org>\r
31 Subject: [PATCH] doc: remove support for rst2man\r
32 Date: Sun, 18 Jan 2015 17:55:10 +0100\r
33 Message-Id: <1421600110-19988-1-git-send-email-david@tethera.net>\r
34 X-Mailer: git-send-email 2.1.4\r
35 In-Reply-To: <87k312x4i2.fsf@maritornes.cs.unb.ca>\r
36 References: <87k312x4i2.fsf@maritornes.cs.unb.ca>\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sun, 18 Jan 2015 16:56:11 -0000\r
50 \r
51 It was becoming increasingly complicated to support rst2man, and there\r
52 were apparently not many people that relied on it.\r
53 ---\r
54 \r
55 Now's your chance to tell us how useful rst2man support is to you.\r
56 \r
57  INSTALL            |  7 ++----\r
58  NEWS               |  6 +++++\r
59  configure          | 20 +++--------------\r
60  doc/INSTALL        | 13 -----------\r
61  doc/Makefile.local |  7 ++----\r
62  doc/prerst2man.py  | 64 ------------------------------------------------------\r
63  6 files changed, 13 insertions(+), 104 deletions(-)\r
64  delete mode 100644 doc/prerst2man.py\r
65 \r
66 diff --git a/INSTALL b/INSTALL\r
67 index b543c50..eaccd93 100644\r
68 --- a/INSTALL\r
69 +++ b/INSTALL\r
70 @@ -75,14 +75,11 @@ Talloc, and zlib which are each described below:\r
71  Building Documentation\r
72  ----------------------\r
73  \r
74 -By default the documentation for notmuch is built using sphinx.\r
75 +To build the documentation for notmuch you need at least version 1.0\r
76 +of sphinx (Jul. 2010).\r
77  \r
78  Sphinx is available from www.sphinx-doc.org.\r
79  \r
80 -If you prefer, you can build the man pages using rst2man, from the\r
81 -python docutils package. See doc/INSTALL for details.\r
82 -\r
83 -\r
84  Installing Dependencies from Packages\r
85  -------------------------------------\r
86  \r
87 diff --git a/NEWS b/NEWS\r
88 index abb5ad7..53e06aa 100644\r
89 --- a/NEWS\r
90 +++ b/NEWS\r
91 @@ -1,5 +1,11 @@\r
92  Notmuch 0.20 (UNRELEASED)\r
93  \r
94 +Documentation\r
95 +-------------\r
96 +\r
97 +Support for using rst2man in place of sphinx to build the\r
98 +docmumentation has been removed.\r
99 +\r
100  Contrib\r
101  -------\r
102  \r
103 diff --git a/configure b/configure\r
104 index 137acea..a6b49ae 100755\r
105 --- a/configure\r
106 +++ b/configure\r
107 @@ -447,19 +447,9 @@ printf "Checking if sphinx is available and supports nroff output... "\r
108  if hash sphinx-build > /dev/null 2>&1 && ${python} -m sphinx.writers.manpage > /dev/null 2>&1 ; then\r
109      printf "Yes.\n"\r
110      have_sphinx=1\r
111 -    have_rst2man=0\r
112  else\r
113 -    printf "No (falling back to rst2man).\n"\r
114 +    printf "No (so will not install man pages).\n"\r
115      have_sphinx=0\r
116 -\r
117 -    printf "Checking if rst2man is available... "\r
118 -    if rst2man -V > /dev/null 2>&1; then\r
119 -       printf "Yes.\n"\r
120 -       have_rst2man=1\r
121 -    else\r
122 -       printf "No (so will not install man pages).\n"\r
123 -       have_rst2man=0\r
124 -    fi\r
125  fi\r
126  \r
127  libdir_in_ldconfig=0\r
128 @@ -848,9 +838,6 @@ HAVE_EMACS = ${have_emacs}\r
129  # Whether there's a sphinx-build binary available for building documentation\r
130  HAVE_SPHINX=${have_sphinx}\r
131  \r
132 -# Whether there's a rst2man binary available for building documentation\r
133 -HAVE_RST2MAN=${have_rst2man}\r
134 -\r
135  # Whether there's a doxygen binary available for building api documentation\r
136  HAVE_DOXYGEN=${have_doxygen}\r
137  \r
138 @@ -978,9 +965,8 @@ cat > sh.config <<EOF\r
139  # Whether the Xapian version in use supports compaction\r
140  NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}\r
141  \r
142 -# Whether there's either sphinx or rst2man available for building\r
143 -# documentation\r
144 -NOTMUCH_HAVE_MAN=$((have_sphinx || have_rst2man))\r
145 +# do we have man pages?\r
146 +NOTMUCH_HAVE_MAN=$((have_sphinx))\r
147  \r
148  # Name of python interpreter\r
149  NOTMUCH_PYTHON=${python}\r
150 diff --git a/doc/INSTALL b/doc/INSTALL\r
151 index e37c2b9..0585476 100644\r
152 --- a/doc/INSTALL\r
153 +++ b/doc/INSTALL\r
154 @@ -1,9 +1,6 @@\r
155  This file contains some more detailed information about building and\r
156  installing the documentation.\r
157  \r
158 -Building with sphinx.\r
159 ----------------------\r
160 -\r
161  - You need sphinx at least version 1.0.\r
162  \r
163  - You can build build and install man pages with 'make install-man'\r
164 @@ -12,13 +9,3 @@ Building with sphinx.\r
165    (currently only the man pages) with\r
166  \r
167       'make install-{man|info|html|pdf}'\r
168 -\r
169 -Building the man pages\r
170 -----------------------\r
171 -\r
172 -- You can build the man pages with rst2man (from python-docutils) with\r
173 -  'make rst2man'.\r
174 -\r
175 -- Currently there is no support to automagically install the resulting\r
176 -  nroff files, but it should work to modify the target install-man\r
177 -  in doc/Makefile.local.\r
178 diff --git a/doc/Makefile.local b/doc/Makefile.local\r
179 index e7d0bac..0bdf2e1 100644\r
180 --- a/doc/Makefile.local\r
181 +++ b/doc/Makefile.local\r
182 @@ -7,7 +7,6 @@ SPHINXOPTS    := -q\r
183  SPHINXBUILD   = sphinx-build\r
184  DOCBUILDDIR      := $(dir)/_build\r
185  \r
186 -prerst2man := python $(srcdir)/$(dir)/prerst2man.py\r
187  mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py\r
188  \r
189  # Internal variables.\r
190 @@ -50,8 +49,6 @@ ifeq ($(HAVE_SPHINX),1)\r
191             mkdir -p $(DOCBUILDDIR)/man/man$${section}; \\r
192             mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \\r
193         done\r
194 -else ifeq ($(HAVE_RST2MAN),1)\r
195 -       $(prerst2man) $(srcdir)/doc $(DOCBUILDDIR)/man\r
196  else\r
197         @echo "Fatal: build dependency fail."\r
198         @false\r
199 @@ -79,10 +76,10 @@ endif\r
200  \r
201  # Do not try to build or install man pages if a man page converter is\r
202  # not available.\r
203 -ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)\r
204 +ifeq ($(HAVE_SPHINX),0)\r
205  build-man:\r
206  install-man:\r
207 -       @echo "No sphinx or rst2man, will not install man pages."\r
208 +       @echo "No sphinx, will not install man pages."\r
209  else\r
210  build-man: ${MAN_GZIP_FILES}\r
211  install-man: ${MAN_GZIP_FILES}\r
212 diff --git a/doc/prerst2man.py b/doc/prerst2man.py\r
213 deleted file mode 100644\r
214 index 968722a..0000000\r
215 --- a/doc/prerst2man.py\r
216 +++ /dev/null\r
217 @@ -1,64 +0,0 @@\r
218 -from sys import argv\r
219 -from datetime import date\r
220 -from os.path import dirname, isdir\r
221 -from os import makedirs, system\r
222 -import re\r
223 -\r
224 -sourcedir = argv[1]\r
225 -outdir = argv[2]\r
226 -\r
227 -if not isdir(outdir):\r
228 -    makedirs(outdir, 0o755)\r
229 -\r
230 -with open(sourcedir + "/conf.py") as cf:\r
231 -    exec(cf.read())\r
232 -\r
233 -\r
234 -def header(file, startdocname, command, description, authors, section):\r
235 -    file.write("""\r
236 -{0:s}\r
237 -{1:s}\r
238 -{2:s}\r
239 -\r
240 -:Date:   {3:s}\r
241 -:Version: {4:s}\r
242 -:Manual section: {5:d}\r
243 -:Manual group: {6:s}\r
244 -\r
245 -""".format(\r
246 -'-' * len(description),\r
247 -description,\r
248 -'-' * len(description),\r
249 -date.today().isoformat(), release, section, project))\r
250 -\r
251 -blankre = re.compile("^\s*$")\r
252 -for page in man_pages:\r
253 -    outdirname = outdir + '/' + dirname(page[0])\r
254 -    if not isdir(outdirname):\r
255 -        makedirs(outdirname, 0o755)\r
256 -    filename = outdir + '/' + page[0] + '.rst'\r
257 -    outfile = open(filename, 'w')\r
258 -    infile = open(sourcedir + '/' + page[0] + '.rst', 'r')\r
259 -\r
260 -    # this is a crude hack. We look for the first blank line, and\r
261 -    # insert the rst2man header there.\r
262 -    #\r
263 -    # XXX consider really parsing input\r
264 -\r
265 -    count = 0\r
266 -    lines = infile.readlines()\r
267 -    for line in lines:\r
268 -        outfile.write(line)\r
269 -        if (blankre.match(line)):\r
270 -            break\r
271 -        count = count + 1\r
272 -\r
273 -    del lines[0:count + 1]\r
274 -\r
275 -    header(outfile, *page)\r
276 -\r
277 -    outfile.write("".join(lines))\r
278 -    outfile.close()\r
279 -\r
280 -    system('set -x; rst2man {0} {1}/{2}.{3}'\r
281 -           .format(filename, outdir, page[0], page[4]))\r
282 -- \r
283 2.1.4\r
284 \r