<h1><a name="Using_http_www_gnu_org_software"> </a><a name="_Using_http_www_gnu_org_software"> </a>  <center> Using <a href="http://www.gnu.org/software/gnu-arch/" target="_top">ARCH</a> </center> </h1>
<p />
<div class="twikiToc">
<ul>
<li> <a href="#Trivia">Trivia:</a>
</li>

<li> <a href="#Creating_a_new_U_Boot_mirror_arc">Creating a new U-Boot mirror archive with ARCH</a>
</li>
<li> <a href="#U_Boot_problem_files_for_http_ww">U-Boot problem files for ARCH import</a>
</li>
<li> <a href="#Extracting_a_working_copy_of_U_B">Extracting a working copy of U-Boot from ARCH</a>
</li>
<li> <a href="#Creating_an_Archive_for_local_Modif">Creating an Archive for local Modifications</a>
</li>
<li> <a href="#Mirroring_an_Archive_via_the_Web">Mirroring an Archive via the Web Server</a>

</li>
<li> <a href="#Accessing_the_Mirrored_Archive_v">Accessing the Mirrored Archive via HTTP</a>
</li>
<li> <a href="#GNU_style_Changelog">GNU-style Changelog</a>
</li>
<li> <a href="#Removing_http_www_gnu_org_softwa">Removing ARCH artifacts</a>
</li>
</ul>
</div>
<p />
<h3><a name="Trivia"> </a><a name="Trivia_"> </a> Trivia: </h3>

<p />
<ul>
<li> Our arch archives are in <code>/opt/{archives}</code>
</li>
<li> The techniques here were gleaned from <a href="http://www.gnu.org/software/gnu-arch/tutorial/arch.html" target="_top">arch Meets hello-world</a> <a href="http://vanbaren.homelinux.com/doc/tla-doc/html/arch.html" target="_top">(local copy)</a>
</li>
</ul>
<p />
<h3><a name="Creating_a_new_U_Boot_mirror_arc"> </a> Creating a new U-Boot mirror archive with <a href="http://www.gnu.org/software/gnu-arch/" target="_top">ARCH</a> </h3>

<p />
<blockquote><pre><tt>
tla my-default-archive vanbaren@example.com--u-boot-denx
tla archive-setup u-boot-denx--mirror--1.1.2
tla init-tree u-boot-denx--mirror--1.1.2
tla add `find . -type d`                    # Add directories
tla add `tla inventory --names --source`    # Add source files
vi `tla make-log`                           # Edit the log appropriately
tla import
</tt></pre></blockquote>
<p />
<h3><a name="U_Boot_problem_files_for_http_ww"> </a> U-Boot problem files for <a href="http://www.gnu.org/software/gnu-arch/" target="_top">ARCH</a> import </h3>
<p />
Due to violation of ARCH naming conventions, ARCH has problems importing the following U-Boot files/directories:
<blockquote><pre><tt>
board/MAI/bios_emulator/scitech/lib/debug/linux/gcc/glibc.so
board/MAI/bios_emulator/scitech/lib/debug/linux/gcc/libc.so
board/MAI/bios_emulator/scitech/lib/release/linux/gcc/glibc.so
board/MAI/bios_emulator/scitech/lib/release/linux/gcc/libc.so
</tt></pre></blockquote>

...for now, I'll simply ignore them.  The problem appears to be that these are directories but have a <code>.so</code> extension.  To ignore them, I tried to use <code>tla delete &lt;file&gt;</code> on the above files but that didn't work.  Instead, I renamed them with a leading "," (arch ignores files with leading commas).
<p />
<h3><a name="Extracting_a_working_copy_of_U_B"> </a> Extracting a working copy of U-Boot from <a href="http://www.gnu.org/software/gnu-arch/" target="_top">ARCH</a> </h3>
<p />
To get a working copy and put it in the new subdirectory <code>u-boot</code>

<blockquote><pre><tt>
vanbaren@dellserver:~/tmp/u-boot$ tla get u-boot-denx--mirror--1.1.2 u-boot
</tt></pre></blockquote>
<p />
We want to create a local mirror of the u-boot-denx mirror and then put our changes in our local mirror.
<p />
Current plans:
<ul>
<li> <code>/opt/u-boot-denx/u-boot/u-boot</code> - CVS + ARCH combined archive that tracks the official <a href="http://sourceforge.net/projects/u-boot" target="_top">u-boot</a> tree

<ul>
<li> Archive: <code>vanbaren@example.com--u-boot-denx</code> -&gt; <code>/opt/{archives}/u-boot-denx</code>
</li>
</ul>
</li>
</ul>
<blockquote><blockquote><pre><tt>
$ tla my-default-archive vanbaren@example.com--u-boot-denx
$ tla categories
u-boot-denx
$ tla branches u-boot-denx
u-boot-denx--mirror
$ tla versions u-boot-denx--mirror
u-boot-denx--mirror--1.1.2
</tt></pre></blockquote></blockquote>
<ul>

<li> Branch with the local modifications
<ul>
<li> Archive <code>vanbaren@example.com--u-boot-local</code> -&gt; <code>/opt/{archives}/u-boot-local</code>
</li>
</ul>
</li>
</ul>
<p />
<h3><a name="Creating_an_Archive_for_local_Modif"> </a> Creating an Archive for local Modifications </h3>

<p />
Based on <a href="http://vanbaren.homelinux.com/doc/tla-doc/html/elementary-branches.html" target="_top">Elementary Branches</a>
<blockquote><pre><tt>
tla make-archive vanbaren@example.com--u-boot-local /opt/{archives}/u-boot-local
tla my-default-archive vanbaren@example.com--u-boot-local
tla archive-setup u-boot-local--vanbaren--0.1
# Create/populate a branch (normally would leave off the "--base-0" to take top of the tree)
tla tag vanbaren@example.com--u-boot-denx/u-boot-denx--mirror--1.1.2--base-0 u-boot-local--vanbaren--0.1
# Optional: check the operation
tla revisions --summary u-boot-local--vanbaren--0.1
# Get a working copy
tla get u-boot-local--vanbaren--0.1 u-boot
# (edit files -- or, in my case, apply 041104a.patch)
# Create a log file
vi `tla make-log`
tla commit
</tt></pre></blockquote>
<p />
<h3><a name="Mirroring_an_Archive_via_the_Web"> </a> Mirroring an Archive via the Web Server </h3>
<p />
<blockquote><pre><tt>
# The --listing is for HTML access (it has to come before the --mirror?)
tla make-archive --listing --mirror vanbaren@example.com--u-boot-local /var/www/external/arch/u-boot-local
tla archive-mirror vanbaren@example.com--u-boot-local
# In the project tree, run the following to make a GNU-style changelog for the web page
tla changelog > /var/www/external/arch/u-boot/changelog
</tt></pre></blockquote>
<p />

<h3><a name="Accessing_the_Mirrored_Archive_v"> </a> Accessing the Mirrored Archive via HTTP </h3>
<p />
<blockquote><pre><tt>
# Reference: http://vanbaren.homelinux.com/doc/tla-doc/html/introducing-yourself.html
$ tla my-id "Jerry Van Baren &lt;vanbaren@example.com&gt;"    # Obviously, fill in your name
# Register the remote archive for HTTP access
# Reference: http://vanbaren.homelinux.com/doc/tla-doc/html/shared-and-public-archives.html
$ tla register-archive vanbaren@example.com--u-boot-local http://vanbaren.homelinux.com/arch/u-boot-local
$ tla my-default-archive vanbaren@example.com--u-boot-local
#
# Example archive information and get
# Notes
#  * The archive is remotely accessed via HTTP, not copied locally
#
$ tla categories
u-boot-local
$ tla branches u-boot-local
u-boot-local--vanbaren
$ tla versions u-boot-local--vanbaren
u-boot-local--vanbaren--0.1
$ tla revisions u-boot-local--vanbaren--0.1
base-0
patch-1
patch-2
patch-3
patch-4
$ tla get u-boot-local--vanbaren--0.1 u-boot
* from archive cached: vanbaren@example.com--u-boot-local/u-boot-local--vanbaren--0.1--base-0
* patching for revision: vanbaren@example.com--u-boot-local/u-boot-local--vanbaren--0.1--patch-1
* patching for revision: vanbaren@example.com--u-boot-local/u-boot-local--vanbaren--0.1--patch-2
* patching for revision: vanbaren@example.com--u-boot-local/u-boot-local--vanbaren--0.1--patch-3
* patching for revision: vanbaren@example.com--u-boot-local/u-boot-local--vanbaren--0.1--patch-4
* making pristine copy
* tree version set vanbaren@example.com--u-boot-local/u-boot-local--vanbaren--0.1
</tt></pre></blockquote>
<p />
<h3><a name="GNU_style_Changelog"> </a> GNU-style Changelog </h3>
<p />
To automatically create a GNU-style changelog, very handy for figuring out what is in the various patches.

<blockquote><pre><tt>
tla changelog
</tt></pre></blockquote>
<p />
<h3><a name="Removing_http_www_gnu_org_softwa"> </a> Removing <a href="http://www.gnu.org/software/gnu-arch/" target="_top">ARCH</a> artifacts </h3>
<p />
To remove arch artifacts from the directory tree (start over from scratch):
<blockquote><pre><tt>
rm -rf \{arch\}/ ; find . -name .arch-ids -exec rm -rf \{\} \;
</tt></pre></blockquote>
Note that you will also want to clean out

<ul>
<li> The subdirectory under your archive directory (<em>e.g.</em> <code>/opt/{archive}/&lt;archive-name&gt;</code>)
</li>
<li> Your <tt>~/.arch-params/</tt>locations/&lt;archive-name&gt;
</li>
</ul>