directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny (Confluence) <conflue...@apache.org>
Subject [CONF] Apache Directory Development > Releasing ApacheDS
Date Fri, 28 Jun 2013 07:55:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/en/2176/1/1/_/styles/combined.css?spaceKey=DIRxDEV&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/DIRxDEV/Releasing+ApacheDS">Releasing
ApacheDS</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~elecharny">Emmanuel
L├ęcharny</a>
    </h4>
        <br/>
                         <h4>Changes (3)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >$ cd ~/apacheds/production/content/apacheds/gen-docs
<br>$ mkdir &lt;version&gt; <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">$
svn add &lt;version&gt; <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat} <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>{noformat} <br></td></tr>
            <tr><td class="diff-changed-lines" >$ cp -r <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">~/apacheds/trunks/apacheds/target/checkout/target/site/apachedsdocs</span>
<span class="diff-added-words"style="background-color: #dfd;">~/apacheds/trunks/apacheds/target/checkout/target/site/apidocs</span>
~/apacheds/production/content/apacheds/gen-docs/&lt;version&gt; <br></td></tr>
            <tr><td class="diff-unchanged" >$ cp -r ~/apacheds/trunks/apacheds/target/checkout/target/site/xref
~/apacheds/production/content/apacheds/gen-docs/&lt;version&gt; <br>$  <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>{noformat} <br></td></tr>
            <tr><td class="diff-changed-lines" >$ svn add <span class="diff-changed-words">&lt;version&gt;<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">/*</span></span>
<br></td></tr>
            <tr><td class="diff-unchanged" >$ svn ci &lt;version&gt; -m
&quot;Injected &lt;version&gt; javadocs&quot; <br>{noformat} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <div>
<ul>
    <li><a href='#ReleasingApacheDS-Introduction'>Introduction</a></li>
    <li><a href='#ReleasingApacheDS-ManualStep'>Manual Step</a></li>
    <li><a href='#ReleasingApacheDS-Releaseprocess'>Release process</a></li>
</ul></div>

<h2><a name="ReleasingApacheDS-Introduction"></a>Introduction</h2>

<p>This will show you how to build and release the ApacheDS subproject.  Keep an eye
out for warning and note sections that show version specific differences in this process.
</p>

<h2><a name="ReleasingApacheDS-ManualStep"></a>Manual Step</h2>

<p>Some things have not yet been automated with maven and require users to manually
edit some files.  Below are the steps to follow.</p>

<h3><a name="ReleasingApacheDS-Updatetheapacheds%2Fpom.xml"></a>Update the
apacheds/pom.xml</h3>

<p>The current apacheds/pom.xml contains references to LDAP API SNAPSHOTs, which is
not good. You have to bump up those references to the latest LDAP-API version.</p>


<h3><a name="ReleasingApacheDS-Updateservice%2Fapacheds.shandservice%2Fapacheds.bat"></a>Update
service/apacheds.sh and service/apacheds.bat</h3>

<p>Edit the apacheds.sh/bat files in the service project directory to update the revision
numbers used in that file to reference non-SNAPSHOT releases.  </p>

<h2><a name="ReleasingApacheDS-Releaseprocess"></a>Release process</h2>

<p>Since we are using Nexus for releases the release process is as follows (see also
<a href="http://www.apache.org/dev/publishing-maven-artifacts.html#staging-maven" class="external-link"
rel="nofollow">http://www.apache.org/dev/publishing-maven-artifacts.html#staging-maven</a>).</p>

<h3><a name="ReleasingApacheDS-1.TesttheProject"></a>1. Test the Project</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:prepare -DdryRun=true
</pre>
</div></div>

<p>Replace the version by the new version. Be careful, and remove the 'apacheds-parent-'
which is proposed for the new tag. We should just use the version number.</p>

<h3><a name="ReleasingApacheDS-2.DeployaSnapshot"></a>2. Deploy a Snapshot</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn deploy
</pre>
</div></div>

<p>This is useful to verify your settings in ~/.m2/settings.xml (Nexus password and
GPG key)</p>

<h3><a name="ReleasingApacheDS-3.PreparetheRelease"></a>3. Prepare the Release</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:clean
$ mvn release:prepare
</pre>
</div></div>

<p>This creates a tag here: <a href="http://svn.apache.org/viewvc/directory/apacheds/tags/"
class="external-link" rel="nofollow">http://svn.apache.org/viewvc/directory/apacheds/tags/</a></p>

<h3><a name="ReleasingApacheDS-4.StagetheRelease"></a>4. Stage the Release</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ mvn release:perform
</pre>
</div></div>

<p>This deploys the release to a staging repository. Go to <a href="https://repository.apache.org/index.html#stagingRepositories"
class="external-link" rel="nofollow">https://repository.apache.org/index.html#stagingRepositories</a>
and close the staging repository.</p>

<h3><a name="ReleasingApacheDS-5.BuildtheSite"></a>5. Build the Site</h3>

<p>In order to generate the site, you have to comment some modules in the apacheds pom.xml
file :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>    &lt;!--module&gt;installers-maven-plugin&lt;/module--&gt;
    &lt;!--module&gt;installers&lt;/module--&gt;
</pre>
</div></div>

<p>Then you can start the maven command :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd target/checkout
$ mvn site
</pre>
</div></div>

<p>This creates the site and the Javadocs.</p>

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>Now, you have to sign the sources
packages which are in apacheds/target/checkout/target.

<p>Use your PGP key ID (the pub key, 4096R/[XXXXXXX] where [XXXXXXX] is the key ID)
</p>

<p>You can get the keys by typing :</p>

<p>    gpg --list-keys</p></td></tr></table></div>

<p>You can use this small script that does the job (copy-paste this code in a file named
sign.sh in your path) :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>#!/bin/sh

echo "PGP Key ID: "
read DEFAULT_KEY

echo "PGP Key Password: "
stty -echo
read PASSWORD
stty echo
echo ""

for FILE in $(find . -maxdepth 1 -not '(' -name "sign.sh" -or -name ".*" -or -name "*.md5"
-or -name "*.sha1" -or -name "*.asc" ')' -and -type f) ; do
    if [ -f "$FILE.asc" ]; then
        echo "Skipping: $FILE"
        continue
    fi

    echo -n "Signing: $FILE ... "

    # MD5
    if [ ! -f "$FILE.md5" ];
    then
        openssl md5 &lt; "$FILE" | cut "-d " -f2 &gt; "$FILE.md5"
        echo "  - Generated '$FILE.md5'"
    else
        echo "  - Skipped '$FILE.md5' (file already existing)"
    fi

    # SHA1
    if [ ! -f "$FILE.sha1" ];
    then
        gpg -v --default-key "$DEFAULT_KEY" --print-md SHA1 "$FILE" &gt; "$FILE".sha1
        echo "  - Generated '$FILE.sha1'"
    else
        echo "  - Skipped '$FILE.sha1' (file already existing)"
    fi
 
    # ASC
    if [ ! -f "$FILE.asc" ];
    then
        echo "$PASSWORD" | gpg --default-key "$DEFAULT_KEY" --detach-sign --armor --no-tty
--yes --passphrase-fd 0 "$FILE"
        echo "  - Generated '$FILE.asc'"
    else
        echo "  - Skipped '$FILE.asc' (file already existing)"
    fi
done
</pre>
</div></div>

<p>Then to sign the packages :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ sign.sh
PGP Key ID: 
&lt;your PGP key&gt;
PGP Key Password: 
&lt;Your password&gt;

-n Signing: ./apacheds-parent-&lt;version&gt;-source-release.zip ... 
  - Generated './apacheds-parent-&lt;version&gt;-source-release.zip.md5'
  - Generated './apacheds-parent-&lt;version&gt;-source-release.zip.sha1'
  - Generated './apacheds-parent-&lt;version&gt;-source-release.zip.asc'
$
</pre>
</div></div>


<h3><a name="ReleasingApacheDS-6.PublishSourceDistributionPackage"></a>6.
Publish Source Distribution Package</h3>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd target/checkout/target
$ scp apacheds-parent-&lt;version&gt;-source-release.zip* people.apache.org:public_html/apacheds-&lt;version&gt;
</pre>
</div></div>

<h3><a name="ReleasingApacheDS-7.Testthenewversion"></a>7. Test the new
version</h3>
<p>The best way to do that is to download the sources, extract them, build the server
and the installers, and check if the installers are correctly working. Then check that the
server is correctly running.</p>

<h3><a name="ReleasingApacheDS-8.Createtheinstallers"></a>8. Create the
installers</h3>
<p>We now have to create the installers. Go into the target/checkout directory and run
:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd apacheds/target/checkout/
$ mvn clean install -Pinstallers
</pre>
</div></div>

<p>This will create the installers in the target/checkout/installers/target/installers
directory</p>

<p>Sign those installers using the sigh.sh script, and copy them in people.apache.org/public_html/apacheds-&lt;version&gt;</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd apacheds/target/checkout/target/installers/target/installers
$ scp apacheds-&lt;version&gt;* people.apache.org:public_html/apacheds-&lt;version&gt;
</pre>
</div></div>

<p>Note : you will need a Debian, a Fedora and a Windows server to generate dedicated
binaries for those platforms, or you can use rpmbuild, dpkg or nsis if you don't want to use
many different servers.</p>

<p>Update your index.html file on people.apache.org/public_html to make the packages
visible. Here is an example of possible content :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>&lt;h2&gt;Last Directory Server &lt;version&gt; sources tarballs&lt;/h2&gt;
  &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-parent-&lt;version&gt;-source-release.zip"&gt;apacheds-parent-&lt;version&gt;-source-release.zip&lt;/a&gt;&lt;br/&gt;
  &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-parent-&lt;version&gt;-source-release.zip.asc"&gt;apacheds-parent-&lt;version&gt;-source-release.zip.asc&lt;/a&gt;&lt;br/&gt;
  &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-parent-&lt;version&gt;-source-release.zip.md5"&gt;apacheds-parent-&lt;version&gt;-source-release.zip.md5&lt;/a&gt;&lt;br/&gt;
  &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-parent-&lt;version&gt;-source-release.zip.sha1"&gt;apacheds-parent-&lt;version&gt;-source-release.zip.sha1&lt;/a&gt;&lt;br&gt;
  
&lt;h2&gt;Last Directory Server &lt;version&gt; installers&lt;/h2&gt;
  &lt;h3&gt;Plain 32 bits binary installers&lt;/h3&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-32bit.bin"&gt;apacheds-&lt;version&gt;-32bit.bin&lt;/a&gt;&lt;br/&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-32bit.bin.asc"&gt;apacheds-&lt;version&gt;-32bit.bin.asc&lt;/a&gt;&lt;br/&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-32bit.bin.md5"&gt;apacheds-&lt;version&gt;-32bit.bin.md5&lt;/a&gt;&lt;br/&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-32bit.bin.sha1"&gt;apacheds-&lt;version&gt;-32bit.bin.sha1&lt;/a&gt;&lt;br/&gt;
  &lt;br/&gt;
  &lt;h3&gt;Plain 64 bits installers&lt;/h3&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-64bit.bin"&gt;apacheds-&lt;version&gt;-64bit.bin&lt;/a&gt;&lt;br/&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-64bit.bin.asc"&gt;apacheds-&lt;version&gt;-64bit.bin.asc&lt;/a&gt;&lt;br/&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-64bit.bin.md5"&gt;apacheds-&lt;version&gt;-64bit.bin.md5&lt;/a&gt;&lt;br/&gt;
    &lt;img src="/icons/compressed.gif" alt="[   ]"&gt;&lt;a href="apacheds-&lt;version&gt;/apacheds-&lt;version&gt;-64bit.bin.sha1"&gt;apacheds-&lt;version&gt;-64bit.bin.sha1&lt;/a&gt;&lt;br/&gt;
  &lt;br/&gt;
...
</pre>
</div></div>

<h3><a name="ReleasingApacheDS-9.Vote"></a>9. Vote</h3>
<p>Start a 72h vote at the dev mailing list.</p>

<h3><a name="ReleasingApacheDS-10.Release"></a>10. Release</h3>
<p>If the vote succeeds Apacheds project can be released.</p>

<p>Go to <a href="https://repository.apache.org/index.html#stagingRepositories" class="external-link"
rel="nofollow">https://repository.apache.org/index.html#stagingRepositories</a> and
release the staging repository so all artifacts are published to Maven central.</p>

<p>Move the distribution packages (sources and binaries) to the dist SVN repository:
<a href="https://dist.apache.org/repos/dist/release/directory/apacheds/dist/$(version"
class="external-link" rel="nofollow">https://dist.apache.org/repos/dist/release/directory/apacheds/dist/$(version</a>)</p>

<p>The best solution would be to checkout the directory in people.apache.org, to copy
the packages in the right place, and to check in the changes :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ ssh people.apache.org
# svn co https://dist.apache.org/repos/dist/release/directory/apacheds/dist/ apacheds-dist
# cd apacheds-dist
# mkdir &lt;version&gt;
# cp ../public_html/apacheds-&lt;version&gt;/* &lt;version&gt;
# svn ci &lt;version&gt;
...
# exit
$
</pre>
</div></div>

<p>The packages should now be available on <a href="http://www.us.apache.org/dist/directory/api/dist/"
class="external-link" rel="nofollow">http://www.us.apache.org/dist/directory/api/dist/</a>&lt;version&gt;</p>

<h3><a name="ReleasingApacheDS-11.DeploytheJavadocsandXRef"></a>11. Deploy
the Javadocs and XRef</h3>

<p>We now can deploy the generated Javadoc and cross-reference pages. They are generated
in the following directory :</p>

<p>target/checkout/target/site</p>

<p>We will copy two directories :</p>

<p>    apidocs<br/>
    xref</p>

<p>*<b>Staging or Production?</b>*</p>

<p>Those files will be stored on the production server only !!! And some extra caution
ust be taken not to delete them when we will publish the staging site too...</p>

<p>First of all, you must checkout the two CMS store for the site : staging and revision.</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd ~/apacheds
$ svn co https://svn.apache.org/repos/infra/websites/production/directory/trunk staging
 ...
$ svn co https://svn.apache.org/repos/infra/websites/production/directory production
 ...
</pre>
</div></div>

<p>Now, you will first add the directory for the newly generated version :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd ~/apacheds/production/content/apacheds/gen-docs
$ mkdir &lt;version&gt;
</pre>
</div></div>

<p>Then copy the generated docs :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cp -r ~/apacheds/trunks/apacheds/target/checkout/target/site/apidocs ~/apacheds/production/content/apacheds/gen-docs/&lt;version&gt;
$ cp -r ~/apacheds/trunks/apacheds/target/checkout/target/site/xref ~/apacheds/production/content/apacheds/gen-docs/&lt;version&gt;
$ 
</pre>
</div></div>

<p>You have to check in those directories :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ svn add &lt;version&gt;
$ svn ci &lt;version&gt; -m "Injected &lt;version&gt; javadocs"
</pre>
</div></div>

<p>Now, you have to update the staging site :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>extpaths.txt
</pre>
</div></div>

<p>This file list the file on the production site that will not be overriden by the
publication of the staging site. It has to be updated</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd ~/apacheds/staging/content/
$ vi extpaths.txt
</pre>
</div></div>

<p>Add the following line :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>...
# Apacheds
apacheds/gen-docs/&lt;version&gt;
...
</pre>
</div></div>

<p>then save and check in the file .htaccess</p>

<p>We also have to update this file :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>$ cd ~/apacheds/staging/content/apacheds/gen-docs
$ vi .htaccess
</pre>
</div></div>

<p>And update the two last lines to refer to the version you've just released :</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>RewriteRule ^latest$ &lt;version&gt;/
RewriteRule ^latest/(.*)$ &lt;version&gt;/$1
</pre>
</div></div>

<p>Save and commit the file.</p>

<h3><a name="ReleasingApacheDS-12.Updatethewebsite"></a>12. Update the web
site</h3>

<p>You can now update the site, add a news on the front page, and publish the site.</p>

<h3><a name="ReleasingApacheDS-13.Informtheworld%21"></a>13. Inform the
world !</h3>

<p>After 24h, you can now inform the world about the release.</p>

<p>Send a mail to the users and dev mailing list, and one to the announce@apacge.org.</p>

<p>You are done !</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=DIRxDEV">Stop
watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action">Change
email notification preferences</a>
</div>
        <a href="https://cwiki.apache.org/confluence/display/DIRxDEV/Releasing+ApacheDS">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=55391&revisedVersion=27&originalVersion=26">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message