From 8c4d8eb3e607da57c265d121b2c32f66ac2d6b67 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Sun, 8 Jan 2017 13:45:03 +0100
Subject: [PATCH] Use MultiMarkdown instead of Org-Mode

This reduces the current formatting languages used from four to three,
and removes the build dependency on emacs and the overhead of having to
know an application specific formatting language.

Closes: #849483
---
 Makefile                  |  12 +-
 Process.org => Process.md |  99 ++++++++-------
 README-css.el             |  75 ------------
 README-header.tex         |  22 ----
 README.css                |  24 ++++
 README.org => README.md   | 301 ++++++++++++++++++++++------------------------
 autopkgtest/Makefile      |   4 +-
 debian/control            |   3 +-
 debian/rules              |  22 ++--
 9 files changed, 242 insertions(+), 320 deletions(-)
 rename Process.org => Process.md (71%)
 delete mode 100644 README-css.el
 delete mode 100644 README-header.tex
 create mode 100644 README.css
 rename README.org => README.md (58%)

diff --git a/Makefile b/Makefile
index 10b0f5a..bc649d7 100644
--- a/Makefile
+++ b/Makefile
@@ -4,14 +4,12 @@ policy.sgml: version.ent
 menu-policy.sgml: version.ent
 perl-policy.sgml: version.ent
 
-%.txt: %.org
-	$(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
-          --funcall org-ascii-export-to-ascii
+%.txt: %.md
+	cat $^ > $@
 	test "$@" != "README.txt"  ||                            \
-           perl -pli -e 's,./Process.org,Process.txt,g' $@
-%.html: %.org
-	$(EMACS) --batch -Q -l ./README-css.el -l org --visit $^ \
-	   --funcall org-html-export-to-html
+           perl -pli -e 's,./Process.md,Process.txt,g' $@
+%.html: %.md
+	$(MDWN) $< > $@
 
 %.validate: %
 	onsgmls -wall -gues $<
diff --git a/Process.org b/Process.md
similarity index 71%
rename from Process.org
rename to Process.md
index 75d3c2c..3057ade 100644
--- a/Process.org
+++ b/Process.md
@@ -1,19 +1,17 @@
-# -*- mode: org; fill-column: 78 -*-
-#+STARTUP: showall
-#+STARTUP: lognotedone lognotestate
-#+OPTIONS: H:4 toc:2
-#+TITLE:  Debian Policy changes process
-#+AUTHOR: Margarita Manterola, Clint Adams, Russ Allbery, and Manoj Srivastava
-#+EMAIL: srivasta@debian.org
-#+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:nil skip:t d:nil tags:not-in-toc
-#+LINK_HOME: http://wiki.debian.org/Teams/Policy
-#+LINK_UP: http://www.debian.org/
-#+LATEX_HEADER: \input{README-header.tex}
+Format: complete
+Title: Debian Policy changes process
+Author: Margarita Manterola, Clint Adams, Russ Allbery, and Manoj Srivastava
+Email: debian-policy@packages.debian.org
+Link Home: http://wiki.debian.org/Teams/Policy
+Link Up: http://www.debian.org/
+XHTML Header: <style type="text/css">h1 { text-align: center; }</style>
+
+# Debian Policy changes process
 
 To introduce a change in the current DebianPolicy, the change proposal
 has to go through a certain process.
 
-* Change Goals
+## Change Goals
 
 + The change should be technically correct, and consistent with the
   rest of the policy document. This means no legislating the value of
@@ -38,14 +36,14 @@ has to go through a certain process.
   access to policy change proposals, even if they do not subscribe to
   policy mailing lists (policy gazette?).
 
-* Current Process
+## Current Process
 
 Each suggested change goes through different states. These states are
 denoted through either usertags of the
-[[mailto:debian-policy@packages.debian.org][debian-policy@packages.debian.org]] user or, for patch, pending, and
-wontfix, regular tags.
+[debian-policy@packages.debian.org](mailto:debian-policy@packages.debian.org)
+user or, for patch, pending, and wontfix, regular tags.
 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done][Current list of bugs]]
+[Current list of bugs](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done)
 
 The Policy delegates are responsible for managing the tags on bugs and
 will update tags as new bugs are submitted or as activity happens on
@@ -53,12 +51,12 @@ bugs. All Debian Developers should feel free to add the seconded tag
 as described below. Other tags should be changed with the coordination
 of the Policy Team.
 
-** State A: Issue raised
+### State A: Issue raised
 
 Detect need, like gaps/flaws in current policy, or a new rule should
 be added. Any user or developer may start this step. There is a
 decision point here, not all issues are in scope of policy.
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&tag=issue][TAG: issue]]
+[TAG: issue](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&tag=issue)
 
 What needs to happen next: If this is in scope for Policy, discuss the
 issue and possible solutions, moving to the discussion tag, or if the
@@ -66,22 +64,22 @@ matter is sufficiently clear, go directly to a proposal for how to
 address it, moving to the proposal tag. If this is not in scope for
 Policy, close the bug.
 
-** State B: Discussion
+### State B: Discussion
 
 Discuss remedy. Alternate proposals. Discussion guided by
 delegates. There should be a clear time limit to this stage, but as
 yet we have not set one.
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=discussion][TAG: discussion]]
+[TAG: discussion](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=discussion)
 
 What needs to happen next: Reach a conclusion and consensus in the
 discussion and make a final proposal for what should be changed (if
 anything), moving to the proposal tag.
 
-** State C: Proposal
+### State C: Proposal
 
 A final proposal has emerged from the discussion, and there is a rough
-consensus on how to proceed to resolve the issue. 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=proposal][TAG: proposal]]
+consensus on how to proceed to resolve the issue.
+[TAG: proposal](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=proposal)
 
 What needs to happen next: Provided that the rough consensus persists,
 develop a patch against the current Policy document with specific
@@ -89,20 +87,20 @@ wording of the change. Often this is done in conjunction with the
 proposal, in which case one may skip this step and move directly to
 patch tag.
 
-** State D: Wording proposed
+### State D: Wording proposed
 
 A patch against the Policy document reflecting the consensus has been
 created and is waiting for formal seconds. The standard patch tag is
 used for this state, since it's essentially equivalent to the standard
-meaning of that tag. 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=patch][TAG: patch]]
+meaning of that tag.
+[TAG: patch](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=patch)
 
 What needs to happen next: The proposal needs to be reviewed and
 seconded. Any Debian developer who agrees with the change and the
 conclusion of rough consensus from the discussion should say so in the
 bug log by seconding the proposal.
 
-** State E: Seconded
+### State E: Seconded
 
 The proposal is signed off on by N Debian Developers. To start with,
 we're going with N=3, meaning that if three Debian Developers agree,
@@ -113,8 +111,8 @@ partly a technical project governance method, one must be a Debian
 Developer to formally second, although review and discussion is
 welcome from anyone. Once this tag has been applied, the bug is
 waiting for a Policy team member to apply the patch to the package
-repository. 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=seconded][TAG: seconded]]
+repository.
+[TAG: seconded](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=seconded)
 
 What needs to happen next: A Policy maintainer does the final review
 and confirmation, and then applies the patch for the next Policy
@@ -124,18 +122,18 @@ This tag is not used very much because normally a Policy maintainer
 applies the patch and moves the proposal to the next state once enough
 seconds are reached.
 
-** State F: Accepted
+### State F: Accepted
 
 Change accepted, will be in next upload. The standard pending tag is
 used for this state since it matches the regular meaning of
-pending. 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=pending][TAG: pending]]
+pending.
+[TAG: pending](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=pending)
 
 What needs to happen next: The bug is now in the waiting queue for the
 next Policy release, and there's nothing left to do except for upload
 a new version of Policy.
 
-** State G: Reject
+### State G: Reject
 
 Rejected proposals. The standard wontfix is used for this
 state. Normally, bugs in this state will not remain open; instead, a
@@ -143,42 +141,51 @@ Policy team member will close them with an explanation. The submitter
 may then appeal to the tech-ctte if they so desire. Alternately,
 issues appealed to the tech-ctte may remain open with this tag while
 that appeal proceeds.
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=rejected][TAG: wontfix]]
+[TAG: wontfix](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=rejected)
 
 We may use one of the following tags here, but to date we have only
 used dubious and ctte. It's not clear whether we need more tags for
 this tage.
 
-+ *dubious* :: Not a policy matter 
-+ *ctte* :: Referred to the Technical Committee (tech-ctte) 
-+ *devel* :: Referred to the developer body 
-+ *delegate* :: Rejected by a Policy delegate 
-+ *obsolete* :: The proposal timed out without a conclusion 
+**dubious**
+:   Not a policy matter
+
+**ctte**
+:   Referred to the Technical Committee (tech-ctte)
+
+**devel**
+:   Referred to the developer body
+
+**delegate**
+:   Rejected by a Policy delegate
+
+**obsolete**
+:   The proposal timed out without a conclusion
 
 What needs to happen next: The bug should be closed once a final
 resolution is reached, or retagged to an appropriate state if that
 final resolution reverses the decision to reject the proposal.
 
-* Other Tags
+## Other Tags
 
 All Policy bugs are additionally categorized by class of bug.
 
 The normative tag is used for bugs that make normative changes to
 Policy, meaning that the dictates of Policy will change in some
 fashion as part of the resolution of the bug if the proposal is
-accepted. The full process is followed for such bugs. 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=normative][TAG: normative]]
+accepted. The full process is followed for such bugs.
+[TAG: normative](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=normative)
 
 The informative tag is used for bugs about wording issues, typos,
 informative footnotes, or other changes that do not affect the formal
 dictates of Policy, just the presentation. The same tags are used for
 these bugs for convenience, but the Policy maintainers may make
 informative changes without following the full process. Informative
-bugs fall under their discretion. 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=informative][TAG: informative]]
+bugs fall under their discretion.
+[TAG: informative](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=informative)
 
 The packaging tag is used for bugs about the packaging and build
 process of the debian-policy Debian package. These bugs do not follow
 the normal process and will not have the other tags except for pending
-and wontfix (used with their normal meanings). 
-[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=packaging][TAG: packaging]]
+and wontfix (used with their normal meanings).
+[TAG: packaging](http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=debian-policy&pend-exc=done&tag=packaging)
diff --git a/README-css.el b/README-css.el
deleted file mode 100644
index 7dfb41b..0000000
--- a/README-css.el
+++ /dev/null
@@ -1,75 +0,0 @@
-(setq
- org-export-html-style-include-default nil
- org-export-html-style
-      "
-<style type=\"text/css\">
-  html { font-family: Times, serif; font-size: 12pt; }
-  .title  { text-align: center; }
-  p.verse { margin-left: 3% }
-  pre {
-        border: 1pt solid #AEBDCC;
-        color: #000000;
-        background-color: LightSlateGray;
-        padding: 5pt;
-        font-family: \"Courier New\", courier, monospace;
-        font-size: 90%;
-        overflow:auto;
-  }
-  dt { font-weight: bold; }
-  div.figure { padding: 0.5em; }
-  div.figure p { text-align: center; }
-  .linenr { font-size:smaller }
-  .code-highlighted {background-color:#ffff00;}
-  .org-info-js_info-navigation { border-style:none; }
-  #org-info-js_console-label { font-size:10px; font-weight:bold;
-                               white-space:nowrap; }
-  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
-                                 font-weight:bold; }
-
-  body {
-   color: black;
-   background-color: white;
-   font-family: Palatino, \"Palatino Linotype\", \"Hoefler Text\", \"Times New Roman\", Times, Georgia, Utopia, serif;
-  }
-  .org-agenda-date          { color: #87cefa;    }
-  .org-agenda-structure     { color: #87cefa;    }
-  .org-scheduled            { color: #98fb98;    }
-  .org-scheduled-previously { color: #ff7f24;    }
-  .org-scheduled-today      { color: #98fb98;    }
-  .org-tag                  { font-weight: bold; }
-  .org-todo                 {
-    color: #ffc0cb;
-    font-weight: bold;
-  }
- 
-  a:hover { text-decoration: underline; }
-  .todo  { font-weight:bold; }
-  .done { font-weight:bold; }
-  .TODO { color:red; }
-  .WAITING { color:orange; }
-  .DONE { color:green; }
-  .timestamp { color: grey }
-  .timestamp-kwd { color: CadetBlue }
-  .tag { background-color:lightblue; font-weight:normal }
-  .target { background-color: lavender; }
-table {
-        border-collapse: collapse; /*separate; */
-        border: outset 3pt;
-        border-spacing: 0pt;
-        /* border-spacing: 5pt; */
-        }
-table td             { vertical-align: top; border: 1px solid; }
-table th             { vertical-align: top; border: 2px solid; }
-</style>
-<script =\"text/javascript\" language=\"JavaScript\" src=\"/styles/org-info.js\"></script>
-<script type=\"text/javascript\" language=\"JavaScript\">
-/* <![CDATA[ */
-org_html_manager.set(\"LOCAL_TOC\", 0);
-org_html_manager.set(\"VIEW_BUTTONS\", 1);
-org_html_manager.set(\"VIEW\", \"info\");
-org_html_manager.set(\"TOC\", 1);
-org_html_manager.set(\"MOUSE_HINT\", \"underline\"); // could be a background-color like #eeeeee
-org_html_manager.setup ();
-/* ]]> */
-</script>
-")
diff --git a/README-header.tex b/README-header.tex
deleted file mode 100644
index 6073d76..0000000
--- a/README-header.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-\usepackage{landscape}
-
-\setlength{\oddsidemargin}{0in}		% default=0in
-\setlength{\textwidth}{9in}		% default=9in
-
-\setlength{\columnsep}{0.5in}		% default=10pt
-\setlength{\columnseprule}{1pt}		% default=0pt (no line)
-
-\setlength{\textheight}{5.85in}		% default=5.15in
-\setlength{\topmargin}{-0.15in}		% default=0.20in
-\setlength{\headsep}{0.25in}		% default=0.35in
-
-\setlength{\parskip}{1.2ex}
-\setlength{\parindent}{0mm}
-\pagestyle{empty}
-
-\setlength{\headheight}{0pt}
-\setlength{\headsep}{0pt}
-\setlength{\footskip}{5pt}
-\setlength{\textheight}{9.0in}
-\setlength{\textwidth}{6.5in}
-
diff --git a/README.css b/README.css
new file mode 100644
index 0000000..e3a05a2
--- /dev/null
+++ b/README.css
@@ -0,0 +1,24 @@
+h1 { text-align: center; }
+pre {
+    border: 1px solid #ccc;
+    box-shadow: 3px 3px 3px #eee;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+}
+pre code {
+    position: relative;
+    overflow: visible;
+    padding-top: 1.2em;
+}
+pre code:before {
+    display: none;
+    position: absolute;
+    background-color: white;
+    top: -10px;
+    right: 10px;
+    padding: 3px;
+    border: 1px solid black;
+}
+pre code:hover:before { display: inline; }
diff --git a/README.org b/README.md
similarity index 58%
rename from README.org
rename to README.md
index a86f9e3..76a236b 100644
--- a/README.org
+++ b/README.md
@@ -1,81 +1,79 @@
-# -*- mode: org; fill-column: 78 -*-
-#+STARTUP: showall
-#+STARTUP: lognotedone lognotestate
-#+OPTIONS: H:4 toc:2
-#+TITLE:  Debian Policy
-#+AUTHOR: Manoj Srivastava And Russ Allbery
-#+EMAIL: srivasta@debian.org
-#+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:nil skip:t d:nil tags:not-in-toc
-#+LINK_HOME: http://wiki.debian.org/Teams/Policy
-#+LINK_UP: http://www.debian.org/
-#+LATEX_HEADER: \input{README-header.tex}
-* Infrastructure
-
-+ Website:: http://www.debian.org/doc/devel-manuals#policy
-+ Mailing list:: debian-policy@lists.debian.org lists
+Format: complete
+Css: README.css
+Title: Debian Policy
+Author: Manoj Srivastava and Russ Allbery
+Email: debian-policy@packages.debian.org
+Link Home: http://wiki.debian.org/Teams/Policy
+Link Up: http://www.debian.org/
+
+# Debian Policy
+
+## Infrastructure
+
++ Website:: <http://www.debian.org/doc/devel-manuals#policy>
++ Mailing list:: <debian-policy@lists.debian.org> lists
 + Source Code::
   * git clone git://anonscm.debian.org/dbnpolicy/policy.git
-  * Browser: http://anonscm.debian.org/gitweb/?p=dbnpolicy/policy.git 
+  * Browser: <http://anonscm.debian.org/gitweb/?p=dbnpolicy/policy.git>
 + Unix group:: dbnpolicy
-+ Alioth Project:: http://alioth.debian.org/projects/dbnpolicy (exists
++ Alioth Project:: <http://alioth.debian.org/projects/dbnpolicy> (exists
   to manage the repository but not otherwise used)
 
-** Interacting with the team
+### Interacting with the team
 
-+ Email contact:: mailto:debian-policy@lists.debian.org
-+ Request tracker:: http://bugs.debian.org/src:debian-policy
++ Email contact:: <debian-policy@lists.debian.org>
++ Request tracker:: <http://bugs.debian.org/src:debian-policy>
 
 Debian Policy uses a formal procedure and a set of user tags to manage
 the lifecycle of change proposals. For definitions of those tags and
 proposal states and information about what the next step is for each
-phase, see [[./Process.org][Policy changes process]].
+phase, see [Policy changes process](./Process.md).
 
 Once the wording for a change has been finalized, please send a patch
 against the current Git master branch to the bug report, if you're not
 familiar with Git, the following commands are the basic process:
 
-#+BEGIN_SRC Sh
-git clone git://anonscm.debian.org/dbnpolicy/policy.git
-git checkout -b <local-branch-name>
-
-# edit files, but don't make changes to upgrading-checklist or debian/changelog
-git add <files>
-git commit
-# repeat as necessary
-
-# update your branch against the current master
-git checkout master
-git pull
-
-git checkout master
-git merge --no-commit <local-branch-name>
-git reset --hard HEAD;
-git checkout <local-branch-name>; 
-
-# If there are changes in master that make the branch not apply cleanly, there
-# should have been en error during the merge step above. If there was an
-# error, merge the master branch into the local branch, fix the conflicts, and
-# commit the new version of the local branch.
- : git merge master
-# Edit files to remove conflict
- : git commit -s 
-
-# Checkout the local branch, to create the patch to send to the policy
-git checkout <local-branch-name>
-dir=$(mktemp -d)
-git format-patch -o $dir -s master
-# check out the patches created in $dir
-git send-email --from "you <your@email>"             \
-               --to debian-policy@lists.debian.org   \
-               $dir/
-#+END_SRC
-
-<local-branch-name> is some convenient name designating your local
+
+    git clone git://anonscm.debian.org/dbnpolicy/policy.git
+    git checkout -b <local-branch-name>
+
+    # edit files, but don't make changes to upgrading-checklist or debian/changelog
+    git add <files>
+    git commit
+    # repeat as necessary
+
+    # update your branch against the current master
+    git checkout master
+    git pull
+
+    git checkout master
+    git merge --no-commit <local-branch-name>
+    git reset --hard HEAD;
+    git checkout <local-branch-name>;
+
+    # If there are changes in master that make the branch not apply cleanly,
+    # there should have been en error during the merge step above. If there
+    # was an error, merge the master branch into the local branch, fix the
+    # conflicts, and commit the new version of the local branch.
+     : git merge master
+    # Edit files to remove conflict
+     : git commit -s
+
+    # Checkout the local branch, to create the patch to send to the policy
+    git checkout <local-branch-name>
+    dir=$(mktemp -d)
+    git format-patch -o $dir -s master
+    # check out the patches created in $dir
+    git send-email --from "you <your@email>"             \
+                   --to debian-policy@lists.debian.org   \
+                   $dir/
+
+&lt;local-branch-name&gt; is some convenient name designating your local
 changes. You may want to use some common prefix like local-. You can
 use git format-patch and git send-email if you want, but usually it's
 overkill.
 
-* Usual Roles
+## Usual Roles
 
 The Debian Policy team are official project delegates (see the DPL
 delegation). All of the Policy team members do basically the same
@@ -87,7 +85,7 @@ consensus has been reached. The current delegates are:
 + Jonathan Nieder (jrnieder)
 + Russ Allbery (rra)
 
-* Task description
+## Task description
 
 The Debian Policy team is responsible for maintaining and coordinating
 updates to the Debian Policy Manual and all the other policy documents
@@ -98,17 +96,13 @@ The Debian Policy Editors:
 + Guide the work on the Debian Policy Manual and related documents as a
   collaborative process where developers review and second or object to
   proposals, usually on the debian-policy mailing list.
-
 + Count seconds and weight objections to proposals, to determine whether
   they have reached sufficient consensus to be included, and accept
   consensual proposals.
-
 + Reject or refer to the Technical Committee proposals that fail to
   reach consensus.
-
 + Commit changes to the version control system repository used to
   maintain the Debian Policy Manual and related documents.
-
 + Maintain the "debian-policy" package. As package maintainers, they
   have the last word on package content, releases, bug reports, etc.
 
@@ -120,27 +114,28 @@ mailing list without being project delegates.
 
 In addition to the main technical manual, the team currently also maintains:
 
-+ [[http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/][Machine-readable debian/copyright format]]
-+ [[http://www.debian.org/doc/packaging-manuals/menu-policy/][Debian Menu sub-policy]]
-+ [[http://www.debian.org/doc/packaging-manuals/perl-policy/][Debian Perl Policy]]
-+ [[http://www.debian.org/doc/packaging-manuals/debconf_specification.html][Debconf Specification]]
-+ [[http://www.debian.org/doc/packaging-manuals/virtual-package-names-list.txt][Authoritative list of virtual package names ]]
++ [Machine-readable debian/copyright format](http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/)
++ [Debian Menu sub-policy](http://www.debian.org/doc/packaging-manuals/menu-policy/)
++ [Debian Perl Policy](http://www.debian.org/doc/packaging-manuals/perl-policy/)
++ [Debconf Specification](http://www.debian.org/doc/packaging-manuals/debconf_specification.html)
++ [Authoritative list of virtual package names ](http://www.debian.org/doc/packaging-manuals/virtual-package-names-list.txt)
 
-These documents are maintained using the [[./Process.org][Policy changes process]], and
+These documents are maintained using the [Policy changes process](./Process.md), and
 the current state of all change proposals is tracked using the
-[[http://bugs.debian.org/src:debian-policy][debian-policy BTS]].
+[debian-policy BTS](http://bugs.debian.org/src:debian-policy).
 
-* Get involved
+## Get involved
 
-The best way to help is to review the [[http://bugs.debian.org/src:debian-policy][current open bugs]], pick a bug
-that no one is currently shepherding (ask on
-[[mailto:debian-policy@lists.debian.org][debian-policy@lists.debian.org]] if you're not sure if a particular bug
+The best way to help is to review the [current open bugs](http://bugs.debian.org/src:debian-policy),
+pick a bug that no one is currently shepherding (ask on
+[debian-policy@lists.debian.org](mailto:debian-policy@lists.debian.org) if
+you're not sure if a particular bug
 is being shepherded), and help it through the change process. This
 will involve guiding the discussion, seeking additional input
 (particularly from experts in the area being discussed), possibly
 raising the issue on other mailing lists, proposing or getting other
 people to propose specific wording changes, and writing diffs against
-the current Policy document. All of the steps of [[./Process.org][Policy changes process]] 
+the current Policy document. All of the steps of [Policy changes process](./Process.md)
 can be done by people other than Policy team members except
 the final acceptance steps and almost every change can be worked on
 independently, so there's a lot of opportunity for people to help.
@@ -166,35 +161,36 @@ There are also some other, larger projects:
 + Policy has grown organically over the years and suffers from
   organizational issues because of it. It also doesn't make use of the
   abilities that a current XML language might give us, such as being
-  able to extract useful portions of the document (all *must*
+  able to extract useful portions of the document (all **must**
   directives, for example). There has been quite a bit of discussion
   of a new format that would allow for this, probably as part of
   switching to DocBook, but as yet such a reorganization and reworking
   has not been started.
 
 If you want to work on any of these projects, please mail
-[[mailto:debian-policy@lists.debian.org][debian-policy@lists.debian.org ]] for more information. We'll be happy to
-help you get started.
+[debian-policy@lists.debian.org](mailto:debian-policy@lists.debian.org)
+for more information. We'll be happy to help you get started.
 
-** Maintenance procedures
+## Maintenance procedures
 
-** Repository layout
+### Repository layout
 
 The Git repository used for Debian Policy has the following branches:
 
-+  master:: the current accepted changes that will be in the next release
-+  bug<number>-<user>:: changes addressing bug <number>, shepherded by <user>
-+  rra:: old history of Russ's arch repository, now frozen
-+  srivasta:: old history of Manoj's arch repository 
++ master:: the current accepted changes that will be in the next release
++ bug&lt;number&gt;-&lt;user&gt;:: changes addressing bug &lt;number&gt;,
+  shepherded by &lt;user&gt;
++ rra:: old history of Russ's arch repository, now frozen
++ srivasta:: old history of Manoj's arch repository
 
-** Managing a bug
+### Managing a bug
 
 The process used by Policy team members to manage a bug, once there is
 proposed wording, is:
 
-+ Create a bug<number>-<user> branch for the bug, where <number> is
-  the bug number in the BTS and <user> is a designator of the Policy
-  team member who is shepherding the bug.
++ Create a bug&lt;number&gt;-&lt;user&gt; branch for the bug, where
+  &lt;number&gt; is the bug number in the BTS and &lt;user&gt;is a
+  designator of the Policy team member who is shepherding the bug.
 + Commit wording changes in that branch until consensus is
   achieved. Do not modify debian/changelog or upgrading-checklist.html
   during this phase. Use the BTS to track who proposed the wording and
@@ -211,78 +207,73 @@ proposed wording, is:
 + Delete the now-merged branch.
 
 The Git commands used for this workflow are:
-#+BEGIN_SRC Sh
-git checkout -b bug12345-rra master
-# edit files
-# git add files
-git commit
-git push origin bug12345-rra
-# iterate until good
-# update your local master branch
-git checkout master
-git pull
-
-git checkout master
-git merge --no-commit bug12345-rra
-git reset --hard HEAD;
-
-# If there are changes in master that make the branch not apply cleanly, there
-# should have been en error during the merge step above. If there was an
-# error, merge the master branch into the local branch, fix the conflicts, and
-# commit the new version of the local branch.
- : git checkout bug12345-rra
- : git merge master
-# Edit files to remove conflict
- : git commit -s 
-
-git checkout master
-git merge bug12345-rra
-# edit debian/changelog and upgrading-checklist.html
-git add debian/changelog upgrading-checklist.html
-git commit
-git push origin master
-git branch -d bug12345-rra
-git push origin :bug12345-rra
-#+END_SRC
+
+    git checkout -b bug12345-rra master
+    # edit files
+    # git add files
+    git commit
+    git push origin bug12345-rra
+    # iterate until good
+    # update your local master branch
+    git checkout master
+    git pull
+
+    git checkout master
+    git merge --no-commit bug12345-rra
+    git reset --hard HEAD;
+
+    # If there are changes in master that make the branch not apply cleanly,
+    # there should have been en error during the merge step above. If there
+    # was an error, merge the master branch into the local branch, fix the
+    # conflicts, and commit the new version of the local branch.
+     : git checkout bug12345-rra
+     : git merge master
+    # Edit files to remove conflict
+     : git commit -s
+
+    git checkout master
+    git merge bug12345-rra
+    # edit debian/changelog and upgrading-checklist.html
+    git add debian/changelog upgrading-checklist.html
+    git commit
+    git push origin master
+    git branch -d bug12345-rra
+    git push origin :bug12345-rra
 
 For the debian/changelog entry, use the following format:
-#+BEGIN_EXAMPLE
-  * <document>: <brief change description>
-    Wording: <author of wording>
-    Seconded: <seconder>
-    Seconded: <seconder>
-    Closes: <bug numbers>
-#+END_EXAMPLE
+
+    * <document>: <brief change description>
+      Wording: <author of wording>
+      Seconded: <seconder>
+      Seconded: <seconder>
+      Closes: <bug numbers>
 
 For example:
-#+BEGIN_EXAMPLE
-  * Policy: better document version ranking and empty Debian revisions
-    Wording: Russ Allbery <rra@debian.org>
-    Seconded: Raphaël Hertzog <hertzog@debian.org>
-    Seconded: Manoj Srivastava <srivasta@debian.org>
-    Seconded: Guillem Jover <guillem@debian.org>
-    Closes: #186700, #458910
-#+END_EXAMPLE
 
-** Updating branches
+    * Policy: better document version ranking and empty Debian revisions
+      Wording: Russ Allbery <rra@debian.org>
+      Seconded: Raphaël Hertzog <hertzog@debian.org>
+      Seconded: Manoj Srivastava <srivasta@debian.org>
+      Seconded: Guillem Jover <guillem@debian.org>
+      Closes: #186700, #458910
+
+### Updating branches
 
 After commits to master have been pushed, either by you or by another
 Policy team member, you will generally want to update your working bug
 branches. The equivalent of the following commands should do that:
 
-#+BEGIN_SRC Sh
-for i in `git show-ref --heads | awk '{print $2}'`; do
-    j=$(basename $i)
-    if [ "$j" != "master" ]; then
-        git checkout $j && git merge master
-    fi
-done
-git push --all origin
-#+END_SRC
+    for i in `git show-ref --heads | awk '{print $2}'`; do
+        j=$(basename $i)
+        if [ "$j" != "master" ]; then
+            git checkout $j && git merge master
+        fi
+    done
+    git push --all origin
 
 assuming that you haven't packed the refs in your repository.
 
-** Making a release
+### Making a release
 
 For a final Policy release, change UNRELEASED to unstable in
 debian/changelog and update the timestamp to match the final release
@@ -293,11 +284,9 @@ that it builds and installs.
 
 Then, tag the repository and push the final changes to Alioth:
 
-#+BEGIN_SRC Sh
-git tag -s v3.8.0.0
-git push origin
-git push --tags origin
-#+END_SRC
+    git tag -s v3.8.0.0
+    git push origin
+    git push --tags origin
 
 replacing the version number with the version of the release, of course.
 
@@ -305,7 +294,7 @@ Finally, announce the new Policy release on debian-devel-announce,
 including in the announcement the upgrading-checklist section for the
 new release.
 
-** Setting release goals
+### Setting release goals
 
 Policy has a large bug backlog, and each bug against Policy tends to
 take considerable time and discussion to resolve. I've found it
@@ -314,8 +303,8 @@ of bugs and set as a target resolving them completely before the next
 Policy release. Resolving a bug means one of the following:
 
 + Proposing new language to address the bug that's seconded and approved by
-  the readers of the Policy list following the [[./Progress.org][Policy changes process]] (or
-  that's accepted by one of the Policy delegates if the change isn't
+  the readers of the Policy list following the [Policy changes process](./Progress.md)
+  (or that's accepted by one of the Policy delegates if the change isn't
   normative; i.e., doesn't change the technical meaning of the document).
 + Determining that the bug is not relevant to Policy and closing it.
 + Determining that either there is no consensus that the bug indicates
diff --git a/autopkgtest/Makefile b/autopkgtest/Makefile
index 8ec4719..1d0c5ad 100644
--- a/autopkgtest/Makefile
+++ b/autopkgtest/Makefile
@@ -1,7 +1,9 @@
+MDWN ?= multimarkdown
+
 all: autopkgtest.html autopkgtest.txt.gz
 
 autopkgtest.html: autopkgtest.md.expanded
-	markdown $< > $@
+	$(MDWN) $< > $@
 
 autopkgtest.txt.gz: autopkgtest.md.expanded
 	gzip -ncf9 $< > $@
diff --git a/debian/control b/debian/control
index 3184577..183d9f4 100644
--- a/debian/control
+++ b/debian/control
@@ -12,10 +12,9 @@ Build-Depends:
  debiandoc-sgml (>= 1.1.47),
  docbook-dsssl,
  docbook-xml,
- emacs25-nox | emacs25,
  groff,
  links | elinks,
- markdown,
+ libtext-multimarkdown-perl,
  openjade,
  opensp,
  pstoedit,
diff --git a/debian/rules b/debian/rules
index 761c0ba..3435772 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,11 +5,10 @@ package := $(shell grep Source debian/control | sed 's/^Source: //')
 date	:= $(shell date +"%Y-%m-%d")
 version := $(shell dpkg-parsechangelog | awk '/^Version:/ { print $$2; exit }')
 
-# Current version of Emacs used to build org-mode files.  Assume the build
-# dependencies pick up the correct version and we can use the generic name
-# to avoid changing things in multiple places when new versions are
-# released.
-EMACS   := emacs
+# Select the Markdown implementation to use.
+MDWN	:= multimarkdown
+
+export MDWN
 
 # Location of the source and build directories.
 SRCTOP	:= $(CURDIR)
@@ -22,9 +21,9 @@ LIBDIR	:= $(TMPTOP)/usr/share/doc-base
 # and generate a tarball of the source.
 SGML_FILES  := policy menu-policy perl-policy upgrading-checklist
 
-# org-mode source files in the top-level directory.  We generate text and
+# Markdown source files in the top-level directory.  We generate text and
 # HTML versions from these.
-ORG_FILES   := Process README
+MDWN_FILES  := Process README
 
 # doc-base description files for the documents we include.
 DESC_FILES  := copyright-format-1.0 debian-policy debian-menu-policy \
@@ -47,7 +46,8 @@ POLICY_FILES := $(SGML_FILES:=.sgml) $(SGML_FILES:=.txt.gz)		\
 		autopkgtest/autopkgtest.txt.gz				\
 		debconf_spec/debconf_specification.html			\
 		debconf_spec/debconf_specification.txt.gz		\
-		policy.ps.gz policy.pdf.gz README.txt README.html	\
+		policy.ps.gz policy.pdf.gz				\
+		README.txt README.html README.css			\
 		Process.txt Process.html
 
 # Used by the clean rules.  STAMPS_TO_CLEAN are the stamp files used to tell
@@ -58,7 +58,7 @@ STAMPS_TO_CLEAN := stamp-binary stamp-build
 DIRS_TO_CLEAN   := $(SGML_FILES:=.html) debian/tmp fhs
 FILES_TO_CLEAN	:= $(SGML_FILES:=.txt) $(SGML_FILES:=.txt.gz)		\
 		   $(SGML_FILES:=.html.tar.gz) $(SGML_FILES:=-1.html)	\
-		   $(ORG_FILES:=.html) $(ORG_FILES:=.txt)		\
+		   $(MDWN_FILES:=.html) $(MDWN_FILES:=.txt)		\
 		   policy.pdf.gz policy.ps.gz				\
 		   policy.pdf policy.ps policy.tpt policy.txt		\
 		   copyright-format/version.xml				\
@@ -83,8 +83,8 @@ stamp-build: version.ent copyright-format/version.xml \
                 $(SGML_FILES:=-1.html) \
 		$(SGML_FILES:=.txt.gz) \
 		policy.ps.gz policy.pdf.gz
-	$(MAKE) $(ORG_FILES:=.html) \
-		$(ORG_FILES:=.txt)
+	$(MAKE) $(MDWN_FILES:=.html) \
+		$(MDWN_FILES:=.txt)
 	$(MAKE) -C copyright-format all
 	$(MAKE) -C autopkgtest all
 	$(MAKE) -C debconf_spec all
-- 
2.11.0

