<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
 <atom:link href="http://atsutane.freethoughts.de/feed/rss" rel="self" type="application/rss+xml" />
 <title>Atsutanes kleiner Blog</title>
 <link>http://atsutane.freethoughts.de/</link>
 <description>Atsutanes kleiner Blog / Atsutanes small Blog</description>
 <generator>Devbird v0.4.2 - http://www.badboy.pytalhost.de/</generator>

 <item>
  <title>Holidays Summer 2010</title>
  <description>
<![CDATA[
After one week of holiday already passed by I finally write a post again. I used the last days to go through a lot of texts I missed in the last weeks as I was preparing for the exams of the semester. Now that I read everything interesting/important I finally started to improve the <a href="http://github.com/Atsutane/shell_utils/blob/cc91b449aa6b3e93c4c794faf085a4363df8844c/shell_utils/arch_chroot_packaging.sh">arch_chroot_packaging.sh</a> yesterday.<br />
<br />
So for now I'm finished with that and will use the cool parts of the day to learn for the study, while the rest of each is used for the stuff that comes up. However I'll be at the Arch booth at this year's <a href="http://www.froscon.org/">FrOSCon 2010</a> I hope some of you will come there and visit us.<br />
<br />

]]>
</description>
  <link>http://atsutane.freethoughts.de/137/holidays-summer-2010</link>
  <guid>http://atsutane.freethoughts.de/137/holidays-summer-2010</guid>
  <pubDate>Wed, 21 Jul 2010 16:48:11 +0200</pubDate>
 </item>
 <item>
  <title>Update of chroot shell functions</title>
  <description>
<![CDATA[
Yesterday evening td123 and <a href="http://archlinux.me/wonder">wonder</a> were so nice to update the <a href="http://atsutane.freethoughts.de/128/shellfunctions-making-the-usage-of-chroots-easier">shell functions</a> I wrote in order to make work with different packaging-chroots even more comfortable. <br />
<br />
</p>
<pre class="code">
<code>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mktesting=</span><span style="color: #ff0000;">&quot;upchr testing64 &amp;&amp; mkchr testing64 &amp;&amp; upchr testing32 &amp;&amp; mkchr testing32&quot;</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mkstable=</span><span style="color: #ff0000;">&quot;upchr stable64 &amp;&amp; mkchr stable64 &amp;&amp; upchr stable32 &amp;&amp; mkchr stable32&quot;</span>

<span style="color: #666666; font-style: italic;"># Update the given chroot/all</span>
<span style="color: #000000; font-weight: bold;">function</span> upchr<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">&quot;all&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> -e <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mstable32<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> -e <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mtesting32<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> -e <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mstable64<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> -e <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mtesting64<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span> 
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> -e <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31m'</span>$<span style="color: #000000;">1</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">'stable32'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">'testing32'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>

<span style="color: #666666; font-style: italic;"># Build the package with the given chroot</span>
<span style="color: #000000; font-weight: bold;">function</span> mkchr<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &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: #000000;">1</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> -e <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mBuilding package using the <span style="color: #000099; font-weight: bold;">e</span>[1;31m'</span>$<span style="color: #000000;">1</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">'stable32'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> makechrootpkg -c -r <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">'testing32'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> makechrootpkg -c -r <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> makechrootpkg -c -r <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>

<span style="color: #666666; font-style: italic;"># Create a set of stable chroots for both architectures</span>
<span style="color: #000000; font-weight: bold;">function</span> create_stable_chroots <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> -p <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable64 <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable32
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 64 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 32 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sed</span> -e <span style="color: #ff0000;">'s@/etc/pacman.d/mirrorlist@/tmp/mirrorlist@g'</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf <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>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable32<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Created stable32 and stable64 under .&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>

<span style="color: #666666; font-style: italic;"># Create a set of testing chroots for both architectures</span>
<span style="color: #000000; font-weight: bold;">function</span> create_testing_chroots <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> -p <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing64 <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing32
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 64 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 32 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sed</span> -e <span style="color: #ff0000;">'s@/etc/pacman.d/mirrorlist@/tmp/mirrorlist@g'</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf <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>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; linux32 <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Created testing32 and testing64 under .&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;</code>
</pre>
<p><br />
<br />
<strong>Edit 20100706:</strong> Thanks to mac_mario for notification about a typo in the text.
]]>
</description>
  <link>http://atsutane.freethoughts.de/136/update-of-chroot-shell-functions</link>
  <guid>http://atsutane.freethoughts.de/136/update-of-chroot-shell-functions</guid>
  <pubDate>Sat, 26 Jun 2010 16:57:39 +0200</pubDate>
 </item>
 <item>
  <title>BlogPostEditor - statt eines Posts ein ganzer Editor...</title>
  <description>
<![CDATA[
Es gibt Tage, da weiß man nicht so genau was man da eigentlich macht, bei mir war der gestrige ein solcher Tag. Eigentlich wollte ich abends nur einen kurzen Eintrag über den vorgestern auf meinem Laptop eingerichteten Mirror des Arch Linux <i>core</i> Repositories schreiben, dann stellte ich fest, dass mir hier am Laptop ein dafür geeigneter Editor fehlte und mir kam die Idee doch einfach mal selbst einen zu schreiben, schließlich war das Thema der OOT Vorlesungen in den vergangenen 14 Tagen das Java Toolkit <a href="http://de.wikipedia.org/wiki/Swing_(Java)">Swing</a>.<br />
<br />
Also Eclipse gestartet und während im Fernseher zuerst Matilda und im Anschluss der restliche Eurovision Song Contest lief, ging ich hier nochmals durch die Folien und schrieb einen Editor, welcher zumindest halbwegs meinen Vorstellungen entspricht. Dabei tauchten im Laufe des Abends einige unerwartete Probleme mit dem Umgang mit Swing auf, insofern war dieser plötzliche Entschluss doch sehr gut zum lernen des Stoffes dieses Prüfungsfachs. Dank dem Master Studenten Wiesel wurde mir dann auch der - auf den Vorlesungsfolien nicht korrekt beschriebene - Umgang mit der Swing Klasse JFileChooser (Anzeige der Öffnen/Speicher Dialoge) klar, vielen Dank nochmal an dieser Stelle.<br />
<br />
Wer sich den Editor anschauen möchte, kann dies in meinem github Repository <a href="http://github.com/Atsutane/BlogUtils">BlogUtils</a> erledigen, momentan ist er noch nichts anderes als ein grundlegendes Gerippe, ich werde ihn zur Übung wohl noch um einige nützliche Funktionen erweitern, wer Vorschläge hat, kann mir diese gerne unterbreiten.<br />
<br />
<strong>Nachtrag:</strong> Da nicht auf jeder Maschine ein JDK installiert ist, habe ich schnell ein jar exportiert: <a href="/stuff/blogposteditor20100530.jar">Download</a> zu starten mittels: </p>
<pre class="code">
<code>java <span style="color: #339933;">-</span>jar blogposteditor20100530.<span style="color: #202020;">jar</span></code>
</pre>
<p>
]]>
</description>
  <link>http://atsutane.freethoughts.de/135/blogposteditor-statt-eines-posts-ein-ganzer-editor</link>
  <guid>http://atsutane.freethoughts.de/135/blogposteditor-statt-eines-posts-ein-ganzer-editor</guid>
  <pubDate>Sun, 30 May 2010 14:29:12 +0200</pubDate>
 </item>
 <item>
  <title>Das zweite Semester</title>
  <description>
<![CDATA[
Wie man sieht, ist es hier im Blog recht ruhig geworden, das liegt vor allem daran, dass ich mich hauptsächlich auf mein Studium konzentriere und meine digitale Kommunikation zum größten Teil mittels Mailing Listen und kurzen Unterhaltungen via IRC/XMPP erledige. Dennoch ist es an der Zeit, auch hier ein Lebenszeichen von mir zu geben und auf Tätigkeiten meinerseits zu verweisen, welche nicht bloß für mich von Interesse sind.<br />
<br />
Da wäre zum einen mein Artikel über die absoluten Grundlagen im Umgang mit dem Portscanner <a href="http://www.nmap.org/">NMap</a> in der diesjährigen Mai Ausgabe von <a href="http://www.freiesmagazin.de/20100502-maiausgabe-erschienen">freiesMagazin</a>, durch welchen ich dank Hilfe der Redaktion auch einige Kniffe hinsichtlich verständlicher Formulierungen erlernt habe.<br />
<br />
Zum anderen wäre da noch der Vortrag über <a href="http://www.archlinux.org/">Arch Linux</a>, welchen ich im Rahmen des Faches <i>Proseminar</i> vor einem Teil meines Semesters geben <s>musste</s> durfte. Der Vortrag richtet sich vom Schwierigkeitsgrad her an ein Publikum, welches keine oder nur sehr geringe Kenntnisse über Linux Distributionen besitzt, dementsprechend einfach sind Handout und Folien formuliert. Beides findet man - zusammen mit den LaTeX Quellen - in meinem <a href="http://github.com/Atsutane/talks/tree/master/de/archlinux-psm-hs/">talks Repository</a> bei <a href="http://www.github.com/">github</a>.
]]>
</description>
  <link>http://atsutane.freethoughts.de/134/das-zweite-semester</link>
  <guid>http://atsutane.freethoughts.de/134/das-zweite-semester</guid>
  <pubDate>Mon, 17 May 2010 18:06:47 +0200</pubDate>
 </item>
 <item>
  <title>i3 v3.ε</title>
  <description>
<![CDATA[
sECuRE veröffentlichte gestern <a href="http://code.stapelberg.de/git/i3/tree/RELEASE-NOTES-3.e?id=2f6dd0cb5863548089f6904e21e85c3c6284faf6">i3 v3.ε</a>. Neuerungen sind unter anderem:
<ul class="bb-list-unordered"><li class="bb-listitem"> Umstieg von Xinerama auf RandR, Nutzer des Nvidia Treibers sollten sich unbedingt diese beiden Artikel anschauen: <a href="http://i3.zekjur.net/docs/multi-monitor.html">Multi-Monitor</a> und <a href="http://i3.zekjur.net/docs/userguide.html#multi_monitor">Multi Monitor im Userguide</a>.</li>
<li class="bb-listitem"> Der neue Konfigurationsparser ist nun Standard, ggf. sind also kleine Änderungen an der Konfiguration nötig.</li>
<li class="bb-listitem"> Der Funktionsumfang mittels IPC wurde vergrößert.</li>
<li class="bb-listitem"> Die Workspace Leiste lässt sich abschalten und durch eine andere ersetzen.</li>
</ul>
<br />
Mit diesem Release habe ich gestern auch das i3 Paket aus dem AUR in das ArchLinux community Repository verschoben, bei 56 Votes wird das sicherlich den ein oder anderen Archer freuen.<br />
<br />
<strong>Links:</strong><br />
<a href="http://i3.zekjur.net">Projektseite</a><br />
<a href="http://code.stapelberg.de/git/i3/">git Repository</a><br />
<a href="http://aur.archlinux.org/packages.php?ID=24665">i3-git im AUR</a><br />
<a href="http://aur.archlinux.org/packages.php?ID=24664">i3lock im AUR</a><br />
<a href="http://aur.archlinux.org/packages.php?ID=26104">i3status im AUR</a>
]]>
</description>
  <link>http://atsutane.freethoughts.de/133/i3-v3</link>
  <guid>http://atsutane.freethoughts.de/133/i3-v3</guid>
  <pubDate>Wed, 31 Mar 2010 07:26:22 +0200</pubDate>
 </item>
 <item>
  <title>newsbeuter 2.2 veröffentlicht</title>
  <description>
<![CDATA[
Heute mittag wurde <a href="http://newsbeuter.wordpress.com/2010/03/14/newsbeuter-2-2-released/">newsbeuter 2.2</a> von Andreas Krennmair freigegeben. Hinzugekommen sind unter Anderem:
<ul class="bb-list-unordered"><li class="bb-listitem">Unterstützung für den Google Reader</li>
<li class="bb-listitem">Das markieren von Artikeln in der Artikelliste, abhängig vom Artikelinhalt.</li>
<li class="bb-listitem">Erweiterung der &quot;<i>ignore article</i>&quot; Funktion mit verschiedenen Modi.</li>
<li class="bb-listitem">&quot;<i>hard quit</i>&quot; zum direkten beenden des Readers.</li>
<li class="bb-listitem">Der HTML-Renderer rendert nun auch Tabellen.</li>
</ul>
<br />
<strong>Links:</strong><br />
<a href="http://www.newsbeuter.org">Projektseite</a><br />
<a href="http://newsbeuter.wordpress.com">Dev-Blog</a><br />
<a href="http://www.newsbeuter.org/downloads/CHANGES">Changelog</a>
]]>
</description>
  <link>http://atsutane.freethoughts.de/132/newsbeuter-2-2-ver-ffentlicht</link>
  <guid>http://atsutane.freethoughts.de/132/newsbeuter-2-2-ver-ffentlicht</guid>
  <pubDate>Sun, 14 Mar 2010 14:00:09 +0100</pubDate>
 </item>
 <item>
  <title>Früher Userspace bei Arch Linux</title>
  <description>
<![CDATA[
Dieser Eintrag ist eine Übersetzung von brain0s <a href="http://archlinux.me/brain0/2010/02/13/early-userspace-in-arch-linux/">Early Userspace in Arch Linux</a> für jene Arch Linux Nutzer, welche mit dem Englischen dann doch ihre Probleme haben, keine Gewähr auf Fehlerfreiheit. Dieser Eintrag unterliegt <strong>nicht</strong> der im Impressum angegebenen Lizenz, die Rechte liegen bei Thomas Bächler, die Übersetzung ist mit seinem Einverständnis erfolgt. <br />
<br />
<br />
<br />
In letzter Zeit gab es einige große Änderungen bei Archs Programmen des fühen Userspace. Also dachte ich mir, dass ich mir die Zeit nehme und allen diese Änderungen erläutere.<br />
<br />
</p>
<h3>Bootvorgang von Linuxsystemen: Wofür braucht man einen frühen Userspace?</h3>
<p>
Früher war das starten eines Linux Systems einfach: Der bootloader lud den Kernel, dieser wurde extrahiert und initialisierte die Hardware, danach initialisierte er den Festplatten-Controller, erkannte die Festplatte und das sich darauf befindliche Root-Dateisystem, band dieses ein uns startete <i>/sbin/init</i>.<br />
<br />
Heutzutage gibt es eine gigantische Menge an unterschiedlichen Controllern und eine große Anzahl unterschiedlicher Dateisysteme, da wir eine ordentliche Distribution sind möchten wir alle unterstützen. Also bauen wir sie alle in unser monolithisches Kernelimage welches nun mehrere Megabyte groß ist alles bis zur Küchenspüle unterstützt, aber dann kommt jemand und hat zwei SATA-Controller, drei IDE-Controller, sieben Festplatten sowie drei externe USB-Laufwerke und wer weiß was. Der Kernel erkennt diese nun alle asynchron, aber wo ist nun bitte das Root-Dateisystem? Ist es auf der ersten Festplatte? Oder auf der dritten? Was ist &quot;die erste Festplatte&quot; überhaupt? Und wie binde ich mein Root-Dateisystem in der LVM Laufwerksgruppe im verschlüsselten Container auf dem Software RAID-Array ein? Wie man sieht wird das alles etwas hässlich und der Kernel stellt sich gerne dumm oder kümmert sich einfach nicht um diese nervtötenden Probleme, besonders nachdem er durch uns - die wir ihn mit jeden erdenklichen Treiber gefüttert haben - so fett wurde.<br />
<br />
Was nun? Ganz einfach, wir übergeben die Kontrolle dem Userspace und regeln die Erkennung der Hardware dort, richten den ganzen komplizierten und von den Leuten gewünschten Kram ein, binden das Root-Dateisystem ein und starten <i>/sbin/init</i> selbst. Nun frägst du dich sicherlich &quot;Wie führe ich Applikationen im Userspace aus, wenn das Root-Dateisystem nicht eingebunden ist?&quot; die Antwort darauf lautet &quot;Magie!&quot;.<br />
<br />
</p>
<h3>Was ist initramfs?</h3>
<p>
Naja die Antwort ist nicht Magie. Die Antwort lautet eigentlich initramfs: Jedes Linux System hat ein <i>ramfs</i> Dateisystem, welches immer eingebunden ist und <i>rootfs</i> heißt. Wahrscheinlich wirst du dieses nie sehen, da deine wirklichen Dateisysteme es nach dem Einbinden überdecken. Allerdings führt der Kernel auch ein komprimiertes cpio Archiv mit sich, welches direkt nach dem Start in das rootfs extrahiert wird. Noch besser: Es ist sogar möglich aus dem Bootloader heraus ein solches Archiv an den Kernel anzuhängen, welches dann ebenfalls in das rootfs entpackt wird.<br />
<br />
Bevor der Kernel den altmodischen init Code ausführt, prüft er, ob das rootfs eine Datei namens <i>/init</i> enthält, ist dies der Fall überspringt er den klassischen Einbindungs- und Initcode und führt stattdessen <i>/init</i> aus. Nun liegt die Verantwortung für diese Aufgabe, welche für den Kernel als zu kompliziert eingeschätzt wird, bei diesem Programm. Auf diese Weise können wir einen Kernel, welcher keinerlei eingebaute Unterstützung für einen Festplatten-Controller auch nur für irgendein Dateisystem bietet(das ist eigentlich, was wir mit dem Arch Linux Standardkernel machen) bauen und fügen die benötigten Module schlichtweg in das initramfs Image ein.<br />
<br />
</p>
<h3>klibc - Das Fegefeuer für die Initramfs Maintainer</h3>
<p>
klibc wurde ursprünglich als kleine leichtgewichtige C Bibliothek für den frühen Userspace entwickelt. Sie bringt einige Programme mit, welche einem dabei helfen alles Einzurichten. Mit <i>klcc</i> führt sie sogar ein hässliches Perlskript mit, welches den gcc aufruft und Binärdateien gegen die klibc anstatt die übliche libc linkt. Als Aaron Griffin 2006 <i>mkinitcpio</i> als Ersatz für die alten, unflexiblen Skripte <i>mkinitrd</i> und <i>mkinitramfs</i> entwickelte, wurde entschieden es auf klibc basieren zu lassen. Von Anfang an hatte klibc Probleme: 
<ul class="bb-list-unordered"><li class="bb-listitem">Das Set an mitgelieferten Programmen war begrenzt und den Programmen fehlten wichtige Optionen.</li>
<li class="bb-listitem">Die meisten externen Programme liesen sich nicht gegen die klibc linken oder mussten dafür stark gepatcht werden.</li>
<li class="bb-listitem">Es gab keinen dynamischen Linker, alle Binärdateien wurden statisch gegen eine spezifische Version der klibc gelinkt, diese Version änderte sich mit jeder Änderung an den klibc Quellen oder der Kernelheader, was dann wieder den Neubau aller - gegen die klibc gelinkten - Binärdateien nötig machte.</li>
<li class="bb-listitem">Es war nicht möglich andere dynamische Bibliotheken, als die klibc selbst zu erstellen.</li>
</ul>
All das resultiere in großem Arbeitsaufwand für die Instandhaltung von <i>udev</i> und den <i>module-init-tools</i>, wir mussten auch ein kleines <i>klibc-extra</i> Paket verwalten, welches die fehlenden klibc Programme mit unseren eigenen ersetzte. Fortgeschrittenere Programme wie <i>lvm</i> oder <i>cryptsetup</i> mussten wir statisch gegen die <i>glibc</i> linken und so bereitstellen.<br />
<br />
Irgendwann war klibc inkompatibel zu den Kernelheadern und wir mussten mehr und mehr Hacks einführen um es aktualisieren zu können. Seit Linux 2.6.30 war ich nicht in der Lage überhaupt eine funktionierende Version der klibc zu bauen, was uns mit einer alten Binärdatei zurückließ, bei welcher wir nicht einmal mehr Bugs fixen konnten. Mitte 2009 starb dann upstream vollkommen, keine commits ins git Repository und acuh auf der Mailingliste gab es nur eine Hand voll Mails pro Monat. Das brachte mich dazu, mir folgende Frage zu stellen: &quot;Worin besteht der Sinn eine seperate C Bibliothek zusammen mit Programmen zu verwalten, welche nur für den Bruchteil einer Sekunde beim Start des Systems Verwendung finden?&quot; Außer einem kleineren initramfs Image und dadurch verkürzte Bootzeit vermutlich nichts.<br />
<br />
</p>
<h3>Es einfach halten</h3>
<p>
2009 entschied ich dann, dass um eine initramfs Umgebung mit geringem Verwaltungsaufwand, vielen Funktionen und großer Flexibilität, die folgenenden Änderungen nötig waren: 
<ul class="bb-list-unordered"><li class="bb-listitem">Verwendung der C Bibliothek des Systems und keiner seperaten.</li>
<li class="bb-listitem">Die Verwendung von busybox für grundlegende System- und Skriptingprogramme, um einen guten Kompromiss ziwschen hoher Funktionalität und kleiner Dateigröße zu finden.</li>
<li class="bb-listitem">Die Verwendung von util-linux-ngs blkid, um Label von Dateisystemen, UUID und Typerkennung vollständig für alle neuen und alten Dateisysteme zu haben.</li>
<li class="bb-listitem">Die Verwendung von modprobe, udev, lvm, cryptsetup, mdadm/mdassemble aus den normalen Arch Paketen für weitere fortgeschrittene Funktionen.</li>
</ul>
Auf diese Weise müsste ich neben <i>mkinitcpio</i> selbst nur noch eine ordentlich konfigurierte busybox Binärdatei verwalten. Ich setzte busybox seit geraumer Zeit auf meinen OpenWRT Routern und wusste daher wie beeindruckend es war. Es stellte sich außerdem heraus, dass die Implementierung von <i>NFS</i> Root-Unterstützung einfacher war, wenn wir die mit der klibc gelieferten Programme <i>nfsmount</i> und <i>ipconfig</i> nutzten.<br />
<br />
Nun ist es Februar 2010 und in den letzten Wochen hatte ich endlich die Zeit, die ganze Arbeit zu erledigen. Erst vor wenigen Tagen veröffentlichte ich mkinitcpio 0.6, diese Version ist deutlich stabiler, flexibler und weniger fehleranfällig als jede klibc-basierte Version die wir je hatten. Das initramfs ist nun um Durchschnitt 600KB bis 1MB größer, ich glaube nicht, dass sich deswegen jemand beschwert, es ist immer noch kleiner als bei den meisten anderen Distributionen. Ich bin froh, dass ich hoffentlich nie wieder mit klibc zu tun haben werde.
]]>
</description>
  <link>http://atsutane.freethoughts.de/131/fr-her-userspace-bei-arch-linux</link>
  <guid>http://atsutane.freethoughts.de/131/fr-her-userspace-bei-arch-linux</guid>
  <pubDate>Sat, 13 Feb 2010 20:00:58 +0100</pubDate>
 </item>
 <item>
  <title>Stöckchen...</title>
  <description>
<![CDATA[
Ich halte die eigentliche Idee hinter &quot;Stöckchen&quot; eigentlich nicht für schlecht, wenn es um sinnvolle Themen geht, den den <a href="http://kabarakh.de/blog/2010/01/11/plock-au/">Kabarakh</a> mir da aber &quot;zugeworfen&quot; hat mag ich dennoch nicht sonderlich, aber man will ja kein Spielverderber sein.<br />
<br />
<strong>Warum bloggst du?</strong><br />
Um Dinge, welche für mehrere Bereiche des Netzes in denen ich aktiv bin, nochmal gesondert Platz einzuräumen, dass spiegelt sich zwar nicht in jedem Eintrag(beispielsweise diesem hier) wider, ist aber dennoch die eigentliche Intention.<br />
<br />
<strong>Seit wann bloggst du?</strong><br />
Ohm da waren vor Jahren schonmal gemeinsame Blogs mit hanshiro bei Bloghostern, da bin ich zu faul nach zu schauen, dieser hier wird seit dem Frühjahr 2008 von mir geführt.<br />
<br />
<strong>Warum lesen deine Leser deinen Blog?</strong><br />
Langeweile? Noch nicht gelangweilt genug um einzuschlafen? Ich weiß es nicht.<br />
<br />
<strong>Welche war die letzte Suchanfrage, über die jemand auf deine Seite kam?</strong><br />
<i>urxvt borderless</i> - interessant, da weiß wohl jemand nicht, wie er eher an eine brauchbare Antwort käme, mein Artikel für <a href="http://atsutane.freethoughts.de/86/ein-terminal-auf-dem-fluxbox-desktop">Fluxbox</a> wird ihm bei einem anderen Window Manager nur bedingt geholfen haben.<br />
<br />
<strong>Welcher deiner Blogeinträge bekam zu Unrecht zu wenig Aufmerksamkeit?</strong><br />
Dazu kann ich recht wenig sagen, ich denke die meisten Leser meiner Texte bekommen sie über den Feed eines Planets förmlich aufgezwungen. ;-)<br />
<br />
<strong>Dein aktuelles Lieblingsblog?</strong><br />
Puh, ich mag eigentlich alle in meinem Feedreader, aber etwas Werbung für den Schweizer <a href="http://www.hackerfunk.ch/">Hackerfunk</a> ist dennoch angebracht.<br />
<br />
<strong>Welches Blog hast du zuletzt gelesen?</strong><br />
So richtig gelesen? <a href="http://archlinux.me/dusty/2010/01/13/fixing-git-bash-completion/">Dustys</a> über die git tab-completition in der bash, danach habe ich Kabarakhs Fragen kopiert.<br />
<br />
<strong>Wieviele Feeds hast du gerade im Moment abonniert?</strong><br />
85 - <a href="http://www.newsbeuter.org/">newsbeuter</a> ist klasse.<br />
<br />
<strong>An welche fünf Blogs wirfst du das Stöckchen weiter und warum?</strong><br />
Da ich - wie gesagt - an diesem hier keinen wirklichen Gefallen finde, an niemanden, ich lege es quasi vor die Tür, so dass jeder der es möchte aufheben kann.<br />

]]>
</description>
  <link>http://atsutane.freethoughts.de/130/st-ckchen</link>
  <guid>http://atsutane.freethoughts.de/130/st-ckchen</guid>
  <pubDate>Wed, 13 Jan 2010 21:33:16 +0100</pubDate>
 </item>
 <item>
  <title>&lt;/year&gt;&lt;year name='2010'&gt;</title>
  <description>
<![CDATA[
2009 geht zu Ende, Zeit mal die gröbsten Eckpunkte aus diesem Jahr hier zusammenzufassen.
<ul class="bb-list-unordered"><li class="bb-listitem">Im Frühjahr die x-te Feststellung, dass es in Heidelberg einen Chaostreff gibt, diesmal jedoch auch mit anschließendem Besuch und Beitritt in den <a href="http://www.noname-ev.de">NoName e.V.</a></li>
<li class="bb-listitem">Abschluss der Schullaufbahn.</li>
<li class="bb-listitem"><a href="http://blog.expertura.de/">BadBoy_</a> kam im Sommer zu Besuch.</li>
<li class="bb-listitem">Der <a href="http://atsutane.freethoughts.de/119/froscon-2009-bericht">Besuch</a> der <a href="http://www.froscon.de">FrOSCon</a> in St.Augustin.</li>
<li class="bb-listitem">Beginn des Informatikstudiums in Mannheim.</li>
<li class="bb-listitem">Die Ernennung zum Trusted User bei <a href="http://www.archlinux.org">Arch Linux</a>.</li>
</ul>
Dann will ich euch mal nicht weiter langweilen, sondern wünsche euch eine angenehme Feier ins neue Jahr, hoffen wir mal, dass dies auch für <a href="https://webkeks.org/blog/?id=55">js der Fall sein wird</a>.
]]>
</description>
  <link>http://atsutane.freethoughts.de/129/year-year-name-2010</link>
  <guid>http://atsutane.freethoughts.de/129/year-year-name-2010</guid>
  <pubDate>Thu, 31 Dec 2009 15:23:55 +0100</pubDate>
 </item>
 <item>
  <title>Shellfunctions making the usage of chroots easier</title>
  <description>
<![CDATA[
As ArchLinux user one has to build his packages in chroots in order to make sure, that everything is fine with them and the package will build on other people's machines. ArchLinux provides several scripts which makes this easier with the <strong>devtools</strong> package. How they are used is described in the <a href="http://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot">DeveloperWiki</a>. So as you can see this is really simple but if you have a real build machine and want to build your packages with different chroots it helps a lot to have a function in your shell configuration, note that I use a x86_64 system, so the last two functions need small modifications to run on an i686 installation. <br />
<br />
</p>
<pre class="code">
<code>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mktesting=</span><span style="color: #ff0000;">&quot;mkchr testing64 &amp;&amp; mkchr testing32&quot;</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mkstable=</span><span style="color: #ff0000;">&quot;mkchr stable64 &amp;&amp; mkchr stable32&quot;</span>

<span style="color: #666666; font-style: italic;"># Update the given chroot/all</span>
<span style="color: #000000; font-weight: bold;">function</span> upchr<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">&quot;all&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mstable32<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mtesting32<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mstable64<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31mtesting64<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span> 
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> $<span style="color: #000000;">1</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mUpdating the <span style="color: #000099; font-weight: bold;">e</span>[1;31m'</span>$<span style="color: #000000;">1</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot -u <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>

<span style="color: #666666; font-style: italic;"># Build the package with the given chroot</span>
<span style="color: #000000; font-weight: bold;">function</span> mkchr<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &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: #000000;">1</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32mBuilding package using the <span style="color: #000099; font-weight: bold;">e</span>[1;31m'</span>$<span style="color: #000000;">1</span><span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">e</span>[1;32m chroot.<span style="color: #000099; font-weight: bold;">e</span>[0m'</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> makechrootpkg -c -r <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>chroots<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>

<span style="color: #666666; font-style: italic;"># Create a set of stable chroots for both architectures</span>
<span style="color: #000000; font-weight: bold;">function</span> create_stable_chroots <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> -p $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>stable64 $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>stable32
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 64 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 32 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> -e <span style="color: #ff0000;">'s/x86<span style="color: #000099; font-weight: bold;">_</span>64/i686/g'</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist <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>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sed</span> -e <span style="color: #ff0000;">'s@/etc/pacman.d/mirrorlist@/tmp/mirrorlist@g'</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>stable64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf <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>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>stable32<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Created stable32 and stable64 under .&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>

<span style="color: #666666; font-style: italic;"># Create a set of testing chroots for both architectures</span>
<span style="color: #000000; font-weight: bold;">function</span> create_testing_chroots <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> -p $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing64 $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing32
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 64 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># 32 Bit Chroot</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> -e <span style="color: #ff0000;">'s/x86<span style="color: #000099; font-weight: bold;">_</span>64/i686/g'</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist <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>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sed</span> -e <span style="color: #ff0000;">'s@/etc/pacman.d/mirrorlist@/tmp/mirrorlist@g'</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing64<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf <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>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> mkarchroot $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root base base-devel <span style="color: #c20cb9; font-weight: bold;">sudo</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.conf
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #007800;">$EDITOR</span> $<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>testing32<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>pacman.d<span style="color: #000000; font-weight: bold;">/</span>mirrorlist
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Created testing32 and testing64 under .&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;</code>
</pre>
<p><br />
<br />
If your shell is not bash compatible, the functions may need small modifications.
]]>
</description>
  <link>http://atsutane.freethoughts.de/128/shellfunctions-making-the-usage-of-chroots-easier</link>
  <guid>http://atsutane.freethoughts.de/128/shellfunctions-making-the-usage-of-chroots-easier</guid>
  <pubDate>Mon, 28 Dec 2009 15:16:54 +0100</pubDate>
 </item>
</channel>
</rss>