<?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>Matt Daubneys Blog &#187; packaging</title>
	<atom:link href="http://daubers.co.uk/category/programming/packaging/feed/" rel="self" type="application/rss+xml" />
	<link>http://daubers.co.uk</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2011 17:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Linux From Scratch</title>
		<link>http://daubers.co.uk/2009/04/08/linux-from-scratch/</link>
		<comments>http://daubers.co.uk/2009/04/08/linux-from-scratch/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 15:43:40 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[compiling]]></category>
		<category><![CDATA[LFS]]></category>
		<category><![CDATA[linuxfromscratch]]></category>

		<guid isPermaLink="false">http://daubers.co.uk/?p=158</guid>
		<description><![CDATA[My knowledge of linux is sadly lacking, but every day I improve on it. Since I had a few days free over the easter holidays I thought I&#8217;d try and improve this further by installing Linux From Scratch. This is essentially building up a linux system from it&#8217;s base packages and takes a LONG time. [...]]]></description>
			<content:encoded><![CDATA[<p>My knowledge of linux is sadly lacking, but every day I improve on it. Since I had a few days free over the easter holidays I thought I&#8217;d try and improve this further by installing <a title="Linux From Scratch" href="http://www.linuxfromscratch.org" target="_blank">Linux From Scratch</a>. This is essentially building up a linux system from it&#8217;s base packages and takes a <strong>LONG</strong> time. This to me seemed like a good idea, it would exponentially increase my knowledge of what makes linux tick, and what depends on what.</p>
<p>I started on Monday night by reading through all of the LFS documentation. As bedtime reading goes, it&#8217;s actually quite interesting, and it seemed like a good idea to get an overview of what needs doing before I started.</p>
<p>Luckily for me my laptop has a fairly large HD (320GB) so finding some space on a partition was quite easy. A quick boot into a livecd and resizing my /home partition created a nice little 10GB partition for LFS to go in. That was at 9am in the morning. By 10:00am I had downloaded all the required programs in the mounted partition as directed by the book and started to build them.  In the first day, I managed to build the initial toolchain and got into the chroot and got to chapter 6.15 in the <a title="LFS download stable pdf" href="http://http://www.linuxfromscratch.org/lfs/downloads/stable/" target="_blank">LFS PDF</a>. The longest thing to build was probably either glibc or GCC, which took just over an hour, but did give me time to cook some tortillas from scratch for lunch <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The second day, it took me from about 10 in the morning till roughly 3 in the afternoon to finish installing everything.  Was a bit quicker than I expected, but also a lot more involved.</p>
<p>I did hit a few roadbumps, I didn&#8217;t have gawk installed on the host system, so at one point something didn&#8217;t compile properly and freaked out a bit. A simple sudo aptitude install gawk fixed that though. When I was recompiling glibc all of the tests failed, it took me a few minutes to realise that the reason this was happening was because I&#8217;d forgotten to run &#8220;make&#8221;.. oops.</p>
<p>The last major bump was that when I chose which options to compile with the kernel, I forgot to add the drivers for my ethernet card and my wireless card, so when I booted the machine I had no network! A quick scan through the options and a recompile sorted that out (to include the b44 driver)</p>
<p>What have I learnt from this? Two things mainly.</p>
<ol>
<li>Where everything should live on a linux system and why its there</li>
<li>Package Managers are beyond fantastic. They save so much time and hassle!</li>
</ol>
<p>Tomorrow I intend to try and make my LFS install useful by installing openssh initially, wget and possible x.org and gnome. That may be a bit ambitious at the moment though!</p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2009/04/08/linux-from-scratch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really Simple Python Distribution</title>
		<link>http://daubers.co.uk/2008/05/25/really-simple-python-distribution/</link>
		<comments>http://daubers.co.uk/2008/05/25/really-simple-python-distribution/#comments</comments>
		<pubDate>Sun, 25 May 2008 18:58:45 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://daubers.co.uk/?p=29</guid>
		<description><![CDATA[Today I decided to start looking into packaging a few of my python scripts. The first step to this to me looks to be setting up pythons own distribution system. I&#8217;ve just known this as a setup.py file, the meaning of the contents of which has confused me. A quick search through google brings me [...]]]></description>
			<content:encoded><![CDATA[<p>Today I decided to start looking into packaging a few of my python scripts. The first step to this to me looks to be setting up pythons own distribution system. I&#8217;ve just known this as a setup.py file, the meaning of the contents of which has confused me. A quick search through google brings me to <a href="http://docs.python.org/dist/dist.html">this</a> document. It&#8217;s a bit confusing at first, but makes much more sense once you sit down with it and start hacking away.</p>
<p>The first thing I realise I need to do is sort my programs into some kind of logical directory structure and inside the directory with all the modules place a __init__.py file. I&#8217;m not entirely sure what this file does&#8230; but it doesn&#8217;t work without it! Anyway, moving swiftly on! Once I&#8217;d done that I copied across the simple example from the documentation and then started playing. My final setup.py looked like this.</p>
<blockquote><p>from distutils.core import setup</p>
<p>setup(name=&#8217;MattsLibrary&#8217;,<br />
version=&#8217;0.1&#8242;,<br />
author = &#8216;Matthew Daubney&#8217;,<br />
author_email = &#8216;my@email&#8217;,<br />
description = &#8216;A very short library for recording serial numbers and books&#8217;,<br />
package_dir = {&#8216;MattsLibrary&#8217;: &#8216;library&#8217;},<br />
scripts=['library/mattslibrary']<br />
)</p></blockquote>
<p>Let&#8217;s examine this line by line. The first line imports the distutils module, this is the module that will do all the work for us.</p>
<p>The second line just calls the setup function, passing it all the stuff we want. Also on this line I set the name of the module/program I&#8217;m defining. The next line sets the version number of the program and the next two tell it my name and set my email address to it. The line after that gives a short description of the program.</p>
<p>The next two lines are the important ones here. Package_dir tells the setup function that all my modules are in the library folder. ['MattsLibrary':'library'] is of the format ['ProgramTitle':'folder'] however here (from what I understand) the ProgramTitle bit is not needed, and I&#8217;m not entirely sure of it&#8217;s purpose. However, this, works. When I have more time I&#8217;ll try and understand it a bit more.</p>
<p>The final line tells the setup function that there is a script that needs to be installed. These are installed in /usr/bin/ instead of /usr/lib/python2.5/site-packages/. This is set as a list such as scripts=['library/mattslibrary', 'library/script2', 'library/script3'].</p>
<p>These settings work for my little simple program. But the documentation seems to be fairly thorough, however I recommend you actually do this with a program as you read the docs. It makes more sense that way!</p>
<p>With all this set up I can now install my little program by typing:</p>
<blockquote><p>python setup.py install</p></blockquote>
<p>And all is well&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2008/05/25/really-simple-python-distribution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

