<?xml version="1.0"?>
<rss version="2.0.">
  <channel>
    <title>Advogato blog for gdvieira</title>
    <link>http://www.advogato.org/person/gdvieira/</link>
    <description>Advogato blog for gdvieira</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Thu, 24 Jul 2008 18:26:17 GMT</pubDate>
    <item>
      <pubDate>Tue, 24 Jun 2008 21:09:23 GMT</pubDate>
      <title>IPv6 on Fedora (Redux)</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=32</link>
      <guid>http://www.sagui.org/~gustavo/blog/fedora/ipv6-on-fedora-redux.html</guid>
      <description>
&lt;p&gt;A little improvement on my &lt;a
href="http://www.sagui.org/~gustavo/blog/fedora/ipv6-on-fedora.html"&gt;IPv6
setup&lt;/a&gt;. I discovered a handy configuration parameter for RADV that
makes it unnecessary to update the configuration file in the rare
occasion my IP address changes.  The improved &lt;tt&gt;/etc/radvd.conf&lt;/tt&gt;
looks like this:&lt;/p&gt;
&lt;pre&gt;
interface eth0
{
        AdvSendAdvert on;
        MinRtrAdvInterval 30;
        MaxRtrAdvInterval 100;
        prefix 0:0:0:1::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr off;
                Base6to4Interface eth1;
        };

};
&lt;/pre&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 25 Feb 2008 23:10:59 GMT</pubDate>
      <title>IPv6 on Fedora</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=31</link>
      <guid>http://www.sagui.org/~gustavo/blog/fedora/ipv6-on-fedora.html</guid>
      <description>
&lt;p&gt;After hearing about the &lt;a
href="http://arstechnica.com/news.ars/post/20080102-icann-to-add-ipv6-addresses-for-root-dns-servers.html"&gt;activation
of IPv6 (AAAA) records for four of the root DNS servers&lt;/a&gt; I got very
curious about IPv6 and its current state of adoption. Well, it turns
out IPv6 &lt;a
href="http://www.nanog.org/mtg-0710/presentations/Bush-v6-op-reality.pdf"&gt;may
not be the solutions to all Internet woes but we will have to learn to
live with it anyway&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And so I did. Like 99.999% percent of Internet users I don't have a
native IPv6 connection, but enabling a IPv6 tunnel on Fedora is very,
very easy. I decided for the simplest type of tunnel, called &lt;a
href="http://en.wikipedia.org/wiki/6to4"&gt;6to4&lt;/a&gt;. This type of tunnel
is very convenient as I don't need to register it anywhere nor do I
need to ask permission to anyone. It is based on the kindness of
people that run 6to4 routers in the IPv4 Internet at the 192.88.99.1
anycast address. Usually people disregard this type of tunnel as being
slow, but routing from Brazil to the world is already so slow I found
the performance acceptable. Besides, there isn't much yet to do in the
current IPv6 Internet.&lt;/p&gt;

&lt;p&gt;Enabling a 6to4 tunnel on Fedora is ridiculously simple. First put
the following lines in &lt;tt&gt;/etc/sysconfig/network&lt;/tt&gt;:&lt;/p&gt;
&lt;pre&gt;
NETWORKING_IPV6=yes
IPV6_DEFAULTDEV=tun6to4
IPV6FORWARDING=yes
&lt;/pre&gt;

&lt;p&gt;The last line is only required if you are going to share the IPv6
connection with a local network. The rest of this recipe assumes you
are. Now find the configuration file for the interface connected to
the Internet. If it is &lt;tt&gt;eth1&lt;/tt&gt; the file should be
&lt;tt&gt;/etc/sysconfig/networking/devices/ifcfg-eth1&lt;/tt&gt;. Put the
following lines there:&lt;p&gt;
&lt;pre&gt;
  IPV6INIT=yes
  IPV6TO4INIT=yes
  IPV6_CONTROL_RADVD=yes
  IPV6TO4_ROUTING="eth0-:1::1/64 wlan0-:2::1/64"
&lt;/pre&gt;

&lt;p&gt;Once again, the last two lines are only required if you have a local
network you want to provide with IPv6 connectivity. If not, remove the
extra lines and you are set. Restart the interface and you are
connected to the IPv6 Internet! When using 6to4, probably due to the
performance concerns, Fedora prefers IPv4 addresses. So, go to a IPv6
only site (like &lt;a
href="http://www.ipv6.bieringer.de/"&gt;http://www.ipv6.bieringer.de/&lt;/a&gt;)
to test it. And remember to define a IPv6 firewall. Your current
iptables firewall only covers IPv4, use ip6tables to create a IPv6
one.&lt;/p&gt;

&lt;p&gt;A nice thing about this setup is that a 6to4 tunnel gives me a
whole /48 netblock based on my IPv4 address. So, no NAT in my local
IPv6 network! The last two lines
lines above allow the networking scripts to control the RADV daemon
and to create IPv6 addresses to other interfaces (besides the one you
are actually configuring). Just treat the /48 of your 6to4 address as
a prefix and create a /64 netblock for each interface. Create a
&lt;tt&gt;/etc/radvd.conf&lt;/tt&gt; file with an entry like this for each
interface:&lt;/p&gt;
&lt;pre&gt;
interface eth0
{
        AdvSendAdvert on;
        MinRtrAdvInterval 30;
        MaxRtrAdvInterval 100;
        prefix 2002:XXXX:XXXX:1::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr off;
        };

};
&lt;/pre&gt;

&lt;p&gt;Where &lt;tt&gt;2002:XXXX:XXXX&lt;/tt&gt; is your automatically configured 6to4
adress. Start RADV daemon and the hosts in you internal network should
receive an automatically generated address.&lt;/p&gt;

&lt;p&gt;For me, the next step would be to do the same to this site and add
a little bit more content to the IPv6 Internet. Unfortunately, the Xen
kernel used by my VPS provider doesn't support stateful iptables
support for IPv6. I though IPv6 support on Linux was a done deal, but
this critical functionality was only added about and year ago in
kernel 2.6.20. It seems IPv6 may be a bit farther in the future than I
expected. But it was surely fun to set it up anyway.&lt;/p&gt;

</description>
    </item>
    <item>
      <pubDate>Tue, 22 Jan 2008 01:05:03 GMT</pubDate>
      <title>Fedora 8</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=30</link>
      <guid>http://www.sagui.org/~gustavo/blog/fedora/fedora-8.html</guid>
      <description>
&lt;p&gt;I've been running Fedora 8 for the last couple of weeks. If nothing
else, using Fedora is a constant source of fun. Always new toys to
play with, old bugs fixed, new bugs created. And obviously, new tricks
to be learned.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.pulseaudio.org/" &gt;PulseAudio&lt;/a&gt; is one of the
great features introduced in Fedora 8. I really enjoyed the good work
that went into integrating PulseAudio and Fedora. It really is
seamless, except for the &lt;a
href="https://bugzilla.redhat.com/show_bug.cgi?id=303951"&gt;odd bug in
alsa&lt;/a&gt; and &lt;a
href="http://www.pulseaudio.org/wiki/PerfectSetup#Skype"&gt;proprietary
applications&lt;/a&gt;. Here are two things I discovered regarding pulse
audio. &lt;/p&gt;

&lt;p&gt;First: PulseAudio shows a simplified but functional interface to
control sound, and to support Alsa applications transparently, it
appears as the default virtual device hiding you hardware
device. Problem is, if the hardware device is muted or has the volume
set too low, there is nothing you can do through the PulseAudio
interface to make sound work. Obvious as it seems, you have to first
enable and adjust the volume of the relevant inputs in the hardware
device, and then be able to enjoy PulseAudio. You can use the
&lt;tt&gt;alsamixer -c [0...7]&lt;/tt&gt; command, changing the &lt;tt&gt;-c&lt;/tt&gt;
argument until you find your hardware device, set it up, and you are
ready to go. The good news is that, once it is done, applications
(such as Skype) won't be messing with your hardware device as
PulseAudio hides it.&lt;/p&gt;

&lt;p&gt;Second: to enable the PulseAudio daemon in you GNOME session, you
need to go to System|Preferences|Hardware|Sound and &lt;b&gt;enable
ESD&lt;/b&gt;. That's really stupid, they should have changed the label, but
this control really creates an instance of the PulseAudio daemon. If
it isn't running, sound won't work. I discovered this because ESD gave
me a lot of problems in the past and have been deactivated in my GNOME
preferences for a long time. It never occurred to me to enable it to
fix Alsa applications that suddenly stopped working. But, again, once
you discover that, everything just works.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 15 Dec 2007 16:07:32 GMT</pubDate>
      <title>Munin and Postfix</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=29</link>
      <guid>http://www.sagui.org/~gustavo/blog/software/Munin-and-Postfix.html</guid>
      <description>
&lt;p&gt;One more in the ongoing series "patches that make the world go
round". If you happen do use the excellent &lt;a
href="http://munin.projects.linpro.no/"&gt;Munin&lt;/a&gt; to monitor your
servers and use the Postfix plugins, you may have noticed that Munin
1.2.5 introduced a bug in the postfix_mailstats plugin. The bug report
and fix is &lt;a
href="http://munin.projects.linpro.no/ticket/479"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Remember people: release early, release often!&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 25 Nov 2007 20:07:58 GMT</pubDate>
      <title>OpenSER 1.2.2 PostgreSQL Driver Patch</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=28</link>
      <guid>http://www.sagui.org/~gustavo/blog/software/OpenSER-1.2.2-PostgreSQL-driver-patch</guid>
      <description>
&lt;p&gt;I run a personal SIP server powered by &lt;a
href="http://www.openser.org/"&gt;OpenSER&lt;/a&gt;. Actually, calling
something a SIP server is a bit of oversimplification as the protocol
and actions associated with it are fairly complex (as far as I know, I
run a SIP proxy and location server). All this to say that OpenSER uses a
relational database to store its data, as do all classy enterprise
software out there.&lt;/p&gt;

So far, so good, but when it comes to relational databases I like
using PostgreSQL instead of the OpenSER default MySQL. Why? Because I
know how to use it! Problem is, the last stable release of OpenSER
(1.2.2) has a serious bug in the PostgreSQL driver, &lt;a
href="http://openser.org/pipermail/users/2007-August/012641.html"&gt;making
it impossible to use&lt;/a&gt;. It's a pity no one bothered to do a brown
bag release because of this issue. Not being the default database
really turns you into a second class citizen. Anyway, the fix is
already in the OpenSER SVN, but I will post the patch here, to those
that want to stick to the released version.

&lt;pre&gt;
diff -ru openser-1.2.2-tls.orig/modules/postgres/db_res.c openser-1.2.2-tls/modules/postgres/db_res.c
--- openser-1.2.2-tls.orig/modules/postgres/db_res.c    2007-08-16 11:23:05.000000000 -0300
+++ openser-1.2.2-tls/modules/postgres/db_res.c 2007-11-25 08:23:53.000000000 -0200
@@ -572,6 +572,7 @@
         * If this is not done, a memory leak will happen.
         */
        for (col = 0; col &lt; ROW_N(_row); col++) {
+         _val = &amp;(ROW_VALUES(_row)[col]);
           switch (VAL_TYPE(_val)) {
             case DB_STRING:
               LOG(L_DBG, "PG[free_row]: %p=pkg_free() VAL_STRING[%d]\n", (char *)VAL_STRING(_val), col);
&lt;/pre&gt;

&lt;p&gt;The silver lining in this was that it was quite easy to find a
solution to this problem. Before OpenSER I used for some time the
original SER, and I can tell you, it is almost impossible to find some
help on the web. Both because SER is a lousy name to base a Google
search :) and because the project isn't quite transparent as  a proper
open source project should be.  So, congratulations to the OpenSER
developers! And remember, release early, release often!&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 25 Nov 2007 20:07:58 GMT</pubDate>
      <title>Really Obsolete RPMs</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=27</link>
      <guid>http://www.sagui.org/~gustavo/blog/fedora/really-obsolete-rpms</guid>
      <description>
&lt;p&gt;The version of K9Copy  packaged by Livna is now newer than the one
I maintained, so I'm officially taking it down.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 5 Oct 2007 21:08:07 GMT</pubDate>
      <title>Obsolete RPMs</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=26</link>
      <guid>http://www.sagui.org/~gustavo/blog/fedora/obsolete-rpms</guid>
      <description>
&lt;p&gt;Both &lt;a href="http://openmsx.sourceforge.net/" &gt;OpenMSX&lt;/a&gt; and &lt;a
href="http://k9copy.sourceforge.net/"&gt;K9Copy&lt;/a&gt; now have official
RPMs for Fedora. OpenMSX is part of the main distribution, just
execute &lt;tt&gt;yum install openmsx&lt;/tt&gt;. K9Copy is packaged by &lt;a
href="http://rpm.livna.org/"&gt;Livna&lt;/a&gt;, go there and install their
repo.&lt;/p&gt;

&lt;p&gt;As my version of K9Copy is newer than the one packaged by Livna, I
will keep it a bit longer. When Livna catches up, I will remove it
from the site. See, I actually like being obsoleted. :)&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 3 Oct 2007 17:08:03 GMT</pubDate>
      <title>Emacs And Cedilla</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=25</link>
      <guid>http://www.sagui.org/~gustavo/blog/software/emacs-and-cedilla</guid>
      <description>
&lt;p&gt;This one is for the "unlikely bugs" section. If you use the
magic combination of Emacs 22, a US keyboard and dead keys in a UTF-8
locale, the combination ' + c will give you &#x107; instead of
&#xE7;. Of course, this is a bug only if you want &#xE7; and not &#x107;, so please
forgive my &#xE7;-centrism. No offense intended to &#x107;-using languages,
whatever they may be. :)&lt;/p&gt;

&lt;p&gt;GTK2 had this same bug about 5 years ago, and they solved it by
creating the "cedilla" input method, and selecting it according to
locale. Guess the Emacs guys will have to go the same
route. Meanwhile, a simple workaround is to fire up Emacs in a
ISO-8859-1 locale: "&lt;tt&gt;$ LC_ALL=pt_BR emacs&lt;/tt&gt;" and as soon as the
program opens up, select "Options|Mule|Set Language
Environment|UTF-8". It isn't pretty, but as I use the US keyboard only
rarely this works for me.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 2 Oct 2007 21:08:25 GMT</pubDate>
      <title>DSPAM Hash Driver Patches</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=24</link>
      <guid>http://www.sagui.org/~gustavo/blog/software/DSPAM-hash-driver-patches</guid>
      <description>
&lt;p&gt;I use the fantastic &lt;a
href="http://www.nuclearelephant.com/"&gt;DSPAM&lt;/a&gt; SPAM filter in my
mail server. I like it very much, specially when using the built-in
hash-based storage, making it very fast and really easy to setup. That
is, if the documentation and administration tools weren't so
lacking. On the plus side, I got to know a little better the tool that
keeps my email sanity and respect the developers that make it
happen.&lt;/p&gt;

&lt;p&gt;If you are an user of the hash driver, you can't rely on the
provided tools to maintain your installation. The recommended way of
cleaning old messages signatures doesn't work for this driver. Also,
the hash-based database has to be cleaned from time to time or it will
grow too big, but the tool to do it (&lt;tt&gt;cssclean&lt;/tt&gt;) just doesn't
work. To handle these problems, I first had to patch DSPAM so I could
get a working &lt;tt&gt;cssclean&lt;/tt&gt;. The main patch was created by Frank
Cusack and you can get it in his aptly named message &lt;a
href="http://www.mail-archive.com/dspam-dev@lists.nuclearelephant.com/msg00066.html"&gt;"cssclean
is a redheaded stepchild"&lt;/a&gt; to the dspam-dev mailing list.&lt;/p&gt;

&lt;p&gt;The second patch isn't strictly necessary (and I fear it might
violate some design principle of DSPAM), but it keeps
&lt;tt&gt;cssclean&lt;/tt&gt; from resetting the statistics of the database. I
really can't remember where I found it, so I post it here:&lt;/p&gt;

&lt;pre&gt;
diff -ru dspam-3.8.0.orig/src/tools.hash_drv/cssclean.c dspam-3.8.0/src/tools.hash_drv/cssclean.c
--- dspam-3.8.0.orig/src/tools.hash_drv/cssclean.c      2006-05-27 18:00:36.000000000 -0300
+++ dspam-3.8.0/src/tools.hash_drv/cssclean.c   2007-06-27 19:18:51.000000000 -0300
@@ -167,7 +167,7 @@
     header = offset;
     filepos += sizeof(struct _hash_drv_header);
   }
-
+  bcopy (old.header, new.header, sizeof(struct _hash_drv_header));
   _hash_drv_close(&amp;new);
   _hash_drv_close(&amp;old);
   rename(newfile, filename);
&lt;/pre&gt;

&lt;p&gt;Finally, I run the following script monthly using cron:&lt;/p&gt;

&lt;pre&gt;
# Clean hashes and signatures.
for u in /var/lib/dspam/data/*/*.css; do
    /usr/bin/cssclean $u
done
find /var/lib/dspam/data -name *sig -type f -mtime +30 -exec rm -f {} \;
&lt;/pre&gt;

&lt;p&gt; Probably you will have to adapt it to the file locations of your
DSPAM installation.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 29 Aug 2007 15:10:40 GMT</pubDate>
      <title>K9Copy 1.1.3 RPM</title>
      <link>http://www.advogato.org/person/gdvieira/diary.html?start=23</link>
      <guid>http://www.sagui.org/~gustavo/blog/fedora/k9copy-1.1.3-rpm</guid>
      <description>
&lt;p&gt;I've updated my RPM package for &lt;a
href="http://k9copy.sourceforge.net/"&gt;K9Copy&lt;/a&gt; to the 1.1.3 release.
Get it &lt;a
href="http://www.sagui.org/~gustavo/blog/static/k9copy-rpm.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
