<?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>The Daily Build &#187; news</title>
	<atom:link href="http://blog.bstpierre.org/category/news/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bstpierre.org</link>
	<description>Software Development, version 3.0</description>
	<lastBuildDate>Fri, 03 Feb 2012 02:59:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Make apt-get use an alternate sources.list</title>
		<link>http://blog.bstpierre.org/make-apt-get-use-an-alternate-sources-list</link>
		<comments>http://blog.bstpierre.org/make-apt-get-use-an-alternate-sources-list#comments</comments>
		<pubDate>Thu, 06 Jan 2011 16:18:44 +0000</pubDate>
		<dc:creator>Brian St. Pierre</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://blog.bstpierre.org/?p=312</guid>
		<description><![CDATA[Since my company&#8217;s product is based on ubuntu, we use apt to distribute upgrades. We don&#8217;t normally want customers to pull upgrades from the upstream distribution, so we&#8217;ve pruned back the main /etc/apt/sources.list to include just our server. We rename the original default sources.list so that it doesn&#8217;t get picked up. But sometimes I want [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://rimaytech.com/rcg4001/">my company&#8217;s product</a> is based on ubuntu, we use <a href="http://wiki.debian.org/Apt">apt</a> to distribute upgrades. We don&#8217;t normally want customers to pull upgrades from the upstream distribution, so we&#8217;ve pruned back the main /etc/apt/sources.list to include just our server. We rename the original default sources.list so that it doesn&#8217;t get picked up.</p>
<p>But sometimes I want to be able to pull from upstream, so I want to reactivate the original sources.list. Up to now, I&#8217;ve been having to do an awkward dance that involves renaming our file, copying the old default to the active, and then doing the reverse when I&#8217;m done.</p>
<p>(As an aside, <a href="http://fedoraproject.org/wiki/Tools/yum">yum</a>-based systems like Centos or Fedora make this easy. You can say <code>enable=0</code> in the list file, and then use <a title="How to selectively enable yum repositories." href="http://www.fedoraforum.org/forum/showthread.php?t=26925"><code>--enablerepo=myrepo</code></a> on the command line. There doesn&#8217;t seem to be a way to do this with apt, but the command below is almost as good.)</p>
<p>To avoid this renaming dance, here&#8217;s a better solution.</p>
<p>First, create a directory to put the original sources.list: <code>/etc/apt/sources.list.ubuntu</code>.</p>
<p>Then copy the original default sources.list into that directory. I called it <code>/etc/apt/sources.list.ubuntu/jaunty.list</code>.</p>
<p>When you want to pull from upstream, run:</p>
<p><code>apt-get -o Dir::Etc::SourceParts=/etc/apt/sources.list.ubuntu update</code><br />
<code>apt-get -o Dir::Etc::SourceParts=/etc/apt/sources.list.ubuntu install some-new-package</code></p>
<p>Then you&#8217;ll want to run <code>apt-get update</code> to reset your repository list back to the trimmed-down set.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bstpierre.org/make-apt-get-use-an-alternate-sources-list/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hassle Free Way to Kill Sudo&#8217;d Jobs</title>
		<link>http://blog.bstpierre.org/hassle-free-way-to-kill-sudod-jobs</link>
		<comments>http://blog.bstpierre.org/hassle-free-way-to-kill-sudod-jobs#comments</comments>
		<pubDate>Thu, 13 Aug 2009 00:45:28 +0000</pubDate>
		<dc:creator>Brian St. Pierre</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.bstpierre.org/?p=189</guid>
		<description><![CDATA[Every now and then I have to run a foreground job under sudo that doesn&#8217;t want to die when I hit ^C. Then it&#8217;s a hassle to ^Z, get the pid of the sudo job, and sudo kill that pid. So I wrote a little script (or a template for scripts) that runs the sudo [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then I have to run a foreground job under sudo that doesn&#8217;t want to die when I hit ^C. Then it&#8217;s a hassle to ^Z, get the pid of the sudo job, and sudo kill that pid.</p>
<p>So I wrote a little script (or a template for scripts) that runs the sudo job in the background (but preserves stdout/stderr) and relies on bash to clean up the job when you ^C the script. Only gotcha with this is that you may have to retype your sudo password when you ^C if your authentication has timed out by the time you get around to killing it.</p>
<pre>#!/bin/bash

function cleanup()
{
    sudo kill $job_pid
    wait $job_pid
    exit 0
}

trap cleanup SIGTERM
trap cleanup SIGINT

sudo long_running_foreground_process &amp;
job_pid=$!
wait</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.bstpierre.org/hassle-free-way-to-kill-sudod-jobs/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefox Quick Search for Google Maps</title>
		<link>http://blog.bstpierre.org/firefox-quick-search-for-google-maps</link>
		<comments>http://blog.bstpierre.org/firefox-quick-search-for-google-maps#comments</comments>
		<pubDate>Wed, 18 Feb 2009 13:43:19 +0000</pubDate>
		<dc:creator>Brian St. Pierre</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.bstpierre.org/firefox-quick-search-for-google-maps</guid>
		<description><![CDATA[I recently found myself wanting to quickly figure out how far (both miles and driving time) it is to various destinations. At first I was keeping a Firefox tab open to Google Maps and kept keying in the address for the destination. Then I realized that I could make a &#8220;Quick Search&#8221; and get the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found myself wanting to quickly figure out how far (both miles and driving time) it is to various destinations. At first I was keeping a Firefox tab open to Google Maps and kept keying in the address for the destination. Then I realized that I could make a &#8220;Quick Search&#8221; and get the info faster. Add this link to your Quick Searches folder:</p>
<p>http://maps.google.com/maps?f=d&amp;saddr=Elm+St,+ Manchester,+NH+03101&amp;daddr=%s&amp;output=html</p>
<p>[Formatted here for readability. Put it all on one line with no spaces.]</p>
<p>Edit the properties so that the &#8220;saddr=&#8221; part is your start address. Change the keyword to &#8220;gm&#8221;. This is set to only output simple HTML (no map). If you want the full map, remove the &amp;output=html on the end.</p>
<p>Now, when you need to get a quick idea of how long it is going to take you to get somewhere, open a new tab and type &#8220;gm city, state&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bstpierre.org/firefox-quick-search-for-google-maps/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Migrated to WordPress</title>
		<link>http://blog.bstpierre.org/migrated-to-wordpress</link>
		<comments>http://blog.bstpierre.org/migrated-to-wordpress#comments</comments>
		<pubDate>Sun, 04 Jan 2009 03:43:46 +0000</pubDate>
		<dc:creator>Brian St. Pierre</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://blog.bstpierre.org/?p=16</guid>
		<description><![CDATA[Just switched from Blogger to WordPress. Several links are broken (I will fix these soon), and it looks like subscribers are probably going to see a bunch of duplicate posts. Sorry about that&#8230;]]></description>
			<content:encoded><![CDATA[<p>Just switched from Blogger to WordPress. Several links are broken (I will fix these soon), and it looks like subscribers are probably going to see a bunch of duplicate posts. Sorry about that&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bstpierre.org/migrated-to-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

