<?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>John&#039;s Tidbits</title>
	<atom:link href="http://inodes.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://inodes.org</link>
	<description>Moo - Development, Trouble-shooting and Random thoughts...</description>
	<lastBuildDate>Thu, 19 Apr 2012 10:15:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Linux Australia – President’s Report August 2010</title>
		<link>http://inodes.org/2010/08/14/linux-australia-presidents-report-august-2010/</link>
		<comments>http://inodes.org/2010/08/14/linux-australia-presidents-report-august-2010/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 02:27:17 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[ato]]></category>
		<category><![CDATA[auskey]]></category>
		<category><![CDATA[lca2011]]></category>
		<category><![CDATA[lca2012]]></category>
		<category><![CDATA[sbr]]></category>
		<category><![CDATA[SFD]]></category>
		<category><![CDATA[softwarefreedomday]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=282</guid>
		<description><![CDATA[It’s been just over a month since my last presidents report, which according to past presidents means that I’m doing well. Apparently the first report is the easy one, maintaining momentum is the key! LCA2011 We are now well and truly into the run up to linux,conf.au 2011. The LCA Call for Papers, Miniconfs, Posters [...]]]></description>
			<content:encoded><![CDATA[<p>It’s been just over a month since my last presidents report, which according to past presidents means that I’m doing well. Apparently the first report is the easy one, maintaining momentum is the key!</p>
<h3>LCA2011</h3>
<p>We are now well and truly into the run up to linux,conf.au 2011. The LCA Call for Papers, Miniconfs, Posters and Tutorials (that is quite a mouthful!), has been open since the 13th of July. The CFP closes at midnight tonight, so it’s still not too late to get a proposal in.</p>
<p>Everyone should spend the next 5 minutes thinking of the one person or topic they would love to be able to listen to at LCA next year. Now, go and email that person and convince them to submit something. But hurry, you don’t have long.</p>
<p>The Paper Review Committee will be performing an online review of all the papers over the next 2 weeks. They will then meet in Sydney for a final one day review to decide what makes it into the conference. I’ve been involved in the process for the last few years, and I can tell you that it is not an easy process. The quality of the submissions we receive for LCA each year is extremely high and it is a very difficult task to whittle down 200-300 submissions into the 90 or so proposals we have space for.</p>
<h3>LCA2012 Bid process</h3>
<p>Submissions for LCA2012 close on the 15th of August, which is tomorrow night! So far we have had an expression of interest from Ballarat, and the odd rumour that other cities also have some teams thinking about it.</p>
<p>Once the bids come in, the council will take time to review them, and then we will begin visiting each team so that they can pitch their bid to us in person why they should earn the honour of hosting the next LCA.</p>
<p>This year we have changed the process slightly and asked all the teams to post their submission publicly. I’m looking forward to reading the proposals and having a healthy community discussion about which city should host LCA.</p>
<h3>Software Freedom Day</h3>
<p>Software Freedom Day is just around the corner, being held on the 18th of September. SFD is a worldwide celebration of FOSS and also serves to educate the general public about the benefits of FOSS.</p>
<p>According to the SFD website, it looks like we have about 6 teams registered in Australia. Noticeably missing are most of our capital cities. Please bring up SFD at your next LUG meeting  or on your LUGs mailing list and try to organise an event in your area.</p>
<p>This year Linux Australia will be assisting SFD teams by providing schwag from past LCAs to give away at events. You should see an email to the list with more details about this shortly.</p>
<p>Also don’t forget that when you register your team on the official SFD website, Software Freedom International will send out SFD schwag for you to use on the day.</p>
<h3>Australian Treasury Department, SBR and Auskey (Update)</h3>
<p>As I mentioned last month, I’ve been doing some work in my capacity as President as well as my day job in regards to creating an Open Source project around the Australian Treasury’s Standard Business Reporting (SBR) project.</p>
<p>We recently held a meeting with some representatives from the Department of Treasury, where we were able to discuss our plans and what is required to make SBR and Auskey available for the Open Source community. SBR have shown a keen interest in the project and have been quite helpful in making resources and people available to help us with the project.</p>
<p>SBR have also recently announced that they will be supporting Linux on the AusKey website. This has not been possible up till this point as a browser plug-in is required to be able to interact with Auskey. SBR hopes to have a solution released by the end of the year and will be initially supporting Ubuntu. This means that Australian businesses using Open Source Software will soon be able to submit their BASs online again.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2010/08/14/linux-australia-presidents-report-august-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux Australia &#8211; President&#8217;s Report July 2010</title>
		<link>http://inodes.org/2010/07/08/linux-australia-presidents-report-july-2010/</link>
		<comments>http://inodes.org/2010/07/08/linux-australia-presidents-report-july-2010/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 04:30:41 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[council]]></category>
		<category><![CDATA[la]]></category>
		<category><![CDATA[lca2011]]></category>
		<category><![CDATA[lca2012]]></category>
		<category><![CDATA[linux australia]]></category>
		<category><![CDATA[linuxaus]]></category>
		<category><![CDATA[president]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=264</guid>
		<description><![CDATA[It has been about 6 months since the current Linux Australia Council was voted in, and about a month since I became President, following James Turnbull’s resignation. In that time, the Council has been working on implementing the platform that we ran on. We have successfully managed to hold a Council meeting every fortnight (with [...]]]></description>
			<content:encoded><![CDATA[<p>It has been about 6 months since the current Linux Australia Council was voted<br />
in, and about a month since I became President, following James Turnbull’s<br />
resignation. In that time, the Council has been working on implementing the<br />
platform that we ran on. We have successfully managed to hold a Council meeting<br />
every fortnight (with a very few exceptions), to allow us to get together to<br />
organise events and implement the goals of Linux Australia.</p>
<p>There has been the odd murmur that Linux Australia is not doing a good enough<br />
job of communicating with the community, and I would have to agree. While we<br />
are sending out meeting minutes every fortnight, I think we are lacking a more<br />
direct communication as to what the Council and Linux Australia are up to. To<br />
that end, I would like to initiate a monthly President&#8217;s report to try and get<br />
the word out as to what we are doing.</p>
<h3>Changes to the Council</h3>
<p>First of all, on behalf of the Council and the rest of the community, I would<br />
like to send a large Thank You to James Turnbull for all the work he did during<br />
the first half of the year in his role as president. I would especially like to<br />
draw attention to the work that James put into the Linux Australia Membership<br />
Survey, results of which we plan to release in the next month. James will be<br />
sorely missed, and we wish him all the best in his future endeavours in<br />
Portland.</p>
<p>I&#8217;d also like to welcome Joshua Hesketh to the Council. Josh is already doing a<br />
wonderful job as treasurer, as well as our liaison with the LCA2011 team.</p>
<h3>Australian Treasury Department, SBR and Auskey</h3>
<p>As many of you may be aware, the Australian Treasury has just released a new<br />
project called Standard Business Reporting (SBR). This project aims to<br />
standardise reporting to government, with an aim to becoming a centralised<br />
point where business can submit forms to government. In essence, it is an API<br />
which will allow standard government documents, like a BAS or employment<br />
declaration, to be filed electronically. At the moment the ATO, ASIC and<br />
various Offices of State Revenue are involved in the project. However, there is<br />
a large amount of interest from other departments, like Medicare and<br />
Centerlink. Hand-in-hand with this project is another sub-project called<br />
AusKey, which is an all-of-government PKI system that is already beginning to<br />
replace the existing ECI system used at the ATO to authenticate BAS filing.</p>
<p>A few months ago, I was contacted by Ron Skeoch from Muli Management. Muli have<br />
been involved in the Open Source community for a number of years, and support a<br />
piece of accounting software targeted at the construction industry. Muli need<br />
to have their software support the SBR system, and they were interested in my<br />
assistance; firstly helping them write the software to interface with the SBR,<br />
but secondly in assisting them create this as a fully fledged open source<br />
project that other projects could then use. At this stage, I put my Linux<br />
Australia hat on, and indicated that we would like to work together with Muli<br />
to help make that happen.</p>
<p>While this process is still at an early stage, we have already submitted a<br />
document to Treasury outlining the requirements for the Open Source community<br />
to be able to interact with SBR. We also pointed out the current issues with<br />
AusKey in relation to being able to file a BAS. The response from Treasury has<br />
been very promising, and they are quite eager to work with Linux Australia and<br />
Muli to try and aid the Open Source community in any way they can; including<br />
potentially even placing the reference clients under an appropriate license, so<br />
that we can make use of them.</p>
<p>*For purposes of transparency I would like to point out a potential<br />
conflict of interest here. Muli Management is a customer of my business and has<br />
engaged me to among other things write the code and help create the open source<br />
project.*</p>
<h3>LCA2011</h3>
<p>Preparations for linux.conf.au 2011 in Brisbane are well under way. Some<br />
members of the Council, along with past LCA organisers and the new LCA team,<br />
met for Ghosts in April in Brisbane. This was an extremely valuable experience<br />
where past organisers were able to pass on some wisdom, and the current team<br />
was able to pass on some of the ideas they have in store for us next year. The<br />
meeting was held at the venue itself, where we were able to take a short tour<br />
of where the conference will be held as well as some of the surrounding areas.<br />
I have a lot of confidence that Shaun and his team are going to put together an<br />
excellent conference. The Call for Papers should open shortly, so now is the<br />
time to start thinking about the presentation you want to give at the next LCA.</p>
<h3>LCA2012 Bid process</h3>
<p>We recently announced our request for formal submissions for hosting<br />
linux.conf.au 2012. So far we have an official expression of Interest from<br />
Ballarat, and I have heard the odd rumour of goings on in Sydney and Canberra.<br />
Submissions close on August 15th, just over a month away. That is still plenty<br />
of time to put in a bid for the conference. If you think you might have it in<br />
you, but need some co-conspirators, then please feel free to send the Council a<br />
quick email. We may know of people in your area who are in the same position<br />
and can help put you in touch with each other.</p>
<h3>Media Sub-Committee</h3>
<p>One area in which we have been lacking recently is getting our message about<br />
things we care about out effectively to the media. This is in relation to<br />
events we are holding, announcements about linux.conf.au and opinions on<br />
relevant issues. The idea of a media sub-committee was originally raised at the<br />
Face to Face meeting in February although it is not a new idea. There was a<br />
press team once upon a time; the mailing list even still exists! I&#8217;ve asked<br />
James Purser to put together a team and a framework for it to work in, so that<br />
not too great a burden is placed on any one member. If you are interested in<br />
helping out with media related activities, whether on twitter or with media<br />
organisations directly, please get in touch with James.</p>
<h3>Linux Australia Membership Survey</h3>
<p>As mentioned above, we recently ran a survey of Linux Australia Members. The<br />
survey was aimed at the Australian FOSS community and our aim was to gather<br />
information to aid us in making decisions about what Linux Australia is, and<br />
the directions that it should take as an organisation. We had an excellent<br />
response with 528 submissions, including three people claiming to be Linus<br />
Torvalds. The Council is working at the moment on collating all of the results.<br />
Our plan is to release all of the anonymised raw data to the community in the<br />
next month. It is our hope that the community will help us in spending some<br />
time to analyse the data and tell us what they think it means. In due course,<br />
the Council will present some analyses of its own.</p>
<h3>Events</h3>
<p>We recently had two very successful events which were supported by Linux<br />
Australia. The first was PyCon AU 2010, this is the first time that this event<br />
has been run in Australia and was possible due to the hard work of Tim Ansell,<br />
Neil Davenport and Richard Jones. I hear that the event was a tremendous<br />
success, and sold out before close of registrations. A few attendees I&#8217;ve<br />
talked to were very excited and can&#8217;t wait for next years conference. The<br />
conference is running on a model of the same team running it twice in a row in<br />
the same city and a formal request for bids to host PyCon AU 2012-2013 in the<br />
next few months.</p>
<p>The other event was the Sydney Education Expo. The Linux Australia stand at<br />
this event was organised by Patrick Elliott-Brennan who did a wonderful job in<br />
preparing everything required for the stand at the expo. Sridhar Dhanapalan<br />
also assisted in his role as Technical Manager at OLPC Australia, who shared<br />
the stand with us and provided some sponsorship.</p>
<p>That&#8217;s all for this month. It feels like we&#8217;ve been fairly busy. Hopefully I&#8217;ll<br />
have just as much to write about next month. See you then!</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2010/07/08/linux-australia-presidents-report-july-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devops Down Under 2010</title>
		<link>http://inodes.org/2010/04/29/devops-down-under-2010/</link>
		<comments>http://inodes.org/2010/04/29/devops-down-under-2010/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 03:01:50 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=259</guid>
		<description><![CDATA[I&#8217;ll be at Devops Down Under this weekend. This should be an amazing weekend, filled with talks which aim to help bridge the Developer and Sysadmin divide. I&#8217;ll be giving a presentation entitiled Commit early, Deploy often. I&#8217;ll be talking about using package management to empower developers to deploy applications locally just as they would [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be at <a href="http://devopsdownunder.org">Devops Down Under</a> this weekend. This should be an amazing weekend, filled with talks which aim to help bridge the Developer and Sysadmin divide.</p>
<p>I&#8217;ll be giving a presentation entitiled <strong>Commit early, Deploy often</strong>. I&#8217;ll be talking about using package management to empower developers to deploy applications locally just as they would in production. This also means sysadmins can deploy using the exact same environment.</p>
<p>There are still <a href="http://devopsdownunder.eventbrite.com/">a few tickets left</a>, so if you are in Sydney this weekend and are either a developer or a sysadmin then make sure you come along.</p>
<p>Disclaimer: I&#8217;m also sponsoring the event.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2010/04/29/devops-down-under-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taking your cucumber tests back to the future with Delorean</title>
		<link>http://inodes.org/2010/03/31/taking-your-cucumber-tests-back-to-the-future-with-delorean/</link>
		<comments>http://inodes.org/2010/03/31/taking-your-cucumber-tests-back-to-the-future-with-delorean/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 02:28:35 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[chronic]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[delorean]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[vquence]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=241</guid>
		<description><![CDATA[I&#8217;m currently working on an API for Vquence&#8217;s VQdata product which allows our customers to use a REST interface to retrieve videos with certain keywords they have previously stored. While writing tests I need to be able to mock out the Time object so that my tests were deterministic relative to time. I remembered listening [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on an API for Vquence&#8217;s VQdata product which allows our customers to use a REST interface to retrieve videos with certain keywords they have previously stored. While writing tests I need to be able to mock out the Time object so that my tests were deterministic relative to time.</p>
<p>I remembered listening to a <a href="http://ruby5.envylabs.com/episodes/56-episode-54-february-26-2010">Ruby5 podcast</a> which mentioned a great little gem called <a href="http://github.com/bebanjo/delorean">Delorean</a>.</p>
<p>Delorean easily allows you to mock time in your tests. In no time I had hooked it up to cucumber.</p>
<p>In features/support/delorean.rb:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'delorean'</span>  
&nbsp;
<span style="color:#008000; font-style:italic;"># Make sure we fix the time up after each scenario</span>
After <span style="color:#9966CC; font-weight:bold;">do</span>
  Delorean.<span style="color:#9900CC;">back_to_the_present</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>and then in features/step_definitions/delorean_steps.rb</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Given <span style="color:#006600; font-weight:bold;">/</span>^I time travel to <span style="color:#006600; font-weight:bold;">&#40;</span>.<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span>$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>period<span style="color:#006600; font-weight:bold;">|</span>
  Delorean.<span style="color:#9900CC;">time_travel_to</span><span style="color:#006600; font-weight:bold;">&#40;</span>period<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>this lets me create steps like</p>

<div class="wp_syntax"><div class="code"><pre class="cucumber" style="font-family:monospace;">  Scenario: Link attributes are correct for yesterday
    Given I time travel to 2010-02-01 05:00
    When I GET the videos keywords feeds page
    Then I should see &quot;start_time=2010-02-01T00:00:00&quot;</pre></div></div>

<p>Some other examples you can use with Delorean are</p>
<ul>
<li> 2 weeks ago
  </li>
<li> tomorrow
  </li>
<li> next tuesday 5pm
</li>
</ul>
<p>You can find more examples in the <a href="http://chronic.rubyforge.org/">Chronic gem documentation</a> which Delorean uses to achieve this functionality. </p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2010/03/31/taking-your-cucumber-tests-back-to-the-future-with-delorean/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Careful what you call your server!</title>
		<link>http://inodes.org/2010/03/01/careful-what-you-call-your-server/</link>
		<comments>http://inodes.org/2010/03/01/careful-what-you-call-your-server/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 00:09:19 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtialisation]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=236</guid>
		<description><![CDATA[I was setting up a server recently and I was using KVM to virtualise a whole lot of hosts. Being fairly unimaginative I decided to call the machine kvm. As usual I used LVM for the disks. Now on Ubuntu this means that by default the VG will be called the same as the host [...]]]></description>
			<content:encoded><![CDATA[<p>I was setting up a server recently and I was using KVM to virtualise a whole lot of hosts. Being fairly unimaginative I decided to call the machine kvm. As usual I used LVM for the disks. Now on Ubuntu this means that by default the VG will be called the same as the host name. This means the root LV will appear on the system as <strong>/dev/kvm/root</strong>.</p>
<p>When they KVM modules are loaded, they try and create a device called <strong>/dev/kvm</strong>. This fails pretty miserably since <strong>/dev/kvm</strong> is already a directory due to LVM shenanigans.</p>
<p>Not all is lost though if you&#8217;ve done a lot of setup like I had. You can rename VGs. Simply boot from your Ubuntu install CD, choose rescue mode and then jump into a shell. First you deactivate the LVs using</p>
<pre>
vgchange -a n
</pre>
<p>then you can rename the VG using</p>
<pre>
vgrename kvm kvmvg
</pre>
<p>Not sure whether I should file this problem as a bug. It is a bit of a weird situation.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2010/03/01/careful-what-you-call-your-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Less is more for ISOs</title>
		<link>http://inodes.org/2010/01/28/less-is-more-for-isos/</link>
		<comments>http://inodes.org/2010/01/28/less-is-more-for-isos/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 01:35:50 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[less]]></category>
		<category><![CDATA[surprising]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=229</guid>
		<description><![CDATA[I was tidying up some data recently and found a couple of ISO images lying around with cryptic file names. I didn&#8217;t have cdinfo installed, so I though I&#8217;d run less hoping that the binary data would have some useful text in it. Instead I was surprised to see the following: CD-ROM is in ISO [...]]]></description>
			<content:encoded><![CDATA[<p>I was tidying up some data recently and found a couple of ISO images lying around with cryptic file names. I didn&#8217;t have <strong>cdinfo</strong> installed, so I though I&#8217;d run <strong>less</strong> hoping that the binary data would have some useful text in it. Instead I was surprised to see the following:</p>
<pre>
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: Ubuntu-Server 9.10 i386
Volume set id:
Publisher id:
Data preparer id:
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR
   (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING
   (C) 2006-2007 CDRKIT TEAM
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 327972
El Torito VD version 1 found, boot catalog is in sector 1804
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 704 1796

/.disk
/README.diskdefines
&lt;snip&gt;File system listing&lt;/snip&gt;
</pre>
<p>Looks like less runs <strong>isoinfo -f -R -J -i ubuntu-9.10-server-i386.iso</strong>. So I did have the tools I needed installed, I just didn&#8217;t know it yet <img src='http://inodes.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2010/01/28/less-is-more-for-isos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Australia Elections, Last chance to vote!</title>
		<link>http://inodes.org/2010/01/10/linux-australia-elections-last-chance-to-vote/</link>
		<comments>http://inodes.org/2010/01/10/linux-australia-elections-last-chance-to-vote/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 04:38:20 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[election]]></category>
		<category><![CDATA[lca]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=223</guid>
		<description><![CDATA[If you haven&#8217;t done so, please go and vote in the Linux Australia elections. If you aren&#8217;t a member then just join first, membership is free. I&#8217;m running for the position of Treasurer, but you don&#8217;t need to vote for me since I&#8217;m running unopposed. I&#8217;m running on a common platform with a group of [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t done so, please go and vote in the Linux Australia elections. If you aren&#8217;t a member then just join first, membership is free.</p>
<p>I&#8217;m running for the position of Treasurer, but you don&#8217;t need to vote for me since I&#8217;m running unopposed.</p>
<p>I&#8217;m running on a common platform with a group of other like minded individuals. You can find the details of the platform <a href="http://docs.google.com/Doc?docid=0AQ1T1dSjXs2iYWpneGdnYzUzanpnXzR3c2R6ZmNoaA&#038;hl=en">here</a>.</p>
<p>The main reason I&#8217;m running is I believe that Linux Australia can achieve so much more than it does today. Linux Australia should not simply be a conduit for linux.conf.au.</p>
<p>I want to help turn Linux Australia into an organisation that is relevant to all of us. It should be an organisation that not only fosters and supports the community but also represents the community.</p>
<p>We should offer supportive services to our members, spread the FOSS message through the community as well as actively lobby government for the things we believe in.</p>
<p>Most importantly it is essential that we all become involved. The community is nothing without people to move it forwards. So I would encourage you to vote for</p>
<p><strong>President</strong> James Turnbull<br />
<strong>Vice President</strong> Lindsay Holmwood<br />
<strong>Secretary</strong> Peter Lieverdink<br />
<strong>Treasurer</strong> John Ferlito</p>
<p><strong>Ordinary Committee Members</strong><br />
    Alice Boxhall<br />
    Elspeth Thorne</p>
<p>Once you have finished voting, go and join the <a href="http://lists.linux.org.au">mailing lists</a> and get involved.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2010/01/10/linux-australia-elections-last-chance-to-vote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding multiple database support to Cucumber</title>
		<link>http://inodes.org/2009/10/08/adding-multiple-database-support-to-cucumber/</link>
		<comments>http://inodes.org/2009/10/08/adding-multiple-database-support-to-cucumber/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 06:46:16 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[transactions]]></category>
		<category><![CDATA[vquence]]></category>

		<guid isPermaLink="false">http://inodes.org/?p=210</guid>
		<description><![CDATA[The Vqmetrics application needs to connect to two different databases. The first holds the videos, authors and their relevant statistics, while the second database holds the users, monitors and trackers. We do this by specifying two databases in config/database.yml. development: database: vqmetrics_devel &#60; &#60;: *login_dev_local &#160; vqdata_development: &#38;VQDATA_TEST database: vqdata_devel &#60;&#60;: *login_dev_local So by default [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://vquence.com.au">Vqmetrics</a> application needs to connect to two different databases. The first holds the videos, authors and their relevant statistics, while the second database holds the users, monitors and trackers.</p>
<p>We do this by specifying two databases in <strong>config/database.yml</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="yaml" style="font-family:monospace;">development:
  database: vqmetrics_devel
  &lt; &lt;: *login_dev_local
&nbsp;
vqdata_development: &amp;VQDATA_TEST
  database: vqdata_devel
  &lt;&lt;: *login_dev_local</pre></div></div>

<p>So by default the <strong>vqmetrics_devel</strong> database will be used. When we need to specify a  model where we need to connect to the <strong>vqdata_devel</strong> database we use</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> Video <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  establish_connection <span style="color:#996600;">&quot;vqdata_#{RAILS_ENV}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>and for migrations that need to connect to this database we do the following.</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> InitialSetup <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Migration</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">connection</span>
    Video.<span style="color:#9900CC;">connection</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This setup works really well. However recently I moved this application to using <a href="http://cukes.info">Cucumber</a> for testing. Tests worked fine the first time they are run but not the second time.</p>
<p>I discovered that the transaction on the second database where not being rolled back as they should be. Cucumber only sets up the first database for roll back by using </p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>.<span style="color:#9900CC;">connection</span></pre></div></div>

<p>where it should be rolling them all back by looping through</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>.<span style="color:#9900CC;">connection_handler</span>.<span style="color:#9900CC;">connection_pools</span>.<span style="color:#9900CC;">values</span>.<span style="color:#9900CC;">map</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>pool<span style="color:#006600; font-weight:bold;">|</span> pool.<span style="color:#9900CC;">connection</span><span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>I've filed a bug at <a href="https://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/480-cucumber-only-turns-on-transactions-for-one-database">lighthouseapp</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2009/10/08/adding-multiple-database-support-to-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rm -rf /usr/lib</title>
		<link>http://inodes.org/2009/09/15/rm-rf-usrlib/</link>
		<comments>http://inodes.org/2009/09/15/rm-rf-usrlib/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 04:06:55 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[rm updatedb recovery backups]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/?p=198</guid>
		<description><![CDATA[So in another case of tab completion gone wrong I ended up staring at the following on my laptop. johnf@zoot:~/dev/vquence/metrics/trunk$ sudo rm -rf /usr/lib ^C The command only ran for a few seconds so the damage wasn&#8217;t to bad, but what did I lose? The locate command came to my rescue. locate runs out of [...]]]></description>
			<content:encoded><![CDATA[<p>So in another case of tab completion gone wrong I ended up staring at the following on my laptop.</p>
<pre>
johnf@zoot:~/dev/vquence/metrics/trunk$ sudo rm -rf /usr/lib
^C
</pre>
<p>The command only ran for a few seconds so the damage wasn&#8217;t to bad, but what did I lose?</p>
<p>The <strong>locate</strong> command came to my rescue. locate runs out of cron, usually once a day, and creates a database with a list of every file on your machine. You can then use it to search for files. So to work out what was missing I did the following.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Get the list of files before we removed them</span>
<span style="color: #c20cb9; font-weight: bold;">locate</span> <span style="color: #660033;">--regexp</span> <span style="color: #ff0000;">'.'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>before_rm
&nbsp;
<span style="color: #666666; font-style: italic;"># update the locate database</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">updatedb</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Get the list of current files on the system</span>
<span style="color: #c20cb9; font-weight: bold;">locate</span> <span style="color: #660033;">--regexp</span> <span style="color: #ff0000;">'.'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>after_rm
&nbsp;
<span style="color: #666666; font-style: italic;"># Create a list of what's missing</span>
<span style="color: #c20cb9; font-weight: bold;">diff</span> <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>before_rm <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>after_rm <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>diff_rm
<span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">'^-'</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>diff_rm <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/^-//'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>missing_rm
&nbsp;
<span style="color: #666666; font-style: italic;"># Ask the dpkg system what packages those files belong to</span>
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>missing_rm<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-S</span> <span style="color: #007800;">$i</span>;
<span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/:$//;s/,//g'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>packages
&nbsp;
<span style="color: #666666; font-style: italic;"># Reinstall those packages</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> reinstall <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">`</span></pre></div></div>

<p>After this process it is probably worth running the step from updatedb again to work out what is still missing.</p>
<p>For the record I lost 102 files and had to reinstall 97 packages.</p>
<p>Now back to real work!</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2009/09/15/rm-rf-usrlib/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Building a Private PPA on Ubuntu</title>
		<link>http://inodes.org/2009/09/14/building-a-private-ppa-on-ubuntu/</link>
		<comments>http://inodes.org/2009/09/14/building-a-private-ppa-on-ubuntu/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 06:59:12 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ppa]]></category>
		<category><![CDATA[rebuildd]]></category>
		<category><![CDATA[reprepro]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/?p=189</guid>
		<description><![CDATA[One of the things I love about the Ubuntu project and launchpad is the Personal Package Archive. PPAs make it so simple and easy to backport packages. The only problem with PPAs is that they are public. I had a need to be able to host some private internal packages as well as squid with [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I love about the Ubuntu project and launchpad is the Personal Package Archive. PPAs make it so simple and easy to backport packages. The only problem with PPAs is that they are public. I had a need to be able to host some private internal packages as well as squid with SSL support, which you can&#8217;t distribute in binary form due to licensing restrictions.</p>
<p>Basically I wanted to create the equivalent of an Ubuntu PPA service running on our own servers so we could place it behind our firewall. This post is basically the process I followed to integrate <a href="http://julien.danjou.info/rebuildd/">rebuilld</a> and <a href="http://mirrorer.alioth.debian.org/">reprepro</a> to replicate a PPA setup.</p>
<p>So first up install reprepro</p>
<pre>
aptitude install reprepro
</pre>
<p>next we need do create a reprepro repository</p>
<pre>
mkdir -p /srv/reprepro/{conf,incoming,incomingtmp}
</pre>
<p>Now we need to tell reprepro which distributions we care about. Create /srv/reprepro/conf/distributions with the following contents</p>
<pre>
Suite: hardy
Version: 8.04
Codename: hardy
Architectures: i386 amd64 source
Components: main
Description: Local Hardy
SignWith: repository@inodes.org
DebIndices: Packages Release . .gz .bz2
DscIndices: Sources Release .gz .bz2
Tracking: all includechanges keepsources
Log: logfile
  --changes /srv/reprepro/bin/build_sources

Suite: intrepid
Version: 8.10
Codename: intrepid
Architectures: i386 amd64 source
Components: main
Description: Local Intrepid
SignWith: repository@inodes.org
DebIndices: Packages Release . .gz .bz2
DscIndices: Sources Release .gz .bz2
Tracking: all includechanges keepsources
Log: logfile
  --changes /srv/reprepro/bin/build_sources

Suite: jaunty
Version: 9.04
Codename: jaunty
Architectures: i386 amd64 source
Components: main
Description: Local Jaunty
SignWith: repository@inodes.org
DebIndices: Packages Release . .gz .bz2
DscIndices: Sources Release .gz .bz2
Tracking: all includechanges keepsources
Log: logfile
  --changes /srv/reprepro/bin/build_sources
</pre>
<p>I also like to create reprepro options file to setup some defaults, edit /srv/reprepro/conf/options</p>
<pre>
verbose
verbose
verbose
verbose
verbose
</pre>
<p>Next we need to setup an incoming queue so that we can use dput to get the source packages into reprepro,<br />
vi /srv/reprepro/conf/incoming</p>
<pre>
Name: incoming
IncomingDir: incoming
Allow: hardy intrepid jaunty
Cleanup: on_deny on_error
Tempdir: incomingtmp
</pre>
<p>The repository is now ready to go. So now we can setup apache. Edit /etc/apache/sites-enabled/pppa</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">virtualhost</span> *:<span style="color: #ff0000;">80</span>&gt;
    <span style="color: #00007f;">ServerName</span> packages.inodes.org
    <span style="color: #00007f;">DocumentRoot</span> /srv/reprepro
&lt;/<span style="color: #000000; font-weight:bold;">virtualhost</span>&gt;</pre></div></div>

<p>and we should also configure our sources.list to use these repositories, edit /etc/apt/sources.list</p>
<pre>
# Sources for rebuildd
deb-src http://packages.inodes.org hardy main
deb-src http://packages.inodes.org intrepid main
deb-src http://packages.inodes.org jaunty main
</pre>
<p>Next we want to setup our dput.cf to make the magic happen to get the source packages into the archive, edit ~/.dput.cf</p>
<pre>
[DEFAULT]
default_host_main = notspecified

[local]
fqdn = localhost
method = local
incoming = /srv/reprepro/incoming
allow_unsigned_uploads = 0
run_dinstall = 0
post_upload_command = reprepro -V -b /srv/reprepro processincoming incoming
</pre>
<p>So now we can do the following</p>
<pre>
apt-get source squid3
cd squid3*
dch -i # increment version number
dpkg-buildpackage -sa -S
cd ..
dput local *changes
aptitude update
apt-get source squid3
</pre>
<p>So when you run dput, first it copies the source package files to /srv/reprepro/incoming and then it gets reprepro to process it&#8217;s incoming queue. This means that the source package is now sitting in the repository.<br />
So the second apt-get source should have downloaded the source package from our local repository which is exactly what rebuildd will do before it tries to build it.</p>
<p>Next step is to setup rebuildd so that it builds the binary packages and installs them into the repository.</p>
<pre>
aptitude install rebuildd
</pre>
<p>Setup so it runs out of init.d and the releases we care about, edit /etc/default/rebuildd</p>
<pre>
START_REBUILDD=1
START_REBUILDD_HTTPD=1
DISTS="hardy intrepid jaunty"
</pre>
<p>Now when a source package is uploaded into the repository we want to kick off rebuildd to build the package. We can do this through the reprepro log hooks. You&#8217;ll notice in the conf/distributions above the following lines.</p>
<pre>
Log: logfile
  --changes /srv/reprepro/bin/build_sources
</pre>
<p>This script will be run any time a .changes file is added to the repository. Create /srv/reprepro/bin/build_sources</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">action</span>=<span style="color: #007800;">$1</span>
<span style="color: #007800;">release</span>=<span style="color: #007800;">$2</span>
<span style="color: #007800;">package</span>=<span style="color: #007800;">$3</span>
<span style="color: #007800;">version</span>=<span style="color: #007800;">$4</span>
<span style="color: #007800;">changes_file</span>=<span style="color: #007800;">$5</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Only care about packages being added</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$action</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;accepted&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Only care about source packages</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$changes_file</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-q</span> _source.changes
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Kick off the job</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$package</span> <span style="color: #007800;">$version</span> 1 <span style="color: #007800;">$release</span>&quot;</span>  <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> rebuildd-job add</pre></div></div>

<p>This script basically checks the right type of package is being added. Then it calls <strong>rebuildd-job</strong> to ask for that specific package and version to be built for that Ubuntu release.</p>
<p>Now the first thing that rebuildd does is download the source for the package. However we need to update the sources first since our server doesn&#8217;t know there are new files in the repository yet. So edit /etc/rebuildd/rebuilddrv an change</p>
<pre>
apt-get -q --download-only -t ${d} source ${p}=${v}
</pre>
<p>to</p>
<pre>
source_cmd = /srv/reprepro/bin/get_sources ${d} ${p} ${v}
</pre>
<p>and create /srv/reprepro/bin/get_sources with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">d</span>=<span style="color: #007800;">$1</span>
<span style="color: #007800;">p</span>=<span style="color: #007800;">$2</span>
<span style="color: #007800;">v</span>=<span style="color: #007800;">$3</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> update <span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-q</span> <span style="color: #660033;">--download-only</span> <span style="color: #660033;">-t</span> <span style="color: #800000;">${d}</span> <span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #800000;">${p}</span>=<span style="color: #800000;">${v}</span></pre></div></div>

<p>By this stage we have rebuildd building packages but we need to make sure they get re-injected back into the repository. We can do this with a post script. Edit /etc/rebuildd/rebuilddrc</p>
<pre>
post_build_cmd = /srv/reprepro/bin/upload_binaries ${d} ${p} ${v} ${a}
</pre>
<p>and create /srv/reprepro/bin/upload_binaries</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">d</span>=<span style="color: #007800;">$1</span>
<span style="color: #007800;">p</span>=<span style="color: #007800;">$2</span>
<span style="color: #007800;">v</span>=<span style="color: #007800;">$3</span>
<span style="color: #007800;">a</span>=<span style="color: #007800;">$4</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">su</span> <span style="color: #660033;">-l</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;reprepro -V -b /srv/reprepro include <span style="color: #007800;">${d}</span> /var/cache/pbuilder/result/<span style="color: #007800;">${p}</span>_<span style="color: #007800;">${v}</span>_<span style="color: #007800;">${a}</span>.changes&quot;</span> johnf</pre></div></div>

<p>Now the su is in there because rebuildd needs to be able to access the GPG passphrase to sign the repository with. So rather than have a passphrase-less key we make sure that gpg-agent is running by adding the following to your .profile.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>.gpg-agent-info <span style="color: #000000; font-weight: bold;">&amp;&amp;</span>    <span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #660033;">-0</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cut</span> -d: <span style="color: #660033;">-f</span> <span style="color: #000000;">2</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>.gpg-agent-info<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">GPG_AGENT_INFO</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>.gpg-agent-info<span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #7a0874; font-weight: bold;">export</span> GPG_AGENT_INFO
<span style="color: #000000; font-weight: bold;">else</span>
	<span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #000000; font-weight: bold;">`</span>gpg-agent --daemon<span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$GPG_AGENT_INFO</span> <span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>.gpg-agent-info
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">GPG_TTY</span>=<span style="color: #000000; font-weight: bold;">`</span>tty<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #7a0874; font-weight: bold;">export</span> GPG_TTY</pre></div></div>

<p>So that&#8217;s it you now have your own personal PPA. Just in case you had fallen asleep. Here is a little script I wrote so you can auto build the source packages for each release you care about in one go.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span>
&nbsp;
<span style="color: #007800;">RELEASES</span>=<span style="color: #ff0000;">&quot;hardy intrepid jaunty&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> debian<span style="color: #000000; font-weight: bold;">/</span>changelog <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;This isn't a debian repo&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Check for changes</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">`</span>bzr st <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> -l<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You have uncommitted changes!&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> ..<span style="color: #000000; font-weight: bold;">/</span>tmpbuild <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;The tmpbuild dir exists&quot;</span>
	<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
bzr <span style="color: #7a0874; font-weight: bold;">export</span> ..<span style="color: #000000; font-weight: bold;">/</span>tmpbuild
<span style="color: #c20cb9; font-weight: bold;">cp</span> debian<span style="color: #000000; font-weight: bold;">/</span>changelog ..<span style="color: #000000; font-weight: bold;">/</span>tmpbuild.changelog
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>tmpbuild
&nbsp;
<span style="color: #007800;">PACKAGE</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-1</span> debian<span style="color: #000000; font-weight: bold;">/</span>changelog <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">VERSION</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-1</span> debian<span style="color: #000000; font-weight: bold;">/</span>changelog <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $2}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/^\(//;s/\)$//'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> release <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$RELEASES</span>
<span style="color: #000000; font-weight: bold;">do</span>
&nbsp;
	<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;1s/\) [^;]+; /~<span style="color: #007800;">${release}</span>) <span style="color: #007800;">${release}</span>; /&quot;</span> ..<span style="color: #000000; font-weight: bold;">/</span>tmpbuild.changelog <span style="color: #000000; font-weight: bold;">&gt;</span> debian<span style="color: #000000; font-weight: bold;">/</span>changelog 
	<span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-1</span> debian<span style="color: #000000; font-weight: bold;">/</span>changelog
	dpkg-buildpackage <span style="color: #660033;">-S</span> <span style="color: #660033;">-sa</span>
	dput <span style="color: #7a0874; font-weight: bold;">local</span> ..<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${PACKAGE}</span>_<span style="color: #800000;">${VERSION}</span>~<span style="color: #800000;">${release}</span>_source.changes
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> tmpbuild</pre></div></div>

<p>So the above documentation is a bit of a brain dump on what I&#8217;ve been working on for the past 2 days and I&#8217;m sure I&#8217;ve left some bits out. So please give me any feedback you have in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2009/09/14/building-a-private-ppa-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
