<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[122854] trunk/doc-new/guide/xml/project.xml</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/122854">122854</a></dd>
<dt>Author</dt> <dd>cal@macports.org</dd>
<dt>Date</dt> <dd>2014-07-31 14:24:25 -0700 (Thu, 31 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>guide: add section on how to become a port's maintainer</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdocnewguidexmlprojectxml">trunk/doc-new/guide/xml/project.xml</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdocnewguidexmlprojectxml"></a>
<div class="modfile"><h4>Modified: trunk/doc-new/guide/xml/project.xml (122853 => 122854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/doc-new/guide/xml/project.xml        2014-07-31 21:07:55 UTC (rev 122853)
+++ trunk/doc-new/guide/xml/project.xml        2014-07-31 21:24:25 UTC (rev 122854)
</span><span class="lines">@@ -448,6 +448,237 @@
</span><span class="cx">         &lt;/listitem&gt;
</span><span class="cx">       &lt;/orderedlist&gt;
</span><span class="cx">     &lt;/section&gt;
</span><ins>+
+    &lt;section id=&quot;project.contributing.maintaining&quot;&gt;
+      &lt;title&gt;Becoming a Port Maintainer&lt;/title&gt;
+
+      &lt;para&gt;MacPorts is always looking for people that want to take care of
+        a certain package. If you notice an outdated port, a bug in a port or
+        simply a port without maintainer that you are interested in, feel free
+        to volunteer as maintainer. To become a maintainer you need:&lt;/para&gt;
+
+      &lt;itemizedlist&gt;
+        &lt;listitem&gt;
+          &lt;para&gt;An email address.&lt;/para&gt;
+        &lt;/listitem&gt;
+        &lt;listitem&gt;
+          &lt;para&gt;A copy of the &lt;filename&gt;Portfile&lt;/filename&gt;. Do not worry if
+            you don't know where to find one yet. There's more documentation
+            on that below.&lt;/para&gt;
+        &lt;/listitem&gt;
+        &lt;listitem&gt;
+          &lt;para&gt;An account in the &lt;ulink
+              url=&quot;https://trac.macports.org/&quot;&gt;MacPorts Trac&lt;/ulink&gt;,
+            preferrably with the email address you want to use for your
+            port.&lt;/para&gt;
+        &lt;/listitem&gt;
+        &lt;listitem&gt;
+          &lt;para&gt;Interest in the software you want to maintain and some time.&lt;/para&gt;
+        &lt;/listitem&gt;
+      &lt;/itemizedlist&gt;
+
+      &lt;para&gt;You do &lt;emphasis&gt;not&lt;/emphasis&gt; need:&lt;/para&gt;
+      &lt;itemizedlist&gt;
+        &lt;listitem&gt;
+          &lt;para&gt;Commit access to the MacPorts repository. Instead, you create
+            patches and open tickets in Trac. You can, however, &lt;link
+              linkend=&quot;project.membership&quot;&gt;apply for commit access&lt;/link&gt;
+            once you have some experience in maintaining ports. In fact, we
+            would like to encourage you to apply after a few months.&lt;/para&gt;
+        &lt;/listitem&gt;
+        &lt;listitem&gt;
+          &lt;para&gt;Expert knowldge of the software you want to maintain or
+            experience in &lt;filename&gt;Portfile&lt;/filename&gt; programming. You can
+            pick those up along the way. Your knowledge about the software
+            you want to maintain is probably more than what most other
+            MacPorts developers have, given the number of ports MacPorts has.
+            Consult &lt;xref linkend=&quot;development&quot; /&gt; chapter and &lt;xref
+              linkend=&quot;reference&quot; /&gt; on how to write
+            a &lt;filename&gt;Portfile&lt;/filename&gt;. If your questions are not
+            answered there, please ask on the
+            &lt;email&gt;macports-dev@lists.macosforge.org&lt;/email&gt; mailing
+            list.&lt;/para&gt;
+        &lt;/listitem&gt;
+      &lt;/itemizedlist&gt;
+
+      &lt;para&gt;
+        To become the maintainer of a port, first check whether the port
+        already has a maintainer. Run
+
+        &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port info --maintainer $portname&lt;/userinput&gt;&lt;/programlisting&gt;
+
+        where &lt;userinput&gt;$portname&lt;/userinput&gt; is the name of the port you want
+        to maintain. If the output is
+
+        &lt;screen&gt;maintainer: nomaintainer@macports.org&lt;/screen&gt;
+
+        the port is unmaintained and you are more than welcome to take it over.
+        If the output lists a different email address, you can still
+        co-maintain the port, but you should contact the existing maintainer(s)
+        first.
+      &lt;/para&gt;
+
+      &lt;para&gt;
+        Once you have verified that a port is unmaintained or the existing
+        maintainer has invited you to co-maintain the port of your choice,
+        follow these steps to become a maintainer:
+      &lt;/para&gt;
+
+      &lt;orderedlist&gt;
+        &lt;listitem&gt;
+          &lt;para&gt;Locate the port's directory and make a copy. MacPorts can help
+            you locate the directory that contains the
+            &lt;filename&gt;Portfile&lt;/filename&gt; by running &lt;userinput&gt;port dir
+              $portname&lt;/userinput&gt;. Copy this directory to a separate location
+            (so you can easily generate a patch later) that is readable by the
+            macports user. In general, your home directory does not fulfill
+            that requirement, but &lt;filename&gt;/var/tmp&lt;/filename&gt; does.
+
+            &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;cp -r $(port dir $portname) /var/tmp&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            Check &lt;filename&gt;/var/tmp&lt;/filename&gt; for the new directory. In most
+            cases, its name should be equal to the name of the port you want to
+            maintain. In those few cases where it is not (i.e., the so-called
+            &lt;option&gt;subports&lt;/option&gt; feature is used), check the output of
+            &lt;userinput&gt;port dir $portname&lt;/userinput&gt; for the correct name.
+          &lt;/para&gt;
+        &lt;/listitem&gt;
+
+        &lt;listitem&gt;
+          &lt;para&gt;Change to the new directory and run &lt;userinput&gt;port
+              info&lt;/userinput&gt; to make sure everything went right. Note that
+            running any port command without a port name tries to use the
+            &lt;filename&gt;Portfile&lt;/filename&gt; in the current directory. This is
+            very helpful when testing modifications or new ports, so keep this
+            in mind.
+          &lt;/para&gt;
+
+          &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;cd /var/tmp/$portname&lt;/userinput&gt;
+&lt;!--      --&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port info&lt;/userinput&gt;&lt;!--
+          --&gt;&lt;/programlisting&gt;
+
+          &lt;para&gt;If you don't see info output for the port, but an error message
+            instead, it will usually be in the following form:&lt;/para&gt;
+
+          &lt;screen&gt;Can't map the URL 'file://.' to a port description file (&quot;couldn't read file &quot;Portfile&quot;: permission denied&quot;).
+Please verify that the directory and portfile syntax are correct.
+To use the current port, you must be in a port's directory.&lt;/screen&gt;
+
+          &lt;para&gt;Pay attention to the part in the brackets in the first line. It
+            will either contain a permission problem (in which case you need to
+            adjust the permissions of your &lt;filename&gt;Portfile&lt;/filename&gt; and
+            the folders leading up to it), or a Tcl error message, in case of
+            syntax errors in the &lt;filename&gt;Portfile&lt;/filename&gt;. Also check that
+            the copy of the working directory is in fact the current working
+            directory in your shell.&lt;/para&gt;
+        &lt;/listitem&gt;
+
+        &lt;listitem&gt;
+          &lt;para&gt;Open the &lt;filename&gt;Portfile&lt;/filename&gt; in your favorite editor
+            and look for the line that starts with &lt;option&gt;maintainer&lt;/option&gt;.
+            Delete &lt;option&gt;nomaintainer&lt;/option&gt; from the line if it exists and
+            add your own email address in the form
+            &lt;userinput&gt;domain.tld:localpart&lt;/userinput&gt;. The address is
+            obfuscated to prevent email harvesters from automatically grabbing
+            your address. If you want, you can start fixing bugs in the
+            &lt;filename&gt;Portfile&lt;/filename&gt; as well.&lt;/para&gt;
+
+          &lt;para&gt;At this point, please read &lt;xref
+              linkend=&quot;project.update-policies.nonmaintainer&quot; /&gt; and
+            familiarize yourself with the meaning of
+            &lt;option&gt;openmaintainer&lt;/option&gt;. Consider adding
+            &lt;option&gt;openmaintainer&lt;/option&gt; to speed up and simplify small
+            updates of your port. If you decided to allow minor updates without
+            consultation, add &lt;userinput&gt;openmaintainer&lt;/userinput&gt;, separated
+            with a space, to the &lt;option&gt;maintainer&lt;/option&gt; line of the
+            &lt;filename&gt;Portfile&lt;/filename&gt;.&lt;/para&gt;
+
+          &lt;para&gt;Once you are done, save the file verify the
+            &lt;filename&gt;Portfile&lt;/filename&gt; structure using MacPorts' builtin
+            lint check:&lt;/para&gt;
+
+          &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port lint --nitpick&lt;/userinput&gt;&lt;/programlisting&gt;
+
+          &lt;para&gt;You will likely see at least one error:&lt;/para&gt;
+
+          &lt;screen&gt;Error: Portfile parent directory tmp does not match primary category $XYZ&lt;/screen&gt;
+
+          &lt;para&gt;You can safely ignore &lt;emphasis&gt;this&lt;/emphasis&gt; message. It is
+            printed because the copy of the port's directory is not in
+            a directory named after the port's primary category, but in
+            &lt;filename&gt;/var/tmp&lt;/filename&gt; instead. Please try to address all
+            other warnings and error messages, though. If you need help, feel
+            free to continue and add a note to the ticket you will
+            create asking for instructions.&lt;/para&gt;
+
+          &lt;para&gt;Finally, run &lt;userinput&gt;port info&lt;/userinput&gt; again. The
+            maintainers line in the output should now contain your email
+            address.&lt;/para&gt;
+
+          &lt;note&gt;
+            &lt;para&gt;If you made changes other than the maintainer line, you might
+              want to test build and installation as well. To do that, run
+              &lt;userinput&gt;sudo port destroot&lt;/userinput&gt; in the port's
+              directory. If you see&lt;/para&gt;
+
+            &lt;screen&gt;Error: Unable to execute port: Could not open file: /private/var/tmp/somewhere/Portfile&lt;/screen&gt;
+
+            &lt;para&gt;check the permissions of the &lt;filename&gt;Portfile&lt;/filename&gt; and
+              all folders above it. They must be readable by the
+              &lt;option&gt;macports&lt;/option&gt; user. The easiest way to ensure this is to run&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;chmod -R go+rX /var/tmp/$portname&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;If the port fails to build, see the
+              &lt;filename&gt;main.log&lt;/filename&gt; referenced in the error message for
+              details. If the build completes successfully, run &lt;userinput&gt;sudo
+                port clean&lt;/userinput&gt; to clean up all leftovers.&lt;/para&gt;
+          &lt;/note&gt;
+        &lt;/listitem&gt;
+
+        &lt;listitem&gt;
+          &lt;para&gt;Create a patch from the changes you made to the
+            &lt;filename&gt;Portfile&lt;/filename&gt; and possible related files. To do that, run&lt;/para&gt;
+
+          &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;diff -uR $(port dir $portname) . &gt; change-$portname-maintainer.diff&lt;/userinput&gt;&lt;/programlisting&gt;
+
+          &lt;para&gt;in the directory where you edited the
+            &lt;filename&gt;Portfile&lt;/filename&gt;. You can inspect the generated
+            unified diff in
+            &lt;filename&gt;change-$portname-maintainer.diff&lt;/filename&gt; if you
+            want.&lt;/para&gt;
+        &lt;/listitem&gt;
+
+        &lt;listitem&gt;
+          &lt;para&gt;Now, &lt;ulink url=&quot;https://trac.macports.org/newticket&quot;&gt;file
+              a new ticket in Trac&lt;/ulink&gt;. Set &lt;guilabel&gt;type&lt;/guilabel&gt; to
+            &lt;guilabel&gt;request&lt;/guilabel&gt; if you only changed the maintainer and
+            an appropriate other type if you also fixed a bug or enhanced or
+            updated the port. Leave the &lt;guilabel&gt;milestone&lt;/guilabel&gt; field
+            empty. If you added yourself as co-maintainer, add the other
+            maintainers in the &lt;guilabel&gt;Cc&lt;/guilabel&gt; field. Finally, fill in
+            the &lt;guilabel&gt;port&lt;/guilabel&gt; field, set
+            &lt;guilabel&gt;keywords&lt;/guilabel&gt; to &lt;userinput&gt;haspatch&lt;/userinput&gt;
+            (because you are attaching a patch), check the box that you want to
+            attach files to the ticket and submit. After submission, attach the
+            patch you created in the previous step.&lt;/para&gt;
+        &lt;/listitem&gt;
+
+        &lt;listitem&gt;
+          &lt;para&gt;If your ticket doesn't receive any attention within a few days
+            (for example, because the port you are trying to modify does not
+            have a maintainer), you may email
+            &lt;email&gt;macports-dev@lists.macosforge.org&lt;/email&gt; and request
+            a review and/or commit.&lt;/para&gt;
+        &lt;/listitem&gt;
+      &lt;/orderedlist&gt;
+
+      &lt;para&gt;Once you are the maintainer for a port, all new tickets for this
+        port will be assigned to you. You are expected to take a look at these
+        tickets, give advice and try to debug problems. If you are stuck, do
+        not hesitate to ask on the
+        &lt;email&gt;macports-dev@lists.macosforge.org&lt;/email&gt; list.&lt;/para&gt;
+    &lt;/section&gt;
</ins><span class="cx">   &lt;/section&gt;
</span><span class="cx"> 
</span><span class="cx">   &lt;section id=&quot;project.update-policies&quot;&gt;
</span></span></pre>
</div>
</div>

</body>
</html>