<?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>lesslinux.org Development Blog &#187; Packages and Architecture</title>
	<atom:link href="http://blog.lesslinux.org/category/packages-and-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lesslinux.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 04 Feb 2011 20:22:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building LessLinux &#8211; stage03, the final ISO</title>
		<link>http://blog.lesslinux.org/building-lesslinux-stage03-the-final-iso/</link>
		<comments>http://blog.lesslinux.org/building-lesslinux-stage03-the-final-iso/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 20:21:48 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Packages and Architecture]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=200</guid>
		<description><![CDATA[So now you are ready building the chroot environment &#8211; then it is time to assemble the final ISO. To do this you need an overlay containing some configuration files for the bootloader. I packaged such an overlay for the current LessLinux Search and Rescue: lesslinux-search-and-rescue-uluru-20110202-155012-overlays-en.tar.bz2. You&#8217;ll find more recent overlays here: http://download.lesslinux.org/overlays/, but when [...]]]></description>
			<content:encoded><![CDATA[<p>So now you are ready building the chroot environment &#8211; then it is time to assemble the final ISO. To do this you need an overlay containing some configuration files for the bootloader. I packaged such an overlay for the current LessLinux Search and Rescue: <a href="http://download.lesslinux.org/overlays/lesslinux-search-and-rescue-uluru-20110202-155012-overlays-en.tar.bz2">lesslinux-search-and-rescue-uluru-20110202-155012-overlays-en.tar.bz2</a>. You&#8217;ll find more recent overlays here: <a href="http://download.lesslinux.org/overlays/">http://download.lesslinux.org/overlays/</a>, but when building care that overlay and buildscripts match. Unpack the overlay in the folder <tt>/mnt/archiv/LessLinux</tt>.<span id="more-200"></span></p>
<h3>Building</h3>
<p>The building again involves builder.rb. This time more parameters are needed:</p>
<pre>    ruby builder.rb -u -n -s 1,2,bootconf \
        -p config/pkglist_neutral_rescue.txt \
        -c config/general_neutral_rescue.xml \
        -b config/branding_neutral_rescue.xml \
        -k config/kernels_rescue_unstable.xml > ../../llbuild/stage03.log 2>&#038;1</pre>
<p>The parameters are as follows: </p>
<ul>
<li>-u: build unstable, must match stage02</li>
<li>-s: skip stages 1 and 2 and skip the generation of boot configuration files</li>
<li>-p: use this package list</li>
<li>-c: use this configuration file (specifies paths like the overlay)</li>
<li>-b: use this branding</li>
<li>-k: use the kernels noted here</li>
</ul>
<p>You might also use <tt>--full</tt> to build an ISO containing all files from the chroot environment &#8211; this is self containing and can be used for building. Or use <tt>--skip-files</tt> to specify a filename containing a list of files to omit. After 30 to 40 minutes you&#8217;ll find the new ISO in <tt>/mnt/archiv/LessLinux/llbuild/stage03</tt>.</p>
<p>My next post will tell how to customize kernels and branding.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/building-lesslinux-stage03-the-final-iso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building LessLinux &#8211; stage02</title>
		<link>http://blog.lesslinux.org/building-lesslinux-stage02/</link>
		<comments>http://blog.lesslinux.org/building-lesslinux-stage02/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 13:11:21 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Packages and Architecture]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=186</guid>
		<description><![CDATA[Besides the switch to SQLite there are other big changes regarding the build of stage02, which is the population of the chroot environment:


LessLinux now supports tracking of dependencies after building packages. This allows to define the order of packages to build.


As a consequence of the dependency tracking it is now also possible to parallelize the [...]]]></description>
			<content:encoded><![CDATA[<p>Besides the switch to SQLite there are other big changes regarding the build of stage02, which is the population of the chroot environment:</p>
<ul>
<li>
<p>LessLinux now supports tracking of dependencies after building packages. This allows to define the order of packages to build.</p>
</li>
<li>
<p>As a consequence of the dependency tracking it is now also possible to parallelize the build. On a three core Athlon this brought down build times from around three days to less than 20 hours. With a faster machine you should even get better results.</p>
</li>
</ul>
<p> <span id="more-186"></span></p>
<h3>Prerequesites</h3>
<p>I assume that you already built stage01 on the same machine. If not, just create the directories as we did in the last article and mount the hard disk or partition containing sources and the stage01 chroot. The unprivileged user is not required this time.</p>
<h3>Building</h3>
<p>I prefer redirecting the console messages to a log file (and &#8220;tailing&#8221; it in another terminal). The build and install of the respective pacakges are separately logged to an package specific log file. I will later show how to analyze and them. So change to the build directory and run:</p>
<pre>        ruby -I. builder.rb -s 1,3 -n -u -l -t 7 > /tmp/stage02.log 2>&#038;1</pre>
<p>This command uses six threads maximum. It really depends on your machine how many is ideal. As a rule of thumb, take twice the number of processor cores plus one. Less than three do not make sense, and above ten too many seeks may appear. Anyway: If you have a pretty fast box with a six core processor and you are maybe building on a SSD: try 15 or 20 threads and tell me how it compares to just ten.</p>
<h3>Trouble</h3>
<p>You will occasionally run into a problem where no modified files were found. In this case the builder exits. To find out which package is affected just grep for &#8220;no modified&#8221; in the log file:</p>
<pre>        grep -A2 -i 'no modified' /tmp/stage02.log</pre>
<p>This is most likely due to some race condition: The build or install script is not yet closed, but the builder already tries to run it. Take a look at the files <tt>/mnt/archiv/LessLinux/llbuild/stage02/build/packagename-version.build.log</tt> and <tt>packagename-version.install.log</tt>. If it reads <i>bad interpreter &#8230; text file busy</i> this is the problem. Sometimes the maximum number of open files is the problem, so you should compare the current number of open files with the maximum number during the threaded build.</p>
<p>To re-build the affected package delete the package and the file <tt>/tmp/LessLinux_Emergency_Exit</tt> and run the builder again:</p>
<pre>        rm -rf /mnt/archiv/LessLinux/llbuild/stage02/build/packagename-version* /tmp/LessLinux_Emergency_Exit
        ruby -I. builder.rb -s 1,3 -n -u -l -t 7 >> /tmp/stage02.log 2>&#038;1</pre>
<p>When restarting the build all packages already built are ignored and the builder picks up where it left.</p>
<p>The next post will show how to assemble a working live system from the freshly created stage02.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/building-lesslinux-stage02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building LessLinux &#8211; stage01</title>
		<link>http://blog.lesslinux.org/building-lesslinux-stage01/</link>
		<comments>http://blog.lesslinux.org/building-lesslinux-stage01/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 07:48:38 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Packages and Architecture]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=162</guid>
		<description><![CDATA[Many changes were added since my first description of how to build LessLinux. There are two major changes that are worth noting most:


We switched from MySQL to SQLite3 as database during build


LessLinux is self containing now, this means you can use LessLinux to build LessLinux to build LessLinux&#8230;


The stage01 build of LessLinux very closely resembles [...]]]></description>
			<content:encoded><![CDATA[<p>Many changes were added since my first description of how to build LessLinux. There are two major changes that are worth noting most:</p>
<ul>
<li>
<p>We switched from MySQL to SQLite3 as database during build</p>
</li>
<li>
<p>LessLinux is self containing now, this means you can use LessLinux to build LessLinux to build LessLinux&#8230;</p>
</li>
</ul>
<p>The stage01 build of LessLinux very closely resembles the chapter <a href="http://www.linuxfromscratch.org/lfs/view/development/chapter05/chapter05.html">Chapter 5 &#8211; Constructing a Temporary System</a> from <a href="http://www.linuxfromscratch.org/">Linux from Scratch</a>. You&#8217;ll even notice similar environment variables. There will always be slight differences in package versions &#8211; this is intended. So you might be able to build LessLinux on any machine equipped with the right programs to build Linux from Scratch. But in my opinion do one of the two following things:<span id="more-162"></span></p>
<ul>
<li>
<p>Setup a clean Ubuntu 10.04 LTS and install all necessary packages by running<br /><tt>apt-get install ` wget -O - http://download.lesslinux.org/builder/packagelists/20110202_ubuntu_1004_packages.txt `</tt></p>
</li>
<li>
<p>Download the latest FULL ISO, a build of LessLinux containing compilers, headers and stuff. FULL ISO images are currently around 1.5GB and they allow you to build LessLinux without having to permanently setup a build environment. As of this post being written the current FULL ISO is <a href="http://download.lesslinux.org/testing/lesslinux-search-and-rescue/lesslinux-search-and-rescue-uluru-20110202-155012-FULL-en.iso">lesslinux-search-and-rescue-uluru-20110202-155012-FULL-en.iso</a></p>
</li>
</ul>
<p>I strongly recommend to take a dedicated build box &#8211; with the FULL ISO and an USB hard drive the conversion will be temporary. This can be some fairly recent PC (2GHz, 1GB RAM) and a USB hard drive (30GB upwards &#8211; a 32GB thumb drive might also do the job). In the mid term we will concentrate on the self containing builds, so it&#8217;s best to get used to building with FULL ISO. The FULL ISO might also be a good starting point for anyone diving into Linux from Scratch since the versions of GCC and Glibc are usually close to those in LFS.</p>
<h3>Directories and users</h3>
<p>You have great freedom on directory layout and the unprivileged user that is used for building some packages, but for start you should stick with the defaults in LessLinux. </p>
<ul>
<li>
<p>I use <tt>/mnt/archiv/LessLinux</tt> as base for building. This path is used in the default config, so I suggest to keep it by mounting a dedicated build partition to <tt>/mnt/archiv/LessLinux</tt>:</p>
<p><tt>mkdir -p /mnt/archiv/LessLinux<br />mkfs.ext3 /dev/sdx1<br />mount /dev/sdx1 /mnt/archiv/LessLinux<br />mkdir /mnt/archiv/LessLinux/llbuild<br />mkdir /mnt/archiv/LessLinux/llbuilder<br />mkdir /mnt/archiv/LessLinux/src</tt></li>
<li>
<p>Add an unprivileged user for building. He must have <tt>/bin/bash</tt> as a shell, otherwise the build will fail. The default scripts use <tt>mattias</tt> as unprivileged user:</p>
<p><tt>adduser -s /bin/bash mattias</tt></p>
</li>
</ul>
<h3>Downloading and Building</h3>
<p>You&#8217;ll need some buildscripts from <a href="http://download.lesslinux.org/src/">http://download.lesslinux.org/src/</a>. Take either the most recent ones or some that match a certain version you want to build. As I write this, <a href="http://download.lesslinux.org/src/lesslinux-search-and-rescue-uluru-20110202-155012-buildscripts.tbz">lesslinux-search-and-rescue-uluru-20110202-155012-buildscripts.tbz</a> is recommended.</p>
<ul>
<li>
<p>Go to the directory <tt>/mnt/archiv/LessLinux/llbuilder</tt> where you unpack the tarball:</p>
<p><tt>tar xvjf *-buildscripts.tbz</tt></p>
</li>
<li>
<p>Edit the file <tt>lesslinux-builder/config/general.xml</tt> and change the node <tt>unpriv</tt> to contain the username of the unprivileged user created above</p>
</li>
<li>
<p>Change to the newly created directory <tt>lesslinux-builder</tt>, from there run:</p>
<p><tt>ruby -I. builder.rb -s 2,3 -n -u</tt></p>
</li>
</ul>
<p>This tells the builder to do an unstable (<tt>-u</tt>) build (glibc 2.12 and kernel 2.6.37 instead of glibc 2.11 and kernel 2.6.36). In a view days, I&#8217;ll move it to stable and take 2.6.38-rc and glibc 2.13 as unstable. The <tt>-n</tt> tells to omit tests. When making changes to stage01, you would probably omit this to run tests to discover problems. Finally <tt>-s</tt> makes the builder skipping stages 2 and 3.</p>
<h3>Cleaning up</h3>
<p>The build will now take somewhere between two and eight hours, strongly depending on how fast your machine is. After the build, the freshly created chroot environment and the database file containing will be backed up so that you can start any stage02 build without having to re-build stage01. Thus you should delete the build directory for stage01:</p>
<p><tt>rm -rf /mnt/archiv/LessLinux/llbuild/stage01/build</tt></p>
<h3>And the next step&#8230;</h3>
<p>Tomorrow I&#8217;ll describe how to build stage02 &#8211; which means building all packages in a chroot environment &#8211; and finally assembling an ISO image from it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/building-lesslinux-stage01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnumeric and Abiword included, firmware fixed</title>
		<link>http://blog.lesslinux.org/gnumeric-and-abiword-included-firmware-fixed/</link>
		<comments>http://blog.lesslinux.org/gnumeric-and-abiword-included-firmware-fixed/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 10:04:35 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Packages and Architecture]]></category>
		<category><![CDATA[Releases]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=47</guid>
		<description><![CDATA[Build lesslinux-20090626-1010.iso lesslinux-20090626-1435.iso fixes firmware loading issues with lots of WLAN cards and adds some new applications (Evince Document Viewer, Gnumeric Spreadsheet, AbiWord, File-Roller):

]]></description>
			<content:encoded><![CDATA[<p>Build <a href="http://download.lesslinux.org/testing/"><strike>lesslinux-20090626-1010.iso</strike> lesslinux-20090626-1435.iso</a> fixes firmware loading issues with lots of WLAN cards and adds some new applications (Evince Document Viewer, Gnumeric Spreadsheet, AbiWord, File-Roller):</p>
<div align="center"><a href="http://images.mattiasschlenker.de/blog.lesslinux.org/screenshot_20090626-104210.png"><img src="http://images.mattiasschlenker.de/blog.lesslinux.org/screenshot_20090626-104210_sml.png" alt="" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/gnumeric-and-abiword-included-firmware-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presenting Matt&#8217;s Magical Mount Manager</title>
		<link>http://blog.lesslinux.org/presenting-matts-magical-mount-manager/</link>
		<comments>http://blog.lesslinux.org/presenting-matts-magical-mount-manager/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 08:00:57 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Packages and Architecture]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Screenshots]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=26</guid>
		<description><![CDATA[Another build, another new tool: mmmm is a simple yet efficient mount manager that clearly shows to which physical drive a volume belongs:

mmmm is built around the XML output of lshw and uses just Ruby and Ruby/Gtk. No DBUS, HAL or Policy Kit required which makes it attractive for builds that try to be as [...]]]></description>
			<content:encoded><![CDATA[<p>Another build, another new tool: mmmm is a simple yet efficient mount manager that clearly shows to which physical drive a volume belongs:</p>
<div align="center"><a href="http://images.mattiasschlenker.de/blog.lesslinux.org/20090604_mmmm.png"><img src="http://images.mattiasschlenker.de/blog.lesslinux.org/20090604_mmmm_sml.png" alt="" /></a></div>
<p>mmmm is built around the XML output of <a href="http://ezix.org/project/wiki/HardwareLiSter">lshw</a> and uses just Ruby and Ruby/Gtk. No DBUS, HAL or Policy Kit required which makes it attractive for builds that try to be as light as possible.</p>
<p>The interface of mmmm is clearly inspired by GtkMount of the Pmagic live distribution, but using the XML output of lshw is a bit more precise than just parsing &#8220;fdisk -l&#8221;.</p>
<p><b>TODO:</b> mmmm is very usable right now, but for the future a button to reread devices would be nice.</p>
<p><b>Please test:</b> Please test the latest build (<a href="http://download.lesslinux.org/testing/">lesslinux-20090604-1326</a>) and tell me if mmmm correctly finds all your volumes. You might also send me your hardware information, so I can debug possible problems more easily.</p>
<p><b>Update:</b> A small bug in mmmm prevents extended partitions from being correctly detected. A fixed build <a href="http://download.lesslinux.org/testing/">lesslinux-20090608-1708</a> is available.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/presenting-matts-magical-mount-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>libc decisions in future releases</title>
		<link>http://blog.lesslinux.org/libc-decisions-in-future-releases/</link>
		<comments>http://blog.lesslinux.org/libc-decisions-in-future-releases/#comments</comments>
		<pubDate>Thu, 07 May 2009 05:40:13 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Packages and Architecture]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=13</guid>
		<description><![CDATA[When I started LessLinux I was considering uClibc as base C library, it is small and provides nearly everything that is needed for a small niche distribution like LessLinux. Unfortunately, several applications needed to be patched to compile flawlessly against uClibc. So I went with Glibc, just the BusyBox used in the first stages of [...]]]></description>
			<content:encoded><![CDATA[<p>When I started LessLinux I was considering uClibc as base C library, it is small and provides nearly everything that is needed for a small niche distribution like LessLinux. Unfortunately, several applications needed to be patched to compile flawlessly against uClibc. So I went with Glibc, just the BusyBox used in the first stages of the boot procedure is statically linked against uClibc.</p>
<p>Still there are some drawbacks when using Glibc, especially the dependence on Bash as shell and the relative big size. Now there seems to be a solution for this problem. Eglibc is a fork of Glibc that aims to be source and binary compatible with Glibc but removes the dependency to Bash as sole shell and will allow for lighter configuration. In the medium term this seems like a perfect solution: LessLinux does not need NIS and for some applications even localization might be skipped.</p>
<p>In the next weeks I will not have the time to play around with Eglibc, but as soon as the release of Glibc 2.10 is near, I will give Eglibc a try.</p>
<ul>
<li><a href="http://blog.aurel32.net/?p=47">Aurélienn Jarno zum Import der EGLIBC in das Debian-Paket-Repository</a></li>
<li><a href="http://www.osnews.com/story/21441/Debian_Switching_to_EGLIBC">OS News &#8220;Debian Switching to EGLIBC&#8221;</a></li>
<li><a href="http://www.golem.de/0905/66930.html">Golem: &#8220;Debian wechselt zur Eglibc&#8221;</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/libc-decisions-in-future-releases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

