<?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>Come un pesce su un albero &#187; GNU</title>
	<atom:link href="http://www.ziqurrat.it/tag/gnu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ziqurrat.it</link>
	<description>Arrampicarsi sulla vita una pinna alla volta</description>
	<lastBuildDate>Fri, 23 Jul 2010 17:29:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>make distcheck -&gt; Error &#8211; install: cannot change ownership</title>
		<link>http://www.ziqurrat.it/2008/06/cannot_change_ownership/</link>
		<comments>http://www.ziqurrat.it/2008/06/cannot_change_ownership/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 20:20:06 +0000</pubDate>
		<dc:creator>Sanchan</dc:creator>
				<category><![CDATA[Open Source / Free Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[automake]]></category>
		<category><![CDATA[building]]></category>
		<category><![CDATA[coreutils]]></category>
		<category><![CDATA[distribution]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[packaging]]></category>

		<guid isPermaLink="false">http://www.ziqurrat.it/?p=95</guid>
		<description><![CDATA[How to solve distcheck error caused by install failing to change owner of installed files using GNU Automake and Autoconf and just three environment variables.]]></description>
			<content:encoded><![CDATA[<p>[<a href="http://www.ziqurrat.it/2008/06/cannot-change-ownership-it/ ">versione italiana</a>]<br />
When you work with GNU software, in 90% of the cases you&#8217;re using <a title="GNU Autoconf" href="http://www.gnu.org/software/autoconf/">GNU Autoconf</a> and <a href="http://www.gnu.org/software/automake/">GNU Automake</a> in order to handle the build process of your software. In some rare case you need to change the group and ownership of a file that you need to install on the system. In this case you just add an install hook in your Makefile.am and call install in this way:</p>
<p><code>fooDATA_INSTALL = ${INSTALL} -g foogroup -o foouser</code></p>
<p>This is wonderfull when you have to install your data as root user but it&#8217;s a cause of error when you test your package as normal user calling <code>make distcheck</code>.<br />
The result of the above command will be a make error caused by install trying to change ownership of your files without the root permissions:<br />
<code>install: cannot change ownership</code><br />
<span id="more-95"></span></p>
<h2 id="toc-what-can-you-do-for-checking-your-package">What can you do for checking your package?</h2>
<p>Well, GNU Automake and GNU Autoconf will come in your help also for this. GNU Automake ships the install-sh file that could be used instead of the <a href="http://www.gnu.org/software/coreutils/">GNU Coreutils</a> <code>install</code> program for installing files on your system. Looking at the usage help of this script you can see that there are some environment variables that could be specified to change the behaviour of the script. We now will focus on two of them: <code>CHGRPPROG</code> and <code>CHOWNPROG</code>. Setting these two variables to something that didn&#8217;t fail as normal user like &#8220;echo&#8221; allow us to call <code>install-sh -g foogroup -o foouser</code> without any failure (and without actually change the ownership of the file).</p>
<h2 id="toc-how-do-you-tell-makefile-am-that-we-want-to-use-install-sh-instead-of-install">How do you tell Makefile.am that we want to use install-sh instead of install?</h2>
<p>Just with another environment variable: <code>INSTALL</code>. If you export <code>INSTALL="path/to/install-sh"</code> and the run <code>configure</code>, in your Makefile will be used <code>install-sh</code> instead of <code>install</code>. If you call <code>make install</code> as root user you can install your files just as if you&#8217;re using the install program, but now you can also call <code>make distcheck</code> as normal user for testing your package: just remember to export <code>CHGRPPROG=echo</code> and <code>CHOWNPROG=echo</code> <strong>before</strong> you execute the test and unset them when you finished.<br />
Good work with your package!</p>


<p>No related posts.</p>
<p>Articoli correlati elaborati dal plugin <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.ziqurrat.it/2008/06/cannot_change_ownership/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>make distcheck -&gt; Error &#8211; install: cannot change ownership (italiano)</title>
		<link>http://www.ziqurrat.it/2008/06/cannot-change-ownership-it/</link>
		<comments>http://www.ziqurrat.it/2008/06/cannot-change-ownership-it/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 20:19:30 +0000</pubDate>
		<dc:creator>Sanchan</dc:creator>
				<category><![CDATA[Open Source / Free Software]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[automake]]></category>
		<category><![CDATA[compilazione]]></category>
		<category><![CDATA[coreutils]]></category>
		<category><![CDATA[distribuzione]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[make]]></category>

		<guid isPermaLink="false">http://www.ziqurrat.it/?p=96</guid>
		<description><![CDATA[Come risolvere errori di make distcheck causati dal fallimento di install durante la modifica del proprietario dei file installati utilizzando GNU Automake, Autoconf e tre variabili d'mabiente]]></description>
			<content:encoded><![CDATA[<p>[<a href="http://www.ziqurrat.it/2008/06/cannot_change_ownership/">english version</a>]<br />
Lavorando con software GNU, nel 90% dei casi ti troverai ad utilizzare <a title="GNU Autoconf" href="http://www.gnu.org/software/autoconf/">GNU Autoconf</a> e <a href="http://www.gnu.org/software/automake/">GNU Automake</a> per gestire il processo di compilazione. In alcuni casi potresti dover cambiare il proprietario dei file da installare. Se succede, la soluzione è aggiungere un <em lang=En">install hook</em> al file <em>Makefile.am</em> ed eseguire <code>install</code> in questo modo:</p>
<p><code>fooDATA_INSTALL = ${INSTALL} -g foogroup -o foouser</code></p>
<p>Questo è molto comodo quando installi i dati come utente <em>root</em> ma può causare un errore quando testi i pacchetti come utente normale chiamando <code>make distcheck</code>.<br />
Il risultato del comando precedente sarà un errore dovuto al tentativo di cambiare il proprietario ai file installati senza i permessi di <em><span lang="en" title="amministratore">root</span></em>:<br />
<code>install: cannot change ownership</code><br />
<span id="more-96"></span></p>
<h2 id="toc-cosa-puoi-fare-per-controllare-i-tuoi-pacchetti">Cosa puoi fare per controllare i tuoi pacchetti?</h2>
<p>GNU Automake and GNU Autoconf  ti vengono in aiuto. GNU Automake distribuisce il file install-sh che può sostituire il programma <code>install</code> del pacchetto <a href="http://www.gnu.org/software/coreutils/">GNU Coreutils</a>. Guardando nelle istruzioni d&#8217;uso di questo script infatti si può notare che ci sono alcune variabili d&#8217;ambiente che possono essere specificate per cambiare il comportamento dello script.  In particolare noi ci concentreremo su due di queste: <code>CHGRPPROG</code> and <code>CHOWNPROG</code>. Impostando queste due variabili  in modo che si riferiscano ad un comando che non fallisce per l&#8217;utente normale, come ad esempio &#8220;echo&#8221;, è possibile chiamare <code>install-sh -g foogroup -o foouser</code> senza alcun errore (e senza però modificare realmente il proprietario dei file). </p>
<h2 id="toc-come-dire-a-makefile-am-che-si-intende-usare-install-sh-invece-di-install">Come dire a Makefile.am che si intende usare install-sh invece di install?</h2>
<p>Utilizzando semplicemente un&#8217;altra variabile d&#8217;ambiente: <code>INSTALL</code>. Se esporti <code>INSTALL="path/to/install-sh"</code> e lanci <code>configure</code> nel file Makefile.am, verrà utilizzato <code>install-sh</code> invece di <code>install</code>. A questo punto potrai lanciare <code>make install</code> da utente <em>root</em> come se usassi il programma di installazione ed inoltre potrai lanciare <code>make distcheck</code> da utente normale per testare i pacchetti.<br />
L&#8217;importante è ricordarsi di esportare <code>CHGRPPROG=echo</code> e <code>CHOWNPROG=echo</code> <strong>prima</strong> di fare i test e di riportarli ai valori originari una volta terminato.<br />
Buon lavoro con i vostri pacchetti!</p>


<p>Related posts:<ol><li><a href='http://www.ziqurrat.it/2009/10/gentoo-10-0-10-anni-in-compilazione/' rel='bookmark' title='Permanent Link: Gentoo 10.0 &#8211; 10 anni in compilazione'>Gentoo 10.0 &#8211; 10 anni in compilazione</a> <small>In occasione del decimo anniversario dalla nascita di Gentoo, il...</small></li>
</ol></p>
<p>Articoli correlati elaborati dal plugin <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.ziqurrat.it/2008/06/cannot-change-ownership-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo: perché?</title>
		<link>http://www.ziqurrat.it/2008/06/gentoo-perche/</link>
		<comments>http://www.ziqurrat.it/2008/06/gentoo-perche/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 18:32:53 +0000</pubDate>
		<dc:creator>Sanchan</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Open Source / Free Software]]></category>
		<category><![CDATA[distcc]]></category>
		<category><![CDATA[distribuzione]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Installazione]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[pentium III]]></category>
		<category><![CDATA[Pentium4]]></category>
		<category><![CDATA[Sabayon]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Virtual Box]]></category>

		<guid isPermaLink="false">http://www.ziqurrat.it/?p=87</guid>
		<description><![CDATA[Scegliere la distribuzione da installare sul proprio PC è sempre difficile. Ecco uno dei perché ho scelto Gentoo.]]></description>
			<content:encoded><![CDATA[<p>Lo ammetto, non capita tutti i giorni. Ma ogni tanto ti trovi tra le mani un PC, decidi di metterci <a href="http://www.gnu.org">GNU</a>/<a href="http://kernel.org">Linux</a> , controlli l&#8217;hardware, verifichi la compatibilità, fai un rapido giro a vedere se c&#8217;è qualche novità e poi ti assale il dubbio. Che distribuzione ci metto?<br />
<span id="more-87"></span><br />
Ne ho provate tante di distribuzioni e ognuna ha cose più o meno utili/interessanti. Negli ultimi cinque anni sul mio PC uso <a href="http://www.gentoo.org">Gentoo</a> e da due anni a lavoro uso <a href="http://fedoraproject.org/">Fedora</a>. A Federica ho messo <a href="http://www.mandriva.com/">Mandriva</a>, <a href="http://fedoraproject.org/">Fedora</a> e <a href="http://www.ubuntu.com">Ubuntu</a>. Ma ora che mi trovo a dover installare un nuovo PC ho fatto una nuova carrellata delle distribuzioni sul mercato e alla fine ho deciso: riallineo tutti i PC su cui riesco a mettere mano con <a href="http://www.gentoo.org">Gentoo</a>.<br />
Perché <a href="http://www.gentoo.org">Gentoo</a>? Innanzitutto perché è la distribuzione che conosco meglio. Poi perché l&#8217;hardware su cui dovrà girare è abbastanza datato e le possibilità sono solo due: usare software datato o usare software recente cercando di spillarne il massimo delle prestazioni. Con il passare del tempo i software si sono arricchiti di funzionalità e ritocchi estetici che hanno avuto come scotto un aumento dei requisiti hardware per farli girare. La maggior parte delle distribuzioni precompilate compila ancora per i386 (con qualche eccezione comunque basata su <a href="http://www.gentoo.org">Gentoo</a>, come <a href="http://www.sabayonlinux.org/">Sabayon Linux</a>). Con <a href="http://www.gentoo.org">Gentoo</a> posso ottenere eseguibili ottimizzati per il sistema su cui dovranno girare. Bello. L&#8217;unico problema è che con <a href="http://www.gentoo.org">Gentoo</a> il software va compilato, e la compilazione richiede tempo. Poco male, almeno nel mio caso: quattro dei PC su cui dovrà girare sono dei <a href="http://www.intel.com/support/processors/pentiumiii/">PentiumIII</a>, uno è un <a href="http://www.intel.com/products/processor/pentium4/index.htm">Pentium 4</a> di prima generazione. Soluzione: compilare tutto una volta sola, possibilmente usando la potenza contemporanea dei vari PC grazie a <a href="http://distcc.samba.org/">distcc</a> usando un&#8217;ottimizzazione appena inferiore a quella ottima per poter usare gli stessi binari anche sul Pentium4. O in alternativa compilare il tutto in una bella <a href="http://www.virtualbox.org/">Virtual Box</a> e poi installare l&#8217;immagine sui vari PC. Probabilmente alla fine adotterò questa soluzione, se non altro per avere meno rumore e meno fili sparsi per casa. Voi che distribuzione usate? Perchè?</p>


<p>Related posts:<ol><li><a href='http://www.ziqurrat.it/2009/10/gentoo-10-0-10-anni-in-compilazione/' rel='bookmark' title='Permanent Link: Gentoo 10.0 &#8211; 10 anni in compilazione'>Gentoo 10.0 &#8211; 10 anni in compilazione</a> <small>In occasione del decimo anniversario dalla nascita di Gentoo, il...</small></li>
</ol></p>
<p>Articoli correlati elaborati dal plugin <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.ziqurrat.it/2008/06/gentoo-perche/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
