<?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>cksum</title>
	<atom:link href="http://cksum.org/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://cksum.org/blog</link>
	<description>3778944472 1484352 /vmlinuz</description>
	<lastBuildDate>Tue, 24 Jan 2012 13:22:42 +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>Astuce Kobo : enlever le logo Fnac</title>
		<link>http://cksum.org/blog/304-astuce-kobo-enlever-logo-fnac</link>
		<comments>http://cksum.org/blog/304-astuce-kobo-enlever-logo-fnac#comments</comments>
		<pubDate>Tue, 24 Jan 2012 13:21:56 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Kobo Touch]]></category>
		<category><![CDATA[Fnac]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=304</guid>
		<description><![CDATA[L&#8217;astuce a déjà fait le tour du web, mais ça ne fait jamais de mal de la rappeler En mode veille, le Kobo by Fnac affiche le logo de la Fnac. Y&#8217;a pire comme souci dans la vie, mais bon ça serait quand même plus sympathique d&#8217;afficher la couverture du livre en cours de lecture [...]]]></description>
			<content:encoded><![CDATA[<p>L&#8217;astuce a déjà fait le tour du web, mais ça ne fait jamais de mal de la rappeler <img src='http://cksum.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>En mode veille, le <strong>Kobo by Fnac</strong> affiche le logo de la <strong>Fnac</strong>. Y&#8217;a pire comme souci dans la vie, mais bon ça serait quand même plus sympathique d&#8217;afficher la couverture du livre en cours de lecture ! Eh bien c&#8217;est possible.</p>
<p>Editer le fichier <strong>/media/KOBOeReader/.kobo/affiliate.conf</strong> et remplacer :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>General<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">affiliate</span>=fnac</pre></div></div>

<p>par :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>General<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">affiliate</span>=kobo</pre></div></div>

<p>Maintenant sur votre <strong>Kobo</strong>, vérifiez bien dans <strong>Paramètres</strong> puis <b>Mise en veille et hors tension</b> que l&#8217;option <strong>Affichage d&#8217;une couverture de livre</strong> est bien activée.</p>
]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/304-astuce-kobo-enlever-logo-fnac/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuration du Kobo by Fnac sous Linux</title>
		<link>http://cksum.org/blog/298-configuration-kobo-fnac-linux-ubuntu</link>
		<comments>http://cksum.org/blog/298-configuration-kobo-fnac-linux-ubuntu#comments</comments>
		<pubDate>Tue, 24 Jan 2012 12:49:26 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Kobo Touch]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=298</guid>
		<description><![CDATA[Ca y&#8217;est, j&#8217;ai fini par craquer pour la liseuse électronique (e-book reader en anglais) Kobo by Fnac (qui n&#8217;est autre que la Kobo Touch chez les anglo-saxons), plutôt que le Kindle 4 d&#8217;Amazon, pour la bonne et simple raison que ce dernier ne supporte pas le format ouvert standardisé ePub. De retour chez moi, je [...]]]></description>
			<content:encoded><![CDATA[<p>Ca y&#8217;est, j&#8217;ai fini par craquer pour la liseuse électronique (e-book reader en anglais) <strong>Kobo by Fnac</strong> (qui n&#8217;est autre que la <strong>Kobo Touch</strong> chez les anglo-saxons), plutôt que le <strong>Kindle 4</strong> d&#8217;Amazon, pour la bonne et simple raison que ce dernier ne supporte pas le format ouvert standardisé <a href="http://fr.wikipedia.org/wiki/EPUB_(format)" title="ePub">ePub</a>.</p>
<p><a href="http://cksum.org/blog/wp-content/kobo.jpg"><img src="http://cksum.org/blog/wp-content/kobo-248x300.jpg" alt="" title="Kobo by Fnac" width="248" height="300" class="alignleft size-medium wp-image-299" /></a>De retour chez moi, je déballe la bête, et je la connecte en USB à mon PC pour la charger. Elle m&#8217;affiche alors le message suivant :</p>
<blockquote><p>Pour configurer et associer votre appareil à un compte, téléchargez le logiciel gratuit Kobo Desktop.</p>
<p>Depuis votre ordinateur, allez sur : www.kobosetup.com</p></blockquote>
<p>En débranchant la prise USB, on peut alors cliquer sur &#8220;<strong>Passer la configuration</strong>&#8221; en haut à droite de l&#8217;écran, mais dans ce cas, nouveau message :</p>
<blockquote><p>Vous ne pourrez télécharger de livres, ni vous connecter à la Librairie tant que la configuration n&#8217;est pas effectuée. La configuration est importante, nous vous le rappellerons plus tard.</p></blockquote>
<p>Malheureusement, le logiciel <strong>Kobo Desktop</strong> n&#8217;est disponible que pour <strong>Windows</strong> ou pour <strong>Mac OS</strong>.</p>
<p>En fouillant un peu, on peut trouver le lien d&#8217;un paquet Debian sur le <a href="http://www.mobileread.com/forums/showpost.php?p=957500&#038;postcount=76" title="MobileRead Forums">forum MobileRead</a>. C&#8217;est une version 32 bits non-officielle de <strong>Kobo Desktop</strong> pour Linux, pourtant fournie par les développeurs de chez Kobo.</p>
<p>Si vous avez une distribution <strong>Debian</strong> ou <strong>Ubuntu</strong>, voici comment la télécharger et l&#8217;installer :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>dl.dropbox.com<span style="color: #000000; font-weight: bold;">/</span>u<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2183775</span><span style="color: #000000; font-weight: bold;">/</span>kobo-desktop.deb
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> update
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libpng3 libzip1
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> kobo-desktop.deb</pre></div></div>

<p>Maintenant créez un compte sur le site de la <a href="http://www.fnac.com" title="Fnac">Fnac</a> (ça va être utile par la suite), lancez <strong>Kobo Desktop</strong>, et enfin branchez le <strong>Kobo</strong> en USB.</p>
<p>Vous devriez voir apparaître une icône nommée <strong>KOBOeReader</strong> apparaître sur votre bureau, ou dans votre gestionnaire de fichiers. Cliquez dessus pour que le volume amovible soit monté, et normalement la procédure d&#8217;installation va démarrer automatiquement. Il suffit alors de se laisser guider !</p>
]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/298-configuration-kobo-fnac-linux-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation de Coregrenouille sur Ubuntu</title>
		<link>http://cksum.org/blog/291-installation-coregrenouille-ubuntu</link>
		<comments>http://cksum.org/blog/291-installation-coregrenouille-ubuntu#comments</comments>
		<pubDate>Wed, 18 Jan 2012 10:22:15 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[coregrenouille]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=291</guid>
		<description><![CDATA[Suite à quelques instabilités de ma ligne ADSL, j&#8217;ai décidé de rejoindre la communauté des grenouilles. J&#8217;en ai profité pour décrire l&#8217;installation du client Coregrenouille (qui est apparemment le nouveau client à utiliser, qui doit remplacer tous les anciens clients) sur Ubuntu. La première chose à faire est de créer un compte sur grenouille.com. Ensuite, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cksum.org/blog/wp-content/grenouille.png"><img class="alignleft size-full wp-image-293" title="grenouille.com" src="http://cksum.org/blog/wp-content/grenouille.png" alt="" width="183" height="45" /></a>Suite à quelques instabilités de ma ligne ADSL, j&#8217;ai décidé de rejoindre la communauté des grenouilles.</p>
<p>J&#8217;en ai profité pour décrire l&#8217;installation du client <strong>Coregrenouille</strong> (qui est apparemment le nouveau client à utiliser, qui doit remplacer tous les anciens clients) sur <strong>Ubuntu</strong>.</p>
<p>La première chose à faire est de <a title="Créer un compte sur grenouille.com" href="http://grenouille.com/ma_grenouille/register.php?url=%2Fma_grenouille%2F">créer un compte sur grenouille.com</a>.</p>
<p>Ensuite, nous allons installer les paquets dont nous allons avoir besoin :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">git</span> ocaml-nox</pre></div></div>

<p>On télécharge les sources et on se place dans le répertoire :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>git.grenouille.com<span style="color: #000000; font-weight: bold;">/</span>coregrenouille.git coregrenouille-git
$ <span style="color: #7a0874; font-weight: bold;">cd</span> coregrenouille-git<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>On va juste modifier 2 chemins pour les ajuster à notre goût <img src='http://cksum.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>D&#8217;abord le chemin du fichier de log :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">'s#coregrenouille.log#/var/log/coregrenouille.log#'</span> debug.ml</pre></div></div>

<p>Puis le chemin de l&#8217;utilitaire <strong>awk</strong> sur Ubuntu :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">'s#awk /bin/awk#awk /usr/bin/awk#'</span> user.config.linux</pre></div></div>

<p>Et c&#8217;est parti pour la compilation :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">make</span> depend
$ <span style="color: #c20cb9; font-weight: bold;">make</span> coregrenouille</pre></div></div>

<p>Maintenant on créé le répertoire d&#8217;installation, et on y copie le binaire et le fichier de config :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>coregrenouille
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> coregrenouille
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> user.config.linux <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>coregrenouille<span style="color: #000000; font-weight: bold;">/</span>user.config</pre></div></div>

<p>On édite le fichier de config :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ sudoedit <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>coregrenouille<span style="color: #000000; font-weight: bold;">/</span>user.config</pre></div></div>

<p>Et on ajuste les paramètres suivants :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">username mon_nom
password mot_de_passe
interface eth0</pre></div></div>

<p>Enfin on créé le fichier de log et on permet à tout le monde d&#8217;écrire dedans :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>coregrenouille.log
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> a+<span style="color: #c20cb9; font-weight: bold;">w</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>coregrenouille.log</pre></div></div>

<p>Il ne reste plus qu&#8217;à lancer <strong>coregrenouille</strong> !</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>coregrenouille<span style="color: #000000; font-weight: bold;">/</span>coregrenouille <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>coregrenouille<span style="color: #000000; font-weight: bold;">/</span>user.config <span style="color: #660033;">-t</span> <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

<p>Pour voir ce qui se passe en direct, vous pouvez lancer la commande suivante :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>coregrenouille.log</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/291-installation-coregrenouille-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling and using sstrip</title>
		<link>http://cksum.org/blog/284-compiling-and-using-sstrip</link>
		<comments>http://cksum.org/blog/284-compiling-and-using-sstrip#comments</comments>
		<pubDate>Wed, 02 Nov 2011 17:17:45 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sstrip]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=284</guid>
		<description><![CDATA[There&#8217;s a new 3.0 version of ELFkickers available since may 2011, after a decade of inactivity. You can read the changelog from the previous link to see what has changed, but concerning sstrip, the most important thing is that it now also works with 64-bit ELF files. Let&#8217;s download, compile and install it: $ wget [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a new <strong>3.0</strong> version of <a href="http://www.muppetlabs.com/~breadbox/software/elfkickers.html" title="ELFkickers">ELFkickers</a> available since <strong>may 2011</strong>, after a decade of inactivity.</p>
<p>You can read the changelog from the previous link to see what has changed, but concerning <strong>sstrip</strong>, the most important thing is that it now also works with <strong>64-bit</strong> ELF files.</p>
<p>Let&#8217;s download, compile and install it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.muppetlabs.com<span style="color: #000000; font-weight: bold;">/</span>~breadbox<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>ELFkickers-<span style="color: #000000;">3.0</span>.tar.gz
$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xf ELFkickers-<span style="color: #000000;">3.0</span>.tar.gz
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ELFkickers-<span style="color: #000000;">3.0</span><span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Now we can try it on <strong>strip</strong> <img src='http://cksum.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>First make a copy:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">strip</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Check the size before:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wc</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">strip</span> 
<span style="color: #000000;">220432</span></pre></div></div>

<p>And also what <strong>file</strong> says before:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">strip</span> 
<span style="color: #c20cb9; font-weight: bold;">strip</span>: ELF <span style="color: #000000;">64</span>-bit LSB executable, x86-<span style="color: #000000;">64</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, dynamically linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>uses shared libs<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000; font-weight: bold;">for</span> GNU<span style="color: #000000; font-weight: bold;">/</span>Linux 2.6.26, BuildID<span style="color: #7a0874; font-weight: bold;">&#91;</span>sha1<span style="color: #7a0874; font-weight: bold;">&#93;</span>=0xa4aa26810da0b5672790975fc7e193520c9e2008, stripped</pre></div></div>

<p>Now <strong>sstrip</strong> it!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ sstrip <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">strip</span></pre></div></div>

<p>This is the size after:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wc</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">strip</span> 
<span style="color: #000000;">218404</span></pre></div></div>

<p>The size has been reduced by <strong>2028 bytes</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">220432</span> - <span style="color: #000000;">218404</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000;">2028</span></pre></div></div>

<p>And here&#8217;s what <strong>file</strong> reports now:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">strip</span>
<span style="color: #c20cb9; font-weight: bold;">strip</span>: ELF <span style="color: #000000;">64</span>-bit LSB executable, x86-<span style="color: #000000;">64</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000; font-weight: bold;">for</span> GNU<span style="color: #000000; font-weight: bold;">/</span>Linux 2.6.26, dynamically linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>uses shared libs<span style="color: #7a0874; font-weight: bold;">&#41;</span>, corrupted section header <span style="color: #c20cb9; font-weight: bold;">size</span></pre></div></div>

<p><strong>file</strong> complains that the <strong>section header size</strong> is corrupted, but the sstripped binary still seems to run fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/284-compiling-and-using-sstrip/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Création d&#8217;un patch pour la mise à jour d&#8217;un paquet OpenWrt</title>
		<link>http://cksum.org/blog/157-creation-patch-mise-a-jour-paquet-openwrt</link>
		<comments>http://cksum.org/blog/157-creation-patch-mise-a-jour-paquet-openwrt#comments</comments>
		<pubDate>Wed, 02 Nov 2011 13:05:49 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[OpenWrt]]></category>
		<category><![CDATA[paquet]]></category>
		<category><![CDATA[planet-libre]]></category>
		<category><![CDATA[quilt]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=157</guid>
		<description><![CDATA[Nous allons voir comment mettre à jour le paquet pcre de la version 8.11 vers la version 8.20, et comment créer un patch pour l&#8217;envoyer aux développeurs d&#8217;OpenWrt. Pour info, voici l&#8217;arborescence dans laquelle je travaille : $ ls /data/workspace/openwrt/ patches trunk Tout d&#8217;abord, nous allons faire en sorte d&#8217;être à jour : $ cd [...]]]></description>
			<content:encoded><![CDATA[<p>Nous allons voir comment mettre à jour le <a href="https://dev.openwrt.org/browser/packages/libs/pcre" title="Paquet pcre">paquet pcre</a> de la version <strong>8.11</strong> vers la version <strong>8.20</strong>, et comment créer un patch pour l&#8217;<a href="http://cksum.org/blog/260-listes-discussion-openwrt" title="Les listes de discussion OpenWrt">envoyer aux développeurs d&#8217;OpenWrt</a>.</p>
<p>Pour info, voici l&#8217;arborescence dans laquelle je travaille :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>
patches  trunk</pre></div></div>

<p>Tout d&#8217;abord, nous allons faire en sorte d&#8217;être à jour :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">svn</span> up
$ .<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>feeds update <span style="color: #660033;">-a</span></pre></div></div>

<p>Nous sommes maintenant prêts à commencer.</p>
<p>On commence par télécharger la dernière version de <strong>pcre</strong> dans le répertoire <strong>dl/</strong> :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-P</span> dl<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.csx.cam.ac.uk<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>programming<span style="color: #000000; font-weight: bold;">/</span>pcre<span style="color: #000000; font-weight: bold;">/</span>pcre-<span style="color: #000000;">8.20</span>.tar.bz2</pre></div></div>

<p>Puis on calcule sa somme de contrôle MD5 :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ md5sum dl<span style="color: #000000; font-weight: bold;">/</span>pcre-<span style="color: #000000;">8.20</span>.tar.bz2 
a1931c70e1273e3450d5036fe273d25c  dl<span style="color: #000000; font-weight: bold;">/</span>pcre-<span style="color: #000000;">8.20</span>.tar.bz2</pre></div></div>

<p>On va alors dans le répertoire du paquet pour commencer à travailler :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> feeds<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>pcre<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>On indique à <strong>quilt</strong> de créer un nouveau patch :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ quilt new pcre.patch
Patch pcre.patch is now on top</pre></div></div>

<p>On lui indique qu&#8217;on veut modifier le fichier <strong>Makefile</strong>, ce qui aura pour effet de l&#8217;ajouter automatiquement au patch qui est au sommet de la pile :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ quilt edit Makefile 
File Makefile added to <span style="color: #c20cb9; font-weight: bold;">patch</span> pcre.patch</pre></div></div>

<p>On va donc mettre à jour les divers paramètres du paquet qui ont changé.</p>
<p>Dans tous les cas il y aura <strong>PKG_VERSION</strong> à changer pour mettre le nouveau numéro de version, <strong>PKG_RELEASE</strong> à mettre à 1 (car c&#8217;est la première release du paquet à la nouvelle version), et <strong>PKG_MD5SUM</strong> à mettre à la valeur calculée un peu plus tôt.</p>
<p>Dans cet exemple, <strong>PKG_SOURCE_URL</strong> change également.</p>
<p>Avant :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PKG_NAME:=pcre
PKG_VERSION:=<span style="color: #000000;">8.11</span>
PKG_RELEASE:=<span style="color: #000000;">2</span>
&nbsp;
PKG_SOURCE:=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>PKG_NAME<span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span>PKG_VERSION<span style="color: #7a0874; font-weight: bold;">&#41;</span>.tar.bz2
PKG_SOURCE_URL:=<span style="color: #000000; font-weight: bold;">@</span>SF<span style="color: #000000; font-weight: bold;">/</span>pcre
PKG_MD5SUM:=ef907b8792ec7f90f0dcd773848f0b3b</pre></div></div>

<p>Après :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PKG_NAME:=pcre
PKG_VERSION:=<span style="color: #000000;">8.20</span>
PKG_RELEASE:=<span style="color: #000000;">1</span>
&nbsp;
PKG_SOURCE:=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>PKG_NAME<span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span>PKG_VERSION<span style="color: #7a0874; font-weight: bold;">&#41;</span>.tar.bz2
PKG_SOURCE_URL:=<span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.csx.cam.ac.uk<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>programming<span style="color: #000000; font-weight: bold;">/</span>pcre<span style="color: #000000; font-weight: bold;">/</span>
PKG_MD5SUM:=a1931c70e1273e3450d5036fe273d25c</pre></div></div>

<p>Une fois les modifications effectuées, on indique à <strong>quilt</strong> de rafraîchir le patch :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ quilt refresh
Refreshed <span style="color: #c20cb9; font-weight: bold;">patch</span> pcre.patch</pre></div></div>

<p>Comme nous l&#8217;avons défini dans <a href="http://cksum.org/blog/156-installation-configuration-quilt-creer-patchs-openwrt" title="Installation et configuration de quilt pour créer des patchs OpenWrt">Installation et configuration de quilt pour créer des patchs OpenWrt</a>, le patch se trouve dans <strong>/data/workspace/openwrt/patches/</strong>.</p>
<p>On retourne à la racine d&#8217;OpenWrt pour vérifier que tout compile correctement :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> -
<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/</span>openwrt<span style="color: #000000; font-weight: bold;">/</span>trunk
&nbsp;
$ <span style="color: #c20cb9; font-weight: bold;">make</span> package<span style="color: #000000; font-weight: bold;">/</span>pcre<span style="color: #000000; font-weight: bold;">/</span>compile <span style="color: #007800;">V</span>=<span style="color: #000000;">99</span> <span style="color: #007800;">DEVELOPER</span>=<span style="color: #000000;">1</span></pre></div></div>

<p>Et voilà !</p>
]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/157-creation-patch-mise-a-jour-paquet-openwrt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aptitude safe-upgrade: errors were encountered while processing bison</title>
		<link>http://cksum.org/blog/272-aptitude-safe-upgrade-errors-were-encountered-while-processing-bison</link>
		<comments>http://cksum.org/blog/272-aptitude-safe-upgrade-errors-were-encountered-while-processing-bison#comments</comments>
		<pubDate>Wed, 26 Oct 2011 16:25:07 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[bison]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=272</guid>
		<description><![CDATA[A few days ago, as I was doing my periodic aptitude safe-upgrade, I got the following (irrelevant parts omitted): $ sudo aptitude safe-upgrade &#160; Unpacking libbison-dev &#40;from .../libbison-dev_1%3a2.5.dfsg-2_amd64.deb&#41; ... dpkg: error processing /var/cache/apt/archives/libbison-dev_1%3a2.5.dfsg-2_amd64.deb &#40;--unpack&#41;: trying to overwrite '/usr/lib/x86_64-linux-gnu/liby.a', which is also in package liby-dev 1:2.5.dfsg-1 configured to not write apport reports dpkg-deb: error: subprocess paste [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, as I was doing my periodic <strong>aptitude safe-upgrade</strong>, I got the following (irrelevant parts omitted):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> safe-upgrade
&nbsp;
Unpacking libbison-dev <span style="color: #7a0874; font-weight: bold;">&#40;</span>from ...<span style="color: #000000; font-weight: bold;">/</span>libbison-dev_1<span style="color: #000000; font-weight: bold;">%</span>3a2.5.dfsg-<span style="color: #000000;">2</span>_amd64.deb<span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
<span style="color: #c20cb9; font-weight: bold;">dpkg</span>: error processing <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>archives<span style="color: #000000; font-weight: bold;">/</span>libbison-dev_1<span style="color: #000000; font-weight: bold;">%</span>3a2.5.dfsg-<span style="color: #000000;">2</span>_amd64.deb <span style="color: #7a0874; font-weight: bold;">&#40;</span>--unpack<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
 trying to overwrite <span style="color: #ff0000;">'/usr/lib/x86_64-linux-gnu/liby.a'</span>, <span style="color: #c20cb9; font-weight: bold;">which</span> is also <span style="color: #000000; font-weight: bold;">in</span> package liby-dev <span style="color: #000000;">1</span>:<span style="color: #000000;">2.5</span>.dfsg-<span style="color: #000000;">1</span>
configured to not <span style="color: #c20cb9; font-weight: bold;">write</span> apport reports
                                      dpkg-deb: error: subprocess paste was killed by signal <span style="color: #7a0874; font-weight: bold;">&#40;</span>Broken pipe<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
...
&nbsp;
Errors were encountered <span style="color: #000000; font-weight: bold;">while</span> processing:
 <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>archives<span style="color: #000000; font-weight: bold;">/</span>libbison-dev_1<span style="color: #000000; font-weight: bold;">%</span>3a2.5.dfsg-<span style="color: #000000;">2</span>_amd64.deb
E: Sub-process <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dpkg</span> returned an error code <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
A package failed to install.  Trying to recover:
&nbsp;
...
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">dpkg</span>: dependency problems prevent configuration of <span style="color: #c20cb9; font-weight: bold;">bison</span>:
 <span style="color: #c20cb9; font-weight: bold;">bison</span> depends on libbison-dev <span style="color: #7a0874; font-weight: bold;">&#40;</span>= <span style="color: #000000;">1</span>:<span style="color: #000000;">2.5</span>.dfsg-<span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; however:
  Package libbison-dev is not installed.
<span style="color: #c20cb9; font-weight: bold;">dpkg</span>: error processing <span style="color: #c20cb9; font-weight: bold;">bison</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>--configure<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
 dependency problems - leaving unconfigured
&nbsp;
...
&nbsp;
Errors were encountered <span style="color: #000000; font-weight: bold;">while</span> processing:
 <span style="color: #c20cb9; font-weight: bold;">bison</span></pre></div></div>

<p>In fact, <strong>liby-dev</strong> has been renamed to <strong>libbison-dev</strong> to avoid name conflict with Y sound server library header files, but some fields are missing from the package <strong>control</strong> file (<strong>Provides</strong>, <strong>Conflicts</strong> and <strong>Replaces</strong>).</p>
<p>The correct way to rename a package is documented in the <strong>Debian Developer&#8217;s Reference</strong> in section <a href="http://www.debian.org/doc/manuals/developers-reference/pkgs.html#s5.9.3" title="5.9.3. Replacing or renaming packages">5.9.3. Replacing or renaming packages</a>, and in the <strong>Debian Policy Manual</strong> in section <a href="http://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces" title="Debian Policy Manual - 7.6 Overwriting files and replacing packages">7.6 Overwriting files and replacing packages</a>.</p>
<p>Anyway, if you don&#8217;t want to wait for the problem to get fixed, there&#8217;s a workaround:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> purge liby-dev <span style="color: #c20cb9; font-weight: bold;">bison</span>
The following packages will be REMOVED:  
  <span style="color: #c20cb9; font-weight: bold;">bison</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>p<span style="color: #7a0874; font-weight: bold;">&#125;</span> liby-dev<span style="color: #7a0874; font-weight: bold;">&#123;</span>p<span style="color: #7a0874; font-weight: bold;">&#125;</span> 
<span style="color: #000000;">0</span> packages upgraded, <span style="color: #000000;">0</span> newly installed, <span style="color: #000000;">2</span> to remove and <span style="color: #000000;">50</span> not upgraded.
Need to get <span style="color: #000000;">0</span> B of archives. After unpacking <span style="color: #000000;">2216</span> kB will be freed.
Do you want to <span style="color: #7a0874; font-weight: bold;">continue</span>? <span style="color: #7a0874; font-weight: bold;">&#91;</span>Y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #7a0874; font-weight: bold;">&#93;</span> 
<span style="color: #7a0874; font-weight: bold;">&#40;</span>Reading database ... <span style="color: #000000;">166621</span> files and directories currently installed.<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Removing <span style="color: #c20cb9; font-weight: bold;">bison</span> ...
Removing liby-dev ...
Processing triggers <span style="color: #000000; font-weight: bold;">for</span> man-db ...
&nbsp;
Current status: <span style="color: #000000;">0</span> broken <span style="color: #7a0874; font-weight: bold;">&#91;</span>-<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>.
&nbsp;
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">bison</span>
The following NEW packages will be installed:
  <span style="color: #c20cb9; font-weight: bold;">bison</span> libbison-dev<span style="color: #7a0874; font-weight: bold;">&#123;</span>a<span style="color: #7a0874; font-weight: bold;">&#125;</span> 
<span style="color: #000000;">0</span> packages upgraded, <span style="color: #000000;">2</span> newly installed, <span style="color: #000000;">0</span> to remove and <span style="color: #000000;">50</span> not upgraded.
Need to get <span style="color: #000000;">0</span> B<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">981</span> kB of archives. After unpacking <span style="color: #000000;">2216</span> kB will be used.
Do you want to <span style="color: #7a0874; font-weight: bold;">continue</span>? <span style="color: #7a0874; font-weight: bold;">&#91;</span>Y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #7a0874; font-weight: bold;">&#93;</span> 
<span style="color: #7a0874; font-weight: bold;">&#40;</span>Reading database ... <span style="color: #000000;">166516</span> files and directories currently installed.<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Unpacking libbison-dev <span style="color: #7a0874; font-weight: bold;">&#40;</span>from ...<span style="color: #000000; font-weight: bold;">/</span>libbison-dev_1<span style="color: #000000; font-weight: bold;">%</span>3a2.5.dfsg-<span style="color: #000000;">2</span>_amd64.deb<span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
Selecting previously unselected package bison.
Unpacking <span style="color: #c20cb9; font-weight: bold;">bison</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>from ...<span style="color: #000000; font-weight: bold;">/</span>bison_1<span style="color: #000000; font-weight: bold;">%</span>3a2.5.dfsg-<span style="color: #000000;">2</span>_amd64.deb<span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
Processing triggers <span style="color: #000000; font-weight: bold;">for</span> man-db ...
Setting up libbison-dev <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span>:<span style="color: #000000;">2.5</span>.dfsg-<span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
Setting up <span style="color: #c20cb9; font-weight: bold;">bison</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span>:<span style="color: #000000;">2.5</span>.dfsg-<span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ...</pre></div></div>

<p>You can also check the following <strong>Debian bugs</strong>: <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645038" title="#645038">#645038</a>, <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645047" title="#645047">#645047</a> and <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645086" title="#645086">#645086</a> (which have been merged).</p>
]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/272-aptitude-safe-upgrade-errors-were-encountered-while-processing-bison/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set up asynchronous repository synchronization in Trac 0.12</title>
		<link>http://cksum.org/blog/269-how-to-set-up-asynchronous-repository-synchronization-trac-0-12</link>
		<comments>http://cksum.org/blog/269-how-to-set-up-asynchronous-repository-synchronization-trac-0-12#comments</comments>
		<pubDate>Fri, 14 Oct 2011 13:01:46 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=269</guid>
		<description><![CDATA[We&#8217;ve seen in a previous post How to set up repository synchronization in Trac 0.12. The problem, however, is that calling trac-admin in the hooks can slow down the commit and log editing operations on the client side. One solution is to start trac-admin in an asynchronous way, for example with nohup and &#038;. Modify [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve seen in a previous post <a title="How to set up repository synchronization in Trac 0.12" href="http://cksum.org/blog/266-how-to-set-up-repository-synchronization-trac-0-12">How to set up repository synchronization in Trac 0.12</a>.</p>
<p>The problem, however, is that calling <strong>trac-admin</strong> in the hooks can slow down the commit and log editing operations on the client side.</p>
<p>One solution is to start <strong>trac-admin</strong> in an <strong>asynchronous</strong> way, for example with <strong>nohup</strong> and <strong>&#038;</strong>.</p>
<p>Modify the <strong>post-commit</strong> hook to look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">TRAC_ENV</span>=<span style="color: #ff0000;">&quot;/var/trac&quot;</span>
<span style="color: #007800;">TRAC_ADMIN</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">which</span> trac-admin<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">HOOK_LOG</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$TRAC_ENV</span>/log/<span style="color: #007800;">$(basename $0)</span>.log&quot;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">nohup</span> <span style="color: #007800;">$TRAC_ADMIN</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TRAC_ENV</span>&quot;</span> changeset added <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #ff0000;">&quot;$2&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOOK_LOG</span>&quot;</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

<p>And modify the <strong>post-revprop-change</strong> hook to look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">TRAC_ENV</span>=<span style="color: #ff0000;">&quot;/var/trac&quot;</span>
<span style="color: #007800;">TRAC_ADMIN</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">which</span> trac-admin<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">HOOK_LOG</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$TRAC_ENV</span>/log/<span style="color: #007800;">$(basename $0)</span>.log&quot;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">nohup</span> <span style="color: #007800;">$TRAC_ADMIN</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TRAC_ENV</span>&quot;</span> changeset modified <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #ff0000;">&quot;$2&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOOK_LOG</span>&quot;</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&amp;</span></pre></div></div>

<p>Another possibility is to use the <a href="http://trac.edgewall.org/browser/trunk/contrib/trac-svn-hook" title="trac-svn-hook">trac-svn-hook</a> script (found in <strong>/usr/share/doc/trac/contrib/</strong>). Its usage is described in great detail at the beginning of the script.</p>
]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/269-how-to-set-up-asynchronous-repository-synchronization-trac-0-12/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set up repository synchronization in Trac 0.12</title>
		<link>http://cksum.org/blog/266-how-to-set-up-repository-synchronization-trac-0-12</link>
		<comments>http://cksum.org/blog/266-how-to-set-up-repository-synchronization-trac-0-12#comments</comments>
		<pubDate>Fri, 14 Oct 2011 12:37:10 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=266</guid>
		<description><![CDATA[According to the Trac wiki: Prior to 0.12, Trac synchronized its cache with the repository on every HTTP request. This approach is not very efficient and not practical anymore with multiple repositories. For this reason, explicit synchronization through post-commit hooks was added. The preferred method of repository synchronization is explicit synchronization. We&#8217;ll see how to [...]]]></description>
			<content:encoded><![CDATA[<p>According to the <a href="http://trac.edgewall.org/wiki/TracRepositoryAdmin#Synchronization" title="Repository synchronization">Trac wiki</a>:</p>
<blockquote><p>Prior to 0.12, Trac synchronized its cache with the repository on every HTTP request. This approach is not very efficient and not practical anymore with multiple repositories. For this reason, explicit synchronization through post-commit hooks was added.</p></blockquote>
<p>The preferred method of repository synchronization is <strong>explicit synchronization</strong>. We&#8217;ll see how to enable it.</p>
<p>The first thing is to edit <strong>trac.ini</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ sudoedit <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>trac.ini</pre></div></div>

<p>And set the <strong>repository_sync_per_request</strong> option (it can be found in the <strong>[trac]</strong> section) to an empty value:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>trac<span style="color: #7a0874; font-weight: bold;">&#93;</span>
...
repository_sync_per_request = 
...</pre></div></div>

<p>Now we need to add a call to <strong>trac-admin</strong> in the <strong>post-commit</strong> hook of each repository.</p>
<p>For example, with a repository located in <strong>/var/svn/project1</strong>, the <strong>post-commit</strong> hook is located at <strong>/var/svn/project1/hooks/post-commit</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ sudoedit <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>project1<span style="color: #000000; font-weight: bold;">/</span>hooks<span style="color: #000000; font-weight: bold;">/</span>post-commit</pre></div></div>

<p>This is how this file should look like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">TRAC_ENV</span>=<span style="color: #ff0000;">&quot;/var/trac&quot;</span>
<span style="color: #007800;">TRAC_ADMIN</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">which</span> trac-admin<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #007800;">$TRAC_ADMIN</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TRAC_ENV</span>&quot;</span> changeset added <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #ff0000;">&quot;$2&quot;</span></pre></div></div>

<p>Then change the ownership and permissions of this file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data post-commit
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> ug+x post-commit</pre></div></div>

<p>Additionally, if a repository allows changing revision metadata, a call to <strong>trac-admin</strong> must be added to the <strong>post-revprop-change</strong> hook as well:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ sudoedit <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>project1<span style="color: #000000; font-weight: bold;">/</span>hooks<span style="color: #000000; font-weight: bold;">/</span>post-revprop-change</pre></div></div>

<p>This is how this file should look like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">TRAC_ENV</span>=<span style="color: #ff0000;">&quot;/var/trac&quot;</span>
<span style="color: #007800;">TRAC_ADMIN</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">which</span> trac-admin<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #007800;">$TRAC_ADMIN</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TRAC_ENV</span>&quot;</span> changeset modified <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #ff0000;">&quot;$2&quot;</span></pre></div></div>

<p>Then change the ownership and permissions of this file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data post-revprop-change
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> ug+x post-revprop-change</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/266-how-to-set-up-repository-synchronization-trac-0-12/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a digest authentication password file</title>
		<link>http://cksum.org/blog/263-how-to-create-digest-authentication-password-file</link>
		<comments>http://cksum.org/blog/263-how-to-create-digest-authentication-password-file#comments</comments>
		<pubDate>Thu, 13 Oct 2011 14:21:23 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[htdigest]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=263</guid>
		<description><![CDATA[A digest authentication password file is a flat-file used to store usernames, realm and password for digest authentication of HTTP users. The tool commonly used to create this file is htdigest, but we&#8217;ll also see two other ways. Under Debian, the htdigest utility is included in the apache2-utils package, so you don&#8217;t need to install [...]]]></description>
			<content:encoded><![CDATA[<p>A <strong>digest authentication password file</strong> is a flat-file used to store usernames, realm and password for digest authentication of HTTP users. The tool commonly used to create this file is <strong>htdigest</strong>, but we&#8217;ll also see two other ways.</p>
<p>Under Debian, the <strong>htdigest</strong> utility is included in the <strong>apache2-utils</strong> package, so you don&#8217;t need to install Apache to get it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2-utils</pre></div></div>

<p>Now let&#8217;s create a new user. In this example, the password file is <strong>.htdigest</strong>, the username is <strong>user</strong>, and the realm is <strong>realm</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ htdigest <span style="color: #660033;">-c</span> .htdigest realm user
Adding password <span style="color: #000000; font-weight: bold;">for</span> user <span style="color: #000000; font-weight: bold;">in</span> realm realm.
New password: 
Re-type new password:</pre></div></div>

<p>The <strong>-c</strong> parameter is given to create the file as it doesn&#8217;t already exist. If it existed, it would have been deleted and then recreated.</p>
<p>This is what the password file looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cat</span> .htdigest 
user:realm:ebbc0ff9a121dbb6789bbe5f82174fa0</pre></div></div>

<p>The format of each line of this file is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">user:realm:MD5<span style="color: #7a0874; font-weight: bold;">&#40;</span>user:realm:password<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Let&#8217;s create another user:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ htdigest .htdigest realm otheruser
Adding user otheruser <span style="color: #000000; font-weight: bold;">in</span> realm realm
New password: 
Re-type new password:</pre></div></div>

<p>We didn&#8217;t give the <strong>-c</strong> parameter this time, as we wanted to append to the existing password file, and not recreate it.</p>
<p>The password file now looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cat</span> .htdigest 
user:realm:ebbc0ff9a121dbb6789bbe5f82174fa0
otheruser:realm:c9be7a49959637333df7cd6b64e2c539</pre></div></div>

<p>If you installed the <strong>Trac</strong> package, there&#8217;s a Python script named <strong>htdigest.py</strong> included, so you don&#8217;t need to install <strong>apache2-utils</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ python <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>htdigest.py <span style="color: #660033;">-c</span> .htdigest realm user
New password: 
Re-type new password:</pre></div></div>

<p>We get the same result as with <strong>htdigest</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cat</span> .htdigest 
user:realm:ebbc0ff9a121dbb6789bbe5f82174fa0</pre></div></div>

<p>A nice feature of this script is the <strong>-b</strong> parameter to enable the batch mode, which allows us to specify the password as an argument. This can be really useful when writing a script to automate the process:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ python <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>contrib<span style="color: #000000; font-weight: bold;">/</span>htdigest.py <span style="color: #660033;">-b</span> <span style="color: #660033;">-c</span> .htdigest realm user password</pre></div></div>

<p>And finally, another solution using only <strong>md5sum</strong> and <strong>cut</strong>, both included in the <strong>coreutils</strong> package, which should already be installed on your system.</p>
<p>Just set <strong>HTUSER</strong>, <strong>HTREALM</strong> and <strong>HTPASSWORD</strong> to the values you&#8217;d like to use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #007800;">HTUSER</span>=user <span style="color: #007800;">HTREALM</span>=realm <span style="color: #007800;">HTPASSWORD</span>=password <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HTUSER</span>:<span style="color: #007800;">$HTREALM</span>:&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HTUSER</span>:<span style="color: #007800;">$HTREALM</span>:<span style="color: #007800;">$HTPASSWORD</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> md5sum <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-b</span> -<span style="color: #000000;">32</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> .htdigest</pre></div></div>

<p>Now to add another user, we use <strong>&gt;&gt;</strong> instead of <strong>&gt;</strong> to append to the existing file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #007800;">HTUSER</span>=otheruser <span style="color: #007800;">HTREALM</span>=realm <span style="color: #007800;">HTPASSWORD</span>=otherpassword <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HTUSER</span>:<span style="color: #007800;">$HTREALM</span>:&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HTUSER</span>:<span style="color: #007800;">$HTREALM</span>:<span style="color: #007800;">$HTPASSWORD</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> md5sum <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-b</span> -<span style="color: #000000;">32</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> .htdigest</pre></div></div>

<p>We get the same result as with <strong>htdigest</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cat</span> .htdigest 
user:realm:ebbc0ff9a121dbb6789bbe5f82174fa0
otheruser:realm:c9be7a49959637333df7cd6b64e2c539</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/263-how-to-create-digest-authentication-password-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Les listes de discussion OpenWrt</title>
		<link>http://cksum.org/blog/260-listes-discussion-openwrt</link>
		<comments>http://cksum.org/blog/260-listes-discussion-openwrt#comments</comments>
		<pubDate>Thu, 13 Oct 2011 10:04:13 +0000</pubDate>
		<dc:creator>raphaelh</dc:creator>
				<category><![CDATA[OpenWrt]]></category>
		<category><![CDATA[libre-planet]]></category>

		<guid isPermaLink="false">http://cksum.org/blog/?p=260</guid>
		<description><![CDATA[Il y a actuellement 3 listes de discussion (mailing lists) OpenWrt actives et publiques : openwrt-users : pour les utilisateurs openwrt-devel : pour les développeurs openwrt-tickets : pour recevoir les tickets Trac Les liens ci-dessus permettent de s&#8217;inscrire aux différentes listes, et également de consulter les archives. La liste openwrt-devel est la plus intéressante pour [...]]]></description>
			<content:encoded><![CDATA[<p>Il y a actuellement 3 listes de discussion (mailing lists) <a title="OpenWrt" href="http://openwrt.org">OpenWrt</a> actives et publiques :</p>
<ul>
<li><a title="openwrt-users -- OpenWrt User List" href="https://lists.openwrt.org/mailman/listinfo/openwrt-users">openwrt-users</a> : pour les utilisateurs</li>
<li><a title="openwrt-devel -- OpenWrt Development List" href="https://lists.openwrt.org/mailman/listinfo/openwrt-devel">openwrt-devel</a> : pour les développeurs </li>
<li><a title="openwrt-tickets -- OpenWrt Trac Tickets" href="https://lists.openwrt.org/mailman/listinfo/openwrt-tickets">openwrt-tickets</a> : pour recevoir les tickets Trac</li>
</ul>
<p>Les liens ci-dessus permettent de s&#8217;inscrire aux différentes listes, et également de consulter les archives.</p>
<p>La liste <strong>openwrt-devel</strong> est la plus intéressante pour ceux qui font du développement sous OpenWrt, et c&#8217;est d&#8217;ailleurs le moyen privilégié pour contribuer un patch.</p>
<p>Ces listes sont anglophones, mais il existe également un <a href="http://openwrt.fr/forum/" title="Forum OpenWrt en français">forum OpenWrt en français</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://cksum.org/blog/260-listes-discussion-openwrt/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

