Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 96299039c86c7ec7863c443693e4d708 > files > 20

drobo-utils-0.6.2.2-9.fc14.noarch.rpm

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>DEVELOPER NOTES</title>
<style type="text/css">

/*
This style sheet is a slight modification of voidspace.css.
mods by Peter Silva...

Voidspace.css authors:
:Authors: Ian Bicking, Michael Foord
:Contact: fuzzyman@voidspace.org.uk
:Date: 2005/08/26 
:Version: 0.1.0
:Copyright: This stylesheet has been placed in the public domain.

Stylesheet for Docutils.
Based on ``blue_box.css`` by Ian Bicking
and ``html4css1.css`` revision 1.46.
*/

@import url(html4css1.css);

body {
  font-family: "Lucida Grande", "Lucida Sans", Verdana, sans-serif;
  /* font-family: Arial, sans-serif; */
  background-color: #333333;
  color: #cccccc;
}

em, i {
  /* Typically serif fonts have much nicer italics */
  font-family: Times New Roman, Times, serif;
}

a:link {
  color: white;
}

a:visited {
  color: white;
}

a.target {
  color: white;
}

a.toc-backref {
  text-decoration: none;
  color: white;
}

a.toc-backref:hover {
  background-color: inherit;
}

a:hover {
  background-color: #cccccc;
}

div.attention, div.caution, div.danger, div.error, div.hint,
div.important, div.note, div.tip, div.warning {
  background-color: #cccccc;
  padding: 3px;
  width: 80%;
}

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title  {
  text-align: center;
  background-color: #999999;
  display: block;
  margin: 0;
}

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
  color: #cc0000;
  font-family: sans-serif;
  text-align: center;
  background-color: #999999;
  display: block;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Helvetica, Arial, sans-serif;
  border: thin solid black;
  /* This makes the borders rounded on Mozilla, which pleases me */
  -moz-border-radius: 8px;
  -webkit-border-radius: 8px;
  padding: 4px;
  background-color: black;
  color: white;
  width: 70%;
  text-align: center;
}

h1 {
  border: medium solid black;
  color: white;
}

h1 a.toc-backref, h2 a.toc-backref { 
  color: white;
}

h2 {
  border: medium solid black;
  color: white;
}

h3, h4, h5, h6 {
  color: white;
}

h3 a.toc-backref, h4 a.toc-backref, h5 a.toc-backref, 
h6 a.toc-backref { 
  color: white;
}

h1.title {
  text-align: center;
  /* background-color: #444499; */
  color: #eeeeee; 
  border: thick solid black;
  -moz-border-radius: 20px;
  -webkit-border-radius: 20px;
}

table.footnote {
  padding-left: 0.5ex;
}

table.citation {
  padding-left: 0.5ex
}

pre.literal-block, pre.doctest-block {
  background: #cccccc;
  border: thin black solid;
  padding: 5px;
  color: black;
}

.image img { border-style : solid;
            border-width : 2px;
}

h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
  font-size: 100%;
}

code, tt {
  color: #000066;
}



</style>
</head>
<body>
<div class="document" id="developer-notes">
<h1 class="title">DEVELOPER NOTES</h1>

<p>This software is copyright under GPL.  See near end file for details...</p>
<p>This is a pile of random useful bits for developers.  (aka notes to myself ;-)</p>
<div class="section" id="working-with-source">
<h1>Working With Source</h1>
<p>Project Source code is managed using a git repository provided by
sourceforge.net.  Git ( <a class="reference external" href="http://git-scm.com/">http://git-scm.com/</a> ) provides a fully
distributed development model, so one can exchange patches arbitrarily
among developers.  On the sf.net repository, the 'master' branch is
the final integration target for future releases.</p>
</div>
<div class="section" id="getting-a-source-tree">
<h1>Getting a Source Tree</h1>
<p>the following checks out the master branch of the source code tree and
puts it in the drobo-utils subdirectory of the current tree.</p>
<p>git clone <a class="reference external" href="ssh://username&#64;drobo-utils.git.sourceforge.net/gitroot/drobo-utils/drobo-utils">ssh://username&#64;drobo-utils.git.sourceforge.net/gitroot/drobo-utils/drobo-utils</a> drobo-utils</p>
<p>Before doing Any commits, ensure that the author fields are
appropriately set.  One can obtain patches applied to the branch
with git pull, and commit patches for distribution with git push.</p>
</div>
<div class="section" id="build-dependencies">
<h1>Build Dependencies</h1>
<p>To build the package from source, there are a number of other packages needed:</p>
<pre class="literal-block">
boule% sudo aptitude install debhelper python2.5-dev
boule% sudo aptitude install python-docutils
boule%
</pre>
<p>The second line only required to build documentation.  On the other hand,
to get a complete list of packages you need, it is best to use a shell window
to grep in the Debian package control file (which defines what the
dependencies are for the build system):</p>
<pre class="literal-block">
peter&#64;pepino% grep Depend debian/control
Build-Depends: debhelper (&gt;= 5), python2.5-dev, python-docutils
Depends: ${shlibs:Depends}, ${misc:Depends}, parted
peter&#64;pepino%
</pre>
</div>
<div class="section" id="git-configure-patch-author">
<h1>GIT Configure Patch Author</h1>
<p>To ensure the correct author on patches created, make sure to set your
author settings.  Something like the following is appropriate if you
use a single identity for all your code contributions:</p>
<pre class="literal-block">
boule% git config --global user.name &quot;firstname lastname&quot;
boule% git config --global user.email &quot;developer&#64;sourceforge.net&quot;
boule%
</pre>
<p>Others may wish for the identity to be associated with each project.</p>
</div>
<div class="section" id="using-a-source-snapshot">
<h1>Using a Source Snapshot</h1>
<p>Sometimes, when there are issues, the correction gets checked in, but there
hasn't been time to do a full release process.  If you really need the fix,
then your only option is to get it from the developers' git repository.
If you are told 'it is in git', that refers to the git source code management
system, and the server for that is at sourceforge.net.  How to get it:</p>
<pre class="literal-block">
# git clone ssh://developer&#64;drobo-utils.git.sourceforge.net/gitroot/drobo-utils/drobo-utils mine
# cd mine                 # go into the source directory you downloaded
# ./drobom status         # try it out...
# python setup.py install # install it in system places...
# drobom status           # try it out...
# git pull # get any changes made since the git clone was done.
# python setup.py install # install the changes in system places.
</pre>
<p>Sample checkout of a stable version.  To view available branches:</p>
<pre class="literal-block">
% git branch -r
origin/HEAD -&gt; origin/master
origin/master
origin/noC
origin/peter
origin/r0.2.1
origin/r0_3_3
origin/r0_4_0
origin/r0_5_0
origin/r0_6_0
</pre>
<p>Where a version is something like r0_4_0.  then you can pick anyone to work with:</p>
<pre class="literal-block">
% git branch r0_4_0 -r origin/r0_4_0
Branch r0_4_0 set up to track remote branch r0_4_0 from origin.
% git checkout r0_4_0
Switched to branch 'r0_4_0'
%
</pre>
<p>When you use git to get a tree, it keeps copies of metadata to be able to
track changes.  If you want a copy that is contains no git cruft,
rm -rf .git in the root of the source tree.</p>
<p>If you are mixing downloaded packages and source installs, check out the next
section for gotchas.</p>
</div>
<div class="section" id="dpkg-vs-python-install">
<h1>Dpkg vs. Python Install</h1>
<p>The 'setup.py' script, mentioned in the previous section, is a convention
from the distutils python packaging system.  distutils installation is slightly
different from installation from debian packages.  There doesn't seem to be a
distutils way to remove a package. touch all the files, do an installation, then
manually remove the files it installed.</p>
<p>drobo-utils has been picked up for inclusion in debian.  The &quot;real&quot; packaging
for debian packages is kept in a separate tree, and maintained by debian
developers.</p>
<p>The debian/ setup puts stuff in /usr/sbin while setup.py puts things in /usr/bin.  Python install does not install man pages either, which the dpkg takes care of.  The libs are placed differently too.  haven't reviewed for other conflicts, least confusing to use one or the other method on a system.</p>
<p>(if you do distutils install, then remove the debian package via: dpkg --purge drobo-utils)</p>
</div>
<div class="section" id="making-a-release">
<h1>Making a Release</h1>
<p>Procedure:</p>
<pre class="literal-block">
1 - make a branch
 # assuming you have a local repository...
 git branch &lt;branch&gt;  # creates the branch, from the cwd (ought to be master)
 git checkout &lt;branch&gt; # switches current dir to the branch.

2 - Stamp the branch with version
 vi CHANGES.txt          # complete change manifest for release
 vi debian/changelog     # copy manifest from txt, add signature.
 vi setup.py             # edit version
 vi Drobo.py             # edit VERSION

3 - Build packages for testing &amp; Install them. (see separate recipe.)

4 - Run QA.
 Record results of release tests in the branch (QA.txt) As new tests are created,
 modify QA.txt on trunk for to keep references for the next release.

5 - Commit &amp; Push QA'd branch

  git commit -a
  git push origin origin:refs/heads/&lt;branch&gt;
</pre>
<div class="section" id="quality-assurance-qa-txt">
<h2>Quality Assurance (QA.txt)</h2>
<p>QA.txt is a quality assurance log.  The version on the trunk of the releases
indicates the QA procedure to be applied to the next version during the
release process.  Since a branch is created for each release, the version
of QA.txt acts as a quality log for that release.  so one can do a git
checkout, or git export to get the quality log for any release (QA.txt
introduce in version 0.4.0)</p>
</div>
<div class="section" id="building-debian-ubuntu-packages">
<h2>Building Debian &amp; Ubuntu Packages</h2>
<p>Assumes you have installed the Build dependencies:</p>
<pre class="literal-block">
# obtain a fresh tree
% git clone ssh://user&#64;drobo-utils.git.sourceforge.net/gitroot/drobo-utils/&lt;version&gt; drobo-utils-&lt;version&gt;
% cd drobo-utils-&lt;version&gt;
% rm -rf .git  # get rid of Git cruft, yielding a raw source tree.
% chmod 755 debian/rules  # I dunno why the permissions are wrong...

# this debian/ config is just for non-distro packages.
# builds for debian and Ubuntu.

% dpkg-buildpackage -rfakeroot
% cd ..
# rename it for whatever distro is appropriate...
% mv drobo_utils_0.3.3-1_i386 --&gt; droboutils_0.3.3-1_i386_ubunutuIntrepid.deb

# rebuild the source tar because it will have the 'debian' link in it.
% cd drobo-utils-0.99.9
% rm debian
% cd ..
% tar -czvf drobo-utils-0.3.3-1.tgz drobo-utils-0.99.9
</pre>
<p>apply QA tests. as per QA.txt recording results there.</p>
</div>
</div>
<div class="section" id="updating-documentation">
<h1>Updating Documentation</h1>
<p>use the restructured text tools (from the python-docutils package.)
to build things using:</p>
<blockquote>
% make doc</blockquote>
<p>Have a look at Makefile for how that works.
update the web site:</p>
<blockquote>
% scp README.html &lt;user&gt;,drobo-<a class="reference external" href="mailto:utils&#64;web.sourceforge.net">utils&#64;web.sourceforge.net</a>:htdocs</blockquote>
</div>
<div class="section" id="droboshare">
<h1>Droboshare</h1>
<p>Droboshare is not directly supported by drobo utils running on a linux host.
However, the droboshare itself is a linux host, and it is possible to run
drobo-utils un-modified on the droboshare itself.  There is download called
the Droboshare Augmented Root File system (DARFS), which includes a python
interpreter and drobo-utils.</p>
<div class="section" id="open-task-reverse-engineer-dashboard-droboshare-protocol">
<h2>Open Task: Reverse Engineer Dashboard &lt;-&gt; Droboshare Protocol</h2>
<p>Why isn't there full support in host based drobo-utils itself?  Digital
Robotics hasn't released details of the protocol used by the proprietary
dashboard to communicate with a droboshare, so it would be a lot of work to
reverse engineer that.  So support of a droboshare from a linux GUI on a
host system is not likely in the near future.</p>
<p>If someone wants to figure that out, it might be a good thing (tm)
After that is figured out, the next step would be to understand
how to flash the firmware remotely.  That would eliminate the last function
that cannot be done with open source.</p>
</div>
<div class="section" id="building-darfs">
<h2>Building DARFS</h2>
<p>DARFS - Droboshare Augmented Root File System. A pile of stuff that can
be run on a droboshare.</p>
<p>Have a look here:</p>
<p><a class="reference external" href="http://groups.google.com/group/drobo-talk/web/building-droboshare-apps-on-debianish-os?hl=en">http://groups.google.com/group/drobo-talk/web/building-droboshare-apps-on-debianish-os?hl=en</a></p>
</div>
</div>
<div class="section" id="trim-discard">
<h1>TRIM/DISCARD</h1>
<p>Drobo is the only consumer-level storage unit that does <a class="reference external" href="http://en.wikipedia.org/wiki/Thin_provisioning">Thin Provisioning</a> (allocating a device larger than the physical space available, allowing space upgrades without
OS changes.)  Drobo does this by understanding the file system blocks, which is
why it only supports a very limited set of file systems and cannot support full
disk encryption.</p>
<p>There is considerable industry activity about adding <a class="reference external" href="http://en.wikipedia.org/wiki/TRIM">ATA TRIM</a> and corresponding
<a class="reference external" href="http://www.t10.org/ftp/t10/document.08/08-149r4.pdf">SCSI UNMAP</a> commands.  These commands, for their respective command sets, add
the ability for the operating systems' file system code to indicate blocks that
are not in use to storage units.  Drobo would work with any file system that
uses these commands, with far less firmware.  On linux, that file systems that
are starting to support TRIM/DISCARD are:  ext4, btrfs, and xfs.  It may also
help with the inherent limitations around full disk encryption.</p>
<p>These commands are still maturing in support.  Long term, they seem like
The right thing to do.</p>
<p>(2009/12/30)</p>
</div>
<div class="section" id="administrivia">
<h1>Administrivia</h1>
<p>Revision date: 2009/12/27</p>
<p>copyright:</p>
<p>Drobo Utils Copyright (C) 2008,2009  Peter Silva (<a class="reference external" href="mailto:Peter.A.Silva&#64;gmail.com">Peter.A.Silva&#64;gmail.com</a>)
Drobo Utils comes with ABSOLUTELY NO WARRANTY; For details type see the file
named COPYING in the root of the source directory tree.</p>
<blockquote>
version 9999, somewhen</blockquote>
</div>
</div>
</body>
</html>