aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorStefan Monnier2011-03-21 12:42:16 -0400
committerStefan Monnier2011-03-21 12:42:16 -0400
commitcafdcef32d55cbb44389d7e322e7f973cbb72dfd (patch)
tree7ee0c41ea8a589650ce6f4311fb10e61a63807b9 /admin
parenta08a25d7aaf251aa18f2ef747be53734bc55cae9 (diff)
parent4e05e67e4cd0bc1b0a4ef3176a4d0d91c6b3738e (diff)
downloademacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.tar.gz
emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.zip
Merge from trunk
Diffstat (limited to 'admin')
-rw-r--r--admin/admin.el230
-rw-r--r--admin/make-tarball.txt9
-rw-r--r--admin/notes/BRANCH7
-rw-r--r--admin/notes/elpa62
4 files changed, 265 insertions, 43 deletions
diff --git a/admin/admin.el b/admin/admin.el
index 717bfee702d..70958ce1a76 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -212,6 +212,236 @@ Root must be the root of an Emacs source tree."
212 "\\\\def\\\\year{") 212 "\\\\def\\\\year{")
213 "\\([0-9]\\{4\\}\\)}.+%.+copyright year")))))) 213 "\\([0-9]\\{4\\}\\)}.+%.+copyright year"))))))
214 214
215;;; Various bits of magic for generating the web manuals
216
217(defun make-manuals (root)
218 "Generate the web manuals for the Emacs webpage."
219 (interactive "DEmacs root directory: ")
220 (let* ((dest (expand-file-name "manual" root))
221 (html-node-dir (expand-file-name "html_node" dest))
222 (html-mono-dir (expand-file-name "html_mono" dest))
223 (txt-dir (expand-file-name "text" dest))
224 (dvi-dir (expand-file-name "dvi" dest))
225 (ps-dir (expand-file-name "ps" dest)))
226 (when (file-directory-p dest)
227 (if (y-or-n-p (format "Directory %s exists, delete it first?" dest))
228 (delete-directory dest t)
229 (error "Aborted")))
230 (make-directory dest)
231 (make-directory html-node-dir)
232 (make-directory html-mono-dir)
233 (make-directory txt-dir)
234 (make-directory dvi-dir)
235 (make-directory ps-dir)
236 ;; Emacs manual
237 (let ((texi (expand-file-name "doc/emacs/emacs.texi" root)))
238 (manual-html-node texi (expand-file-name "emacs" html-node-dir))
239 (manual-html-mono texi (expand-file-name "emacs.html" html-mono-dir))
240 (manual-txt texi (expand-file-name "emacs.txt" txt-dir))
241 (manual-pdf texi (expand-file-name "emacs.pdf" dest))
242 (manual-dvi texi (expand-file-name "emacs.dvi" dvi-dir)
243 (expand-file-name "emacs.ps" ps-dir)))
244 ;; Lisp manual
245 (let ((texi (expand-file-name "doc/lispref/elisp.texi" root)))
246 (manual-html-node texi (expand-file-name "elisp" html-node-dir))
247 (manual-html-mono texi (expand-file-name "elisp.html" html-mono-dir))
248 (manual-txt texi (expand-file-name "elisp.txt" txt-dir))
249 (manual-pdf texi (expand-file-name "elisp.pdf" dest))
250 (manual-dvi texi (expand-file-name "elisp.dvi" dvi-dir)
251 (expand-file-name "elisp.ps" ps-dir)))
252 (message "Manuals created in %s" dest)))
253
254(defconst manual-doctype-string
255 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
256\"http://www.w3.org/TR/html4/loose.dtd\">\n\n")
257
258(defconst manual-meta-string
259 "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
260<link rev=\"made\" href=\"mailto:webmasters@gnu.org\">
261<link rel=\"icon\" type=\"image/png\" href=\"/graphics/gnu-head-mini.png\">
262<meta name=\"ICBM\" content=\"42.256233,-71.006581\">
263<meta name=\"DC.title\" content=\"gnu.org\">\n\n")
264
265(defconst manual-style-string "<style type=\"text/css\">
266@import url('/style.css');\n</style>\n")
267
268(defun manual-html-mono (texi-file dest)
269 "Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
270This function also edits the HTML files so that they validate as
271HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
272the @import directive."
273 (call-process "makeinfo" nil nil nil
274 "--html" "--no-split" texi-file "-o" dest)
275 (with-temp-buffer
276 (insert-file-contents dest)
277 (setq buffer-file-name dest)
278 (manual-html-fix-headers)
279 (manual-html-fix-index-1)
280 (manual-html-fix-index-2 t)
281 (manual-html-fix-node-div)
282 (goto-char (point-max))
283 (re-search-backward "</body>[\n \t]*</html>")
284 (insert "</div>\n\n")
285 (save-buffer)))
286
287(defun manual-html-node (texi-file dir)
288 "Run Makeinfo on TEXI-FILE, emitting per-node HTML output to DIR.
289This function also edits the HTML files so that they validate as
290HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
291the @import directive."
292 (unless (file-exists-p texi-file)
293 (error "Manual file %s not found" texi-file))
294 (call-process "makeinfo" nil nil nil
295 "--html" texi-file "-o" dir)
296 ;; Loop through the node files, fixing them up.
297 (dolist (f (directory-files dir nil "\\.html\\'"))
298 (let (opoint)
299 (with-temp-buffer
300 (insert-file-contents (expand-file-name f dir))
301 (setq buffer-file-name (expand-file-name f dir))
302 (if (looking-at "<meta http-equiv")
303 ;; Ignore those HTML files that are just redirects.
304 (set-buffer-modified-p nil)
305 (manual-html-fix-headers)
306 (if (equal f "index.html")
307 (let (copyright-text)
308 (manual-html-fix-index-1)
309 ;; Move copyright notice to the end.
310 (re-search-forward "[ \t]*<p>Copyright &copy;")
311 (setq opoint (match-beginning 0))
312 (re-search-forward "</blockquote>")
313 (setq copyright-text (buffer-substring opoint (point)))
314 (delete-region opoint (point))
315 (manual-html-fix-index-2)
316 (insert copyright-text "\n</div>\n"))
317 ;; For normal nodes, give the header div a blue bg.
318 (manual-html-fix-node-div))
319 (save-buffer))))))
320
321(defun manual-txt (texi-file dest)
322 "Run Makeinfo on TEXI-FILE, emitting plaintext output to DEST."
323 (call-process "makeinfo" nil nil nil
324 "--plaintext" "--no-split" texi-file "-o" dest)
325 (shell-command (concat "gzip -c " dest " > " (concat dest ".gz"))))
326
327(defun manual-pdf (texi-file dest)
328 "Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST."
329 (call-process "texi2pdf" nil nil nil texi-file "-o" dest))
330
331(defun manual-dvi (texi-file dest ps-dest)
332 "Run texi2dvi on TEXI-FILE, emitting dvi output to DEST.
333Also generate postscript output in PS-DEST."
334 (call-process "texi2dvi" nil nil nil texi-file "-o" dest)
335 (call-process "dvips" nil nil nil dest "-o" ps-dest)
336 (call-process "gzip" nil nil nil dest)
337 (call-process "gzip" nil nil nil ps-dest))
338
339(defun manual-html-fix-headers ()
340 "Fix up HTML headers for the Emacs manual in the current buffer."
341 (let (opoint)
342 (insert manual-doctype-string)
343 (search-forward "<head>\n")
344 (insert manual-meta-string)
345 (search-forward "<meta")
346 (setq opoint (match-beginning 0))
347 (re-search-forward "<!--")
348 (goto-char (match-beginning 0))
349 (delete-region opoint (point))
350 (insert manual-style-string)
351 (search-forward "<meta http-equiv=\"Content-Style")
352 (setq opoint (match-beginning 0))
353 (search-forward "</head>")
354 (delete-region opoint (match-beginning 0))))
355
356(defun manual-html-fix-node-div ()
357 "Fix up HTML \"node\" divs in the current buffer."
358 (let (opoint div-end)
359 (while (search-forward "<div class=\"node\">" nil t)
360 (replace-match
361 "<div class=\"node\" style=\"background-color:#DDDDFF\">"
362 t t)
363 (setq opoint (point))
364 (re-search-forward "</div>")
365 (setq div-end (match-beginning 0))
366 (goto-char opoint)
367 (if (search-forward "<hr>" div-end 'move)
368 (replace-match "" t t)))))
369
370(defun manual-html-fix-index-1 ()
371 (let (opoint)
372 (re-search-forward "<body>\n\\(<h1 class=\"settitle\\)")
373 (setq opoint (match-beginning 1))
374 (search-forward "<h2 class=\"unnumbered")
375 (goto-char (match-beginning 0))
376 (delete-region opoint (point))
377 (insert "<div id=\"content\" class=\"inner\">\n\n")))
378
379(defun manual-html-fix-index-2 (&optional table-workaround)
380 "Replace the index list in the current buffer with a HTML table."
381 (let (done open-td tag desc)
382 ;; Convert the list that Makeinfo made into a table.
383 (search-forward "<ul class=\"menu\">")
384 (replace-match "<table style=\"float:left\" width=\"100%\">")
385 (forward-line 1)
386 (while (not done)
387 (cond
388 ((or (looking-at "<li>\\(<a.+</a>\\):[ \t]+\\(.*\\)$")
389 (looking-at "<li>\\(<a.+</a>\\)$"))
390 (setq tag (match-string 1))
391 (setq desc (match-string 2))
392 (replace-match "" t t)
393 (when open-td
394 (save-excursion
395 (forward-char -1)
396 (skip-chars-backward " ")
397 (delete-region (point) (line-end-position))
398 (insert "</td>\n </tr>")))
399 (insert " <tr>\n ")
400 (if table-workaround
401 ;; This works around a Firefox bug in the mono file.
402 (insert "<td bgcolor=\"white\">")
403 (insert "<td>"))
404 (insert tag "</td>\n <td>" (or desc ""))
405 (setq open-td t))
406 ((eq (char-after) ?\n)
407 (delete-char 1)
408 ;; Negate the following `forward-line'.
409 (forward-line -1))
410 ((looking-at "<!-- ")
411 (search-forward "-->"))
412 ((looking-at "<p>[- ]*The Detailed Node Listing[- \n]*")
413 (replace-match " </td></tr></table>\n
414<h3>Detailed Node Listing</h3>\n\n" t t)
415 (search-forward "<p>")
416 (search-forward "<p>")
417 (goto-char (match-beginning 0))
418 (skip-chars-backward "\n ")
419 (setq open-td nil)
420 (insert "</p>\n\n<table style=\"float:left\" width=\"100%\">"))
421 ((looking-at "</li></ul>")
422 (replace-match "" t t))
423 ((looking-at "<p>")
424 (replace-match "" t t)
425 (when open-td
426 (insert " </td></tr>")
427 (setq open-td nil))
428 (insert " <tr>
429 <th colspan=\"2\" align=\"left\" style=\"text-align:left\">")
430 (re-search-forward "</p>[ \t\n]*<ul class=\"menu\">")
431 (replace-match " </th></tr>"))
432 ((looking-at "[ \t]*</ul>[ \t]*$")
433 (replace-match
434 (if open-td
435 " </td></tr>\n</table>"
436 "</table>") t t)
437 (setq done t))
438 (t
439 (if (eobp)
440 (error "Parse error in %s" f))
441 (unless open-td
442 (setq done t))))
443 (forward-line 1))))
444
215(provide 'admin) 445(provide 'admin)
216 446
217;;; admin.el ends here 447;;; admin.el ends here
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt
index 6a8072de06c..9c47d6e1fa2 100644
--- a/admin/make-tarball.txt
+++ b/admin/make-tarball.txt
@@ -28,11 +28,14 @@ For each step, check for possible errors.
28 refer to a newer release of Emacs. (This is probably needed only 28 refer to a newer release of Emacs. (This is probably needed only
29 when preparing a major Emacs release, or branching for it.) 29 when preparing a major Emacs release, or branching for it.)
30 30
315. autoreconf -I m4 --force 315. Edit configure.in so that maintainer-mode is off by default.
32 (FIXME - need to find a better way of dealing with this).
33
34 autoreconf -I m4 --force
32 make bootstrap 35 make bootstrap
33 36
346. Commit configure, src/config.in, etc/AUTHORS, all the files changed 376. Commit etc/AUTHORS, all the files changed by M-x set-version, and
35 by M-x set-version, and lisp/cus-edit.el (if modified). 38 lisp/cus-edit.el (if modified).
36 Copy lisp/loaddefs.el to lisp/ldefs-boot.el and commit lisp/ldefs-boot.el. 39 Copy lisp/loaddefs.el to lisp/ldefs-boot.el and commit lisp/ldefs-boot.el.
37 For a release, also commit the ChangeLog files in all directories. 40 For a release, also commit the ChangeLog files in all directories.
38 41
diff --git a/admin/notes/BRANCH b/admin/notes/BRANCH
index 53f3d9603ca..9f09135f206 100644
--- a/admin/notes/BRANCH
+++ b/admin/notes/BRANCH
@@ -23,3 +23,10 @@ on what branch at any time.
23If you are looking at this file in a branch other than the trunk, 23If you are looking at this file in a branch other than the trunk,
24there may be some branch-specific documentation below this line. 24there may be some branch-specific documentation below this line.
25________________________________________________________________________ 25________________________________________________________________________
26
27* elpa
28
29 This branch does not contain a copy of Emacs, but of the Emacs Lisp
30 package archive (elpa.gnu.org). See admin/notes/elpa for further
31 explanation, and the README file in the branch for usage
32 instructions.
diff --git a/admin/notes/elpa b/admin/notes/elpa
index e28d81e6d6e..db14456fe32 100644
--- a/admin/notes/elpa
+++ b/admin/notes/elpa
@@ -1,42 +1,24 @@
1NOTES ON THE EMACS PACKAGE ARCHIVE 1NOTES ON THE EMACS PACKAGE ARCHIVE
2 2
3Here are instructions on uploading files to the package archive at 3The GNU Emacs package archive, at elpa.gnu.org, is managed using a Bzr
4elpa.gnu.org, for Emacs maintainers. (If you are not a maintainer, 4branch named "elpa", hosted on Savannah. To check it out:
5contact us if you want to submit a package.) 5
6 6 bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa
71. You will need login access to elpa.gnu.org. You will also need to 7 cd elpa
8 get the FSF sysadmins to allow ssh access through the FSF firewall 8 echo "public_branch = bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa" >> .bzr/branch/branch.conf
9 for your local machine. Ensure that your uid, USER, is in the 9 bzr bind bzr+ssh://USERNAME@bzr.savannah.gnu.org/emacs/elpa
10 `elpa' group on elpa.gnu.org; this gives you write access to the 10 [create task branch for edits, etc.]
11 bzr repository from which the packages are managed. 11
12 12Changes to this branch propagate to elpa.gnu.org in a semi-manual way.
132. Go to your bzr repository on your local machine. Of, if you don't 13There exists a copy of the elpa branch on that machine. Someone with
14 have one (you should, if you're tracking Emacs bzr), make one: 14access logs in, pulls the latest changes from Savannah, and runs a
15 15"deployment" script. This script (which is itself kept in the Bzr
16 cd $DEVHOME 16branch) generates the content visible at http://elpa.gnu.org/packages.
17 bzr init-repo elpa/ 17
18 cd elpa 18The reason we set things up this way, instead of using the package
19 19upload commands in package-x.el, is to let Emacs hackers conveniently
20 Create a branch for elpa: 20edit the contents of the "elpa" branch. (In particular, multi-file
21 21packages are stored on the branch in source form, not as tarfiles.)
22 bzr branch bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo package-repo 22
23 23It is easy to use the elpa branch to deploy a "local" copy of the
24 Bind the branch: 24package archive. For details, see the README file in the elpa branch.
25
26 cd package-repo/
27 echo "public_branch = bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo" >> .bzr/branch/branch.conf
28 bzr bind bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo
29
30 Now you should be able to do `bzr up' and `bzr commit'.
31
323. Changes in bzr do not immediately propagate to the user-facing tree
33 (i.e., what users see when they do `M-x list-packages'). That tree
34 is created by a (daily) cron job that does "bzr export". If for
35 some reason you need to refresh the user-facing tree immediately,
36 run /home/elpa/bin/package-update.sh as the "elpa" user.
37
38 The Org mode dailies are not part of the repository. After the
39 package-update.sh script creates the user-facing tree, it copies
40 the daily tarfile hosted on orgmode.org directly into that tree.
41
424. FIXME: How to actually upload a package file.