<?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>Anthony Dahanne&#039;s blog &#187; open source</title>
	<atom:link href="http://blog.dahanne.net/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dahanne.net</link>
	<description>Open Source Software, Java, Android, Continuous Integration</description>
	<lastBuildDate>Fri, 20 Jan 2012 02:32:20 +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>Creating and applying a patch for an Eclipse project with Git, part 2 : using github</title>
		<link>http://blog.dahanne.net/2012/01/19/creating-and-applying-a-patch-for-an-eclipse-project-with-git-part-2-using-github/</link>
		<comments>http://blog.dahanne.net/2012/01/19/creating-and-applying-a-patch-for-an-eclipse-project-with-git-part-2-using-github/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 00:18:11 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tycho]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=580</guid>
		<description><![CDATA[<p>In a recent post, I described how to contribute a patch to an eclipse project using git as its version control system.</p> <p>Patches are OK, but you lack all the social aspect that is enabled with git and its tooling (be it pure git + gerrit or github with the comments on commits and pull [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent post, <a href="http://blog.dahanne.net/2011/10/05/creating-and-applying-a-patch-for-an-eclipse-project-with-git/" title="Creating and applying a patch for an Eclipse project with Git">I described how to contribute a patch to an eclipse project using git as its version control system</a>.</p>
<p>Patches are OK, but you lack all the social aspect that is enabled with git and its tooling (be it pure git + <a href="https://code.google.com/p/gerrit/" title="Gerrit">gerrit </a>or github with the comments on commits and <a href="http://help.github.com/send-pull-requests/" title="Github pull requests">pull requests</a>)</p>
<p>As of today, pull requests are not accepted by Eclipse committers since they lack IP (Intellectual Property) information, and <a href="https://git.eclipse.org/c/" title="Eclipse git repositories">the official git repositories at eclipse are hosted by the foundation</a> not on github (github repositories of Eclipse projects exist for mirroring only).</p>
<p>Recently talking with a committer on the <a href="http://www.eclipse.org/tycho/" title="Eclipse Tycho">Eclipse Tycho project</a> (Tobias Oberlies not to name him), he suggested to me to share my contributions via github, instead of attaching patches,  <a href="http://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions" title="Handling Git contributions at Eclipse">as long as the git contribution scenario is followed</a></p>
<p>To comply with this suggestion, </p>
<h4>1. I would clone the official repository at git.eclipse.org</h4>
<pre class="bash">git clone http://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git</pre>
<h4>2. work on my changes, test them, add them, and commit them for each functional change</h4>
<pre class="bash">git add myfile1 myfile2</pre>
<pre class="bash">git commit -m "BZ xxxxxx : comment"</pre>
<h4>3. <a href="http://help.github.com/create-a-repo/" title="Create a  new repository on Github">create a new repository on my github account</a></h4>
<p><a href="http://blog.dahanne.net/wp-content/uploads/Create-a-New-Repository-GitHub-Mozilla-Firefox_2012-01-19_13-10-05.png"><img src="http://blog.dahanne.net/wp-content/uploads/Create-a-New-Repository-GitHub-Mozilla-Firefox_2012-01-19_13-10-05-300x211.png" alt="" title="Create a New Repository - GitHub" width="300" height="211" class="alignnone size-medium wp-image-584" /></a></p>
<h4>4. synchronize my new github repo with the official tycho repository</h4>
<pre class="bash">git remote add origin.github git@github.com:anthonydahanne/org.eclipse.tycho.git</pre>
<p>&laquo;&nbsp;behind proxy&nbsp;&raquo; users can use https access instead, </p>
<pre class="bash">git remote add origin.github  https://anthonydahanne@github.com/anthonydahanne/org.eclipse.tycho.git</pre>
<h4>5. push my committed changes to my github repository</h4>
<pre class="bash">git push -u origin.github master</pre>
<h4>6. <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=351487#c30" title="Add a comment to a bugzilla entry to share the github commit ids">add a comment to the bugzilla entry describing the fix or new feature I worked on, giving the github commit id</a></h4>
<h4>7. <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=357503#c9" title="Accept IP terms of the eclipse foundation">accept the IP conditions of the Eclipse foundation</a></h4>
<p>That&#8217;s it ! you just contributed some code to a cool Eclipse project !<br />
OK, it seems more complicated than just submitting a patch or a pull request, but once your local repo is set up,<br />
you should have something like :</p>
<pre class="bash">git remote -v
origin  http://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git (fetch)
origin  http://git.eclipse.org/gitroot/tycho/org.eclipse.tycho.git (push)
origin.github   https://anthonydahanne@github.com/anthonydahanne/org.eclipse.tycho.git (fetch)
origin.github   https://anthonydahanne@github.com/anthonydahanne/org.eclipse.tycho.git (push)</pre>
<p> and it is just a matter of juggling between the original repo, synchronizing the latest changes</p>
<pre class="bash">git pull origin master</pre>
<p> and the github repo (pushing the latest changes)</p>
<pre class="bash">git push origin.github master</pre>
<p>and copying/pasting the commit ids to the bugzilla entry.</p>
<p>I&#8217;m still relatively new to Git, so if you think there are better ways to sync the repositories, then please add a comment to this post !</p>
<h3>To go deeper on that topic :</h3>
<ul>
<li><a href="http://wiki.eclipse.org/EGit/Git_For_Eclipse_Users">http://wiki.eclipse.org/EGit/Git_For_Eclipse_Users</a></li>
<li>
<a href="http://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions">http://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions</a></li>
<li>
<a href="http://wiki.eclipse.org/Tycho/Contributor_Guide#Contributing_the_Patch">http://wiki.eclipse.org/Tycho/Contributor_Guide#Contributing_the_Patch</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2012/01/19/creating-and-applying-a-patch-for-an-eclipse-project-with-git-part-2-using-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sécuriser son serveur dédié : quelques conseils</title>
		<link>http://blog.dahanne.net/2011/11/19/securiser-son-serveur-dedie-quelques-conseils/</link>
		<comments>http://blog.dahanne.net/2011/11/19/securiser-son-serveur-dedie-quelques-conseils/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 16:03:35 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[apache2]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=571</guid>
		<description><![CDATA[<p>Assomption avant de commencer : Bien entendu, vous êtes à jour des derniers correctifs de sécurité de l&#8217;ensemble de vos services&#8230;</p> <p>En lisant un article faisant référence à un serveur mal sécurisé ; j&#8217;ai été pris de quelques doutes : et si mon serveur dédié était lui aussi mal sécurisé ? Étant développeur et adepte [...]]]></description>
			<content:encoded><![CDATA[<p><em>Assomption avant de commencer</em> : Bien entendu, <strong>vous êtes à jour des derniers correctifs de sécurité de l&#8217;ensemble de vos services&#8230;</strong></p>
<p>En lisant un article <a href="http://reflets.info/doxump-ca-sent-mauvais/">faisant référence à un serveur mal sécurisé</a> ; j&#8217;ai été pris de quelques doutes : et si mon serveur dédié était lui aussi mal sécurisé ?<br />
Étant développeur et adepte de l&#8217;auto hébergement (oui je ne suis pas un grand fan des services hébergés chez les géants du net avec leurs clauses de confidentialité obscures&#8230;) je fais évoluer mon serveur dédié (services qui tournent dessus) au rythme de mes besoins&#8230; ce qui fait que la sécurité passe souvent au second plan&#8230;<br />
Et rien de tel que de jeter un coup d’œil à la sécurisation de ces services de temps en temps&#8230;</p>
<h3>Audit rapide et efficace</h3>
<p>On commence avec nmap, avec les options qui vont bien :</p>
<pre class="bash">sudo nmap -A mon.serveurdedie.fr</pre>
<p>On peut alors commencer à l&#8217;analyse du résultat, et à remédier aux problèmes.</p>
<h3>DNS et Bind</h3>
<p>Dans le rapport obtenu par nmap, si vous voyez :</p>
<pre>| dns-zone-transfer:</pre>
<p>et ensuite la liste de vos sous domaines; méfiance, cela veut dire que quiconque peut lister vos sous domaines; pas forcément une bonne idée si certains d&#8217;entre eux sont là pour des tests ou pour des services non publics&#8230;</p>
<h4>Les solutions</h4>
<pre>Rendez vous dans votre fichier de configuration de bind, /etc/bind/named.conf.options, et ajouter les options suivantes :
 allow-transfer { x.x.x.x; }; --&gt; uniquement donner accès aux informations détaillées des zones à cette IP (votre dns secondaire)
 version "Ma version"; --&gt; pourrait derouter certaines attaques en offuscant la version de Bind; mais comme disent certains, l'obfuscation est rarement une bonne méthode de sécurisation...
 fetch-glue no; --&gt; défendre votre serveur dns aux attaques de type déni de service
 recursion no; --&gt; défendre votre serveur dns aux attaques de type déni de service</pre>
<p>Ces informations sont issues d&#8217;un <a href="http://www.techrepublic.com/article/secure-bind-with-these-tips/5716787">article de TechRepublic</a> , et n&#8217;hésitez pas à vérifier votre configuration avec <a href="http://www.zonecheck.fr/">zonecheck</a></p>
<h3>HTTP et Apache</h3>
<p>Dans le rapport obtenu par nmap, si vous voyez :</p>
<pre>80/tcp  open     http         Apache httpd 2.2.9 ((Debian) DAV/2 SVN/1.5.1 PHP/5.2.6-1+lenny13 with Suhosin-Patch mod_wsgi/2.5 Python/2.5.2)</pre>
<p>Et bien cela signifie que votre serveur est très bavard&#8230;</p>
<h4>La solution</h4>
<p>Sur Ubuntu, dirigez vous vers /etc/apache2/conf.d/security et éditez :</p>
<pre>ServerTokens Prod</pre>
<pre>ServerSignature Off</pre>
<pre>TraceEnable Off</pre>
<p>Si vous utilisez PHP, faites aussi un tour du côté de  /etc/php5/apache2/php.ini</p>
<pre>expose_php = Off</pre>
<p>Encore une fois, l’offuscation n&#8217;est pas une méthode de sécurisation en soit, mais moins les potentiels attaquants en savent, mieux c&#8217;est&#8230;<br />
Ces informations sont issues de <a href="http://www.debianadmin.com/apache-tipshide-apache-information-php-software-version.html">DebianAdmin</a></p>
<h3>SSH et OpenSSH</h3>
<p>Pour l&#8217;instant je ne peux que conseiller de lire cet article : <a href="http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html">http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html </a></p>
<p>à suivre&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2011/11/19/securiser-son-serveur-dedie-quelques-conseils/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating and applying a patch for an Eclipse project with Git</title>
		<link>http://blog.dahanne.net/2011/10/05/creating-and-applying-a-patch-for-an-eclipse-project-with-git/</link>
		<comments>http://blog.dahanne.net/2011/10/05/creating-and-applying-a-patch-for-an-eclipse-project-with-git/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 03:23:35 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=546</guid>
		<description><![CDATA[<p>Since its move to git, contributing to the Eclipse foundation projects is a bit different.</p> <p>Nothing terrible actually, let&#8217;s take the example of a contribution to the p2 project (part of the equinox umbrella at the Eclipse foundation)</p> Checkout the project git clone http://git.eclipse.org/gitroot/equinox/rt.equinox.p2.git do the changes and then commit them to your local repo [...]]]></description>
			<content:encoded><![CDATA[<p>Since its move to git, contributing to the Eclipse foundation projects is a bit different.</p>
<p>Nothing terrible actually, let&#8217;s take the example of a contribution to the p2 project (part of the equinox umbrella at the Eclipse foundation)</p>
<ul>
<li>Checkout the project</li>
</ul>
<pre class="bash">git clone http://git.eclipse.org/gitroot/equinox/rt.equinox.p2.git</pre>
<ul>
<li>do the changes and then commit them to your local repo (you can perform this step several times)</li>
</ul>
<pre class="bash">git commit</pre>
<ul>
<li>create the patch against the master branch</li>
</ul>
<pre class="bash">git format-patch origin</pre>
<p>You  will get a file for each commit you submitted, so one commit =  one patch file.</p>
<p>You can attach your patch(es) to a bugzilla entry, for example , <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304594">make p2 buildable with tycho (click on one of the patches)</a></p>
<ul>
<li>what an eclipse committer will do then , is apply your patch to its local repo to test everything is ok</li>
</ul>
<pre class="bash">git apply 0001-my-patch.patch</pre>
<p>That&#8217;s pretty much it ! A bit more tedious than a Github pull request, but it does the job !</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2011/10/05/creating-and-applying-a-patch-for-an-eclipse-project-with-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>NAS Synology : pour les sauvegardes et pour diffuser les médias</title>
		<link>http://blog.dahanne.net/2011/07/11/nas-synology-pour-les-sauvegardes-et-pour-diffuser-les-medias/</link>
		<comments>http://blog.dahanne.net/2011/07/11/nas-synology-pour-les-sauvegardes-et-pour-diffuser-les-medias/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 23:58:27 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=526</guid>
		<description><![CDATA[<p>Séduit par l&#8217;idée d&#8217;un boîtier pour effectuer mes sauvegardes à faible coût, faible consommation énergétique, faible encombrement, en ligne 24h/24, j&#8217;ai récemment fait l&#8217;acquisition d&#8217;un NAS (Network Attached Storage); et c&#8217;est assez naturellement que je me suis tourné vers Synology, un des (sinon le) incontournables du marché (l&#8217;utilisation de Linux BusyBox et d&#8217;une multitude de [...]]]></description>
			<content:encoded><![CDATA[<p>Séduit par l&#8217;idée d&#8217;un boîtier pour effectuer mes sauvegardes à faible coût, faible consommation énergétique, faible encombrement, en ligne 24h/24, j&#8217;ai récemment fait l&#8217;acquisition d&#8217;un <a href="http://fr.wikipedia.org/wiki/Stockage_en_r%C3%A9seau_NAS">NAS (Network Attached Storage)</a>; et c&#8217;est assez naturellement que je me suis tourné vers <a href="http://www.synology.com/index.php?lang=fre">Synology</a>, un des (sinon le) incontournables du marché (l&#8217;utilisation de Linux BusyBox et d&#8217;une multitude de logiciels libres n&#8217;y est sans doute pas pour rien !); j&#8217;ai opté pour le DS211J, qui dispose de 2 baies à disque SATA; pour l&#8217;instant je n&#8217;y aie inséré qu&#8217;un disque de 1.5 To.</p>
<p>Mon objectif premier est de réaliser des sauvegardes robustes, la cerise sur le gâteau (ou sundae) est le fait de pouvoir consulter mes fichiers multimédias sur mon téléviseur (via une vieille XBOX avec <a href="http://xbmc.org/">XBMC</a> et/ou une PS3)</p>
<h3>Architecture de sauvegarde robuste</h3>
<p>On réalise des sauvegardes, car on ne veut pas perdre des années de photo, de travail sur documents multimédia (montages vidéos) ses documents personnels (impôts, etc..).</p>
<p>La majorité des utilisateurs sauvegarde leurs fichiers vers un disque dur externe, quand ils y pensent&#8230;</p>
<p>Cette approche là est résolument insatisfaisante : il faut automatiser (fréquence) le processus de sauvegarde (donc avoir du matériel toujours disponible pour effectuer la sauvegarde) et aussi diversifier ses lieux de sauvegarde (tout sauvegarder sur des supports qui se trouvent au même endroit que les originaux ouvre la porte à une perte de donnés en cas d&#8217;inondation, incendie, cambriolage, etc&#8230;)</p>
<p>Je vais décrire ici comment utiliser un NAS Synology pour :</p>
<ul>
<li>y sauvegarder ses documents (les machines du réseau local, dans notre cas sous Ubuntu, vont sauvegarder vers le NAS)</li>
<li>synchroniser ces sauvegardes vers une machine distante (le NAS va synchroniser les sauvegardes vers une machine dans un data center)</li>
<li>y sauvegarder des sites internet et boîtes courriels hébergés sur un serveur distant (une machine dans un data center va sauvegarder ses données vers le NAS)</li>
</ul>
<p>Enfin, je décrirai quelques astuces pour profiter de son NAS en serveur multimédia.</p>
<h3>Sauvegarde entre les ordinateurs locaux et le NAS</h3>
<p>Il existe un excellent article qui introduit ce propos <a href="http://forum.synology.com/wiki/index.php/Backup_Linux_desktop_data_using_rsync">sur le wiki de Synology</a>; ceci dit la technique est la même que celle que <a href="http://blog.dahanne.net/2008/02/16/solution-de-sauvegarde-locale-et-distante-avec-rsync/">j&#8217;avais décrit pour des sauvegardes distantes</a>.</p>
<p>Mon objectif est ici de sauvegarder mon home directory (/home/anthony en excluant tous les .*) et rien d&#8217;autre<br />
Voici mes remarques et ajouts :</p>
<ul>
<li>Depuis l&#8217;interface graphique de votre NAS, rendez vous dans Panneau de configuration&gt;Utilisateur, sélectionnez votre utilisateur et appuyez et cocher &laquo;&nbsp;Accueil Utilisateur&nbsp;&raquo; (une traduction sympathique de Home directory :-p) , vous disposez maintenant d&#8217;un répertoire personnel dans /volume1/homes/votre_utilisateur</li>
<li>la première étape est la création d&#8217;une clef (DSA, c&#8217;est important, RSA n&#8217;a pas marché chez moi&#8230;) sans mot de passe; utilisez la série de commande standard suivantes, dans mon cas :</li>
</ul>
<p><code>ssh-keygen -t dsa -b 1024 -f ~/.ssh/diskstation</code></p>
<p>(pas de mot de passe, il serait difficile de gérer des sauvegardes non interactives avec un mot de passe, vérifiez quand même que votre clef .ssh/diskstation est en 600)</p>
<ul>
<li>Maintenant envoyer la clef publique à votre NAS :</li>
</ul>
<p><code>ssh-copy-id -i .ssh/diskstation.pub anthony@diskstation</code></p>
<ul>
<li>Tester la connexion à votre NAS en utilisant la clef : (attention, il est fort possible que votre utilisateur n&#8217;aie pas de shell utilisable par défaut; connectez vous alors via SSH en tant que root (même mot de passe que admin) à votre NAS et éditez /etc/passwd, sur la ligne correspondant à votre utilisateur, remplacez /sbin/login par /bin/ash ; l’interpréteur de commandes par défaut)</li>
</ul>
<p><code>ssh -i .ssh/diskstation diskstation</code></p>
<p>vous devriez arriver, sans mot de passe, dans le répertoire /volume1/homes/votre_utilisateur de votre NAS.</p>
<ul>
<li>rsync pour sauvegarder, la commande est assez simple :</li>
</ul>
<p><code>rsync -avz --delete /home/anthony/ --exclude=.* diskstation:/volume1/homes/anthony/sauvegarde</code></p>
<ul>
<li>sauf que le vrai défi avec les sauvegardes, c&#8217;est qu&#8217;il faut qu&#8217;elles soient automatiques, et lancées périodiquement ! ce bon vieux cron est encore une fois notre ami :</li>
</ul>
<p><code>vim sauvegarde.ssh</code></p>
<p>on y écrit :</p>
<pre class="bash">#!/bin/sh
rsync -avz --delete --exclude=.*  -e "ssh -i /home/anthony/.ssh/diskstation"   /home/anthony/  diskstation:/volume1/homes/anthony/x60s</pre>
<p><code>chmod +x</code></p>
<p>on peut tester :</p>
<p><code> ./sauvegarde.sh</code></p>
<p>et enfin le rajouter à la crontab :</p>
<p><code>sudo vim /etc/crontab</code></p>
<p>et rajouter la ligne (pour lancer la sauvegarde tous les Dimanche à 2h00) :</p>
<pre class="bash"># m h dom mon dow user  command
0 2    * * 7   anthony      /home/anthony/sauvegarde.sh</pre>
<ul>
<li>Répétez cette opération pour tous les postes du réseau local.</li>
</ul>
<p>Tout devrait bien se passer quotidiennement, à surveiller que tout est bien en place quand le disque dur de l&#8217;hôte commence à faire des bruits étranges ou avant de partir en congés&#8230;</p>
<h3>Sauvegarde entre le NAS et un serveur distant</h3>
<p>Le logiciel d&#8217;administration web des NAS Synology, Disk Station Manager (DSM 3.1 au moment où j&#8217;écris) dispose d&#8217;une efficace interface d’administration, qui comporte un volet &laquo;&nbsp;Restaurer et sauvegarder&nbsp;&raquo;; nous pourrions très bien faire comme précédemment pour sauvegarder le NAS vers un serveur distant, mais autant profiter de l&#8217;interface graphique et des notifications de DSM !</p>
<p>Pour commencer, vous devez préparer votre serveur distant à recevoir les sauvegardes, dans mon cas, nous avons un utilisateur backup, avec son répertoire personnel /home/backup</p>
<p>Dans ce même répertoire personnel, nous allons y créer un fichier rsyncd.conf avec le contenu suivant :</p>
<pre class="bash">[diskstation]
comment = diskstation
path = /home/backup/diskstation
use chroot = no
read only = no
list = yes
uid = sauvegarde
gid = sauvegarde
strict modes = yes
ignore errors = no
ignore nonreadable = yes
transfer logging = no
timeout = 600
refuse options = checksum dry-run
dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz</pre>
<p>Grâce à ce fichier, lorsque votre NAS fera ses sauvegardes, il trouvera la configuration rsync.</p>
<p>Côté client, donc le NAS, dirigez vous vers l&#8217;interface graphique &laquo;&nbsp;Restaurer et sauvegarder&nbsp;&raquo; et créez une nouvelle sauvegarde</p>
<ul>
<li>choisissez sauvegarde réseau (compatible rsync)</li>
<li>sélectionnez toutes les options SAUF l&#8217;avant dernière (réserver les fichiers; si vous la cochez, lorsque vous supprimerez un fichier/répertoire de la source il sera gardé sur le serveur)</li>
<li>choisissez le nom de module rsync que vous avez configuré sur votre serveur distant (dans notre cas diskstation) et saisissez l&#8217;utilisateur (dans notre cas backup) ainsi que son mot de passe</li>
<li>Testez la connexion, paramétrez la fréquence</li>
</ul>
<p>Et c&#8217;est fini !</p>
<h3>Sauvegarde entre un serveur distant et le NAS</h3>
<p>Dans ce cas ci, vous devez au préalable avoir un moyen d&#8217;identifier sur internet votre nas, par exemple, DSM vient avec un client DynDNS.</p>
<p>Dans la suite du paragraphe j&#8217;assume que vous avez un nom d&#8217;hôte fixe (ou une IP fixe) pour votre NAS, et que vous pouvez y accéder par internet (pour ceci vous devrez configurer aussi les bons port forwarding [seul ssh nous intéresse dans le cas présent] depuis votre routeur ou &laquo;&nbsp;box&nbsp;&raquo;)</p>
<p>Pour le reste, c&#8217;est la même chose que ce que j&#8217;ai décrit au chapitre &laquo;&nbsp;Sauvegarde entre les ordinateurs locaux et le NAS&nbsp;&raquo; &#8230;</p>
<p>La particularité que vous pourrez rencontrer, au cas où vous sauvegarder des répertoires qui appartiennent à plusieurs utilisateurs sur le serveur distant à sauvegarder vers le NAS, est de travailler avec l&#8217;utilisateur root : c&#8217;est le seul utilisateur à pouvoir accéder à tous le système de fichiers.</p>
<p>Donc</p>
<ul>
<li>côté NAS, créez un utilisateur backup, donnez lui un répertoire personnel et l&#8217;accès via SSH;</li>
<li>côté serveur distant à sauvegarder, créez un couple de clefs pour se connecter sans mot de passe au NAS, en tant que utilisateur backup, créez un script sauvegarde.sh, qui vous rentrerez dans la crontab, à lancer par root (il pourra donc travailler sur tout le système de fichiers)</li>
</ul>
<p>procéder de cette manière vous permet de pouvoir sauvegarder tout le système de fichiers, sans jamais compromettre l&#8217;utilisateur root (pas de connexion en tant que root, ni par SSH ni par sudo, etc&#8230;)</p>
<p>&nbsp;</p>
<h3>Astuces pour la performance de votre NAS Synology</h3>
<p>Si vous avez beaucoup de photos dans le partage &laquo;&nbsp;photo&nbsp;&raquo;, vous risquez de voir un process appelé &laquo;&nbsp;convert&nbsp;&raquo; (en fait c&#8217;est imagemagick) prendre tout la mémoire vive et une bonne partie du CPU de votre Synology.</p>
<p>Ce process est lancé par le démon suivant :</p>
<p><code>/usr/syno/etc/rc.d/S77synomkthumbd.sh</code></p>
<p>donc il vous suffit, une fois connecté par ssh en root (même mot de passe que admin une fois que l&#8217;accès ssh est configuré) de lancer :</p>
<p><code>/usr/syno/etc/rc.d/S77synomkthumbd.sh stop</code></p>
<p>Si vous voulez définitivement arrêter ce service, éditez le avec vim et rajouter exit à la 2ème ligne (<a href="http://forum.synology.com/wiki/index.php/How_to_disable_the_Synology_Multimedia_Indexing_Engine">cette astuce est publiée dans le wiki de synology</a>; attention à ne pas comme eux désactiver postgresql, toutes les applications multimédia : photo, son, video, téléchargements nécessitent cette base de donnée); attention quand vous remettrez votre NAS à jour, il faudra ré effectuer l&#8217;opération (sigh!)</p>
<p>&nbsp;</p>
<h3>Diffuser des fichiers vidéos hébergés par le NAS Synology</h3>
<p>Le plus simple, si vous disposez d&#8217;un lecteur branché à la TV qui peut naviguer sur des partages Samba/CIFS (comme la vieille XBOX avec XBMC), c&#8217;est alors de configurer un dossier partagé (par défaut, un dossier partagé est un partage SMB/CIFS) contenant vos vidéos.</p>
<p>Si vous utilisez une PS3, l&#8217;approche est différente, il faut utiliser le partage médias par DLNA (car la PS3 ne peut pas monter un partage SMB/CIFS)</p>
<p>Si vous configurez votre NAS comme étant un serveur DLNA, il vous suffit d&#8217;avoir vos videos dans le partage video pour que la PS3 puisse les lire&#8230;enfin çà va bien pour les formats (container, codes audio et video) que la PS3 reconnaît nativement&#8230;</p>
<p>Pour les autres formats de video, comme par exemple container MKV encapsulant du h264, votre PS3 vous dira &laquo;&nbsp;format de fichier non compatible&nbsp;&raquo;.</p>
<p>Deux options se présentent à vous :</p>
<ul>
<li>votre PS3 utilise un firmware &laquo;&nbsp;non officiel&nbsp;&raquo;comme le CFW 3.55 kmeaw, dans ce cas vous pouvez installer le logiciel de lecture<a href="https://www.lonelycoder.com/hts/showtime_overview.html"> Showtime sur votre PS3</a>, qui non seulement lit les partages DLNA, mais est capable aussi d&#8217;ouvrir à peu près tous les containeurs vidéo et recense un bon nombre de codecs..(il repose sur libav)</li>
<li>Une autre approche, est de convertir à la volée vos fichiers vidéos dans un format que la PS3 peut ouvrir, le logiciel <a href="http://forum.synology.com/enu/viewtopic.php?f=37&amp;t=13014">PS3 Media Player semble pouvoir être installable sur un NAS Synology</a>, ceci dit je n&#8217;ai pas essayé&#8230;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2011/07/11/nas-synology-pour-les-sauvegardes-et-pour-diffuser-les-medias/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EclipseCon 2011 blog posts : talks I attended</title>
		<link>http://blog.dahanne.net/2011/04/13/eclipsecon-2011-blog-posts-talks-i-attended/</link>
		<comments>http://blog.dahanne.net/2011/04/13/eclipsecon-2011-blog-posts-talks-i-attended/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 03:09:52 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[eclipsecon2011]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=521</guid>
		<description><![CDATA[<p>From the 21st to the 24th of March, 2011, I was a lucky attendee of EclipseCon 2011.</p> <p>Lucky because it was my first time at EclipseCon, my first major conference in North America (it was located in Santa Clara, in the Californian Silicon Valley) and also because my employer, Compuware, agreed to let me go [...]]]></description>
			<content:encoded><![CDATA[<p>From the 21st to the 24th of March, 2011, I was a lucky attendee of <a href="http://www.eclipsecon.org/2011/">EclipseCon 2011</a>.</p>
<p>Lucky because it was my first time at EclipseCon, my first major conference in North America (it was located in Santa Clara, in the Californian Silicon Valley) and also because my employer,<a href="http://www.compuware.com/"> Compuware</a>, agreed to let me go there, along with 2 of my colleagues.</p>
<p>EclipseCon 2011 was great, because</p>
<ul>
<li>the main actors of the Eclipse community were there : people I may follow on twitter or ask questions to on several mailing lists; the committers of the projects I use everyday at work; being able to chat with them and ask them questions (even harass them ! no I&#8217;m kidding, I did not harass Jeff during 2 days! )</li>
<li>the talks were diversified and most of them were really interesting, you have below links to some of the talks I attended while there.</li>
</ul>
<p>Attending this conference made me also realize, maybe once more, that meeting with other developers working on the same technologies, is really inspiring, motivating, and it makes you grow technically.</p>
<p>Ok, you got the picture, I enjoyed the conf !</p>
<p>Here are some of the talks I attended:</p>
<ul>
<li>Under the provisioning (p2) and release engineering themes,</li>
</ul>
<ol>
<li><a title="Permanent Link to p2, your savior or your achilles heel? Everything an Eclipse team needs to know about p2 at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/22/p2-your-savior-or-your-achilles-heel-everything-an-eclipse-team-needs-to-know-about-p2-at-eclipsecon-2011/">p2, your savior or your Achilles heel? Everything an Eclipse team needs to know about p2 at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Discovering the P2 APIs at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/22/discovering-the-p2-apis-at-eclipsecon-2011/">Discovering the P2 APIs at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Tycho presentation and tutorial at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/21/tycho-presentation-and-tutorial-at-eclipsecon-2011/">Tycho presentation and tutorial at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Next Generation Development Infrastructure: Maven, m2eclipse, Nexus &amp; Hudson at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/22/next-generation-development-infrastructure-maven-m2eclipse-nexus-hudson-at-eclipsecon-2011/">Next Generation Development Infrastructure: Maven, m2eclipse, Nexus &amp; Hudson at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Growing an open source project one bugday at a time at EclipseCon 2011" rel="bookmark" href="../2011/03/22/growing-an-open-source-project-one-bugday-at-a-time-at-eclipsecon-2011/">Growing an open source project one bugday at a time at EclipseCon 2011</a></li>
</ol>
<ul>
<li>Under the architecture ,  performance and OSGI themes,</li>
</ul>
<ol>
<li><a title="Permanent Link to Stop the Architecture Erosion of Eclipse And Open Source Projects at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/24/stop-the-architecture-erosion-of-eclipse-and-open-source-projects-at-eclipsecon-2011/">Stop the Architecture Erosion of Eclipse And Open Source Projects at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Using and Extending Memory Analyzer into Uncharted Waters at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/23/using-and-extending-memory-analyzer-into-uncharted-waters-at-eclipsecon-2011/">Using and Extending Memory Analyzer into Uncharted Waters at EclipseCon 2011</a></li>
<li><a title="Permanent Link to OSGi introduction and OSGi 4.3 at EclipseCon2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/21/osgi-introduction-and-osgi4-3-at-eclipsecon2011/">OSGi introduction and OSGi 4.3 at EclipseCon2011</a></li>
<li><a title="Permanent Link to 10 signs you’re doing OSGi wrong at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/22/10-signs-youre-doing-osgi-wrong-at-eclipsecon-2011/">10 signs you&#8217;re doing OSGi wrong at EclipseCon 2011</a></li>
</ol>
<ul>
<li>Under the Eclipse tooling theme,</li>
</ul>
<ol>
<li><a title="Permanent Link to Android Development with Eclipse at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/22/android-development-with-eclipse-at-eclipsecon-2011/">Android Development with Eclipse at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Getting Eclipse Preferences Under Control in Teams at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/24/eclipse-preferences-under-control-in-teams-at-eclipsecon-2011/">Getting Eclipse Preferences Under Control in Teams at EclipseCon 2011</a></li>
</ol>
<ul>
<li>Other really cool talks</li>
</ul>
<ol>
<li><a title="Permanent Link to Keynote on Apache Hadoop at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/24/keynote-on-apache-hadoop-at-eclipsecon-2011/">Keynote on Apache Hadoop at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Virgo and RT playing together at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/23/virgo-and-rt-playing-together-at-eclipsecon-2011/">Virgo and RT playing together at EclipseCon 2011</a></li>
<li><a title="Permanent Link to Effective Git tutorial at EclipseCon 2011" rel="bookmark" href="http://blog.dahanne.net/2011/03/21/effective-git-tutorial-at-eclipsecon-2011/">Effective Git Tutorial</a></li>
</ol>
<p>If you want my opinion, well, I&#8217;d say that Tycho, p2, Virgo, git along with gerrit, and Eclipse Memory Analyzer were predominant topics; you could definitely not ignore them.. and not like them neither !</p>
<p>If you did not, you&#8217;ll hear from these great technologies in the next few months !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2011/04/13/eclipsecon-2011-blog-posts-talks-i-attended/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keynote on Apache Hadoop at EclipseCon 2011</title>
		<link>http://blog.dahanne.net/2011/03/24/keynote-on-apache-hadoop-at-eclipsecon-2011/</link>
		<comments>http://blog.dahanne.net/2011/03/24/keynote-on-apache-hadoop-at-eclipsecon-2011/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 00:33:14 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[eclipsecon2011]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=486</guid>
		<description><![CDATA[<p>Todd introduces the audience to the world of huge datasets, what you can do with it, profiling users and customers for example.</p> <p>False assumptions learned in the last 10 years (that Hadoop has been building with this in mind)</p> Machines are reliable, Hadoop separates fault tolerance logic from code logic Machines deserve identities, I put [...]]]></description>
			<content:encoded><![CDATA[<p>Todd introduces the audience to the world of huge datasets, what you can do with it, profiling users and customers for example.</p>
<p>False assumptions learned in the last 10 years (that Hadoop has been building with this in mind)</p>
<ol>
<li>Machines are reliable, Hadoop separates fault tolerance logic from code logic</li>
<li>Machines deserve identities, I put data in a cluster, I don&#8217;t care which particular machine hosts the data; Hadoop can swap in and swap out machines across the cluster</li>
<li>Your analysis fits on one machine, Hadoop scales linearly with data size or analysis complexity</li>
</ol>
<p>A typical Hadoop installation : 5 to 4000 commodity servers (8 cores, 24 GB RAM, 4 to 12 TB hard drive; 2 levels network architecture, 20 to 40 nodes per rack)</p>
<p>The cluster nodes are composed of m</p>
<ul>
<li>master nodes : 1 NameNode  (metadata) and 1 jobtracker</li>
<li>slaves nodes  (1 to 4000 each) data nodes and tasktrackers</li>
</ul>
<p>To access the file system, you would not mount it (even if you could, with fuse), you can use an API, HDFS API (in Java)</p>
<p>Hadoop will write on chunks of 64 MB, which will get replicated across the nodes.</p>
<p>Using HDFS, you will use 2 functions : map() and reduce(); they are run on the node containing the data, so no network overhead to get the info, but HDFS can interpret bytes as key; then reduce is used to aggregate the value.</p>
<p>Hadoop is not only map/reduce, with Hive, you can also use SQL; but there are other tools on top of Hadoop, Pig (DataFlow) or Sqoop (RDBMS compatibilty)</p>
<p>Who uses Hadoop : Yahoo (&gt;82 PB, &gt;40 k machines); FaceBook, 15 TB data/day, 1200 machines; Twitter, etc&#8230;</p>
<p>Mozilla uses Hadoop to analyze crash data (FF crashes, you send a report, and they get and analyze the data)</p>
<p>Hadoop Java brings some good tooling (along with integration tools such as Apache, Ivy, etc..) but some bad things such as JVM bugs, JNI libraries to add for non standard features (specific to the OS)</p>
<p><a href="http://www.eclipsecon.org/2011/sessions/?page=sessions&amp;id=2370">http://www.eclipsecon.org/2011/sessions/?page=sessions&amp;id=2370</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2011/03/24/keynote-on-apache-hadoop-at-eclipsecon-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Effective Git tutorial at EclipseCon 2011</title>
		<link>http://blog.dahanne.net/2011/03/21/effective-git-tutorial-at-eclipsecon-2011/</link>
		<comments>http://blog.dahanne.net/2011/03/21/effective-git-tutorial-at-eclipsecon-2011/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 00:45:08 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[eclipsecon2011]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=430</guid>
		<description><![CDATA[<p>First of all, we had to prepare our desktop, using those instructions, which I did, one day ahead of the conference, using the official Egit repo (Egit 0.11.3) and eclipse 3.6.2.</p> <p>Four presenters were present : Stefan Lay, Shawn Pearce, Matthias Sohn and Chris Aniszczyk.</p> Presentation <p>They began with a very quick  presentation of Git, [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, we had to prepare our desktop, using <a href="https://docs.google.com/document/d/1Uxq59vCcWqK-hPb5CHQcR97AmJehj6Rn0ScTnih2tyU/edit?hl=en#">those instructions</a>, which I did, one day ahead of the conference, using the official Egit repo (Egit 0.11.3) and eclipse 3.6.2.</p>
<p>Four presenters were present : Stefan Lay, Shawn Pearce, Matthias Sohn and Chris Aniszczyk.</p>
<h2>Presentation</h2>
<p>They began with a very quick  presentation of Git, that they defined as a tool to facilitate code review, and then Git at Eclipse</p>
<ul>
<li>a roadmap has been defined to move to git</li>
<li>CVS is being deprecated</li>
</ul>
<p>They defined what is a modern code review and its benefits</p>
<ul>
<li>when a developer writes code, another checks it</li>
<li>4 eyes catch more bugs</li>
<li>mentoring of new developers</li>
<li>establish trust relationships</li>
<li>good alternative to pair programming</li>
<li>coding standards</li>
</ul>
<p>Git sits between the developer desktop and the CI machine : as a tool to review code and accept changes</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/IMG_9608.jpg"><img class="alignnone size-medium wp-image-432" title="Effective Git tutorial at EclipseCon 2011" src="http://blog.dahanne.net/wp-content/uploads/IMG_9608-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h2>Tutorial</h2>
<p>For the tutorial, I chose the HTTP protocol rather than SSH, to make sure I would not suffer from any eventual proxies.</p>
<p>When cloning the sample git repository, I noticed that you can specify another destination folder than your current workspace directory, Stefan mentioned it is to allow you to have your git repo not deleted when you delete your workspace&#8230; (anyway, you can also clone to your workspace, just as with Subversion)</p>
<ul>
<li>First connection test</li>
</ul>
<p>right click : team-&gt;remote-&gt;configure push to upstream&#8230;, and then add refs/for/master in the ref spec (or else it will try to push to the master repo); the magic Ref refs/for/master represents the Gerrit code review queue for the master branch on the server.</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/Capture-Configure-push-.png"><img class="alignnone size-medium wp-image-433" title="Capture-Configure push" src="http://blog.dahanne.net/wp-content/uploads/Capture-Configure-push--300x261.png" alt="" width="300" height="261" /></a></p>
<p>Then click save and push, it will fail because there were no changes; but you just had the opportunity to check your settings are ok.</p>
<h2>Exercises :</h2>
<p><a href="https://docs.google.com/?tab=mo&amp;authuser=0#folders/folder.0.0B4F_gjXVrHZVMzE5MWNmNjktMDcxMS00NDM3LWI4NDQtYmE1YzZkM2RkY2Rl">All the exercises are described here.</a></p>
<p>During those exercises, we created a local change, then submit it for a review in gerrit.</p>
<p>Just after sending my changes, Hudson was triggered to launch a build against my local branch that I just committed.</p>
<p>Then, the build passed (alright !) and it was really fun since people in the room would review my changes with comments; finally someone approved my changes and my changes were merged into the master branch.</p>
<p>Other exercises implied more advanced workflow such a submitting other change sets and registering projects to monitor, but I did not have time to do them all; actually I strongly advise anyone wanting to try gerrit out to complete those exercises. (you will have to do them with a friend, since someone will have to accept your changes <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Actually, I was really impressed with this tool : it really changed the perception I had of code review (with patches sent via email + code review on the desktop of the co worker); just letting the developer do all the changes he want, then see Hudson builds his changes, ask a reviewer (or a reviewer adds himself to the bug), see the file to file comparison, the comments in the gerrit web interface&#8230; I&#8217;m totally convinced !!! Social coding for real !</p>
<p>I had a chat during this session with Shawn Pearce, from Google, the actual author and main contributor of Gerrit; he explained to me how people and organizations (including Google developers) were hooking Gerrit with Mylin, IRC, Hudson; for now using SSH and the web UI, but he told me a web service interface (based on REST) was on his mind; to ease integration with external tools; as for the authentication, he told me that Gerrit could be linked with Bugzilla and being part of a SSO scheme , using your enterprise LDAP for example</p>
<p>I did not expect so much from this git and gerrit tooling, you got to see it to believe its awesomeness !!!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2011/03/21/effective-git-tutorial-at-eclipsecon-2011/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ReGalAndroid : the work behind the scenes</title>
		<link>http://blog.dahanne.net/2011/03/18/regalandroid-the-work-behind-the-scenes/</link>
		<comments>http://blog.dahanne.net/2011/03/18/regalandroid-the-work-behind-the-scenes/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 03:05:58 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=410</guid>
		<description><![CDATA[<p>On Tuesday 21st of December 2010, I officially launched ReGalAndroid, the follow up of G2Android, aiming at providing G3 and Piwigo support.</p> <p>This article explains why I decided to create a new project, and also what I did differently for this new Android app.</p> Why creating a new project ? <p>First of all, the name [...]]]></description>
			<content:encoded><![CDATA[<p>On Tuesday 21st of December 2010, I officially launched <a href="http://code.google.com/p/regalandroid/">ReGalAndroid</a>, the follow up of <a href="http://code.google.com/p/g2android/">G2Android</a>, aiming at providing <a href="http://gallery.menalto.com/gallery_3.0.1_released">G3</a> and <a href="http://piwigo.org/">Piwigo</a> support.</p>
<p>This article explains why I decided to create a new project, and also what I did differently for this new Android app.</p>
<h3>Why creating a new project ?</h3>
<p>First of all, the name of the app (g2android) did not reflect what I wanted it to be: I wanted it not to be specific to a gallery type (G2) but also compatible with G3 and Piwigo.<br />
In the android world, an app is defined by its package name; since I wanted to change from net.dahanne.android.g2android to the new name net.dahanne.android.regalandroid I had to create a new app.<br />
Sure, I could have keep on using the old package name, but it did not make sense, and also I wanted to start refactoring the app modularizing it.</p>
<h3>Modularizing an Android app, using maven-android-plugin</h3>
<p>In G2Android, one of the things that frustrated me most was the way it  was built : it had dependencies on libraries (jars) not part of the  android runtime. So I had to include them in a lib directory; adding  them to the classpath so that the Android Developer tools knew that  G2Android needed them.<br />
Another problem was the modularity of the application : the Gallery2  client API code was mixed with the Android UI code; it could become a  nightmare for testing, as for plain Junit test cases, I had to remove  the android.jar lib from my classpath (and Android integration testing  was not an option as it takes really too long to launch; and does not  make sense to test an HTTP client api&#8230;)<br />
Starting ReGalAndroid, the first thing I did was modularizing the  application :</p>
<ul>
<li>one standard jar maven project for the commons classes (Pictures,  Albums, etc..) with its regular Junit tests</li>
</ul>
<ul>
<li>one standard jar maven project for each gallery client java api (one  for G2 extracted from g2android, and 2 new ones, one for G3 from  scratch, and one for Piwigo extracted from Jiwigo, an existing Java  Swing client for Piwigo) with their regular Junit tests</li>
</ul>
<ul>
<li>one android maven project with only android related classes, this project heavily depends on the common module and the 3 gallery implementations; this has been possible thanks to the <a href="http://code.google.com/p/maven-android-plugin/">maven android plugin</a></li>
</ul>
<p>To ease the process inside Eclipse, you can use <a href="http://code.google.com/a/eclipselabs.org/p/m2eclipse-android-integration/">Maven Integration for Android Development Tools</a> , it will allow you to launch your Android application from the IDE, just the same as before.</p>
<p>This way, I am now able to test the remote API implementations independently of the main Android app; and also if someone wants to reuse those implementations for any other Java projects, he can just check out those plain java projects.</p>
<h3>Logging an android app using slf4j-android</h3>
<p>If your Android application depends on plain java projects; those projects certainly do not use Android logging framework.</p>
<p>So if you want to log all your modules in your android app, you can use <a href="http://www.slf4j.org/">slf4j</a> : this is meta API where you can choose at compile time which logging API you will use.</p>
<p>For example, in all the logged classes of ReGalAndroid, I&#8217;m depending on org.slf4j.Logger and org.slf4j.LoggerFactory , even in the Android module.</p>
<p>But in my maven dependencies; I tell my android module to depend on slf4j-android :</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.slf4j<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>slf4j-android<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.6.1-RC1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>compile<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>That way, each call to LoggerFactory.getLogger(My.class)  in any of my modules will be wrapped to the android.util.log APIs</p>
<p>Cool thing is, if anyone wants to use any of the remote gallery implementations (G2, G3 or Piwigo client) in its Java app, he will be able to use Log4J or logback, or any other slf4j bridge he wants !</p>
<h3>Moving from Google code to GitHub for code hosting</h3>
<p>I&#8217;m quite satisfied with Google Code hosting; in fact I still use it as a wiki and a bug tracker; the truth, I wanted to become familiar with Git, to test its benefits.</p>
<p>As I was not starting from scratch, I wanted to be able to keep the history of my project</p>
<p>There is an easy way to do so in GitHub : create a new project, and then select &#8216;Importing a Subversion repo&#8217;; but unfortunately, it did not keep track of all my tags; so I chose to go with the manual way.</p>
<h4>Export google code svn repo to a local git repo</h4>
<p>I use this utility called svn2git, I had to check out from GitHub : <a href="http://github.com/nirvdrum/svn2git">svn2git</a></p>
<p>It is written in Ruby, so you have to make sure you have ruby and rubygems installed.</p>
<p>Then, according to your gems directory, you can run it :</p>
<p>/var/lib/gems/1.8/bin/svn2git https://g2android.googlecode.com/svn/  &#8211;verbose</p>
<p>All the svn tags are imported as git tags (git tag to check all the tags are there) but the authors are not imported (&laquo;&nbsp;(no author) author not found in authors.txt)</p>
<p>To manually change the authors name, I found the solution reading <a href="http://stackoverflow.com/questions/750172/how-do-i-change-the-author-of-a-commit-in-git">this post</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> filter-branch <span style="color: #660033;">-f</span> <span style="color: #660033;">--env-filter</span> <span style="color: #ff0000;">&quot;GIT_AUTHOR_NAME='Newname';  GIT_AUTHOR_EMAIL='newemail'; GIT_COMMITER_NAME='Newname';  GIT_COMMITTER_EMAIL='newemail';&quot;</span> HEAD <span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">/</span>code<span style="color: #000000; font-weight: bold;">&amp;</span>gt;</pre></div></div>

<p>From now on, you have a local git repo with all your code  from your SVN (including the tags !) in a local git repo; let&#8217;s share this one !</p>
<p>First create a new repo on github (using the web interface), then set your local repo as the origin :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> remote add origin <span style="color: #c20cb9; font-weight: bold;">git</span><span style="color: #000000; font-weight: bold;">@</span>github.com:anthonydahanne<span style="color: #000000; font-weight: bold;">/</span>ReGalAndroid.git</pre></div></div>

<p>Finally,<a href="http://help.github.com/remotes/"> sync the local and remote , including the tags of the master branch</a> :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> push origin master <span style="color: #660033;">--tags</span></pre></div></div>

<p>And youŕe done migrating from Google code SVN to GitHub !</p>
<h3>Migrating your users from a previous android app to a new one</h3>
<p>The problem when you&#8217;re creating a new android application to replace a previous one, is that the users having the old app installed on their phone will not be notified of the availability of the new one, since the package name of your new application (referenced in your AndroidManifest.xml file) is different :</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;manifest</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">package</span>=<span style="color: #ff0000;">&quot;net.dahanne.android.g2android&quot;</span> <span style="color: #000066;">android:versionCode</span>=<span style="color: #ff0000;">&quot;15&quot;</span> <span style="color: #000066;">android:versionName</span>=<span style="color: #ff0000;">&quot;1.6.3&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;manifest</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">package</span>=<span style="color: #ff0000;">&quot;net.dahanne.android.regalandroid&quot;</span> <span style="color: #000066;">android:versionCode</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">android:versionName</span>=<span style="color: #ff0000;">&quot;1.0.1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Then the market you&#8217;re using (let&#8217;s say Android Market) is not aware of your new application replacing the previous one.</p>
<p>For the particular case of the migration from G2Android to ReGalAndroid, I first, during a month, advertised the new app on Twitter, and on the dedicated G2, G3 and Piwigo forums and websites; so that I could have some early adopters.</p>
<p>Then, in a second step, to accelerate the migration, I updated G2Android, with a new activity, launched by default on startup to tell the user that the application is not maintained anymore and that he should tap on the button to download the new application.<br />
<a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/src/net/dahanne/android/g2android/activity/FirstTime.java">Here is the source code to redirect users from the old android app to the new one</a></p>
<p>At the time of writing this blog post, here are the statistics reported by Android market about both apps :<br />
<a href="http://blog.dahanne.net/wp-content/uploads/android_market_17_03_2011.png"><img class="alignnone size-medium wp-image-416" title="android_market_17_03_2011" src="http://blog.dahanne.net/wp-content/uploads/android_market_17_03_2011-300x47.png" alt="" width="300" height="47" /></a><br />
It means that the migration is quite slow, since many users still have the old application installed on their phones; I may remove the old app from the market in the next few months to make sure they do not use it anymore (please note that  <a href="http://code.google.com/p/regalandroid/downloads/list">ReGalAndroid is also available via other markets and also via direct download</a>)</p>
<h3>The final words</h3>
<p>The application is open source and if I receive many issues and functional requirements via the <a href="http://code.google.com/p/regalandroid/issues/list">ReGalAndroid bug tracker</a> (and I thank the users for that, it clearly influences the path the application is taking) I would love to see new contributors and committers add some code <a href="http://github.com/anthonydahanne/ReGalAndroid">(see the ReGalAndroid github repository)</a>; because this is before all what makes the app <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2011/03/18/regalandroid-the-work-behind-the-scenes/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hosting a new maven project on Github, g3-java-client, a Gallery3 remote client library</title>
		<link>http://blog.dahanne.net/2010/09/20/hosting-a-new-maven-project-on-github-g3-java-client-a-gallery3-remote-client-library/</link>
		<comments>http://blog.dahanne.net/2010/09/20/hosting-a-new-maven-project-on-github-g3-java-client-a-gallery3-remote-client-library/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 04:13:58 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=396</guid>
		<description><![CDATA[<p>I finally started a java library to implement Gallery3 REST remote API; g3-java-client (the name is not really original huh ?!)</p> <p>Here are the steps I followed to create this project.</p> The technical choices <p>Creating this project, I wanted a lightweight Java library, easily embeddable in an Android application  (G2Android not to name it, a [...]]]></description>
			<content:encoded><![CDATA[<p>I finally started a java library to implement <a href="http://codex.gallery2.org/Gallery3:API:REST">Gallery3 REST remote API</a>; <a href="http://github.com/anthonydahanne/g3-java-client">g3-java-client</a> (the name is not really original huh ?!)</p>
<p>Here are the steps I followed to create this project.</p>
<h3>The technical choices</h3>
<p>Creating this project, I wanted a lightweight Java library, easily embeddable in an Android application  (<a href="http://code.google.com/p/g2android/">G2Android not to name it, a Gallery2 client for Android</a>).</p>
<p>So I carefully designed my dependencies, in order to leverage Android already included libraries, such as Apache Http Client, org.json packages (by the way I initially wanted to use the jersey REST client API, but&#8230; I wanted to stay as close as possible to the Android platform&#8230;)</p>
<p>Finally, I&#8217;m developing this library using <a href="http://en.wikipedia.org/wiki/Test-driven_development">TDD</a>, and <a href="http://maven.apache.org/">Maven as a CI tool</a> :  I want a really reliable library, for 2 reasons : because it is motivating to create quality code, and also it is really painful to test an android application (you have to start an emulator or AVD and deploy the binary each time you launch a test, and each of these steps can take time) .</p>
<h3>The licensing</h3>
<p>I chose GPL v3 to make sure my work remains open source and not used in any commercial projects.</p>
<p>I&#8217;m using <a href="http://code.google.com/p/maven-license-plugin/wiki/HowTo">maven-license-plugin</a> to add the license to the source files.</p>
<h3>The hosting</h3>
<p>I chose <a href="http://github.com/">Github</a>, mainly because I wanted to get familiar with git : I have heard so many people happy using Git instead of SVN,  and I also wanted to be able to switch easily from trunk to another branch&#8230; sounded appealing to me !</p>
<p>To tag the sources, I decided to follow<a href="http://ulrichinaction.blogspot.com/2010/08/releaser-avec-maven-sur-github.html"> Ulrich&#8217;s steps using mvn-release-plugin to tag every new release</a> (in French, <a href="http://www.sonatype.com/people/2009/09/maven-tips-and-tricks-using-github/">but you can follow this link to have an equivalent article in English</a>)</p>
<p>And to host the binaries, <a href="http://cemerick.com/2010/08/24/hosting-maven-repos-on-github/">I created a maven repo out of  a new Github project following Chas&#8217;tutorial</a>; sure I could have asked <a href="https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide">to host my project on Sonatype&#8217;s Nexus for Open Source Software</a>, but as the project is actually really young, I prefer to use <a href="http://github.com/anthonydahanne/m2repo">my own repo</a>; I guess later on I&#8217;ll switch to this better solution.</p>
<h3>The commands used</h3>
<p>If I had to initialize the workspace from another computer, I would type the following commands :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> g3-java-client
<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>github.com:anthonydahanne<span style="color: #000000; font-weight: bold;">/</span>g3-java-client.git
<span style="color: #7a0874; font-weight: bold;">cd</span> g3-java-client<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #666666; font-style: italic;">#to make sure everything (compilation, testing) is ok</span>
mvn clean <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #666666; font-style: italic;">#to add the license header to the source files</span>
mvn license:check
mvn license:format
<span style="color: #666666; font-style: italic;">#to commit the changes to github</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-a</span> <span style="color: #660033;">-m</span> <span style="color: #ff0000;">'commit message'</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> push origin master
<span style="color: #666666; font-style: italic;">#to release a new version  (be careful there is no file named release.properties at the root of the project)</span>
mvn release:prepare</pre></div></div>

<p>We just added the license info, committed the snapshot version , committed the stable version and also created a new branch (mvn release:prepare)</p>
<p>Now, we can deploy it to a maven repo</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#to deploy the current version to a repository on my local file system :</span>
mvn <span style="color: #660033;">-DaltDeploymentRepository</span>=snapshot-repo::default::<span style="color: #c20cb9; font-weight: bold;">file</span>:..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>m2repo<span style="color: #000000; font-weight: bold;">/</span>snapshots clean deploy
<span style="color: #666666; font-style: italic;">#to commit this repo to github (I created this Github repo to serve as a maven repo http://github.com/anthonydahanne/m2repo)</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>m2repo<span style="color: #000000; font-weight: bold;">/</span>snapshots
<span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-a</span> <span style="color: #660033;">-m</span> <span style="color: #ff0000;">'new snapshot for g3-java-client'</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> push origin master</pre></div></div>

<p>Pretty clear and easy right ? (except the deploy phase&#8230;) all of this thanks to Maven and my <a href="http://github.com/anthonydahanne/g3-java-client/blob/master/pom.xml">pom configuration</a>.</p>
<h3>What&#8217;s next ?</h3>
<p>First, finish implementing all the Gallery3 REST remote API commands; and then, create a new android project (G3Android ?!) to consume this library; using &#8230; <a href="http://code.google.com/p/maven-android-plugin/">maven-android-plugin</a> of course !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2010/09/20/hosting-a-new-maven-project-on-github-g3-java-client-a-gallery3-remote-client-library/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>G2Android 1.5.0 is available : major release !</title>
		<link>http://blog.dahanne.net/2010/07/20/g2android-1-5-0-is-available-major-release/</link>
		<comments>http://blog.dahanne.net/2010/07/20/g2android-1-5-0-is-available-major-release/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 13:09:29 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=368</guid>
		<description><![CDATA[<p>Finally ! During a long period of calm, I finally released a new version (with new features) of the Android client for remote galleries Gallery2 (your photos on your website), G2Android. If you have a look at the G2Android project homepage, you will see that the following issues (bug and enhancements) have been closed : [...]]]></description>
			<content:encoded><![CDATA[<p>Finally !<br />
During a long period of calm, I finally released a new version (with new features) of the Android client for remote galleries Gallery2 (your photos on your website), G2Android.<br />
If you have a look at the <a href="http://code.google.com/p/g2android/"> G2Android project homepage</a>, you will see that the following issues (bug and enhancements) have been closed :<br />
Version 1.5.0, 19th of July 2010 Major release</p>
<ul>
<li>issue #33  Enable uploaded photo title modification</li>
<li>issue #41  Malformed Gallery 2 URL leads to G2Android forced close</li>
<li>issue #37  Uploaded photo looses .jpg file extension</li>
<li>issue #42  Feature Suggestion: Provide automatic login when started</li>
<li> issue #20  Share via camera app?</li>
<li>issue #15  Enhancement: Add multiple photo uploading </li>
</ul>
<p>The major new feature is clearly the &laquo;&nbsp;add photo to gallery&nbsp;&raquo; feature : I created a new Activity, <a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/src/net/dahanne/android/g2android/activity/UploadPhoto.java">UploadPhoto</a> , which can be called from 2 external intents : </p>
<p><a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/AndroidManifest.xml">AndroidManifest.xml </a></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activity</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;.activity.UploadPhoto&quot;</span> <span style="color: #000066;">android:label</span>=<span style="color: #ff0000;">&quot;@string/upload_photo_title&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;intent</span> -filter<span style="color: #000000; font-weight: bold;">&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.action.SEND&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.action.SEND_MULTIPLE&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.category.DEFAULT&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">android:mimeType</span>=<span style="color: #ff0000;">&quot;image/*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/intent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activity<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>So now the user can send a new photo or a batch of photos from another application, the android gallery app for example; the big work was then to decode the URIs of the photos to find the photo file on the phone, and then send it to the gallery; also I had to make sure that the user is still connected to the gallery, if not, he must login again.</p>
<p>Also, the user is now able to take a picture and send it to his gallery, without leaving g2android; this has been done adding the camera permission in the <a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/AndroidManifest.xml">AndroidManifest.xml </a>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;uses</span> -permission <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.permission.CAMERA&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/uses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This is the easy part <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Then, when your app receive a photo from the Camera, it does not receive an URI pointing to a photo file; nope, you get a Bitmap  object you have transform into a file, to be able to send it to the remote gallery : </p>
<p><a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/src/net/dahanne/android/g2android/activity/UploadPhoto.java">UploadPhoto</a></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">                                                Bundle extras <span style="color: #339933;">=</span> intent.<span style="color: #006633;">getExtras</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                Bitmap bm <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                                                <span style="color: #003399;">Object</span> o <span style="color: #339933;">=</span> extras.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;data&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>o <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> o <span style="color: #000000; font-weight: bold;">instanceof</span> Bitmap<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                                        bm <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Bitmap<span style="color: #009900;">&#41;</span> o<span style="color: #339933;">;</span>
                                                        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
                                                                StringBuilder stringBuilder <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilder.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span>Settings
                                                                                .<span style="color: #006633;">getG2AndroidPath</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilder.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                StringBuilder stringBuilderFileName <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> StringBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilderFileName.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilderFileName
                                                                                .<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">System</span>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilderFileName.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                stringBuilder.<span style="color: #006633;">append</span><span style="color: #009900;">&#40;</span>stringBuilderFileName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                imageFromCamera <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">File</span><span style="color: #009900;">&#40;</span>
                                                                                stringBuilder.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                <span style="color: #003399;">FileOutputStream</span> fos <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileOutputStream</span><span style="color: #009900;">&#40;</span>
                                                                                imageFromCamera<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                bm.<span style="color: #006633;">compress</span><span style="color: #009900;">&#40;</span>CompressFormat.<span style="color: #006633;">JPEG</span>, <span style="color: #cc66cc;">100</span>, fos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                fos.<span style="color: #006633;">flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                fos.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                                                                mImageUri<span style="color: #339933;">=</span>Uri.<span style="color: #006633;">fromFile</span><span style="color: #009900;">&#40;</span>imageFromCamera<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                                fileName <span style="color: #339933;">=</span> stringBuilderFileName.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                                                        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">FileNotFoundException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                                                ShowUtils.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">alertFileProblem</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">IOException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                                                ShowUtils.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">alertFileProblem</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,<span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                                        <span style="color: #009900;">&#125;</span>
&nbsp;
                                                <span style="color: #009900;">&#125;</span></pre></div></div>

<p>I also optimized the application, issue #37 (Uploaded photo looses .jpg file extension) was in fact due to the fact that I re created the photo file before sending it; instead of using a projection of the URI to get its path on the phone :</p>
<p><a href="http://code.google.com/p/g2android/source/browse/trunk/g2android/src/net/dahanne/android/g2android/utils/UriUtils.java">UriUtils</a></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #003399;">String</span> getFileNameFromUri<span style="color: #009900;">&#40;</span>Uri uri, Activity activity<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> projection <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> MediaStore.<span style="color: #006633;">Images</span>.<span style="color: #006633;">ImageColumns</span>.<span style="color: #006633;">DISPLAY_NAME</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">String</span> fileName<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">Cursor</span> c <span style="color: #339933;">=</span> activity.<span style="color: #006633;">managedQuery</span><span style="color: #009900;">&#40;</span>uri, projection, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>c <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> c.<span style="color: #006633;">moveToFirst</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        fileName <span style="color: #339933;">=</span> c.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000000; font-weight: bold;">return</span> fileName<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Also shipping with this new version, <a href="http://goapk.com">Chinese i18n thanks to the chinese android market, GoAPK</a> and also new art from <a href="http://www.gdl3d.com/">Dan</a>, who just posted a comment to the blog proposing to add new art; thanks again to you both ! You make the application richer !</p>
<p>So now, what remains to be done ? well, the compatibility with Gallery3, as the G3 remote API is almost stable now, thanks to the work of Bharat, Tim, and many others; a java implementation is already under work, I will check if I can use it instead of&#8230; re inventing the wheel !<br />
More details to come, for sure !</p>
<p>You can download G2Android from the Android Market, SlideMe, Applibs, etc.. and also from the <a href="http://code.google.com/p/g2android/"> G2Android project homepage</a><br />
.<br />
Enjoy this app as much as I enjoy working on it, and if you like it, don&#8217;t forget to flattr me <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2010/07/20/g2android-1-5-0-is-available-major-release/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Encoder vos videos en Webm (vp8) avec ffmpeg sous Ubuntu</title>
		<link>http://blog.dahanne.net/2010/06/19/encoder-vos-videos-en-webm-vp8-avec-ffmpeg-sous-ubuntu/</link>
		<comments>http://blog.dahanne.net/2010/06/19/encoder-vos-videos-en-webm-vp8-avec-ffmpeg-sous-ubuntu/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 00:02:26 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[montage video]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=356</guid>
		<description><![CDATA[<p>Depuis la libération du codec VP8 (et de son conteneur WebM) de ON2 technologies par Google en Mai 2010, la communauté open source (et les amateurs de video !) a trouvé le digne remplaçant de theora, finalement peu performant, et surtout un adversaire de poids face au codec video breveté et certainement pas standard h264. [...]]]></description>
			<content:encoded><![CDATA[<p>Depuis la libération du codec VP8 (et de son conteneur WebM) de ON2 technologies par Google en Mai 2010, la communauté open source (et les amateurs de video !) a trouvé le digne remplaçant de theora, finalement peu performant, et surtout un adversaire de poids face au codec video breveté et certainement pas standard h264.<br />
Cet article a pour but d&#8217;expliquer comment :</p>
<ul>
<li>installer ffmpeg avec le support de webm sur Ubuntu</li>
<li>encoder une vidéo au format webm</li>
<li>lire une vidéo au format webm</li>
</ul>
<h3>Installer ffmpeg avec le support de webm sur Ubuntu</h3>
<p>Pour cela, je vais reprendre en quasi intégralité cet<a href="http://www.webdevonlinux.fr/2010/06/ffmpeg-0-6-0-ajoute-le-support-du-codec-webm"> excellent article de Steph sur l&#8217;installation de ffmpeg avec support de Webm sur Ubuntu 10.04 (lucid Lynx)</a>.<br />
On enlève les versions originales de ffmpeg et eventuellement de  x264 :</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;">apt-get</span> remove <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> x264 libx264-dev</pre></div></div>

<p>On met à jour le système de paquets et on installe les librairies nécessaires sur le système :</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;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev</pre></div></div>

<p>Récupération des sources, compilation et installation de x264 (optionnel, si vous voulez aussi encoder en x264) sous forme de paquets pour votre système (checkinstall wrappe &laquo;&nbsp;make install&nbsp;&raquo; en installant en plus le binaire obtenu sous forme de paquets debian dans votre système)</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: #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.videolan.org<span style="color: #000000; font-weight: bold;">/</span>x264.git
<span style="color: #7a0874; font-weight: bold;">cd</span> x264
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> checkinstall <span style="color: #660033;">--pkgname</span>=x264 <span style="color: #660033;">--pkgversion</span> <span style="color: #ff0000;">&quot;2:0.<span style="color: #780078;">`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`</span>.<span style="color: #780078;">`git rev-list HEAD | wc -l`</span>+git<span style="color: #780078;">`git rev-list HEAD -n 1 | head -c 7`</span>&quot;</span> <span style="color: #660033;">--backup</span>=no <span style="color: #660033;">--default</span></pre></div></div>

<p>Récupération des sources, compilation et installation de VP8, librairie nommée libvpx sous forme de paquets pour votre système (checkinstall wrappe &laquo;&nbsp;make install&nbsp;&raquo; en installant en plus le binaire obtenu sous forme de paquets debian dans votre système)</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: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>review.webmproject.org<span style="color: #000000; font-weight: bold;">/</span>libvpx.git
<span style="color: #7a0874; font-weight: bold;">cd</span> libvpx
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> checkinstall <span style="color: #660033;">--pkgname</span>=libvpx <span style="color: #660033;">--pkgversion</span>=<span style="color: #ff0000;">&quot;<span style="color: #780078;">`date +%Y%m%d%k%M`</span>-git&quot;</span> <span style="color: #660033;">--backup</span>=no <span style="color: #660033;">--nodoc</span> <span style="color: #660033;">--default</span></pre></div></div>

<p>Récupération des sources, compilation et installation de ffmpeg (enfin!)sous forme de paquets pour votre système (checkinstall wrappe &laquo;&nbsp;make install&nbsp;&raquo; en installant en plus le binaire obtenu sous forme de paquets debian dans votre système, à noter que pour ffmpeg vous aurez une erreur lors du checkinstall, qui n&#8217;empêchera pas l&#8217;installation d&#8217;aboutir)<br />
Si vous avez installé x264, vous pouvez ajouter comme ci dessous ajouter le support x264 à ffmpeg  : &#8211;enable-libx264 ; à noter que l&#8217;option &#8211;enable-libvpx vous donnera accès à l&#8217;encodage webm</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: #c20cb9; font-weight: bold;">svn</span> checkout <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.ffmpeg.org<span style="color: #000000; font-weight: bold;">/</span>ffmpeg<span style="color: #000000; font-weight: bold;">/</span>trunk <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-gpl</span> <span style="color: #660033;">--enable-version3</span> <span style="color: #660033;">--enable-nonfree</span> <span style="color: #660033;">--enable-postproc</span> <span style="color: #660033;">--enable-pthreads</span> <span style="color: #660033;">--enable-libfaac</span> <span style="color: #660033;">--enable-libfaad</span> <span style="color: #660033;">--enable-libmp3lame</span> <span style="color: #660033;">--enable-libopencore-amrnb</span> <span style="color: #660033;">--enable-libopencore-amrwb</span> <span style="color: #660033;">--enable-libtheora</span> <span style="color: #660033;">--enable-libvorbis</span> <span style="color: #660033;">--enable-libvpx</span> <span style="color: #660033;">--enable-libx264</span> <span style="color: #660033;">--enable-libxvid</span> <span style="color: #660033;">--enable-x11grab</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> checkinstall <span style="color: #660033;">--pkgname</span>=<span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">--pkgversion</span> <span style="color: #ff0000;">&quot;4:SVN-r<span style="color: #780078;">`svn info | grep Revision | awk '{ print $NF }'`</span>&quot;</span> <span style="color: #660033;">--backup</span>=no <span style="color: #660033;">--default</span>
<span style="color: #7a0874; font-weight: bold;">hash</span> x264 <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> ffplay</pre></div></div>

<p>Alors il est vrai que c&#8217;est toujours plus simple d&#8217;installer des paquets avec apt-get install que de compiler des sources, mais le support de webm dans ffmpeg est à ce jour tellement récent que vous ne trouverez pas de paquets pour votre distribution !</p>
<h3>Encoder vos vidéos en webm avec ffmpeg</h3>
<p>Rien de plus simple !</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> input.avi <span style="color: #660033;">-threads</span> <span style="color: #000000;">2</span> output.webm</pre></div></div>

<p>(sauf qu&#8217;il semnlearait que le -threads 2, supposé donner 2 threads à ffmpeg, utile pour les dual core, ne soit pas supporté, à ce jour, pour webm)</p>
<h3>Lire vos vidéos encodées en webm</h3>
<h2>Avec ffplay</h2>
<p>Vous avez déjà installé précédemment ffmplay :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ffplay output.webm</pre></div></div>

<h2>Avec vlc</h2>
<p>Vous pouvez aussi les lire avec la dernière version de VLC, à date, la version 1.1.0; il vous faut ajouter un nouveau repo avec les dernières version de vlc, enlever votre version actuelle et ré installer vlc :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> add-apt-repository ppa:c-korn<span style="color: #000000; font-weight: bold;">/</span>vlc
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove vlc
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> vlc mozilla-plugin-vlc videolan-doc</pre></div></div>

<p>Depuis la sortie officielle de VLC en 1.1.0, VLC lit parfaitement les fichiers webm, toutes plateformes confondues !</p>
<h2>Avec votre navigateur web</h2>
<p>Mais le véritable intérêt de webm, c&#8217;est le web, aussi à cette page, <a href="http://www.youtube.com/html5">vous sont listées les navigateurs compatibles webm</a>.<br />
Vous y trouverez un paquet debian/ubuntu pour chrome, et en <a href="http://nightly.mozilla.org/">téléchargeant et détarrant un firefox nightly build</a>, vous pourrez aussi les lire avec firefox.</p>
<p>Si vous pouvez lire la video ci dessous, c&#8217;est qu&#8217;alors vous utilisez un navigateur compatible webm !<br />
<video width="854" height="480" controls preload="none"><br />
       <source src="http://blog.dahanne.net/wp-content/uploads/sample.webm" type="video/webm" /><br />
</video></p>
<p>Avec chrome version 6.0.437.3 dev , j&#8217;ai pu la lire avec succès !</p>
<p>Vous pouvez aussi télécharger la vidéo en enregistrant cette url :</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/sample.webm">Exemple de vidéo webm à télécharger</a></p>
<p>Bon encodage Webm à tous !</p>
<h3>Sources :</h3>
<ul>
<li><a href="http://linuxfr.org//2010/06/17/27005.html">annonce de l&#8217;intégration de webm sur linuxfr.org</a></li>
<li><a href="http://www.webdevonlinux.fr/2010/06/ffmpeg-0-6-0-ajoute-le-support-du-codec-webm">installer webm sur ubuntu 10.04 64 bits</a></li>
<li><a href="http://ubuntuforums.org/showthread.php?t=786095">install webm on ubuntu</a></li>
<li><a href="http://www.mirovideoconverter.com/">Encoder vos videos webm sous windows</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2010/06/19/encoder-vos-videos-en-webm-vp8-avec-ffmpeg-sous-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Debugging any Java Application</title>
		<link>http://blog.dahanne.net/2010/06/03/debugging-any-java-application/</link>
		<comments>http://blog.dahanne.net/2010/06/03/debugging-any-java-application/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 18:18:47 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=351</guid>
		<description><![CDATA[<p>As long as you&#8217;re using a java application (ie an application calling your JVM), you can enable the debug mode with these parameters :</p> <p>-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</p> <p>So for example, if you want to debug an ant launch (launched via &#171;&#160;ant -f myBuild.xml&#160;&#187; for example), you simply have to set ANT_OPTS; on windows :</p> <p>set ANT_OPTS=-Xdebug [...]]]></description>
			<content:encoded><![CDATA[<p>As long as you&#8217;re using a java application (ie an application calling your JVM), you can enable the debug mode with these parameters :</p>
<p><code>-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</code></p>
<p>So for example, if you want to debug an ant launch (launched via &laquo;&nbsp;ant -f myBuild.xml&nbsp;&raquo; for example), you simply have to set ANT_OPTS; on windows :</p>
<p><code>set ANT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</code></p>
<p>Another example, with JBoss :</p>
<p><code>set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</code></p>
<p>and then you can debug your launch with Eclipse, for example, creating a new debug configuration (remote java application on port 8787) !<br />
Option : you can choose whether or not the application should wait for your debugger setting suspend to y or n.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2010/06/03/debugging-any-java-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>G2Android v. 1.4.2 : now it is really stable !</title>
		<link>http://blog.dahanne.net/2009/12/23/g2android-v-1-4-2-now-it-is-really-stable/</link>
		<comments>http://blog.dahanne.net/2009/12/23/g2android-v-1-4-2-now-it-is-really-stable/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 23:46:54 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=337</guid>
		<description><![CDATA[<p>Sorry, no new features in this release But a lot of bug fixes These bugs specially appeared in CyanogenMod running Android phones, because, for some reason, CyanogenMod kills really rapidly applications loosing focus. For example, when trying to upload a photo, Android, under Cyanogenmod, would kill G2Android, as it lost focus, for letting the user [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry, no new features in this release <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
But a lot of bug fixes <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
These bugs specially appeared in CyanogenMod running Android phones, because, for some reason, CyanogenMod kills really rapidly applications loosing focus.<br />
For example, when trying to upload a photo, Android, under Cyanogenmod, would kill G2Android, as it lost focus, for letting the user choose his photo; or if you received a phone call while browsing a gallery, Android would also kill G2Android.<br />
That&#8217;s ok, it&#8217;s part of the Android lifecycle : this robot knows how to get his RAM back  !!!<br />
The thing is, until version 1.4.2, G2Android would not &laquo;&nbsp;remember&nbsp;&raquo; the Gallery cookies, the albums hierarchy, its position in the gallery, etc&#8230; so it forced close.<br />
Now, it uses a SQLite database, to save its context, so before leaving an activity, G2Android saves its context (onPause) and when entering an activity (onResume) it gets the context back.<br />
Next year, some new features will appear, like using the camera directly to send photo, or maybe analyse EXIF metadata ?<br />
If you have some ideas, or if you encounter bugs, <a href="http://code.google.com/p/g2android/issues/list">please feel free to submit an issue in G2Android bugtracker</a> !<br />
And, as we say in such periods, merry Xmas and happy new year ! Using G2Android <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h3><a href="http://code.google.com/p/g2android/">Go to G2Android project page</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/12/23/g2android-v-1-4-2-now-it-is-really-stable/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Comment convertir une mailbox Outlook en mailbox IMAP</title>
		<link>http://blog.dahanne.net/2009/12/23/comment-convertir-une-mailbox-outlook-en-mailbox-imap/</link>
		<comments>http://blog.dahanne.net/2009/12/23/comment-convertir-une-mailbox-outlook-en-mailbox-imap/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 23:21:54 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=328</guid>
		<description><![CDATA[<p>Si chez moi j&#8217;ai tout le loisir d&#8217;utiliser, pour la messagerie par email, des logiciels libres implémentant des standards; dans le cadre du travail, je me suis souvent retrouvé à utiliser un compte Outlook&#8230; (ou pire, Lotus Notes, mais là c&#8217;est un autre sujet&#8230;) Sauf que le jour où on quitte la société ou la [...]]]></description>
			<content:encoded><![CDATA[<p>Si chez moi j&#8217;ai tout le loisir d&#8217;utiliser, pour la messagerie par email, des logiciels libres implémentant des standards; dans le cadre du travail, je me suis souvent retrouvé à utiliser un compte Outlook&#8230; (ou pire, Lotus Notes, mais là c&#8217;est un autre sujet&#8230;)<br />
Sauf que le jour où on quitte la société ou la mission (qui vous a équipé d&#8217;Outlook donc), on aimerait bien récupérer ses messages préférés&#8230;<br />
Vous imaginez bien que le format de sauvegarde d&#8217;Outlook est propriétaire, ainsi, il faut ruser pour convertir votre boite aux lettres Outlook au format standard unix &laquo;&nbsp;mailbox&nbsp;&raquo; (format documenté et convertible et exploitable par pléthore d&#8217;outils)<br />
Pour ce faire, il suffit de suivre ces 2 étapes (il faut aussi un compte IMAP tierce) :</p>
<h3>1°)Configurer un compte IMAP dans Outlook</h3>
<p>j&#8217;ai simplement ajouté un compte IMAP existant dans Outlook (Outils-&gt;Comptes de messagerie)<br />
J&#8217;ai ensuite choisi &laquo;&nbsp;Ajouter compte de messagerie&nbsp;&raquo;</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/comptes_de_messagerie.png"><img class="alignnone size-medium wp-image-332" title="comptes_de_messagerie" src="http://blog.dahanne.net/wp-content/uploads/comptes_de_messagerie-300x228.png" alt="" width="300" height="228" /></a></p>
<p>Puis j&#8217;ai sélectionné IMAP<br />
<a href="http://blog.dahanne.net/wp-content/uploads/imap.png"><img class="alignnone size-medium wp-image-333" title="imap" src="http://blog.dahanne.net/wp-content/uploads/imap-300x229.png" alt="" width="300" height="229" /></a><br />
J&#8217;ai renseigné mon compte IMAP</p>
<p><a href="http://blog.dahanne.net/wp-content/uploads/compte_saisi.png"><img class="alignnone size-medium wp-image-331" title="compte_saisi" src="http://blog.dahanne.net/wp-content/uploads/compte_saisi-300x227.png" alt="" width="300" height="227" /></a></p>
<p>Terminé !</p>
<h3>2°)Déplacez ses messages et répertoires de Outlook vers votre compte IMAP</h3>
<p>Rien de plus simple, il suffit de glisser/déplacer vos messages et répertoires de votre compte Outlook, vers votre compte IMAP !<br />
Par contre, votre serveur IMAP n&#8217;est peut être pas paramétré pour gérer les sous répertoires, dans ce cas là, vous devez modifier la configuration, dans le cas de Dovecot, veuillez faire attention à ce que l&#8217;option namespace_private comporte une définition des séparateurs :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">namespace private <span style="color: #7a0874; font-weight: bold;">&#123;</span>
   <span style="color: #666666; font-style: italic;"># Hierarchy separator to use. You should use the same separator for all</span>
   <span style="color: #666666; font-style: italic;"># namespaces or some clients get confused. '/' is usually a good one.</span>
   <span style="color: #666666; font-style: italic;"># The default however depends on the underlying mail storage format.</span>
  separator = <span style="color: #000000; font-weight: bold;">/</span> 
&nbsp;
   <span style="color: #666666; font-style: italic;"># Prefix required to access this namespace. This needs to be different for</span>
   <span style="color: #666666; font-style: italic;"># all namespaces. For example &quot;Public/&quot;.</span>
   prefix = <span style="color: #ff0000;">&quot;&quot;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># Physical location of the mailbox. This is in same format as</span>
   <span style="color: #666666; font-style: italic;"># mail_location, which is also the default for it.</span>
   <span style="color: #666666; font-style: italic;">#location =</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># There can be only one INBOX, and this setting defines which namespace</span>
   <span style="color: #666666; font-style: italic;"># has it.</span>
   inbox = <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
   <span style="color: #666666; font-style: italic;"># If namespace is hidden, it's not advertised to clients via NAMESPACE</span>
   <span style="color: #666666; font-style: italic;"># extension or shown in LIST replies. This is mostly useful when converting</span>
   <span style="color: #666666; font-style: italic;"># from another server with different namespaces which you want to depricate</span>
   <span style="color: #666666; font-style: italic;"># but still keep working. For example you can create hidden namespaces with</span>
   <span style="color: #666666; font-style: italic;"># prefixes &quot;~/mail/&quot;, &quot;~%u/mail/&quot; and &quot;mail/&quot;.</span>
   <span style="color: #666666; font-style: italic;">#hidden = yes</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>C&#8217;est fini, vous venez de migrer vos données Outlook vers mailbox, le standard de courrier *nix ! (vos emails doivent être sur le votre machine hébergeant le serveur IMAP dans /home/user/mail/votre_sous_rep)</p>
<h3>Références</h3>
<p><a href="http://www.faqs.org/docs/Linux-mini/Outlook-to-Unix-Mailbox.html#s3" target="_blank">http://www.faqs.org/docs/Linux-mini/Outlook-to-Unix-Mailbox.html#s3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/12/23/comment-convertir-une-mailbox-outlook-en-mailbox-imap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Analyse de trames HTTP : les outils</title>
		<link>http://blog.dahanne.net/2009/12/10/analyse-de-trames-http-les-outils/</link>
		<comments>http://blog.dahanne.net/2009/12/10/analyse-de-trames-http-les-outils/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 09:31:01 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=252</guid>
		<description><![CDATA[<p>Régulièrement, je me trouve face au dilemme suivant :  &#171;&#160;Mais qu&#8217;est ce que mon application a bien pu envoyer au serveur ?&#160;&#187; Il existe des outils pour répondre à cette question , et voici ma sélection :</p> Wireshark (anciennement ethereal) / Linux Cet outil, c&#8217;est le couteau suisse de l&#8217;analyse réseau; et pas simplement HTTP [...]]]></description>
			<content:encoded><![CDATA[<p>Régulièrement, je me trouve face au dilemme suivant :  &laquo;&nbsp;Mais qu&#8217;est ce que mon application a bien pu envoyer au serveur ?&nbsp;&raquo;<br />
Il existe des outils pour répondre à cette question , et voici ma sélection :</p>
<ul>
<li><a href="http://www.wireshark.org/">Wireshark </a>(anciennement ethereal) / Linux<br />
Cet outil, c&#8217;est le couteau suisse de l&#8217;analyse réseau; et pas simplement HTTP : il peut analyser les trames TCP, UDP et tout ce qu&#8217;il y a au dessus (HTTP, FTP, SMTP, etc&#8230;)</li>
<li><a href="http://www.pocketsoap.com/tcptrace/">TCPTrace</a> / Windows<br />
Comme son nom l&#8217;indique, il permet d&#8217;analyser les trames TCP : spécifier un port d&#8217;écoute sur votre machine locale, un port de destination, une hôte de destination, configurer votre client HTTP que vous désirez tester; et le tour est joué : tous vos échanges seront loggés !</li>
<li>l&#8217;origine de TCPTrace, tcptunnelgui, très simple d&#8217;utilisation, <a href="http://www.redstream.nl/2011/04/08/tcptunnelgui-maybe-old-but-still-useful/">bien expliqué par Pascal</a></li>
<li><a href="http://www.rexswain.com/httpview.html">HttpViewer</a> , en ligne<br />
Il ne permet que d&#8217;analyser les trames HTTP, mais son gros avantage c&#8217;est qu&#8217;il n&#8217;y a aucune installation à effectuer, c&#8217;est un outil en ligne !</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/12/10/analyse-de-trames-http-les-outils/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installer PHP 5.3.1 sur Ubuntu Karmic koala 9.10</title>
		<link>http://blog.dahanne.net/2009/11/21/installer-php-5-3-1-sur-ubuntu-karmic-koala-9-10/</link>
		<comments>http://blog.dahanne.net/2009/11/21/installer-php-5-3-1-sur-ubuntu-karmic-koala-9-10/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 15:37:38 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[apache2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=274</guid>
		<description><![CDATA[<p>J&#8217;ai récemment voulu installer sur mon serveur web le (tout nouveau) agrégateur de flux RSS (avec API distante REST) OpenWebReader. L&#8217;auteur, pour avoir un développement plus aisé et moderne, a choisi la dernière version de PHP, 5.3 Sauf que sur Ubuntu 9.10, la version de PHP packagée est la 5.2.6 En général, dans ces cas, [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai récemment voulu installer sur mon serveur web le <a href="http://trac.openwebreader.org/">(tout nouveau) agrégateur de flux RSS (avec API distante REST) OpenWebReader</a>.<br />
L&#8217;auteur, pour avoir un développement plus aisé et moderne, a choisi la dernière version de PHP, 5.3<br />
Sauf que sur Ubuntu 9.10, la version de PHP packagée est la 5.2.6<br />
En général, dans ces cas, on a plutôt le réflexe de mettre à jour ses dépôts, dans /etc/apt/sources.list et de rajouter le dépôt qui va bien, qui rajoute en l&#8217;occurrence php 5.3.<br />
C&#8217;est bien ce que j&#8217;avais commencé à faire, <a href="http://www.dotdeb.org/2009/07/03/php-5-3-0-final-preview-packages-available-for-debian-lenny/">en suivant ce billet</a>.<br />
Mais malheureusement, plein de dépendances ont sauté : phpmyadmin, apache2-mod-php5, etc&#8230; du coup, machine arrière vers PHP 5.2.6 <img src='http://blog.dahanne.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
Retour aux sources, j&#8217;ai téléchargé sur php.net la version 5.3.1 de PHP</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>us3.php.net<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>php-5.3.1.tar.gz<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>this<span style="color: #000000; font-weight: bold;">/</span>mirror</pre></div></div>

<p>, je l&#8217;ai détarré dans mon home directory :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xvfz php-5.3.1.tar.gz</pre></div></div>

<p>et avant de le compiler, je suis allé chercher tout plein de librairies :</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;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apache2 apache2-mpm-prefork apache2-prefork-dev apache2-utils apache2.2-common mysql-client mysql-client-<span style="color: #000000;">5.1</span> mysql-common mysql-server mysql-server-<span style="color: #000000;">5.1</span> mysql-server-core-<span style="color: #000000;">5.1</span> libtidy-dev curl libcurl4-openssl-dev libcurl3 libcurl3-gnutls zlib1g zlib1g-dev libxslt1-dev libzip-dev libzip1 libxml2 libsnmp-base libsnmp15 libxml2-dev libsnmp-dev libjpeg62 libjpeg62-dev libpng12-<span style="color: #000000;">0</span> libpng12-dev zlib1g zlib1g-dev libfreetype6 libfreetype6-dev libbz2-dev libxpm4-dev libmcrypt-dev libmcrypt4 libicu-dev</pre></div></div>

<p>et là, dans mon répertoire de php 5.3.1 , j&#8217;ai pu compiler :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span>  php-5.3.1
$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-apxs2</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>apxs2 <span style="color: #660033;">--with-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mysqli</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>mysql_config <span style="color: #660033;">--with-tidy</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-curl</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin <span style="color: #660033;">--with-curlwrappers</span> <span style="color: #660033;">--with-openssl-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--with-pdo-pgsql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-pdo-mysql</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-xsl</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-ldap</span> <span style="color: #660033;">--with-xmlrpc</span> <span style="color: #660033;">--with-iconv-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-snmp</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-exif</span> <span style="color: #660033;">--enable-calendar</span> <span style="color: #660033;">--with-bz2</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-mcrypt</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-gd</span> <span style="color: #660033;">--with-jpeg-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-png-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-freetype-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-mbstring</span> <span style="color: #660033;">--enable-zip</span> <span style="color: #660033;">--with-pear</span> <span style="color: #660033;">--enable-intl</span> <span style="color: #660033;">--with-gettext</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;">gettext</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p>Si vous avez un problème lors du configure c&#8217;est qu&#8217;il vous manque une librairie&#8230;<br />
Ensuite, maintenant que l&#8217;on a une version de Php 5.3.1 compilé, il faut la référencer à Apache2, et pour ne rien casser aux dépendances, on trafique juste une petit peu /etc/apache2/mods-available/php5.load :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LoadModule php5_module <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>anthony<span style="color: #000000; font-weight: bold;">/</span>php-5.3.1<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>libphp5.so</pre></div></div>

<p>et là, le tour est joué, il suffit de redémarrer Apache2 pour que Php 5.3.1 soit chargé.<br />
En fait, je me suis beaucoup inspiré de<a href="http://www.brandonsavage.net/installing-php-5-3-on-ubuntu/"> ce billet</a>, sauf qu&#8217;à la fin, je vous conseille de ne pas faire le make install, car votre système risque de ne plus être en cohérence avec les dépots</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/11/21/installer-php-5-3-1-sur-ubuntu-karmic-koala-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>G2Android version 1.3.0 : cache and full screen navigation</title>
		<link>http://blog.dahanne.net/2009/10/27/g2android-version-1-3-0-cache-and-full-screen-navigatio/</link>
		<comments>http://blog.dahanne.net/2009/10/27/g2android-version-1-3-0-cache-and-full-screen-navigatio/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 15:22:35 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=267</guid>
		<description><![CDATA[<p>Here is the new stable release of G2Android, your favorite Gallery2 application for Android, and great new features are now available :</p> new cache feature fullscreen navigation with gestures download full res. picture to sdcard <p>As always, you can get more info going to the project web page : http://code.google.com/p/g2android/, and even download the new [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the new stable release of<a href="http://code.google.com/p/g2android/"> G2Android, your favorite Gallery2 application for Android</a>, and great new features are now available :</p>
<ul>
<li>new cache feature </li>
<li>fullscreen navigation with gestures </li>
<li>download full res. picture to sdcard</li>
</ul>
<p>As always, you can get more info going to the project web page : <a href="http://code.google.com/p/g2android/">http://code.google.com/p/g2android/</a>, and <a href="http://code.google.com/p/g2android/downloads/list">even download the new version</a><br />
So what&#8217;s next ? tweeting and sending email with photo url, shortcuts for full screen navigation, synchronization between views&#8230; well, expect a new version by the end of November !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/10/27/g2android-version-1-3-0-cache-and-full-screen-navigatio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>G2Android version 1.2.1 : bug fixes</title>
		<link>http://blog.dahanne.net/2009/10/15/g2android-version-1-2-1-bug-fixes/</link>
		<comments>http://blog.dahanne.net/2009/10/15/g2android-version-1-2-1-bug-fixes/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 20:51:09 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=262</guid>
		<description><![CDATA[<p>You can now download the last G2Android update, version 1.2.1. What&#8217;s new ?</p> No more automatic connection at startup, the user has to push a button to connect to the gallery Galleries with port different than 80 now work I18n : the app now provide new languages, today only english and french are supported, I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>You can now download the last <a title="G2Android download page" href="http://code.google.com/p/g2android/downloads/list">G2Android update, version 1.2.1</a>.<br />
What&#8217;s new ?</p>
<ul>
<li> No more automatic connection at startup, the user has to push a button to connect to the gallery</li>
</ul>
<ul>
<li> Galleries with port different than 80 now work</li>
</ul>
<ul>
<li> I18n : the app now provide new languages, today only <a title="G2Android english strings file" href="http://code.google.com/p/g2android/source/browse/trunk/g2android/res/values/strings.xml">english</a> and <a title="G2Android french strings file" href="http://code.google.com/p/g2android/source/browse/trunk/g2android/res/values-fr/strings.xml">french</a> are supported, I&#8217;m expecting the community to provide new translations</li>
</ul>
<p>That&#8217;s all folks, expect better UIs and possibility to download pictures from the gallery to the phone soon.<br />
Have fun browsing your galleries !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/10/15/g2android-version-1-2-1-bug-fixes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Effacer de manière sécurisée les données d&#8217;un disque dur</title>
		<link>http://blog.dahanne.net/2009/10/14/effacer-de-maniere-securisee-les-donnees-dun-disque-dur/</link>
		<comments>http://blog.dahanne.net/2009/10/14/effacer-de-maniere-securisee-les-donnees-dun-disque-dur/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:06:03 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[outils]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=256</guid>
		<description><![CDATA[<p>Envie d&#8217;effacer toutes les données d&#8217;un disque dur avant de le revendre ? Envie d&#8217;effacer toutes vos données personnelles qui se situe dans un répertoire en particulier (sous windows), sans formater tout le disque ? Suivez le guide !</p> Effacer de manière sécurisée toutes les partitions d&#8217;un volume <p>Vous vous apprétez à vendre ou à [...]]]></description>
			<content:encoded><![CDATA[<p>Envie d&#8217;effacer toutes les données d&#8217;un disque dur avant de le revendre ?<br />
Envie d&#8217;effacer toutes vos données personnelles qui se situe dans un répertoire en particulier (sous windows), sans formater tout le disque ?<br />
Suivez le guide !</p>
<h3>Effacer de manière sécurisée toutes les partitions d&#8217;un volume</h3>
<p>Vous vous apprétez à vendre ou à donner votre vieil ordinateur, et vous ne voulez pas que l&#8217;ensemble de vos documents privés se retrouvent sur internet ?</p>
<p>Dans ce cas, il ne suffit pas d&#8217;effacer vos fichiers via l&#8217;OS (ce qui ne les efface que de la table de registres du disque), ni de formater la partition (un logiciel de &laquo;&nbsp;recovery&nbsp;&raquo; serait capable de la reconstituer); ce qu&#8217;il vous faut, c&#8217;est réécrire plusieurs fois, avec des algorithmes éprouvés, des données aléatoires sur l&#8217;ensemble du disque.</p>
<p>Il existe pour cela pléthores d&#8217;outils payants (et qui n&#8217;ont pas l&#8217;air d&#8217;avoir la côte), et il existe <a title="dban" href="http://www.dban.org/">DBAN</a>, outil GPL de choix.</p>
<p><a title="dban" href="http://www.dban.org/">DBAN (Darik&#8217;s boot and Nuke)</a> est un logiciel libre, redoutablement efficace, qui, même s&#8217;il n&#8217;est plus maintenu depuis 2007, vous propose plusieurs algos pour effacer votre disque de manière sécurisée (réécrire 1 fois dessus -&gt; +rapide; 3 passes avec algo conforme au Department Of Defense américain -&gt; +long)</p>
<p>Ce logiciel s&#8217;installe sur une clef USB, ou un CD-R, ou une disquette; bootez dessus (branchez auparavant sur votre ordinateur les périphériques que vous souhaitez effacer), tapez &laquo;&nbsp;autonuke&nbsp;&raquo; à l&#8217;invite de commandes, patientez, et c&#8217;est réglé !</p>
<p>Vous voulez en avoir le coeur net ? être sûr que DBAN a bien fait son travail ?</p>
<p>On peut faire une vérification sommaire, en tentant de retrouver des partitions sur le disque avec l&#8217;outil <a title="TestDisk" href="http://www.cgsecurity.org/wiki/TestDisk">Testdisk</a>, en GPL sous Linux/Windows/MacOs (etc..); le résultat est sans appel : après analyse complète du disque à la recherche de la moindre partition :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">TestDisk <span style="color: #000000;">6.10</span>, Data Recovery Utility, July <span style="color: #000000;">2008</span>
Christophe GRENIER <span style="color: #000000; font-weight: bold;">&amp;</span>lt;grenier<span style="color: #000000; font-weight: bold;">@</span>cgsecurity.org<span style="color: #000000; font-weight: bold;">&amp;</span>gt;
http:<span style="color: #000000; font-weight: bold;">//</span>www.cgsecurity.org
&nbsp;
Disk <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc - <span style="color: #000000;">81</span> GB <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000;">76</span> GiB - CHS <span style="color: #000000;">9965</span> <span style="color: #000000;">255</span> <span style="color: #000000;">63</span>
&nbsp;
Partition                  Start        End    Size <span style="color: #000000; font-weight: bold;">in</span> sectors
&nbsp;
No partition found or selected <span style="color: #000000; font-weight: bold;">for</span> recovery</pre></div></div>

<h3>Effacer vos données personnelles d&#8217;un répertoire</h3>
<p>Vous utilisez régulièrement un ordinateur au bureau, vous y avez stocké des documents confidentiels, et vous vous apprétez à ne plus utiliser ce poste de travail ?</p>
<p>Vous pouvez alors utiliser <a title="Eraser" href="http://eraser.heidi.ie/">Eraser</a>, encore un logiciel libre sous GPL (mais malheureusement que pour Windows), qui appliquera les mêmes algorithmes de suppression que DBAN, mais dans des répertoires au choix, et non pas un volume entier; Eraser est facile à utiliser (version portable, pas besoin d&#8217;être admin pour s&#8217;en servir), et est encore maintenu à ce jour</p>
<h3>Références :</h3>
<p><a href="http://www.webopedia.com/DidYouKnow/Computer_Science/2007/completely_erase_harddrive.asp">http://www.webopedia.com/DidYouKnow/Computer_Science/2007/completely_erase_harddrive.asp</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/10/14/effacer-de-maniere-securisee-les-donnees-dun-disque-dur/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>G2Android version 1.2.0 : photos upload and albums creation !</title>
		<link>http://blog.dahanne.net/2009/08/29/g2android-version-1-2-0-photos-upload-and-albums-creation/</link>
		<comments>http://blog.dahanne.net/2009/08/29/g2android-version-1-2-0-photos-upload-and-albums-creation/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 01:33:12 +0000</pubDate>
		<dc:creator>anthony.dahanne</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.dahanne.net/?p=241</guid>
		<description><![CDATA[<p>I&#8217;m writing this small post just to indicate that the new version of the open source Gallery2 client for the android platform, G2Android, is out !</p> <p>Now, you can still see your albums and pictures, but you can also :</p> upload photos create new albums <p>The ergonomy is not yet perfect, as you may have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing this small post just to indicate that the new version of the open source <a href="http://gallery2.menalto.com">Gallery2</a> client for the android platform, <a href="http://code.google.com/p/g2android/">G2Android</a>, is out !</p>
<p>Now, you can still see your albums and pictures, but you can also :</p>
<ul>
<li>upload photos</li>
<li>create new albums</li>
</ul>
<p>The ergonomy is not yet perfect, as you may have already noticed, even though almost everything is multi threaded (using AsyncTask), meaning the ui won&#8217;t freeze anymore; the next features will probably will allow the user to insert a photo to his gallery from every picture context on the android platform (declaring a &laquo;&nbsp;share image&nbsp;&raquo; intent)</p>
<p>Stay tuned !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dahanne.net/2009/08/29/g2android-version-1-2-0-photos-upload-and-albums-creation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic

Served from: blog.dahanne.net @ 2012-02-04 16:55:09 -->
