<?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>linsec.ca blog &#187; Linux</title>
	<atom:link href="http://linsec.ca/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://linsec.ca/blog</link>
	<description>You can have it right, or you can have it now.  But you can&#039;t have it right now.</description>
	<lastBuildDate>Sat, 05 May 2012 22:03:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Apache mod_rewrite frustration</title>
		<link>http://linsec.ca/blog/2012/05/05/apache-mod_rewrite-frustration/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apache-mod_rewrite-frustration</link>
		<comments>http://linsec.ca/blog/2012/05/05/apache-mod_rewrite-frustration/#comments</comments>
		<pubDate>Sat, 05 May 2012 22:03:58 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1073</guid>
		<description><![CDATA[Dear lazyweb, I&#8217;m having severe issues with Apache&#8217;s mod_rewrite on my VPS. I&#8217;m pretty sure what I want to do is doable, but I can&#8217;t figure out the rewrite rules to allow it. In my httpd.conf I have something similar to this: &#60;IfModule mod_dav.c> LimitXMLRequestBody 131072 DavLockDB /var/dav/DavLock Alias /dav "/home/user/dav" #&#60;Directory /home/user/dav> &#60;Location /dav> [...]]]></description>
			<content:encoded><![CDATA[<p>Dear lazyweb, I&#8217;m having severe issues with Apache&#8217;s mod_rewrite on my VPS.  I&#8217;m pretty sure what I want to do is doable, but I can&#8217;t figure out the rewrite rules to allow it.</p>
<p>In my httpd.conf I have something similar to this:</p>
<p><code><br />
&lt;IfModule mod_dav.c><br />
    LimitXMLRequestBody 131072<br />
    DavLockDB /var/dav/DavLock</p>
<p>    Alias /dav "/home/user/dav"<br />
    #&lt;Directory /home/user/dav><br />
    &lt;Location /dav><br />
        Dav On<br />
        Options +Indexes<br />
        IndexOptions FancyIndexing<br />
        AddDefaultCharset UTF-8<br />
        AuthType Basic<br />
        AuthName "Private"<br />
        AuthUserFile /home/user/dav.passwd<br />
        Require valid-user<br />
    &lt;/Location><br />
    #&lt;/Directory><br />
&lt;/IfModule><br />
</code></p>
<p>This worked fine when the root of the site had nothing but a simple index.html in it.  Now I&#8217;ve got Drupal7 installed, so it does all the fancy mod_rewrite stuff to get the clean urls, etc.  And now when I go to https://site/dav, Drupal is answering and saying &#8220;no such directory&#8221;.  If I have /home/user/dav for the private WebDAV share, I&#8217;m using /home/user/public_html/ for the accessible web site (I do this to prevent any accidental exposure to those data files).  Incidentally I tried with both &lt;Location> and &lt;Directory> and it makes no difference.</p>
<p>The .htaccess in /home/user/public_html/ looks like this (just the important bits):</p>
<p><code><br />
&lt;IfModule mod_rewrite.c><br />
  RewriteEngine on</p>
<p>  RewriteRule ^/dav(/.*)$ /dav/$1 [L,QSA]
<p>  RewriteCond %{REQUEST_FILENAME} !-f<br />
  RewriteCond %{REQUEST_FILENAME} !-d<br />
  RewriteCond %{REQUEST_URI} !=/favicon.ico<br />
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
<p>&lt;/IfModule><br />
</code></p>
<p>I&#8217;ve tried a number of variations (the above is my latest try).  Also tried things like:</p>
<p><code><br />
  RewriteCond %{REQUEST_URI} !^/dav<br />
</code></p>
<p>With and without the extra .* bits, etc.</p>
<p>I am literally tearing my hear out here.  Does anyone have any idea what I&#8217;m doing wrong?  I basically want it to go &#8220;hey, you want /dav?  ok, I won&#8217;t rewrite anything and you can have it) and have /dav/[whatever] loaded requiring auth to access.  Something in the mod_rewrite is killing it, and I suspect it might have to do with Alias.  Maybe all this stuff needs to be in httpd.conf instead of .htaccess?</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/05/05/apache-mod_rewrite-frustration/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Computer Security</title>
		<link>http://linsec.ca/blog/2012/02/22/computer-security/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=computer-security</link>
		<comments>http://linsec.ca/blog/2012/02/22/computer-security/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 22:45:14 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1060</guid>
		<description><![CDATA[Another good one!]]></description>
			<content:encoded><![CDATA[<p><a href="http://linsec.ca/blog/wp-content/uploads/2012/02/photo.jpg" rel="prettyPhoto[1060]"><img src="http://linsec.ca/blog/wp-content/uploads/2012/02/photo-300x225.jpg" alt="" title="Computer Security" width="300" height="225" class="aligncenter size-medium wp-image-1061" /></a></p>
<p>Another good one!</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/02/22/computer-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working from home</title>
		<link>http://linsec.ca/blog/2012/02/22/working-from-home-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=working-from-home-2</link>
		<comments>http://linsec.ca/blog/2012/02/22/working-from-home-2/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 22:40:59 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[home office]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1056</guid>
		<description><![CDATA[Saw this picture and had to share it. I&#8217;m very close to living up to my clients&#8217; expectations in this picture. =) It also made me realize I need bunny slippers and have to work in bed more often.]]></description>
			<content:encoded><![CDATA[<p>Saw this picture and had to share it.  I&#8217;m very close to living up to my clients&#8217; expectations in this picture.  =)  It also made me realize I need bunny slippers and have to work in bed more often.</p>
<p><a href="http://linsec.ca/blog/wp-content/uploads/2012/02/426959_3170944791122_1190557426_3137284_1281522197_n.jpg" rel="prettyPhoto[1056]"><img src="http://linsec.ca/blog/wp-content/uploads/2012/02/426959_3170944791122_1190557426_3137284_1281522197_n-300x225.jpg" alt="" title="Home office" width="300" height="225" class="aligncenter size-medium wp-image-1055" /></a><br />
<span id="more-1056"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/02/22/working-from-home-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>rpm -V and prelinked binaries</title>
		<link>http://linsec.ca/blog/2012/01/23/rpm-v-and-prelinked-binaries/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rpm-v-and-prelinked-binaries</link>
		<comments>http://linsec.ca/blog/2012/01/23/rpm-v-and-prelinked-binaries/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 23:38:08 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[aide]]></category>
		<category><![CDATA[prelink]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1051</guid>
		<description><![CDATA[I&#8217;v been asked this question a few times over the last year or so, so I thought I would explain some of why you might see some issues on a Fedora or Red Hat Enterprise Linux system (or any other Linux distribution that uses prelinked binaries) when trying to track down strange MD5/SHA1 changes to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;v been asked this question a few times over the last year or so, so I thought I would explain some of why you might see some issues on a Fedora or Red Hat Enterprise Linux system (or any other Linux distribution that uses prelinked binaries) when trying to track down strange MD5/SHA1 changes to binaries.</p>
<p>By default, and for nearly a decade now, prelink has shipped with Red Hat Enterprise Linux and Fedora.  What it does is modify the ELF code in binaries and libraries to speed up load times, so that fewer relocations need to be resolved when executing a program.  I can&#8217;t explain all the details and technicalities of it because, quite frankly, they are above my limited brainpower to explain.  Suffice it to say, prelinking is a good thing.  Unless you are using AIDE or Tripwire.  These programs determine whether or not a file has changed based on their MD5SUM or SHA1SUM (or any other *SUM of the binary).  So when you install a program, AIDE sees a certain MD5SUM of the binary.  Later, when prelink runs, that binary might be modified to do the aforementioned relocations.  This will result in a different MD5SUM of the binary, and AIDE will most certainly tell you about the change.  What does not inform you of the change, however, is rpm -V (or rpm &#8211;verify).</p>
<p>The verification command in RPM tells it to compare the MD5SUM of the files in certain package to what is on the filesystem.  It&#8217;s a poor man&#8217;s AIDE, and can also tell you what has changed on your system (from what RPM expects according to when it was installed).  In theory, you would expect rpm -V to report the same discrepancy that AIDE does.  The fact that it doesn&#8217;t is what&#8217;s led to a few questions regarding this.</p>
<p>The &#8220;problem&#8221; (if you can call it that) is that rpm knows about prelink, and knows how to deal with it.  As is succinctly explained in this <a href="http://www.redhat.com/archives/shrike-list/2003-April/msg00592.html">mailing list email</a>, &#8220;rpm when &#8211;verify will prelink &#8211;verify, which is essentially &#8211;undo followed by prelinking again and comparing.&#8221;  So the reason that rpm doesn&#8217;t fail the verification is that it is basically turning off prelink for the file(s) to check, running the verification, then turning prelink back on.  This is why rpm won&#8217;t report on a MD5SUM change, but AIDE will.</p>
<p>So for those of us who use AIDE, we know that we need to do things like daily runs to make sure nothing has changed.  The problem is that if you do this and run a yum update, X number of hours later you&#8217;ll get an email telling you that files have changed.  You might, at that point, update AIDE but there is a window of opportunity there where you may miss things.  We can minimize this by doing an AIDE check, then yum update, then force a prelink run, then update AIDE.  I&#8217;ve been doing this for a few years on Red Hat Enterprise Linux 5 and it essentially gets rid of all false positives.  It&#8217;s a little script called <b>do-update</b> that I execute as root and it runs this:</p>
<pre>
#!/bin/sh
aidecheck &#038;&#038; yum update -y &#038;&#038; /etc/cron.daily/prelink &#038;&#038; aideupdate
</pre>
<p>This doesn&#8217;t eliminate the window of opportunity completely, but it does lessen it considerably.  This uses my <a href="https://github.com/vdanen/AIDE_gpg">AIDE_gpg</a> scripts (aidecheck and aideupdate).  The rest is pretty self-explanatory.</p>
<p>Hopefully this information will be useful to someone.  It took me a bit to dig up the mailing list message I link to above; I knew that prelink was had some special relationship with rpm, but I didn&#8217;t know the particulars.  Now I do, and so do you.  =)</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/01/23/rpm-v-and-prelinked-binaries/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Some quick git tips</title>
		<link>http://linsec.ca/blog/2012/01/05/some-quick-git-tips/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-quick-git-tips</link>
		<comments>http://linsec.ca/blog/2012/01/05/some-quick-git-tips/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 19:16:52 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git config]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1045</guid>
		<description><![CDATA[As I&#8217;ve been git-ifying some stuff around here, I&#8217;ve run into a few tips that might be useful for other git beginners. The first is to setup some global options, some of which are nice for folks coming from Subversion. Having a global ignore file is useful. Mine has the following contents: *~ *.orig *.rej [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve been git-ifying some stuff around here, I&#8217;ve run into a few tips that might be useful for other git beginners.</p>
<p>The first is to setup some global options, some of which are nice for folks coming from Subversion.  Having a global ignore file is useful.  Mine has the following contents:</p>
<pre>
*~
*.orig
*.rej
*.swp
.#*
*.o
.DS_Store
</pre>
<p>Then adjust some global git options:</p>
<pre>
$ git config --global core.excludesfile ~/.gitignore
$ git config --global alias.st status
$ git config --global alias.ci commit
$ git config --global alias.co checkout
$ git config --global alias.br branch
$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
$ git config --global core.editor "vim"
$ git config --global color.branch auto
$ git config --global color.diff auto
$ git config --global color.interactive auto
$ git config --global color.status auto
</pre>
<p>The last few allow for colorized output, which I like (makes things like git status easier to read).</p>
<p>I also found out that I had screwed up the remote origin when setting up a new repository, and didn&#8217;t want to re-do everything, so found this useful one-liner:</p>
<pre>
$ git remote rm origin
</pre>
<p>Git n00bs like me will appreciate the above.  =)  (Note to self, express git urls as ssh://git.remote.com/path/to/repo.git rather than ssh://git.remote.com:/path/to/repo.git!)</p>
<p>Finally, I found an excellent resource called <a href="http://qugstart.com/blog/ruby-and-rails/create-a-new-git-remote-repository-from-some-local-files-or-local-git-repository/">Create a new Git Remote Repository from some local files (or local git repository)</a>.  Very accurate, very clear, and very easy to follow.  Essentially I was taking a 4GB set of documents and wanted to turn it into a remote repository so that I could push/pull from my laptop and using this article, I was able to do so easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2012/01/05/some-quick-git-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merged Annvix.org with linsec.ca</title>
		<link>http://linsec.ca/blog/2011/12/22/merged-annvix-org-with-linsec-ca/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=merged-annvix-org-with-linsec-ca</link>
		<comments>http://linsec.ca/blog/2011/12/22/merged-annvix-org-with-linsec-ca/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 02:29:58 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[annvix]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1039</guid>
		<description><![CDATA[So today I spent a lot of time manually merging the annvix.org mediawiki data into my linsec.ca wiki (in a new Annvix namespace). There are some various automated tools and mediawiki import/export stuff, but I didn&#8217;t have a lot in terms of pages so taking a few hours to do this manually was no big [...]]]></description>
			<content:encoded><![CDATA[<p>So today I spent a lot of time manually merging the annvix.org mediawiki data into my linsec.ca wiki (in a new Annvix namespace).  There are some various automated tools and mediawiki import/export stuff, but I didn&#8217;t have a lot in terms of pages so taking a few hours to do this manually was no big deal (and I figured it would save me time rather than fighting with some maybe-working import/export duo&#8217;s).  The primary reason for this is that I wanted to keep the Annvix info alive yet (that&#8217;s 4.5 years of development &#8220;life&#8221;), but I didn&#8217;t want to maintain what was essentially a read-only wiki.  This way I get both since I need to update the linsec.ca wiki when updates come out.  This also knocked out another wordpress setup from the annvix blog (no need to keep that stuff around really).</p>
<p>I think, honestly, the biggest pain in the arse was making Apache&#8217;s rewrite rules work the way I wanted them to.  I still have the annvix.org domain, and moving the subversion viewvc and repo sub-domain is silly and painful (and neither require much effort on my part), so I&#8217;ve left them but still wanted to redirect http://annvix.org/foo to http://linsec.ca/Annvix:foo.  Easy enough without cPanel getting in the way and .htaccess files and whatnot, so I finally got it working after much goatee tugging.  For the interested, the pertinent bits of the .htaccess file I ended up using are below (criticism welcome!)</p>
<pre>
Options All -Indexes FollowSymLinks

RedirectMatch permanent ^/repo/$ http://repo.annvix.org/

RedirectMatch permanent ^Annvix:(.+)$ http://linsec.ca/Annvix:$1

RewriteEngine on

RewriteCond %{HTTP_HOST} !^repo\.annvix\.org [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ http://linsec.ca/Annvix:$1 [L,QSA]
</pre>
<p>The Apache mod_rewrite stuff always messes me up, so I&#8217;m sure there are prettier ways to do it, but at least this seems to work in all the cases that I want.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2011/12/22/merged-annvix-org-with-linsec-ca/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rsec and AIDE+gpg now on github</title>
		<link>http://linsec.ca/blog/2011/10/29/rsec-and-aidegpg-now-on-github/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rsec-and-aidegpg-now-on-github</link>
		<comments>http://linsec.ca/blog/2011/10/29/rsec-and-aidegpg-now-on-github/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 23:41:46 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[AIDE+gpg]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rsec]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1029</guid>
		<description><![CDATA[Ok, so the last of my git-related topics today (I need to get back to washing windows, sadly). I&#8217;ve pulled out AIDE+gpg and rsec from the Annvix tools subversion repository and they are now on github: AIDE+gpg on github rsec on github The next step, maybe for around Christmas, is to turn these into Fedora [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so the last of my git-related topics today (I need to get back to washing windows, sadly).</p>
<p>I&#8217;ve pulled out AIDE+gpg and rsec from the Annvix tools subversion repository and they are now on github:</p>
<p><a href="https://github.com/vdanen/AIDE_gpg">AIDE+gpg on github</a><br />
<a href="https://github.com/vdanen/rsec">rsec on github</a></p>
<p>The next step, maybe for around Christmas, is to turn these into Fedora and/or EPEL packages so that I can (finally?) actually be a Fedora contributor beyond just filing security bugs.  I may be the only one made happy by that, but I think it would be cool.  =)</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2011/10/29/rsec-and-aidegpg-now-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dissecting part of a subversion repo to git</title>
		<link>http://linsec.ca/blog/2011/10/29/dissecting-part-of-a-subversion-repo-to-git/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dissecting-part-of-a-subversion-repo-to-git</link>
		<comments>http://linsec.ca/blog/2011/10/29/dissecting-part-of-a-subversion-repo-to-git/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 19:14:48 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1027</guid>
		<description><![CDATA[Well, that was pretty easy to figure out. As per my last post, I was going to try to break out the AIDE+gpg part of the Annvix tools subversion repo to be it&#8217;s own git repo. It was scary simple. First, the location of AIDE+gpg in the subversion repo was &#8220;tools/AIDE+gpg&#8221; and it had one [...]]]></description>
			<content:encoded><![CDATA[<p>Well, that was pretty easy to figure out.  As per my last post, I was going to try to break out the AIDE+gpg part of the Annvix tools subversion repo to be it&#8217;s own git repo.  It was scary simple.</p>
<p>First, the location of AIDE+gpg in the subversion repo was &#8220;tools/AIDE+gpg&#8221; and it had one sub-directory, &#8220;trunk&#8221;.  I never did end up using tags or branches or anything there.  So the entire step from start to finish to do it was as follows:</p>
<pre>
git init AIDE
cd AIDE
echo "vdanen = Vincent Danen <[my email]>" >authors.txt
git svn init -T trunk svn+ssh://[repo]/tools/AIDE+gpg --no-metadata
git svn fetch -A authors.txt
git init --bare ../tmp
cd ../tmp
git symbolic-ref HEAD refs/heads/trunk
cd ../AIDE
git remote add bare ../tmp
git config remote.bare.push 'refs/remotes/*:refs/heads/*'
git push bare
cd ../tmp
git branch -a
git branch -m trunk master
mv tmp AIDE+gpg.git
</pre>
<p>Presto.  Done.  Apparently I should now put this repo somewhere public (like github).  I will figure that part out after lunch.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2011/10/29/dissecting-part-of-a-subversion-repo-to-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Figuring this git thing out</title>
		<link>http://linsec.ca/blog/2011/10/29/figuring-this-git-thing-out/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=figuring-this-git-thing-out</link>
		<comments>http://linsec.ca/blog/2011/10/29/figuring-this-git-thing-out/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 18:37:29 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1019</guid>
		<description><![CDATA[I&#8217;m a little old-school in that I like subversion. I&#8217;ve used subversion for years, and have had it as a big part of my workflow for a really really long time. Unfortunately, there&#8217;s this git thing popping up all over the place and I&#8217;m starting to feel dated. (It&#8217;s bad enough that my daughter turned [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a little old-school in that I like subversion.  I&#8217;ve used subversion for years, and have had it as a big part of my workflow for a really really long time.  Unfortunately, there&#8217;s this git thing popping up all over the place and I&#8217;m starting to feel dated.  (It&#8217;s bad enough that my daughter turned 10 this month, which makes me feel old, so I have to find other ways of not feeling out-dated!).</p>
<p>The problem is that all of my version control repos are in subversion, and I hate losing history.  On some, I went through a painful CVS->SVN migration when I first started using subversion, and I was pleasantly surprised that git makes it quite a bit easier.  I found <a href="http://www.albin.net/git/convert-subversion-to-git">this blog posting</a> that helped me (for the most part&#8230; if you don&#8217;t use tags and branches, etc. you want to pay attention when doing some of the steps&#8230; took me a bit to figure that out).  Most notably, in steps four and five when changing the &#8220;trunk&#8221; to &#8220;master&#8221;; it assumes you have the standard trunk/, tags/, branches/ layout (which I do in some repos, and not in others).  If you use that convention, it works fine.  If not, you can run into problems like I did.</p>
<p>The posting indicates to use:</p>
<pre>
git svn clone [SVN repo URL] --no-metadata -A authors-transform.txt \
   --stdlayout ~/temp
...
git init --bare ~/new-bare.git
cd ~/new-bare.git
git symbolic-ref HEAD refs/heads/trunk
cd ~/temp
git remote add bare ~/new-bare.git
git config remote.bare.push 'refs/remotes/*:refs/heads/*'
git push bare
cd ~/new-bare.git
git branch -m trunk master
</pre>
<p>But this didn&#8217;t work for me, as &#8211;stdlayout isn&#8217;t so standard in my case (no tags/trunk/branches, so the top-level is the &#8220;trunk&#8221;).  Instead I had to do:</p>
<pre>
git svn clone [svn repo] -A authors-transform.txt ~/tmp/git
cd ~/tmp/git
git init --bare ~/git/scripts.git
git remote add bare ~/git/scripts.git
git config remote.bare.push 'refs/remotes/*:refs/heads/*'
git push bare
cd ~/git/scripts.git
git branch -m git-svn master
</pre>
<p>In this case, the only branch is the &#8220;git-svn&#8221; branch, so we want to turn &#8220;git-svn&#8221; into &#8220;master&#8221; (rather than trying to hunt down some non-existant branch called &#8220;trunk&#8221;).  There might have been a better way to do this, but I&#8217;m a n00b so forgive me.  All the explanation for the above is in that blog post I mentioned before (I&#8217;m mostly noting this as undoubtably I&#8217;ll bump my head against this again).</p>
<p>Some other useful links I found were <a href="http://wiki.sourcemage.org/Git_Guide#How_do_I_get_my_copy_of_the_repository.3F">this git guide</a> and a piece on <a href="http://gofedora.com/how-to-install-configure-gitweb/">setting up gitweb on Fedora</a> (works on RHEL also).  Gitweb was essential, as I&#8217;m used to using viewvc with my subversion repos.</p>
<p>So will I use git for all my repos?  Probably not.  There are some old ones that don&#8217;t need to be converted because it&#8217;s all legacy code, and there are some others that I&#8217;ve built up with too much automation.  I would like to try to extract some pieces of existing subversion repos into git, however.  The AIDE+gpg scripts are one; they&#8217;re in the Annvix tools repo, and I&#8217;d like to try to break it out into it&#8217;s own git repo with history&#8230; not sure if this is possible but I&#8217;ll poke around and see what I can come up with.  There are a few other Annvix tools that I&#8217;d do the same with (the rsec tool for one).  Since Annvix isn&#8217;t in development anymore, I&#8217;d like to &#8220;untie&#8221; those tools from it and offer them as stand-alone things (probably on github or something).</p>
<p>So that&#8217;s my Saturday adventures for this weekend.  =)</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2011/10/29/figuring-this-git-thing-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIDE+gpg 1.0.4 released</title>
		<link>http://linsec.ca/blog/2011/10/22/aidegpg-1-0-4-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=aidegpg-1-0-4-released</link>
		<comments>http://linsec.ca/blog/2011/10/22/aidegpg-1-0-4-released/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 17:02:01 +0000</pubDate>
		<dc:creator>vdanen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[aide]]></category>
		<category><![CDATA[AIDE+gpg]]></category>
		<category><![CDATA[annvix]]></category>

		<guid isPermaLink="false">http://linsec.ca/blog/?p=1017</guid>
		<description><![CDATA[I&#8217;ve just released AIDE+gpg 1.0.4, which adds support for signing and verifying signatures on the AIDE binary itself (/usr/sbin/aide), and on the AIDE configuration file (/etc/aide.conf). Thanks to George Notaras for giving me the suggestion. Apparently someone other than myself uses these scripts. =) AIDE+gpg is a set of scripts to make AIDE more like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released AIDE+gpg 1.0.4, which adds support for signing and verifying signatures on the AIDE binary itself (/usr/sbin/aide), and on the AIDE configuration file (/etc/aide.conf).  Thanks to George Notaras for giving me the suggestion.</p>
<p>Apparently someone other than myself uses these scripts.  =)  AIDE+gpg is a set of scripts to make AIDE more like Tripwire in that the database is cryptographically signed (with gpg) so you can be alerted as to whether or not the AIDE database has been tampered with between runs. It also setups a cron job to check the database against the system daily to alert you of any changes. It is an add-on to AIDE that can be used on any Linux distribution (and probably distributions as well, although you may need to edit the scripts if the binary locations for gpg and aide differ from RHEL).</p>
<p>You can grab it from the <a href="http://annvix.org/Tools/AIDE_gpg">project page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://linsec.ca/blog/2011/10/22/aidegpg-1-0-4-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

