<?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>Florent Clairambault &#187; Debian</title>
	<atom:link href="http://florent.clairambault.fr/tag/debian/feed" rel="self" type="application/rss+xml" />
	<link>http://florent.clairambault.fr</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 19:56:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>cron-apt and the perfect update system</title>
		<link>http://florent.clairambault.fr/cron-apt-and-the-perfect-update-system?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cron-apt-and-the-perfect-update-system</link>
		<comments>http://florent.clairambault.fr/cron-apt-and-the-perfect-update-system#comments</comments>
		<pubDate>Wed, 18 Jan 2012 04:00:06 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[cron-apt]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=3688</guid>
		<description><![CDATA[On my spare time, I manage a handful of servers. And even if it&#8217;s not really my job, I try to do it well and efficiently. All of them work on Debian because it&#8217;s simple to manage. I started using cron-apt a few years ago. I started by upgrading everything automatically, this was a big [...]]]></description>
			<content:encoded><![CDATA[<p>
On my spare time, I manage a handful of servers. And even if it&#8217;s not really my job, I try to do it well and efficiently. All of them work on Debian because it&#8217;s simple to manage. I started using cron-apt a few years ago. I started by upgrading everything automatically, this was a big mistake. I switched to only sending mails on available upgrades and doing the upgrade manually. But this is also quite painful because 95% of the time, it consists in typing &#8220;<code>apt-get dist-upgrade -y</code>&#8221; and waiting. And have no free time for doing stupid things.
</p>
<p>So here is my cron-apt configuration, I like it a lot:</p>
<p>
In <code>/etc/apt</code>:<br />
- I removed the <code>sources.list</code> file<br />
- I put the content of my <code>sources.list</code> into sources.list.d/main.list, it should look something like that:</p>

<div class="wp_codebox"><table><tr id="p36887"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p3688code7"><pre class="text" style="font-family:monospace;">deb http://http.us.debian.org/debian stable main contrib non-free
deb-src http://http.us.debian.org/debian stable main contrib non-free</pre></td></tr></table></div>

<p>- I created a directory sources.security.list.d<br />
- I put the following content:</p>

<div class="wp_codebox"><table><tr id="p36888"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p3688code8"><pre class="text" style="font-family:monospace;">deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://security.debian.org/ stable/updates main contrib non-free</pre></td></tr></table></div>

</p>
<p>
Then I added the repositories with packages I want to manually upgrade to <code>/etc/apt/sources.list.d/</code> and the ones that I want to automatically upgrade (which means that they can&#8217;t require any user interaction) to <code>/etc/apt/sources.security.list.d/</code>.
</p>
<p>
The interesting part is here, in <code>/etc/cron-apt/action.d</code>, this what I have:
</p>
<p><strong>0-update</strong></p>

<div class="wp_codebox"><table><tr id="p36889"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p3688code9"><pre class="bash" style="font-family:monospace;">update <span style="color: #660033;">-o</span> <span style="color: #007800;">quiet</span>=<span style="color: #000000;">2</span>
update <span style="color: #660033;">-o</span> <span style="color: #007800;">quiet</span>=<span style="color: #000000;">2</span> <span style="color: #660033;">-o</span> Dir::Etc::<span style="color: #007800;">sourceparts</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.security.list.d <span style="color: #660033;">-o</span> Dir::State::<span style="color: #007800;">lists</span>=<span style="color: #ff0000;">&quot;security-lists&quot;</span></pre></td></tr></table></div>

<p>
We launch an update of the two kinds of repositories. For the <code>sources.security.list.d</code> one, we use also a different <code>Dir::State::lists</code> parameter (which is the directory the cache file) so that we don&#8217;t to re-download the content of the index files every time.
</p>
<p><strong>2-install-security</strong></p>

<div class="wp_codebox"><table><tr id="p368810"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p3688code10"><pre class="bash" style="font-family:monospace;">dist-upgrade <span style="color: #660033;">-y</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">quiet</span>=<span style="color: #000000;">1</span> <span style="color: #660033;">-o</span> Dir::Etc::<span style="color: #007800;">sourceparts</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.security.list.d <span style="color: #660033;">-o</span> Dir::State::<span style="color: #007800;">lists</span>=<span style="color: #ff0000;">&quot;security-lists&quot;</span></pre></td></tr></table></div>

<p>
We launch the upgrade (dist-upgrade actually) only on the repositories defined in <code>/etc/apt/sources.security.list.d</code>.
</p>
<p><strong>3-download</strong></p>

<div class="wp_codebox"><table><tr id="p368811"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p3688code11"><pre class="bash" style="font-family:monospace;">dist-upgrade <span style="color: #660033;">-d</span> <span style="color: #660033;">-y</span> <span style="color: #660033;">-o</span> APT::Get::Show-Upgraded=<span style="color: #c20cb9; font-weight: bold;">true</span></pre></td></tr></table></div>

<p>
Then we only download files for the upgrade of the non-security packets.
</p>
<p><strong>6-clean</strong></p>

<div class="wp_codebox"><table><tr id="p368812"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p3688code12"><pre class="bash" style="font-family:monospace;">autoclean <span style="color: #660033;">-y</span></pre></td></tr></table></div>

<p>
And we finally delete all the old packets (the ones that will never be used).
</p>
<p>
If you want to play with the <code>apt</code> settings yourself, you should use <code>apt-config</code> to see what can change to fit your needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/cron-apt-and-the-perfect-update-system/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian 6.0</title>
		<link>http://florent.clairambault.fr/debian-6-0?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debian-6-0</link>
		<comments>http://florent.clairambault.fr/debian-6-0#comments</comments>
		<pubDate>Mon, 07 Feb 2011 00:24:00 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=3300</guid>
		<description><![CDATA[Debian released a new version of their system. I updated it on the server that powers this blog, it took me something like one hour to do the whole system upgrade. There was only a little glitch with mysql&#8217;s my.cnf file that had an unsupported &#8220;skip-bdb&#8221; line. Everything else went fine&#8230; The very good thing [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://i.mivi.fr/462bf9c7d4a9634c75284cea240db79f268260a1.x.150.png" style="position: relative; float: right; margin-left: 10px" /><a href="http://www.debian.org">Debian</a> <a href="http://www.debian.org/News/2011/20110205a.en.html">released a new version</a> of their system. I updated it on the server that powers this blog, it took me something like one hour to do the whole system upgrade. There was only a little glitch with mysql&#8217;s my.cnf file that had an unsupported &#8220;skip-bdb&#8221; line. Everything else went fine&#8230;</p>
<p>The very good thing in this new release is the new <a href="http://www.debian.org/ports/kfreebsd-gnu/">kfreebsd version</a> (available in i386 and x86_64). It brings the power of the FreeBSD kernel to the great Debian OS. If you don&#8217;t see the point, <a href="http://wiki.debian.org/Debian_GNU/kFreeBSD_why">read this</a>. To put in a nutshell: a more stable kernel with less legal issues, better vendors support and the same softwares.</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/debian-6-0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>get start-stop-daemon on any Linux distribution</title>
		<link>http://florent.clairambault.fr/get-start-stop-daemon-on-any-linux?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=get-start-stop-daemon-on-any-linux</link>
		<comments>http://florent.clairambault.fr/get-start-stop-daemon-on-any-linux#comments</comments>
		<pubDate>Mon, 31 Aug 2009 08:37:40 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[start-stop-daemon]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=1689</guid>
		<description><![CDATA[I switched from Debian to CentOS because I had the choice between an old 32 bits Debian 4.0 or a brand new 64 bits CentOS 5.3. And I have some scripts that use the great &#8220;start-stop-daemon&#8221; tool, which isn&#8217;t available on CentOS. The easiest way to solve this problem is to get dpkg from Debian [...]]]></description>
			<content:encoded><![CDATA[<p>I switched from Debian to CentOS because I had the choice between an old 32 bits Debian 4.0 or a brand new 64 bits CentOS 5.3. And I have some scripts that use the great &#8220;start-stop-daemon&#8221; tool, which isn&#8217;t available on CentOS.</p>
<p>The easiest way to solve this problem is to <a href="http://packages.debian.org/stable/dpkg">get dpkg from Debian</a> and then <em>try</em> to compile it. It&#8217;s likely that it will fail because libselinux (and it&#8217;s subsidiary library libsepol) won&#8217;t be registered in the pkgconfig dir. But we don&#8217;t really care as we only need start-stop-daemon, not dpkg.</p>

<div class="wp_codebox"><table><tr id="p168914"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code" id="p1689code14"><pre class="txt" style="font-family:monospace;"># wget http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.14.25.tar.gz
# tar -xf dpkg_1.14.25.tar.gz
# cd dpkg-1.14.25/
# ./configure &gt;/dev/null
configure: WARNING: x86_64 not found in cputable
configure: WARNING: linux-gnu not found in ostable
Package libselinux was not found in the pkg-config search path.
Perhaps you should add the directory containing `libselinux.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libselinux' found
configure: WARNING: no curses library found
# make &gt;/dev/null
processarc.o: In function `process_archive':
/root/dpkg-1.14.25/src/processarc.c:166: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
archives.o: In function `tarobject':
/root/dpkg-1.14.25/src/archives.c:634: undefined reference to `matchpathcon'
/root/dpkg-1.14.25/src/archives.c:640: undefined reference to `setfscreatecon'
/root/dpkg-1.14.25/src/archives.c:802: undefined reference to `setfscreatecon'
/root/dpkg-1.14.25/src/archives.c:804: undefined reference to `freecon'
/root/dpkg-1.14.25/src/archives.c:826: undefined reference to `setfscreatecon'
/root/dpkg-1.14.25/src/archives.c:618: undefined reference to `is_selinux_enabled'
collect2: ld returned 1 exit status
make[2]: *** [dpkg] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
# cd utils
# make install
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\&quot;/usr/local/share/locale\&quot; -idirafter ../libcompat -I../lib    -g -O2 -MT start-stop-daemon.o -MD -MP -MF .deps/start-stop-daemon.Tpo -c -o start-stop-daemon.o start-stop-daemon.c
mv -f .deps/start-stop-daemon.Tpo .deps/start-stop-daemon.Po
gcc -std=gnu99  -g -O2  -Wl,-O1 -o start-stop-daemon start-stop-daemon.o ../libcompat/libcompat.a
make[1]: Entering directory `/root/dpkg-1.14.25/utils'
test -z &quot;/usr/local/sbin&quot; || /bin/mkdir -p &quot;/usr/local/sbin&quot;
  /usr/bin/install -c 'start-stop-daemon' '/usr/local/sbin/start-stop-daemon'
make[1]: Nothing to be done for `install-data-am'.
make[1]: Leaving directory `/root/dpkg-1.14.25/utils'</pre></td></tr></table></div>

<p>Even if it doesn&#8217;t look so good, it should have installed the start-stop-daemon software.</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/get-start-stop-daemon-on-any-linux/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Server moved</title>
		<link>http://florent.clairambault.fr/server-moved?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=server-moved</link>
		<comments>http://florent.clairambault.fr/server-moved#comments</comments>
		<pubDate>Sun, 30 Aug 2009 08:35:04 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[OpenSuse]]></category>
		<category><![CDATA[yum]]></category>
		<category><![CDATA[zypper]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=1684</guid>
		<description><![CDATA[I&#8217;ve switched from my two three years old dedicated servers to one brand new virtual server. Reasons are : These servers costed me too much and they were becoming old (risk of failure increases). It wasn&#8217;t worth it. I spent last night doing that because I didn&#8217;t want to interrupt anybody using these servers. My [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve switched from my two three years old dedicated servers to one brand new virtual server. Reasons are : These servers costed me too much and they were becoming old (risk of failure increases). It wasn&#8217;t worth it.</p>
<p>I spent last night doing that because I didn&#8217;t want to interrupt anybody using these servers. </p>
<p>My two servers were running some Debian and I&#8217;m now switching to a CentOS virtual server. I was a little bit worried at first that CentOS would have a crappy package management system, but its yum is in fact working the same way as Debian&#8217;s apt-get and OpenSuse&#8217;s zypper. The oool thing is that these three package management systems roughly work the same way : <apt-get/yum/zypper> install
<package>, you don&#8217;t have to learn a new &#8220;ultimate&#8221; way to upgrade your software (like on FreeBSD). By the way, the faster package management system is yum, and the slowest one is zypper.</p>
<p>The biggest problem I had so far was to move all the databases. Previously, I was always using some Debian hosts, I was using exactly the same version of MySQL, so I just had to copy the MySQL datadir and logs files. Here, I had to export/import everything.</p>
<p>CentOS has an antique 1.2.4 version of Mono (when the current version is 2.4). I couldn&#8217;t manage to compile from the tarball but compiling from the SVN worked fine.</p>

<div class="wp_codebox"><table><tr id="p168416"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p1684code16"><pre class="txt" style="font-family:monospace;">]# /usr/local/bin/mono --version
Mono JIT compiler version 2.5 (/trunk/mono r140917 Sat Aug 29 05:29:19 CEST 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC and Parallel Mark)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/server-moved/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/21 queries in 0.008 seconds using disk: basic
Object Caching 773/801 objects using disk: basic

Served from: florent.clairambault.fr @ 2012-02-07 10:44:11 -->
