<?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>Vorlon's Blog &#187; tools</title>
	<atom:link href="http://blog.vorlons.info/archives/tag/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vorlons.info</link>
	<description>Science, Life, Computers, ... who knows what will end up in here...</description>
	<lastBuildDate>Mon, 12 Oct 2009 15:35:11 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>etckeeper &#8211; keeping /etc in a git repository</title>
		<link>http://blog.vorlons.info/archives/2008/02/28/166/</link>
		<comments>http://blog.vorlons.info/archives/2008/02/28/166/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 21:35:25 +0000</pubDate>
		<dc:creator>vorlon</dc:creator>
				<category><![CDATA[Computer stuff]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.vorlons.info/archives/2008/02/28/166/</guid>
		<description><![CDATA[When having a look at git yesterday, I stumbled upon etckeeper, a tool to keep /etc in a git (or mercurial) repository and also keeps the metadata (file permissions, &#8230;) in the repo making use of metastore.
It hooks into apt but I used /etc/portage/basrc to call it before and after installing a package:
 case &#8220;$EBUILD_PHASE&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>When having a look at <a href="http://git.or.cz/">git</a> yesterday, I stumbled upon <a href="http://kitenet.net/~joey/code/etckeeper/">etckeeper</a>, a tool to keep /etc in a git (or mercurial) repository and also keeps the metadata (file permissions, &#8230;) in the repo making use of <a href="http://david.hardeman.nu/software.php">metastore</a>.</p>
<p>It hooks into apt but I used /etc/portage/basrc to call it before and after installing a package:</p>
<blockquote><p> case &#8220;$EBUILD_PHASE&#8221;  in<br />
preinst)<br />
elog &#8220;Running etckeeper pre-install&#8230;&#8221;<br />
/usr/bin/etckeeper pre-install<br />
;;<br />
postinst)<br />
elog &#8220;Running etckeeper post-install&#8230;&#8221;<br />
/usr/bin/etckeeper post-install<br />
;;<br />
esac</p></blockquote>
<p>One could also modify /etc/etckeeper/post-install.d/50vcs-commit to include the package name etc. in the commit message while emerging:</p>
<blockquote><p>  &#8212; a/post-install.d/50vcs-commit<br />
+++ b/post-install.d/50vcs-commit<br />
@@ -2,5 +2,12 @@<br />
set -e</p>
<p>if etckeeper unclean; then<br />
-       etckeeper commit &#8220;committing changes after $HIGHLEVEL_PACKAGE_MANAGER run&#8221;<br />
+       case $LOWLEVEL_PACKAGE_MANAGER in<br />
+               portage)<br />
+                       etckeeper commit &#8220;committing changes after $HIGHLEVEL_PACKAGE_MANAGER run ($CATEGORY/$P)&#8221;<br />
+                       ;;<br />
+               *)<br />
+                       etckeeper commit &#8220;committing changes after $HIGHLEVEL_PACKAGE_MANAGER run&#8221;<br />
+                       ;;<br />
+       esac<br />
fi</p></blockquote>
<p>There are probably other/better ways to accomplish this and more&#8230;</p>
<p>Anyways&#8230; etckeeper looks like a nice and very flexible tool to keep /etc in a repository if one wants to.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vorlons.info/archives/2008/02/28/166/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
