<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Morgajel.net &#187; Open Source</title>
	<atom:link href="http://morgajel.net/category/open-source/feed" rel="self" type="application/rss+xml" />
	<link>http://morgajel.net</link>
	<description>Stemming the flow of evincible Ignorance. We must try to understand for the sake of understanding.</description>
	<lastBuildDate>Sun, 25 Jul 2010 20:48:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Raw WinXP Virtualbox Partitions on a Thinkpad</title>
		<link>http://morgajel.net/2010/07/13/879</link>
		<comments>http://morgajel.net/2010/07/13/879#comments</comments>
		<pubDate>Tue, 13 Jul 2010 17:50:30 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/?p=879</guid>
		<description><![CDATA[New job, new laptop. Many utilities here are windows only, so it requires a bit of&#8230; effort&#8230; to get myself up and running efficiently. The solution to the windows problem is VirtualBox. I had set this up on my last laptop with little effort, but this time around required a bit more effort. Hopefully the [...]]]></description>
			<content:encoded><![CDATA[<p>New job, new laptop. Many utilities here are windows only, so it requires a bit of&#8230; effort&#8230; to get myself up and running efficiently. The solution to the windows problem is VirtualBox. I had set this up on my last laptop with little effort, but this time around required a bit more effort. Hopefully the instructions below will help others get up and running quickly.</p>
<p><strong>Disclaimer</strong>- your laptop may catch on fire and explode (or worse) if you attempt this&#8230; or something.</p>
<p>We&#8217;ll be presuming that you&#8217;ve already resized your windows partition and have both a working Windows and Linux partition.</p>
<h2>In Windows</h2>
<p>Log into XP, grab <a rel="nofollow" href="http://www.virtualbox.org/attachment/wiki/Migrate_Windows/MergeIDE.zip">MergeIDE.zip</a> from Virtualbox&#8217;s site, extract and run it. It should be a quick flash and be done. (Note: I am not 100% sure this step is needed)</p>
<p>Create a new hardware profile and name it <strong>virtualbox</strong>. Make sure to set it as a choice during boot. Try rebooting into native windows once to ensure that it does offer you profile options.</p>
<h2>In Linux</h2>
<p>You&#8217;ll need the following packages installed (May differ for non-ubuntu systems):<br />
<code>mbr, virtualbox-ose, virtualbox-ose-qt</code></p>
<p>Create a stand-alone mbr file to use for booting (yes, you need the force flag):</p>
<p><code>install-mbr ~/.VirtualBox/WindowsXP.mbr --force</code></p>
<p>We&#8217;re presuming that your windows partition is /dev/sda1. In the below command, we are defining</p>
<ul>
<li>a vmdk file (WindowsXP.vmdk)</li>
<li>which raw disk to read (/dev/sda)</li>
<li>which partition (1)</li>
<li>the new MBR file we just created</li>
</ul>
<p><code>VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WindowsXP.vmdk -rawdisk /dev/sda -partitions 1 -mbr ~/.VirtualBox/WindowsXP.mbr -relative -register</code></p>
<p>Note that you&#8217;ll need read/write access to that drive as your user, so you may want to figure out a cleaner/securer way to implement this, rather than adding your user to the disk group (which is very dumb and insecure). I would, but it&#8217;s working and I have more important things to do at the moment.</p>
<p>Another issue- apparently thinkpads report the <a href="http://ubuntuforums.org/showthread.php?p=6716355">drive heads and cylinders oddly</a> (T410 for me and T60p in article), so we have to add some vmdk settings before virtualbox creates them incorrectly. Open ~/.VirtualBox/WindowsXP.vmdk and add the following at the bottom:<br />
<code><br />
ddb.geometry.biosCylinders="1024"<br />
ddb.geometry.biosHeads="240"<br />
ddb.geometry.biosSectors="63"<br />
</code><br />
The biosHeads appears to be the magic value- it seems to work if it&#8217;s set to 240, but the default is 255 (which fails).</p>
<p>Once you add those, start up virtualbox and check the virtual media manager, your new vmdk should be listed there. Once it&#8217;s confirmed, create a new virtual machine. Rather than creating a disk, select your vmdk as an existing disk.</p>
<p>After you finish, go the the VM settings-&gt;system and make sure the motherboard tab as io-apic  enabled (I also had PAE/NX enabled under processor and VT-x enabled under Acceleration).</p>
<h2>Start the VM</h2>
<p>There are several errors that could pop up. I&#8217;m sure there are plenty more that I stumbled across, but these were the two big ones:</p>
<ul>
<li><strong>a disk read error occurred, press ctrl+alt+del to restart </strong>- Caused by incorrect biosHeads- check and make sure it&#8217;s set to 240 (this was the fix for me, results may vary).</li>
<li><strong>Complaint about kvm/vmx</strong> &#8211; Virtualbox does not like kvm. Uninstall qemu-kvm.</li>
</ul>
<p>If things go well, it should flicker mbr in the corner, then go to the hardware profile selection screen. Select the virtualbox profile, and continue, then log in.</p>
<p>What follows is a half-hour of installing generic drivers and dealing with hardware specific auto start apps complaining that they won&#8217;t work on this installation. Windows will warn that the new drivers are not blessed, so be forewarned.</p>
<p>Once completed, at the top of the VM windows select Devices-&gt; Install Guest Additions. This will download and mount an ISO, and windows will pop open a folder with the addition executables. Select the one best for you and run the installer. It will prompt you for video and mouse drivers (and trust me, you want them).</p>
<p>The final step is to shut down the windows VM, then reboot into the native windows partition to make sure it still works.  I did receive a few blue-screens before logging in at the beginning, but they appeared random and haven&#8217;t happened since.</p>
<p>And that&#8217;s all there is to it- simple, eh? Your windows partition should now run in native mode and vm mode.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2010/07/13/879/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful Utility: less</title>
		<link>http://morgajel.net/2010/06/25/64</link>
		<comments>http://morgajel.net/2010/06/25/64#comments</comments>
		<pubDate>Fri, 25 Jun 2010 15:00:29 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://morgajel.net/?p=64</guid>
		<description><![CDATA[Less is more. That&#8217;s the common joke about less- It provides the same functionality as the older utility, more; but oh, how much more than more! Less allows you to easily scan backwards as well as forwards- something more is not too good at (though it is possible). Less also allows you to navigate with [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Less is more.</p></blockquote>
<p>That&#8217;s the common joke about less- It provides the same functionality as the older utility, more; but oh, how much more than more!</p>
<p>Less allows you to easily scan backwards as well as forwards- something more is not too good at (though it is possible). Less also allows you to navigate with arrow keys, page up and page down, home and end.</p>
<p>Less provides a quick way to view files as well- Many editors (like vim) need to read an entire file first, and often create a temporary copy (for editing) of the file. This isn&#8217;t a problem until you try to browse a 56 gig log file of a rabid JBoss instance- if your root directory isn&#8217;t large enough, chaos ensues. Less circumvents this by only loading a page at a time. Yes- searches do take longer, but it beats crashing a system.</p>
<h3>Useful Commands:</h3>
<ul>
<li><strong>R</strong>: Repaints the screen, rereading the file from the disk. useful if the file is constantly changing (like a logfile)</li>
<li><strong>/ and ?</strong>: Just like in vim, used for searching forwards and backwards </li>
<li><strong>g and G</strong>: Jumps to the top or bottom of the file, just like vim</li>
<li><strong>:n and :p</strong>: Jump to the next/previous file (if you pass less more than one file)</li>
<li><strong>q</strong>: quits. slightly important</li>
<li><strong>! [cmd]</strong>: runs a given command outside of less- useful if you can&#8217;t remember the output of another command and need a quick reminder (ifconfig, tail, route, ls, etc)</li>
</ul>
<h3>Useful Flags:</h3>
<ul>
<li>-N: Shows line numbers</li>
<li>-s: squeeze adjacent blank lines into one</li>
<li>-R: shows raw control characters, a.k.a. &#8220;turns color on!&#8221;</li>
</ul>
<p>As usual, there are dozens of more options, flags, variables and behavior- you&#8217;d be surprised what less can do for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2010/06/25/64/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Free Jabber / XMPP clients for a Blackberry?</title>
		<link>http://morgajel.net/2008/08/06/269</link>
		<comments>http://morgajel.net/2008/08/06/269#comments</comments>
		<pubDate>Wed, 06 Aug 2008 16:08:54 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/?p=269</guid>
		<description><![CDATA[anyone know of any good jabber clients for the blackberry? I&#8217;ve tried a couple with little luck, and most of them cost more than I can afford for this test. Features required Must run on BlackBerry 8703e v4.1.0x Connection server can be configured differently than jid address (i.e. you@morgajel.net for jid, jabber.morgajel.net for connection server.) [...]]]></description>
			<content:encoded><![CDATA[<p>anyone know of any good jabber clients for the blackberry?  I&#8217;ve tried a couple with little luck, and most of them cost more than I can afford for this test. Features required</p>
<ul>
<li>Must run on BlackBerry 8703e v4.1.0x</li>
<li>Connection server can be configured differently than jid address (i.e. you@morgajel.net for jid, jabber.morgajel.net for connection server.) This rules out Mobber as far as I can tell</li>
<li>Requires SSL/TLS</li>
<li>Non-strict cert checking</li>
</ul>
<p>Let me know if you have any suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2008/08/06/269/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Intro to Vim Tip #6 (Multiple viewports)</title>
		<link>http://morgajel.net/2008/07/21/261</link>
		<comments>http://morgajel.net/2008/07/21/261#comments</comments>
		<pubDate>Mon, 21 Jul 2008 21:02:08 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://morgajel.net/?p=261</guid>
		<description><![CDATA[One feature of vim I don&#8217;t use enough is the ability to split the screen and view multiple files at once. I use this feature all the time when I use vimdiff, but not really any other time. I thought I&#8217;d take a moment to lay out some uses of it (thank Linux.com for the [...]]]></description>
			<content:encoded><![CDATA[<p>One feature of vim I don&#8217;t use enough is the ability to split the screen and view multiple files at once. I use this feature all the time when I use vimdiff, but not really any other time. I thought I&#8217;d take a moment to lay out some uses of it (thank <a href='http://www.linux.com/articles/54157'>Linux.com</a> for the reference):</p>
<p>From Command Mode:</p>
<ul>
<li>:sp splits the screen horizontally</li>
<li>:vsp splits the screen vertically</li>
<li>Ctrl-w Ctrl-w moves between viewports</li>
<li>Ctrl-w [right arrow] moves active viewport 1 to the right</li>
<li>Ctrl-w [left arrow] moves active viewport 1 to the left</li>
<li>Ctrl-w 3[left arrow] moves active viewport 3 to the left</li>
<li>Ctrl-w q will close the active window.</li>
</ul>
<p>and remember that you can open a file with <img src='http://morgajel.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' />  filename in the newly created viewport</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2008/07/21/261/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Shutup Shutup Shutup!</title>
		<link>http://morgajel.net/2008/05/23/247</link>
		<comments>http://morgajel.net/2008/05/23/247#comments</comments>
		<pubDate>Fri, 23 May 2008 17:34:25 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://morgajel.net/2008/05/23/247/</guid>
		<description><![CDATA[die you wretched pc speaker beep that is so loud when I use the find bar in firefox or tab complete in the cli and nothing is found! rmmod pcspkr echo blacklist pcspkr >> /etc/modprobe.d/blacklist aaah, glorious silence.]]></description>
			<content:encoded><![CDATA[<p>die you wretched pc speaker beep that is so loud when I use the find bar in firefox or tab complete in the cli and nothing is found!</p>
<pre>
  rmmod pcspkr
  echo blacklist pcspkr >> /etc/modprobe.d/blacklist
</pre>
<p>aaah, glorious silence.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2008/05/23/247/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Request Tracker 3.6.5 broken after updating Cent OS</title>
		<link>http://morgajel.net/2008/04/07/241</link>
		<comments>http://morgajel.net/2008/04/07/241#comments</comments>
		<pubDate>Mon, 07 Apr 2008 15:59:18 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/2008/04/07/241/</guid>
		<description><![CDATA[Can&#8217;t locate object method &#8220;seek&#8221; via package &#8220;File::Temp&#8221; at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 816. The underlying problem is perl was updated and overwrote the &#8220;correct&#8221; version of File::Temp that you probably installed when setting up RT and forgot about. To fix this issue cpan install File::Temp /etc/init.d/httpd restart MAKE SURE TO RESTART APACHE! I didn&#8217;t, and it [...]]]></description>
			<content:encoded><![CDATA[<p> Can&#8217;t locate object method &#8220;seek&#8221; via package &#8220;File::Temp&#8221; at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 816.</p>
<p>The underlying problem is perl was updated and overwrote the &#8220;correct&#8221; version of File::Temp that you probably installed when setting up RT and forgot about. To fix this issue</p>
<p><code><br />
cpan install File::Temp<br />
/etc/init.d/httpd restart<br />
</code></p>
<p>MAKE SURE TO RESTART APACHE! I didn&#8217;t, and it cost me probably 2 hours of screwing around with it.</p>
<p>I&#8217;m posting this because<br />
<a href="http://www.nabble.com/RT-3.6.5-and-Sendmail-error-and-looks-like-perl-error-td15989015.html">http://www.nabble.com/RT-3.6.5-and-Sendmail-error-and-looks-like-perl-error-td15989015.html</a><br />
Didn&#8217;t really mention what the final working solution was.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2008/04/07/241/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>28</title>
		<link>http://morgajel.net/2007/12/31/230</link>
		<comments>http://morgajel.net/2007/12/31/230#comments</comments>
		<pubDate>Mon, 31 Dec 2007 06:30:29 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dreams]]></category>
		<category><![CDATA[Ian]]></category>
		<category><![CDATA[Jackie]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/12/31/230/</guid>
		<description><![CDATA[Whew, it&#8217;s been a busy year. Back in 2005 I wrote a list of things I&#8217;d like to do eventually that I&#8217;d be able to do if I had the time and resources that winning the lotto would provide. I&#8217;ve made a positive step towards realizing a couple of those. Family The big change this [...]]]></description>
			<content:encoded><![CDATA[<p>Whew, it&#8217;s been a busy year. Back in 2005 I wrote a list of things I&#8217;d like to do eventually that I&#8217;d be able to do if I had the time and resources that winning the lotto would provide. I&#8217;ve made a positive step towards realizing a couple of those.</p>
<h2>Family</h2>
<p>The big change this year was the addition of Ian. We didn&#8217;t get off too well in the beginning, but we&#8217;re doing pretty good now. He&#8217;s just now to the point where he&#8217;s taking his first steps. He&#8217;s a smart kid, very inquisitive, but stubborn. Within a few years he&#8217;ll be learning how to read and write- I&#8217;m guessing it won&#8217;t be long until I&#8217;m teaching him how to program. He&#8217;s got an eye for any type of electronics, but goes nutty for my blackberry or laptop. Yeah, he&#8217;s a geek in training.</p>
<p>Jackie&#8217;s been doing fairly well, all things considered. She&#8217;s been staying home with Ian rather than going back to work, and it&#8217;s driving her a little stir crazy. To help ease the cabin fever, she got a laptop for christmas- Ian wasn&#8217;t letting her stay in the office, so now she has a way to keep in contact with people from the living room.</p>
<h2>Weddings</h2>
<p>This was the year of the wedding&#8230; Brad and Erin, Jordan and Beth, Matt and Carrie, William  and Charleen, Jackie&#8217;s friend Joslyn, Jackie&#8217;s sister Lori, and Paul and Kristen. I only made it to 4 of the weddings, but I was standing up in two of them. The ones we went to were all in Grand Rapids, so we had the joy of driving back and forth 155 miles each way, with the added bonus of dropping Ian off somewhere along the way</p>
<h2>Work</h2>
<p>Work started off pretty rough. I have a habit of reflecting the attitudes of those around me, and my supervisor at the beginning of the year was pretty negative. That coupled with Ian&#8217;s birth and all the associated expenses turned me into a pretty miserable person. Fortunately the supervisor left and was replaced with a cautious optimist. Things got better- so much so that I just passed the 1 year mark at my current place and still find it interesting and entertaining.</p>
<h2>Technologies</h2>
<p>I&#8217;ve played with many new technologies this year- Jboss, Netscaler and CentOS being the three foremost. I&#8217;ve dug back into ruby with a couple of new projects, as well as LDAP and a plethora of new utilities. I even picked up a bit of python. This trend doesn&#8217;t look like it&#8217;s gonna let up, so the job should be exciting and interesting for some time to come.</p>
<h2>Projects</h2>
<p>This year saw me move away from music and go back towards software (although I have been playing harmonica in the car at stoplights on the way to work). I joined the Luma team as head cheerleader and started the QT4 branch. After becoming frustrated with the python, qt3->qt4 transition and the codebase in general, I started an unofficial sister project, <a href="http://rubyforge.org/projects/ruma/">Ruma</a>. I still sit in the Luma channel and help when I can, but I&#8217;m gonna sit back and wait until we&#8217;re ready for QT4- hopefully we&#8217;ll scrap the entire codebase and start fresh.</p>
<p>Right now I have two other developers &#8220;working&#8221; for me on Ruma, Lars and Hiro. They&#8217;ve put a lot of effort into bringing this bad boy to life, and I&#8217;m thankful I&#8217;ve had their help. For those of you not aware, Luma and Ruma are <a href="http://en.wikipedia.org/wiki/LDAP">LDAP</a> administration tools. As a System Administrator, I use LDAP a lot, so having specialized tools can be helpful.</p>
<p>Another project I started this year was competing in National Novel Writing Month. I finished the rough draft for my first book, <a href=http://www.nanowrimo.org/eng/user/243541"">Sinblade</a>, a week early. It&#8217;s only 150 pages or so, but not a bad start all things considered. Jackie&#8217;s (sorta) working on revising it, and once she&#8217;s done I&#8217;ll open it up for others to start giving me feedback. I&#8217;m excited and nervous about it. If it takes off and people like it, I have 6 or so more books that I&#8217;m interested in writing.</p>
<p>The money situation is still pretty tight, but it&#8217;s getting better. Hopefully next year will be as much of an improvement over this year as this was over last year.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/12/31/230/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introduction to Subversion</title>
		<link>http://morgajel.net/2007/11/20/223</link>
		<comments>http://morgajel.net/2007/11/20/223#comments</comments>
		<pubDate>Tue, 20 Nov 2007 21:03:25 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hobbies]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/11/20/223/</guid>
		<description><![CDATA[I was planning on simply republishing my previous svn article, but realized that it sucked compared to what I know now. Prerequisites I&#8217;ll presume you have the following things. - a Linux machine - subversion already installed Terminology to Know There are a few terms that get mangled if you&#8217;re coming from other types of [...]]]></description>
			<content:encoded><![CDATA[<p>I was planning on simply republishing my previous svn article, but realized that it sucked compared to what I know now.</p>
<h3>Prerequisites</h3>
<p>I&#8217;ll presume you have the following things.<br />
- a Linux machine<br />
- subversion already installed</p>
<h3> Terminology to Know </h3>
<p>There are a few terms that get mangled if you&#8217;re coming from other types of source control. This is just to clear things up.<br />
- <b>Repository:</b> the central storage place on the subversion server where your data is kept.<br />
- <b>Checked-out copy:</b> Unlike VSS, saying something is checked out does not imply that the file is locked. Also referred to as a local copy; but bear in mind that it doesn&#8217;t contain *all* of the data of the actual Repository.<br />
- <b>commit:</b> save the changes you made locally to the repository.</p>
<h3> Mental Hurdles </h3>
<p>All of the files stored in a subversion repository are stored in a meta-filesystem. Much like an ISO image sitting on your desktop is not simply a folder full of files, a subversion repository is not directly accessible  when you open it. Instead, you&#8217;ll see the guts of the repository- DB files, hooks, locks, etc. Don&#8217;t go digging through there to manually change your files- it&#8217;ll break things.</p>
<p>Another important one is the meta-filesystem. The &#8220;inside&#8221; of your repository is just a big filesystem. Much like /bin and /home exist on a linux machine by convention, there are certain base-level directories you should create for convention&#8217;s sake. The first thing you should do with a new repository is create three new base level directories: /tags, /trunk and /branches. Your main development will take place in /trunk. Don&#8217;t worry about the other two at the moment.</p>
<p>When I refer to the root of the repository, I&#8217;ll often refer to it as / or root. This *IS NOT* your server&#8217;s root directory or the physical location of the repository- it&#8217;s the part of the meta-filesystem where /trunk, /tags and /branches reside.</p>
<h3> Step 1: Creating the Repository</h3>
<p>Creating a repository is fairly simple. Anyone can create a repository where ever they have write access. All they must do is run<br />
<code><br />
  $ svnadmin create ~/project1/<br />
</code></p>
<p>This should create an empty repository. This will demonstrate what I&#8217;m talking about when I say that your repository is a meta-filesystem:<br />
<code><br />
  morgajel@unicron ~ $ svn ls file:////home/morgajel/project1<br />
  morgajel@unicron ~ $ ls /home/morgajel/project1<br />
  conf  dav  db  format  hooks  locks  README.txt<br />
  morgajel@unicron ~ $ svn mkdir file:////home/morgajel/project1/trunk -m 'creating trunk'</p>
<p>  Committed revision 1.<br />
  morgajel@unicron ~ $ svn ls file:////home/morgajel/project1<br />
  trunk/<br />
  morgajel@unicron ~ $ ls /home/morgajel/project1<br />
  conf  dav  db  format  hooks  locks  README.txt<br />
</code></p>
<p>Here you can see the repository was empty, then we created a directory called trunk (using a commit message to describe the change we made), then showing that the directory was in fact created. Do the same thing for /tags and /branches.</p>
<p>We now have a working repository!</p>
<h3>Checking out the Repository</h3>
<p>Creating a repository is fine, but using it would be much more&#8230; useful. Next you should check out a copy of your project. Under normal conditions you&#8217;ll only be checking out the /trunk, but you mileage may vary in different situations. Since this is on our local machine, we can use the file:// protocol. Other protocols exist, like http:// (webdav), svn:// (svnserve), and svn+ssh:// (svn over ssh), but you don&#8217;t have to worry about them right now.</p>
<p><code><br />
  morgajel@unicron ~ $ svn co file:////home/morgajel/project1/trunk my_project1<br />
  Checked out revision 3.<br />
</code></p>
<p>This should check out the empty /trunk directory to a local folder called my_project1. The only thing in this directory is a hidden .svn directory which holds the guts of your local copy repository info. It&#8217;s similar in function to the CVS directory in CVS. Unfortunately a nearly-empty directory isn&#8217;t much use, so let&#8217;s add some content.</p>
<h3>Adding Content</h3>
<p>So let&#8217;s add some content.<br />
<code><br />
morgajel@unicron ~ $ cd my_project1/<br />
morgajel@unicron ~/my_project1 $ mkdir -p lib bin share/docs<br />
morgajel@unicron ~/my_project1 $ touch configure Makefile share/docs/README lib/foo.pm bin/widget.pl<br />
morgajel@unicron ~/my_project1 $ svn status<br />
?      configure<br />
?      share<br />
?      lib<br />
?      bin<br />
?      Makefile<br />
</code></p>
<p>Here I created a bunch of directories and created some empty files. When I ran svn status, svn told me that there were 5 things it wasn&#8217;t versioning. Let&#8217;s add them.<br />
<code><br />
morgajel@unicron ~/my_project1 $ svn add configure share lib bin Makefile<br />
A         configure<br />
A         share<br />
A         share/docs<br />
A         share/docs/README<br />
A         lib<br />
A         lib/foo.pm<br />
A         bin<br />
A         bin/widget.pl<br />
A         Makefile<br />
morgajel@unicron ~/my_project1 $ svn status<br />
A      configure<br />
A      share<br />
A      share/docs<br />
A      share/docs/README<br />
A      lib<br />
A      lib/foo.pm<br />
A      bin<br />
A      bin/widget.pl<br />
A      Makefile<br />
</code><br />
As you can see, it recursed down into share, bin and lib and added all the goodies inside of each directory. You can also see svn status shows these as well. Keep in mind they&#8217;re just slated to be added to the repository- they&#8217;re not added yet. Let&#8217;s go ahead and commit them.</p>
<p><code><br />
morgajel@unicron ~/my_project1 $ svn commit -m "a bunch of empty files and directories"<br />
Adding         Makefile<br />
Adding         bin<br />
Adding         bin/widget.pl<br />
Adding         configure<br />
Adding         lib<br />
Adding         lib/foo.pm<br />
Adding         share<br />
Adding         share/docs<br />
Adding         share/docs/README<br />
Transmitting file data .....<br />
Committed revision 4.<br />
</code></p>
<h3>Modifying Data</h3>
<p>So suppose you&#8217;d like to modify these files, you you decide to move the README to the root of your local copy (~/my_project1/):</p>
<p><code><br />
morgajel@unicron ~/my_project1 $ svn mv share/docs/README README<br />
A         README<br />
D         share/docs/README<br />
morgajel@unicron ~/my_project1 $ svn stat<br />
D      share/docs/README<br />
M      bin/widget.pl<br />
A  +   README<br />
</code></p>
<p>Notice that I used svn mv to move files rather than regular old mv- That&#8217;s to make sure svn is aware of the move and keeps the file history associated with the new file. You can also see bin/widget.pl now include some new info as well, and displays an M[odified] next to it. The + next to README shows that it copied the history over from it&#8217;s previous position. So what happens if we move a file without svn mv?<br />
<code><br />
morgajel@unicron ~/my_project1 $ mv configure config<br />
morgajel@unicron ~/my_project1 $ svn status<br />
?      config<br />
!      configure<br />
D      share/docs/README<br />
M      bin/widget.pl<br />
A  +   README<br />
morgajel@unicron ~/my_project1 $ mv config configure<br />
</code><br />
You can see that svn panics(!) that configure has gone missing, and sees this new file called config that it&#8217;s currently not revisioning. It doesn&#8217;t know that they&#8217;re the same file.</p>
<h3> Commit Messages</h3>
<p>You&#8217;ve seen me use the -m flag a couple of times now- I&#8217;m using it to keep things flowing. If you don&#8217;t use it, you&#8217;re prompted in your favorite $EDITOR to create a commit statement, which includes the list of modified files. Using the -m flag is useful if you&#8217;re scripting commits (I use this when dumping and committing a nightly config file from our load-balancer).</p>
<p>Most of the time however, you&#8217;ll use your Editor. Make sure to keep your commit messages sweet and to the point- other&#8217;s will see them.</p>
<p><code><br />
morgajel@unicron ~/my_project1 $ svn commit<br />
[vim shows up, I enter the following text]<br />
Small changes to demonstrate movements<br />
- moved the README<br />
- added shebang to widget.pl<br />
[save and exit vim]<br />
"svn-commit.tmp" 8L, 190C written<br />
Adding         README<br />
Sending        bin/widget.pl<br />
Deleting       share/docs/README<br />
Transmitting file data .<br />
Committed revision 5.<br />
morgajel@unicron ~/my_project1 $ svn update<br />
At revision 5.<br />
morgajel@unicron ~/my_project1 $ svn log<br />
------------------------------------------------------------------------<br />
r5 | morgajel | 2007-11-20 15:55:21 -0500 (Tue, 20 Nov 2007) | 4 lines</p>
<p>Small changes to demonstrate movements<br />
- moved the README<br />
- added shebang to widget.pl</p>
<p>------------------------------------------------------------------------<br />
r4 | morgajel | 2007-11-20 14:17:04 -0500 (Tue, 20 Nov 2007) | 1 line</p>
<p>a bunch of empty files and directories<br />
------------------------------------------------------------------------<br />
r1 | morgajel | 2007-11-20 13:35:28 -0500 (Tue, 20 Nov 2007) | 1 line</p>
<p>creating trunk<br />
------------------------------------------------------------------------<br />
</code></p>
<p>You&#8217;ll notice that revisions 2 and 3 aren&#8217;t listed- if you&#8217;ll remember correctly, they were used to commit the /tags and /branches directories. svn log only reports changes that affect the current target (in this case, ~/my_project1 which is a local copy of /trunk).</p>
<p>There&#8217;s a couple more tips and tricks I could go on about- if there&#8217;s any interest in this post maybe I&#8217;ll write some more about more advanced topics.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/11/20/223/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LDAP+ Sudo +TLS fix</title>
		<link>http://morgajel.net/2007/10/09/221</link>
		<comments>http://morgajel.net/2007/10/09/221#comments</comments>
		<pubDate>Tue, 09 Oct 2007 18:08:35 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/10/09/221/</guid>
		<description><![CDATA[For those of you who can&#8217;t get those three to work together, make sure you specify both TLS_CACERT tls_cacertfile- I didn&#8217;t and it caused me grief.]]></description>
			<content:encoded><![CDATA[<p>For those of you who can&#8217;t get those three to work together, make sure you specify both TLS_CACERT tls_cacertfile- I didn&#8217;t and it caused me grief.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/10/09/221/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intro to Vim Tip #5 (Recording)</title>
		<link>http://morgajel.net/2007/10/07/220</link>
		<comments>http://morgajel.net/2007/10/07/220#comments</comments>
		<pubDate>Sun, 07 Oct 2007 06:47:37 +0000</pubDate>
		<dc:creator>morgajel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Utility]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://morgajel.net/2007/10/07/220/</guid>
		<description><![CDATA[Search and replace is a great feature in most text editors, but what happens when you want to do more? Vim has a solution- recording macros. Suppose you have the following output from some ancient program that needs to be tweaked: X1222 22323 2A22 3303 0000 3334esss test 123 X2222 22353 2A22 3303 0001 3334esss [...]]]></description>
			<content:encoded><![CDATA[<p>Search and replace is a great feature in most text editors, but what happens when you want to do more? Vim has a solution- recording macros. Suppose you have the following output from some ancient program that needs to be tweaked:</p>
<p><code><br />
X1222 22323 2A22 3303 0000 3334esss test 123<br />
X2222 22353 2A22 3303 0001 3334esss tacd 456<br />
X3222 22383 2A22 3303 0010 3334esss fals 789<br />
X4222 22393 2A22 3303 0011 3334esss true 012<br />
</code></p>
<p>It is doesn&#8217;t really matter what it is, this example is somewhat contrived. Suppose you needed to make the following changes for each line that starts with X:<br />
* change the ID from X_222 to Y_223<br />
* reverse the 4th and 5th fields<br />
* copy the second character from the beginning and insert it before the last character of the line</p>
<p>If it were only 4 lines, you could handle this yourself, but it would be very tedious. Suppose rather than 4 lines, you had 400- it&#8217;d be much easier to automate it. The best way to take care of it would be with a macro:<br />
<code><br />
[esc]qa<br />
/^X[enter] i[delete]Y[right][right][right][delete]3<br />
[esc]wwwdww[left]p<br />
0[right]d[ctrl+v]y$[shift+p]<br />
q<br />
</code><br />
That right there is a MESS, but gets the job done- it&#8217;s not something you want to repeat for fear of a typo. Notice that the first characters you typed were qa: &#8216;q&#8217; starts recording, and &#8216;a&#8217; is the slot we&#8217;re using to store the macro. From here we record how *we* would make the changes, making sure to keep our keystrokes to a minimum. When we&#8217;re done, we stop the macro by pressing &#8216;q&#8217; again.</p>
<p>To run our macro on the next line, press &#8216;@a&#8217; to run the newly created &#8216;a&#8217; macro- it should find the next line that starts with an X (notice the /^X in our first command) and run those commands to massage our text.</p>
<p>Remember how we were talking about 400 lines like this? Even at 2 characters each, that&#8217;s 800 characters to type which is still annoying. Here&#8217;s where the magic comes in- you can record macros of macros:<br />
<code><br />
qb<br />
@a@a@a@a@a@a@a@a@a@a<br />
q<br />
</code><br />
Now each time you run @b, you&#8217;ll run the a macro 10 times. A more efficient way to handle this would be to use<br />
<code><br />
@a<br />
398@@<br />
</code><br />
the first one was done manually to record the macro, the second to play the macro, and the third to say run it 398 more times. </p>
<p>And there you go- a quick tour of recording macros. I&#8217;m sure there&#8217;s much more than what I&#8217;ve shown, but that&#8217;s enough to keep you busy.</p>
]]></content:encoded>
			<wfw:commentRss>http://morgajel.net/2007/10/07/220/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
