<?xml version="1.0" encoding="utf-8"?> 
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <generator uri="https://gohugo.io/" version="0.78.2">Hugo</generator><title type="html"><![CDATA[Roy's Blog]]></title>
    
        <subtitle type="html"><![CDATA[Mainly about tech stuff I have a hand in]]></subtitle>
    
    
    
            <link href="https://roy.marples.name/blog/" rel="alternate" type="text/html" title="HTML" />
            <link href="https://roy.marples.name/blog/atom.xml" rel="self" type="application/atom+xml" title="Atom" />
            <link href="https://roy.marples.name/blog/feed.json" rel="alternate" type="application/json" title="Json" />
    <updated>2021-03-12T11:08:32+00:00</updated>
    
    <id>https://roy.marples.name/blog/</id>
        
        <entry>
            <title type="html"><![CDATA[Sadly the cancer has spread]]></title>
            <link href="https://roy.marples.name/blog/posts/cancer_grows/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/cancer_grows/</id>
            
            <published>2021-03-12T10:15:00+00:00</published>
            <updated>2021-03-12T10:15:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>As I blogged about at the start of the year,
<a href="../cancer">I revealed that I have cancer</a>. At the start of February I noticed
a lump on my lump.
This eventually turned into two lumps on my lump and was starting to give me
some pain so I was called in for PET and MRI scans.
Last week I was given the results of these scans and sadly,
the cancer has spread from the single lymph node to my shoulder, spine and liver.
This means that the immunotherapy treatment has failed to work despite the
initial promise of it killing the cancer.</p>
<p>The new treatment plan is a pill based one which targets the cancer itself
to stop it from growing. This, however, is not a cure and the life expectancy
is not great. The median is one year and depending on which study you read
20-40% survive 5 years after which they seem to stop tracking.
At the clinic I go to, one lady reportedly is on 7 years and still ticking.</p>
<p>So there&rsquo;s potentially life in this old boy yet!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/cancer" term="cancer" label="cancer" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Ubiquiti ERLite and the Dodgy Power Supply]]></title>
            <link href="https://roy.marples.name/blog/posts/ubiquiti_erlite_dodgy_power_supply/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ubiquiti_erlite_dodgy_power_supply/</id>
            
            <published>2021-01-24T19:14:00+00:00</published>
            <updated>2021-01-24T19:14:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I recently <a href="../ubiquiti_usg/">posted about that my ERLite died</a>.
Well, it turns out that the flashing green light generally means a power
supply issue. <em>EDIT</em> The ERLite is about 3 and a half years old as I&rsquo;ve
had a few people ask me that.</p>
<p>Not having a spare 12V 1A adapter with the right barrel made testing this
pretty darn hard and desperate times convinced me to buy the USG
<em>(which is still working like a champ, no regrets here!)</em>.
So I waited until everyone was in bed
<em>(not hard due to my medication as I don&rsquo;t sleep much)</em> and used the USG
power supply. Still didn&rsquo;t boot, but performing a hardware reset did!</p>
<p>Unsure what the hardware reset does, maybe update some internal flash a little,
unsure if it touches the USB stick or relies on EdgeOS being installed
rather than say NetBSD, but it&rsquo;s done the trick!
I bought a cheapo 12V 1A AC adapter with the right barrel size and plugged it
in today and it still boots.</p>
<p>This means I can keep the USG powering my internet at blazingly fast speeds
and the ERLite for NetBSD development as it doesn&rsquo;t support any of the
network hardware offload the ERLite has, so throughput suffers as a result.</p>
<p>If anyone from Ubiquiti reads this, please do something about your
power adapters as it seems this <strong>has happened to quite a few customers</strong>
after reading <a href="https://community.ui.com/questions/ERL-Power-supplies-failing/600882c4-0cad-4d00-ae10-1f084bbf12d7">past community posts on your forums</a>!</p>
<p>Thanks to the wonderful folks over at the
<a href="https://mail-index.netbsd.org/port-mips/2021/01/19/msg001001.html">NetBSD port-mips mailing list</a>
for their valuable assistance.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Ubiquiti Security GateWay]]></title>
            <link href="https://roy.marples.name/blog/posts/ubiquiti_usg/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ubiquiti_usg/</id>
            
            <published>2021-01-17T05:54:00+00:00</published>
            <updated>2021-01-17T05:54:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So my trusty <a href="https://www.ui.com/edgemax/edgerouter-lite/">EdgeRouter LITE</a>
died a sad death recently. No data on the console and the ethernet ports
flash green and then stick amber.
This of course meant this site was down for a few days.</p>
<p><img src="ERLite.jpg" alt="My ERLite"></p>
<p>This is a 3 port router. Each port handles 1 Gigabits of traffic.
It&rsquo;s perfect for connecting your ISP with your LAN with a spare port left over.
This is a router for technical people, it&rsquo;s not for others as the setup
is tricky. The Web UI is very dated but functional. It&rsquo;s good enough to
get things going. For more exotic things like say a VPN you need
to use the command line and use the custom configuration tool.</p>
<p>Internally the CPU is a dual MIPS64 Cavium Octeon with 512Mb RAM and more
importantly a removable USB drive which houses the OS. Which means we can
put any OS on we want :) I had a lot of fun working on
NetBSD with this, making things tick for MIPS64 and the exotic
64-bit kernel with 32-bit userland compat gunk.</p>
<p>But as a performance router, anything other than the stock OS is a bad
choice as you then forgo
<a href="https://help.ui.com/hc/en-us/articles/115006567467-EdgeRouter-Hardware-Offloading">Hardware Offloading</a>
which is a massive hit. I get 200mbs down with my ISP, but with NetBSD I was
only getting about 80mbs. You have been warned.</p>
<p>So anyway, it died. I was sad. No shop sold a new ERLite either!
I replaced it with a <a href="https://www.ui.com/unifi-routing/usg/">Unify Security Gateway</a> which ironically enough is the same hardware as the ERLite, just in a
different casing.</p>
<p><img src="USG.jpg" alt="My USG"></p>
<p>The USG is the one with the bright blue square at the top.
And yes, my cable management is lacking!</p>
<p>The big difference between the ERLite and the USG is the software.
The ERLite runs EdgeOS you need to configure it on the router directly.
The USG needs to be setup by a Unify Controller which is a Java application
that can be hosted anywhere. I of course host mine on my NetBSD server!
You can also use a smartphone application as a controller or even better -
talk to your existing one so you don&rsquo;t leave the sofa.
Now, you only need the controller for setup, you don&rsquo;t need to leave it
running all the time unless you&rsquo;re interested in collecting metrics
of your network over time.</p>
<p>I already used the controller to manage my <a href="https://www.ui.com/unifi/unifi-ap-ac-pro/">UAP-AC-Pro</a>
for quite a while so I&rsquo;m quite used to it.
The Web UI is always being improved and it&rsquo;s the most reliable Wireless Access
Point I&rsquo;ve ever had. Once you use this, nothing else will simply do!
For reliable home use anyway. I can play football with the kids on the common
land next to my house and still enjoy good wireless!</p>
<p>Anyway, the USG integrates with this.
First off the bat, don&rsquo;t use the beta interface. Unlike the UAP, the USG setup
is poor here as the firewall setup is in two places which is odd.
Also, there is an issue setting up IPv6 with a tunnel related to the firewall.
Using the classic setup with the v6 controller you can do pretty much all this
aside from the tunnel.</p>
<p>As on the ERLite, my IPv6 tunnel needs to be setup on the commandline.
This time around, I used a provisioning script to setup the tunnel AND
the needed parts in the firewall for it just incase I use the beta screens again.</p>
<p>Coupling the USG with the <a href="https://www.ui.com/unifi-switching/unifi-switch-8/">Unify 8-Port Managed Gigabit Switch</a> and my UAP-AC-Pro wireless point I get
nice metrics on the Unify Controller about the state of my network.
And I do like a good network :)</p>
<p>But what about the performance? Well, here&rsquo;s the interesting part.
Even though it&rsquo;s the same hardware I consistently hit my ISP limits
a lot more than with the ERLite. I would like to think it&rsquo;s due the the software
it runs as it&rsquo;s different, but it&rsquo;s also likely to be some configuration
issue on my part. Or it could have been a sign that the ERLite was already
failing somehow. Either way, I&rsquo;m very very happy with this!</p>
<p>Now, this is <strong>not</strong> a cheap setup.
However, because I self host, I cannot use my ISP&rsquo;s router. So this is my
solution, mainly due to being burned with useless access poinst over the years
and I just went with Ubiquiti from there. The company itself basically sells
near enterprise level devices at SOHO prices making itself very attractive
to people like me.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Cancer - my journey so far]]></title>
            <link href="https://roy.marples.name/blog/posts/cancer/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/cancer/</id>
            
            <published>2021-01-05T18:56:00+00:00</published>
            <updated>2021-01-05T18:56:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Let&rsquo;s face it, 2020 was not a great year for many people due to
<a href="https://www.nhs.uk/conditions/coronavirus-covid-19/">the Covid-19 virus</a>.
For me, it wasn&rsquo;t much of a change as I&rsquo;ve worked at home for many years which
has spared me much of the rigours of Covid.</p>
<p>At the time, Abbey was a front-line worker at a care home and a supermarket.
Luckily her job allowed her to help home school the kids during the lockdown
allowing me to work and then look after the kids while she worked nights and
weekends.</p>
<p>For this, we were incredibly lucky compared to others.</p>
<p>Then just as summer started, Abbey found a lump on my left shoulder close to
my neck.
Really quite small, smaller than the tip of a snooker cue.
Only detectable by pressing quite hard - I was getting a much needed massage
at the time. We looked at it again 2 weeks later and lump still there so off
to the doctors! Doctor said absoloutely nothing to worry about, but just to be
sure they will stick a camera down my throat.</p>
<p>2 months later (yay Covid-19) I finally got to see the throat specialist.
He put a camera up my nose and down my throat. Yuck!!!
He couldn&rsquo;t see anything wrong.
However, the lump was bigger. As the camera turned up nothing, a biopsy
was required.</p>
<p>Now the NHS started to take a bit more seriously and the appointemts came
quicker. Over the coming months I had numerous tests all coming back blank,
the doctors were confused as to the growth. I then had a more invasive biopsy
that finally returned the cause - <a href="https://www.nhs.uk/conditions/melanoma-skin-cancer/">Melanoma</a>. This came as quite a shock to everyone, including the doctors,
as there was no obvious primary site as it starts on top of the skin and
apparently lumps from it don&rsquo;t travel too far.
So I was examined from head to toe and no primary site found.
They even stuck the hateful camera down my throat again via the nose
as the throat specialist wanted another look. Again, nothing.</p>
<p>But this was not a shock to me because I had a golf ball sized lump of Melanoma
removed from my back almost 20 years ago.
At the time it was a simple <em>&ldquo;We&rsquo;ll cut that out right here&rdquo;</em> in the doctors
surgery and I went to work afterwards.
Then I got a letter saying I needed an operation as it was
<a href="https://en.wikipedia.org/wiki/Malignancy">maligant</a>.
The operation was deemed a resounded success and after numerous checkups
I was given the all clear.</p>
<p>But of course, like the best evil villans they always come back for the sequel.
This time around though it&rsquo;s a lot more serious - due to the now sizeable
growth I was sporting and it&rsquo;s was now pressing against my neck an operation
was impossible. Too much vital stuff to cut through as they need to extract
healthy tissue as well to prove they got it all.</p>
<p>Now medical science has come a long way and I embarked on a course of
<a href="https://www.curemelanoma.org/patient-eng/melanoma-treatment/combination-therapy-for-melanoma/nivolumab-opdivo-ipilimumab-yervoy/">Dual Immunotherapy</a>.
This was <a href="https://www.thepharmaletter.com/article/first-immunotherapy-to-be-available-on-nhs-to-prevent-melanoma-returning-post-surgery">only approved for use on the NHS in November 2018</a> so I&rsquo;m very glad the cancer waited for this to be available.</p>
<p>Unlike the prior surgery, this is a lot more dangerous as it takes the brakes off
your immune system and it can attack healthy parts too.
Day zero, my left knee buckled and left me hardly able to walk or get up stairs.
Doctors still doubtful if caused by immunotherapy as it was hours after the
first session, normally it&rsquo;s like over a month.
I&rsquo;ve lost a lot of weight, I barely ate, the pain in my knee was agonising
and left me with little sleep.
I was weak, tired and grumpy. And the lump on my neck got bigger and bigger.</p>
<p>Here is a picture of me and my lump, November 15th.
Now clearly visible and the pressure againt my neck is uncomfortable
at all times.
<img src="./cancer_2020-11-15.jpg" alt="Cancer lump 15th November 2020"></p>
<p>At the end of November, a blood test prior to my 3rd treatment showed that
my liver had gone critical. If not for Covid-19, I would have likely been
hospitalised, but instead we agreed I come come in every day for a blood test
and based on the results, given a dose of <a href="https://www.nhs.uk/medicines/prednisolone/">Prednisolone, a steroid</a> intravenously and then sent home.
Did I mention I had little sleep due to my knee? Now I get even less.
At the worst, I got about 2 hours sleep a night at best it was 4.
Sadly this also meant that I had to stop the immunotherapy as it won&rsquo;t work
with steroids.</p>
<p>The week before Christmas my liver showed signs of recovery and I was
allowed to stay at home taking steroids pills (lower dose I think) and
do a blood test every other day due to the holiday season so they can
remotely monitor my recovery.
But the lump grew again and was pressing really quite hard.
I started to get a lot of pain and the shoulder became impossible to move.
I was getting pretty scared now.
Barely any sleep, plenty of pain and discomfort.</p>
<p>But Christmas itself was a joyous afair. Even with Covid-19, my side of the
family was able to make the yearly trip which I was very thankful for.
I kept on saying to myself <em>Roy, this is the <strong>last</strong> time you&rsquo;ll see them.</em>
Of course they all knew what I was going through and they could see I was
really struggling just moving around.</p>
<p>After Christmas, the pain was too much.
You can see from the below picture just how much the lump has grown in
just over a month.
<img src="./cancer_2020-12-29.jpg" alt="Cancer lump 29th December 2020"></p>
<p>I had a meeting with my specialist over
the phone and based on what I said, she wanted to put me on the targeted
tablet approach. This is not immunotherapy, it&rsquo;s much less invasive to the
system and can be taken on steroids.
It also quickly reduces the size of the growth, giving comfort.
But it also has a low life expectancy - the median is 11.5 months.
Not even a year. Still, more than the 6 months with no treatment.</p>
<p>I did <strong>not</strong> accept this. I have young kids to watch grow up and a loving
wife to grow old with.
Life and time are the two most precious commodoties we will ever have.
Grudgingly, the specialist agreed that we would do more tests to see how
my body was otherwise coping. The most important test was the
<a href="https://www.nhs.uk/conditions/pet-scan/">PET scan</a> which would show if
the cancer had spread.
Even if the tests come back fine, the doctors did not want to offer me a
false hope of restarting the immunotherapy,
because they made it clear right there that the drugs do not
always work. But we knew this already.</p>
<p>So this is how I saw in the New Year.
With the growing pain and growing lump, increasing confusion, short term
memory issues and feeling very light headed,
I was already expecting the worst, but I still wanted the best.
I resolved that if I am given the choice I would
beg to continue the immunotherapy and gamble my life
but I had also accepted that if my body can&rsquo;t take it then I&rsquo;ll take that
last year.</p>
<p>Today, 5 days later, I got the results of the my tests.
Not only had the cancer not spread, <strong>my immune system was killing it!!!</strong>
So, the cancer was being killed from the inside but it was growing on the
outside.
My liver is almost back to normal levels as well and
in 10 weeks I will be steroid free so if I need more immunotherapy
then I can continue with a single drug rather than two. It&rsquo;s kind of a
suppliment to the dual dose of different drugs which you have 4 times.
I got 2 doses, so half way.</p>
<p>So my hope is that I have enough of the dual inside me to kill this
off and if not, I can live long enough to become free of the steroids to
continue the immunotherapy treatment.</p>
<p>From being convinced I was facing terminal cancer in under a year,
I find myself in the <strong>very lucky</strong> position of facing the possibility of
much longer as the treatment is working,
albeit wrecking other parts of me in the process.
But that&rsquo;s a small price to pay&hellip;</p>
<p>Do I dare to dream about the possibility of reaching
<a href="https://www.curemelanoma.org/about-melanoma/melanoma-staging/stage-4-melanoma/">No Evidence of Disease</a>?</p>
<p>Who Dares Wins.</p>
<p>If you made it to here, thanks for reading.
I was in two minds about writing this as I removed myself from many
online groups including gaming and <a href="https://en.wikipedia.org/wiki/Internet_Relay_Chat">IRC</a> technical channels some time ago just giving the grounds of ill health.
I&rsquo;ve always been and still will be reachable via email as I can respond when
I am able to.
This is the first time I&rsquo;ve talked about my condition publicly.
I have no immediate plans to return to the online groups I have left,
but I also felt I needed to write something after todays news that
maybe one day in the future, I might be back.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/cancer" term="cancer" label="cancer" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[GoAccess improvements and the importance of error checking]]></title>
            <link href="https://roy.marples.name/blog/posts/goaccess_improvements/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/goaccess_improvements/</id>
            
            <published>2021-01-03T14:45:00+00:00</published>
            <updated>2021-01-03T14:45:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="https://goaccess.io/">GoAccess</a> is an open-source real-time web log analyzer.
It sports curses and web interfaces.
It looks really pretty and I like that :)</p>
<p>Upstream has already accepted <a href="https://github.com/allinurl/goaccess/pull/1989">my patch to allow a build on NetBSD</a> which is nice.</p>
<p>However, there is still a serious issue - GoAccess burns a LOT of CPU.
With older versions it wasn&rsquo;t too onerous, but now it uses 4 threads and CPU
was going through the roof on my poor web server.
Luckily it turned out it was <a href="https://github.com/allinurl/goaccess/pull/1990">a simple patch</a>.</p>
<p>This is a good example of why we always want to check for errors.
<a href="https://pubs.opengroup.org/onlinepubs/007904875/functions/usleep.html">POSIX usleep</a> documents that if a value of 1000000 or greater is given then
<code>EINVAL</code> is returned immediately.
The default value GoAccess was using for following the tail of the web log
file was also defined as 1000000, which means on a POSIX compliant OS like say
NetBSD, the usleep call did exactly nothing. Hence burning the CPU time.
With this patch, CPU time is now barely measureable :)</p>
<p>But we can still make it <strong>GoFaster</strong> :D</p>
<p>While the CPU was being pegged I noticed it was stuck in the select state.
Well, <a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html">select(2)</a> is not the greatest API ever made.
Luckiy, we now have <a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html">poll(2)</a> which is a massive improvement and as it&rsquo;s a POSIX standard,
highly portable as well.
After a few hours of work, I turned out a <a href="https://github.com/allinurl/goaccess/pull/1991">a fairly complex patch</a> and it works very well!
It&rsquo;s been running on my web server all night and the websocket just ticks over.
The web page I&rsquo;m looking at constantly updated itself.</p>
<p>Huge win for my low powered server, now consuming less power and a great
start to the New Year!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Happy New Year, Happy New Site]]></title>
            <link href="https://roy.marples.name/blog/posts/happy_new_year_2021/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/happy_new_year_2021/</id>
            
            <published>2021-01-02T08:00:00+00:00</published>
            <updated>2021-01-02T08:00:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Welcome to the new blog for 2021!
It&rsquo;s powered by <a href="https://gohugo.io">Hugo</a>
and I&rsquo;ve selected the <a href="https://github.com/thegeeklab/hugo-geekblog">Geekblog</a>
theme to power it.
This handily matches the <a href="https://github.com/thegeeklab/hugo-geekdoc">Geekdoc</a>
theme to power my separated out project documentation.
I did this because my blog was rapidy becoming a series of release
annoucements and started to take away from my ramblings.
It also opens up the possibility of allowing contributors to the project
documentation while keeping my blog to me.</p>
<h2 id="why-change">Why change?</h2>
<p>Well, don&rsquo;t get me wrong, <a href="https://vuepress.vuejs.org/">vuepress</a> is a great
product for what it is. I generally like the <a href="https://vuejs.org/">Vue.js</a>
framework over the others. If you recall,
<a href="../the_perils_of_self_updating_webapps/">I changed from Grav to vuepress back at the start of last year</a></p>
<p>However, the <a href="https://vuepress-plugin-blog.ulivz.com/guide/">vuepress blog plugin</a>
is not really that easy to setup, configure and get going.
It&rsquo;s also not easy to maintain when the tree of plugins breaks.
That&rsquo;s the thing with complex stuff -
one small part breaks and it all falls down.</p>
<p>And this is the reason - a plugin the plugin used broke. It didn&rsquo;t upgrade.
My fault for using <a href="https:/www.NetBSD.org">NetBSD</a> I know.
I did sort of manage to get it working, but the site on my mobile phone showed
the desktop view which made me mad. Tried to upgrade it, no dice.
A this point, I figured I should look around and see if there&rsquo;s anything easier
and voila. Here we are.</p>
<h2 id="what-makes-this-better">What makes this better?</h2>
<p>Well, unlike vuepress, Hugo is in <a href="https://pkgsrc.se/www/hugo">pkgsrc</a> which
makes it a snap to install on NetBSD. Yes, there is sometimes a large lag
between updates in pkgsrc to Hugo which is why I ruled it out when
I changed to vuepress a few years ago as the pkgsrc version was too old
for the themes I wanted. Technically this was because the
<a href="https://pkgsrc.se/lang/go">pkgsrc golang</a> infrastructure was quite new and
not up to it I think.</p>
<p>It&rsquo;s also a lot faster to build the site on my server,
by several orders of magnitude. Speed is always important.</p>
<h2 id="are-you-done-yet">Are you done yet?</h2>
<p>I&rsquo;m an engineer! It&rsquo;s never done, it can always be improved!
There are some things I don&rsquo;t like about Geekblog and Geekdoc.
Both seem to get frequent changes, so hopefully they can be resolved soon.
The Projects and About Me links are temporary as they don&rsquo;t belong in the
tag cloud.</p>
<p>I also need to edit my old blog posts and fix the links where I can.
If you see a broken link, please let me know!</p>
<p>Sadly, I seem to have lost a lot of pictures from Grav.
I thought I had them all backed up, but I&rsquo;ve since re-used the disk.
Also, a lot date to before I used a smart phone to take pictures which are
now auto magically backed up to the cloud.
A real shame, good memories lost.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Capsicum vs Pledge Final Thoughts]]></title>
            <link href="https://roy.marples.name/blog/posts/capsicum_vs_pledge_final_thoughts/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/capsicum_vs_pledge_final_thoughts/</id>
            
            <published>2020-06-15T17:15:00+00:00</published>
            <updated>2020-06-15T17:15:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Following on from <a href="../capsicum_vs_pledge_part2">Capsicum vs Pledge Part 2</a>
I thought I would post my final thougts on the topic as the development
on these sandbox technologies draws to a close in <a href="/projects/dhcpcd">dhcpcd</a>.</p>
<p>But first, let us discuss &hellip;</p>
<h2 id="the-posix-resource-limited-sandbox">The POSIX Resource Limited sandbox</h2>
<p>POSIX documents
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html">setrlimit(2)</a>.
Disabling the ability to open new files, sockets, etc, or create new processes
is actually pretty powerful.</p>
<p>Thanks to the privsep dhcpcd now has to support both Capsicum and Pledge, this
turned out to be pretty easy to implement.
The <em>only</em> issue with this is the
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html">poll(2)</a>
interface which dhcpcd makes great use of.
Implementations found on Linux, OpenBSD and Solaris return <code>EINVAL</code> when the
<code>nfds</code> argument is greater than <code>RLIMIT_NOFILE</code> where-as the other OS&rsquo;s dhcpcd
supports don&rsquo;t.
This means that on Linux, OpenBSD and Solaris an attacker could close
an exiting file descriptor and try to open a new one.
On OpenBSD this is not that much of a big deal because pledge should stop
that from happening.
On Linux and Solaris, they can&rsquo;t open a file thanks to the chrooted empty
directory but they can create a new one.
But thanks to <code>RLIMIT_FSIZE</code> they can&rsquo;t actually write to it.
At most they could create a network socket and send arbitary data over it.
For Linux, we could look into using seccomp to stop this.</p>
<p>For implementations such as NetBSD and FreeBSD, setting <code>RLIMIT_NOFILE</code> to zero
with poll(2) still working means they cannot create any few file descriptor.
This means that if an attacker breaches a resource limited process it
<strong>can only work with the resources it has</strong> because it cannot fork another
process, nor open any files, sockets, etc.
It&rsquo;s also running as an unpriviledged user locked in an empty directory,
so there is nothing to see or do there.
All the resources it currently has are:</p>
<ul>
<li>PF_INET, PF_LINK, etc sockets that can only query for data</li>
<li>network proxy process (receives only, does not send)</li>
<li>BPF processes (send and receive, the read and write filters are also locked)</li>
<li>privileged actioneer (filters ioctls, validates paths and outbound traffic)</li>
</ul>
<p>So the only way to do anything outside of what dhcpcd normally does is to use
a facility that does not need to create a file or socket, or fork a process.
The only remaining avenue of attack is to break the privileged actioneer
process- that cannot be protected by any sandboxing as it needs to do a lot
of stuff. Both OpenBSD&rsquo;s and FreeBSD&rsquo;s dhclient have such a privileged
process as well.</p>
<p>The priviledged actioneer process itself doesn&rsquo;t do a great deal.
For example to add a route on BSD you create a RTM_ADD message.
The master process will do this and instead of writing to the PF_ROUTE socket
itself it will pass the message to the privilged actioneer process which
in turn writes to it&rsquo;s PF_ROUTE socket.
Every ioctl, path accessed or network bound packet is validated by the
privileged actioneer. Even though it&rsquo;s generic, it&rsquo;s also locked down.</p>
<h2 id="so-what-extra-to-capsicum-and-pledge-bring-to-the-table">So what extra to Capsicum and Pledge bring to the table?</h2>
<p>Both bring system call filtering.
For example,
<a href="https://netbsd.gw.com/cgi-bin/man-cgi?sysctl+3+NetBSD-current">sysctl(2)</a>
does not need to create a new resource.
Information available to the ordinal user such as
<a href="https://en.wikipedia.org/wiki/Uname">uname</a> may not be
desirable to leak to these sandboxed processes.
But then the question to ask is what can they do with it?</p>
<p>Pledge overcomes the <code>RLIMIT_NOFILE</code> limitation for poll(2) on OpenBSD.</p>
<p>Capsicum goes a bit futher by limiting rights of each resource you
have in terms of what you can do with them.</p>
<p>What they both bring to the table though is making sandboxing easier.
Here, Pledge is the outright winner. As I pointed out in my initial blog
post, Pledge is really easy.
But make it too easy and it&rsquo;s not as secure as it could be.
Capsicum is harder and the resource limited sandbox is harder still.</p>
<p>The take-away point from this is while Capsicum and Pledge are nice,
they don&rsquo;t beat a good design.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/sandbox" term="sandbox" label="sandbox" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Capsicum vs Pledge in a Network Management Tool ... Part 2]]></title>
            <link href="https://roy.marples.name/blog/posts/capsicum_vs_pledge_part2/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/capsicum_vs_pledge_part2/</id>
            
            <published>2020-05-14T14:00:00+00:00</published>
            <updated>2020-05-14T14:00:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>A few days ago I posted about <a href="../capsicum_vs_pledge">Capsicum vs Pledge</a>
in dhcpcd. Well, I finished the Capsicum integration yesterday so I thought
I would take some time to revisit my findings.</p>
<h2 id="capsicum-is-hard-to-develop-for">Capsicum is hard to develop for</h2>
<p>It&rsquo;s either on or off.
You can limit each FD with capabilites mode off, but I&rsquo;m not sure what that gains
as it&rsquo;s mainly there to allow the FD to be used in the restricted world so
we can treat it as either on or off really.</p>
<p>Pledge is granular, you can turn areas on or off.
For example, you can allow full file access while restricting various ioctls.
Ideally, the only thing you want to pledge is stdio, which is kinda needed
for the Privilege Separation IPC to work.
However, we end up pledging dns inet and route as well.</p>
<p>So why is Capsicum harder? Well, the short answer is that it&rsquo;s not.
The long answer is that it&rsquo;s perceived to be harder because you have to
do all the work up front to get your code working whereas Pledge allows you
do it it piece meal.</p>
<h2 id="pledge-is-as-secure-as-capsicum">Pledge is as secure as Capsicum</h2>
<p>As I said in my prior post, I&rsquo;m not a security expert, but here&rsquo;s my findings:</p>
<p>You can make Pledge as secure as Capsicum, <strong>but you don&rsquo;t have to</strong>.</p>
<p>As a user on OpenBSD I can see lots of processes marked with <code>p</code> to indicate
they have pledged something.
<del>What that something is though is a black box.</del>
You can use <code>ps-o pledge-p $pid</code> to show the promises a process has pledged.
The more promises you see the more that process is allowed to do.
Short list good, long list bad.</p>
<p>As a user on FreeBSD I can see lots of processes marked with &lsquo;C&rsquo; to indicate
they are in Capsicum Capabilites Mode. Because this is just on or off, I
know exactly what this process can and cannot do.</p>
<p>Armed with this knowledge I would trust a Capsicum enabled application more
than a Pledge enabled application. But to fully trust either you still need
to audit the code.</p>
<h2 id="they-both-have-limitations">They both have limitations</h2>
<p>With a Pledged process you cannot change a BPF filter with the bpf pledge.
This is unfortunate, a possible solution could be to spawn a process AND filter
for every address you want to monitor for DaD or ARP pinging.
That <em>could</em> be a lot of resources wasted as BPF is neither infinite nor cheap.</p>
<p>With a Capsicum Capability Mode enabled process you cannot call sendto(2)
that is not connected.
Unlike the above, there is no easy solution.
I can&rsquo;t spawn off another process because unlike normal communication,
because I <strong>need</strong> to bind to the <code>bootpc</code> and <code>dhcpv6-client</code> ports
so I can dictate which source port is used to send the message.
The binding would then fail because the network proxy process
is already using the port.
A possible solution is to call RTM_GET to work out which host I send to
on the local network, craft the packet by hand and send it out using a BPF
socket.</p>
<p>I strongly feel that both should be fixed upstream:</p>
<ul>
<li>the bpf Pledge should allow changing the BPF filter.</li>
<li>Capsicum should allow sendto unconnected if bound to a priviledged port or another capability created to grant to the socket.</li>
</ul>
<p>As it stands, dhcpcd does not Pledge for BPF processes and does not run
the generic network proxy process in Capsicum Capabilites mode.
However, both processes are using the unprivileged user and chrooted to an
empty directory. Neither do any processing of data coming in, they just
ferry it back to the master process via IPC which runs under the same
restrictions but is also sandboxed with Pledge or Capsicum so I&rsquo;m
confident that it&rsquo;s good enough.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/sandbox" term="sandbox" label="sandbox" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Capsicum vs Pledge in a Network Management Tool]]></title>
            <link href="https://roy.marples.name/blog/posts/capsicum_vs_pledge/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/capsicum_vs_pledge/</id>
            
            <published>2020-05-12T11:46:00+00:00</published>
            <updated>2020-05-12T11:46:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So one of the big goals of <a href="/projects/dhcpcd">dhcpcd</a> was to implement
<a href="https://en.wikipedia.org/wiki/Privilege_separation">Privilege Separation</a>.
This was achieved in <a href="/blog/dhcpcd-9-0-0-released.html">dhcpcd-9</a> which was
important because it was a required step of work to
<a href="https://lists.freebsd.org/pipermail/freebsd-net/2019-October/054535.html">merge dhcpcd into FreeBSD base system</a>. Once done, we can then look at what is
required to enable <a href="https://wiki.freebsd.org/Capsicum">Capsicum</a> support,
which is the last required step before dhcpcd can even be considered for
importing into FreeBSD base system.</p>
<p>The good news is that <em>basic</em> Capsicum support has been enabled in
<a href="https://roy.marples.name/cgit/dhcpcd.git/commit/?id=727b7e9bf8b2fe810913c76c5fd36767869944bb">this commit</a> by ensuring all the file descriptors of the
network facing processes are limited in their capability.
The bad news is that <a href="https://www.freebsd.org/cgi/man.cgi?capsicum(4)">capability mode</a> is only enabled for the BPF processes- the end goal is that
the master process is at least placed in capability mode.</p>
<p>So what&rsquo;s the problem? Well, the first problem is that Capsicum is really
hard to use, a lot of this is not helped by the documentation.
It took a long time to work out how it works and how to use it.
The second problem is that capability mode is really hard core- it stops
a lot of stuff working dead in it&rsquo;s tracks by killing access not capability
limited in the global namespace.</p>
<p>From dhcpcds perspective the big issue is that
<del>gethostname(3) and</del> getifaddrs(3) won&rsquo;t work.
This is the biggest show stopper, hard to IPC.</p>
<p><em>EDIT: gethostname(3) does work in Capsicum capabilities mode.</em></p>
<p>Let&rsquo;s just take a moment to talk about getifaddrs(3)- it&rsquo;s a really
powerful interface to work out what interfaces are available to work with.
In some OS it&rsquo;s the only mechanism to get the hardware address assigned
to an interface. Also, it&rsquo;s possible for the route(4) (or netlink(7))
socket to overflow so it&rsquo;s required to re-learn the system state which means
it cannot be cached.
Not that FreeBSD supports reporting route(4) overflow, but that&rsquo;s another story.</p>
<p>Due to the getifaddrs(3) show stopper, I decided to look into
<a href="https://man.openbsd.org/pledge.2">OpenBSDs pledge(2)</a>. While the documentation
is still very technical, it&rsquo;s easier to read and understand compared to
Capsicum. It&rsquo;s also really <em>really</em> <strong>really</strong> easy to implement in comparison
as you only pledge features rather than each file descriptor.
Because of this, it&rsquo;s also very granular.
<a href="https://roy.marples.name/cgit/dhcpcd.git/commit/?id=2f9d9eae5fb8fb1922b0e096e157987ac0df110e">The initial commit to enable pledge</a> is mainly allowing the
current ioctl IPC framework to pass data back again.</p>
<p>But can we do better? Can we operate with the same Pledges that OpenBSDs
dhclient(8) uses? The answer is of course <strong>YES</strong>!
By caching some initial data that does not change such as utsname and
machine uuid AND moving all file IO to privsep,
<a href="https://roy.marples.name/cgit/dhcpcd.git/commit/?id=2f9d9eae5fb8fb1922b0e096e157987ac0df110e">this commit</a>
allows almost perfect Pledge support.
We could go better if privsep gains support for the <code>SIOCGIFGROUP</code> ioctl as
this would allow the <code>inet</code> pledge to be dropped.
It&rsquo;s not quite perfect because
<a href="http://openbsd-archive.7691.n7.nabble.com/pledge-bpf-32bit-arch-unbreak-td299901.html">a Pledged process cannot change a BPF filter</a>.
We would need to space a BPF process per address which is then limited by the
number of BPF instances you are allowed. I&rsquo;m not sure this a good thing, and
ironically BPF processes are the one thing we have in Capsicums capability mode.
This is also a massive improvement over the initial dhcpcd-9 release because
it means we no longer need any files in the chroot directory and <code>/var/empty</code>
can be used again.
This alone should make current and new FreeBSD users of dhcpcd quite happy.
It will also go some way to enabling capabilities mode for the master
dhcpcd process in the future.</p>
<p>Now, I can&rsquo;t say which technology is more secure- that&rsquo;s really not my field
of expertise.
I can&rsquo;t even say if either are really needed or actually make security worse
because Privilege Separation
<a href="https://en.wikipedia.org/wiki/Inter-process_communication">IPC</a>
adds more code, complexity and as such could make it more prone
to bugs some of which could be a security attack vector in itself.</p>
<p>But what I can say is that Pledge is much easier to develop for
because it&rsquo;s really granular unlike Capsicum which is either on or off or
per fd limited.</p>
<p>I&rsquo;ll continue working on Capsicum support in dhcpcd just to see if I can
enable Capabilites Mode in the master process.
When that&rsquo;s finished I will do a more in-depth comparison of these two
technologies.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/sandbox" term="sandbox" label="sandbox" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Being thanked gives me the warm fuzzies]]></title>
            <link href="https://roy.marples.name/blog/posts/2020-05-02_dhcpcd_thanks/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/2020-05-02_dhcpcd_thanks/</id>
            
            <published>2020-05-02T01:05:00+00:00</published>
            <updated>2020-05-02T01:05:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I just got this email and I thought I would share it verbatim:</p>
<blockquote>
<p>I just wanted to thank you for such a great piece of software (dhcpcd)&hellip;</p>
<p>I often forget the people that make all this cool stuff that make linux.
bsd and all the other unixes work&hellip;
so rather sending a bug report, I&rsquo;d just though i&rsquo;d send you a hello!
and thanks for giving my machines ip addresses!!!!!</p>
<p>I was diagnosing a race condition between gnome network manager,
wireless, wpa_supplicant and dhcpcd&hellip;</p>
<p>but that for further research&hellip;
(your software is doing exactly what is should do). :-).</p>
<p>Regards,</p>
<p>Lee</p>
</blockquote>
<p><em>THIS</em> is one of the main reasons I enjoy this hobby of mine &hellip;.
random thoughts of happiness that come in from total strangers that appreciate
that I made something for free that in turn made them happy :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Downgrade is the new Upgrade]]></title>
            <link href="https://roy.marples.name/blog/posts/server_upgrade_2020/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/server_upgrade_2020/</id>
            
            <published>2020-03-23T15:48:00+00:00</published>
            <updated>2020-03-23T15:48:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My home server for a few years has been a
<a href="https://www.gigabyte.com/uk/Mini-PcBarebone/GB-BXBT-1900-rev-10#ov">Gigabyte BRIX 1900</a>.
Aside from powering this site, my email, project mailing lists and source
code repositories, I use use it to host some
<a href="https://wiki.xenproject.org/wiki/Xen_Project_Software_Overview#Guest_Types">VM&rsquo;s as XEN DOMU HVM guests</a>
so I can ensure my code works on many operating systems.
However, the VM hosting brought my server to it&rsquo;s knees.</p>
<p>I&rsquo;ve recently purchased an <a href="https://www.amd.com/en/products/cpu/amd-ryzen-5-2600x">AMD 2600x</a>
which I&rsquo;ve fitted out with 32GB RAM.
This will be my new developer machine <em>(not to self, NOT to use for gaming)</em>,
but I need the 512GB SSD from the old server for this one.
As I have a few spare 120GB SSDs, I decided to downgrade!</p>
<p>In the process I decided to try out <a href="https://en.wikipedia.org/wiki/ZFS">ZFS</a> as
it was recently improved quite a bit in NetBSD.
Turned out there were still a few bugs to iron out, but I worked out a way to
<a href="https://wiki.netbsd.org/wiki/RootOnZFS/">have Root On ZFS</a>.
With lz4 compression enabled, the space savings for my usage are huge!
I&rsquo;m really pleased with ZFS, it seems a lot better than using LVM + FFS + WAPBL.</p>
<p>Taking advantage of a new disk, all the software is very uptodate as well,
and required some curses changes so I could try a few other things out&hellip;.
but more on that later!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[NetBSD curses erase functions fixed]]></title>
            <link href="https://roy.marples.name/blog/posts/curses_erase_fixes/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/curses_erase_fixes/</id>
            
            <published>2020-03-15T07:55:00+00:00</published>
            <updated>2020-03-15T07:55:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=23910">NetBSD PR lib/23910</a>
was filed over 16 years ago.
It describes how NetBSD curses fails to work with <a href="https://vifm.info/">Vifm</a>,
a <a href="https://www.vim.org/">Vim</a> interface for a curses GUI file manager.
It&rsquo;s quite a nice idea after playing around with it some as Vim is my favourite
text editor.</p>
<p>Since I was the main protagonist in bringing <a href="terminfo_married_to_curses.html">terminfo to NetBSD</a>, I had a reasonable grasp on how our curses worked and
I had looked at this bug before, but left scratching my head over it.</p>
<p>Since I looked at it, Valery Ushakov added a simple test case to demonstrate
the issue.</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-c" data-lang="c"><span style="color:#099">#include</span> <span style="color:#099">&lt;curses.h&gt;</span><span style="color:#099">
</span><span style="color:#099">#include</span> <span style="color:#099">&lt;err.h&gt;</span><span style="color:#099">
</span><span style="color:#099">#include</span> <span style="color:#099">&lt;stdio.h&gt;</span><span style="color:#099">
</span><span style="color:#099">#include</span> <span style="color:#099">&lt;stdlib.h&gt;</span><span style="color:#099">
</span><span style="color:#099">#include</span> <span style="color:#099">&lt;unistd.h&gt;</span><span style="color:#099">
</span><span style="color:#099"></span>
<span style="color:#078;font-weight:bold">int</span>
<span style="color:#c0f">main</span>()
{
	<span style="color:#069;font-weight:bold">const</span> <span style="color:#078;font-weight:bold">char</span> <span style="color:#555">*</span>errmsg <span style="color:#555">=</span> <span style="color:#366">NULL</span>;
	<span style="color:#078;font-weight:bold">int</span> err;

<span style="color:#099">#define CHECKERR(_msg)					\
</span><span style="color:#099">	do {						\
</span><span style="color:#099">		if (err != OK) {			\
</span><span style="color:#099">			errmsg = _msg &#34; failed&#34;;	\
</span><span style="color:#099">			goto out;			\
</span><span style="color:#099">		}                                       \
</span><span style="color:#099">	} while (0)
</span><span style="color:#099"></span>

	WINDOW <span style="color:#555">*</span>scrw <span style="color:#555">=</span> initscr();
	<span style="color:#069;font-weight:bold">if</span> (scrw <span style="color:#555">==</span> <span style="color:#366">NULL</span>)
		errx(EXIT_FAILURE, <span style="color:#c30">&#34;initscr failed</span><span style="color:#c30;font-weight:bold">\n</span><span style="color:#c30">&#34;</span>);

	<span style="color:#069;font-weight:bold">if</span> (<span style="color:#555">!</span>has_colors()) {
		errmsg <span style="color:#555">=</span> <span style="color:#c30">&#34;no colors&#34;</span>;
		<span style="color:#069;font-weight:bold">goto</span> out;
	}

	err <span style="color:#555">=</span> start_color();
	CHECKERR(<span style="color:#c30">&#34;start_color&#34;</span>);

	err <span style="color:#555">=</span> init_pair(<span style="color:#f60">2</span>, COLOR_WHITE, COLOR_RED);
	CHECKERR(<span style="color:#c30">&#34;init_pair&#34;</span>);

	<span style="color:#078;font-weight:bold">int</span> maxy, maxx;
	getmaxyx(stdscr, maxy, maxx);

	WINDOW <span style="color:#555">*</span>lborder <span style="color:#555">=</span> newwin(maxy<span style="color:#555">-</span> <span style="color:#f60">1</span>, <span style="color:#f60">1</span>, <span style="color:#f60">0</span>, <span style="color:#f60">0</span>);
	<span style="color:#069;font-weight:bold">if</span> (lborder <span style="color:#555">==</span> <span style="color:#366">NULL</span>) {
		errmsg <span style="color:#555">=</span> <span style="color:#c30">&#34;newwin failed&#34;</span>;
		<span style="color:#069;font-weight:bold">goto</span> out;
	}

	wbkgdset(lborder, COLOR_PAIR(<span style="color:#f60">2</span>));

	werase(lborder);

	mvwaddstr(lborder, <span style="color:#f60">0</span>, <span style="color:#f60">0</span>, <span style="color:#c30">&#34;A&#34;</span>);
	mvwaddstr(lborder, maxy<span style="color:#555">-</span> <span style="color:#f60">2</span>, <span style="color:#f60">0</span>, <span style="color:#c30">&#34;Z&#34;</span>);

	wnoutrefresh(stdscr);
	wnoutrefresh(lborder);
	doupdate();

	sleep(<span style="color:#f60">5</span>);
<span style="color:#99f">out</span>:
	endwin();

	<span style="color:#069;font-weight:bold">if</span> (err <span style="color:#555">!=</span> OK) {
		<span style="color:#069;font-weight:bold">if</span> (errmsg <span style="color:#555">==</span> <span style="color:#366">NULL</span>)
			errmsg <span style="color:#555">=</span> <span style="color:#c30">&#34;unknown error&#34;</span>;
		fprintf(stderr, <span style="color:#c30">&#34;%s</span><span style="color:#c30;font-weight:bold">\n</span><span style="color:#c30">&#34;</span>, errmsg);
		<span style="color:#069;font-weight:bold">return</span> EXIT_FAILURE;
	}

	<span style="color:#069;font-weight:bold">return</span> EXIT_SUCCESS;
}
</code></pre></div><p>He then noted that using <code>wbkgd</code> instead of <code>wbkgdset</code> makes it work.</p>
<p>Now, the difference between the two is that <code>wbkgd</code> forces new attributes on
the whole window background, whereas <code>wbkgdset</code> sets new attributes
<strong>for new actions on the window</strong>.
Keen observers will notice that the following function called is <code>werase</code>,
which does what it says on the tin and erases the window but also
<strong>resetting the attributes</strong> of the contents.
So, I looked at this function and noticed the attribute checking code was
faulty and a <a href="http://anonhg.netbsd.org/src/rev/068b7d4abae7">simple fix</a>
was enough to solve it!</p>
<p>Valery then pointed out that <code>wclrtoeol</code> probably needed fixing to and as it
turned out, <code>wclrtobot</code> likewise.
As it transpired, all 3 had different logic in working out when to erase
something!
We went through a few iterations of patches to harmonise the code and have
settled on a macro that all 3 now share, so hopefully no more erasing issues
in our curses.</p>
<p>As a follow on task, I should go through the NetBSD bug backlog and see
if this fixes any other reported issues.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[terminfo numeric parameters promoted from short to int]]></title>
            <link href="https://roy.marples.name/blog/posts/terminfo_int_paramters/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/terminfo_int_paramters/</id>
            
            <published>2020-03-15T07:55:00+00:00</published>
            <updated>2020-03-15T07:55:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="https://pubs.opengroup.org/onlinepubs/007908799/xcurses/terminfo.html">POSIX mandates implementations must support upto a short but may exceed it</a>.
When NetBSD terminfo was implemented, no terminfo description used over
a short, but because ncurses has supported ints for some time, some now do.</p>
<p>Infact, such a terminfo description was imported where colour pairs for
screen-256color went up to 65536 which exposed a bug in the existing
implementation where it was set to zero. Because the number might mean
something more than a range, we need to be able to store it accurately.</p>
<p>This requires a version bump because whilst the API hasn&rsquo;t changed thanks
to <a href="https://www.geeksforgeeks.org/integer-promotions-in-c/">C int promotion</a>,
the ABI has. Also the underlying database structure
has changed as well- we now store the numeric parameter inside a uint32_t
field rather than a uint16_t one.
Whilst this change can still read the old style database, the old one
cannot read the new one and thus we now maintain the database as
terminfo2.cdb, leaving the old library and database alone so old programs
still work fine.</p>
<p>libcurses, libfrom, libmenu and libpanel have also been bumped to
accomoate this change.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The Perils of Self Updating Web Apps]]></title>
            <link href="https://roy.marples.name/blog/posts/the_perils_of_self_updating_webapps/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_perils_of_self_updating_webapps/</id>
            
            <published>2020-02-18T00:00:00+00:00</published>
            <updated>2020-02-18T00:00:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I&rsquo;ve used <a href="https://getgrav.org/">Grav</a> since 2017 to power my project and
blog pages.
It&rsquo;s a
<a href="https://en.wikipedia.org/wiki/Flat-file_database">flat-file</a>
<a href="https://en.wikipedia.org/wiki/Content_management_system">Content Management System</a>.
It&rsquo;s really easy to use and takes away a lot of the pain of setup.
By easy to use I mean you don&rsquo;t ever have to use the command line after
the initial setup and the admin pages and general look and feel are really
nice and clean.</p>
<p>Internally, Grav uses
<a href="https://daringfireball.net/projects/markdown/syntax">markdown</a>
files to store the user pages using
<a href="https://learn.getgrav.org/16/content/headers">frontmatter</a>
to store meta-data such as tags, publication date, etc.
It seems that a log of blog and cms systems use this of late as it entirely
removes the need for a database and isn&rsquo;t that hard to pickup.</p>
<h2 id="what-went-wrong">What went wrong?</h2>
<p>Well, every time you login to the Grav admin page it checks for updates
and casually lets you know there&rsquo;s an upgrade via a popup.
It also checks all installed modules as well.
It makes upgrading painless &hellip;.. except when it goes wrong.
Basically Grav complained about the gateway timing out via a popup.</p>
<p>Oh dear!</p>
<p>Refresh the page and boom, presented with a <code>Please run bin/grav install</code>
banner on a white screen.</p>
<p>Okay&hellip;. this might have been a harmless timeout.
So I login via ssh, goto the needed directory and run the installer and I
see many errors like so:
<code>tls_process_server_certificate:certificate verify failed</code>.</p>
<p>This is because, like all systems today, Grav uses many 3rd party things
and downloads them from other sites.
Why this suddenly started happening recently I don&rsquo;t know- I&rsquo;ve not
updated my server at all.</p>
<p>To be clear, this isn&rsquo;t Grav&rsquo;s fault or error- the failure is somewhere in
<a href="https://www.php.net/">PHP</a>, <a href="https://www.openssl.org/">OpenSSL</a> or
the website in questions <a href="https://en.wikipedia.org/wiki/HTTPS">HTTPS</a>
configuration.</p>
<h2 id="what-can-be-done-about-it">What can be done about it?</h2>
<p>It&rsquo;s possible to fix it for sure, but maybe this is the wrong approach.
The vast majority of my site does not accept <em>any</em> data and
<a href="https://bejamas.io/blog/static-site-generators/">Static Site Generators</a>
have come a long way since I last looked at them.
The idea being that a static site has zero runtime dependencies so it&rsquo;s
always working. The downside being it can still go wrong as can any other
application but you, the end user, does not see this.
The other downside is that they build a lot of files and this takes time.</p>
<p>All of them seem to use Markdown and Frontmatter like Grav as their
data storage so in theory it should be fairly simple to install some
and try them out.</p>
<p>I settled on <a href="https://vuepress.vuejs.org/">VuePress</a> mainly because I
use <a href="https://vuejs.org/">Vue.js</a> on a side project I&rsquo;m working on.
VuePress is mainly for documentation though
<em>(ie, perfect for my open source projects)</em> but as it turns out isn&rsquo;t that
great for blogs!
Luckily
<a href="https://github.com/vuepressjs/vuepress-theme-blog">there is a blog plugin</a>,
but the the downside is that you need to set it up as a different site.
Thanks to too much cleverness in VuePress, my blog link looks like
an external site which I&rsquo;m not overly keen on.
Also, the blog insits on using the date in URLs which I&rsquo;m not too sure about
either.</p>
<p>But it&rsquo;s a start, it&rsquo;s up and working and renders really well on mobile devices.
Let&rsquo;s see how long this lasts :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Anonymity Profiles for DHCP Clients aka RFC 7844]]></title>
            <link href="https://roy.marples.name/blog/posts/anonymity_profiles_for_dhcp_clients/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/anonymity_profiles_for_dhcp_clients/</id>
            
            <published>2020-01-15T17:39:00+00:00</published>
            <updated>2020-01-15T17:39:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>DHCP clients by default send a fair chunk of data which can identify you to the local DHCP server.
In return they provide you with a stable IP address and configuration parameters.</p>
<p>At a bare minimum, the hardware address of the interface is sent- this is <strong>required</strong> to work.</p>
<p>So, how to solve this dilema of wanting total anonymity?
The answer is to randomise the hardware address. This will happen when the carrier is down OR dhcpcd starts with the interface down.
Then, dhcpcd will use this random hardware address to set a DUID LL which will be used inplace of any saved DUID and set the IAID to all zeros.
This combo is used by DHCP and DHCPv6 to identify a lease.
As this is randomised each time the carrier comes up you get a different IP address!</p>
<p>Try not to use this on an unstable link as it could drain the DHCP server of addresses :(</p>
<p>But we can&rsquo;t stop there!
dhcpcd also sends some identifying options as well! For example, this is sent in the vendor class identifier:<br>
<code>dhcpcd-8.99.0:NetBSD-9.99.17:amd64:x86_64</code></p>
<p>It does not identify you or the device in anyway, but it does say what software is being used on which hardware.
This <em>could</em> be used by DHCP servers to hand out a specific image to download and boot from TFTP for network boot clients.</p>
<p>Now, there are a gazzillion and one DHCP options out there- we don&rsquo;t know what you&rsquo;ve configured.
So dhcpcd will mask <strong>all</strong> of them when anonymous mode is activated, unless they are essential for enabling dhcpcd to work correctly on the network.
But wait! What if you really want to leak something? Like say your on a corporate network that uses DHCP security and still want to remain anonymous?
Well you can! Any request or option <strong>after</strong> the anonymous option in <code>dhcpcd.conf</code> is turned on.
So the placing of the anonymous directive is important, unlike other dhcpcd options. So far this is the only implementation of <a href="https://tools.ietf.org/html/rfc7844">RFC 7844</a> which does this :)</p>
<p>This is <em>NOT</em> enabled by default because most people want stable addresses <em>AND</em> a flappy link could drain addresses as disussed earlier.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[structure padding in C]]></title>
            <link href="https://roy.marples.name/blog/posts/structure_padding_in_c/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/structure_padding_in_c/</id>
            
            <published>2020-01-09T01:06:00+00:00</published>
            <updated>2020-01-09T01:06:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Whilst developing <a href="https://en.wikipedia.org/wiki/Privilege_separation">Privilege Separation</a> in <a href="/projects/dhcpcd">dhcpcd</a>, I had to come up with an <a href="https://en.wikipedia.org/wiki/Inter-process_communication">IPC</a> design for it.
Of course, that involves creating <a href="https://en.wikipedia.org/wiki/Struct_(C_programming_language)">structures</a>.</p>
<p>So far, my structures in dhcpcd are long lived- or rather the scope is design to live outside of where it was created.
As such they are created on the <a href="https://en.wikipedia.org/wiki/Heap_(data_structure)">heap</a> and are at the <a href="https://cpp4arduino.com/2018/11/06/what-is-heap-fragmentation.html">mercy of malloc</a>.
Generally I use <a href="https://pubs.opengroup.org/onlinepubs/009695399/functions/calloc.html">calloc</a> so that the whole area is inited to zero as <a href="https://en.wikipedia.org/wiki/Uninitialized_variable">uninitialised memory is bad</a>.</p>
<p>So I decided to start out and see if I can just create the structures I need on the stack.
Turns out I could! Yay!
Now, how to you initialise a structure on the stack to all zeros?
First let us consider this structure:</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-c" data-lang="c"><span style="color:#069;font-weight:bold">struct</span> ps_addr {
	sa_family_t psa_family;
	<span style="color:#069;font-weight:bold">union</span> {
		<span style="color:#069;font-weight:bold">struct</span> in_addr psau_in_addr;
		<span style="color:#069;font-weight:bold">struct</span> in6_addr psau_in6_addr;
	} psa_u;
<span style="color:#099">#define	psa_in_addr		psa_u.psau_in_addr
</span><span style="color:#099">#define	psa_in6_addr	psa_u.psau_in6_addr
</span><span style="color:#099"></span>};
</code></pre></div><p>The first way is memset:</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-c" data-lang="c"><span style="color:#069;font-weight:bold">struct</span> ps_addr psa;

memset(<span style="color:#555">&amp;</span>psa, <span style="color:#f60">0</span>, <span style="color:#069;font-weight:bold">sizeof</span>(psa));
psa.psa_family <span style="color:#555">=</span> AF_INET;
</code></pre></div><p>But what if you could avoid memset?
Luckily the <a href="https://www.dribin.org/dave/blog/archives/2010/05/15/c99_syntax/">C standard allows setting any member and will zero all other members</a>.
So we can do this:</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-c" data-lang="c"><span style="color:#069;font-weight:bold">struct</span> ps_addr psa <span style="color:#555">=</span> { .psa_family <span style="color:#555">=</span> AF_INET };
</code></pre></div><p>Wow!!! So simple. This reduces binary size a fair bit.
But <strong>then</strong> I turned on the <a href="https://github.com/google/sanitizers/wiki/MemorySanitizer">Memory Sanitiser</a> and boom, it crashed hard.
Why?</p>
<p>The answer is simple- padding.
<a href="http://www.catb.org/esr/structure-packing/">Eric S Raymond gives a very good writeup</a> about the problem.
Basically, the standard will initialise any unintialised members to zero- but padding added for alignent isn&rsquo;t a member!
So we need to ensure that our structure requires zero padding.</p>
<p>Here is the new struct:</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-c" data-lang="c"><span style="color:#069;font-weight:bold">struct</span> ps_addr {
	sa_family_t psa_family;
	uint8_t psa_pad[<span style="color:#f60">4</span><span style="color:#555">-</span> <span style="color:#069;font-weight:bold">sizeof</span>(sa_family_t)];
	<span style="color:#069;font-weight:bold">union</span> {
		<span style="color:#069;font-weight:bold">struct</span> in_addr psau_in_addr;
		<span style="color:#069;font-weight:bold">struct</span> in6_addr psau_in6_addr;
	} psa_u;
<span style="color:#099">#define	psa_in_addr		psa_u.psau_in_addr
</span><span style="color:#099">#define	psa_in6_addr	psa_u.psau_in6_addr
</span><span style="color:#099"></span>};
</code></pre></div><p>And it allows the former structure initialisation to work and memory sanitisers are happy- so happy days :)
Now, if anyone can tell me what I can use instead of the magic number 4 in the above I&rsquo;d be even happier!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd added to DragonFlyBSD .... FreeBSD next?]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_added_to_dragonflybsd_freebsd_next/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_added_to_dragonflybsd_freebsd_next/</id>
            
            <published>2019-10-14T09:53:53+00:00</published>
            <updated>2019-10-14T09:53:53+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So, <a href="http://lists.dragonflybsd.org/pipermail/users/2018-November/357989.html">dhcpcd was added to DragonFlyBSD almost a year ago</a>.
Recently <a href="https://gitweb.dragonflybsd.org/dragonfly.git/commit/3f628449363f40a7487918e1bdb8b7ec6e8e2b3d">I&rsquo;ve become a DragonFlyBSD committer</a> with the express purpose of easing dhcpcd into the role of the default DHCP client.</p>
<p>All of the really needed kernel improvements are now in and dhcpcd doesn&rsquo;t log any more compile warnings, but there is more work to be done such as <a href="https://tools.ietf.org/html/rfc5227">RFC 5227 support</a>, restarting DaD on link state up and denying the use of an address until validated. I&rsquo;m quite enjoying working on DragonFlyBSD &hellip; their SMP approach is very interesting and in many ways much easier to work with than NetBSDs fine grained locking approach.</p>
<p>And then out of the blue, a discussion crops up on the FreeBSD mailing list about <a href="https://lists.freebsd.org/pipermail/freebsd-net/2019-October/054474.html">putting dhcpcd into the FreeBSD base system</a>! This has led into me working on <a href="https://en.wikipedia.org/wiki/Privilege_separation">Priviledge Seperation</a> which seems to be the only show stopper for FreeBSD acceptance. <a href="https://lists.freebsd.org/pipermail/freebsd-net/2019-October/054559.html">I have a reasonable idea on how this should work</a> and hopefully this will be enough.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[open_memstream]]></title>
            <link href="https://roy.marples.name/blog/posts/open_memstream/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/open_memstream/</id>
            
            <published>2019-07-20T13:52:00+00:00</published>
            <updated>2019-07-20T13:52:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/open_memstream.html">open_memstream</a> is one of the more important functions added to POSIX libc of late. It&rsquo;s so important because it makes the generation of strings really easy- you no longer need to care about allocating the right amount of memory as the library will do it for you.
Now, there&rsquo;s many functions that already help with this, such as <a href="https://netbsd.gw.com/cgi-bin/man-cgi?asprintf">asprintf</a> but that&rsquo;s not standard and if you want to create many strings in one area you still need to care about the size of the area. You want to create an area if you have many strings, because it&rsquo;s more efficient for malloc and if you keep the area around and re-use it then it avoids <a href="https://stackoverflow.com/questions/3770457/what-is-memory-fragmentation">memory fragmentation</a>.</p>
<p>Now, to be clear, <em>you have been able to do this since forever</em> using <a href="https://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.html">fopen</a>, writing to the file and then allocating your area based on the final file size. Still, it requires some memory management still but more importantly <em>it writes to a file</em>. Writing to a file is slow and reduces the life span of the disk you&rsquo;re writing to. It&rsquo;s only been fairly recently that <a href="https://en.wikipedia.org/wiki/Tmpfs">tmpfs</a> was a thing, but even today not all OS&rsquo;s have /tmp mounted as tmpfs. Requiring this isn&rsquo;t exactly ideal for a generic program to do- the setup and install should be easy.
Because of all these reasons, most programs worked the string length needed and either allocated an area or string and then finally write the string. However, while saving the disk, it&rsquo;s also a lot more error prone because you need to work out the length of everything and that&rsquo;s not always trivial, especially for things like a DHCP client which is always building strings based on the information given by the DHCP server.</p>
<p>Here&rsquo;s an example of <code>open_memstream</code> in action:</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-c" data-lang="c"><span style="color:#09f;font-style:italic">/*
</span><span style="color:#09f;font-style:italic"> * Example program which manages an area of environment strings
</span><span style="color:#09f;font-style:italic"> * to send to child programs.
</span><span style="color:#09f;font-style:italic"> */</span>

<span style="color:#099">#include</span> <span style="color:#099">&lt;stdio.h&gt;</span><span style="color:#099">
</span><span style="color:#099">#include</span> <span style="color:#099">&lt;stdlib.h&gt;</span><span style="color:#099">
</span><span style="color:#099">#include</span> <span style="color:#099">&lt;unistd.h&gt;</span><span style="color:#099">
</span><span style="color:#099"></span>
<span style="color:#069;font-weight:bold">static</span> <span style="color:#069;font-weight:bold">const</span> <span style="color:#078;font-weight:bold">char</span> <span style="color:#555">*</span>foo <span style="color:#555">=</span> <span style="color:#c30">&#34;foo&#34;</span>;
<span style="color:#069;font-weight:bold">static</span> <span style="color:#069;font-weight:bold">const</span> <span style="color:#078;font-weight:bold">char</span> <span style="color:#555">*</span>bar <span style="color:#555">=</span> <span style="color:#c30">&#34;bar&#34;</span>;

<span style="color:#078;font-weight:bold">int</span> <span style="color:#c0f">main</span>(<span style="color:#078;font-weight:bold">void</span>)
{
        <span style="color:#078;font-weight:bold">char</span> <span style="color:#555">*</span>argv[] <span style="color:#555">=</span> { <span style="color:#c30">&#34;/usr/bin/env&#34;</span>, <span style="color:#366">NULL</span> };
        <span style="color:#078;font-weight:bold">char</span> <span style="color:#555">*</span>buf, <span style="color:#555">*</span>ep, <span style="color:#555">*</span>p, <span style="color:#555">**</span>env, <span style="color:#555">**</span>envp;
        size_t buflen, nenv, i;
        FILE <span style="color:#555">*</span>fp <span style="color:#555">=</span> open_memstream(<span style="color:#555">&amp;</span>buf, <span style="color:#555">&amp;</span>buflen);

        fprintf(fp, <span style="color:#c30">&#34;FOO=%s&#34;</span>, foo);
        fputc(<span style="color:#c30">&#39;\0&#39;</span>, fp);
        fprintf(fp, <span style="color:#c30">&#34;BAR=%s&#34;</span>, bar);
        fputc(<span style="color:#c30">&#39;\0&#39;</span>, fp);

        <span style="color:#09f;font-style:italic">/* We could keep fp around as our area and just rewind it. */</span>
        fclose(fp);

        <span style="color:#09f;font-style:italic">/* execve relies on a trailing NULL */</span>
        nenv <span style="color:#555">=</span> <span style="color:#f60">1</span>;
        <span style="color:#069;font-weight:bold">for</span> (p <span style="color:#555">=</span> buf, ep <span style="color:#555">=</span> p <span style="color:#555">+</span> buflen; p <span style="color:#555">&lt;</span> ep; p<span style="color:#555">++</span>) {
                <span style="color:#069;font-weight:bold">if</span> (<span style="color:#555">*</span>p <span style="color:#555">==</span> <span style="color:#c30">&#39;\0&#39;</span>)
                        nenv<span style="color:#555">++</span>;
        }

        <span style="color:#09f;font-style:italic">/* reallocarray(3) should be standard really */</span>
        envp <span style="color:#555">=</span> env <span style="color:#555">=</span> malloc(nenv <span style="color:#555">*</span> <span style="color:#069;font-weight:bold">sizeof</span>(<span style="color:#078;font-weight:bold">char</span> <span style="color:#555">*</span>));
        <span style="color:#555">*</span>envp<span style="color:#555">++</span> <span style="color:#555">=</span> buf;
        <span style="color:#069;font-weight:bold">for</span> (p <span style="color:#555">=</span> buf, ep<span style="color:#555">--</span>; p <span style="color:#555">&lt;</span> ep; p<span style="color:#555">++</span>) {
                <span style="color:#069;font-weight:bold">if</span> (<span style="color:#555">*</span>p <span style="color:#555">==</span> <span style="color:#c30">&#39;\0&#39;</span>)
                        <span style="color:#555">*</span>envp<span style="color:#555">++</span> <span style="color:#555">=</span> p <span style="color:#555">+</span> <span style="color:#f60">1</span>;
        }
        <span style="color:#555">*</span>envp <span style="color:#555">=</span> <span style="color:#366">NULL</span>;

        execve(argv[<span style="color:#f60">0</span>], argv, env);
}
</code></pre></div><p>As you can see, we only manage the environment array handed to to <code>execve</code>.
<code>open_memstream</code> is managing our string area and <code>fprintf</code> is working out the
length each string needs to be for us.
This vastly reduces the complexity and increases the security and reliabilty
of creating large environment strings, which most DHCP clients do.
We could also write a helper function to write the string AND the trailing
NULL terminator for the string to be more efficient.
You&rsquo;ll get to see this in dhcpcd-8 which should be released later this year.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Red-Black Tree]]></title>
            <link href="https://roy.marples.name/blog/posts/red_black_tree/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/red_black_tree/</id>
            
            <published>2019-07-04T13:43:00+00:00</published>
            <updated>2019-07-04T13:43:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Pretty much every piece of software I&rsquo;ve seen uses a list of objects. When you need to easily grow and shrink this list easily you then need something like a <a href="https://en.wikipedia.org/wiki/Linked_list">Linked List</a>.
dhcpcd has used very popular and widely available BSD based <a href="https://netbsd.gw.com/cgi-bin/man-cgi?queue+3+NetBSD-current">queue(3), specifically a tailq</a>. The main advantages of this type of list are:</p>
<ul>
<li>Very low extra memory needed for it&rsquo;s implementation</li>
<li>Fast at insertion and removal operation- both are O(1)</li>
</ul>
<p>However, it&rsquo;s just a list. And like any list, to find something we need to pick a starting point and then search in a single direction and match each item until we find it.
This is described as O(N) and it&rsquo;s performance roughly corrolates to the Number of objects in the list. If you need to insert at an arbitary point <em>(for example to order the list)</em> you need to search it, so this is O(N) also.</p>
<p>But is this slow?</p>
<p>Typically for dhcpcd, the answer is no because on a desktop, tablet, phone or SOHO router you only have a handful of objects in all the lists.
However, <a href="https://roy.marples.name/archives/dhcpcd-discuss/0002332.html">someone ran dhcpcd on a switch with millions of routes</a> and dhcpcd was taking minutes of CPU time for routing table modifications. So in this corner case &hellip; yes! dhcpcd is slow!
A suggestion to improve matters was given in that report- use a <a href="https://en.wikipedia.org/wiki/Red%E2%80%93black_tree">Red-Black Tree</a> instead of a Linked List. A RB tree guarantees O(log N) performance for searching. A patch was even submitted based on OpenBSD&rsquo;s tree implementation!
This reduced the dhcpcd runtime from minutes to seconds in his situation.</p>
<p>Now you can&rsquo;t just swap in a RB Tree for a Linked List. Each object within an RB Tree has to have a unique key. Also, you need to have comparison function to define an order to the objects within the tree.
Only then can you start to implement it. To find an object within the tree, you just need to know it&rsquo;s key and off you go.
I settled on using NetBSD&rsquo;s <a href="https://netbsd.gw.com/cgi-bin/man-cgi?rbtree+3+NetBSD-current">rbtree(3)</a> implementation instead of the initial suggestion to use the generic BSD <a href="https://netbsd.gw.com/cgi-bin/man-cgi?tree+3+NetBSD-current">tree(3)</a>.
This mainly to reduce the binary size of dhcpcd because it&rsquo;s in libc on NetBSD and on other systems it will creates a smaller binary due to the complexity of the tree(3) macros.
Testing also showed it was slightly faster and also easier to actually develop with.</p>
<p>So should you replace all LinkedLists with RB Trees? No! That would be silly :)
After all, sometimes you don&rsquo;t actually need to search or order a list- a lot of the time, lists are used for push/pop operations and thus gain nothing from RB Tree.</p>
<p>You&rsquo;ll get to see this in dhcpcd-8 which should be released later this year.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Each BSD is it's own special networking snowflake]]></title>
            <link href="https://roy.marples.name/blog/posts/each_bsd_is_its_own_special_networking_snowflake/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/each_bsd_is_its_own_special_networking_snowflake/</id>
            
            <published>2018-11-30T11:32:39+00:00</published>
            <updated>2018-11-30T11:32:39+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So after maintaining <a href="https://roy.marples.name/projects/dhcpcd">dhcpcd</a>
<em>(an automated network configuration tool)</em> for quite a few years now on
various BSD platforms I find myself constantly amazed by their little differences.
For various reasons, my code talks directly to the kernel to manipulate addresses and routes in ways it&rsquo;s simply not possible using <a href="http://netbsd.gw.com/cgi-bin/man-cgi?ifconfig+8+NetBSD-current">ifconfig(8)</a> or <a href="http://netbsd.gw.com/cgi-bin/man-cgi?route+8+NetBSD-current">route(8)</a>.</p>
<p>I&rsquo;ve reported various bugs upstream, sometimes supplied patches. dhcpcd these days works pretty darned well on all BSD platforms out of the box, but there are still some caveats where dhcpcd has to work differently to do the same job.
This article focuses on the big three, <a href="https://www.netbsd.org/">NetBSD</a>, <a href="https://www.openbsd.org/">OpenBSD</a> and <a href="https://www.freebsd.org/">FreeBSD</a>.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Hello Phabricator]]></title>
            <link href="https://roy.marples.name/blog/posts/hello_phabricator/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/hello_phabricator/</id>
            
            <published>2018-10-14T21:44:06+00:00</published>
            <updated>2018-10-14T21:44:06+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After waving a <a href="/blog/goodbye-fossil">fond farewell to Fossil</a> I give a hearty hello to <a href="https://secure.phabricator.com/">Phabricator</a>!</p>
<h3 id="the-good">The Good</h3>
<p>Phabricator is written in <a href="http://php.net/manual/en/intro-whatis.php">PHP</a> which means I don&rsquo;t have to install <a href="https://xkcd.com/927/">Yet Another</a> <a href="https://en.wikipedia.org/wiki/Software_framework">Framework</a>. I use quite a few things that depend on PHP on this site already, such as <a href="https://getgrav.org/">Grav</a> and <a href="https://roundcube.net/">RoundCube</a>. So of course, it allows me to self host. Or you can rent a <a href="https://www.phacility.com/">Phabricator VPS @ Phacility</a>.</p>
<p>The sign up process <em>(to my Phabricator instance, not somewhere else)</em> is very straight-forward, allowing email/password with <a href="https://www.google.com/recaptcha/intro/invisible.html">ReCaptha</a> or use a <a href="https://oauth.net/2/">OAuth2</a> provider such as <a href="https://developers.google.com/identity/protocols/OAuth2">Google</a>. So this is very socially acceptable and should be secure from <a href="https://en.wikipedia.org/wiki/Spambot">spambots</a>.</p>
<p>The core work is based around the ease of code auditing and review of patches. There is even a <a href="https://en.wikipedia.org/wiki/Pastebin">pastebin</a> so users can upload config files and logs for analysis. Doing all this in a mailing list over the years results in things being here, there and everywhere &hellip;. and then expiring. Having it all centralised means nothing is lost. But more importantly, it&rsquo;s much easier to look at and work with, so this is a massive quality of life improvement.</p>
<p>Tickets <em>(or tasks in Phabricator)</em> very user friendly, showing a collapsable history with full links to related objects such as commits, reviews, logs, etc. Infact the linking is extremely easy, one can reference some more of the popular objects by using a single letter follows by the id. Such as <code>T1</code>. Tickets can be related to one or more Projects and in turn Projects can display Tasks on a <a href="https://en.wikipedia.org/wiki/Kanban">KanBan Board</a>.</p>
<p>Phabricator can host your code in your SCM of choice for you and defaults to not allowing destructive changesets by default which saves me from messing around with custom hooks.
This allows the same feature as Fossil&rsquo;s immutable history <strong>on the server</strong>- you can do what you like to your own clone still.</p>
<p>It&rsquo;s fast! No, it&rsquo;s not as fast as Fossil, but it&rsquo;s still more than fast enough especially when you consider the extra toys you get- syntax highlighting, desktop notifications <em>(on supported browsers, which is most recent ones)</em>, user icons, in-depth tooltips. It&rsquo;s certainly faster than other solutions I&rsquo;ve looked at recently and bar Fossil, probably the fastest.</p>
<p>You get a chat room <em>(does require a NodeJS server on the host for automatic updates though it seems)</em> and a wiki. I still use <a href="https://en.wikipedia.org/wiki/Internet_Relay_Chat">IRC</a> on <a href="https://freenode.net/">FreeNode</a>, but the advantage here is that this is web based and persistent so you don&rsquo;t loose anything if you get disconnected. Still, unsure how useful either be as I don&rsquo;t recall users editing any publically editable wiki pages I&rsquo;ve had over the years- are my man pages really that good? Heh.</p>
<h3 id="the-bad">The Bad</h3>
<p>Phabricator is written in <a href="http://php.net/manual/en/intro-whatis.php">PHP</a>. Now I did say that was a good thing earlier, but it&rsquo;s a double edged sword.
PHP does have a bad reputation for both security and language structure. I would argue that this is no different from how <a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a> is today. This is also bad, because my site ran on PHP-7.0 and that was <strong>soooo much faster</strong> than earlier versions it was silly. But Phabricator didn&rsquo;t support PHP-7 until PHP-7.1 in early Feb this year. Something to think about for long term support, but this equally applies to other languages, especially the <a href="https://news.ycombinator.com/item?id=10822861">Python-2 vs Python-3</a> issue as my box has two Python versions due mainly to <a href="https://certbot.eff.org/docs/install.html">certbot needing Python-2.7</a></p>
<p>Phabricator requires MySQL <em>(I installed <a href="https://mariadb.org/">MariaDB</a>, the fork from MySql)</em>. I was very happy with <a href="https://www.postgresql.org/">PostgreSQL</a> but my box does not have the resources to run both. Pretty much all other software I use allows the choice of DB, so this actually took me by surprise. And just like the PHP reaction others have, I was concerned <a href="https://www.quora.com/What-are-pros-and-cons-of-PostgreSQL-and-MySQL">by using MySQL</a>, but as I&rsquo;m not really into being a <a href="https://en.wikipedia.org/wiki/Database_administrator">DBA</a> I&rsquo;m quite happy with MySQL so far.</p>
<p>The linking is really bad for DHCP, because we always talk about <code>T1</code> and <code>T2</code> as timers. This is important, because my main product is of course <a href="/projects/dhcpcd">dhcpcd</a>.
In Phabricator <code>T1</code> and <code>T2</code> are shorthand to link to Task 1 and Task 2.
You can fix this by stopping Phabricator from linking via a matchig regex, but I quite like the ease of use and solved the problem via changing the <code>AUTO_INCREMENT</code> value in some tables from 1 to 101. This reduces the potential collision with other things, such as <code>Z1</code> and allows the same workflow. Upstream rejected my change and even went as far as to remove me posting my fix if anyone else has the same issue claiming this would make support hard. As it turns out, something with my change isn&rsquo;t quite right- either Phabricator or MySQL resets the <code>AUTO_INCREMENT</code> value. I don&rsquo;t know which one, or what action I did or if it&rsquo;s a general <a href="https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)">Garbage Collection</a> going on. This could be why they didn&rsquo;t like the change, but heh ho most of the important tables now have values in at 101 and higher so it shouldn&rsquo;t be a problem anymore.</p>
<p>The <a href="https://en.wikipedia.org/wiki/Continuous_integration">Continuous Integration</a> support is limiting, but it is there. Apparently you can at least call out to <a href="https://jenkins.io/">Jenkins</a> or <a href="http://buildbot.net/">BuildBot</a>.</p>
<p>Because Phabricator is based on and developed in a <a href="https://en.wikipedia.org/wiki/DevOps">DevOps</a> fashion, there is practically no support for <a href="https://secure.phabricator.com/T9530">managed releases or milestones</a>.
This isn&rsquo;t a problem for me as such, but I would like a feature to track important things that went into a release better.</p>
<h3 id="the-ugly">The Ugly</h3>
<p>Phabricator is <strong>NOT ugly</strong>. It&rsquo;s quite visually appealing.
However, it is quite possibly the most complex installation I&rsquo;ve ever done as it uses many databases and as many configuration options as sysctl on a good BSD.
This wasn&rsquo;t helped by running on NetBSD-current and a gcc built PHP with Phabricator just didn&rsquo;t work and I spent a long time working out why.
My fix was to build everthing with clang which required a lot of personal effort from me at the time due to the recent UEFI booting support breaking the build and a the new clang-4 compiler not working with the NetBSD build knobs I was using.
On the plus side, the Phabricator docmentation is good and about 95% of the issues I had were easily searchable on <a href="https://stackoverflow.com">StackOverflow</a> or the <em>(mostly)</em> friendly Phabricator community helped me out in their chat channel- which oddly enough is also a Phabricator application.</p>
<p>Phabricator workflow with more than one dev, or the best way of submitting patches, is to use the <a href="https://secure.phabricator.com/book/phabricator/article/arcanist/">Arcanist</a> tool. They admit it&rsquo;s not great and things should be manageable directly through the SCM. We&rsquo;ll see how that progresses. In the meantime, posting patches to the Differential application is quite easy and allows easy patch review.</p>
<p>I had to stop using Fossil because Fossil is more than just a SCM, it strives to be a complete one stop solution. Obviously that won&rsquo;t work for the desire to use Phabricator for all the good reasons, so I needed to pick a SCM to use. Luckily Phabricator quite a few- GIT, Mercurial and SVN.</p>
<h3 id="but-what-about-the-source-code-control">But what about the source code control?</h3>
<p>It&rsquo;s importance cannot be understated- the code is everything, the history of the code is everything. This has been known since the dawn of time. At this point though, the <a href="https://en.wikipedia.org/wiki/Version_control">SCM</a> just becomes a tool in the box, just like <a href="https://en.wikipedia.org/wiki/Sed">sed</a>.</p>
<p>Eh what?</p>
<p>Every SCM solution out there has pretty much the same set of basic features you need- atomic checkins (ok, CVS lacks this), changesets, branching, tagging.
That&rsquo;s all you pretty much need at a basic level- the rest of the features are predominently driven by workflow.</p>
<p>Tools exist to export data from one to the other, and tools are being created to allow a more <a href="/blog/fossil-git-bridge">transparent bridge</a> again making the choice of SCM even less important than it was before.
The only real issue is the importance of meta data that has no place-holder in the other SCM you want to use. A good example of this would git the Author vs Commiter git attribute on the commit.</p>
<p>Then, you need to understand that the SCM is only for developers. End users don&rsquo;t care a hoot about it. What they do care about is an easy to use system which handles the lifetime of their issue where dicussion, patches, logs, reviews and audits can happen. Hopefully they can even get a fixed build at the end. This is basically part of <a href="https://en.wikipedia.org/wiki/Application_lifecycle_management">Application Lifecycle Management</a>.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Learing ASP.NET Core]]></title>
            <link href="https://roy.marples.name/blog/posts/learing_asp_net_core/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/learing_asp_net_core/</id>
            
            <published>2018-10-14T21:44:06+00:00</published>
            <updated>2018-10-14T21:44:06+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I rarely talk about work here. But in this case I will because although it&rsquo;s unrelated entirely to my Open Source projects it&rsquo;s actually very enjoyable for a change because we have the change to use some cutting edge tech. Like any large and old product there are crusty bits- some of ours are so crusty they are implemented in <a href="https://en.wikipedia.org/wiki/Visual_Basic">Visual Basic 6</a>. So Management have give us the green light to replace a large chunk of that and now that we&rsquo;re part of a bigger business (the joy&rsquo;s of being bought by a large company) we have a mandate to use relevant tech. So I&rsquo;m learning all about <a href="https://docs.microsoft.com/en-us/aspnet/core/">ASP.NET Core</a> and <a href="https://docs.microsoft.com/en-us/ef/core/">Entity Framework Core</a>. We&rsquo;ll be creating <a href="https://en.wikipedia.org/wiki/Microservices">MicroServices</a> talking to an <a href="http://microservices.io/patterns/apigateway.html">API Gateway</a>, each in a <a href="https://en.wikipedia.org/wiki/Docker_(software)">Docker Container</a>. We&rsquo;ll mandate that each project has to have no compile warnings and uses <a href="https://github.com/DotNetAnalyzers/StyleCopAnalyzers">StyleCopy Analyzers</a>. Also we must have unit tests across the board. Each checkin will trigger a static analysis by <a href="https://www.sonarqube.org/">Sonar Qube</a>. This will be a full <a href="http://www.informit.com/articles/article.aspx?p=1621865&amp;seqNum=2">Continuous Integration Pipeline</a>.</p>
<p>This is a massive change from the way we&rsquo;ve worked before and it excites me!
The bad news is that I am spending some of my hobby time on this because it&rsquo;s fun!
But I should be getting back onto dhcpcd / NetBSD related stuff soon once the initial prototypes are in place and the new tech feeling wears off.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[PC death and part picking]]></title>
            <link href="https://roy.marples.name/blog/posts/pc_death_and_part_picking/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/pc_death_and_part_picking/</id>
            
            <published>2018-10-14T21:44:06+00:00</published>
            <updated>2018-10-14T21:44:06+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Before I had my first child, I knew that mindlessly buying the latest tech would have to stop. So when the child was being developed, I treated myself to the ultimate gaming rig having the most expensive nVidia card
What I failed to apprecaite was that after buying a larger house and having a third child would terminally stunt my ability to maintain my gaming PC to acceptable levels.
By acceptable, I mean the ability to power on and work as designed at this point.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Virgin Media starting to turn on IPv6?]]></title>
            <link href="https://roy.marples.name/blog/posts/virgin_media_starting_to_turn_on_ipv6/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/virgin_media_starting_to_turn_on_ipv6/</id>
            
            <published>2018-10-14T21:44:06+00:00</published>
            <updated>2018-10-14T21:44:06+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve been trying to run an IPv6 tunnel without much success- it&rsquo;s far to laggy to use for real work.
So I&rsquo;ve turned that off, and I just noticed I&rsquo;m now getting an IPv6 Router Advertisement across my Super Hub3 in modem mode.
I&rsquo;ve gotten a default route AND a online prefix option to <code>2a02:8800:f000:2120::/64</code> (but sadly, no auto config flag).
This prefix is <a href="http://ftp.ripe.net/ripe/stats/membership/alloclist.txt">owned by Virgin Media</a>.</p>
<p>So, I can ping the router but nothing else as I don&rsquo;t have a public IPv6 IP address.
No address via RA, no reply from my DHCPv6 solicitations- which is odd as the router says I can get a managed address and other information.
Maybe they have yet to turn that part on? Please, turn it on soon Virgin!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Goodbye SpamAssassin, hello Rspamd!]]></title>
            <link href="https://roy.marples.name/blog/posts/goodbye_spamassassin_hello_rspamd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/goodbye_spamassassin_hello_rspamd/</id>
            
            <published>2018-10-12T14:27:00+00:00</published>
            <updated>2018-10-12T14:27:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>In my continuing efforts to entirely self host, fighting spam is hard.
I originally configured <a href="https://spamassassin.apache.org/">SpamAssassin</a> on my mail server quite a few years ago, and to be fair it has done it&rsquo;s job.
But recently, more spam has been creeping through and my ever growing stack of addons <em>(such as <a href="https://launchpad.net/pypolicyd-spf/">policyd-spf</a>, <a href="http://opendkim.org/">OpenDKIM</a>, <a href="http://www.trusteddomain.org/opendmarc/">OpenDMARC</a> and others)</em> to SA was eating quite a lot of memory on my poor server.</p>
<p>So I shopped around and found <a href="https://rspamd.com/">Rspamd</a>.
For my needs it sounded wonderful- no more need for <a href="https://www.mysql.com/">MySQL</a> (it&rsquo;s a hard dependency of OpenDMARC) as I much prefer <a href="https://www.postgresql.org/">PostgreSQL</a>.
SPF, DKIM and DMARC all integrated.
Written in C and LUA which is a massive improvement over Perl and Python.
Also sports a shiny Web UI to monitor the server and do basic config. Speaking of config, it&rsquo;s still not entirely easy, but it&rsquo;s much easier than configuring the stack I used to have!
I did have to patch the build so that it <a href="https://github.com/rspamd/rspamd/pull/2587">works with OpenSSL-1.1</a> which is now in pkgsrc.
All in all, I anticpated a nice memory reduction once I had it all configured. So far it&rsquo;s using about 200Mb less memory, but it&rsquo;s early days.
How much better or worse than SA it is at actual spam filtering remains to be seem, but I have high hopes.</p>
<p>While here, I also replaced <a href="https://en.wikipedia.org/wiki/Procmail">procmail</a> with <a href="https://pigeonhole.dovecot.org/">PigeonHole</a>.
I didn&rsquo;t really need to do this, but I thought &ldquo;As I&rsquo;m here&hellip;..&rdquo;. Actually the end result is much nicer as I now only have one Spam folder instead of another two Spam folders for training ham and spam.
I just need to hook this final part into how I manage spam on my <a href="http://mlmmj.org/">mlmmj</a> email lists.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[NetBSD curses ripoffline improvements]]></title>
            <link href="https://roy.marples.name/blog/posts/netbsd_curses_ripoffline_improvements/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/netbsd_curses_ripoffline_improvements/</id>
            
            <published>2018-10-03T17:30:00+00:00</published>
            <updated>2018-10-03T17:30:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I implemented <a href="http://pubs.opengroup.org/onlinepubs/7908799/xcurses/ripoffline.html">ripoffline(3)</a> in NetBSD and it shipped in-8.
It now transpires there were a few problems with the implementation, mainly in regards to screen resizing, which is an extension to POSIX, but supported by <a href="https://invisible-island.net/ncurses/man/resizeterm.3x.html">ncurses</a> and <a href="https://github.com/wmcbrine/PDCurses">PDCurses</a>.</p>
<p>Many improvements have been made with regards to compability with NetBSD and the others, but there are the following caveats:</p>
<ul>
<li>NetBSD will only resize stdscr, curscr and virtscr windows (like PDCurses)</li>
<li>NetBSD clears the window when resized</li>
<li>NetBSD will re-size and re-position the ripped off lines (like ncurses)</li>
<li>NetBSD will not change LINES when ripoffline is called and may offset stdscr to it&rsquo;s relative position on the screen. This means that portable application should check <a href="http://pubs.opengroup.org/onlinepubs/7908799/xcurses/getbegyx.html">getbegyx and getmaxyx</a> for the size and location of stdscr.</li>
</ul>
<p>The expectation is that the client will re-draw all windows, including ripped off windows on a KEY_RESIZE event.
It&rsquo;s also expected that the client will re-size any other windows as it has a clearer idea of where things should be on the screen to it&rsquo;s proportion rather than curses guesstimating.</p>
<p>Now, the very colourful <a href="https://en.wikipedia.org/wiki/Roguelike">Roguelike</a> game <a href="https://github.com/jaldhar/AitDoB">Ascent into the Depths of Beyond</a> now works on NetBSD <a href="https://github.com/jaldhar/AitDoB/pull/1">with a minor patch</a></p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/curses" term="curses" label="curses" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/gaming" term="gaming" label="gaming" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Zombie and Vampyre fun]]></title>
            <link href="https://roy.marples.name/blog/posts/zombie_and_vampyre/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/zombie_and_vampyre/</id>
            
            <published>2017-10-31T10:39:00+00:00</published>
            <updated>2017-10-31T10:39:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Scaring our local <a href="https://members.scouts.org.uk/beavers/">Beaver Scout Colony</a> with my good friend Aaron the Zombie.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[openresolv in the news]]></title>
            <link href="https://roy.marples.name/blog/posts/openresolv_in_the_news/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openresolv_in_the_news/</id>
            
            <published>2017-10-26T03:44:00+00:00</published>
            <updated>2017-10-26T03:44:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, it&rsquo;s <em>not</em> really in the news, but today I got a message of apprecation for what <a href="https://roy.marples.name/projects/openresolv">openresolv does</a>.</p>
<pre><code>Thanks for openresolv. If only the whole world used it... 
</code></pre><p>Rome wasn&rsquo;t built in a day.
But it&rsquo;s getting there- openresolv can be found in <a href="https://www.netbsd.org/">NetBSD</a> and <a href="https://www.freebsd.org/">FreeBSD</a> base systems.
It&rsquo;s available in most other OS&rsquo;s package respositories to at least depend upon.</p>
<p>Thanks</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[MySQL databases corrupt!]]></title>
            <link href="https://roy.marples.name/blog/posts/mysql_databases_corrupt/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/mysql_databases_corrupt/</id>
            
            <published>2017-09-12T16:34:00+00:00</published>
            <updated>2017-09-12T16:34:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><code>[ERROR] Can't open and lock privilege tables: Got error 9 from storage engine</code></p>
<p>Nice error. Googling for it doesn&rsquo;t reveal much on how to fix it.
The good news is that I only use MySQL for Phabricator and PostreSQL for everything else.
The bad news is that my Phabricator instance is no longer working.
The worse news is that I get the same error when trying to use backups, so there must be something else in play here.</p>
<p>Ideas on how to resolve this are welcome!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[CUPS is too hard]]></title>
            <link href="https://roy.marples.name/blog/posts/cups_is_too_hard/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/cups_is_too_hard/</id>
            
            <published>2017-09-05T10:22:00+00:00</published>
            <updated>2017-09-05T10:22:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;m desperately trying to retire a server i have. It&rsquo;s sole remaining task is to share the attached printer on the network via Samba. It uses CUPS as the backend.
Trying to print a test page gives <code>No such file or directory</code>. That&rsquo;s nice, but it should at least say <strong>what the file or directory it cannot find actually is</strong>.</p>
<p>Trying to connect to the printer from a Windows machine <em>(I can see the printer find in the server share)</em> gives an error that it cannot connect, but nothing appears in the Samba or CUPS logs.</p>
<p>This is 2017, surely we have better diagnostics to solve these issues!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[IP address sharing]]></title>
            <link href="https://roy.marples.name/blog/posts/ip_address_sharing/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ip_address_sharing/</id>
            
            <published>2017-07-05T16:25:00+00:00</published>
            <updated>2017-07-05T16:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So dhcpcd has supported a shared IP address for a long time. It did this by removing the address from the non preferrred interface and then adding it to the preferred interface.<br>
Easy!</p>
<p>But this came with some issues:</p>
<ul>
<li>There is a window where the IP address doesn&rsquo;t exist, and the kernel may wipe out the subnet route at that point also.</li>
<li>DHCP renews didn&rsquo;t come through to the right interface.</li>
<li>Some kernels didn&rsquo;t like the address moving interfaces.</li>
</ul>
<p>Still, to the best of my knowledge, no other product has this feature and for the most part, it did work well allowing almost seamless switching of wired-&gt; wireless and back again with both using the same IP address. But that wasn&rsquo;t good enough - <a href="https://roy.marples.name/archives/dhcpcd-discuss/0001706.html">I was challenged to do better!</a></p>
<p>So I took up the bat and changed the behaviour to this:</p>
<ul>
<li>Each applicable interface will have the shared ip address.</li>
<li>Whenever the address is added, the most preferred address will be ARP announced.</li>
</ul>
<p>And lo - <strong>IT WORKS!!!</strong>  The changeover when plugging/removing the wired interface is 100% seamless for me. ssh, ping, etc get zero interuption. Of course, YMMV ;)<br>
But there are some costs:</p>
<ul>
<li>Thanks to ARP, only the primary interface will receive DHCP unicast messages for other interfaces.<br>
As such we need to re-direct them to the correct interface by examining <code>xid</code> and <code>chaddr</code>.<br>
This means we have to relax the BPF filters to allow more through.</li>
<li>Kernels supporting <a href="https://tools.ietf.org/html/rfc5227">RFC5227</a> will double ARP announce the address.</li>
<li>NetBSD-8 kernels needed some love to get it to work and there&rsquo;s still an issue with it not working when an address is deleted from the interface.</li>
</ul>
<p>Only the last bullet is really important, which is mainly why the changeset hasn&rsquo;t hit the master branch yet. But that should be fixed soon.
The other points can be fixed as and when.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd-7 finally enters beta]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd-7_finally_enters_beta/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd-7_finally_enters_beta/</id>
            
            <published>2017-03-31T21:25:00+00:00</published>
            <updated>2017-03-31T21:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>It&rsquo;s been a while in the making, but dhcpcd-7.0.0-beta1 is finally here!
I have been using this a <em>lot</em> on all supported platforms bar Solaris
and it&rsquo;s been very trouble free, so hopefully not many changes (if any?
famous last words!) before a RC and final release.</p>
<p>Summary of changes since dhcpcd-6.11.5:</p>
<ul>
<li>source file locations reworked:
dhcpcd source is in src
dhcpcd hooks are in hooks
compat is in compat</li>
<li>README split into README.md and BUILDING.md</li>
<li>internal routing is now protocol agnostic</li>
<li>avoid using <code>__packed</code> and use compile time asserts instead</li>
<li>addresses some alignment issues</li>
<li>disable some ARP code on kernels which support RFC5227</li>
<li>BSD IPv6 kernel settings are now updated to reflect dhcpcd config</li>
<li>custom logger has been removed, syslog handles everything
as such, the <code>--logfile</code> option has been removed as well.
If you need better/earlier logging, get a better syslogger!</li>
<li>distinfo and signed distinfo files are now available alongside
release taraballs from this point onwards</li>
<li>default DBDIR has changed from <code>/var/db</code> to <code>/var/db/dhcpcd</code></li>
<li><code>/etc/dhcpcd.duid</code> moves to <code>DBDIR/duid</code></li>
<li><code>/etc/dhcpcd.secret</code> moves to <code>DBDIR/secret</code></li>
<li>lease file names have dhcpcd removed from them as they are now
inside a directory of the same name</li>
<li>fixed issues with reject routes not working on some platforms</li>
<li>improved nl80211 support on Linux for working out the SSID</li>
<li>no longer request NTP by default in dhcpcd.conf</li>
<li>fix detecting IPv6 DAD on OpenBSD</li>
<li>remove custom Solaris DLPI filtering in favour of BPF
(note there seems to be a kernel issue where the DHCP
fd receives ARP&rsquo;s as well, the only side effect is
a noisy syslog)</li>
<li>BPF filtering vastly improved so dhcpcd only wake up on
ARP or DHCP packets destined for it</li>
<li>support for MUD URL (draft-ietf-opsawg-mud-05)</li>
<li>if the kernel isn&rsquo;t doing DAD, don&rsquo;t insist on waiting for it
to actually do it</li>
<li>fix a potential crash where the DHCP or ARP states could be
freed before the packet processing loop naturally breaks</li>
<li>removed gateway and nogateway options
(these can be controlled by the nooption directive which
works for more than just gateways)</li>
<li>removed ipv6ra_own and ipv6ra_own_default options
(these can be controled by the ipv6rs/noipv6rs directive)</li>
<li>fix a memory leak on systems where posix_spawnattr_init
allocates memory by calling posix_spawnattr_destroy afterwards</li>
<li>fix a crash receiving SIGUSR1</li>
</ul>
<p>I&rsquo;ve not done everything I&rsquo;ve wanted to, but I feel that many issues
have now been addressed and on the whole dhcpcd is in a very good state
right now.</p>
<p>Let me know of any issues you find!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Goodbye Fossil]]></title>
            <link href="https://roy.marples.name/blog/posts/goodbye_fossil/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/goodbye_fossil/</id>
            
            <published>2017-03-11T21:17:00+00:00</published>
            <updated>2017-03-11T21:17:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve been using <a href="http://fossil-scm.org/">Fossil</a> as my <a href="https://en.wikipedia.org/wiki/Version_control">SCM</a> for quite a few years now and it has served me well.
It replaced my aging <a href="https://trac.edgewall.org/">Trac</a> <em>(which I&rsquo;ve now really retired in the recent server move &hellip; it didn&rsquo;t move)</em> + <a href="https://git-scm.com/">GIT</a> setup.
There is nothing inherently wrong with it and upstream are quite quick to resolve any issues. So lets start with a list of Fossil plus points, in no particular order:</p>
<ul>
<li>BSD license.</li>
<li>One binary, easy installation, very low maintainence cost.</li>
<li>Integrated CGI web front end.</li>
<li>Integrated Wiki, Tickets- which are also distributed.</li>
<li>Sane command line UI.</li>
<li>Stores everything in a <a href="https://www.sqlite.org/">SQLite database</a>.</li>
<li>Repository is not joined to the checkout, supports different checkout from the same cloned repository.</li>
<li>I <del>have</del> had a <a href="http://fossil-scm.org/index.html/info/27de3fc8beb09475">Fossil commit bit</a> - my change allows a near perfect Fossil &lt;&gt; GIT bridge.</li>
</ul>
<p>And naturally, after many years of use, there are some negative points:</p>
<ul>
<li>The ticketing system is very basic and has no email support- you&rsquo;re expected to use each tickets RSS feed, but this is not clear.</li>
<li>It&rsquo;s not extendable.</li>
<li>It&rsquo;s possible for an admin in the upstream repo to wipe out parts or the whole of your cloned repo.</li>
<li>It&rsquo;s not social.</li>
</ul>
<p>That&rsquo;s actually a <strong>very small list of negative points</strong>. It shows that Fossil is a great product, with a great team behind it.
Let&rsquo;s address these these negatives in more detail though.</p>
<h3 id="the-ticketing-system-is-is-poor">The ticketing system is is poor</h3>
<p>Yes, the tickets are distributed, but that&rsquo;s the only good point.
The UI to progress the ticket needs a lot of work and is not intuitive to use.
Tickets don&rsquo;t support markdown.
It&rsquo;s not clear to the end user that the only feedback they get is a RSS feed.
My initial attempt to fix this was about 3 years ago but was met with silence. I could try and improve this by creating a fossil branch just to add RSS icons to the ticket UI.</p>
<h3 id="fossil-is-not-extendable">Fossil is not extendable</h3>
<p>This isn&rsquo;t actually that bad, what it does have works well enough (aside from the ticketing).
And to be fair, there is a <a href="http://fossil.wanderinghorse.net/repos/libfossil">3rd party library to extend fossil</a> but it doesn&rsquo;t seem to be used by anything I can find.
However, based on recent experiences at my day job (where I don&rsquo;t use Fossil), code reviews are turning out to be quite critical and the tools we were using suck.
Well, Fossil doesn&rsquo;t have any code review feature nor any easy way of hooking it into an automated build system for <a href="https://en.wikipedia.org/wiki/Continuous_integration">continuous integration</a>
So we&rsquo;re left reviewing changes via pastebin where links expire or diffs via email. Now diffs via email have been standard on many open source projects, and still are in many.
Most of the time I can read them fine, but sometimes they are hard to review in an email. Sometimes I end up using a code review tool, loading the dhcpcd source code, copy and paste the diff into it, reviewing and then copying my review comments back into the email. This is hardly ideal and quite time consuming.</p>
<h3 id="fossil-history-can-be-wiped-out">Fossil history can be wiped out</h3>
<p>Fossil <a href="https://www.fossil-scm.org/xfer/doc/trunk/www/shunning.wiki">has an ability to delete anything from your cloned repo - it&rsquo;s called shunning</a>.
While this is an awesome feature for corporations (I work for one, I understand the problems and wish my day job had this feature), but equally I believe it&rsquo;s entirely un-suitable for open source use.
This is my PC, it contains my contributions to a project which could wipe out my copy of said project and published contributions. History, gone.
Now, it&rsquo;s entirely likely that this will never happen, I like to believe in the good in people, but the possibilty remains someone could push the button.
OK, there&rsquo;s a bit more to it than that- the default fossil setting is to auto-sync the shun list. However, the code is disabled for auto-sync (ie sync on commit) but <strong>is enabled</strong> for the manual pull/push commands.
While that removes the item from your checkout (if it&rsquo;s there), it won&rsquo;t actually remove it from the repository itself until the repository is rebuilt, which is sometimes forced on you when upgrading fossil.
Yes, this is probably a knee-jerk reaction to a none-issue, but it still grates.
This is also a reason why I love to self host and would never consider having <a href="https://github.com/rsmarples">GitHub</a> or similar being the one sole place where I publish my work. I have always, and always will do, self host.</p>
<h3 id="fossil-is-not-social">Fossil is not social</h3>
<p>By it&rsquo;s very nature, you can&rsquo;t contribue to the club unless you&rsquo;re in the club- at least not using just Fossil.
It&rsquo;s designed (from my perspective anyway) to be a distributed CVS/SVN + wiki + tickets. By this, I mean there is one master repository everyone clones from and pushes to.
This makes it impossible to have my own branch outside of the main repo and publish it to others (equivalent of <a href="https://help.github.com/articles/creating-a-pull-request-from-a-fork/">GIT Fork and Pull</a>).
It can also be argued that this is a good thing because it encourages people to work together and just like the prior point, this is a good feature for corporate setups.
But equally sometimes someone needs to maintain a patchset unsuitable for upstream for valid reasons.
This <em>is rare</em>, but it has happened. And I hate losing users for any reason.
Could they have a branch they maintain in my repo? Quite possibly, but Fossil&rsquo;s security isn&rsquo;t that granular <a href="http://www.urbandictionary.com/define.php?term=afaik">AFAIK</a> and I would dislike someone messing around in the other branches.
Maybe that&rsquo;s anti-social of me, but equally no-one has ever asked for commit access to my repos either.</p>
<p><strong>EDIT:</strong> Dr Richard Hipp pointed out privately that this is <a href="https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar">The Cathedral and the Bazaar</a>.
Fossil is the pre-eminent solution for The Cathedral, while others are more suited to the Bazaar.</p>
<h3 id="in-summary">In summary</h3>
<p>Taking the above into account, I can no longer justify the use of Fossil in my Open Source projects.
For other projects, Fossil is still an awesome tool if that&rsquo;s all you need.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Fossil <-> Git bridge]]></title>
            <link href="https://roy.marples.name/blog/posts/fossil_git_bridge/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/fossil_git_bridge/</id>
            
            <published>2017-02-22T03:10:00+00:00</published>
            <updated>2017-02-22T03:10:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve been using <a href="http://fossil-scm.org/index.html/doc/trunk/www/index.wiki">Fossil</a> for quite a while now as my <a href="https://en.wikipedia.org/wiki/Version_control">SCM</a>.
I like Fossil.
But Fossil is not <a href="https://git-scm.com/">Git</a>, and most people seem to like Git.
It could be better to say that most people like <a href="https://github.com/">GitHub</a> because it&rsquo;s the first hosted SCM that&rsquo;s free for open source with good social interaction I&rsquo;m aware of.
And GitHub is <strong>huge</strong>.
Some might say that if you&rsquo;re not on GitHub, you don&rsquo;t exist as a project. Well this obviously isn&rsquo;t true, but you get the idea.
You <em>can</em> get free Fossil hosting at <a href="http://chiselapp.com/">Chisel</a>, which is nice, but it&rsquo;s also not GitHub.
Plus I like to be 100% self hosted.</p>
<p>So, to get myself on GitHub <em>(as a mirror only)</em>, there needs to be a bridge between Fossil and Git.
<a href="http://fossil-scm.org/xfer/doc/trunk/www/inout.wiki">Fossil documentation</a> implies this is quite easy. Sadly, this isn&rsquo;t the case as the &lt;=Fossil-1.37 releases <em>(note there is no guaranntee that future versions of follow will not have these flaws- my branch may not be comitted to trunk)</em> have the following flaws:</p>
<ul>
<li>Branch and Tag name mangling (dhcpcd-6 becomes dhcpcd_6)</li>
<li>Silent master branch renaming into trunk on inport, but not on export</li>
<li>No tag comments (Fossil lacks the feature) which means syncing tags back and forth results in tag conflict due to signature change</li>
</ul>
<p>I submitted some initial patches the the <a href="http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg24586.html">Fossil mailing list</a> and I now have a Fossil commit bit!
You can <a href="https://www.fossil-scm.org/xfer/timeline?r=roy-export&amp;nd">find my branch here to fix the Fossil Git bridge</a>.</p>
<p>But that&rsquo;s not the end of the story.
A bridge has two ends.
With my initial setup, the Git end was bare bones repository which I pushed to GitHub.
This is no longer the case- I now need a staging repository to pull both ends.
And this requires a script because Git needs a little more hand-holding to completely track a remote.
The below script is tailored for my needs, yours may differ. It also reflects the above initial design and the subsequent change- as such it it may need editing if you need to create a git clone from fossil.
This comes with no support, just as an idea of how you might implement such a bridge.</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#099">#!/bin/sh
</span><span style="color:#099"></span>
<span style="color:#033">fossildir</span><span style="color:#555">=</span>/var/fossil
<span style="color:#09f;font-style:italic"># Cannot be a bare directory for git as we cannot write to the host directly.</span>
<span style="color:#09f;font-style:italic"># So we have a staging directory instead.</span>
<span style="color:#09f;font-style:italic"># This requires a bit of hand-holding to track all the branches.</span>
<span style="color:#033">gitdir</span><span style="color:#555">=</span>/var/git-staging

<span style="color:#033">marksdir</span><span style="color:#555">=</span>/var/scm-marks

<span style="color:#09f;font-style:italic"># Respect default naming at either end</span>
<span style="color:#033">fossil_export_opts</span><span style="color:#555">=</span><span style="color:#c30">&#34;--rename-trunk master&#34;</span>
<span style="color:#033">fossil_import_opts</span><span style="color:#555">=</span><span style="color:#c30">&#34;--rename-master trunk&#34;</span>

<span style="color:#09f;font-style:italic"># Only used when creating a git bare bones repo from Fossil.</span>
export_fossil_to_git_new<span style="color:#555">()</span>
<span style="color:#555">{</span>

        rm-f <span style="color:#c30">&#34;</span><span style="color:#033">$fossilmarks</span><span style="color:#c30">&#34;</span> <span style="color:#c30">&#34;</span><span style="color:#033">$gitmarks</span><span style="color:#c30">&#34;</span>
        git init
        fossil export--git <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>--export-marks <span style="color:#c30">&#34;</span><span style="color:#033">$fossilmarks</span><span style="color:#c30">&#34;</span> <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>                <span style="color:#033">$fossil_export_opts</span> <span style="color:#c30">&#34;</span><span style="color:#033">$fossildir</span><span style="color:#c30">/</span><span style="color:#033">$fossilrepo</span><span style="color:#c30">&#34;</span> | <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>                git fast-import <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>--export-marks<span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$gitmarks</span><span style="color:#c30">&#34;</span>
<span style="color:#555">}</span>

export_fossil_to_git<span style="color:#555">()</span>
<span style="color:#555">{</span>

        fossil export--git <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>--import-marks <span style="color:#c30">&#34;</span><span style="color:#033">$fossilmarks</span><span style="color:#c30">&#34;</span>--export-marks <span style="color:#c30">&#34;</span><span style="color:#033">$fossilmarks</span><span style="color:#c30">&#34;</span> <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>                <span style="color:#033">$fossil_export_opts</span> <span style="color:#c30">&#34;</span><span style="color:#033">$fossildir</span><span style="color:#c30">/</span><span style="color:#033">$fossilrepo</span><span style="color:#c30">&#34;</span> | <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>                git fast-import <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>--import-marks<span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$gitmarks</span><span style="color:#c30">&#34;</span>--export-marks<span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$gitmarks</span><span style="color:#c30">&#34;</span>
<span style="color:#555">}</span>

export_git_to_fossil<span style="color:#555">()</span>
<span style="color:#555">{</span>

        git fast-export--all <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>--import-marks<span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$gitmarks</span><span style="color:#c30">&#34;</span>--export-marks<span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$gitmarks</span><span style="color:#c30">&#34;</span> | <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>                fossil import--git--incremental <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>--import-marks <span style="color:#c30">&#34;</span><span style="color:#033">$fossilmarks</span><span style="color:#c30">&#34;</span>--export-marks <span style="color:#c30">&#34;</span><span style="color:#033">$fossilmarks</span><span style="color:#c30">&#34;</span> <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>                <span style="color:#033">$fossil_import_opts</span> <span style="color:#c30">&#34;</span><span style="color:#033">$fossildir</span><span style="color:#c30">/</span><span style="color:#033">$fossilrepo</span><span style="color:#c30">&#34;</span>
<span style="color:#555">}</span>

pull_git<span style="color:#555">()</span>
<span style="color:#555">{</span>
        <span style="color:#366">local</span> remote

        git fetch--all
        <span style="color:#09f;font-style:italic"># Track all remote branches</span>
        git branch-r | grep-v <span style="color:#c30">&#39;\-&gt;&#39;</span> | <span style="color:#069;font-weight:bold">while</span> <span style="color:#366">read</span> remote; <span style="color:#069;font-weight:bold">do</span>
                <span style="color:#069;font-weight:bold">if</span> <span style="color:#555">[</span>-z <span style="color:#c30">&#34;</span><span style="color:#069;font-weight:bold">$(</span>git branch--list <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">remote</span>#origin/<span style="color:#a00">}</span><span style="color:#c30">&#34;</span><span style="color:#069;font-weight:bold">)</span><span style="color:#c30">&#34;</span> <span style="color:#555">]</span>; <span style="color:#069;font-weight:bold">then</span>
                        git branch--track <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">remote</span>#origin/<span style="color:#a00">}</span><span style="color:#c30">&#34;</span> <span style="color:#c30">&#34;</span><span style="color:#033">$remote</span><span style="color:#c30">&#34;</span>
                <span style="color:#069;font-weight:bold">fi</span>
        <span style="color:#069;font-weight:bold">done</span>
        git branch--list | sed-e <span style="color:#c30">&#39;s/^\* //&#39;</span> | <span style="color:#069;font-weight:bold">while</span> <span style="color:#366">read</span> branch; <span style="color:#069;font-weight:bold">do</span>
                git checkout <span style="color:#c30">&#34;</span><span style="color:#033">$branch</span><span style="color:#c30">&#34;</span>
                git merge--ff-only
        <span style="color:#069;font-weight:bold">done</span>
<span style="color:#555">}</span>

push_git<span style="color:#555">()</span>
<span style="color:#555">{</span>

        git push--all
        git push--tags
        <span style="color:#09f;font-style:italic"># Reset the current branch checkout.</span>
        <span style="color:#09f;font-style:italic"># If we don&#39;t, the next run will complain about unstashed changes.</span>
        <span style="color:#09f;font-style:italic"># This maybe a bug in git, but maybe not because the live checkout</span>
        <span style="color:#09f;font-style:italic"># *is* behind at this point as we just fast-imported.</span>
        git reset--hard
<span style="color:#555">}</span>

<span style="color:#366">echo</span> <span style="color:#c30">&#34;Syncing git and fossil.&#34;</span>
<span style="color:#069;font-weight:bold">for</span> repo in <span style="color:#c30">&#34;</span><span style="color:#033">$fossildir</span><span style="color:#c30">&#34;</span>/*.fossil; <span style="color:#069;font-weight:bold">do</span>
        <span style="color:#033">fossilrepo</span><span style="color:#555">=</span><span style="color:#a00">${</span><span style="color:#033">repo</span>#<span style="color:#a00">${</span><span style="color:#033">fossildir</span><span style="color:#a00">}</span>/*<span style="color:#a00">}</span>
        <span style="color:#033">repo</span><span style="color:#555">=</span><span style="color:#a00">${</span><span style="color:#033">fossilrepo</span>%.fossil<span style="color:#a00">}</span>
        <span style="color:#033">gitrepo</span><span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$repo</span><span style="color:#c30">&#34;</span>
        <span style="color:#033">fossilmarks</span><span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$marksdir</span><span style="color:#c30">/</span><span style="color:#033">$repo</span><span style="color:#c30">.fossil.marks&#34;</span>
        <span style="color:#033">gitmarks</span><span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$marksdir</span><span style="color:#c30">/</span><span style="color:#033">$repo</span><span style="color:#c30">.git.marks&#34;</span>

        <span style="color:#09f;font-style:italic"># We just sync old fossil repos to new phab clones</span>
        <span style="color:#069;font-weight:bold">if</span> <span style="color:#555">[</span>-d <span style="color:#c30">&#34;</span><span style="color:#033">$gitdir</span><span style="color:#c30">/</span><span style="color:#033">$gitrepo</span><span style="color:#c30">&#34;</span> <span style="color:#555">]</span>; <span style="color:#069;font-weight:bold">then</span>
                <span style="color:#366">cd</span> <span style="color:#c30">&#34;</span><span style="color:#033">$gitdir</span><span style="color:#c30">/</span><span style="color:#033">$gitrepo</span><span style="color:#c30">&#34;</span>
                pull_git <span style="color:#09f;font-style:italic"># staging only</span>
                export_git_to_fossil
                export_fossil_to_git
                push_git <span style="color:#09f;font-style:italic"># staging only</span>
<span style="color:#09f;font-style:italic"># Enable the below if pusing to a bare git repo from fossil</span>
<span style="color:#09f;font-style:italic">#       else</span>
<span style="color:#09f;font-style:italic">#               export_fossil_to_git_new</span>
        <span style="color:#069;font-weight:bold">fi</span>
<span style="color:#069;font-weight:bold">done</span>
</code></pre></div><p><a href="http://roy.marples.name/downloads/reposync">Direct download to script</a></p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[HTTP/2 enabled]]></title>
            <link href="https://roy.marples.name/blog/posts/http-2_enabled/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/http-2_enabled/</id>
            
            <published>2017-02-07T09:51:00+00:00</published>
            <updated>2017-02-07T09:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So finally I&rsquo;ve moved all services from my old server to my <a href="../the_christmas_xen_box">Christmas Xen box</a>!
This was not without problems due to the fact it had to run NetBSD-current</p>
<ul>
<li><a href="http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51105">gcc toolchain is broken for some packages</a> which affected running any PHP build</li>
<li>clang toolchain was broken for my config <em>(USE_SSP= yes and CPUFLAGS+=-march=core2)</em></li>
<li>clang compiles as a whole were broken due to a recent efiboot import</li>
</ul>
<p>In hind-sight, I could have had the box up and running a lot sooner if I used NetBSD-7 guests (or maybe just a NetBSD-7 build box), but no, I just <strong>had</strong> to get-current running.
It offers more than-7 and prior exerience told me that tracking-7 was very problematic &hellip; but that could have been due to my settings and wanting to compile everything with clang.
I&rsquo;ve currently got 3-current images there now &hellip; the Xen DOM0, the actual server itself as Xen DomU (without any compiler or tools) and another Xen DomU which just builds stuff for other guests to use.</p>
<p>Anyway, the box itself is now up and running and all relevant services have been moved to it.
During this move, I decided to modernise things a little and setup <a href="https://en.wikipedia.org/wiki/HTTP/2">HTTP/2</a>. If you&rsquo;re reading this then it&rsquo;s working :)
As such, I&rsquo;ve re-directed all basic HTTP traffic to HTTPS and it does seem to load a lot faster.
One side effect of this is that I&rsquo;ve stoped using my own self signed certificates and I&rsquo;m now using the nice <a href="https://letsencrypt.org/">Let&rsquo;s Encrypt</a> service.
<a href="https://www.pkgsrc.org/">pkgsrc</a> users should use the <a href="http://pkgsrc.se/security/py-certbot">py-certbot</a> package and don&rsquo;t bother searching for any letsencrypt package as it&rsquo;s been renamed. I found this quite confusing as there was no reference to the rename in pkgsrc I could find and wasted a little time on it.</p>
<p>But now it&rsquo;s live I can finally look into bringing online some other development utilities to play around with as the server has a lot more room to grow :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Soft Label Keys]]></title>
            <link href="https://roy.marples.name/blog/posts/soft_label_keys/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/soft_label_keys/</id>
            
            <published>2017-01-24T20:36:00+00:00</published>
            <updated>2017-01-24T20:36:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="../2017_starts_with_some_cursing">After starting the year with curses work</a>, I decided to do some more!</p>
<p>Currently we lack <a href="http://pubs.opengroup.org/onlinepubs/7908799/xcurses/slk_init.html">Soft Label Key functions as specified by POSIX</a>. What are these?
Glad you asked! Soft Label Keys ripoff a line from the bottom of the screen and allow for up to 8 keys to be displayed there.
You can define labels for them, colours, etc.</p>
<p><em>&ldquo;BIG WHOOP!&quot;</em> I hear you say. <em>&ldquo;My app already does this, why should I care?&quot;</em></p>
<p>Because SLK also works with the <a href="http://pubs.opengroup.org/onlinepubs/7908799/xcurses/terminfo.html">terminfo database</a> to work out if the terminal natively supports labels <em>(via plab_norm, label_on, etc)</em>!
This means a line doesn&rsquo;t have to be ripped off from the screen so no real-estate is lost. Sadly, no terminal actually seems to support these markings. But if one is ever made, it should work fine.</p>
<p>Now, not many curses apps actually use the SLK functions, probably for this very reason. But some do, and it <strong>is</strong> a standard so I&rsquo;ve coded NetBSD to support this natively.</p>
<p>Sadly, this has uncovered a bug in the NetBSD curses library where cursor movement in a one line window at the bottom of the screen appears to push the window up.
This <strong>is very visible</strong> with SLK and will have to be fixed for any apps that actually use it, but the SLK implementation itself is sound as resizing the terminal forces a redraw and it looks fine.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/curses" term="curses" label="curses" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Marples / Coulbeck northen feast]]></title>
            <link href="https://roy.marples.name/blog/posts/marples_coulbeck_northen_feast/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/marples_coulbeck_northen_feast/</id>
            
            <published>2017-01-14T21:41:00+00:00</published>
            <updated>2017-01-14T21:41:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Long trip up to <a href="http://nunsmere.co.uk/">Nunsmere Hall</a> for a long over due but fantastic family lunch. The entire Marples and Coulbeck tribes actually managed to make it- not a single person missing!</p>
<p><img src="marples_coulbecks_2017_01_14.jpg?lightbox=1024&amp;cropResize=600" alt="Marples vs Coulbeck"></p>
<p>We need to do this thing more often, especially in such a nice place where everyone was friendly and the food was just awesome.
I think I managed to talk with everyone and have time to play with the kids. Speaking of the kids, they were absolute little gems the whole journey- 4 hours up and 4 hours down. Much better behaved than I was at a similar age no doubt ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[2017 starts with some cursing!]]></title>
            <link href="https://roy.marples.name/blog/posts/2017_starts_with_some_cursing/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/2017_starts_with_some_cursing/</id>
            
            <published>2017-01-04T20:39:00+00:00</published>
            <updated>2017-01-04T20:39:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So over the holidays, I managed to get in some good quality family time and find some time to work on some Open Source stuff.
I meant to work mainly on <a href="/dhcpcd">dhcpcd</a>, but it turned out I spent most of my time working on <a href="https://wiki.netbsd.org/curses_in_netbsd/">NetBSD curses library</a> so that <a href="https://docs.python.org/3/howto/curses.html">Python Curses</a> now works with it.
Now, most people reading this blog may not care much for NetBSD or for curses, but it&rsquo;s important because <a href="https://www.gnu.org/software/ncurses/">ncurses</a> is used pretty much everywhere by default &hellip;.. aside from NetBSD. And most readers should know, I go out of my way to promote interoperable software even when it&rsquo;s at a detriment to my own projects. That&rsquo;s just how I roll.</p>
<p>There is a apparently a thing called <a href="https://github.com/wmcbrine/PDCurses">PD Curses</a> but I don&rsquo;t know anywhere that actually uses it by default.
If you know, please email me @ <a href="mailto:roy@marples.name">roy@marples.name</a> or <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=@rsmarples PD Curses is used ...">tweet me</a>. I do know that the <a href="https://www.pkgsrc.org/">pkgsrc</a> <a href="http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/mk/curses.buildlink3.mk?rev=1.23&amp;content-type=text/x-cvsweb-markup&amp;only_with_tag=MAIN">curses framework</a> supports it.</p>
<p>And this is the thing I&rsquo;m currently doing. As NetBSD curses supports more POSIX functions (and a few ncurses extensions, sadly) more and more packages now work alongside NetBSD curses, so I&rsquo;m plowing through pkgsrc again moving things to the curses framework.
This is important, because there is logic in devel/ncurses to use NetBSD curses when passing certain criteria, but sadly this always brings ncurses as a possibility to be linked or it&rsquo;s header used, both of which are quite bad for NetBSD curses so there is a method to my madness.</p>
<p>One interesting thing though is that since I started comitting my curses patches, it turns out that <a href="http://sabotage.tech/">Sabotage Linux</a> is using NetBSD curses <a href="https://github.com/sabotage-linux/netbsd-curses">and made it portable</a>.
I&rsquo;m chatting with one of their devs and we&rsquo;re starting to merge of a few of their patches back into NetBSD.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/curses" term="curses" label="curses" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The Christmas Xen Box]]></title>
            <link href="https://roy.marples.name/blog/posts/the_christmas_xen_box/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_christmas_xen_box/</id>
            
            <published>2016-12-29T14:48:00+00:00</published>
            <updated>2016-12-29T14:48:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My brother got me some very tasty presents for Christmas <em>(and my up-coming Birthday)</em>, namely the <a href="https://www.amazon.co.uk/d/Barebones/Gigabyte-Brix-BXBT-1900-Ultra-Compact/B00MOEMZMQ">GIGABYTE BRIX J1900</a> and a <a href="https://www.amazon.co.uk/d/552/Samsung-750-EVO-inch-Solid-State-Drive/B01AAKZRP2/ref=sr_1_1?s=computers&amp;ie=UTF8&amp;qid=1483021469&amp;sr=1-1&amp;keywords=evo+750">Samsung EVO 750 250G</a>. Santa also brought me <a href="https://www.amazon.co.uk/d/Computers-Accessories/Crucial-DDR3L-1600-PC3L-12800-SODIMM-CT102464BF160B/B006YG8X9Y/ref=pd_bxgy_147_2?_encoding=UTF8&amp;psc=1&amp;refRID=BSAZWZGHE5AB4N97WPN7">8G of Crucial memory</a>. Putting them all together is a nice new machine to install <a href="http://wiki.netbsd.org/ports/xen/">NetBSD Xen</a>! The key part is this is a low end CPU, but critically supports Intel VT-x virtualization technology.</p>
<p>There were some challenges. Firstly, I couldn&rsquo;t find a way to get into the BIOS. Neither F12, F2 or Del hammering during the boot process worked. While there is a mouse cursor to move and click, it booted too fast to actually use it. Actually, pressing the BSS on screen button did briefly display a keyboard to enter the SSID, but it then booted instead. This meant I couldn&rsquo;t enable PXE boot, so a USB install is needed. This lead onto the next problem &hellip;.. NetBSD-7 is too old, you need a recent-current for the USB ports to work. No matter, making a <a href="https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/">NetBSD USB install</a> was quite trivial, the only challenge being to find a pre-built image. Luckily I found <a href="http://daily-builds.netbsd.org/pub/NetBSD-daily/HEAD/">http://daily-builds.netbsd.org/pub/NetBSD-daily/HEAD/</a> and browsed to the dates images folder to get the install img for amd64.</p>
<p>From this point, installation was trivial. But here are some notes:</p>
<ul>
<li>Allocating 5G to / is enough to install a-current base and compiler, pkgsrc checkout and build xentools.</li>
<li>No idea if I need it, but I allocated 1G swap.</li>
<li>I setup XEN backing using LVM, so the rest of the disk is allocated to that.</li>
<li>I needed to reboot twice to get LVM/Xen to start recognising the assigned LV.</li>
<li>The <a href="http://wiki.netbsd.org/ports/xen/howto/">NetBSD Xen How To</a> needs some love in places.</li>
</ul>
<p>The speed of this box compared to my current <a href="http://global.shuttle.com/main/productsDetail?productId=1423">Shuttle XS35</a> is impressive.
While I have less disk space (quite a lot less), it should still be enough to replace it entirely and power my email, web and other stuff.
As it&rsquo;s Xen, I am hoping that I can use this box to do my open source work on other OS&rsquo;s easily and support more OS&rsquo;s than my exiting laptop allowed (max 4 partitions) which means a faster turnaround time for support.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[New ISP]]></title>
            <link href="https://roy.marples.name/blog/posts/new_isp/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/new_isp/</id>
            
            <published>2016-12-17T21:28:00+00:00</published>
            <updated>2016-12-17T21:28:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="../the_peril_of_self_hosting">As I blogged previously about changing ISP</a>, it has finally happened.
The engineer who installed it was very friendly, polite and helpful whilst doing professional job. A credit to the company.</p>
<p>From 16/0.6mbs to 200/20mbs thanks to <a href="http://www.virginmedia.com/shop/broadband/vivid-gamer.html">Virgin Media</a>!
OK, it&rsquo;s not quite 200 down, it&rsquo;s quite variable actually. So far, it&rsquo;s normally around 150mbs at peak times, compared to my old service which was rock steady. Probably because I was on low contention service so my max available was pretty much guaranteed.
However, it&rsquo;s always 20+ up! And lets be fair, even 50mbs down is x3 better than what I had previosuly, but it&rsquo;s yet to dip under 120mbs. This will be awesome for work conference calls with video :)</p>
<p>Also, one unexpected feature of the Virgin Media SuperHub is the Modem mode <em>(I turned off Router mode as my existing <a href="https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter">NetBSD router</a> and <a href="https://www.ubnt.com/unifi/unifi-ap-ac-pro/">Unifi wireless AP</a> is better)</em> is that it&rsquo;s not a PPP based modem. At least, not facing me. So I have to run <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a> on it to get my address, which makes me feel all warm and fuzzy as it&rsquo;s my personal software! A much easier setup than PPP as well as the MTU for routes can stay at 1500 and not be <a href="https://tools.ietf.org/html/rfc4638">&ldquo;adjusted&rdquo; for PPPoE over PPPoA</a> as is the norm in the UK.</p>
<p>Still, this is only day one, the service could go tits up, but so far the experice is very very nice :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The peril of self hosting]]></title>
            <link href="https://roy.marples.name/blog/posts/the_peril_of_self_hosting/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_peril_of_self_hosting/</id>
            
            <published>2016-12-15T22:14:00+00:00</published>
            <updated>2016-12-15T22:14:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My time with <a href="http://www.goscomb.net/">Goscomb Technologies</a> as my ISP is coming to an end.
It&rsquo;s partially their fault, but mainly <a href="https://www.openreach.co.uk">BT OpenReach</a>.</p>
<p>I&rsquo;m <a href="https://en.wikipedia.org/wiki/Fiber_to_the_x">FTTC</a> connected and I get 14mbs down 0.2mbs up &hellip;. on a good day.
When I took this service up 3 years ago it was sufficient &hellip;. but now it&rsquo;s now.
So what&rsquo;s changed? Well, my site is getting more traffic (yay!) and I have more devices network connected.
Also, my family is abusing the network more as well. I am also having been an Amazon Prime subscriber for a year now.</p>
<p>So BT can&rsquo;t improve it in 3 years. But I need something, so kaboosh, lets look elsewhere.
Goscomb technical support while initially good is just simply shocking now they&rsquo;ve been bought out by <a href="http://www.hso.co.uk/">hSo group</a>.
They don&rsquo;t actually use their ticket tracker and when I phone up they say file a ticket. Explain patentiently I did &hellip;.. you get the idea.
Coupled with the fact their IPv4 service has been exceptional, but their IPv6 service has been getting very spotty (and IPv6 was one of the sole reasons for using them) it&rsquo;s time to look elsewhere again.
Also, I&rsquo;m maxing my download cap and it&rsquo;s getting annoying and the next tier up is quite pricey&hellip;.</p>
<p>So where to?</p>
<p>For better or for worse, I will be getting a <a href="http://www.virginmedia.com/shop/broadband/vivid-gamer.html">Virgin Media Vivid Gamer 200</a> cable connection installed on Saturday.
200mbs down, 20mbs up, no traffic management. Wow! The up is better than my down ever was! Unlimited downloads sounds sexy too.
The new deal is cheaper by £22 per month compared with the BT and Goscomb combo too boot.
So what&rsquo;s the catch?</p>
<p>Well, I can&rsquo;t use the Virgin Media Business account. They can&rsquo;t get a static IP address working on their business modem in modem mode. At all.
Also, there are reports of their static IP service being dog slow and when they change to dynamic the speed gets back up.
Both of these are deal breaks for me &hellip;. I need it in modem mode as I run my own network.
I&rsquo;m moving to them for the speed, not the slowness and network dropouts. Apparently this is because the static IP is a GRE tunnel over the residential service.</p>
<p>So this means no more 100% self hosting &hellip;. I need a static IP address to send mail from. So my solution is to rent a VPS for £3 a month to act as my public nameserver and email gateway.
This is now setup &hellip;. and in operation! It was fairly challenging, but the added bonus is that a lot more spam doesn&rsquo;t hit my homenetwork as it&rsquo;s blocked by spamhaus and postgrey. Even if it gets past that, it still has to defeat spamassassin on my mail mailserver, which is still hosted at home.
It also means no more IPv6 &hellip;. but I will investigate a <a href="https://tunnelbroker.net/">Hurricane Electric IPv6 Tunnel</a>. I&rsquo;ve used them before and it as good but slow &hellip; hopefully it will be useable on the new cable!
Virgin Media <a href="">claim to be rolling out IPv6 mid 2017</a> but I&rsquo;m not counting on that (but it would be nice).</p>
<p>Anyway, I think I&rsquo;ve got everything ready to be upgraded now and I&rsquo;m quite exited!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Ethan's Naming Day]]></title>
            <link href="https://roy.marples.name/blog/posts/ethan_naming_day/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ethan_naming_day/</id>
            
            <published>2016-12-03T17:47:00+00:00</published>
            <updated>2016-12-03T17:47:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So nice to have his naming day just after his Birthday :)</p>
<p>Abbey made the a lovely teddy bear cake with his name in building blocks &hellip; seriously more tasty than any shop bought cake.</p>
<p><img src="ethan_naming.jpg?lightbox=1024&amp;cropResize=200,200" alt="Ethan and Mummy">
<img src="ethan_naming_cake.jpg?lightbox=1024&amp;cropResize=200,200" alt="Ethan&rsquo;s Cake"></p>
<p>Loads of family and friends from both sides of the family made it a wonderful ceremony &hellip;.. and social afternoon party.</p>
<p><img src="ethan_naming_group1.jpg?lightbox=1024&amp;cropResize=200,200" alt="Marples and Friends">
<img src="ethan_naming_group2.jpg?lightbox=1024&amp;cropResize=200,200" alt="Hunt and Friends"></p>
<p>Well, the kids certainly had a party with a bouncy castle indoors!</p>
<p><img src="ethan_naming_kids_fun.jpg?lightbox=1024&amp;cropResize=200,200" alt="Bouncy castle">
<img src="ethan_naming_kids_food.jpg?lightbox=1024&amp;cropResize=200,200" alt="Bouncy castle"></p>
<p>Thanks for coming everyone!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/kids" term="kids" label="kids" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Ethan's 1st Birthday]]></title>
            <link href="https://roy.marples.name/blog/posts/ethans_1st_birthday/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ethans_1st_birthday/</id>
            
            <published>2016-12-02T19:42:00+00:00</published>
            <updated>2016-12-02T19:42:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My, how time has long. It doesn&rsquo;t seem too long ago since he arrived!
He fell in love with his new panda right away, was unsure about the arrival of the Birthday cake but sure loved eating it &hellip;.. and the bath afterwards :)</p>
<p><img src="ethan_panda.jpg?lightbox=1024&amp;cropResize=200,200" alt="Ethan with Panda">
<img src="ethan_cake.jpg?lightbox=1024&amp;cropResize=200,200" alt="Ethan with Cake">
<img src="ethan_cake_eat.jpg?lightbox=1024&amp;cropResize=200,200" alt="Ethan eating Cake"></p>
<p>Happy Birthday Son!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/kids" term="kids" label="kids" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[A New Start]]></title>
            <link href="https://roy.marples.name/blog/posts/a_new_start/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/a_new_start/</id>
            
            <published>2016-12-01T00:00:00+00:00</published>
            <updated>2016-12-01T00:00:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So, I&rsquo;ve not blogged for a long long long time.
The last time was over 2 years ago.
There are various reasons for this, involving Tech, Code and Life.</p>
<h2 id="tech">Tech</h2>
<p>My old blog was powered by <a href="http://www.s9y">Serendipity</a>.
Before that, it was <a href="http://trac.edgewall.org/">Trac</a> and before that it was <a href="http://www.drupal.org">Drupal</a></p>
<p>Now, Drupal was very &hellip;&hellip; well, blocky. It worked, and worked well to start. But my poor server at the time could not cope with the resource demands it had, alongside my existing Trac instances to host my project&rsquo;s wiki and ticketing systems. So I migrated it to the <a href="http://trac-hacks.org/wiki/FullBlogPlugin">Trac FullBlog Plugin</a>.
This was amazing! Where Drupal was complex, Trac was simplicity. Life was good.</p>
<p>But slow. As it turns out Trac itself was getting slower and slower.
So I changed from <a href="http://httpd.apache.org/docs/2.4/mod/prefork.html">Apache Pre-Fork</a> to <a href="https://www.lighttpd.net/">Lighttpd</a>.
This didn&rsquo;t work too great for me. Too complex, too crash. So I changed to <a href="https://www.nginx.com/solutions/web-server/">nginx</a>.
and used <a href="http://projects.unbit.it/uwsgi">uWSGI</a> to bridge my fcgi&rsquo;s. Wow, my multi-purpose server had free memory!
Amazing! I used this setup for about 5 years, maybe longer.
However, Trac still got slower and slower.</p>
<p>So I migrated it all to Serendipity (the blog that is).
I was also getting fed up with using <a href="http://git-scm.com/">git</a> as my source code repo alongside Trac so I changed that to <a href="http://www.fossil-scm.org">Fossil</a>.
No more Trac? And nginx and uwsgi working great! Life was good, my server now had over 1G free memory &hellip; which did slowly get used up as a cache I guess. But swap was never ever hit.
Even when compiling the server software.
Tech did not get this good.</p>
<p>But then it stopped.
Serendipity refused to let me log in to the admin panel.
But Life got in the way at this point. So I didn&rsquo;t blog.</p>
<p>Fast forward to now and my <a href="http://nuclearelephant.com/">DSPAM filter</a> stopped working.
Full stop.
No-one knew why, myself and a few NetBSD devs spent a few hours looking at the problem.
It only worked outside of my <a href="http://www.procmail.org/">procmail</a> filter, but my setup required it to work inside as I have email lists on the same box that required unfiltered mail to hit their informational funcions.
And I hate <a href="https://en.wikipedia.org/wiki/Email_spam">SPAM</a>.
So I installed <a href="http://spamassassin.apache.org/">SpamAssassin</a> as a replacement.
It turned out the <a href="http://www.pkgsrc.org/">pkgsrc</a> package needed a small bit of love, but now it&rsquo;s working as well as DSPAM ever did, but more importantly working.
As a result of this, I had to prune spam from my hosted mailing list archives and it turns out <a href="http://www.hypermail-project.org/">hypermail</a> doesn&rsquo;t allow you to do this, short of manually rebuilding the archive.
So I ditched that and rebuilt <a href="/archives">my mail archives</a> around <a href="http://www.mhonarc.org/">mhonarc</a>. I also took the time to theme it like my Fossil projects for consistency, which is fine.</p>
<p>Now, a lot of mail archives have a nice search function too so I decided to brush off my <a href="http://www.php.net">PHP</a> skills which I&rsquo;ve not used since the 1990&rsquo;s.
It turned out my skills weren&rsquo;t that great as I thought and my first attempt failed. But no error was posted OR logged.
It turned out that I couldn&rsquo;t get uWSGI or NGINX to actually log my PHP errors! I&rsquo;m sure there was a way, but frankly the setup was hard to manage so instead of bashing my head, I looked to find an easier solution.</p>
<p>Apache had gained a new <a href="https://httpd.apache.org/docs/2.4/mod/event.html">event MPM</a> which promised the same low memory use as NGINX.
It also had really improved <a href="https://httpd.apache.org/mod_fcgid/">mod_fcgid</a> and <a href="https://httpd.apache.org/docs/current/mod/mod_proxy.html">mod_proxy</a> so it&rsquo;s very useable easily.
PHP had <a href="http://php.net/manual/en/install.fpm.php">integrated PHP-FPM</a>.
As I no longer needed Trac, NGINX or uWSGI i said <a href="https://twitter.com/rsmarples/status/802230704985751552">bye bye</a> to them all and installed Apache.
So full circle on the web server, but I now had easy to find PHP error reporting, so my <a href="/archives/search.php">archives search page</a> worked fine after a quick fix!</p>
<p>In summary everything on my server was back to normal, fully working nicely, easily and well reported and diagnosed.
Except my blog. I spent more time looking at it, didn&rsquo;t like it, nor the hard upgrade I was looking at the to latest version.
So, after changing all my software, why not my Blog?</p>
<p>After migrating a few times, I know the score.
<strong>It&rsquo;s Tricky (TM).</strong>
So how to make life better? After a lot of research, I have settled on using <a href="http://getgrav.org/">GRAV</a> for a few reasons listed here:</p>
<ul>
<li>Does not force MySQL database (I prefer PostgreSQL)</li>
<li>No SQL database requirement, uses folders and Markdown files with embedded meta data</li>
<li>The default theme already looks good</li>
<li>Can self upgrade</li>
<li>Because everthing is in markdown files it should be easier to manage and migrate away from later</li>
<li>I want to self host- this is my data, not someone else&rsquo;s</li>
<li>It&rsquo;s in PHP <em>(so no need to install Node.JS, Ruby or whatever flavour of the month is)</em></li>
<li>MIT license (close enough to my favoured 2 clause BSD)</li>
</ul>
<p>So, this is the first post in a new blog, a new start where my Tech is currently &hellip;.. working without issue!
This has got to be a first for me :)</p>
<h2 id="code">Code</h2>
<p>I write code. I like to think I&rsquo;m quite good at it :) And like most people, I have an opinion on what makes good code and bad code &hellip;. I hate bad code, even my own!
So how did code get in the way?</p>
<p>I mentioned earlier that for some reason I my Serendipity admin login stopped working. Well, I looked at the code &hellip;. and it was not nice.
<em>(My install was an old version compared to their current 2.0 so this may have changed)</em>
There were little comments, there was poor seperation between Model, Controller and View.
Now, the actual code in question looked like it should be working &hellip;. it hashed my paswsword, compared the hash to the saved DB entry.
I even went as far as adding debug code.
It all looked perfect, yet it did not work. No-one knew where the error was.</p>
<p>I was also pretty annoyed with Serendipity for other reasons I discovered only after using it, so I decided to ditch it entirely and move on.
As you can tell above, I have no problem changing out software I no longer believe in, or fares poorly compared to others. I also enjoy when the software I originally chose makes great strides to tempt me back in the fold, like Apache.
I don&rsquo;t claim to understand web server code, but I did peruse their codebase a while ago and it looks cleaner compared to when I did in the early 90&rsquo;s trying to make it work on Windows for $DAYJOB.</p>
<p>I&rsquo;ve also spent a lot of time on my pet coding projects, dhcpcd, dhcpcd-ui, resovlconf and NetBSD.</p>
<p>Anyway, enough ramblings about code. There will be a lot more about that in the future anyway now that I have a working blog again.
Well, almost working.
I need to write some code to import from Serendipity to here, which will be nice as I enjoy coding and want to preserve the content I&rsquo;ve lovingly created- alongwith you in the comments- over the years and I would hate to lose that!
Speaking of comments, there is currently no comment system on this blog. <a href="https://twitter.com/intent/tweet?screen_name=rsmarples" class="twitter-mention-button" data-show-count="false">So Tweet me about it</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script> for the time being until I integrate something like <a href="https://posativ.org/isso/">ISSO commenting</a> or maybe find a Grav plugin.
I also need to find a way of providing top links to my project pages.</p>
<h2 id="life">Life</h2>
<p>So in the past few years, my Family has been very stable and loving :)
But a new child got in the way! Ethan Thomas Marples was born 2nd December 2015, so he&rsquo;s one year old tomorrow!
That has taken a lot of my time, and all my children still take a lot of my time, so it&rsquo;s a very enjoyable getting in the way :D</p>
<p>There&rsquo;s also been some changes at work. My old company <a href="http://www.instem.com/news/articles/1305-instem-enters-early-phase-clinical-market.php">Logos Technologies was bought by Instem</a>.
I&rsquo;m still doing the same job, working on the same product, but the inner dealings of the buy out, company politics and day to day integration have certainly been eye opening.</p>
<p>Playing games got in the way. Far too much time playing MMO&rsquo;s &hellip;. I&rsquo;m now off that bandwagon. But I don&rsquo;t regret it, it was a lot of fun :)</p>
<p>I&rsquo;ve also been on a health roller coaster. I&rsquo;ve taken the nice Doctors Orders and have invested in a <a href="https://www.fitbit.com/uk/chargehr">FitBit Charge</a> and <a href="https://www.fitbit.com/uk/aria">FitBit Aria Scales</a> which keep track of my steps, calories burned, sleep and weight. There is no more hiding.
The good news is that I&rsquo;m a lot fitter- I now enjoy walking and take a 40 minute walk each day minimum <strong>as well as walking the kids too and from school</strong>.
I&rsquo;m drinking a lot lot less, but still enjoy <em>(probably a little too much still)</em> a weekend tipple.</p>
<p>I&rsquo;ve lost over a stone <strong>(21 pounds to be precise)</strong> as a result!
My resting BPM as dropped from a <em>$HIGHNUMBER</em> to 58, which is healthy :D
I <em>should</em> keep track of my blood pressure more, but maybe in the new year &hellip;.. but</p>
<p>** GO ME!! **</p>
<p>I&rsquo;m fitter, stronger, more alert and ready to blog!
Although probably shorter blogs next time ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/code" term="code" label="code" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Writing software is hard, peer reviews help]]></title>
            <link href="https://roy.marples.name/blog/posts/writing_software_is_hard__peer_reviews_help/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/writing_software_is_hard__peer_reviews_help/</id>
            
            <published>2014-09-11T10:20:00+00:00</published>
            <updated>2014-09-11T10:20:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I&rsquo;ve been maintaining dhcpcd for a long time now. I feel that it&rsquo;s in very good shape and very resiliant to network changes and hickups.
I&rsquo;ve also finished FreeBSD, OpenBSD and DragonflyBSD support a while ago and it prompted a few OpenBSD people to take a look at it. One of them was Tobias Stoeckmann and he&rsquo;s been submitting a lot of patches to fix simple things that I should have checked, but sadly didn&rsquo;t. Luckily only one of them looks critical, and a dhcpcd release has already been made to hande it. The code in question has been in since dhcpcd-4 and no-ones spotted it until now which is kind of suprising really.</p>
<p>During this time I&rsquo;ve also been working on removing DBus support from libdhcpcd so it talks directly to dhcpcd. I&rsquo;ve also started a dhcpcd-qt port and written a dhcpcd-online tool, both of which use libdhcpcd. Whilst doing this I discovered that dhcpcd&rsquo;s control socket was very very flaky so that&rsquo;s now been vastly improved as well. There is an intermittent SIGPIPE error which I still don&rsquo;t know why it occurs, but it&rsquo;s gracefully handled and dhcpcd / libdhcpcd can easily restart things.</p>
<p>The lesson learned from both of the above points is that no matter how well you write your code, on a large project like this there is always an error somewhere and it someones takes someone else to find it!</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[I can reach you?]]></title>
            <link href="https://roy.marples.name/blog/posts/i_can_reach_you_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/i_can_reach_you_/</id>
            
            <published>2014-05-09T02:43:00+00:00</published>
            <updated>2014-05-09T02:43:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So part of the IPv6 spec deals with reach-ability.
It turns out the kernel is much better than this, purely because it relieves updates userland cannot when packets flow to/from the router we care about.
So removing the Neighbour Solicition code and instead polling (BSD) or listening for neighbour updates (Linux) makes the reachability detection much more reliable.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[clang static analyser]]></title>
            <link href="https://roy.marples.name/blog/posts/clang_static_analyser/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/clang_static_analyser/</id>
            
            <published>2014-02-28T20:16:00+00:00</published>
            <updated>2014-02-28T20:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So, <a href="http://clang-analyzer.llvm.org/">clang has a static analyser</a>. This effectively builds and does a deep analysis on the resultant binary for possible coding errors such as memory loss, dead code, etc.
I&rsquo;ve always run dhcpcd using <a href="http://valgrind.org/">valgrind</a>, a memory debugger which has (and still does!) served me well over the years alongside hard compiler warning flags. So I thought dhcpcd will be pretty good after running it through the analyser.</p>
<p>Boy was I wrong!</p>
<p>Well, not wrong, but a tiny bit annoyed. It did catch some false positives, but only because I know some conditions are impossible but could be better expressed so the pass the analyser. <a href="http://roy.marples.name/projects/dhcpcd/fdiff?v1=4ed1077628f81818&amp;v2=09d508a6fcb07d04&amp;sbs=1">here is a good example of what I mean</a>. The 1st two changes don&rsquo;t change anything in the real world, but do make the code easier to read and thus easier to analyse.</p>
<p>However, it has caught some real errors which can could problems in the real world. Nothing really earth shattering, but I like being a perfectionist!
During this process I also discovered that hard coding CC in Makefiles can be a bad thing. So we now just honour CC as set by the environment and default to using the make default or cc if not set.</p>
<p>So to test clang analyser on the latest dhcpcd head you can do this</p>
<pre><code>./configure
make clean
scan-build make
</code></pre><p>and check the results!</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Putting dhcpcd into context]]></title>
            <link href="https://roy.marples.name/blog/posts/putting_dhcpcd_into_context/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/putting_dhcpcd_into_context/</id>
            
            <published>2014-02-18T14:05:00+00:00</published>
            <updated>2014-02-18T14:05:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>dhcpcd has a lot of global variables.
For a traditional UNIX environment this makes a lot of sense, when working as a single master daemon or in a daemon per interface model.
But for a threaded model, this is very very bad because you then have competing threads wanting the same global resource. It Just Won&rsquo;t Work.
Now threading has no place in dhcpcd because it&rsquo;s just plain silly.</p>
<p>However &hellip;.. how about dhcpcd running in a pure threaded single process environment as found in Real Time OSs?
Now it becomes more interesting because you can no longer use signalling and you really are restricted to a single shot dhcpcd controlling all interfaces.
It could be argued that not having any global variables is just a better programming practice, but I&rsquo;m not entirely sold on that one.</p>
<p>Anyway, I&rsquo;ve recently committed quite a large patch to dhcpcd which passes a context to a functions which would otherwise have none so that every single function and operation can safely work in a threads based environment.</p>
<p>Now, I need to improve the control socket so that the dhcpcd commandline works the same way entirely without signals. fun times!</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Right after all these years]]></title>
            <link href="https://roy.marples.name/blog/posts/right_after_all_these_years/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/right_after_all_these_years/</id>
            
            <published>2014-01-15T10:51:00+00:00</published>
            <updated>2014-01-15T10:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So one of the main features of <a href="/projects/dhcpcd">dhcpcd</a> was the ability to add and remove addresses <em>and</em> subnets in accordance with interface preference and state.
This worked very well in Linux, both for IPv4 and IPv6.</p>
<p>When I discovered <a href="http://roy.marples.name/blog/archives/77-FreeBSD.html">FreeBSD</a> and then <a href="http://roy.marples.name/blog/archives/128-Finding-NetBSD.html">NetBSD</a> making dhcpcd work with the same features provided troublesome. For the IPv4 case, we needed to patch the kernel so that <a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet/in.c.diff?r1=1.129&amp;r2=1.130&amp;only_with_tag=MAIN&amp;f=h">IFA_ROUTE</a> <a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet/in.c.diff?r1=1.141&amp;r2=1.142&amp;only_with_tag=MAIN&amp;f=h">remained sane</a>.
For the IPv6 case it was a lot more complicated as parts of the IPv6 stack <strong>rely</strong> on the kernel processing Router Advertisements instead of a 3rd party tool. Working this out was a lot more time consuming and complicated, <a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet6/nd6_nbr.c.diff?r1=1.98&amp;r2=1.99&amp;only_with_tag=MAIN&amp;f=h">but we got there</a> <a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet6/nd6.c.diff?r1=1.146&amp;r2=1.147&amp;only_with_tag=MAIN&amp;f=h">with minimal fuss</a>!</p>
<p>So as of now, dhcpcd can fully replace the NetBSD and Linux in kernel Router Advertisement handling code.</p>
<p>But why was I right after all these years? Because quite a few knowledgeable NetBSD folk assured me that the kernel was fine and it was likely dhcpcd at fault. As it turned out, it really was the kernels fault.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Upgrading an old Gentoo installation]]></title>
            <link href="https://roy.marples.name/blog/posts/upgrading_an_old_gentoo_installation/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/upgrading_an_old_gentoo_installation/</id>
            
            <published>2014-01-08T19:06:00+00:00</published>
            <updated>2014-01-08T19:06:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>From my aging Gentoo laptop</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">roy@uberlaptop ~ $ emerge-1 portage
!!! Unable to parse profile: <span style="color:#c30">&#39;/etc/make.profile&#39;</span>
!!! ParseError: Profile contains unsupported EAPI <span style="color:#c30">&#39;5&#39;</span>: <span style="color:#c30">&#39;/usr/portage/profiles/default/linux/x86/13.0/eapi&#39;</span>
!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to--help,--info,--search,--sync, and
!!!--version.
roy@uberlaptop ~ $
</code></pre></div><p>Asking for help in a secret Gentoo IRC channel&hellip;.</p>
<pre><code>10:57 &lt; bonsaikitten&gt; rsmarples: ah, it's so old that you want to update
                      portage, best to use binpkgs
10:57 &lt; rsmarples&gt; *blinks*
10:57 &lt; bonsaikitten&gt; http://packages.gentooexperimental.org/packages/ # my
                      emergency supply of binpkgs
10:57 &lt; bonsaikitten&gt; the minimal set to get portage working again, afair, is
                      glibc+gcc+binutils+python+portage
10:58 &lt; rsmarples&gt; i should just need portage yes?
10:58 &lt; bonsaikitten&gt; yes, but that need python-2.7
10:58 &lt; bonsaikitten&gt; and my python binpkgs are too new and rely on a newer
                      glibc
10:59 &lt; bonsaikitten&gt; if you have python-2.7 there's a good chance that only
                      portage is needed
11:00 &lt; rsmarples&gt; .....
11:01 &lt; bonsaikitten&gt; what :)
11:01 &lt; bonsaikitten&gt; you didn't update for around ... 2 years? maybe 3?
11:01 &lt; bonsaikitten&gt; and our support horizon is currently between 6 months and
                      a year
11:01 &lt; bonsaikitten&gt; the binpkg method is the most painless way to punch a
                      machine forward
</code></pre><p>Lets just say the the chances of me coming back to working on Gentoo went from small to zero.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Welcome to 2014]]></title>
            <link href="https://roy.marples.name/blog/posts/welcome_to_2014/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/welcome_to_2014/</id>
            
            <published>2014-01-01T13:44:00+00:00</published>
            <updated>2014-01-01T13:44:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<h2 id="a-new-year-a-new-website">A new year, a new website!</h2>
<p>In truth, although I had a nice new server upgrade it seems that <a href="http://trac.edgewall.org/">Trac</a> just keeps on using resource after resource.
Now, having the site entirely python powered isn&rsquo;t entirely possible- thus far I have yet to find a reasonable email web interface other than <a href="http://roundcube.net/">RoundCube</a>
Also, my <a href="http://www.postgresql.org/">PostgreSQL</a> interface of choice uses <a href="http://php.net/">PHP</a>. Speaking of PostgreSQL, that kind of limits my blogging software choices as most of them only want to use MySQL, which I have no wish to use.
Here&rsquo;s a list of blogging software which can use PostgreSQL:</p>
<ul>
<li><a href="http://trac-hacks.org/wiki/FullBlogPlugin">Trac</a></li>
<li><a href="http://drupal.org/">Drupal</a></li>
<li><a href="http://www.s9y.org/">Serendipity</a></li>
</ul>
<p>So seeing as I&rsquo;m moving a way from Trac and I had a bad experience managing my
prior <a href="../blog_changed_from_drupal_to_trac_fullblog">Drupal install many years ago</a>,
it&rsquo;s no surprise that I&rsquo;ve migrated my blog over to Serendipity :)
As with the prior migration I&rsquo;ve preserved comment history and my image gallery.
However, I still need to edit all prior posts and correct their links.
At this point you maybe wondering what now powers my projects? Well, they recently <a href="http://roy.marples.name/archives/dhcpcd-discuss/2013/0946.html">converted from GIT to Fossil</a></p>
<p>All of this effort and not much blogging? Well, lets see if I can blog more here as it&rsquo;s my content which I own entirely on my self hosted site. I think I&rsquo;ve been giving to much content hosting to Facebook and Twitter. I&rsquo;ll not stop using them, but I expect to post more here :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[full DHCPv6 support for dhcpcd and link local addresses]]></title>
            <link href="https://roy.marples.name/blog/posts/full_dhcpv6_support_for_dhcpcd_and_link_local_addresses/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/full_dhcpv6_support_for_dhcpcd_and_link_local_addresses/</id>
            
            <published>2012-11-26T03:03:00+00:00</published>
            <updated>2012-11-26T03:03:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So dhcpcd in my git repo has had DHCPv6 support for some time now and I&rsquo;ll do a new release soon so it can get some testing. This is a major wooooo, as I only have a few RFC&rsquo;s for specific options I want to implement (such as NTP) and then we&rsquo;re golden. The only other big change I have planned for 6.0 it so seperate IPv4 foo from dhcpcd.c- hopefully giving it a proper namespace and moving to more TAILQ.</p>
<p>An another note, it&rsquo;s imperative that everyone knows about IPv6 foo if you run IPv6. Todays lesson is scope- a Link Local IPv6 address needs an interface scope. After fixing dhcpcd to append %eth0 (or your interface name) to the link local IPv6 address that then broke openresolv sending to dnsmasq via dbus. That in turn led me to writing a new DBus interface for dnsmasq and the current one didn&rsquo;t cater for IPv6 scoped addresses and the new one as used by NetworkManager didn&rsquo;t work over dbus-send which I need.</p>
<p>So it&rsquo;s been a productive weekend! I may even produce new releases over the weekend once the fallout has setlled ;)</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd gains DHCPv6 INFORM support and other things]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gains_dhcpv6_inform_support_and_other_things/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gains_dhcpv6_inform_support_and_other_things/</id>
            
            <published>2012-10-13T11:16:00+00:00</published>
            <updated>2012-10-13T11:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>It&rsquo;s been an eventful two years of not blogging. Mainly as I got heavily involved in playing <a href="http://eu.battle.net/wow/en/character/aszune/Twisteddeath/advanced">World of Warcrat</a>, <a href="http://www.swtor.com/">Star Wars: The Old Republic</a> and now <a href="https://www.guildwars2.com/en/">Guild Wars 2</a> and this is a technical blog not a gaming one.</p>
<p>Anyhoo, since GW2 is a lot more casual than the others the idea is that I have more time for working on open source stuff, like say dhcpcd. Well, I finally found some time over the past few months and put <a href="http://roy.marples.name/cgi-bin/gitweb.cgi?p=dhcpcd.git;a=commit;h=57cd5affbff05d41497b8295986e46360f6464db">DHCPv6 INFORM support into dhcpcd</a>. This is only triggered when dhcpcd recieves an IPv6 RA with the O flag set. Luckily, I put <a href="http://roy.marples.name/cgi-bin/gitweb.cgi?p=dhcpcd.git;a=commit;h=17f851e8344b1eb60954dd439b97917ec19734fa">IPv6 RS support</a> into dhcpcd a few months ago but didn&rsquo;t feel the urge to blog about it. Well, I do now!</p>
<p>Before the end of the year, I aim to have DHCPv6 IA support triggered via IPv6 RA with the M flag set as well. Do I have any other goals? Well, all my other projects are pretty much complete. One of the reasons why I starting gaming so much is that I&rsquo;m pretty happy with the current state of affairs and anything else is just a bonus. That being said, there are a lot more DHCPv6 things to do besides IA support such as better separation between IPv4 and IPv6, moving to TAILQ lists intsead of our hand rolled and other misc stuff such as improving dhcpcd-dbus and dhcpcd-gtk.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/gaming" term="gaming" label="gaming" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Back online]]></title>
            <link href="https://roy.marples.name/blog/posts/back_online/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/back_online/</id>
            
            <published>2012-08-30T14:07:00+00:00</published>
            <updated>2012-08-30T14:07:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Wow, not blogged for over two years. There&rsquo;s the advent of social media for you.
Anyhoo, I had a massive server failure so apologies for the downtime.</p>
<p>However, we&rsquo;re now back! Currently powered by a <a href="http://www.engadget.com/2010/08/19/shuttles-excessively-thin-xs35-nettop-now-shipping-1080p-ion-222/">Shuttle XS35</a></p>
<p>I took the moment to install <a href="http://www.netbsd.org/">NetBSD-6.0RC1</a> on it with a current snapshot of pkgsrc. The NetBSD-6 install kernel got the disk sizes wrong, but a NetBSD-5 install kernel gets it right. The downside is that the-5 kernel won&rsquo;t PXE install correctly whereas the-6 kernel will. So a bit of playing around, but I managed a network install in the end. That&rsquo;s the only real problem I&rsquo;ve had so far.</p>
<p>Software wise, everything has been updated to the most current in pkgsrc and I&rsquo;ve just copied my old configs over. Seems to be working fine so far. Shout up if you see something broken!</p>
<p>Will I blog more? Maybe.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Site upgrade]]></title>
            <link href="https://roy.marples.name/blog/posts/site_upgrade/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/site_upgrade/</id>
            
            <published>2010-07-04T21:35:00+00:00</published>
            <updated>2010-07-04T21:35:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve upgraded to trac-0.12 and all the plugins to the latest available. Everything still seems to work :)</p>
<p>I&rsquo;ve also ditched <a href="http://openid.net/">OpenID</a> for the time being as some spammers were still getting through. I still have trouble getting the <a href="http://trac-hacks.org/wiki/AccountManagerPlugin">AccountManager trac plugin</a> to work well, so I&rsquo;ve gone back to the trac spam filter plugin, with captcha support enabled. We&rsquo;ll see how this works.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Neglecting my blog]]></title>
            <link href="https://roy.marples.name/blog/posts/neglecting_my_blog/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/neglecting_my_blog/</id>
            
            <published>2010-07-04T11:08:00+00:00</published>
            <updated>2010-07-04T11:08:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>For a variety of reasons, I haven&rsquo;t blogged in a loooong time. So what have I been doing?</p>
<p>Firstly, Abbey gave birth to Theo Ray Marples on 3rd April 2010. Secondly, I have joined a <a href="http://www.worldofwarcraft.com">World of Warcraft</a> <a href="http://eu.wowarmory.com/guild-info.xml?r=Aszune&amp;gn=Chaos+Theory">guild</a> that raids <a href="http://www.wowwiki.com/Icecrown_Citadel">Icecrown Citadel</a> on a regular basis (8/12 progression). These two facts have taken up a lot of my free time I normally devote to working on my OSS projects.</p>
<p>But do not fret- the few bug reports I&rsquo;ve received have all been addressed and I have been releasing new versions when required. However, since I no longer use Gentoo I will not be maintaining <a href="openrc:wiki">OpenRC</a> anymore. That will need a new home. A big thanks to all the people who helped me work on it over the years :)</p>
<p>I may start blogging about <a href="http://eu.wowarmory.com/character-sheet.xml?r=Aszune&amp;cn=Twistedfire">Twisted Fire</a>, my Warlock which I play in Warcraft. I may also find the time to work on IPv6 support for <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a>, which is hopefully being updated in <a href="http://www.debian.org/">Debian</a> from the ancient <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551034">dhcpcd-3</a> it currently uses.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Linking with style .... and speed]]></title>
            <link href="https://roy.marples.name/blog/posts/linking_with_style______and_speed/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/linking_with_style______and_speed/</id>
            
            <published>2010-02-27T08:16:00+00:00</published>
            <updated>2010-02-27T08:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So, I&rsquo;ve been slowing going back to using <a href="http://www.gnome.org/">GNOME</a> instead of  using <a href="http://www.kde.org/">KDE-4</a>. I do this flip flop every once in a while as I&rsquo;m never truely satisfied by either. Now, GNOME works quite happily on my <a href="http://www.gentoo.org/">Gentoo/Linux</a> machines, but this is not the case on my favoured <a href="http://www.netbsd.org/">NetBSD</a> ones. Or rather, parts of GNOME don&rsquo;t work as they should, like the <a href="http://projects.gnome.org/evolution/">Evolution</a> mail client.</p>
<p>Evolution suffers two problems on my NetBSD box. One, it takes over 5 minutes to load and two, once it has checked and downloaded mail from my server it closes without error. The 2nd problem is probably a programming error in Evolution or one of its many dependencies, but the first problem could be anywhere! Research led me to <a href="http://lists.freebsd.org/pipermail/freebsd-gnome/2008-March/019514.html">this possible soltuion</a>. If you look closely, you&rsquo;ll find an old post by me in that thread fixing it with ld&ndash;as-needed on Gentoo/FreeBSD, but that isn&rsquo;t a real solution for NetBSD / pkgsrc users. Anyway, at first glance the patch on that thread makes perfect sense. So I came up with better patches (one for glib, one for Evolution) and it now loaded in under 3 seconds! All was well :)</p>
<p>Well, not entirely. Other applications started to show isses as a result. So at least we know we&rsquo;re in the right area. I then spent a few hours wading through the Evolution build chain and came to the conclusion I still hate autotools as it obscures everything but was no better off fixing it. But I did come up with a test case that opened an evolution library and searched for a symbol that did not exist. This should 30 seconds, which is far too long and is also probably what the poster of the FreeBSD patch did in the mail thread.</p>
<p>Cutting to the chase, the <a href="http://en.wikipedia.org/wiki/Linker_(computing)">runtime linker</a> on NetBSD was checking the same library for the same symbol over and over again. Going back to the FreeBSD linker, they have a patch which implements a negative cache which should solve this. But it doesn&rsquo;t, as it doesn&rsquo;t cache missed weak symbols. Luckily this is easy to rectify and you can <a href="http://mail-index.netbsd.org/tech-userlevel/2010/02/24/msg003325.html">find my patch here</a> and an updated one after performance testing elsewhere <a href="http://mail-index.netbsd.org/tech-userlevel/2010/02/25/msg003331.html">here</a>. Now Evolution loads in under 3 seconds and crashes right away- but that&rsquo;s an issue to fix another day :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/gnome" term="gnome" label="GNOME" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Robyn is 2]]></title>
            <link href="https://roy.marples.name/blog/posts/robyn_is_2/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/robyn_is_2/</id>
            
            <published>2010-02-04T01:31:00+00:00</published>
            <updated>2010-02-04T01:31:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a class="serendipity_image_link"  href='/blog/uploads/Birthdays/Robyn/2008/robyn_birth_cot-742x991.jpg'><!-- s9ymdb:202--><img class="serendipity_image_right" width="82" height="110"  src="/blog/uploads/Birthdays/Robyn/2008/robyn_birth_cot-742x991.serendipityThumb.jpg"  alt="" /></a></p>
<p>So my little angel is now 2 years old :)
She had a nice birthday and was very excited by present opening for the first time &hellip;. ominous. It only seems like yesterday she arrived!</p>
<p>Anyway, one big party to look forward to next weekend. Should be fun!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[terminfo merged into NetBSD]]></title>
            <link href="https://roy.marples.name/blog/posts/terminfo_merged_into_netbsd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/terminfo_merged_into_netbsd/</id>
            
            <published>2010-02-04T00:20:00+00:00</published>
            <updated>2010-02-04T00:20:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>It&rsquo;s taken some time, but my terminfo implementation is now <a href="http://mail-index.netbsd.org/source-changes/2010/02/03/msg006267.html">merged into NetBSD</a> :)</p>
<p>No doubt there will be some fallout and flames, but it&rsquo;s all about bringing some needed modernization into NetBSD!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[terminfo married to curses]]></title>
            <link href="https://roy.marples.name/blog/posts/terminfo_married_to_curses/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/terminfo_married_to_curses/</id>
            
            <published>2009-12-08T12:32:00+00:00</published>
            <updated>2009-12-08T12:32:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My prior <a href="blog:2009/09/25">terminfo</a> work has been completed and merged with curses. Userland applications have been re-worked where needed and everything is working just fine!</p>
<p>So NetBSD finally has an up to date replacement for the legacy termcap it currently uses. Well, it will have when merged - I&rsquo;ve only just <a href="http://mail-index.netbsd.org/tech-userlevel/2009/12/08/msg003017.html">asked for testing</a> so it might take some time before it hits-current.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/curses" term="curses" label="curses" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/terminfo" term="terminfo" label="terminfo" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Removing the ISC bloat]]></title>
            <link href="https://roy.marples.name/blog/posts/removing_the_isc_bloat/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/removing_the_isc_bloat/</id>
            
            <published>2009-11-23T11:32:00+00:00</published>
            <updated>2009-11-23T11:32:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>First off, <a href="https://www.isc.org/">ISC</a> must be given credit for supplying the <a href="https://www.isc.org/software/bind">BIND DNS</a> and <a href="https://www.isc.org/software/dhcp">DHCP</a> servers. They&rsquo;ve been powering a lot of the internet and private networking for many years, including this server. But the time has come to change!</p>
<p>I&rsquo;m now using <a href="http://www.nlnetlabs.nl/projects/nsd/">nsd</a> as my public authoritative name server and <a href="http://www.unbound.net/">unbound</a> as my private recursive name server. This results in config files much easier to setup and hopefully more security as <a href="http://www.nlnetlabs.nl/projects/nsd/">nsd</a> is very small leaving less room for public exploits. Also, the total memory used after a few days production is 40meg lighter than <a href="https://www.isc.org/software/bind">BIND</a> which is good as my server is really starved for memory right now.</p>
<p>So what&rsquo;s the catch? Well, there is no way of integrating <a href="http://en.wikipedia.org/wiki/Dynamic_DNS">Dynamic DNS</a> with <a href="http://www.unbound.net/">unbound</a> that I can see. I could use <a href="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</a> as a DHCP server as that can run a script per lease, which means I can use unbound-control to update DNS. But I dislike this as dnsmasq isn&rsquo;t entirely the right tool for the job. So I will probably write dhcpsd, a small portable and entirely new DHCP server that can be used to integrate with DNS via scripts. Watch this space!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[openresolv imported into NetBSD]]></title>
            <link href="https://roy.marples.name/blog/posts/openresolv_imported_into_netbsd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openresolv_imported_into_netbsd/</id>
            
            <published>2009-11-21T08:09:00+00:00</published>
            <updated>2009-11-21T08:09:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://roy.marples.name/projects/openresolv">openresolv</a> has been imported into NetBSD, which allows more than one daemon to update /etc/resolv.conf sanely and configure local nameservers for enhanced DNS, especially if running on a VPN. <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a> already uses resolvconf when available and dhclient in NetBSD has been patched to use it.</p>
<p>This is important for NetBSD, as many packages support resolvconf, but only when /sbin/resolvconf exists. This meant that a lot of packages that supported resolvconf, failed to work with any resolvconf implementation from pkgsrc.</p>
<p>PPP users who maintain their own scripts are encouraged to try it out :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Holiday needed from Holiday]]></title>
            <link href="https://roy.marples.name/blog/posts/holiday_needed_from_holiday/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/holiday_needed_from_holiday/</id>
            
            <published>2009-11-20T11:33:00+00:00</published>
            <updated>2009-11-20T11:33:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I learned an important lesson about being a parent whilst on holiday- you don&rsquo;t actually have a holiday as you&rsquo;re just looking after the kids somewhere else!</p>
<p>Still, it was very enjoyable. 24-28 deg C with only one day where it was too windy to sunbathe :)</p>
<p>I&rsquo;ve done almost zero coding since I got back as I&rsquo;ve been involved in meetings so damned much. This is good though, as we now have a very clear idea on how to achieve World Domination! Actually, it means that we spend less time coding to achieve the same end goal which means a better product delivered faster.</p>
<p>The holiday did hi-light an important need- my aging <a href="http://www.motorola.com/motoinfo/product/details.jsp?globalObjectId=87">Motorola PEBL</a> isn&rsquo;t up to the job of being a phone anymore AND having one that can be a tethered modem cheaply is essential. Or at least send/receive emails and remote desktop. As such I&rsquo;m hopefully getting the new <a href="http://uk.blackberry.com/devices/blackberrystorm/">BlackBerry Storm2</a> or <a href="http://uk.blackberry.com/devices/blackberrybold9700/">BlackBerry Bold 9700</a>. As I&rsquo;ll be making more trips to other parts of the world in the near future, this will become very essential very fast.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Off on Holiday]]></title>
            <link href="https://roy.marples.name/blog/posts/off_on_holiday/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/off_on_holiday/</id>
            
            <published>2009-10-26T22:14:00+00:00</published>
            <updated>2009-10-26T22:14:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, after all that happened with work and the recent and very successful business trip, I think I deserve one :D</p>
<p>So it&rsquo;s off to the <a href="http://www.visitcostadelsol.com/">Costa Del Sol</a> for 2 glorious weeks!</p>
<p>To appease the masses, dhcpcd-5.1.3 was released which will hopefully find its way into NetBSD-5.1. Try not to find any new bugs whilst I&rsquo;m away ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Off to America]]></title>
            <link href="https://roy.marples.name/blog/posts/off_to_america/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/off_to_america/</id>
            
            <published>2009-10-17T19:53:00+00:00</published>
            <updated>2009-10-17T19:53:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>For a week! Another business trip, again to Chicago. Maybe the next trip will be to another part as this will have been 3 times now!</p>
<p>Still, it&rsquo;s a nice city :)</p>
<p>Try not to report too many bugs with my software until I get back ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Resuming work on libterminfo]]></title>
            <link href="https://roy.marples.name/blog/posts/resuming_work_on_libterminfo/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/resuming_work_on_libterminfo/</id>
            
            <published>2009-09-25T14:06:00+00:00</published>
            <updated>2009-09-25T14:06:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, not really as it&rsquo;s already done :)
I also realise that I&rsquo;ve not blogged about it either! So here&rsquo;s a quick summary.</p>
<p>Each terminal type uses different codes to draw the same thing. So there&rsquo;s a database called <a href="http://en.wikipedia.org/wiki/Termcap">termcap</a> that maps a global two letter code to the terminal code to use. However, the API to this was quite limiting and some terminal descriptions don&rsquo;t fit into the available space. So <a href="http://en.wikipedia.org/wiki/Terminfo">terminfo</a> was created to remove these limitations. Most systems that use termcap have since changed to terminfo, except for <a href="http://www.netbsd.org">NetBSD</a> and <a href="http://opensolaris.org">OpenSolaris</a>.</p>
<p><a href="http://www.gnu.org/software/ncurses/">ncurses</a> is a terminfo/termcap/curses solution all rolled into one and nearly everyone uses it. So why roll another one? Well, because I think I write cleaner, faster and smaller code. Also, there should be choice - there are no other modern terminfo implentations. Plus, I like a challenge :)</p>
<p>But I am working once more on integrating it with libcurses. Once that is done, it&rsquo;s ready to go into NetBSD.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Service resumed]]></title>
            <link href="https://roy.marples.name/blog/posts/service_resumed/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/service_resumed/</id>
            
            <published>2009-09-02T20:57:00+00:00</published>
            <updated>2009-09-02T20:57:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve not blogged for a little while as my job has changed.
In a nutshell Logos Technologies Ltd was going the way of the dodo and the directors had a falling out. The net result is that <a href="http://www.earthtimes.org/articles/show/omnicomm-systems-acquires-edc-assets,914174.shtml">the assets of Logos Technologies Ltd were sold to Omnicom Systems</a>. However, I work for a new startup called EDC Investments (no homepage yet) &hellip;.. and I&rsquo;m working on the ALPHADAS(R) 2007a product which I&rsquo;ve spent the majority of the last 10 years working on.</p>
<p>Sounds complicated? It is, so I won&rsquo;t bore you with any more details! Suffice to say that I&rsquo;m very happy with how things turned out after months of uncertainty and worry :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[OpenID now required]]></title>
            <link href="https://roy.marples.name/blog/posts/openid_now_required/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openid_now_required/</id>
            
            <published>2009-07-21T12:11:00+00:00</published>
            <updated>2009-07-21T12:11:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So to make life a little easier, you now have to have an <a href="http://en.wikipedia.org/wiki/OpenID">OpenID</a> account to login to this site.
Only users who have logged in can create/change tickets, wiki and post comments to my blog.</p>
<p>There are quite a few <a href="http://en.wikipedia.org/wiki/List_of_OpenID_providers">OpenID Providers</a>, so it should be quite easy. You may already have an OpenID!
However, due to how the <a href="http://trac.sandbox.lt/auth/wiki/AuthOpenIdPlugin">OpenID plugin</a> works with <a href="http://trac.edgewall.org/">Trac</a> your username will look a little odd. This is because your OpenID is basically a FQDN, just like a web address. So it&rsquo;s best to use a provider like !http://<username>.provider.com or !http://provider.com/username- in other words, avoid Google for OpenID unless you want a really long username here. This not that bad though, as the plugin strips the !http:// part and the trailing slash.</p>
<p>You can see from this post that my OpenID is roy.marples.name, which shows that having your own domain and OpenID server is important if you want to look good ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[User registration now required]]></title>
            <link href="https://roy.marples.name/blog/posts/user_registration_now_required/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/user_registration_now_required/</id>
            
            <published>2009-07-20T13:09:00+00:00</published>
            <updated>2009-07-20T13:09:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My Trac spam filters seem to have stopped working.
So in an effort to tide the spam, this site now requires user registration to post tickets or edit the wiki&rsquo;s. One user account covers all trac projects, but you have preferences for each.</p>
<p>We&rsquo;ll see how it goes :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[NetBSD get getdelim(3) and getline(3)]]></title>
            <link href="https://roy.marples.name/blog/posts/netbsd_get_getdelim_3__and_getline_3_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/netbsd_get_getdelim_3__and_getline_3_/</id>
            
            <published>2009-07-14T07:56:00+00:00</published>
            <updated>2009-07-14T07:56:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Last night I added <a href="http://www.opengroup.org/onlinepubs/9699919799/functions/getline.html">getdelim(3) and getline(3)</a> to <a href="http://www.netbsd.org">NetBSD</a>.</p>
<p>A few programs in base system needed to be changed due to having their own getline function, most of which aren&rsquo;t anything like getline(3). Hopefully there won&rsquo;t be much fallout in <a href="http://www.pkgsrc.org">pkgsrc</a> as a result.</p>
<p>getline(3) is prefered over over functions such as fgetln(3) and fgets(3) because it&rsquo;s standards based and you get a dynamic buffer for really really long lines. However, POSIX did drop the ball on making it a standard from the GNU extension- it should return 0 on EOF and more importantly be called fgetline. Oh well.</p>
<p>I shall be rolling getline(3) support into <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a> later, but I&rsquo;ll have to do a link test in the Makefile to see if we can use it. I&rsquo;m unsure if I want to have a mini configure for dhcpcd or to keep using just make extensions &hellip;.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/netbsd" term="netbsd" label="NetBSD" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[On the importance of MTU]]></title>
            <link href="https://roy.marples.name/blog/posts/on_the_importance_of_mtu/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/on_the_importance_of_mtu/</id>
            
            <published>2009-07-04T17:58:00+00:00</published>
            <updated>2009-07-04T17:58:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So, I&rsquo;m now finally natviely IPv6 enabled :)</p>
<p>This led to an <a href="http://mail-index.netbsd.org/tech-net/2009/07/01/msg001460.html">interesting debtate about my internet connection</a>. In a nutshell my <a href="http://www.draytek.co.uk/products/vigor120.html">Drayetk Vigor 100 is broken</a>, but apparently by design. The problem is this- for IPv4 goes through my NAT whose public IP has an MTU of 1492 so Path MTU Discovery works fine. However IPv6 does not need NAT and the PPPoE interface does not have a public IPv6 and nor do the internal clients use it even it there was one. So the path MTU is 1500, which is too big for the PPPoE to handle.</p>
<p>The correct solution is to obviously terminate the IPv6 on a PPPoA connection, but only the <a href="http://www.cisco.com/en/US/products/ps6202/">Cisco 877 router</a> does this and that&rsquo;s outside of my price range, even on eBay.
One solution is to clamp the MSS on the router to 1430 so that all clients work. But this is a hack.
The best solution with my hardware is to force the MTU to 1492 for all nodes inside my network, so they share the same MTU as the PPPoE so that Path MTU Discovery works.</p>
<p>You can see this working for yourself on IPv6 now, as this site is IPv6 enabled and sits behind the PPPoE link. You&rsquo;ll need to query IPv4 servers for the address though as I don&rsquo;t yet have a glue record for IPv6, but as I&rsquo;m changing registrar that should change in a few weeks :)</p>
<p>Because of this, I&rsquo;ve made the dhcpcd default to request and use the MTU value if offered by the DHCP server. You&rsquo;ll be seeing this in dhcpcd-5.0.5 (now out). dhcpcd-5.0.6 will feature restoring the MTU correctly between leases.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/dhcpcd" term="dhcpcd" label="dhcpcd" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[ISP Changed]]></title>
            <link href="https://roy.marples.name/blog/posts/isp_changed/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/isp_changed/</id>
            
            <published>2009-06-30T09:47:00+00:00</published>
            <updated>2009-06-30T09:47:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I as <a href="blog:2009/06/15">blogged about earlier</a> I&rsquo;ve now changed ISP to <a href="http://www.goscomb.net">Goscomb Technologies</a>. Quite a straight forward migration and although the downspeed isn&rsquo;t much better, it&rsquo;s a lot snappier which implies I was congested on the Demon line. However, my upload speed has doubled, which is good news for this server :D</p>
<p>There maybe some more downtime in the near future as I may change registrar as I&rsquo;ll be getting native IPv6 later today (yay, no more <a href="http://en.wikipedia.org/wiki/Tunnel_broker">tunnel</a>!) and my current one (<a href="http://www.1and1.co.uk">1&amp;1</a>)don&rsquo;t appear to support IPv6 in their domain / dns setup.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Changing ISP]]></title>
            <link href="https://roy.marples.name/blog/posts/changing_isp/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/changing_isp/</id>
            
            <published>2009-06-15T09:36:00+00:00</published>
            <updated>2009-06-15T09:36:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve been a loyal <a href="http://www.demon.net">Demon Internet</a> customer for a long time now (since 1989 I think). But the time has come to change as they&rsquo;re simply just not the same ISP I first joined, started going downhill when they were bought by <a href="http://www.thus.net/">Thus</a>. Service speed degradation is now common and sometimes the PPP is just dead even though it gets an IP address. Also, they have no plans for native IPv6.</p>
<p>So I&rsquo;m changing to <a href="http://www.goscomb.net/">Goscomb Technologies</a> because they are slightly cheaper than Demon, have a 24Mb service NOW and offer native IPv6. I did have cause to phone Goscomb up, and it was nice to hear a native English speaker at the other end on a good quality line instead of a non native speaker on a poor quality line due to the customer services section being out sourced. Another plus.</p>
<p>What does this mean for you? Well, on the 29th of this month, the switch should be made, so there will be some downtime and delay whilst the DNS updates. So this is also a heads up :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Accelerated OpenGL on NetBSD on my laptop]]></title>
            <link href="https://roy.marples.name/blog/posts/accelerated_opengl_on_netbsd_on_my_laptop/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/accelerated_opengl_on_netbsd_on_my_laptop/</id>
            
            <published>2009-06-08T17:31:00+00:00</published>
            <updated>2009-06-08T17:31:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Accelerated OpenGL on NetBSD on my laptop - <strong>FINALLY</strong>!</p>
<p>It took some time, but it looks like the NetBSD and Xorg devs have finally cracked ATI X600 laptop cards working :)
The final bit on my behalf was enabling EXA acceleration as the older and default XAA caused the screen not to refresh properly.</p>
<p>OpenGL screensavers have been working flawlessly for nearly have the day now, so it looks fairly stable too. However, switching to console and back to X does disable DRI for some reason, so I have to do a full X restart which kinda sucks.</p>
<p>I may now look at getting one of my online games, <a href="http://www.eternal-lands.com/">Eternal Lands</a> working on NetBSD as well :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[mod_wsgi]]></title>
            <link href="https://roy.marples.name/blog/posts/mod_wsgi/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/mod_wsgi/</id>
            
            <published>2009-05-06T15:31:00+00:00</published>
            <updated>2009-05-06T15:31:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>In my efforts to improve performance in terms of speed and memory consumption of <a href="http://trac.edgewall.org/">trac</a> which powers web the interface you&rsquo;re seeing here, I&rsquo;ve just installed <a href="http://code.google.com/p/modwsgi/">mod_wsgi</a>.</p>
<p>Initial reaction is that it is lighter on memory and also faster, but time will tell. What I did like is that installation is very simple and well documented, unlike <a href="http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html">fastcgi</a> or <a href="http://fastcgi.coremail.cn/">fcgid</a>. Sadly I still need to use fcgid for the non python parts of my site.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[From git to subversion .... and back]]></title>
            <link href="https://roy.marples.name/blog/posts/from_git_to_subversion______and_back/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/from_git_to_subversion______and_back/</id>
            
            <published>2009-05-04T17:58:00+00:00</published>
            <updated>2009-05-04T17:58:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Whilst branching and tagging dhcpcd-5 it seems that a commit I made didn&rsquo;t find its way to the branched and tagged release, hence me <a href="https://roy.marples.name/archives/dhcpcd-discuss/0000031.html">releasing dhcpcd-5.0.1</a></p>
<p><a href="https://roy.marples.name/cgit/dhcpcd.git/log/?h=dhcpcd-5.0.1">dhcpcd-5 branch</a>. You can see here that I did commit before branching but if you look at the tarball built from svn the commit &ldquo;Fix existing address detection.&rdquo; isn&rsquo;t there.</p>
<p>Now, whilst this &lsquo;&lsquo;&lsquo;could&rsquo;&rsquo;&rsquo; be an error on my part, I&rsquo;m not prepared to take the chance it&rsquo;s also a subversion error. So I&rsquo;ve moved all my repositories to git. As I&rsquo;ll be dealing with more branches in dhcpcd soon, and git is supposed to be renowned for branch management, it&rsquo;s a move I&rsquo;ve been considering recently.</p>
<p>Anyway, I&rsquo;ve installed the <a href="http://trac-hacks.org/wiki/GitPlugin">trac GitPlugin</a>. It&rsquo;s not as speedy as the SVN browser for trac, but it works fine. If speed is a concern, <a href="http://roy.marples.name/cgi-bin/gitweb.cgi">gitweb</a> is available as well.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Breathing some life into ifconfig for Linux]]></title>
            <link href="https://roy.marples.name/blog/posts/breathing_some_life_into_ifconfig_for_linux/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/breathing_some_life_into_ifconfig_for_linux/</id>
            
            <published>2009-04-19T14:35:00+00:00</published>
            <updated>2009-04-19T14:35:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Linux ifconfig truely sucks. It cannot handle multiple inet addresses easily (using aliases for the interface name sucks). Also ifconfig sucks for a lot of scripting usage. Whilst iproute2 is a lot friendlier, it&rsquo;s also not ifconfig- which makes portable(ish) network configuration a lot harder.</p>
<p>Lastly, Linux has a lof of misc tools- ifenslave, vlanconfig, etc, which should all be wrapped up into ifconfig. The BSD ifconfig is a very good example of how network configuration should be done.</p>
<p>As such, I will attempt to write an ifconfig for Linux which addresses all the above, with a comprehensive man page. This will make the new network script for OpenRC a lot easier to use in turn. It&rsquo;s not aimed at being an iproute2 replacement as iproute2 handles a lot of other stuff outside of the scope of ifconfig.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Crusing]]></title>
            <link href="https://roy.marples.name/blog/posts/crusing/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/crusing/</id>
            
            <published>2009-04-19T11:12:00+00:00</published>
            <updated>2009-04-19T11:12:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I&rsquo;ve been away on a Cruise to France and Spain, aboard the <a href="http://www.pocruises.com/Ships/Oceana/Overview.axd">Oceana</a> to celebrate my Parents Ruby Wedding Anniversary (was last year, but the arrival of Robyn delayed things). It was my first cruise and it was a very enjoyable experience, which the exception of getting an acute allergic reaction from the on board Temple Spa shower gel (my normal stuff leaked).</p>
<p>Since being back I&rsquo;ve been very busy and both Abbey and I recovering from various ailments, but we&rsquo;re now in tip top condition! As such I&rsquo;ve had time to post some new <a href="http://roy.marples.name/blog/pages/gallery.html?serendipity%5Btoken%5D=40019e9b0a40e5825ffe7d89205a5d81&amp;serendipity%5Btoken%5D=40019e9b0a40e5825ffe7d89205a5d81&amp;serendipity%5Baction%5D=&amp;serendipity%5BadminAction%5D=&amp;serendipity%5Bsubpage%5D=%2Fblog%2Fpages%2Fgallery.html&amp;serendipity%5Bonly_path%5D=Holidays%2F2009%2FCruising%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bkeywords%5D=&amp;serendipity%5Bonly_path%5D=Holidays%2F2009%2FCruising%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bkeywords%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.name%5D=&amp;serendipity%5Bfilter%5D%5Bi.authorid%5D=&amp;serendipity%5Bfilter%5D%5Bi.extension%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DPI%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COPYRIGHT%5D=&amp;serendipity%5Bfilter%5D%5Bbp.TITLE%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT1%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT2%5D=&amp;serendipity%5Bfilter%5D%5Bbp.ALT%5D=&amp;serendipity%5Bsortorder%5D%5Border%5D=i.date&amp;serendipity%5Bsortorder%5D%5Bordermode%5D=ASC&amp;serendipity%5Bsortorder%5D%5Bperpage%5D=100&amp;go=+-+Go!+-+">screen shots</a>.</p>
<p>Now the parents have promised a repeat cruise in 9 years time- can&rsquo;t wait :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Car vandalised]]></title>
            <link href="https://roy.marples.name/blog/posts/car_vandalised/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/car_vandalised/</id>
            
            <published>2009-04-04T11:05:00+00:00</published>
            <updated>2009-04-04T11:05:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Some toss pot decided that he wanted my headlights and grill. Luckily my insurance covers it, sadly there&rsquo;s an excess which is marginally more than the private quote I had. But it was a rushed quote and there&rsquo;s no guarantee the other headlight even works, so through the insurance company it goes.</p>
<p>This looks like a steal to order job as they managed to lift the bonet slightly to get the headlights out, but rushed off as one headligh was left dangling.</p>
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Raymond Hunt]]></title>
            <link href="https://roy.marples.name/blog/posts/raymond_hunt/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/raymond_hunt/</id>
            
            <published>2009-03-19T23:59:00+00:00</published>
            <updated>2009-03-19T23:59:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Raymond Hunt aka Pops aka PopPops aka Abbey&rsquo;s Dad passed away peacefully two days ago after a long battle with cancer.</p>
<p>I&rsquo;ve not blogged about it because I was unsure if it was the right thing to do. Now I think it is, as this blog is supposed to be a diary of important life events as well as the standard technical stuff I blog about. Anyway, the oddest thing is that I only realised I loved him after he died. Why it should take a death for me to realise this I don&rsquo;t know. Does that make me a lesser man for not realising this sooner, or a greater man for gaining insight at the last?</p>
<p>At least now Abbey seems to have recovered from it, although she is mighty tired. She did spend the three weeks prior to this one at her Mums, looking after her and visiting Ray in his final days. I missed her and <a href="screenshot:223">Robyn</a> a lot in that time and am very glad they are both now home.</p>
<!-- s9ymdb:223--><img class="serendipity_image_center" width="110" height="83" src="/blog/uploads/Birthdays/Robyn/2008/IMG_0519-1400x1050.serendipityThumb.JPG"  alt="" />
]]></content>
            
                 
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[openresolv-3.0 out]]></title>
            <link href="https://roy.marples.name/blog/posts/openresolv_3_0_out/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openresolv_3_0_out/</id>
            
            <published>2009-03-17T10:01:00+00:00</published>
            <updated>2009-03-17T10:01:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://roy.marples.name/projects/openresolv">openresolv-3.0 is now out</a>.</p>
<p>It doesn&rsquo;t have any functional changes or improvements over the 2.0 version. So why the big release? Configuration baby, configuration.</p>
<p>Debian&rsquo;s resolvconf has plenty of mini configuration files, which openresolv has supported. This is quite problematic from a package distribution and maintainability perspective. Also, the implementation required plenty of forking sed or equivalent to parse them which is inefficient.</p>
<p>So openresolv now sports a shiny configuration file, which I think is more flexible and easier to manage. It has a downside and an upside. The downside is that you now have to configure the files to write resolver configuration to for dnsmasq/named. The upside is that if they are unconfigured (the default) then the subscribers don&rsquo;t litter /etc with files you&rsquo;ll never use.</p>
<p>Also, the subscribers themselves have been moved out of /etc and into /libexec as they aren&rsquo;t really configuration files.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Scallywhack]]></title>
            <link href="https://roy.marples.name/blog/posts/scallywhack/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/scallywhack/</id>
            
            <published>2009-03-14T19:30:00+00:00</published>
            <updated>2009-03-14T19:30:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve just installed <a href="http://projects.otaku42.de/wiki/ScallyWhack">ScallyWhack</a> on this server in response to some spam hitting my trac wiki pages which got past <a href="http://trac.edgewall.org/wiki/SpamFilter">SpamFilter</a>.</p>
<p>If you have any issues with this and it&rsquo;s really not spam, then email me or get it in touch via IRC. You will probably need to at least enable cookies and store your email address in the preferences.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd-gtk with new working preferences dialog]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gtk_with_new_working_preferences_dialog/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gtk_with_new_working_preferences_dialog/</id>
            
            <published>2009-03-06T00:49:00+00:00</published>
            <updated>2009-03-06T00:49:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After slaving away with more GTK+ learning, I&rsquo;ve finished a promising new dialog for <a href="http://roy.marples.name/projects/dhcpcd-ui">dhcpcd-gtk</a>.</p>
<!-- s9ymdb:242--><img class="serendipity_image_center" width="490" height="305"  src="/blog/uploads/Misc/dhcpcd-ui/dhcpcd-prefs-490x305.jpg"  alt="" />
<p>I&rsquo;ve also spent a lot of time polishing it with nicer icons, messages and titles. Unlike the previous version, this dialog works fully! It&rsquo;s looking so good, I&rsquo;ve just released dhcpcd-gtk into pkgsrc for your pleasure- enjoy :)</p>
<p>I also ought to get off my lazy ass and get ebuilds for them into Gentoo- maybe someone can do it for me?</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The Count Censored]]></title>
            <link href="https://roy.marples.name/blog/posts/the_count_censored/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_count_censored/</id>
            
            <published>2009-02-28T10:33:00+00:00</published>
            <updated>2009-02-28T10:33:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Oh, this is just so funny! Any adult Seasme Street fan will love this :)
NSFW!</p>
<p><a href="http://www.youtube.com/watch?v=B-Wd-Q3F8KM&amp;feature=related">The Count Censored</a>.
There&rsquo;s loads off follow ons for this too, and it&rsquo;s all good :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/humour" term="humour" label="humour" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Blog changed from Drupal to Trac FullBlog]]></title>
            <link href="https://roy.marples.name/blog/posts/blog_changed_from_drupal_to_trac_fullblog/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/blog_changed_from_drupal_to_trac_fullblog/</id>
            
            <published>2009-02-27T15:42:00+00:00</published>
            <updated>2009-02-27T15:42:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="../losing_that_drupal_lovin">I&rsquo;ve lost that Drupal feeling</a> for good now. Maintaining it was a bit too much hard work. Whilst trac is still a bit of work, the database structure is a lot easier to use and as such access my data.</p>
<p>All blog posts and comments have been retained, as has my <a href="http://roy.marples.name/blog/pages/gallery.html">image gallery</a>.
There are a few errors in the migration, but they are acceptable.</p>
<p>So welcome to new the site and enjoy :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/site" term="site" label="site" />
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[PuTTY to BSD with home/end]]></title>
            <link href="https://roy.marples.name/blog/posts/putty_to_bsd_with_home_end/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/putty_to_bsd_with_home_end/</id>
            
            <published>2009-02-25T13:39:00+00:00</published>
            <updated>2009-02-25T13:39:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> is a good Windows Terminal emulator that supports SSH. As such, you can use it to SSH into your Linux server and administer it. Life was good.Imagine my horror when I used it to SSH into my FreeBSD and NetBSD boxes and my home/end keys didn&rsquo;t work! Yea gods, editing files became harder. After spending time on why home/end didn&rsquo;t work on the standard <a href="../default__term_in_netbsd">NetBSD console either</a> I had a good idea as to what was wrong.Basically PuTTY sends linux console style home/end by default. It has a toggle for rxvt style, but that&rsquo;s provided rxvt (and as such it&rsquo;s termcap entry) was compiled with-DLINUX_KEYS, which the BSD termcaps are not. This isn&rsquo;t good :(So I&rsquo;ve spun a patch for PuTTY that changes the default home/end to match XTerm (as that&rsquo;s the default $TERM it sends) and changes the rxvt toggle to send the default style that rxvt expects. You can download the <a href="http://roy.marples.name/downloads/putty.diff">diff</a> and/or a <a href="http://roy.marples.name/downloads/putty.exe">win32 binary</a> I&rsquo;ve built as Windows machines don&rsquo;t normally come with a compiler. I&rsquo;ve sent the patch upstream- and hopefully it will be accepted so that PuTTY works out of the box for BSD and Linux servers.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The future of networking for OpenRC]]></title>
            <link href="https://roy.marples.name/blog/posts/the_future_of_networking_for_openrc/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_future_of_networking_for_openrc/</id>
            
            <published>2009-02-10T11:05:00+00:00</published>
            <updated>2009-02-10T11:05:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Whilst the networking scripts I wrote for baselayout and OpenRC are quite powerful, they do come at a price.
Here&rsquo;s some of the cons:</p>
<ul>
<li>Slow - each net.foo loads every network module</li>
<li>Hard to extend - only I really know how the network modules work</li>
<li>Has own dependency code separate to OpenRC</li>
</ul>
<p>So what&rsquo;s the future? Well, the future is scrapping the network module idea and just supplying an init script that can be multiplexed for each network component. Yes, I hear your gnashing and grinding of teeth as what is there currently just works out of the box. What I propose will also work out of the box :)The network modules will not vanish over night, as there are some parts that will not be brought over such as the system or arping modules as they don&rsquo;t make sense as init scripts. You can replicate the system module by configuring dhcpcd-5 per interface/ssid with a static configuration.When will this happen? Well, it will start to happen when <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd-5</a> is released, which isn&rsquo;t that far away. Why wait for dhcpcd-5? Glad you asked! dhcpcd-5 takes care of a lot of the network management for you. It now works as one daemon, not one per interface. It manages your routing table for you and allows DHCP created routes to be changed. The last feature is to pickup PTP interfaces and give them a default route to their destination address so that it integrates seamlessly with PPP and VPN clients.But what about the other DHCP clients- I want to use dhclient with ifplugd/wpa_supplicant.You have two options here- keep on using the exiting network modules or script ifplugd/wpa_supplicant yourself. Or use something else like <a href="http://projects.gnome.org/NetworkManager">NetworkManager</a>.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Happy Birthday to Robyn]]></title>
            <link href="https://roy.marples.name/blog/posts/happy_birthday_to_robyn/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/happy_birthday_to_robyn/</id>
            
            <published>2009-02-03T11:21:00+00:00</published>
            <updated>2009-02-03T11:21:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>1 years young today :D</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Happy Birthday to Me]]></title>
            <link href="https://roy.marples.name/blog/posts/happy_birthday_to_me_2009-01-29/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/happy_birthday_to_me_2009-01-29/</id>
            
            <published>2009-01-29T09:49:00+00:00</published>
            <updated>2009-01-29T09:49:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>36 years young today :D</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd GTK+ Monitor available]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gtk__monitor_available/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gtk__monitor_available/</id>
            
            <published>2009-01-26T13:57:00+00:00</published>
            <updated>2009-01-26T13:57:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://roy.marples.name/projects/dhcpcd-ui">dhcpcd-gtk</a> is a GTK+ monitor for <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a>. It uses <a href="http://roy.marples.name/projects/dhcpcd-dbus">dhcpcd-dbus</a> to actually talk to dhcpcd and <a href="http://hostap.epitest.fi/wpa_supplicant/">wpa_supplicant</a>. The end game is to be a viable alternative to <a href="http://projects.gnome.org/NetworkManager/">NetworkManager</a> for wired and wireless setups but without reliance on Linux specific libraries- we just require dhcpcd and GTK+ available on your platform.</p>
<p>At present, dhcpcd-gtk is just an application which sits in the notification area. The icon has several states, showing offline, address negotiation and online. When attempting to negotiate an address you get a nice animation. A notification bubble is also shown per interface state change.</p>
<p>Future versions will have Access Point selection and dhcpcd configuration options.
Both are currently available via pkgsrc-wip. Hopefully available in Gentoo soon as well :)
EDIT: ebuilds available for <a href="ftp://ftp.marples.name/pub/dhcpcd/dhcpcd-dbus-0.1.3.ebuild">dhcpcd-dbus</a> and <a href="ftp://ftp.marples.name/pub/dhcpcd/dhcpcd-gtk-0.1.4.ebuild">dhcpcd-gtk</a> from my ftp server.</p>
<p>EDIT: Here&rsquo;s a screenshot as requested</p>
<!-- s9ymdb:241--><img class="serendipity_image_center" width="417" height="137"  src="/blog/uploads/Misc/dhcpcd-ui/dhcpcd-gtk-417x137.jpeg" title="dhcpcd-gtk-417x137.jpeg" alt="" />
<p>Woooooooo</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[losing that Drupal lovin]]></title>
            <link href="https://roy.marples.name/blog/posts/losing_that_drupal_lovin/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/losing_that_drupal_lovin/</id>
            
            <published>2009-01-22T01:17:00+00:00</published>
            <updated>2009-01-22T01:17:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I like <a href="http://trac.edgewall.org/">trac</a>. It powers a lot of my project websites. Well, all of them infact.It&rsquo;s written in <a href="http://www.python.org/">Python</a> which is a very nice language.trac upgrades are few and far between, there have been no security issues since I&rsquo;ve been using it and it supports my DB of choice (<a href="http://www.postgresql.org/">PostgreSQL</a>) very well.I&rsquo;m starting to dislike <a href="http://www.drupal.org">Drupal</a>, which I currently use for this blog.It&rsquo;s written in <a href="http://www.php.net/">PHP</a> which is not a very nice language.Drupal seems to have a new security hole every month.It&rsquo;s modules (whilst many) often have issues on PostgreSQL DB&rsquo;s and are a pain to maintain.So I got thinking :)I use Drupal for this blog and my image gallery. That&rsquo;s it.I use trac for a lot more, like projects, documentation, ticket tracking, source browsing, etc.I discovered that trac <a href="http://trac-hacks.org/wiki/FullBlogPlugin">has a blog plugin</a> and a <a href="http://trac-hacks.org/wiki/ScreenshotsPlugin">screen shots plugin</a> which covers my drupal usage.I&rsquo;ve <a href="http://roy.marples.name/blog">knocked up a demo site here</a>. As you can see, it&rsquo;s not as pretty as Drupal, and the commenting system isn&rsquo;t as good.Well, not good at first glance- it just needs a reply button. trac-0.11 has a new theming engine and the theme plugs are still not ported which is why it looks a little ugly. However, you now get to use wiki formatting for comments, so it&rsquo;s good :) I still need to come up with a way to move my pictures across. Feel free to add comments, I have a <a href="http://trac-hacks.org/attachment/wiki/FullBlogPlugin/drupal2fullblog">python script to convert a Drupal blog into a trac FullBlog</a> so I can roll over at any time ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd gains DBus bindings]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gains_dbus_bindings/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gains_dbus_bindings/</id>
            
            <published>2009-01-18T09:27:00+00:00</published>
            <updated>2009-01-18T09:27:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a> is DHCP client. <a href="http://www.freedesktop.org/wiki/Software/dbus">DBus</a> is an IPC mechanism. Add them together and you get <a href="http://roy.marples.name/projects/dhcpcd-dbus">dhcpcd-dbus</a>! dhcpcd-dbus receives interface configuration events from the dhcpcd control socket and emits them to the DBus listeners. dhcpcd-dbus also has methods to release, rebind, stop and query dhcpcd on an interface. This allows users to control dhcpcd to some extent as all dhcpcd opertaions require root privilege and DBus has a fine grained ACL list for accessing these functions which dhcpcd-dbus can optionally use.Of course, to the end user, dhcpcd-dbus by itself is useless. I&rsquo;ve started work on another project, gnome-dhcpcd-applet which will just provide information on dhcpcd via a systray icon and popup tooltips when things happen. This should be done sometime next week. Future versions will allow for some configuration, wireless AP selection but most importantly try and eumlate the !NetworkManager &ldquo;I&rsquo;m online&rdquo; flag.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[NetBSD-5.99.6 will contain the required patches for dhcpcd]]></title>
            <link href="https://roy.marples.name/blog/posts/netbsd_5_99_6_will_contain_the_required_patches_for_dhcpcd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/netbsd_5_99_6_will_contain_the_required_patches_for_dhcpcd/</id>
            
            <published>2008-12-22T10:11:00+00:00</published>
            <updated>2008-12-22T10:11:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>As <a href="../dhcpcd_4_99_7_out___bsd_kernels_may_need_a_patch_for_it">blogged previously</a> BSD systems have issues when you try and change or delete the automatically added subnet route. My patches have now been comitted to NetBSD <a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet/in.c.diff?r1=1.129&amp;r2=1.130&amp;only_with_tag=MAIN&amp;f=h">here</a> and <a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/net/rtsock.c.diff?r1=1.118&amp;r2=1.119&amp;f=h">here</a>. If your NetBSD version is 5.99.6 or higher, then you can safely know dhcpcd will work (well, in regard to this anyway).</p>
<p>I&rsquo;ll try and get them backported to NetBSD-5 and NetBSD-4 in the New Year.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[NetBSD commit bit acquired]]></title>
            <link href="https://roy.marples.name/blog/posts/netbsd_commit_bit_acquired/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/netbsd_commit_bit_acquired/</id>
            
            <published>2008-12-09T09:05:00+00:00</published>
            <updated>2008-12-09T09:05:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/distrib/notes/common/main.diff?r1=1.430&amp;r2=1.431&amp;only_with_tag=MAIN">Today I became a NetBSD developer!</a> I&rsquo;ll mainly be working with dhcpcd in NetBSD and some pkgsrc stuff.  I do however have two patches lined up for the main NetBSD src tree- two trivial userland applications for POSIX compat (tabs and a new swtich to unexpand).</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd no longer sends a ClientID by default]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_no_longer_sends_a_clientid_by_default/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_no_longer_sends_a_clientid_by_default/</id>
            
            <published>2008-11-17T17:56:00+00:00</published>
            <updated>2008-11-17T17:56:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://roy.marples.name/projects/dhcpcd/changeset/1074/trunk">this is a small commit with big consequences</a>. Basically it means that dhcpcd will no longer send a default ClientID. You have to specify this behavior. This change has been made so that we mirror the lease credentials sent by the in-kernel DHCP client, the ClientID itself is NOT mandatory for ethernet and it turns out some very badly written DHCP servers do not like ANY ClientID.How does this affect you? Well, DHCP leases work by ClientID. Now depending on the DHCP server you may or may not be affected. With ISC dhcp-4, dhcpcd will now get a different lease as ISC dhcp-4 treats a ClientID of the hardware family + address as being different from just using the chaddr field of the DHCP message. With dnsmasq-2.46 you get the same DHCP lease.Is this the right thing to do? Well, yes and no. It&rsquo;s the right thing to do by default in my eyes. This now mirrors the behavior of ISC dhclient, pump and Solaris DHCP client. Interestingly, firewire and infiniband users still get a default ClientID has the RFC&rsquo;s demand it because you cannot fit the hardware address in the DHCP chaddr field.Is the change final? Maybe not- depends on the user backlash I guess.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[New dhcpcd versions out]]></title>
            <link href="https://roy.marples.name/blog/posts/new_dhcpcd_versions_out/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/new_dhcpcd_versions_out/</id>
            
            <published>2008-10-29T13:34:00+00:00</published>
            <updated>2008-10-29T13:34:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Nothing major - the 4.0 branch gets a fix to send DECLINE messages correctly (basically we forgot to add the IP and ServerID to the message) and the ntp.conf file path is tunable by <code>NTP_CONF=/usr/pkg/etc/ntp.conf</code> in <code>/etc/dhcpcd.enter-hook</code>. 4.99.3 got released as well with more fixes, mainly for 4.0 features which were broken. I&rsquo;m no longer hopeful about getting IPv6 support in by the end of the year as I don&rsquo;t see where I&rsquo;m going to get the time from. Ah well, it&rsquo;s not that urgent yet.On a side note, the new NetBSD server is working out well. It&rsquo;s very stable, the network throughput is better for downloading (as it&rsquo;s my router at home) and this site is more snappy :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Server upgrade completed]]></title>
            <link href="https://roy.marples.name/blog/posts/server_upgrade_completed/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/server_upgrade_completed/</id>
            
            <published>2008-10-24T00:11:00+00:00</published>
            <updated>2008-10-24T00:11:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>And it was almost entirely painless! Just like my quard core as an issue booting NetBSD MP (I need to have a PS2 keyboard plugged in OR the PS2 port disabled in the kernel), it seems that it doesn&rsquo;t like ACPI on my server. No matter - ACPI is not essential there. After that hurdle is passed the system booted. I guessed the wrong interface driver for the on board ethernet and my 6to4 tunnel isn&rsquo;t working- but everthing else appears to be.What IS interesting is that with all the services I need running, I have 300meg memory free and no swap usage whereas with Gentoo Linux the swapfile was being hit after a few hours of use. Obviously a few hours hasn&rsquo;t passed yet, but I&rsquo;ll monitor it. Hopefully less memory is used on the whole :)As NetBSD comes with things like postfix in the base OS setting them up was trivial. Also, postfix uses the dovecot sasl authenticator without needed in a recompile, which means I don&rsquo;t have to use postfix in pkgsrc OR that gawd awful program cyrus-sasl. I&rsquo;ve also configured Heimdal Kerberos and will play with that, as that comes with the base OS also.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Android uses dhcpcd]]></title>
            <link href="https://roy.marples.name/blog/posts/android_uses_dhcpcd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/android_uses_dhcpcd/</id>
            
            <published>2008-10-22T11:14:00+00:00</published>
            <updated>2008-10-22T11:14:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, someone told me that the <a href="http://code.google.com/p/android/">Google Android platform</a> uses my DHCP client, <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a>. Well, now that the code has been opened up, they do indeed have <a href="http://git.source.android.com/?p=platform/external/dhcpcd.git;a=summary">dhcpcd-4.0.0-beta9 in their git repo</a>.I must be doing something right if <a href="http://www.gentoo.org">Gentoo</a>, <a href="http://www.netbsd.org">NetBSD</a> and now <a href="http://www.google.com">Google</a> use dhcpcd :DI dunno about you, but that gives me a warm fuzzy feeling 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Drupal updated]]></title>
            <link href="https://roy.marples.name/blog/posts/drupal_updated/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/drupal_updated/</id>
            
            <published>2008-10-13T00:11:00+00:00</published>
            <updated>2008-10-13T00:11:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve updated Drupal on this machine from 5.11 to 6.5.
The main reason I didn&rsquo;t before was because the spam module didn&rsquo;t work with 6.x. I&rsquo;ve been using the captcha module recently instead on 5.x and noticed that it along with my other modules now worked on 6.x :)The upgrade wasn&rsquo;t entirely painless- image module needs to be upgraded to 5.x-2.x before the 6.x upgrade.Due to some faulty data, I lost my image gallery contents, but as I&rsquo;m a real man and backup, restoring it and fixing the upgrade was fairly easy.Also, node_revisions lost the reference to the right sequence.I think everything now works as before, but if you spot something wrong please let me know ASAP 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[OpenRC breaking your box, coming to a git ebuild near you]]></title>
            <link href="https://roy.marples.name/blog/posts/openrc_breaking_your_box__coming_to_a_git_ebuild_near_you/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openrc_breaking_your_box__coming_to_a_git_ebuild_near_you/</id>
            
            <published>2008-10-10T08:34:00+00:00</published>
            <updated>2008-10-10T08:34:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>One of the nasty hacks left in OpenRC is that the init.sh script (ie, the sysinit runlevel) runs a lot of hardcoded stuff at boot, such as udev and mounting of various bits in /sys, /dev/pts and /dev/shm.Later today I&rsquo;ll be comitted a VERY big patch that allows the running of ALL these bits as seperate init scripts in a real sysinit runlevel. The only required change outside of OpenRC is a new init script for udev which I&rsquo;ll link here when comitted. Scripts for devfsd and mdev will also be required, but it will be up to others to make them.EDIT: This is now committed. You can grab a udev script and comment on <a href="http://bugs.gentoo.org/show_bug.cgi?id=240984">Gentoo Bug #240984</a>This is have the side effect of removing the concept of coldplugging and we&rsquo;re just left with hotplugging.Coldplugging can still be done, but it will be a pure udev configure option and not an OpenRC one.The patch also make a few changes internally to librc where we now return an empty list object instead of a NULL when nothing exists.This makes the code a lot smaller elsewhere, and easier to read. Interestingly we actually malloc slightly less through the running of rc than prior versions.Also, some cosmetic changes will be made as well with more to come later.The last thing to do is then look into a shutdown runlevel for handling the hardcoded power monitoring stuff, or an alternative solution.Then we can finally think about making this sucker stable!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[trac spam]]></title>
            <link href="https://roy.marples.name/blog/posts/trac_spam/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/trac_spam/</id>
            
            <published>2008-10-08T13:33:00+00:00</published>
            <updated>2008-10-08T13:33:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>trac spam is now being handled by the <a href="http://trac.edgewall.org/wiki/SpamFilter">SpamFilter Plugin</a>Only one piece of spam, but it was enough to warrant this. I did try <a href="http://projects.otaku42.de/wiki/ScallyWhack">ScallyWhack</a> mod_security rules for trac, but it failed on the cookies rule all the time.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[PARP]]></title>
            <link href="https://roy.marples.name/blog/posts/parp/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/parp/</id>
            
            <published>2008-10-08T07:06:00+00:00</published>
            <updated>2008-10-08T07:06:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>No, not a <a href="http://www.urbandictionary.com/define.php?term=trumpet+bum">Bum Trumpet</a> ;)</p>
<p><a href="http://roy.marples.name/projects/parpd">Proxy ARP Daemon</a> is a new tool I&rsquo;ve written which complies with <a href="http://www.rfc-archive.org/getrfc.php?rfc=1027">RFC 1027</a>. In a nutshell it provides a transparent gateway for your subnet.</p>
<p>Why would you want this? Well, in a modern world you don&rsquo;t as <a href="http://roy.marples.name/projects/dhcpcd">DHCP clients</a> will configure routing correctly and have more bang for your bug with autoconfiguration. So what&rsquo;s the use of it? The answer is found in the new buzz-word of the moment- <a href="http://en.wikipedia.org/wiki/Virtualization">virtualization</a>. To get a virtual host to talk to the host and out into the internet you have to setup some kind of bridge between the two. A Proxy ARP daemon takes away the need for this. <a href="http://www.devco.net/archives/2007/10/18/xen_bridging_and_hetzner.php">Here&rsquo;s an example of it&rsquo;s use</a>.</p>
<p>Anyway, <a href="http://roy.marples.name/projects/parpd">version 1.0 has been rushed out the door</a>. Tested on Linux, FreeBSD and NetBSD. Linux does have an in-kernel Proxy ARP daemon, but I think the userland is a better place for it. You can find it right away in pkgsrc-wip with an rc script.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Looking for Logos]]></title>
            <link href="https://roy.marples.name/blog/posts/looking_for_logos/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/looking_for_logos/</id>
            
            <published>2008-09-29T12:33:00+00:00</published>
            <updated>2008-09-29T12:33:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>No, no, not the company I work for :PI&rsquo;m looking for somewith with artistic skill to create logos for OpenRC, dhcpcd and openresolv. Ideally the OpenRC logo should also be done as ASCII art with a max size of 15 rows for a curses splash plugin with progress bar I&rsquo;m working on.Email me your submissions at <a href="mailto:roy@marples.name">roy@marples.name</a> and I&rsquo;ll pick the winning logo!
There are no prizes - other than cookies!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[bugzilla shutdown]]></title>
            <link href="https://roy.marples.name/blog/posts/bugzilla_shutdown/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/bugzilla_shutdown/</id>
            
            <published>2008-09-26T12:02:00+00:00</published>
            <updated>2008-09-26T12:02:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My <a href="http://bug.marples.name">bugzilla</a> installation has now been shutdown, and all bugs have been migrated to new trac projects for all of them (found <a href="http://roy.marples.name/projects/dhcpcd">here for dhcpcd</a> , <a href="http://roy.marples.name/projects/openrc">here for openrc</a> and <a href="http://roy.marples.name/projects/openresolv">here for openresolv</a>). The main selling point is now an easy interface to trac bugs to code changes and code changes in response to bugs, as <a href="http://roy.marples.name/projects/dhcpcd/ticket/116">demonstrated here</a>. That bug also demonstrates one issue with the bug migration- wiki formatting.Over the weekend, I&rsquo;ll try and implement <a href="http://dev.rectang.com/projects/all">Multiple Trac Views</a> on trac-0.11 as it looks quite handy to replace the old <a href="blog:2006/06/29/projects">projects page</a>.
The current one in the <a href="http://roy.marples.name/projects">default trac</a> looks a bit naff :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd changes to svn and trac]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_changes_to_svn_and_trac/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_changes_to_svn_and_trac/</id>
            
            <published>2008-09-25T20:40:00+00:00</published>
            <updated>2008-09-25T20:40:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After <a href="../openresolv_changes_to_svn_and_trac">changing openresolv to trac and svn</a>, I&rsquo;ve done the same for dhcpcd. As such, the <a href="http://bugs.marples.name">bugzilla</a> database is now closed for new bugs for dhcpcd and openresolv and you should now use trac for each (found <a href="http://roy.marples.name/projects/dhcpcd">here for dhcpcd</a> and <a href="http://roy.marples.name/projects/openresolv">here for openresolv</a>). I&rsquo;ve migrated the bugs, attachments, resolutions and activity across for both.</p>
<p>These scripts are for bugzilla-3.0.3 and trac-0.11.1 and assume that no custom fields have been added.
They are also coded for specific product id&rsquo;s and my name- you will need to adjust accordingly.</p>
<p><a href="http://roy.marples.name/~roy/bugzilla2trac.sql">bugzilla to trac</a> sql script. It simply creates new tables for use in a trac db- ticket_change_status needs to be copied into ticket_change though.
<a href="http://roy.marples.name/~roy/bugzilla2trac.pl">bugzilla to trac</a> perl srcript. Extracts attachments from bugzilla and creates them in the current directory in a structure for use in trac.</p>
<p>TODO: attachment filesize is 0, this needs fixing.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[openresolv changes to svn and trac]]></title>
            <link href="https://roy.marples.name/blog/posts/openresolv_changes_to_svn_and_trac/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openresolv_changes_to_svn_and_trac/</id>
            
            <published>2008-09-24T22:29:00+00:00</published>
            <updated>2008-09-24T22:29:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Using <a href="http://www.drupal.org">Drupal</a> as a CMS is nice - it&rsquo;s worked for me very well.
However, it&rsquo;s not made for project management. I just had a static page that people couldn&rsquo;t add comments or feedback to (well, they could if I enable comments but that gets messy after a while). I do have <a href="http://www.bugzilla.org">bugzilla</a> to handle bugs but I find it too overblown and complex for my needs. Don&rsquo;t get me wrong, bugzilla has it&rsquo;s place and it&rsquo;s a solid project- it&rsquo;s just not suited for my small site. Could be due to my fanatical dislike of <a href="http://www.perl.org/">perl</a> :P</p>
<p>Also, <a href="http://www.logostechnologies.com">my company</a> suddenly had a need for a bug tracking system and a colleague of mine suggested <a href="http://trac.edgewall.org/">trac</a> which I installed on a server. I only looked at track briefly many years ago, and it had promise but lacked in a lot of places. I was pleased to see that a lot of good progress had been made and it&rsquo;s now very useable :) So much so, I&rsquo;ve decided to install it here and it now powers the <a href="http://roy.marples.name/projects/openresolv">openresolv</a> project page.  Because it&rsquo;s made to integrate into <a href="http://subversion.tigris.org/">subversion</a> I used <a href="http://repo.or.cz/w/git2svn.git">git2svn</a> to convert the openresolv git repo trunk into an svn trunk. It&rsquo;s now open for business and anonymous users can create and modify tickets and the wiki (well, parts of the wiki).</p>
<p>So is svn better than git or is git better than svn? It&rsquo;s a hard one to answer, both have their pluses and minuses. Luckily there is a trac addon that works with git, so I&rsquo;ll give that a try with dhcpcd.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[lighttpd out, apache in]]></title>
            <link href="https://roy.marples.name/blog/posts/lighttpd_out__apache_in/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/lighttpd_out__apache_in/</id>
            
            <published>2008-09-23T23:40:00+00:00</published>
            <updated>2008-09-23T23:40:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>You may have noticed an interuption to this service&hellip;..I finally got too irritated with the <a href="http://trac.lighttpd.net/trac/wiki/Docs">lighttpd configuration</a>. Seems there&rsquo;s a few fastcgi issues which I&rsquo;m now seeing. Also, development seems to have stalled. :(So, I gave <a href="http://www.apache.org">apache</a> another whirl. I don&rsquo;t recall why I changed from apache to lighttpd, but it was propably speed related. This is due to me running this site on an old VIA C3-2 processor and apache is slower than lighttpd - noticably on that box. This new(ish) server is an AMD64 Sempron (2400) and has the horsepower and memory for apache on this small site.Anyway, the configuration layout for apache has also changed drastically since I last used it - and for the better! The Gentoo apache team have my thanks for the nice overhaul :) I&rsquo;m also playing around <a href="http://trac.edgewall.org/">trac</a> as a replacement to <a href="http://www.bugzilla.org">bugzilla</a> and the <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd project page</a>. I&rsquo;ve <a href="http://roy.marples.name/projects/dhcpcd">set it up here</a> against an svn repo I migrated from git a while ago. We&rsquo;ll see if I like this to change over.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Experimental dhcpcd-4.99.1 available]]></title>
            <link href="https://roy.marples.name/blog/posts/experimental_dhcpcd_4_99_1_available/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/experimental_dhcpcd_4_99_1_available/</id>
            
            <published>2008-09-15T20:36:00+00:00</published>
            <updated>2008-09-15T20:36:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://roy.marples.name/dhcpcd">dhcpcd</a> now manages routing in a sane manner across multiple interfaces on BSD. It always has on Linux due to it&rsquo;s route metric support, but as BSD doesn&rsquo;t have this it&rsquo;s a little more tricky. We basically maintain a routing table built from all the DHCP options per interface and change it accordingly. As such, dhcpcd now prefers wired over wireless and changes back to wireless if the cable is removed (assuming both on the same subnet) and this works really well :DIt&rsquo;s now starting to look quite stable and all the features in dhcpcd-4 appear to be working still so I&rsquo;ve released an <a href="http://roy.marples.name/dhcpcd/dhcpcd-4.99.1.tar.bz2">experimental version</a> to get some feedback. BSD users can get a <a href="http://roy.marples.name/dhcpcd/dhcpcd.rc">rc.d script here</a>.So, lets have it!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Metrics]]></title>
            <link href="https://roy.marples.name/blog/posts/metrics/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/metrics/</id>
            
            <published>2008-09-10T14:34:00+00:00</published>
            <updated>2008-09-10T14:34:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>You tag something with a metric. The same somethings with a lower metric take precedence over the same somethings with a higher metric.</p>
<p><a href="http://roy.marples.name/projects/dhcpcd">dhcpcd</a> has been able to apply metrics to routes on Linux so that we can prefer to route packets over wired instead of wireless.
dhcpcd-git is now able to distinguish wired from wireless and can make a metric accordingly.</p>
<p>But how do we teach configuration files about this? Well, dhcpcd-git has an environment variable sent to each script telling it about the preferred order of interfaces (based on carrier, if we have a lease or not and metric). This works well, and we can now prefer wired nameservers over wireless ones in /etc/resolv.conf. Well, we can at least put them first in the list.</p>
<p>Whilst doing this, it struct me that <a href="http://roy.marples.name/projects/openresolv">resolvconf</a> has no means of preferring configurations other than a static interface-order file. This is not good for automatic foo! So openresolv now understands the <code>-m &lt;metric&gt;</code> option and the <code>IF_METRIC</code> environment variable so it can tag resolv.confs by priority. If no metric is specified, it takes priority. If &gt;1 interface on the same metric then we take lexical order.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Event Loops]]></title>
            <link href="https://roy.marples.name/blog/posts/event_loops/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/event_loops/</id>
            
            <published>2008-09-01T13:01:00+00:00</published>
            <updated>2008-09-01T13:01:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, support for multiple instances in dhcpcd is coming along nicely, but I&rsquo;ve had to pretty much re-write the entire state handling code. The existing code was wait for data or timeout. Then drop into case statements depending on if we timed out and what our current state is.The new code is now based around an event loop, where we register functions to call when we get data or a time has passed. We pass all functions an interface structure, which now holds the state and options (previously the state held the interface and options). This handling lease expiry times a lot easier- we simply set 3 timeout per interface (renew, rebind, expire) and let the event loop do its job.This new structure should also make it easier to add DHCPv6 support- it should just be a matter of registering new functions to listen on IPv6 connected sockets and then selecting a DHCPv6 server over a DHCPv4 one. As this new code is quite a big change and I think I&rsquo;m making life easier for DHCPv6 later on we&rsquo;ll probably skip 4.1 and move straight onto 5.0, adding DHCPv6 support in 5.1.Hopefully I&rsquo;ll commit this to git over the next few days- I just need to ensure that cable link events correctly move to the right state. The only thing that will be known to be broken in the first commit to git will probably be rebinding the interface on the command line as I&rsquo;ll probably need to move to using a control socket. We&rsquo;ll need one for dynamically adding and removing interfaces anyway.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[sed, the good and the bad]]></title>
            <link href="https://roy.marples.name/blog/posts/sed__the_good_and_the_bad/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/sed__the_good_and_the_bad/</id>
            
            <published>2008-08-20T14:41:00+00:00</published>
            <updated>2008-08-20T14:41:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Sed">sed</a> is a very powerful tool. Small than awk and grep and much more powerful. Some would also say it&rsquo;s harder to use, but I like it :)</p>
<p>Whilst putting a mini <a href="http://roy.marples.name/openresolv">resolvconf</a> into dhcpcd, I use very similar code to what I already had. But, I ran into a wall- dhcpcd needs to work when /usr is not mounted as it may be network mounted later. On Gentoo and most Linux distros, sed is found in /bin. However, on NetBSD it&rsquo;s in /usr/bin.</p>
<p>Oh what is a man to do  :?</p>
<p>Luckily, we can fall back to shell for simple sed usage. Here&rsquo;s a simple snippet</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">key_get_value<span style="color:#555">()</span>
<span style="color:#555">{</span>
       <span style="color:#366">local</span> <span style="color:#033">key</span><span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#033">$1</span><span style="color:#c30">&#34;</span> <span style="color:#033">value</span><span style="color:#555">=</span> <span style="color:#033">x</span><span style="color:#555">=</span> <span style="color:#033">line</span><span style="color:#555">=</span>
       <span style="color:#366">shift</span>
       <span style="color:#069;font-weight:bold">if</span> <span style="color:#555">[</span><span style="color:#033">$#</span>-eq <span style="color:#f60">0</span> <span style="color:#555">]()</span>; <span style="color:#069;font-weight:bold">then</span>
               <span style="color:#069;font-weight:bold">while</span> <span style="color:#366">read</span> line; <span style="color:#069;font-weight:bold">do</span>
                       <span style="color:#069;font-weight:bold">case</span> <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">line</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span> in
                       <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">key</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span>*<span style="color:#555">)</span> <span style="color:#366">echo</span> <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">line</span>##<span style="color:#a00">${</span><span style="color:#033">key</span><span style="color:#a00">}}</span><span style="color:#c30">&#34;</span>;;
                       <span style="color:#069;font-weight:bold">esac</span>
               <span style="color:#069;font-weight:bold">done</span>
       <span style="color:#069;font-weight:bold">else</span>
               <span style="color:#069;font-weight:bold">for</span> x; <span style="color:#069;font-weight:bold">do</span>
                       <span style="color:#069;font-weight:bold">while</span> <span style="color:#366">read</span> line; <span style="color:#069;font-weight:bold">do</span>
                               <span style="color:#069;font-weight:bold">case</span> <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">line</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span> in
                               <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">key</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span>*<span style="color:#555">)</span> <span style="color:#366">echo</span> <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">line</span>##<span style="color:#a00">${</span><span style="color:#033">key</span><span style="color:#a00">}}</span><span style="color:#c30">&#34;</span>;;
                               <span style="color:#069;font-weight:bold">esac</span>
                       <span style="color:#069;font-weight:bold">done</span> &lt; <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">x</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span>
               <span style="color:#069;font-weight:bold">done</span>
       <span style="color:#069;font-weight:bold">fi</span>
<span style="color:#555">}</span>
</code></pre></div><p>Old call</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">sed -ne <span style="color:#c30">&#39;s/^nameserver //p&#39;</span> /etc/resolv.conf
</code></pre></div><p>New call</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">key_get_value <span style="color:#c30">&#34;nameserver &#34;</span> /etc/resolv.conf
</code></pre></div><p>According to the time command on dash and bash shells this is ever so slightly faster when doing <code>resolvconf-u</code>. This is probably because we aren&rsquo;t forking an external command. Also, we&rsquo;re working on small files- this probably sucks hard for big ones.</p>
<p>Anyway, this has made it into openresolv-1.6 which now works in the root of a BSD system without /usr mounted :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd gains some resolvconf functionality]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gains_some_resolvconf_functionality/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gains_some_resolvconf_functionality/</id>
            
            <published>2008-08-14T11:39:00+00:00</published>
            <updated>2008-08-14T11:39:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><code>/etc/resolv.conf</code> is a single file that is often stamped on by many different applications.
One example of this is <a href="http://roy.marples.name/projectsdhcpcd">dhcpcd</a>
running on multiple interfaces.
<a href="http://roy.marples.name/projects/openresolv">openresolv</a> is a <a href="https://en.wikipedia.org/wiki/Resolvconf">resolvconf</a> implementation to help ahem resolve this by taking resolv.confs from these applications to make a single sane file.dhcpcd has always supported resolvconf when available - but what if it&rsquo;s not? dhcpcd restores the last saved resolv.conf when it fails/exits to try and make things work, but it&rsquo;s not exactly optimal as the order interfaces go down may not be the same order as when they come up.Well, fear no more! As dhcpcd-4 is now scriptable, implementing basic resolvconf functionality is fairly trivial. So dhcpcd remembers each interface resolv.conf and makes a single one each time dhcpcd calls its hook script.You should note that this is no replacement for resolvconf, as resolvconf is desgined to trivially hook into other packages, such as <a href="http://openvpn.net/">OpenVPN</a>. Also, resolvconf can configure local nameservers such as <a href="http://www.isc.org/products/BIND">BIND</a> and <a href="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</a> which allows for a more powerful solution as libc is very limited here.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Handling configuration files]]></title>
            <link href="https://roy.marples.name/blog/posts/handling_configuration_files/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/handling_configuration_files/</id>
            
            <published>2008-08-13T13:44:00+00:00</published>
            <updated>2008-08-13T13:44:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>All DHCP clients like to stamp their view on configuration files. After all, that is part of their job :)
However, many people also have their own settings in the same configuration file. Most people don&rsquo;t notice dhcpcd stamping on these files, but when they do they normally just turn that feature off.</p>
<p>The main culprit here is ntp.conf, as it can have quite a complex setup and dhcpcd has always imposed it&rsquo;s own world view on it. However, this lead to an interesting bug being found in NetBSD rc.d script for ntpd- it requires ntp.conf to configure <code>pidfile /var/run/ntpd.pid</code>. Now, dhcpcd can&rsquo;t put this in as the pidfile location changes from distro to distro, so effectively dhcpcd broke the stock script. Whilst this is a NetBSD bug, some people also asked why dhcpcd could not be more intelligent about things?  :?</p>
<p>So I&rsquo;ve now added a nice framework so that dhcpcd hook scripts can trivially top/tail config files with their own data can clean up after themselves. Here&rsquo;s a snippet from <code>50-ntp.conf</code> itself</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">do_ntp_conf<span style="color:#555">()</span>
<span style="color:#555">{</span>
   <span style="color:#366">local</span> <span style="color:#033">cleaned</span><span style="color:#555">=</span> <span style="color:#033">added</span><span style="color:#555">=</span><span style="color:#f60">1</span> <span style="color:#033">conf</span><span style="color:#555">=</span> <span style="color:#033">x</span><span style="color:#555">=</span> 
   clean_conf /etc/ntp.conf
   <span style="color:#033">cleaned</span><span style="color:#555">=</span><span style="color:#033">$?</span>
   <span style="color:#069;font-weight:bold">if</span> <span style="color:#555">[</span><span style="color:#c30">&#34;</span><span style="color:#033">$1</span><span style="color:#c30">&#34;</span> <span style="color:#555">=</span> <span style="color:#c30">&#34;add&#34;</span>-a-n <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">new_ntp_servers</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span> <span style="color:#555">]()</span>; <span style="color:#069;font-weight:bold">then</span>
      <span style="color:#069;font-weight:bold">for</span> x in <span style="color:#a00">${</span><span style="color:#033">new_ntp_servers</span><span style="color:#a00">}</span>; <span style="color:#069;font-weight:bold">do</span>
         <span style="color:#033">conf</span><span style="color:#555">=</span><span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">conf</span>:+<span style="color:#c30;font-weight:bold">\n</span><span style="color:#a00">}</span><span style="color:#c30">server </span><span style="color:#a00">${</span><span style="color:#033">x</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span>
      <span style="color:#069;font-weight:bold">done</span>
      append_conf /etc/ntp.conf <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">conf</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span>
      <span style="color:#033">added</span><span style="color:#555">=</span><span style="color:#033">$?</span>
   <span style="color:#069;font-weight:bold">fi</span>
   <span style="color:#069;font-weight:bold">if</span> <span style="color:#555">[</span><span style="color:#a00">${</span><span style="color:#033">cleaned</span><span style="color:#a00">}</span>-eq 0-o <span style="color:#a00">${</span><span style="color:#033">added</span><span style="color:#a00">}</span>-eq <span style="color:#f60">0</span> <span style="color:#555">]()</span>; <span style="color:#069;font-weight:bold">then</span>
      <span style="color:#555">[</span>-n <span style="color:#c30">&#34;</span><span style="color:#a00">${</span><span style="color:#033">ntpd_restart_cmd</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span> <span style="color:#555">]()</span> <span style="color:#555">&amp;&amp;</span> <span style="color:#a00">${</span><span style="color:#033">ntpd_restart_cmd</span><span style="color:#a00">}</span>
   <span style="color:#069;font-weight:bold">fi</span>
<span style="color:#555">}</span>
</code></pre></div><p>Nice and simple :D
I&rsquo;m currently debating if we can use this framework to do more intelligent handling of <code>/etc/resolv.conf</code> if resolvconf is not installed, but that&rsquo;s not as critical.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[select / poll timeout is not accurate]]></title>
            <link href="https://roy.marples.name/blog/posts/select_poll_timeout_is_not_accurate/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/select_poll_timeout_is_not_accurate/</id>
            
            <published>2008-08-01T10:25:00+00:00</published>
            <updated>2008-08-01T10:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I&rsquo;ve finally found out why the dhcpcd-4.0.0-rc series sometimes wedges itself - select and poll do not always timeout on time. If they return 0, then can return slightly early and the real time left is very small. This is likely a kernel timer resolution issue, something that won&rsquo;t be fixed easily, quickly or ever. Now, for fully passing IPv4LL compliance AND being DHCP re-transmission compliant AND timing out to the userland correctly we introduced expiry timers in dhcpcd-4.0.0-rc1. And for good randomness they are sub-second timers. So by fixing this, we sometimes wedged. I didn&rsquo;t notice it on my fast machines, but my main tester uses a slow embedded unit where it happened quite a lot!  :( So the fix is to change the timers to countdown timers instead of expiry ones. This is done by calculating the actual time between select calls and subtracting the result from our timers.  If timeout (return 0) then ensure that the lowest timer is negative so it really has timed out. This makes the code lighter as we&rsquo;re don&rsquo;t have to add the timeout to now all the time, just store the new timeout. Also, I&rsquo;ve had to remove the &ldquo;waiting for N seconds&rdquo; log as it&rsquo;s now useless- instead each relevant message says when the next event will occur. I think this looks nicer  ;) Oddly enough, this is the same behaviour as dhcpcd prior to the 4.0-rc1, just that we&rsquo;re now using subsecond timers- and more of them &hellip;.. we have come full circle :PLastly, some buggy libc implementations (FreeBSD prior to 7.0, uClibc-0.9.29) have the headers for a monotonic clock but the libc doesn&rsquo;t report it&rsquo;s actually there! dhcpcd will warn about this, because if the clock changes whilst dhcpcd is running then our timer code won&rsquo;t be firing its events at the right time.The net result is quite a large patch at this stage in the rc progress to stable, so there will be one last rc released over the next few days.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[You want dhcpcd-4.0.0-rc3]]></title>
            <link href="https://roy.marples.name/blog/posts/you_want_dhcpcd_4_0_0_rc3/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/you_want_dhcpcd_4_0_0_rc3/</id>
            
            <published>2008-07-28T09:42:00+00:00</published>
            <updated>2008-07-28T09:42:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Hmmmm, all my blogs appear to be about dhcpcd these days. No bad thing though eh? Anyway, if you&rsquo;ve been using dhcpcd-4.0.0-rc1 or rc2, you should update to rc3 as it fixes an issue with infinite leases and a potential issue with lease time overflowing time_t (as uint32_t is greater than time_t on 32-bit platforms). To get around this issue, we simply treat any unusable leases as infinite. This shouldn&rsquo;t be a problem as we base all our times around a monotonic clock instead of the actual time which means that when dhcpcd restarts you can handle leases of up to 67 years ahead. As dhcpcd runs, the maximum lease length it can handle starts to decrease. On 64-bit platforms, this issue is pretty much irrelevant as time_t is a lot bigger than uint32_t so they can handle any lease time you throw at it.</p>
<p>But this should be viewed as a non issue as in the real world, leases just are not that long. beta9 did not suffer from this as it used a decreasing timeout, but this proved to be inaccurate. Also for IPv4LL compliance we needed to introduce a second time, and for being able to exit on time for the userland a third time. Moving to a monotonic clock approach is much easier to manage, but did cause the above two bugs introduced in rc1.</p>
<p>NetBSD has also imported rc3 into-current (4.99.71) :)
NetworkManager svn (0.7.0) also supports rc3, but it needs to be configured for it if both dhcpcd and dhclient are on the same box.</p>
<p><code>./configure--with-dhcp-client=dhcpcd</code></p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[In the white room]]></title>
            <link href="https://roy.marples.name/blog/posts/in_the_white_room/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/in_the_white_room/</id>
            
            <published>2008-07-22T09:37:00+00:00</published>
            <updated>2008-07-22T09:37:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I spent all last week in bed :DOK, that&rsquo;s a small lie. I spent the evenings in the bedroom as the lounge was being re-painted. It&rsquo;s now a nice just off white colour for that nice spaceous look :) The end result of course meant a lack of WoW playing. But that was no bad thing as I got some quality time in with Abbey and Robyn  :P Thanks to &ldquo;Rob&rdquo; for buying me 300 on DVD- I&rsquo;ll hopefully watch it this weekend over a few beers :)Oh yeah- if you (yes, you the reader!) put your name on future gifts for me (keep em rolling- they&rsquo;re all good ;) ), it&rsquo;s probably also an idea to put your screen name on too as I know quite a few &ldquo;Rob&quot;s, the most obvious one being my brother</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd gains carrier detection]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gains_carrier_detection/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gains_carrier_detection/</id>
            
            <published>2008-07-16T23:53:00+00:00</published>
            <updated>2008-07-16T23:53:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so one of the most popular questions asked on the Gentoo forums is &ldquo;How can I stop DHCP from stalling startup?&ldquo;Well, as Gentoo is very minimal, it does not come with ifplugd or netplug by default- simply installing either solves this for wired. wpa_supplicant comes with an action script for wpa_cli to solve this for wireless also.NetBSD ships with ifwatchd for wired and wireless, but it&rsquo;s not enabled by default. Also, you have to instruct ifwatchd exactly how to configure the interface.Not exactly optimal.Also, several users have approached me directly in the past about dhcpcd supporting link management- I&rsquo;ve always turned them down with the argument that the majority of Linux drivers didn&rsquo;t work with link management. Thankfully that&rsquo;s no longer the case, so dhcpcd now has link management support :DYes there are still non functioning drivers and drivers may break with link management in the future so there is an option to disable this.But it&rsquo;s time to adopt the BSD approach here- fix the source, in this case the driver. This was sparked by some in #netbsd asking &ldquo;Where is the NetBSD equivalent of hdparm?&rdquo; Well, there isn&rsquo;t one, because if the hardware claims it does XYZ, the software attempts to use it.For the current Gentoo users of ifplugd/netplug + dhcpcd don&rsquo;t panic- it still works as is :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[A fruitfull weekend]]></title>
            <link href="https://roy.marples.name/blog/posts/a_fruitfull_weekend/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/a_fruitfull_weekend/</id>
            
            <published>2008-07-14T10:13:00+00:00</published>
            <updated>2008-07-14T10:13:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so I spent the majority of the weekend looking after my lovely daughter, whilst my equally lovely wife was painting the lounge. This meant time on my laptop instead of playing WoW &hellip;. so I got some good coding done also.dhcpcd is now in touching distance of passing Apples Bonjour conformance test :)&hellip;.. and it also works with <a href="http://www.gnome.org/projects/NetworkManager/">NetworkManager</a> svn! OK, !NetworkManager does need <a href="http://roy.marples.name/dhcpcd/networkmanager-dhcpcd.diff">this patch</a> but it&rsquo;s a starting point. It probably won&rsquo;t be merged into !NetworkManager as it stands as it&rsquo;s probably best to make it optional.The only thing I don&rsquo;t like about it is that it overrides the default script, so any user hooks aren&rsquo;t run. But that&rsquo;s an issue for another day :)EDIT: Patch is accepted upstream :D</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Making things robust]]></title>
            <link href="https://roy.marples.name/blog/posts/making_things_robust/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/making_things_robust/</id>
            
            <published>2008-07-09T12:07:00+00:00</published>
            <updated>2008-07-09T12:07:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so I&rsquo;ve started to look at <a href="http://www.gnome.org/projects/NetworkManager/">NetworkManager</a> 0.7.0 (SVN) sources so I can integrate dhcpcd into it, thus removing the hard dependency on dhclient. One thing that NM does is flush the interface of addresses and routes at both startup and shutdown. An existing dhcpcd instance does not like this at all and throws a bit of a wobbly, so the GIT repo now has patches to make it a little more robust as the user could trivially do this as well using ifconfig.Also, I think there is becoming a need for dhcpcd to notify other dhcpcd instances. This is so that if a dhcpcd instance is exiting AND it&rsquo;s controlling the default route it can tell other dhcpcd instances about this so one of them could install a new default route. If you feel this is a good or bad idea, then let&rsquo;s talk about it :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[meeeeh]]></title>
            <link href="https://roy.marples.name/blog/posts/meeeeh/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/meeeeh/</id>
            
            <published>2008-07-08T16:48:00+00:00</published>
            <updated>2008-07-08T16:48:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I get back from my holiday to find a nasty bug with beta7 where it wasn&rsquo;t renewing the lease correctly.
This has been fixed in beta8 :)</p>
<p>Other highlights</p>
<ul>
<li>support for Vendor Encapsulated Options</li>
<li>use ifname as IAID if less than or equal to 4 bytes</li>
<li>compiles and works correctly with <a href="http://en.wikipedia.org/wiki/Portable_C_Compiler">PCC</a> on NetBSD-4.99.69</li>
<li>sends LOG_INFO messages to the console by default (suppress with-q)</li>
<li>all string based config options are now run through the string parser (effectively means you can be stupid and put escape codes in the hostname, but more correctly in the ClientID or Vendor options)</li>
</ul>
<p>Other bugs have been squashed as well. Since release, I&rsquo;ve also fixed a cosmetic bug where a new IPv4LL address being probed is reported as 0.0.0.0 and dhcpcd now builds and works correctly on NetBSD for use in / if not using the NetBSD source tree.</p>
<p>EDIT: Just released beta9 with a patch that moves the new option-K in beta8 to-X so that we don&rsquo;t conflict with a custom SuSE patch if they want to move to dhcpcd-4. This shouldn&rsquo;t affect anyone as beta8 was only out for a few days.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Married for a whole year]]></title>
            <link href="https://roy.marples.name/blog/posts/married_for_a_whole_year/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/married_for_a_whole_year/</id>
            
            <published>2008-06-02T09:30:00+00:00</published>
            <updated>2008-06-02T09:30:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>And without any major catastrophic events either :D
However, one catastrophe is the lack of wedding pictures on this blog! So here&rsquo;s a picture of a passionate snog on our first holiday.</p>
<p><a class="serendipity_image_link"  href='/blog/uploads/Holidays/2003/LakeDistrict/LakeWindermere/IMG_0312-1600x1200.jpeg'><!-- s9ymdb:46--><img class="serendipity_image_center" width="110" height="83"  src="/blog/uploads/Holidays/2003/LakeDistrict/LakeWindermere/IMG_0312-1600x1200.serendipityThumb.jpeg"  alt="" /></a></p>
<p>That picture was taken over 5 years ago now and each and every kiss is new, exciting and very very intoxicating  }:) We&rsquo;re still madly in love with each other, probably more-so than ever.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[NetBSD imports dhcpcd]]></title>
            <link href="https://roy.marples.name/blog/posts/netbsd_imports_dhcpcd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/netbsd_imports_dhcpcd/</id>
            
            <published>2008-05-26T09:23:00+00:00</published>
            <updated>2008-05-26T09:23:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Woooo! Jörg Sonnenberger imported dhcpcd-4.0.0-beta into NetBSD recently, and it will now show up in-CURRENT base sets :)I feel kinda pleased by this as NetBSD carries a certain amount of respect that no Linux distribution comes close to imo.dhcpcd-4.0.0-beta5 should be very stable now. I have one bug to fix regarding IPV4LL support. Once fix it should then pass Apples Bonjour conformance tests I&rsquo;ll cut rc1. Maybe add an option to blacklist DHCP servers also.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Another dhcpcd alpha]]></title>
            <link href="https://roy.marples.name/blog/posts/another_dhcpcd_alpha/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/another_dhcpcd_alpha/</id>
            
            <published>2008-04-23T09:27:00+00:00</published>
            <updated>2008-04-23T09:27:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>And hopefully the last!
dhcpcd.sh is now looking slick and minimal.
ntp, nis and hostname lookup have been moved into example hook scripts.
dhcpcd.conf is now installed by default to request everything dhcpcd.sh needs, and ntp-servers also.
<code>classless_static_routes=&quot;1.2.3.4/8 5.6.7.8/16&quot;</code> is now exported to the script.
dhcpcd.sh and dhcpcd.conf now have man pages.</p>
<p>The last thing todo is decide on the following
Do we want per interface conigs in dhcpcd.conf? If so provide an example.
We currently trim leading and trailing whitespace in dhcpcd.conf. Should we provide a complex mechanism to allow spaces at the start/end of values?
If the hostname is an FQDN should we transmit it as such by default?</p>
<p>Answers on a postcard to the usual address :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Grab dhcpcd-4.0.0-alpha1 whilst it's hot]]></title>
            <link href="https://roy.marples.name/blog/posts/grab_dhcpcd_4_0_0_alpha1_whilst_it_s_hot/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/grab_dhcpcd_4_0_0_alpha1_whilst_it_s_hot/</id>
            
            <published>2008-04-16T11:49:00+00:00</published>
            <updated>2008-04-16T11:49:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Now /etc/dhcpcd.sh is very compatible with dhclient-script! That&rsquo;s the good news :)The bad is that I&rsquo;ve totally broken compatibility with older versions of dhcpcd for people that used the scripting part. Most dhcpcd users didn&rsquo;t, as dhcpcd was never that flexable when it came to the script bit. Oh well. We maybe able to provide a compat shim before the final released version though :)EDIT: OK, so we now have a compat shim, but we don&rsquo;t install it by default.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd is now a little scriptable]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_is_now_a_little_scriptable/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_is_now_a_little_scriptable/</id>
            
            <published>2008-04-13T00:10:00+00:00</published>
            <updated>2008-04-13T00:10:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, it&rsquo;s not really much more scriptable ;)</p>
<p>Basically the dhcpcd binary now only configures the interface and routes - everything else is configured by /etc/dhcpcd.sh</p>
<p>Yes, this means dhcpcd will finally install a script!
This makes it easier for the end user to change, as scripting in UNIX is common place, whereas hacking C code not so. The script does everything dhcpcd did, bar looking up the hostname in DNS (hopefully add this back soon), so in essence we&rsquo;ve lost nothing but gained more flexability.dhcpcd is still commandline compatible, and users shouldn&rsquo;t notice much difference. However, the defaults may change! Probably to something more minimal- the default probably won&rsquo;t be to update nis/ntp configuration.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Big Code Drops]]></title>
            <link href="https://roy.marples.name/blog/posts/big_code_drops/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/big_code_drops/</id>
            
            <published>2008-04-11T17:49:00+00:00</published>
            <updated>2008-04-11T17:49:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, no-one likes big code drops. But I&rsquo;ve just dropped a large one into dhcpcd git. Here&rsquo;s the commit message</p>
<pre><code>Normally I hate massive code drops, but heh.
 The code has been drastically re-arranged.
 Instead of populating a custom structure while parsing dhcp messages, we now pluck what we need right out of the message itself. We have custom functions and a lookup table to make this really easy.
 This makes us more like dhclient and udhcpc, and will enable us to easily add (and remove!) more dhcp options without having to actually change the code (much).
 We now store the real dhcp message we got in /var/db/dhcpcd-$iface.lease, the mtime of the file being used as when we got the lease. This file is read in when re-using an old lease instead of parsing the .info file.
 The benefit of all of this means that we're actually ~15k smaller when compiled with the same features.
 This has been tested for quite some time, and I'm pretty sure most bugs with the 3.2 branch have been fixed whilst making this. Right now, we are 99% command line compatible with the 3.2 branch.
</code></pre><p>That&rsquo;s pretty much it :)
I&rsquo;ve made this now, knowing that it will change very soon. Basically we&rsquo;re going to add knobs such that the default config will just do the basics- configure interface, routes and DNS. This satisfies NetBSD minimalistic requirements (more on this). Then the extra knobs will configure things like NTP, NIS, MTU and the hostname automagically like dhcpcd does at present. Don&rsquo;t panic though- the command line options to turn those off aren&rsquo;t going away either!</p>
<p>After this is done, we&rsquo;ll then add an interface to pull any DHCP option via our new generic interface, maybe something like so `dhcpcd-o LOGSERVERS,99``
Which will pull 2 options, one named which dhcpcd knows about, and the other numeric which dhcpcd doesn&rsquo;t. When dhcpcd doesn&rsquo;t know about it, you&rsquo;ll get the raw data as a hex string I would imagine.</p>
<p>This should make dhcpcd a lot more flexable :)
As it&rsquo;s very small, and already feature rich I&rsquo;ve put it forward to the <a href="http://mail-index.netbsd.org/tech-net/2008/01/16/msg000057.html">NetBSD tech-net mailing list</a> to fullfill a <a href="http://www.netbsd.org/contrib/soc-projects.html#tiny-dhcp">tiny dhcp client</a> to replace the bloated dhclient from ISC. It&rsquo;s not being done as a SoC project (I don&rsquo;t feel that I qualify as dhcpcd was already written really) and it&rsquo;s not a done deal that it will be used in NetBSD, but I am hopeful :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[RickRolling]]></title>
            <link href="https://roy.marples.name/blog/posts/rickrolling/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/rickrolling/</id>
            
            <published>2008-04-08T15:41:00+00:00</published>
            <updated>2008-04-08T15:41:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://www.urbandictionary.com/define.php?term=rick+roll">Rick Rolling</a> is quite a popular craze atm.Well, just in case you think you could be Rick himself, here&rsquo;s a <a href="http://home.centurytel.net/jpj007/astleyflowchart.jpg">flow chart to help</a> ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Pii on Wii?]]></title>
            <link href="https://roy.marples.name/blog/posts/pii_on_wii_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/pii_on_wii_/</id>
            
            <published>2008-04-07T15:16:00+00:00</published>
            <updated>2008-04-07T15:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://www.thinkgeek.com/stuff/41/superpiipii.html">Good clean toilet related fun</a> :jawdrop:Those wacky Japanese eh!I&rsquo;d like to know if that&rsquo;s also an accessory to the rumoured <a href="http://www.nintendolife.com/articles/2007/01/15/leisure_suit_larry_wii">Leisure Suit Larry game on Wii</a> &hellip;&hellip; ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Wish List is Empty]]></title>
            <link href="https://roy.marples.name/blog/posts/wish_list_is_empty/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/wish_list_is_empty/</id>
            
            <published>2008-03-27T17:29:00+00:00</published>
            <updated>2008-03-27T17:29:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Thanks to the Anonymous Coward you bought me the last item on my wishlist at Amazon. It&rsquo;s now empty!I never thought that people would think highly enough of my work to shower me with that many presents :) A big thanks to all of you :)Now I&rsquo;m left with the onerous task of finding more items for the wishlist 8)EDIT: I&rsquo;ve added some new stuff- I like Wii games  ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Seems like I broke Gentoo/FBSD]]></title>
            <link href="https://roy.marples.name/blog/posts/seems_like_i_broke_gentoo_fbsd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/seems_like_i_broke_gentoo_fbsd/</id>
            
            <published>2008-03-27T10:52:00+00:00</published>
            <updated>2008-03-27T10:52:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>If you&rsquo;re using OpenRC-0.2 on Gentoo/FreeBSD I broke your box! :(Sorry about that. Patch to fix booting can be found <a href="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commitdiff;h=a15c9aa1faaa9c387e80c1864de8c57710e28530">here</a>.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[I feel dirty]]></title>
            <link href="https://roy.marples.name/blog/posts/i_feel_dirty/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/i_feel_dirty/</id>
            
            <published>2008-03-26T13:09:00+00:00</published>
            <updated>2008-03-26T13:09:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so OpenRC finally made it&rsquo;s way into Gentoo portage. However, you should be aware that what IS in portage has some cruft /etc/init.d/functions.sh that presently doesn&rsquo;t work on shells other than bash and it has a broken modules init script.Basically, the git repo hosted by Gentoo which I use now has a Gentoo branch which is what the ebuilds in portage pull from. I hate finding out about this myself without being told. But anyway, it&rsquo;s done and there&rsquo;s not much I can do about it.So in summary, if you use the ebuilds in Gentoo portage, OpenRC may break in silly ways. I&rsquo;m not saying that the master branch won&rsquo;t, but I can certainly fix it a lot faster. Also, you can be sure my code works fine with bmake/pmake/gmake and a posix compliant shell, whereas any code in the Gentoo branch will be done for gmake and bash without regard to anything else. Which is why I feel dirty- all my hard work being abused.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Breaking ABI]]></title>
            <link href="https://roy.marples.name/blog/posts/breaking_abi/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/breaking_abi/</id>
            
            <published>2008-03-16T17:52:00+00:00</published>
            <updated>2008-03-16T17:52:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, since the initial OpenRC release, quite a few people where vocal on IRC bitching about it&rsquo;s use of reallocing a NULL terminated char** list with claims that it&rsquo;s slow and inefficient. So, I decided to take the test and rework OpenRC around the TAILQ macros as found in queue(3) for dealing with lists of strings- which it does a fair bit. After spending more time than I anticipated on this, here are the results on my slowest box measured by bash&rsquo;s time feature:</p>
<p>Before</p>
<pre><code>ubersparc ~ # time rc
real    0m0.215s
user    0m0.036s
sys     0m0.179s
ubersparc ~ # time /etc/init.d/local restart
 * Stopping local ...                                                                 [ok]
 * Starting local ...                                                                 [ok]

real    0m0.331s
user    0m0.086s
sys     0m0.251s
</code></pre>
<p>After</p>
<pre><code>ubersparc ~ # time rc
real    0m0.204s
user    0m0.042s
sys     0m0.161s
ubersparc ~ # time /etc/init.d/local restart
 * Stopping local ...                                                                 [ok]
 * Starting local ...                                                                 [ok]

real    0m0.338s
user    0m0.082s
sys     0m0.262s
</code></pre>
<p>So we can see that rc itself is quite a bit faster than before, as it did the bulk of string processing. However, services themselves are slightly slower. Why is this? Well, to keep the code similar we have to malloc and return a list head even if the list is empty. valgrind shows this as well, rc has less mallocs, whereas the services have more. So to improve the code futher we need to stop blindly mallocing list heads. It&rsquo;s hard to time overall speed, and my sparc doesn&rsquo;t run bootchart so I&rsquo;ll see if I can make some on my laptop, but my gut feeling is that it&rsquo;s no faster or slower overall than before.</p>
<p>In other words, using linked lists is only beneficial when dealing with large quantities of data. OpenRC doesn&rsquo;t deal with large quantities of data and as such is slower for starting individual services. The main speedup is purely due to joining and sorting which is faster due to linked lists.</p>
<p>This code has now been committed to git and the ABI has been broken (obviously- duh). The only things that links to us at this time are splashutils and einit. <a href="http://roy.marples.name/openrc/splash.patch">Here&rsquo;s a patch</a> to splashutils to make it work again. If I think it has no immediate benefit, why did I commit the code? Well, the answer is purely because it will scale a lot better so hosts with lots of services will see a better speed increase than my slow sparc with few services.</p>
<p>I&rsquo;ve also re-factored the code to match the BSDs KNF coding style and ditched my own custom one. It was fairly similar, so its not much of a change- the benefit is that hopefully more people will enjoy it :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Back to work]]></title>
            <link href="https://roy.marples.name/blog/posts/back_to_work/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/back_to_work/</id>
            
            <published>2008-02-18T12:45:00+00:00</published>
            <updated>2008-02-18T12:45:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, I&rsquo;ve had a wonderful two weeks with my wife and daughter. Slightly less fun re-decorating the nursery, but the good news is that the walls and ceiling are now painted and I just have to do the borders and woodwork. Then it&rsquo;s off to the shops to purchase new curtains and carpet. As the walls are a suede sage green, I&rsquo;m thinking of terracotta, but Abbey doesn&rsquo;t like it (not that she has a colour preference herself!).I arrived at work this morning to find a nice present- an old Faith No More album, which I&rsquo;ve now listened to about 3 times already! The sender didn&rsquo;t leave a note, so THANK-YOU who ever you are :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Welcome Robyn Alice Marples to the world]]></title>
            <link href="https://roy.marples.name/blog/posts/welcome_robyn_alice_marples_to_the_world/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/welcome_robyn_alice_marples_to_the_world/</id>
            
            <published>2008-02-03T12:49:00+00:00</published>
            <updated>2008-02-03T12:49:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;m a Dad at last! Abbey gave birth to our little girl at 04:53 this morning. She weighs 7 pounds and 10 ounces and looks amazing  8)
She also has her mothers really long legs, curly hair too!</p>
<p><a class="serendipity_image_link"  href='/blog/uploads/Birthdays/Robyn/2008/robyn_birth_cot-742x991.jpg'><!-- s9ymdb:202--><img class="serendipity_image_center" width="742" height="991"  src="/blog/uploads/Birthdays/Robyn/2008/robyn_birth_cot-742x991.jpg"  alt="" /></a></p>
<p>More pictures to come later :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd gets a performance boost]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gets_a_performance_boost/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gets_a_performance_boost/</id>
            
            <published>2008-01-29T11:38:00+00:00</published>
            <updated>2008-01-29T11:38:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>When I first released dhcpcd-3, it had support for FreeBSD. This was done using a <a href="http://www.freebsd.org/cgi/man.cgi?query=bpf&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+6.2-RELEASE&amp;format=html">BPF device</a> which has the benefit of getting the kernel to filter packets before they hit the program. This meant the dhcpcd only saw DHCP and ARP packets on BSD, whereas on Linux is saw all the packets coming in. Normally, this isn&rsquo;t an issue as the interface isn&rsquo;t configured at this point so traffic is minimal.</p>
<p>However, during a DHCP RENEW, there is quite a bit of traffic going around and it was all hitting dhcpcd. So I added some code to counter to ensure that we still work correctly during packet floods. However, dhcpcd does burn a lot of CPU during these times. I then saw a post to the busybox mailing list that had a BPF filter- but for Linux! First I knew about this, but apparently Linux has been able to use BPF for a long time. So dhcpcd now uses the same filter for Linux which means that dhcpcd won&rsquo;t chew CPU time even in packet floods. Or, at least, less CPU.</p>
<p>Get this new feature in <a href="http://roy.marples.name/projects/dhcpcd">dhcpcd-3.2.1</a>- today! :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Another year, another wrinkle]]></title>
            <link href="https://roy.marples.name/blog/posts/another_year__another_wrinkle/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/another_year__another_wrinkle/</id>
            
            <published>2008-01-29T11:30:00+00:00</published>
            <updated>2008-01-29T11:30:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Today I am 35 years young  :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Default $TERM in NetBSD]]></title>
            <link href="https://roy.marples.name/blog/posts/default__term_in_netbsd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/default__term_in_netbsd/</id>
            
            <published>2008-01-12T15:48:00+00:00</published>
            <updated>2008-01-12T15:48:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>For some reason is vt100 or console and vt220 for the others. This causes the home/end/pgup/pgdown keys not to work correctly.Setting a term of wsvt25 in /etc/ttys fixes this! Thankfully I have no idea why that isn&rsquo;t the default as it drove me potty :(</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Finding NetBSD]]></title>
            <link href="https://roy.marples.name/blog/posts/finding_netbsd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/finding_netbsd/</id>
            
            <published>2008-01-11T12:21:00+00:00</published>
            <updated>2008-01-11T12:21:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So, after finally going into a NetBSD irc channel with the express purpose of removing all compiler warnings from dhcpcd and making it add routes correctly on that platform, I got convinced into giving <a href="http://www.netbsd.org/">NetBSD</a> a spin.</p>
<p>So I wanged it on my amd64 and as promised, the default cd worked fine with my trusty RT2500 pci wireless card, and the installed default kernel did too. This was an improvement from NetBSD 3.x which I tried a long while ago as the installed kernel didn&rsquo;t work with my wireless much is a must have for me these days. To be fair, I started off on the bad foot with NetBSD back then as it was my first BSD experience and it wasn&rsquo;t good.</p>
<p>Thankfully, my experience with <a href="http://www.freebsd.org/">FreeBSD</a> means I now know a lot more, so with NetBSD-4.0 I was very quickly up and running.
After getting the network fully working, I pull down the OpenRC repo and tried a compile.
Surprise, surprise, loads of warnings and errors.</p>
<p>Now, the gcc that NetBSD ships with has a lot of warnings you just don&rsquo;t see with the one in Gentoo, or FreeBSD.
Luckily, most of the warnings were trivial to fix - and should help matters on archs where the default char is unsigned.
The errors were purely on the getmntinfo function and structure being different in NetBSD.
Then there is the matter of the init scripts - whilst most work, some won&rsquo;t or need a slight tweak.
The important thing is though that OpenRC now boots NetBSD!</p>
<p>I&rsquo;m also working on making the misc init scripts work by default through a make install on your arch as well, so moving an existing BSD rc.d system to OpenRC shouldn&rsquo;t be hard at all. But is NetBSD any better or worse than FreeBSD? Too early to say really&hellip;</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Why BSD's pmake is the best]]></title>
            <link href="https://roy.marples.name/blog/posts/why_bsd_s_pmake_is_the_best/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/why_bsd_s_pmake_is_the_best/</id>
            
            <published>2008-01-08T13:03:00+00:00</published>
            <updated>2008-01-08T13:03:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Simplicity :)</p>
<p>I strongly dislike autotools after dealing with it for a few years now. I shan&rsquo;t go into the reasons why here though. But suffice to say that the whole build system required autotools. dhcpcd-3 supported BSD based systems, so it was only fair that we strive to support their base install. This means no autotools. So I set about discovering what I could do that worked on pmake and gmake.</p>
<p>Sadly, the answer is that only simple things work, hence the dhcpcd-3 Makefile being quite long. Especially as it does a little bit of auto config for needed libraries, which used to be in the configure. Well, it sufficed for a long time, and when I started <a href="../baselayout_is_dead__long_live_openrc">OpenRC</a> I used a similar Makefile as it had to work their out of the box. Eventually my occasional partner in crime, vapier, came across my Makefile and complained about a few things, namely it&rsquo;s too complicated and good be a lot better. He even went and patched it so that it almost worked on pmake. But still, it needed to fully work.The end result is that I&rsquo;ve made some .mk stubs that work with both pmake and gmake, using the same variables that the mk stubs pmake ships with. It&rsquo;s nowhere near as flexable, and we do make many assumptions. Obviously, this is not suitable for everyone, but it suits me very well. And as it&rsquo;s all BSD licensed, feel free to use it as you wish- just respect my copyright.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Merry Christmas]]></title>
            <link href="https://roy.marples.name/blog/posts/merry_christmas_2007-12-25/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/merry_christmas_2007-12-25/</id>
            
            <published>2007-12-25T07:45:00+00:00</published>
            <updated>2007-12-25T07:45:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;m off to spent time with my family  8) I hope you are too and not reading this!  :P</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Gentoo starts to cut the cord]]></title>
            <link href="https://roy.marples.name/blog/posts/gentoo_starts_to_cut_the_cord/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/gentoo_starts_to_cut_the_cord/</id>
            
            <published>2007-12-21T09:45:00+00:00</published>
            <updated>2007-12-21T09:45:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so my readership probably just went down the tubes as my blog is no longer on <a href="http://planet.gentoo.org/">Planet Gentoo</a>. So let me say &ldquo;Hi!&rdquo; to the two readers I have left  ;)</p>
<p>Well, OpenRC/URC is pretty much done for a first release in terms of the software. All I&rsquo;m doing now is writing man pages for everything as we relied a bit on the <a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml">Gentoo Handbook</a>. The userland applications have been done, including a very long one for runscript. All that&rsquo;s left are man pages for librc and libeinfo which hopefully I&rsquo;ll do over Christmas.</p>
<p>Speaking of which, thanks to everyone who bought nearly everything on my <a href="http://www.amazon.co.uk/gp/registry/registry.html/202-3368784-9594202?ie=UTF8&amp;type=wishlist&amp;id=14HG7M01XATW1">wish list</a>. The irony being that the two items I probably wanted the most are the only two items left, and also the cheapest! Ah well, probably treat myself in the New Year.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Christmas gets more expensive every year]]></title>
            <link href="https://roy.marples.name/blog/posts/christmas_gets_more_expensive_every_year/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/christmas_gets_more_expensive_every_year/</id>
            
            <published>2007-12-17T11:25:00+00:00</published>
            <updated>2007-12-17T11:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Especially when you&rsquo;re buying stuff for your unborn child- like say <a href="http://www.johnlewis.com/+Baby/Travelling/Travelling/3+in+1s/2123/4615/Product.aspx">Bugaboo Chameleon pram</a> with a <a href="http://www.johnlewis.com/+Baby/Travelling/Travelling/Infant+Carriers/568/230409401/Product.aspx">Maxi Cosi infant carrier</a>. These things are not cheap, but after playing around with many prams for many months we decided that this was the pram we needed. Others we looked at were either too heavy, too flimsy, too un-wieldy, not enough storage space or other things. This pram was &ldquo;just right&rdquo; :)Lets just hope the nipper likes it ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[OpenRC is Terminal]]></title>
            <link href="https://roy.marples.name/blog/posts/openrc_is_terminal/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openrc_is_terminal/</id>
            
            <published>2007-12-08T23:37:00+00:00</published>
            <updated>2007-12-08T23:37:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Sorry, that was meant to be goes terminal ;)</p>
<p>Or more specifically, it can now query the termcap library to find out if your terminal supports the codes we need to do colour, boldness and cursor movement. We just use tgetent, tgetstr and tgoto, so just a standard libtermcap is all that is needed, but we optionally build against the more popular ncurses as well.Some BSDs termcap database is found on /usr, which is no good for us as we bring the system up, so we do have hardcoded escape codes for cons25 if querying the termcap database fails.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Toying with ideas]]></title>
            <link href="https://roy.marples.name/blog/posts/toying_with_ideas/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/toying_with_ideas/</id>
            
            <published>2007-11-26T14:17:00+00:00</published>
            <updated>2007-11-26T14:17:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Whilst forking OpenRC from baselayout and tying it into a vanilla FreeBSD I found myself asking &ldquo;Why the need to mount a memory disk?&rdquo;</p>
<p>Well, we need an area to save service states, lock files, the dependency tree and a few other goodies even if no physical disks are mounted read-write. This is a little more challenging for BSD as we can only create disks of a fixed size, which is hardly at the cutting edge of efficiency. However, as baselayout used to be entirely shell script based this was the only option, but as we&rsquo;re now backed by C for the most part I asked myself is there an alternative?</p>
<p>There answer is, of course, yes there is. We can use <a href="http://www.ecst.csuchico.edu/~beej/guide/ipc/mq.html">System V Message Queues</a>. I&rsquo;ll be looking into making an rc daemon which will handle service states, generate a dependency tree and use that to resolve the dependencies instead of each runscript instance trying to do this itself. This maybe a little complicated, and I have no experience of doing this so it make take a little while. Hopefully I can use semaphores to imitate the existing service exclusive file locks too.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[smaller init scripts again]]></title>
            <link href="https://roy.marples.name/blog/posts/smaller_init_scripts_again/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/smaller_init_scripts_again/</id>
            
            <published>2007-11-23T08:04:00+00:00</published>
            <updated>2007-11-23T08:04:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#099">#!/sbin/runscript
</span><span style="color:#099"></span><span style="color:#033">command</span><span style="color:#555">=</span>/usr/sbin/ntpd
<span style="color:#033">pidfile</span><span style="color:#555">=</span>/var/run/ntpd.pid
<span style="color:#033">command_args</span><span style="color:#555">=</span><span style="color:#c30">&#34;-p </span><span style="color:#a00">${</span><span style="color:#033">pidfile</span><span style="color:#a00">}</span><span style="color:#c30"> </span><span style="color:#a00">${</span><span style="color:#033">NTPD_OPTS</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span>
<span style="color:#033">required_files</span><span style="color:#555">=</span>/etc/ntp.conf
depend<span style="color:#555">()</span> <span style="color:#555">{</span>
	need net
	use dns logger
	after ntp-client
<span style="color:#555">}</span>
</code></pre></div><p>OK, you don&rsquo;t get the comment about where the example is, but heh.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[new structure for openrc init scripts]]></title>
            <link href="https://roy.marples.name/blog/posts/new_structure_for_openrc_init_scripts/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/new_structure_for_openrc_init_scripts/</id>
            
            <published>2007-11-20T12:01:00+00:00</published>
            <updated>2007-11-20T12:01:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I&rsquo;ve been using vanilla FreeBSD-7.0-Beta2 for a few weeks now. I&rsquo;ve also been extensively looking into it&rsquo;s rc system to see what it can do that openrc cannot. The answer is, well not much.</p>
<p>But there is one thing it does have which is very nice - and that&rsquo;s init script templates. Take this sample ntpd init script from Gentoo (line breaks and comments removed, sadly my blog removes the indents too)</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#099">#!/sbin/runscript
</span><span style="color:#099"></span>
depend<span style="color:#555">()</span> <span style="color:#555">{</span>
	need net
	use dns logger
	after ntp-client
<span style="color:#555">}</span>

checkconfig<span style="color:#555">()</span> <span style="color:#555">{</span>
	<span style="color:#069;font-weight:bold">if</span> <span style="color:#555">[</span> !-f /etc/ntp.conf <span style="color:#555">]</span>; <span style="color:#069;font-weight:bold">then</span>
		eerror <span style="color:#c30">&#34;Please create /etc/ntp.conf&#34;</span>
		eerror <span style="color:#c30">&#34;Sample conf: /usr/share/ntp/ntp.conf&#34;</span>
		<span style="color:#069;font-weight:bold">return</span> <span style="color:#f60">1</span>
	<span style="color:#069;font-weight:bold">fi</span>
	<span style="color:#069;font-weight:bold">return</span> <span style="color:#f60">0</span>
<span style="color:#555">}</span>

start<span style="color:#555">()</span> <span style="color:#555">{</span>
	checkconfig <span style="color:#555">||</span> <span style="color:#069;font-weight:bold">return</span> <span style="color:#033">$?</span>
	ebegin <span style="color:#c30">&#34;Starting ntpd&#34;</span>
	start-stop-daemon--start--exec /usr/sbin/ntpd <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>	    --pidfile /var/run/ntpd.pid <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>	    ---p /var/run/ntpd.pid <span style="color:#a00">${</span><span style="color:#033">NTPD_OPTS</span><span style="color:#a00">}</span>
	eend <span style="color:#033">$?</span> <span style="color:#c30">&#34;Failed to start ntpd&#34;</span>
<span style="color:#555">}</span>

stop<span style="color:#555">()</span> <span style="color:#555">{</span>
	ebegin <span style="color:#c30">&#34;Stopping ntpd&#34;</span>
	start-stop-daemon--stop <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>	    --pidfile /var/run/ntpd.pid <span style="color:#c30;font-weight:bold">\
</span><span style="color:#c30;font-weight:bold"></span>	    --exec /usr/sbin/ntpd
	eend <span style="color:#033">$?</span> <span style="color:#c30">&#34;Failed to stop ntpd&#34;</span>
<span style="color:#555">}</span>
</code></pre></div><p>Now, here&rsquo;s a replacement using the template system.</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#099">#!/sbin/runscript
</span><span style="color:#099"></span>
<span style="color:#033">command</span><span style="color:#555">=</span>/usr/sbin/ntpd
<span style="color:#033">pidfile</span><span style="color:#555">=</span>/var/run/ntpd.pid
<span style="color:#033">command_args</span><span style="color:#555">=</span><span style="color:#c30">&#34;-p </span><span style="color:#a00">${</span><span style="color:#033">pidfile</span><span style="color:#a00">}</span><span style="color:#c30"> </span><span style="color:#a00">${</span><span style="color:#033">NTPD_OPTS</span><span style="color:#a00">}</span><span style="color:#c30">&#34;</span>

depend<span style="color:#555">()</span> <span style="color:#555">{</span>
	need net
	use dns logger
	after ntp-client
<span style="color:#555">}</span>

start_pre<span style="color:#555">()</span> <span style="color:#555">{</span>
	<span style="color:#069;font-weight:bold">if</span> <span style="color:#555">[</span> ! -f /etc/ntp.conf <span style="color:#555">]</span>; <span style="color:#069;font-weight:bold">then</span>
		eerror <span style="color:#c30">&#34;Please create /etc/ntp.conf&#34;</span>
		eerror <span style="color:#c30">&#34;Sample conf: /usr/share/ntp/ntp.conf&#34;</span>
	<span style="color:#069;font-weight:bold">return</span> <span style="color:#f60">1</span>
	<span style="color:#069;font-weight:bold">fi</span>
	<span style="color:#069;font-weight:bold">return</span> <span style="color:#f60">0</span>
<span style="color:#555">}</span>
</code></pre></div><p>This should make a fair few init scripts smaller, and remove the headache of using start-stop-daemon which some users find.</p>
<p>On another note, the openrc build system has been revamped so we support both FreeBSD make and GNU make 100%. This means it&rsquo;s easier to slip into FreeBSD as a potential port, and maybe the other BSD&rsquo;s too.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[baselayout is dead, long live OpenRC]]></title>
            <link href="https://roy.marples.name/blog/posts/baselayout_is_dead__long_live_openrc/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/baselayout_is_dead__long_live_openrc/</id>
            
            <published>2007-11-12T15:03:00+00:00</published>
            <updated>2007-11-12T15:03:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, a few people have been saying that Gentoo is falling apart, they will leave Gentoo too and the world will end as we know it.  :O I can assure you that this is all lies ;)Basically baselayout will be split into two entities. Firstly, the bit that lays out the initial file system and provides the core system files shall remain as baselayout. The rest of it (ie, rc, init scripts, etc) will be forked off into a new package called OpenRC (working title). I will be upstream for it and continue developing it, fixing bugs, etc. The difference is that it will be an external project that Gentoo will use.This benefits me, as the Gentoo users can now rest easy knowing that it will be business as usual in regards to me leaving Gentoo.This also benefits Gentoo- it makes it easier to drop baselayout. Why is this a benefit? Well, there are other init systems available such as upstart, einit or init-ng all of which have pluses and minuses when compared to baselayout-2. As they are all external projects there should be no favouritism and it comes down to technical merit. Well, not quite as the entire Gentoo tree assumes baselayout is present, but it makes things easier anyway.Lastly this also benefits everyone else as it makes it easier to integrate into other distros / OS&rsquo;s. Especially as I intend to re-license it as a <a href="http://www.gnu.org/licenses/info/BSD_2Clause.html">2 clause BSD License</a>. This essentially allows it to be used as a replacement for the BSD rc system. I could do this with its current GPL2 license, but it would never be allowed into the core system so it is needed. This will require some work as the BSD file layout is a bit different, and I&rsquo;d also like it to work with existing BSD rc init scripts where possible.Speaking of re-licensing, I&rsquo;m also doing the same to resolvconf-gentoo-&gt; openresolv and dhcpcd-3.1 for the same reasons as above.If anyone posts any comments about GPL vs BSD license then I&rsquo;ll just ignore you. I believe that the core OS bits should be BSD licensed as they are pretty much generic these days, but things like GNOME and stuff should be GPL licensed as that&rsquo;s what the user actually uses. That&rsquo;s my view and I don&rsquo;t wish to debate it :P</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Bye bye Gentoo]]></title>
            <link href="https://roy.marples.name/blog/posts/bye_bye_gentoo/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/bye_bye_gentoo/</id>
            
            <published>2007-11-05T09:58:00+00:00</published>
            <updated>2007-11-05T09:58:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I never thought I would write this, but it&rsquo;s true. I&rsquo;ve retired from Gentoo. It&rsquo;s been a fun ride, I&rsquo;ve made many new friends and thankfully few enemies. But our views no longer follow the same path. This is not a snap decision, I have been thinking about it in the back of my mind for a few weeks now.Why am I leaving? Well, my view of Gentoo has always been about choice. You know your USE flags? Well, you choose them. Choice. It&rsquo;s a good thing- it makes Gentoo a very powerful distro. I&rsquo;m leaving because I&rsquo;m being denied lack of choice with the underpinnings. The current Gentoo mindset is once the tool has been picked, embrace it to the exclusion of all other tools. The current idea is to have the entire GNU toolset available for portage to use. I find this unacceptable after I&rsquo;ve strived to make baselayout work with the tools the base OS provides and even other init systems in portage. There is no technical reason why this cannot be done, or even dare I say allowed so we can at least try. But no, we cannot even do that.Speaking of baselayout, I am sorry to leave it behind just when the finishing post for it being unmasked was so close. But I may continue working on it as an external project if the Gentoo Trustees will allow it to be BSD licensed. I&rsquo;m pretty sure I could do that anyway as I did write 99% of it from scratch, but I&rsquo;m a nice guy so I asked. Gentoo can then either can on using it or get other devs to take it over or use something else.I have other projects to work on- maybe I&rsquo;ll now have the time to write that IPv6 stack for dhcpcd and actually get it into the various BSDs.I&rsquo;ll probably stop using Gentoo as well move into FreeBSD.I&rsquo;d like to say a big &ldquo;Thank you&rdquo; to everyone who voted for me in the Council, and I&rsquo;m sorry that I&rsquo;ve let you down by leaving but when you&rsquo;re given a big flat out no, it does leave little choice. I&rsquo;d also like to say thanks to the silent majority who wanted me to stay, but it&rsquo;s a bit late now isn&rsquo;t it? You have a voice, and you should use it more.Finally, a big thank to the users of my software- all the emails I got telling me how much you like my work means a lot to me! You guys make me keep going :) Although I&rsquo;m going somewhere else, I think I&rsquo;ve touched Gentoo enough to leave my mark on it for a little while.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Another rc with more features]]></title>
            <link href="https://roy.marples.name/blog/posts/another_rc_with_more_features/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/another_rc_with_more_features/</id>
            
            <published>2007-10-31T23:48:00+00:00</published>
            <updated>2007-10-31T23:48:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Yeah yeah, we really should unmask it. But until vapier gets of his butt and keywords it for his misc arches i get to twist and turn it a little :)</p>
<p>Anyway, rc6 is now out and features a shiny new logging daemon. This is like blogd from the showconsole package, but has the advantage of being tightly integrated into rc. This allows us to log all runlevel transactions (with the exception of going to single user on FreeBSD and sysinit on Linux).</p>
<p>We also have a new structure for posix shell arrays. Basically instead of quoting each element, they are separted by hardcoded newlines as discussed on-dev. Here are the old and new structures.</p>
<pre><code>array=&quot;'1.2.3.4 netmask 5.6.7.8;' \
'\*' \
\&quot;'host.name' netmask 1.2.3.4\&quot; \
\&quot;-I 'option; $FOO with spaces'\&quot;
&quot;
array=&quot;1.2.3.4 netmask 5.6.7.8;
\*
'host.name' netmask 1.2.3.4
</code></pre>
<p>-I &lsquo;option; $FOO with spaces&rsquo;
&quot;</p>
<p>See, much easier to read :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Uber Asbo]]></title>
            <link href="https://roy.marples.name/blog/posts/uber_asbo/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/uber_asbo/</id>
            
            <published>2007-10-30T09:41:00+00:00</published>
            <updated>2007-10-30T09:41:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Looks like my infamy is slowly spreading  :O</p>
<p><a class="serendipity_image_link"  href='/blog/uploads/Misc/uberlord-asbo-794x1123.jpg'><!-- s9ymdb:200--><img class="serendipity_image_center" width="714" height="1010"  src="/blog/uploads/Misc/uberlord-asbo-794x1123.jpg"  alt="" /></a></p>
<p>I have no idea who did this, but thanks!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Vendor Lock-in]]></title>
            <link href="https://roy.marples.name/blog/posts/vendor_lock_in/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/vendor_lock_in/</id>
            
            <published>2007-09-27T16:55:00+00:00</published>
            <updated>2007-09-27T16:55:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>revdep-rebuild pre7 re-write failed to work on FreeBSD for finding bins built with a specific library.
I needed this to work as I&rsquo;m rebuilding against <a href="../which_threading_library_are_we_using">libthr instead of libpthread</a> and as the two libraries are mixed without a libmap.conf it&rsquo;s segfault city- heh.</p>
<p>As FuzzyRay wasn&rsquo;t around to aide in debugging at the time I plunged into it&rsquo;s source yesterday. My eyes bled from spending time looking through it for the bug  :(</p>
<p>Basically revdep-rebuild, like many other Gentoo utilities, uses bash. Well, it uses bash constructs but nothing bash specific that cannot be done trivially in pure sh. It also abuses find, grep, awk and sed. Me being the awkward sort, I took offence to this and did a ground up re-write in pure sh. You can <a href="http://dev.gentoo.org/~uberlord/revdep-rebuild">find it here</a>. The crew in #portage are looking over it and it may or may not be used. But they all think it&rsquo;s cleaner, so I&rsquo;d say the chances are good.</p>
<p>But how is this about vendor lock-in? Simple really. It&rsquo;s another demonstration that most of the time you don&rsquo;t need to force bash. Why should every script on my system force bash? Gentoo is about choice, and I choose not to have bash when possible :) As a login shell it&rsquo;s the best, but as a scripting shell it&rsquo;s too big and bloaty. Basically I&rsquo;m going to make it a little goal - when I find a bash script I&rsquo;ll de-bashify it and pester upstream to accept it. This makes the script run on more platforms, so unless you&rsquo;re in bed with the bash maintainer there&rsquo;s no driving reason not to.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Which threading library are we using?]]></title>
            <link href="https://roy.marples.name/blog/posts/which_threading_library_are_we_using/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/which_threading_library_are_we_using/</id>
            
            <published>2007-09-25T14:14:00+00:00</published>
            <updated>2007-09-25T14:14:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>FreeBSD-6 ships with 3 threading libraries (oldest to newest)</p>
<ul>
<li>libc_r</li>
<li>libphread (really libkse)</li>
<li>libthr</li>
</ul>
<p>They should all be ABI compatible with each other and as such are easily interchangeable using libmap.conf. However, that&rsquo;s not always the case&hellip;.</p>
<p>In our efforts to fix threaded python on sparc64 and a few other threading weirdness on x86 we shipped a default libmap.conf that defaulted to using libthr for everything. Many moons passed and everything was good, until LavaJoe discovered <a href="http://bugs.gentoo.org/192711">a little problem with this</a>. Basically applications are built against libpthread but run using libthr. libpthread has some symbols that shouldn&rsquo;t be used, but are still embedded so even if libmap.conf says use libthr, libpthread is really used. So you could have 2 threading libraries loaded which is the source of the issue.</p>
<p>So our present solution is not to build or install libc_r OR libkse. Instead we set the default threading library to libthr and provide symlinks for libc_r and libpthread. This seems to works very well, but with 1 caveat- applications which embedded private symbols to libkse or libc_r no longer link correctly. So far this is just glib, which has proven to be a most troublesome library over time and is so once more! The solution is to re-emerge the library you&rsquo;re failing to link to and then it should work.</p>
<p>If anyone is concerned by this you need not be- FreeBSD-7 will ship like this by default.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Mr Popular]]></title>
            <link href="https://roy.marples.name/blog/posts/mr_popular/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/mr_popular/</id>
            
            <published>2007-09-19T11:22:00+00:00</published>
            <updated>2007-09-19T11:22:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Looks like I was voted into <a href="http://www.gentoo.org/proj/en/council/index.xml">Gentoo Council</a> for a second term  8) . I must be doing something right if that many people voted me in- heh. Thanks for voting!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[So whatcha been doin' Gentoo wise?]]></title>
            <link href="https://roy.marples.name/blog/posts/so_whatcha_been_doin__gentoo_wise_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/so_whatcha_been_doin__gentoo_wise_/</id>
            
            <published>2007-09-12T12:01:00+00:00</published>
            <updated>2007-09-12T12:01:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>That&rsquo;s a good question and I&rsquo;m glad you asked as although I&rsquo;ve not been blogging I have in-fact been busy hacking away.  :P
Here&rsquo;s a quick summary of what I&rsquo;ve been working on</p>
<ul>
<li>Backporting dl_iterate_phdr libc function from FreeBSD-CURRENT to our Gentoo/FreeBSD-6.2</li>
<li>Syncing FreeBSD gcc-4 build defines with upstream (work in progress still)</li>
<li>dhcpcd now works with NOMMU systems such as uClinux (work in progress still)</li>
<li><a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=116081&amp;cat=">FreeBSD make now supports-include and sinclude directives to optionally include files</a></li>
<li><a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33331">gcc now includes the correct #defines for FreeBSD/Sparc64</a></li>
<li>loads of baselayout-2 fixes</li>
<li>Many more ebuilds are keyworded ~x86-fbsd</li>
</ul>
<p>In-case any Gentoo/FreeBSD users are reading this, the recent bumps to-sources,-libexec and-lib are for the dl_iterate_phdr backport.
Right now, it does nothing. But when I finish the gcc-4 patchset I' m working on, gcc will use it to determine if it really needs to link to libgcc_s.so.1 just like it does for our glibc users. This is important, as currently it&rsquo;s linked against every binary and library built, which isn&rsquo;t really that great.  :O</p>
<p>Hopefully when this is all done, <a href="http://www.gentoo.org/proj/en/qa/asneeded.xml">&ndash;as-needed</a> linker should work for all you ricers out there as it currently doesn&rsquo;t on Gentoo/FreeBSD.  }:)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Uber-Dork ???]]></title>
            <link href="https://roy.marples.name/blog/posts/uber_dork____/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/uber_dork____/</id>
            
            <published>2007-09-11T16:56:00+00:00</published>
            <updated>2007-09-11T16:56:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><img src="http://www.nerdtests.com/images/badge/nt2/c949206935afc2b2.png" alt="NerdTest"></p>
<p><a href="http://www.nerdtests.com/nt2ref.html">Nerd Test</a> says I&rsquo;m an Uber-Dorky High Nerd.  What are you?</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[PREGGERS]]></title>
            <link href="https://roy.marples.name/blog/posts/preggers/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/preggers/</id>
            
            <published>2007-09-11T14:54:00+00:00</published>
            <updated>2007-09-11T14:54:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, I&rsquo;ve been a bad boy and not blogged since I got back from my honeymoon. So let me re-start things by saying that my wife is pregnant  :jawdrop:</p>
<p>The Marples line will continue, against all the odds! Needless to say, both sets of parents were delighted! And yes, my Mum did the predictable thing and burst into tears- awww, bless her cottons!</p>
<p>We&rsquo;ve already had the first scan and Baby (working title) is due on the 25th of Jan 2008. It was a shock seeing something on the screen moving around and give a little wave. Makes it very real. What made is seem even more real was I felt it give a little kick last night! Abbeys tummy doesn&rsquo;t kick so either one of two things are true</p>
<ol>
<li>Baby said &ldquo;hi&rdquo; to me  8)</li>
<li><a href="http://fc03.deviantart.net/fs71/f/2013/108/e/d/alien_chestburster_1_1_prop_by_black_templars-d624fw8.jpg">Alien said &ldquo;rarrrrrrrrr&rdquo; to me</a>  :O</li>
</ol>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[MARRIED]]></title>
            <link href="https://roy.marples.name/blog/posts/married/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/married/</id>
            
            <published>2007-06-03T13:58:00+00:00</published>
            <updated>2007-06-03T13:58:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Got married yesterday to the girl of my dreams  :) Don&rsquo;t bother emailing me as I&rsquo;m off to Italy to have the time of my life :DBut feel free to post your messages here for me to read when I get back  ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[So here am I]]></title>
            <link href="https://roy.marples.name/blog/posts/so_here_am_i/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/so_here_am_i/</id>
            
            <published>2007-05-31T10:01:00+00:00</published>
            <updated>2007-05-31T10:01:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Getting married this weekend! :jawdrop:  :jawdrop:  :jawdrop:  :jawdrop:  :jawdrop:  :jawdrop:  :jawdrop:  :jawdrop:  :jawdrop: As such, I&rsquo;m away for a month so don&rsquo;t expect any prompt replies to anything  ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[baselayout-2- prefixed instead of buffered output]]></title>
            <link href="https://roy.marples.name/blog/posts/baselayout_2___prefixed_instead_of_buffered_output/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/baselayout_2___prefixed_instead_of_buffered_output/</id>
            
            <published>2007-04-25T15:12:00+00:00</published>
            <updated>2007-04-25T15:12:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>baselayout buffers einfo and friends output when running in parallel, so messages don&rsquo;t get mixed up with other services.
It does this by storing each einfo command in a file and then processes them when it obtains a lock.</p>
<p>baselayout-2 now buffers stdout and stderr to a file which means the errors are aligned too, so the output should be pretty much perfect.</p>
<p>This is not without any downsides. Firstly, the buffer files take space. Secondly, the buffered output can look a little strange when a long running init script, like say a wireless interface scanning for AP&rsquo;s, suddenly appears in one go.</p>
<p>ciaranm proposed an alternative- prefixing each line with the init script name. He was even kind enough to point to some sample C++ code which did just this for paludis. So after writing a C equivalent (not that hard) baselayout can now do the same. We even colour code for extra prettiness as you can see below :D</p>
<!-- s9ymdb:177--><img class="serendipity_image_center" width="741" height="618"  src="/blog/uploads/Misc/prefix-741x618.png"  alt="" />
<p>This is toggled through <code>RC_PREFIX=&quot;yes&quot;</code> and works independently of <code>RC_PARALLEL</code>.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Slacking]]></title>
            <link href="https://roy.marples.name/blog/posts/slacking/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/slacking/</id>
            
            <published>2007-04-02T15:50:00+00:00</published>
            <updated>2007-04-02T15:50:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so I&rsquo;m a slacker as I&rsquo;ve not blogged for over a month now  :(However, I have been a very busy beaver! <a href="blog:2007/01/26/rc">baselayout-2</a> is nearing completion. The only outstanding bug I know of is a service timeout of the local resolver when using resolvconf and parallel startup. All init scripts on my workstations and personal servers have been de-bashified and most of them bumped. A few have not been bumped- nscd (glibc) being one of them. Basic rule of thumb- if it&rsquo;s a base system package (glibc isn&rsquo;t- that&rsquo;s toolchain) it&rsquo;s been bumped. If it works on FreeBSD it&rsquo;s been bumped, otherwise it&rsquo;s not been bumped as you would have to manually change the system shell to dash or busybox to be affected by any script bugs.Speaking of busybox, the chances are that we won&rsquo;t work with busybox as the default shell right away as their bundled mount/umount, swapon/off/ctl, find implementations differ from our requirements. At this point I&rsquo;m gunning for patches to modify busybox. Although we should work with the start-stop-daemon busybox builtin, it&rsquo;s use is not optimal as we then loose the nice features the baselayout version provides such as daemon tracking and ensuring it actually starts/stops. Although I&rsquo;m sure many people would prefer this anyway ;)On another note, someone found an obscure bug in <a href="http://dhcpcd.berlios.de">dhcpcd-3</a> where we requested an IP address of 0.0.0.0 if we failed to renew after a day. This and openntp support will work their way into dhcpcd-3.0.17, at which point I&rsquo;ll probably create a new branch so I can implement <a href="http://www.rfc-archive.org/getrfc.php?rfc=4361">RFC 4361</a>.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Hail the new King]]></title>
            <link href="https://roy.marples.name/blog/posts/hail_the_new_king/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/hail_the_new_king/</id>
            
            <published>2007-02-28T15:29:00+00:00</published>
            <updated>2007-02-28T15:29:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I was made <a href="http://www.gentoo.org/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD lead</a>. Not exactly sure what extra power this grants me, but it sure sounds like a nice title :D</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Life is Expensive]]></title>
            <link href="https://roy.marples.name/blog/posts/life_is_expensive/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/life_is_expensive/</id>
            
            <published>2007-02-25T19:20:00+00:00</published>
            <updated>2007-02-25T19:20:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, this is going to be an expensive month.£500 on suits for my Wedding.£500 (estimate) for car service and new cam belt.And to rub it all in, my old trusty LCD monitor on my amd64 gaming rig bit the dust :(Now, I was an early(ish) adopter of LCD monitors, buying mine nearly 6 years ago for around £600. Which bought me 17 inches of LCD goodness with an amazingly fast refresh of 22ms. Fast forward to today, and <a href="http://www.dabs.com/productview.aspx?Quicklinx=4D0R&amp;CategorySelectedId=11109&amp;NavigationKey=11109,41070000,14">£218 gets you a 20 inch widescreen LCD with a refresh of 6ms</a>. :) Also, one of the reviewers played <a href="http://myeve.eve-online.com/">EVE Online</a> (which is the game I&rsquo;m playing atm) and said that it looked simply amazing on it 8)I hope that is also the case as I&rsquo;m upgrading from a dead 1024x768 17&quot; to 1600x1050 20&quot; widescreen. After doing a similar upgrade on my laptop and really loving the laptop screen, I&rsquo;m sure that the new monitor will be enjoyed just as much :)It&rsquo;s never a good time for expensive things to go wrong, but not more so when you&rsquo;re paying wedding bills!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Wow- thanks]]></title>
            <link href="https://roy.marples.name/blog/posts/wow___thanks/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/wow___thanks/</id>
            
            <published>2007-02-01T10:28:00+00:00</published>
            <updated>2007-02-01T10:28:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So as soon as my <a href="blog:2007/01/30/wish">Wish List</a> goes up some kind soul bought me <a href="http://www.imdb.com/title/tt0405296/">A Scanner Darkly</a> with a nice note saying thanking me for writing a nice init system for Gentoo/FreeBSD. A big THANK YOU whoever you are 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Wish List]]></title>
            <link href="https://roy.marples.name/blog/posts/wish_list/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/wish_list/</id>
            
            <published>2007-01-30T13:17:00+00:00</published>
            <updated>2007-01-30T13:17:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Some people have asked if I have a wish list. Well, I didn&rsquo;t, but <a href="http://www.amazon.co.uk/gp/registry/registry.html/202-3368784-9594202?ie=UTF8&amp;type=wishlist&amp;id=14HG7M01XATW1">now I do</a>.Loads of stuff- books, music, films. I don&rsquo;t expect anything, but you never know :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Happy Birthday to Me]]></title>
            <link href="https://roy.marples.name/blog/posts/happy_birthday_to_me/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/happy_birthday_to_me/</id>
            
            <published>2007-01-29T10:24:00+00:00</published>
            <updated>2007-01-29T10:24:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>34 today- yes, I&rsquo;m an old fart  :D I&rsquo;ve been treated to a fantastic weekend by my lovely fiancée, and she&rsquo;s bought me the worlds <a href="http://www.staples.co.uk/ENG/Catalog/cat_detail.asp?webid=S382485">most comfy leather chair</a> as my current one at home has seen too many years of hard computer usage. This should be a lot more comfy and last a long time :)She also took me out for 3 meals AND a nice walk- been really spoilt and I&rsquo;ve loved it  8)Hopefully I&rsquo;ll be getting a <a href="http://wii.nintendo.com/">Wii</a> and <a href="http://wii.nintendo.com/software_monkey.jsp">Super Monkey Ball Banana Blitz</a> as well. I&rsquo;ve got the first SMB game for my old GameCube which Abbey and I really enjoy playing from time to time (mainly the sub games- heh) and this should be just as much fun :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[RC in C]]></title>
            <link href="https://roy.marples.name/blog/posts/rc_in_c/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/rc_in_c/</id>
            
            <published>2007-01-26T10:37:00+00:00</published>
            <updated>2007-01-26T10:37:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Every Gentooer knows RC- or rather /sbin/rc.It&rsquo;s the tool that handles the initial boot and then starts and stops services depending on the runlevel desired. It&rsquo;s also primarily written in <a href="http://tiswww.tis.case.edu/~chet/bash/bashtop.html">bash</a>. This is no bad thing, as it&rsquo;s a powerful shell, compared with say the standard sh shell from FreeBSD. But this is not without a price, and that price my friends is speed.baselayout-1.13 currently boots around 10 seconds faster than 1.12. This is purely because we moved the bash code that worked out service dependencies and ordering into a C program, <a href="blog:2006/10/23/what">rc-depend</a>. Magnus Deininger (the author of <a href="http://einit.sourceforge.net/">eINIT</a>) filed a bug requesting that our init scripts could call eINIT if that was running in place of sysvinit (our default). We discussed some things, and the end product is that we now have a small library in C that provides information about services, runlevels and their state. Infact, rc-depend is now just a front end to this library.Well, after having most of the basic foundations in a C library, and Vapier had already moved the system specific code out of RC for 1.12 it struck me that it wouldn&rsquo;t take that more more to have the entirety of RC in C. This has now been done, and my Gentoo/FreeBSD laptop is currently using it just fine. It doesn&rsquo;t yet support all the the bash functionality (parallel starts, interactive) but it does work :DFor you speed freaks out there it runs a full 0.5 seconds faster than RC in bash on a 2 Ghz laptop  :jawdrop:Not much I know, but imagine a similar increase for each service as I intend to move most of runscript.sh into C runscript too. Now, this isn&rsquo;t ready for consumption yet, and won&rsquo;t be for sometime. I also don&rsquo;t intend this to ship in baselayout-1.13, although the library will so eINIT can use it but baselayout itself won&rsquo;t.And that&rsquo;s not the end goal either- once everything but our init scripts themselves are in C, there should be no more required reliance on bash itself. Current functions exposed by functions.sh (einfo, etc) are already built into C RC as mulitcall programs. The only issue with this is our lovely network scripts- purely because the user config is array based which is a bashism. The network scripts themselves use arrays very heavily and will have to be reworked a lot to work on other less powerful shells. I still think this needs to be done as running bash for every service on my Sparc64 is a major speed problem. Also, removing the bash requirement means that embedded devices would love us as bash is unsuitable for that environment.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Whats up Pussy Cat?]]></title>
            <link href="https://roy.marples.name/blog/posts/whats_up_pussy_cat_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/whats_up_pussy_cat_/</id>
            
            <published>2007-01-18T15:11:00+00:00</published>
            <updated>2007-01-18T15:11:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Long time no blog! However, I have been a busy beaver :)baselayout-1.13 has undergone some serious stress testing by <a href="http://www.reactivated.net/weblog">dsd</a> and we&rsquo;ve made some good improvements to reliability when shutting down, solving a few race issues and sorting out dependencies hopefully for once and all 8)Parallel startup has also had some speedups, and my hdd light is now hardly out once we enter rc properly (if anyone knows how to speed up udev, let me know)So how do we now compare to other init systems such as <a href="http://www.initng.org/">init-ng</a>, <a href="http://einit.sourceforge.net/">eINIT</a> and <a href="http://upstart.ubuntu.com/">Upstart</a>? Well, I don&rsquo;t know as I&rsquo;ve not done a comparison on speed, but I&rsquo;m not sure just how much faster the others are if any over baselayout as my hdd light is now pretty much always on. Comments- hopefully with <a href="http://www.bootchart.org/">bootcharts</a> are welcome :)baselayout-1.13 has been the default init systems on <a href="http://www.gentoo.org/proj/en/gentoo-alt/bsd/fbsd/">Gentoo/FreeBSD</a> for 3 months now and it&rsquo;s proven very reliable, so don&rsquo;t have that much fear about unmasking it. The only reason why it&rsquo;s still masked is that we need baselayout-1.12.9 stable as that can understand the on-disk service state from 1.13 so we can downgrade/upgrade cleanly.dhcpcd-3.0.9 will get a stable bug by the end of the month, so test if now if you have any concerns as I&rsquo;ll be punting older dhcpcd versions after it&rsquo;s stable on all arches.I&rsquo;ve also been marking loads of GNOME packages with the ~x86-fbsd keyword. So, what still needs to be done? Well, patches need to be accepted for libgtop and gnome-vfs. Then all we need in Gentoo is for control-center to support a hal USE flag so it can be disabled on FreeBSD as it doesn&rsquo;t work there. That&rsquo;s it- just 3 little things for gnome-light to be fully keyworded. A few other GNOME packages require patched here and there, but work just fine :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Amazing what the littles things make you do]]></title>
            <link href="https://roy.marples.name/blog/posts/amazing_what_the_littles_things_make_you_do/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/amazing_what_the_littles_things_make_you_do/</id>
            
            <published>2006-12-12T12:48:00+00:00</published>
            <updated>2006-12-12T12:48:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So about a year or so ago, I switched from <a href="http://www.gnome.org">GNOME</a> to <a href="http://www.kde.org">KDE</a> because various GNOME applications where crashing regulary- mostly the mail client <a href="http://www.gnome.org/projects/evolution/">evolution</a>. And life was good, KDE has drastically improved, looked nice and more importantly worked without many issues.However, <a href="http://kmail.kde.org">kmail</a> has been crashing all too frequently of late, sometimes every time I click an email to read. There&rsquo;s plenty of bugs about kmail crashing in their bugzilla, but I could not find another suitable email client for KDE/QT. So back to GNOME I go, but not using evolution as it&rsquo;s far too bloated. For example, it insists I <a href="http://bugs.gentoo.org/show_bug.cgi?id=71429">install spamassassin</a> (pulls in 12 packages just for spamassassin), which I don&rsquo;t want as my spam filtering happens server side.Fortunately, there are good alternative email clients. I&rsquo;ve stuck with <a href="http://www.claws-mail.org/">Slypheed Claws</a> as it seems best suited to my needs. I did try Slypheed, but it wasn&rsquo;t threaded enough- when it&rsquo;s scanning imap folders the UI freezes, which I don&rsquo;t like.There we go. An entire DE change just because I got fed up with kmail :POf course, this means I now have an impetuous to get GNOME working on Gentoo/FreeBSD now ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Saving state, but not to /var]]></title>
            <link href="https://roy.marples.name/blog/posts/saving_state__but_not_to__var/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/saving_state__but_not_to__var/</id>
            
            <published>2006-11-07T13:52:00+00:00</published>
            <updated>2006-11-07T13:52:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, if you&rsquo;re a zealot and want ALL your state data saved to /var, you can pretty much forget it :evil:Here&rsquo;s the reasons why it&rsquo;s a bad idea for a package like baselayout- /var is not guaranteed to be always available. In fact, we jump through a lot of hoops to work without /usr available too, but we&rsquo;re talking about saving state.Another reason why saving to /var is bad is because I&rsquo;ve been toying with the idea of making &ldquo;rc single&rdquo; really single user. This means that when the localmount service stops it unmounts all local disks aside from /, and possibly remounting / ro as well. Now, in this state, the user can reasonably do &ldquo;rc default&rdquo; and expect everything to spring back to life. Hard to do when your state data on /var isn&rsquo;t there anymore. Also, this is event driven like <a href="http://upstart.ubuntu.com/">upstart</a>. In this state the user could insert a pcmcia network card which raises a kernel uevent which triggers hotplug to start net.eth0. net.eth0 depends on localmount for /var, so localmount starts. localmount needs checkfs, so that starts, etc etc.I hear people clamoring for upstart in Gentoo- you have already got its functionality :)There are many other reasons why /var could suddenly drop. So we  to store our data somewhere on /. The only guaranteed directories to exist are /dev /bin /etc /lib /sbin. We already have /lib/rcscripts to store things all things baselayout, so /lib/rcscripts/init.d seems like a good choice.So taking that as a given, why not just keep /lib/rcscripts/init.d mounted as tmpfs? It doesn&rsquo;t take that much space (around 200k tops) and for BSD users- well, we loose the allocated space, but no reason why the kernel can&rsquo;t be sensible and move it to swap. This should make everyone happy and <a href="http://thread.gmane.org/gmane.linux.gentoo.devel/44102/focus=44102">remove around 60 lines of code from /sbin/rc</a> which is no bad thing. So if you have an opinion, then please chime in :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Saw 3]]></title>
            <link href="https://roy.marples.name/blog/posts/saw_3/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/saw_3/</id>
            
            <published>2006-11-07T13:29:00+00:00</published>
            <updated>2006-11-07T13:29:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So Abbey and I went to see <a href="http://www.saw3.com/">Saw 3</a> over the weekend and it was a good movie. Not as good as Saw 1, possibly better than Saw 2. It&rsquo;s the endings that I love- always a good twist. Still that&rsquo;s the point of the movie, the twist at the end. The beauty of Saw 1 was that you didn&rsquo;t expect it which is why no sequel could be better &hellip;.Anyway, we have also been busy doing more wedding type stuff and we think we&rsquo;ve settled on the &ldquo;favors&rdquo;. For sure, we&rsquo;ll make then ourselves to save more £££ due to the expensive honeymoon we&rsquo;ve booked. We think we&rsquo;ve also got the invites themselves sorted- well, just the idea. We&rsquo;re going to try and make them :)So we less than 6 months until I&rsquo;m a happily married man, things are just going smooth. Where&rsquo;s all this supposed fuss that everyone moans about?</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[OpenVPN, IPv6 and a FreeBSD firewall]]></title>
            <link href="https://roy.marples.name/blog/posts/openvpn__ipv6_and_a_freebsd_firewall/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openvpn__ipv6_and_a_freebsd_firewall/</id>
            
            <published>2006-11-02T15:23:00+00:00</published>
            <updated>2006-11-02T15:23:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so I run <a href="http://www.openvpn.net">OpenVPN</a> to secure everything. Which is good :)I also run <a href="http://www.ipv6.org">IPv6</a> just for kicks, which is also good :)I&rsquo;m starting to love <a href="http://www.gentoo.org/doc/en/gentoo-freebsd.xml">FreeBSD</a> more and more, which is always good :)So what&rsquo;s the bad part? Well, add any any firewall into the above mix (ipfw, pf- ipf didn&rsquo;t compile) and IPv6 connections just hang. After weeks of banging my head, scouring FreeBSD bug reports and firewall setups I was getting nowhere :( Infact I was just about to file a FreeBSD bug report when The_Paya mentioned that mss maybe too high. So lo and behold I experimented and he was right!After trying out many settings, using the OpenVPN setting of tun-mtu 1420 seemed to work the best.There&rsquo;s also <a href="http://openvpn.net/archive/openvpn-devel/2005-11/msg00026.html">this patch for an old beta</a>, but I&rsquo;ve not played with that yet.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[bash-3.2 borkage]]></title>
            <link href="https://roy.marples.name/blog/posts/bash_3_2_borkage/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/bash_3_2_borkage/</id>
            
            <published>2006-11-02T11:38:00+00:00</published>
            <updated>2006-11-02T11:38:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so yet another bash release borks baselayout and friends :(</p>
<p>But this still probably the nicest release as bash-3.2_p3 mostly works. The big caveat is the =~ semantic has changed. Take this snippet</p>
<p><code>[[ $(/proc/filesytems)$'\n' =~ &quot; tmpfs&quot;$'\n' ]]</code></p>
<p>That works fine for bash-3.0 and 3.1
Not so for 3.2! Here&rsquo;s how it&rsquo;s now done</p>
<p><code>[[ $(/proc/filesytems)$'\n' =~ \ tmpfs$'\n' ]]</code></p>
<p>Basically, we need to stop using quotes on the RHS when using =~ unless we want to match against the quote exactly. We also need to escape spaces.</p>
<p>As it&rsquo;s totally incompatible for most parts of baselayout, the 1.12 branch has had all the =~ instances removed where it didn&rsquo;t work with either. For the 1.13 branch we&rsquo;ve changed to the new semantic and as such, alpha5 will require bash-3.2_p3. If you&rsquo;re using FreeBSD then you&rsquo;ll probably need <a href="http://dev.gentoo.org/~uberlord/bash-3.2-process-subst.patch">this little patch</a> for bash too.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[All made up]]></title>
            <link href="https://roy.marples.name/blog/posts/all_made_up/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/all_made_up/</id>
            
            <published>2006-10-31T10:57:00+00:00</published>
            <updated>2006-10-31T10:57:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Abbey is going to have her bridal makeup and hairdo test session today. She knocks me off my feet all the time anyway, so I&rsquo;ll be interested in seeing the results 8) I wonder how many heads she&rsquo;ll turn when I take her out for a nice meal tonight &hellip;. :evil:Discovered last night that we need new ladders they fell out from under me and I was left dangling from the loft hatch! Thankfully, Abbey came to the rescue :D I was up there messing around with the TV cables that go around the house as we&rsquo;ve lost all BBC channels on FreeView. This was around the time that the new Channel Five stuff launched and as a result we need to buy a signal booster as everything worked if we unplugged all the other TVs.That truely sucks, but it still saves on paying the Sky Tax ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[GFBSD/Sparc stages are now available]]></title>
            <link href="https://roy.marples.name/blog/posts/gfbsd_sparc_stages_are_now_available/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/gfbsd_sparc_stages_are_now_available/</id>
            
            <published>2006-10-31T10:51:00+00:00</published>
            <updated>2006-10-31T10:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After weeks of toil, sweat, abuse and plenty of beer, the Gentoo/FreeBSD/Sparc64 stage is finally ready :D<a href="http://gentoo.osuosl.org/experimental/sparc/freebsd/">Grab the stage from here!</a>I already <a href="http://thread.gmane.org/gmane.linux.gentoo.devel/43857/focus=43857">posted too gentoo-dev</a> about it, so follow that linky for notes.Right now you can emerge a few packages and put together a small webserver with a choice of db backends. Hopefully I&rsquo;ll have some popular email servers keyworded too. After that keywording will slow down as I&rsquo;ll try and get some modular X going, but as it&rsquo;s a slow box it&rsquo;s going to be a slow process! :( Unless someone wants to donate a faster box for me to use :PI know that one person, <a href="http://blog.scherbaum.info/">Tobias Scherbaum</a> has managed to get it working which is good! Hopefully more can too: maybe you? ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[What a rainy weekend]]></title>
            <link href="https://roy.marples.name/blog/posts/what_a_rainy_weekend/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/what_a_rainy_weekend/</id>
            
            <published>2006-10-23T10:25:00+00:00</published>
            <updated>2006-10-23T10:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So no gardening was done. On the plus side that left plently of time for catching up on housework stuff and writing a new Gentoo application. rc-depend is a C program that works out dependencies and ordering of all your init scripts. This was written because our bash logic, although now seemingly 100% accurate, was incredibly slow taking around 2-3 seconds on my 2Ghz laptop to work it out. rc-depend works it out in 0.05 seconds. The bigest increase though was on my 333Mhz sparc which shaved (best guess) around 8-10 seconds off the start time :D You&rsquo;ll see this in action in baselayout-1.13.0_alpha3, hopefully sometime this week ;)</p>
<p>Whilst writing it, I discovered that we no longer needed the <code>RC_STICT_NET_CHECKING</code> variable as we can now have &gt;1 service providing something- in this case &ldquo;net&rdquo;. <a href="http://thread.gmane.org/gmane.linux.gentoo.devel/43441/focus=43441">A discussion</a> then took place about removing it and I think I&rsquo;ve answered everyones queries.</p>
<p>Hopefully I&rsquo;ll find the time to adapt this to our net modules too as that&rsquo;s the last real bottle neck in our bash code in baselayout :P</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Not much gardening going on]]></title>
            <link href="https://roy.marples.name/blog/posts/not_much_gardening_going_on/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/not_much_gardening_going_on/</id>
            
            <published>2006-10-16T12:16:00+00:00</published>
            <updated>2006-10-16T12:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, we&rsquo;ve almost got the back garden de-rubbled- just one little patch to go. It would have been done this weekend if it was not for that pesky business of booking wedding cakes and honeymoon 8)We have booked 3 lovely weeks in Italy which includes 2 nights in Rome :DThis is really a 4 weeker though as we&rsquo;ll need a few days at either end to pack and unpack.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Gentoo/FreeBSD/Sparc64 stage3 almost]]></title>
            <link href="https://roy.marples.name/blog/posts/gentoo_freebsd_sparc64_stage3_almost/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/gentoo_freebsd_sparc64_stage3_almost/</id>
            
            <published>2006-10-16T12:08:00+00:00</published>
            <updated>2006-10-16T12:08:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so after much nashing of teeth over Python not emerging, I bit the bullet and wiped my disk :jawdrop:</p>
<p>One reboot and wanging my new stage3 onto my sparc I discovered a few missing files- heh. Most of them were the fault of baselayout not installing system FreeBSD files (bad me) and one was a <a href="http://bugs.gentoo.org/show_bug.cgi?id=150257">gcc-config bug</a> where mv/cp is linked against libgcc_s.so as such can&rsquo;t copy libgcc_s.so from the specific gcc lib dir to /lib. Now vapier thinks that things like mv linking against libgcc_s are toolchain bugs: I&rsquo;m inclined to agree only Gentoo gcc-4.x seems todo this on BSD as gcc-3.4.x doesn&rsquo;t. However, until we can find out why gcc wants todo this, we really need gcc-config fixed. Besides, other archs may have this issue too, so it&rsquo;s not like it&rsquo;s bad or anything ;)</p>
<p>But the really good news is that emerging Python now works :D
This means I can make a puka stage 3 using catalyst once <a href="http://farragut.flameeyes.is-a-geek.org/articles/category/gentoo">Flameeyes</a> emails me the spec files.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[15 hours of emerging on a 333Mhz UltraSPARC]]></title>
            <link href="https://roy.marples.name/blog/posts/15_hours_of_emerging_on_a_333mhz_ultrasparc/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/15_hours_of_emerging_on_a_333mhz_ultrasparc/</id>
            
            <published>2006-10-13T12:46:00+00:00</published>
            <updated>2006-10-13T12:46:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>is what it took to emerge-e system. And no errors too :D OK, I had put python into package.provided as it just refuses to re-emerge for <a href="http://dev.gentoo.org/~uberlord/python.err">no good reason</a>. If anyone has any insight into what is causing that then please let me know!</p>
<p>I rebooted and get kernel panics soon after loading rc and I thought eeek! wtf! :sick:
So after chrooting of a livecd and swapping FreeBSD rc other with Gentoo baselayout I rebooted again &hellip;. and it worked! wtf? Why should this be?</p>
<p>Turned out it was openvpn crashing the kernel. Not sure why, so I&rsquo;ll need to investigate. Probably due to gcc dropping the <code>__sparc64__</code> keyword, but I&rsquo;m sure my patch is puka :/</p>
<p>But it&rsquo;s getting closer, soon Gentoo/FreeBSD/Sparc64 will be real and here for you to use :D</p>
<p>EDIT: Turns out kernel crashing is being caused by kldload loading ANY module. This means I can document this as a Known Issue and continue. Obviously it&rsquo;s something we need to resolve before making anything stable.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[sparc-fbsd base profile is now complete]]></title>
            <link href="https://roy.marples.name/blog/posts/sparc_fbsd_base_profile_is_now_complete/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/sparc_fbsd_base_profile_is_now_complete/</id>
            
            <published>2006-10-10T13:45:00+00:00</published>
            <updated>2006-10-10T13:45:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, I hope it is :P</p>
<p>My SPARC has now got to the stage where all base system packages + a few extras I need (openvpn, dhcp, keychain, etc) have emerged successfully :) I&rsquo;ve even managed to compile and install a custom kernel. The one thing I&rsquo;ve not done yet is rebooted to check that the new kernel and boot loader actually work.</p>
<p>So all I have todo is emerge-e world twice to make 100% sure everything is peachy, rebuild the kernel again and reboot. If all goes well then I&rsquo;ll swap from FreeBSD rc over to Gentoo rc and reboot for the first time into a fully working Gentoo/FreeBSD on SPARC :jawdrop:</p>
<p>Not bad for a weeks work ;)</p>
<p>Actually, most of the work had already been done for me by the x86-fbsd team, all I had todo was patch binutils to brand elf binaries as FreeBSD when using FreeBSD on Sparc (FreeBSD patches elf.c as used by everything- we cannot do this, patch is <a href="http://dev.gentoo.org/~uberlord/15_all_sparc-freebsd-elf.patch">here</a>) and ensure that all <code>__sparc64__</code> defines were <a href="http://roy.marples.name/blog/archives/80-On-gcc-defines-and-consistency.html">changes to <code>__sparc__</code>  &amp; &amp;  <code>__arch64__</code></a>. So it was mainly setting up the base profile and keywording ebuilds. Gentoo makes this very very easy 8)</p>
<p>Anyone wanting to look at the portage overlay for this can <a href="http://dev.gentoo.org/~uberlord/portage-sparc-fbsd.tar.bz2">download it here</a>. If either of the two links disappear it means they are now in the main portage tree, which means Mission Complete :D</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[On gcc defines and consistency]]></title>
            <link href="https://roy.marples.name/blog/posts/on_gcc_defines_and_consistency/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/on_gcc_defines_and_consistency/</id>
            
            <published>2006-10-09T10:59:00+00:00</published>
            <updated>2006-10-09T10:59:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Builtin defines from gcc are useful- they give you some information about your arch. <code>__i386__</code>, <code>__amd64__</code> and so on.</p>
<p>sparc is a little wierd- here&rsquo;s a quick list</p>
<ul>
<li><code>__sparc__</code></li>
<li><code>__sparc64__</code></li>
<li><code>__sparc_v9__</code></li>
</ul>
<p>Now, FreeBSD only supports Sparc64 and has lots of checks using <code>#ifdef __sparc64__</code>. At first glance, this looks OK and there appears to be nothing wrong with it. However, gcc likes to define <code>__sparc64__</code> as a CPU type (as I understand it) and is no guarantee of 64-bit code. As such, if you use <code>-mcpu=ultrasparc</code> (which is valid) then it drops the <code>__sparc64__</code> define as we&rsquo;re targeting a specific CPU model- namely the v9. A FreeBSD developer <a href="http://gcc.gnu.org/ml/gcc-patches/2002-05/msg01370.html">submitted a gcc patch to always define <code>__sparc64__</code></a> but this was rejected, and looks like for good reasons too.</p>
<p>Of course, we can always say &ldquo;dude, don&rsquo;t use-mcpu in your CFLAGS&rdquo; and the issue magically goes away. Not so! In gcc-4, FreeBSD defaults to using-mcpu=ultrasparc which means that it never defines <code>__sparc64__</code> which in turn means a vanilla gcc cannot compile FreeBSD code! Which explains why the default compiler on FreeBSD is gcc-3.4.6. Interesting we cannot use that version in Gentoo as our 3.4.6 never exports the <code>__arch64__</code> define (or any other 64-bit defines) but still compiles 64-bit code. Weird. Anyway, our gcc-4.1.1 is fine for us.</p>
<p>So I&rsquo;m busy writing patches to change <code>__sparc64__</code> to <code>__sparc__</code> as most of the time the code isn&rsquo;t 64-bit specific anyway. If it is, then it becomes <code>__sparc__</code> &amp;&amp; <code>__arch64__</code> which works fine :)
I dunno if upsteam will accept it, but I&rsquo;ll email it to them anyway when I&rsquo;m done :P</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Sun UltraSPARC]]></title>
            <link href="https://roy.marples.name/blog/posts/sun_ultrasparc/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/sun_ultrasparc/</id>
            
            <published>2006-10-04T10:20:00+00:00</published>
            <updated>2006-10-04T10:20:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://www.inversepath.com/staff.html">Rob Holland</a> of <a href="http://www.inversepath.com/">Inverse Path</a> (some may know him as tigger^ the ex Gentoo dev) had some free Sun SPARCs going, so I snagged a U5! Well, I&rsquo;ve had it for some time now, but his Mum forgot to ship the keyboard. So it&rsquo;s been gathering dust in my room for months until yesterday they keyboard arrived. And it booted and stayed up! Yay! :DThe plan was to put Gentoo/Linux on it, mainly so I could fix <a href="http://bugs.gentoo.org/show_bug.cgi?id=104067">Gentoo bug #104067</a>. Since then I&rsquo;ve put Gentoo/FreeBSD onto my laptop- mainly as the baselayout port was going nowhere fast. Now that the basic port is done (aside from fancy networking stuff) I&rsquo;ve decided that I&rsquo;m going to put Gentoo/FreeBSD on it :jawdrop:This is going to be interesting as there are no stages, no nothing. And it&rsquo;s a 333 Mz box with 256 meg of RAM- compiling is not its forte :O But that&rsquo;s the aim. Gentoo/FreeBSD on Sparc64. Lets see if it can be done :)So a big thanks to Rob at Inverse Path for the kind donation- it will be used well :D</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Spam]]></title>
            <link href="https://roy.marples.name/blog/posts/spam/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/spam/</id>
            
            <published>2006-09-28T11:36:00+00:00</published>
            <updated>2006-09-28T11:36:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I hate the stuff with a vengance. Why spammers feel the need to botspam comments to this lowly site linking to casinos, porn and cheap drugs is beyond me. Well, I get bored of deleting 30+ spam comments each day, so I&rsquo;ve put a new spamming filter onto my site. Hopefully this one works better than the captcha which seems to have been bypassed now :(So I&rsquo;ve removed that captcha as it&rsquo;s now useless really.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[FreeBSD]]></title>
            <link href="https://roy.marples.name/blog/posts/freebsd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/freebsd/</id>
            
            <published>2006-09-11T10:36:00+00:00</published>
            <updated>2006-09-11T10:36:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so after much head banging with installed FreeBSD on my laptop because FreeBSD won&rsquo;t boot from an extended partition, unlike Linux I finally have this beastie installed.I spent a portion of the weekend hacking on baselayout and now have it booting and rebooting without error which is very nice indeed :) Once I get my wireless rt2500 card working on it, which requires I get the pcmcia bit working first then I&rsquo;ll be happy putting that into portage- package.masked of course ;)The bad news is that my laptops in-built ipw2200 doesn&rsquo;t seem to be supported yet- oh well, can&rsquo;t have everything I suppose.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[init script provides galore]]></title>
            <link href="https://roy.marples.name/blog/posts/init_script_provides_galore/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/init_script_provides_galore/</id>
            
            <published>2006-09-07T15:53:00+00:00</published>
            <updated>2006-09-07T15:53:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, it&rsquo;s taken longer than I expected, but I&rsquo;ve finally come up with a nice patch for <a href="https://bugs.gentoo.org/show_bug.cgi?id=46897">bug #46897</a>. 8)We now allow multiple init scripts to provide &ldquo;foo&rdquo;. Which init script is depended on is based on the following criteria- any started, in your runlevel, first in alphabetical order.Now I just have to get baselayout working on FreeBSD and I think we&rsquo;re ready for another baselayout in ~ARCH- 1.13 :jawdrop:</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Remember me?]]></title>
            <link href="https://roy.marples.name/blog/posts/remember_me_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/remember_me_/</id>
            
            <published>2006-09-07T08:07:00+00:00</published>
            <updated>2006-09-07T08:07:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Heh, long time no blog :(Anyways, I have been busy what with the recent stabilisation of baselayout-1.12. We think all regressions have been fixed, with a few very minor ones with patches in bugzilla. I&rsquo;ve got a small one that only one person has reported which I&rsquo;ll try to fix before the next release in the 1.12 range.So what&rsquo;s coming up in baselayout-1.13 I hear you say? Well, here&rsquo;s a quick list * Buffered e* output. This allows parallel startup to look identical to non parallel</p>
<ul>
<li>Wrapped e* output. Ensures that we never go over terminal width- if we do it&rsquo;s another e* call</li>
<li>Working
[ vserver
]support</li>
<li>FreeBSD init support (not networking scripts yet)</li>
<li>Critical services can use dependencies (you can no longer set svcdir)</li>
<li>BASH TEXTDOMAIN support, so people can translate init scripts
I only have two things on my todo list before I&rsquo;ll put an alpha into portage- FreeBSD network support (which may take a while as I don&rsquo;t have a FreeBSD box yet) and the ability to have &gt;1 init script to provide the same thing.So there we go, something to look forward too :)</li>
</ul>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The Who]]></title>
            <link href="https://roy.marples.name/blog/posts/the_who/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_who/</id>
            
            <published>2006-07-05T12:09:00+00:00</published>
            <updated>2006-07-05T12:09:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Saw <a href="http://en.wikipedia.org/wiki/The_Who">The Who</a> play at <a href="http://www.beaulieu.co.uk/">Beaulieu</a> last Monday. They were awesome :)And it was nice seeing them play live when they&rsquo;re in their 60s- but they weren&rsquo;t exactly moving around the stage all that fast ;)They played all the songs I like except for Magic Bus, which according to my CD inlay <a href="http://www.petetownshend.co.uk/">their guitarist</a> doesn&rsquo;t like to play live as it&rsquo;s just the same chord- lol.If you want to see them, there are <a href="http://www.thewho.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=175&amp;mode=thread&amp;order=0&amp;thold=0">a few dates left on their 2006 European tour</a>. This band are old but very good, so time is running out to see them!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[My First Kernel Patch]]></title>
            <link href="https://roy.marples.name/blog/posts/my_first_kernel_patch/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/my_first_kernel_patch/</id>
            
            <published>2006-06-24T16:17:00+00:00</published>
            <updated>2006-06-24T16:17:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Ever since I first got my AMD64 box one think always annoyed me- my on-board VIA velocity didn&rsquo;t work with <a href="http://0pointer.de/lennart/projects/ifplugd/">ifplugd</a> or <a href="http://www.red-bean.com/~bos/">netplug</a> as it always thought there was a cable plugged in. This was less than optimal as with the new <a href="http://roy.marples.name/blog/archives/64-coldplug-trials-and-tribulations.html">coldplug</a> functionality in baselayout it started by default and tried to get a DHCP lease by default.</p>
<p>So I finally got of my lazy rear end and <a href="http://bugzilla.kernel.org/show_bug.cgi?id=6711">filed a kernel bug</a>. With Francois Romieu I wrote a patch that has been accepted into the mainline kernel :) OK, he wrote the actual fix, but still. It gives a very big warm fuzzy feeling that you&rsquo;ve contributed something to the kernel as every Linux user uses it :D</p>
<p>I&rsquo;ve also <a href="http://bugs.gentoo.org/show_bug.cgi?id=137702">filed a bug</a> requesting the inclusion of the patch in gentoo-sources so hopefully Gentoo users will get the fix a bit quicker :)</p>
<p>The morale of this story is to file a bug if something doesn&rsquo;t work for you as it gets fixed much quicker!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[grep vs bash regex]]></title>
            <link href="https://roy.marples.name/blog/posts/grep_vs_bash_regex/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/grep_vs_bash_regex/</id>
            
            <published>2006-06-22T16:51:00+00:00</published>
            <updated>2006-06-22T16:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Everyone should know about grep. Most of the time it&rsquo;s used for testing the existence of a specific regex pattern somewhere. baselayout uses grep frequently for many tasks like so :-</p>
<pre><code>grep-q '^envID:[/proc/self/status
</code></pre>
<p>Did you know that bash can do this without the use of grep? Here&rsquo;s how &hellip;</p>
<pre><code>[[ $'\n'$(/proc/self/status) =~ $'\n''envID:[[:space:]([:space:]]*[1-9]')]*[](1-9]')]
</code></pre>
<p>(NOTE: everything that matches the regex is now in the array BASH_REMATCH)</p>
<p>One important point is that the file is read as one big string, so the ^ $ anchors don&rsquo;t work in the same way as they now point to the start and end of the file. The work around is to match on \n instead. As such we always put one at the start of the file incase the match is on the first line.</p>
<p>Now, which is faster? Well, I ran all our existing is_foo_sys checks in /sbin/functions.sh 500 times in a row. grep was around 1 whole second slower than bash! :jawdrop:</p>
<p>That&rsquo;s impressive, but then again <a href="http://roy.marples.name/blog/archives/38-bash-faster-than-C-shocker!.html">I&rsquo;ve already shown bash to be faster than some other C programs</a> ;)</p>
<p>What I don&rsquo;t know is how it performs on large files &hellip;. I would guess that grep is faster as it can return once a match is found whereas bash has to read the entire file, but as all files checked should be quite small there shouldn&rsquo;t be a problem :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Notification of Marriage]]></title>
            <link href="https://roy.marples.name/blog/posts/notification_of_marriage/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/notification_of_marriage/</id>
            
            <published>2006-06-22T16:31:00+00:00</published>
            <updated>2006-06-22T16:31:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Notified the local Registrar of my intention to marry Abbey &hellip;&hellip; was strange :OFelt weird walking back to the car as its sort of becoming more and more official!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Free of the shackles of binary drivers]]></title>
            <link href="https://roy.marples.name/blog/posts/free_of_the_shackles_of_binary_drivers/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/free_of_the_shackles_of_binary_drivers/</id>
            
            <published>2006-06-20T13:16:00+00:00</published>
            <updated>2006-06-20T13:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So <a href="http://spyderous.livejournal.com/">spyderous</a> has been spouting the virtues of the new r200 and r300 stuff in xorg-7.1, so I finally decided to give it a whirl. Thanks to the new modular structure of X, the upgrade went very fast. Everthing was very peachy up until the starting any OpenGL application as it gave me a ton of errors in dmesg like so</p>
<pre><code>[drm:r300_emit_3d_load_vbpntr] *ERROR* Offset failed range check (k=0 i=2) while processing 3D_LOAD_VBPNTR packet.
[drm:r300_emit_packet3] *ERROR* r300_emit_raw_packet3 failed
[drm:r300_do_cp_cmdbuf] *ERROR* r300_emit_packet3 failed
</code></pre>
<p>Which is not good.</p>
<p>Luckily, the culprit turned out to be mesa and this issue is fixed upstream in cvs- the error is apparently exclusive to PCIE r300s cards (which my X600 is) :) I&rsquo;ll see if I can cut a patch against 6.5, but I doubt I have the skills or the time :(</p>
<p>So now I have working 3D and no 3rd party binary crap (ok, ATI&rsquo;s fglrx driver isn&rsquo;t crap, but it sure is bloated and has a few issues- see below) :D. Well, I do, but that&rsquo;s just firmware for my ipw2200 and prism54 cards.</p>
<p>Although the 3D works it&rsquo;s not exactly error free- there are artifacts with some KDE screen savers and my favourite game <a href="http://www.eternal-lands.com">Eternal Lands</a> doesn&rsquo;t work with a few options- however it&rsquo;s very playable.</p>
<p>The big win for me is that it works with vesa-tng, although sadly not radeonfb. Also, I no longer need to force KDM to restart X on logout and while 3D is slower and obviously spotty 2D is faster and smooter. Which is important for me as I mainly code on my laptop and play games on my AMD64.</p>
<p>I may even try ut2004-demo and Quake4 on my lappy just to see how they fair :jawdrop:</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Going to Gentoo UK on July 8th]]></title>
            <link href="https://roy.marples.name/blog/posts/going_to_gentoo_uk_on_july_8th/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/going_to_gentoo_uk_on_july_8th/</id>
            
            <published>2006-06-16T13:27:00+00:00</published>
            <updated>2006-06-16T13:27:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Kernel monkey and all round slacker <a href="http://www.reactivated.net/weblog/">dsd</a> has convinced me to attend the <a href="http://dev.gentoo.org/~dsd/gentoo-uk-2006/">Gentoo UK 2006 conference</a> on July 8th :)So if you wonder what I look like, have questions about baselayout, what my plans are for it or just want buy me a pint then come along! I won&rsquo;t be speaking 8) much to everyones great relief ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Flameeyes is a not a geek]]></title>
            <link href="https://roy.marples.name/blog/posts/flameeyes_is_a_not_a_geek/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/flameeyes_is_a_not_a_geek/</id>
            
            <published>2006-06-08T10:59:00+00:00</published>
            <updated>2006-06-08T10:59:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>He&rsquo;s my hero!OK, so I hosed my laptops root (don&rsquo;t ask how- ok, I was trying to be overly clever with /dev nodes in a very experimental baselayout ebuild) so I thought, well, as my entire config has gone may as well wipe everything except for /home and start over. So I unpacked a stage 3, rebuilt my toolchain with the nice&ndash;as-needed LDFLAG and emerged system. Nice! Nothing needed unstable keywords bar binutils, glibc and gcc :)So why is Flameeyes my hero? Read on &hellip;..xorg-7.0 then built nicely and I thought that all my&ndash;as-needed issues where over, but things went horribly wrong when it got to kdelibs-3.5.3. Which was very odd as it built fine with the same toolchain and flags before. What as really odd is that it couldn&rsquo;t find a library that it was building itself! That had me stumped.Luckily, Flameeyes blogs about nearly every aspect he fixes, and it was <a href="http://farragut.flameeyes.is-a-geek.org/articles/2006/06/04/summing-up-the-binutils-trouble">his blog post about&ndash;as-needed</a> that told me that binutils needed a patch as it wasn&rsquo;t checking the search path given to it. So Flameeyes is my hero for blogging about up and comming fixes- with patches too! :DWell, he said the patch was in his overlay, but I couldn&rsquo;t find it. However, it is <a href="http://sourceware.org/ml/binutils/2006-06/msg00026.html">archived in an email here</a> and a simple copy &amp; paste and voila- one patch :)Anyways, hopefully my laptop will be working for me by the end of today &hellip;..</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[baselayout 1.12.0 released upon the world]]></title>
            <link href="https://roy.marples.name/blog/posts/baselayout_1_12_0_released_upon_the_world/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/baselayout_1_12_0_released_upon_the_world/</id>
            
            <published>2006-05-23T14:37:00+00:00</published>
            <updated>2006-05-23T14:37:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="blog:2006/05/18/baselayout">As I threatened earlier</a>, baselayout-1.12.0 has been released. Over a year in the making we&rsquo;ve fixed a tremendous amount of bugs and added quite a few new features. Hopefully it will go straight to stable with a minimum of fuss :)A big thanks to all the reporters, patch creators for helping out and a big thanks to the users who keep on sending me fan mail- it&rsquo;s really great 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[baselayout 1.12 going stable?]]></title>
            <link href="https://roy.marples.name/blog/posts/baselayout_1_12_going_stable_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/baselayout_1_12_going_stable_/</id>
            
            <published>2006-05-18T11:27:00+00:00</published>
            <updated>2006-05-18T11:27:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>A lot of people have been asking of late when baselayout-1.12 will go stable. Well, I&rsquo;ve decided that enough is enough and I&rsquo;ll be making a 1.12.0 tarball as soon as I get feedback about a unionfs bug. 8) Baring any show stopping bugs that package will be requested to be made stable after the usual 30 days. So now is a very good time to try out 1.12 if you haven&rsquo;t already- just check bugzilla for a few bugs that will be fixed for the next release if you have any issues.AFAIK only two packages need need to go stable before baselayout does and those arenet-misc/dhcp-3.0.4-r1 and net-misc/udhcp-0.9.9_pre20041216-r3.Other dhcp packages that use resolvconf-gentoo don&rsquo;t have to go stable as resolvconf-gentoo is not an actual requirement. It is nice however and there&rsquo;s a good chance that resolvconf-gentoo-0.5 will go stable too.So the only thing left todo is to update some documentation! I hate that part :barf:</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[How to make friends and influence people]]></title>
            <link href="https://roy.marples.name/blog/posts/how_to_make_friends_and_influence_people/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/how_to_make_friends_and_influence_people/</id>
            
            <published>2006-05-11T12:57:00+00:00</published>
            <updated>2006-05-11T12:57:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I&rsquo;m a Gentoo Developer. That means I devote a lot of my time to fixing your bugs, giving you new features/toys and occasionally breaking your system ;)This does not give you a God Given Right to insult my code, tell me just how wrong I am and then demand that I make changes to fit their vision. That is just totally the wrong way of getting me todo work for free.The way to get me todo work for free is quite simple. Be nice or pay me!This rant was brought to you by the words Open and VPN with the number 132932.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[coldplug trials and tribulations]]></title>
            <link href="https://roy.marples.name/blog/posts/coldplug_trials_and_tribulations/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/coldplug_trials_and_tribulations/</id>
            
            <published>2006-05-05T17:58:00+00:00</published>
            <updated>2006-05-05T17:58:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>When I first played around with Gentoo, I found this nifty application called &ldquo;coldplug&rdquo; which claimed it would load modules for my hardware and start them. &ldquo;Awesome&rdquo; said I as prior Linux distro&rsquo;s I had used never had something like this. So I added it to my boot level and watched &hellip;&hellip; it do nothing. Boy did I feel miffed :(</p>
<p>But wait &hellip;.. it had actually loaded my modules and started my network scripts in the background. Excellent- life was good :)</p>
<p>After I became more involved with baselayout I discovered that coldplug was starting things too early so we put some crazy fudges in place like not being able to add net scripts to the BOOT runlevel and other such trickery. Now coldplug has been moved into udev itself it&rsquo;s starting even earlier, which forced us to radicaly rethink our coldplug handling and we think we&rsquo;ve got it just right now.</p>
<p>You will now be informed which services will be initiated at boot if the service isn&rsquo;t in the boot or default runlevels. Here&rsquo;s the configuaration for it in /etc/conf.d/rc</p>
<pre><code>RC_COLDPLUG=&quot;yes|no&quot;
RC_HOTPLUG=&quot;yes|no&quot;
RC_PLUG_SERVICES=&quot;net.wlan !net.*&quot;
</code></pre>
<p>Hopefully Greg KH can soon write a udev that can work off these variables so that udev won&rsquo;t even coldplug or hotplug by itself which will finally shut up the moaners once and for all! 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[3 years with Abbey]]></title>
            <link href="https://roy.marples.name/blog/posts/3_years_with_abbey/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/3_years_with_abbey/</id>
            
            <published>2006-04-20T13:11:00+00:00</published>
            <updated>2006-04-20T13:11:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Last night Abbey and I celebrated 3 years of tender kissing and cuddling :)</p>
<p>Can&rsquo;t believe that it&rsquo;s been so long &hellip;. sometimes it feels like I&rsquo;ve just met her and fallen in love and other times it&rsquo;s like we&rsquo;ve known each other all our lives.</p>
<p>I can&rsquo;t imagine life without her &hellip;&hellip; but that&rsquo;s why <a href="../engaged">she agreed to marry me</a> :D</p>
<p>If you are ever in the Hordle area, near Lymington then I heartly recommend the <a href="http://www.newforestonline.biz/gordleton/">Mill At Gordleton</a> for dining out. Very very nice food, excellent service and unforunately a high price tag! But worth every penny :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Oops, I did it again]]></title>
            <link href="https://roy.marples.name/blog/posts/oops__i_did_it_again/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/oops__i_did_it_again/</id>
            
            <published>2006-04-08T01:58:00+00:00</published>
            <updated>2006-04-08T01:58:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I didn&rsquo;t mean too, but I did :evil: . A slew of updates targeted for baselayouts trunk made it into the 1.12 branch which I released tonight as pre17. Along with updates to dhcpcd, pump, udhcp and the new resolvconf-gentoo package. Basically if you use this and DHCP then you will need an ~ARCH dhcp client!The good news is that this release works better with udev-089 forcing coldplug removal. Basically we detect coldplug scripts starting before we are ready for them and dynamically add them to the boot runlevel when we&rsquo;re good to go. This actually works very well, much better than coldplug starting them in the background as you have solid visual feedback about why the service was started and if it started successfully or not :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Secure by default]]></title>
            <link href="https://roy.marples.name/blog/posts/secure_by_default/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/secure_by_default/</id>
            
            <published>2006-03-31T13:02:00+00:00</published>
            <updated>2006-03-31T13:02:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, I&rsquo;d like to be. Seems someone got into my server- no damage caused aside from lost time rebuilding and making new certificates. My own fault probably as I had a flaw in my firewall script that let everyone through :O. Well, that&rsquo;s now been fixed, and I&rsquo;ve moved to using <a href="http://www.openvpn.net">OpenVPN</a> to secure my wireless LAN instead of WEP. So it&rsquo;s now as secure as I can make it :)Infact, using OpenVPN I can now connect my laptop to my home network very easily- the only downside is that I&rsquo;m struggling a little with IPv6 routing across the TAP interface. I can ping either end OK with addresses configured by radvd, but routing for some reason does not work :? Oh well.Aside from that, I&rsquo;m unsure about how to get my XBox onto my wireless LAN now. I think the only thing I can do is forward and resolve names insecurely for my Xbox MAC address and just allow that. Ideas on a postcard are welcome :) But no cookies as I hardly use the thing anymore except to play DVDs &hellip;</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[LAN and VPN nameservers in harmony]]></title>
            <link href="https://roy.marples.name/blog/posts/lan_and_vpn_nameservers_in_harmony/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/lan_and_vpn_nameservers_in_harmony/</id>
            
            <published>2006-03-22T14:43:00+00:00</published>
            <updated>2006-03-22T14:43:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, say you have a dhcp connection to the LAN which supplies generic name servers (ie internet). Now you want to create a VPN connection to your home LAN and use its nameservers so you can ping the right machines at home. At the moment, you can&rsquo;t. <a href="http://www.openvpn.net">openvpn</a> in portage currently has no ability to even create <code>/etc/resolv.conf</code></p>
<p>Well, it has now. Well, it will when I upload it (don&rsquo;t ask when as it depends on other stuff being done first).</p>
<p>More importantly it also supports the up-coming <a href="../resolvconf">resolvconf</a> I blogged about earlier. This is all well and good, but libc won&rsquo;t work like we want - if we want a vpn name and the first server that responds isn&rsquo;t on the vpn then libc won&rsquo;t even try the other servers. Infact, all dns servers/caches/whatever work like this so it&rsquo;s not a new limitation.</p>
<p>But there is a workaround - <a href="http://thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</a> can forward queries to a specific nameserver for a specific domain. So we inform dnsmasq of this like so using a resolvconf plugin. If an interface resolv.conf file contains the &ldquo;domain&rdquo; directive, then forward requests for that domain to the specified nameservers only. Otherwise, treat it as a generic nameserver.</p>
<p>Of course, this requires a little change to the dhcp clients (dhcpcd, udhcpc, pump and dhclient) to only fill out the search part. EDIT: bind can do this too, as such I&rsquo;ve written a bind plugin that works in the same way. The setup is a little more complex, but do-able.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[resolvconf]]></title>
            <link href="https://roy.marples.name/blog/posts/resolvconf/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/resolvconf/</id>
            
            <published>2006-03-17T07:35:00+00:00</published>
            <updated>2006-03-17T07:35:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="../Enjoy-the-Base.html">baselayout-1.12  forces all dhcp clients to store its resolv.conf in their own locations</a> so they didn&rsquo;t overwrite each others. It even merged them all together. This works very well. :D</p>
<p>So along comes openvpn with its ability to use an unspecified tun/tap interface (if tun0 is in use it will use tun1, etc) and that wanting to setup it&rsquo;s own resolv.conf too (not that current portage one does this, but next one will ;) ). The nice thing about openvpn as it is right now is that it doesn&rsquo;t rely too much on baselayout, and I would like to keep it like this so that when other packages come along that want to say &ldquo;here, use this dns information now&rdquo; we have an easy way for them not to stamp on each others toes.</p>
<p>So I got thinking. Gentoo can&rsquo;t be the only distro that has this problem, so I looked around some. I found Debians <a href="http://packages.debian.org/unstable/net/resolvconf">resolvconf</a> which does pretty much what baselayout did with resolv.conf but provided a generic framework for managing it. This is what I&rsquo;ve been looking for as it also provided a framework for subscribers to be notified of a resolv.conf change, something that my solution did not. This means that no-one should have to do a /etc/init.d/nscd restart in their conf.d/net postup anymore :)</p>
<p>So I&rsquo;m writing a resolvconf for Gentoo at the moment, taking the best bits of baselayout-1.12 (better merging and interface selection based on metrics) and Debians resolvconf (command line compatibility and subscriber framework). Once I get that into portage, I&rsquo;ll be patching baselayout, our dhcp clients and things like openvpn to use it.</p>
<p>I&rsquo;m also thinking that instead of patching dhclient for dbus support for up and coming <a href="http://www.gnome.org/projects/NetworkManager/">NetworkManager</a> support it&rsquo;s probably a better idea just to write a !NetworkManager subscriber for resolvconf which means !NetworkManager could in theory work with any dhcp client :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Is openvpn up or not?]]></title>
            <link href="https://roy.marples.name/blog/posts/is_openvpn_up_or_not_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/is_openvpn_up_or_not_/</id>
            
            <published>2006-03-17T07:22:00+00:00</published>
            <updated>2006-03-17T07:22:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve been playing around with openvpn some more now, trying to get it to behave nicely as a server and a client with the minimum of fuss from a user perspective. Well, the server part it easy- it goes up or not ;)</p>
<p>The client part however is a little more complex &hellip;&hellip; So what I&rsquo;ve been working on is a set of scripts that mimic baselayout-1.12&rsquo;s inactive status so that the openvpn daemon can instruct the init script that authentication was successfull and mark it as started. This is great as it means you don&rsquo;t have to know the ip at the other end and ping it like the old init scripts did. So if you missed that feature, don&rsquo;t panic it&rsquo;s coming back :)</p>
<p>It works in a very simple way too, simply by using <code>--up--down &lt;script&gt;--up-delay--up-restart</code> flags if we&rsquo;re a client (detected by specific options in the selected config).</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Teeth]]></title>
            <link href="https://roy.marples.name/blog/posts/teeth/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/teeth/</id>
            
            <published>2006-03-10T10:51:00+00:00</published>
            <updated>2006-03-10T10:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Whilst eating a toffee sweet (yes, bad boy!) it kinda stuck to one of my fillings and took it out :sick:. So, me minus a big filling, I went in search of a dentist. Guess what! There&rsquo;s no NHS dentists anywhere near where I live.</p>
<p>Bah.</p>
<p>So I found a reasonably priced dentist near work and went along.
The good news - my filling has been restored. The bad news, I need two crowns.
This is gonna cost be just short of a grand :jawdrop:. &ldquo;Bugger&rdquo;, said I. I&rsquo;m not too suprised that I need 2 crowns as there&rsquo;s been hardly anything left of the 2 teeth in question for a few years now and have been mainly just filling.</p>
<p>Well, I now have my temporary crown on one of my teeth (doing one at a time to spread payment across months) and I get my proper crown in 2 weeks time.
Moral of the story - get dental insurance!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Decorating]]></title>
            <link href="https://roy.marples.name/blog/posts/decorating/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/decorating/</id>
            
            <published>2006-02-24T13:18:00+00:00</published>
            <updated>2006-02-24T13:18:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Decorating and me do not go hand in hand. Accidents &hellip;&hellip; happen &hellip;&hellip; paint is split &hellip;. :jawdrop:</p>
<p>So Abbey has been busy repainting our bedroom this nice fawn suede colour whilst I&rsquo;ve been stripping paint from the bannister. I&rsquo;ve helped out in the bedroom by doing some skimming :)</p>
<p>Bedroom was finished last night so we grandly moved all our stuff back in and it was &hellip;&hellip; almost perfect. The yellow curtains just HAVE to go and we may change the carpet. But that&rsquo;s all money - curtains we can get cheaply we thing as they need replacement anyway as they simply don&rsquo;t fit. We&rsquo;ll put up with the carpet until after we&rsquo;re married though as it&rsquo;s not that bad &hellip;&hellip; years of life left in it :P</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[DHCP stuff]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcp_stuff/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcp_stuff/</id>
            
            <published>2006-02-24T12:58:00+00:00</published>
            <updated>2006-02-24T12:58:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, it appears that every DHCP client allowed RFC violating space separated domain names being applied to the search parameter in /etc/resolv.conf :OSilly me for not allowing this violation in baselayout! Well, fear no more as you can will be able to do it in baselayout-1.12.0_pre17 which dhclient and udhcpc. dhcpcd-2.0.2 will be able to do it too when that comes out next week and I don&rsquo;t have any plans to fix pump. So if you want that in pump, write me a patch! ;)dhclient also got a new patch today- we can now send an extra config file via stdin which overlays any user defined one in /etc/dhcp/dhclient.confThis is important so we can automatically send our hostname and force which script to run so the user cannot in-advertently break things. We got around this in the past by editing dhclient.conf directly, but some users don&rsquo;t like this so we provided a flag. All in all a very nasty hack which has now been replaced by an elegant solution :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[New Server]]></title>
            <link href="https://roy.marples.name/blog/posts/new_server/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/new_server/</id>
            
            <published>2006-02-10T16:13:00+00:00</published>
            <updated>2006-02-10T16:13:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So I&rsquo;ve not been blogging for a while, and if you&rsquo;ve sent me email I&rsquo;ve not replied right away. Well, the reason for all that is my server was dying- any write to the hard disk seems like it killed the server. Nasty :jawdrop:Now I have a new server :) It&rsquo;s <a href="http://www.bban.co.uk/proddetail.asp?prod=BYO%2DIDEQA64">AMD64 Sempron 2800+</a> with 2x 120gig SATA disks in RAID 1, DVD writer and 512 meg memory. Installing Gentoo on it was a snap, however for hardened to work I have to use openssl-0.9.7i which should be stable soon (other versions didn&rsquo;t install for some reason). It&rsquo;s a lot lot faster than my old server, that&rsquo;s for sure 8)All my data has been moved over and appears to be working 100%- let&rsquo;s hope this new server won&rsquo;t have to be rebooted every day! And with RAID and a DVD writer my data will be backed up easily and I&rsquo;m secure in the knowledge that if a disk fails, the other should still work :D</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Busted]]></title>
            <link href="https://roy.marples.name/blog/posts/busted/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/busted/</id>
            
            <published>2006-01-20T13:18:00+00:00</published>
            <updated>2006-01-20T13:18:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, what I <a href="archives/52-Scheduling-rc-services.html">said earlier</a> about being confident about the last release was wrong! Services stuck on each other and a few other things caused a downright mess! :O</p>
<p>This time, I think I&rsquo;ve cracked it. What&rsquo;s more is that other people have verified my patches, so all reported services sticking, not responding, not starting when they said they did, etc should now have been resolved :)</p>
<p>I also pushed out a udev/sysinit fix to all baselayouts in preparation for fixing <a href="http://bugs.gentoo.org/show_bug.cgi?id=118419">bug #118419</a>. We just await a udev version with the required patch now ;)</p>
<p>Some other noticeable fixes &hellip;..</p>
<ul>
<li>We no longer hotplug non ethernet interfaces.</li>
<li>Tell the user that a suitable DHCP client is not installed instead of a more cryptic message about modules ;)</li>
<li>Tell the user to check hardware/kernel module if &ldquo;interface is not found&rdquo; ;)</li>
</ul>
<p>Too many clueless lusers on the forums these days&hellip;.. :(</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Scheduling rc services]]></title>
            <link href="https://roy.marples.name/blog/posts/scheduling_rc_services/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/scheduling_rc_services/</id>
            
            <published>2006-01-13T13:31:00+00:00</published>
            <updated>2006-01-13T13:31:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>With recent baselayout-1.12 pre releases, we&rsquo;ve changed the default timeouts so things like wpa_supplicant, netplug and ifplugd jump straight into the background and mark the net service as inactive. This is great for fast boots, but it had a problems <a href="http://bugs.gentoo.org/112088">bug #112088</a>, <a href="http://bugs.gentoo.org/118801">#118801</a> :?</p>
<p>Well, those have been solved whilst keeping our nice defaults :) Several other important issues have also been resolved 8) The bad news is that all of this has forced quite a few changes in the code, but everything seems peachy on all my boxes ;)</p>
<p>I&rsquo;m fairly confident about this new release though- and if it proves trouble free then hopefully a stable candidate? :jawdrop:</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Warm Soft Fuzzies]]></title>
            <link href="https://roy.marples.name/blog/posts/warm_soft_fuzzies/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/warm_soft_fuzzies/</id>
            
            <published>2006-01-07T12:40:00+00:00</published>
            <updated>2006-01-07T12:40:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>With the recent flame fest on-dev about a lack of vision and innovation its always nice to hear <a href="http://article.gmane.org/gmane.linux.gentoo.devel/34890">other people praising my work</a>, especially when they&rsquo;re a <a href="http://www.kroah.com/log/">respected Kernel developer</a> :)</p>
<p>And with recent ego stroking from fellow Gentoo dev <a href="http://planet.gentoo.org/developers/brix">brix</a> about how easy and flexable the networking config is in Gentoo on <a href="http://www.irc.org">IRC</a> yesterday I really do have the Warm Fuzzy Feeling of a job well done :D</p>
<p>Of course, it&rsquo;s not done yet- baselayout-1.12 isn&rsquo;t stable (but it&rsquo;s very very close- you have been warned) and we already have some nice features in our trunk which will appear in baselayout-1.13. So if anyone thinks that we&rsquo;re not being innovative enough, simply checkout what baselayout did 2 years ago and what it does now. Whole load more! And there&rsquo;s more to come- we&rsquo;re not done yet 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[bash-3.1 and baselayout]]></title>
            <link href="https://roy.marples.name/blog/posts/bash_3_1_and_baselayout/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/bash_3_1_and_baselayout/</id>
            
            <published>2006-01-04T09:50:00+00:00</published>
            <updated>2006-01-04T09:50:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>bash-3.1-r2 hit ~ARCH last night which works with baselayout-1.11.<em>However, it does not work with baselayout-1.12.</em> which I corrected this morning. Hopefully everything now works baselayout-wise with bash-3.1 :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[New Year, New Look]]></title>
            <link href="https://roy.marples.name/blog/posts/new_year__new_look/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/new_year__new_look/</id>
            
            <published>2006-01-03T15:00:00+00:00</published>
            <updated>2006-01-03T15:00:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Bored of the old theme? Well, here&rsquo;s a new one based on CivicSpace with some minor alterations by myself. There&rsquo;s still an odd issue here or there, but they&rsquo;re very minor and don&rsquo;t annoy me that much.If they annoy you too much, then <a href="blog:2005/04/28/how">let me know</a> and I&rsquo;ll either fix it or revert back to the old theme.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[New Year, New Start]]></title>
            <link href="https://roy.marples.name/blog/posts/new_year__new_start/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/new_year__new_start/</id>
            
            <published>2006-01-02T19:20:00+00:00</published>
            <updated>2006-01-02T19:20:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After seeing in the New Year with a load of my friends, waking up with a killer hangover and then spending the day cuddling up with Abbey watching Christmas DVDs, I decided to make good. :)So, after a run around the block with Abbey we started on some DIY. I spent the day sanding down the banister. It&rsquo;s taking much longer than expected- even with the power sander Abbey gave me last Christmas. 1 day showed that I sanded down 1 plank of wood and 1 upright. This will take a month of weekends I think. :O</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Merry Christmas]]></title>
            <link href="https://roy.marples.name/blog/posts/merry_christmas/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/merry_christmas/</id>
            
            <published>2005-12-25T08:36:00+00:00</published>
            <updated>2005-12-25T08:36:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Merry Christmas to one and all 8) I woke up this morning with a smile on my face, a song in my heart and Abbey in my arms. Perfect start to whats going to be a perfect day :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Hosed my home]]></title>
            <link href="https://roy.marples.name/blog/posts/hosed_my_home/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/hosed_my_home/</id>
            
            <published>2005-12-21T11:14:00+00:00</published>
            <updated>2005-12-21T11:14:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Which is bad. Luckily I keep backups- unluckily I lost my entire pgp keyring including my revokation cert as directories with .g* weren&rsquo;t being backed up for some odd reason.So I&rsquo;ve had to make a new one.<a href="http://wwwkeys.eu.pgp.net:11371/pks/lookup?op=index&amp;search=0xa699fcd1">uberlord@gentoo.org 0xa699fcd1</a>I&rsquo;ve tailored my backup not to skip the .g* now. Maybe I did that so the bloated GNOME stuff didn&rsquo;t get backed up all the time. At least all the KDE stuff appears to be under .kde :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Browsers and Identities]]></title>
            <link href="https://roy.marples.name/blog/posts/browsers_and_identities/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/browsers_and_identities/</id>
            
            <published>2005-12-19T14:18:00+00:00</published>
            <updated>2005-12-19T14:18:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So, <a href="../kde_vs_gnome">recent conversion</a> to <a href="http://www.kde.org">KDE</a> I&rsquo;ve been using <a href="http://www.konqueror.org">Konqueror</a> as my default browser. It&rsquo;s come a very long way since I last used it all those years ago- it&rsquo;s now quite slick. In many ways I now prefer it to <a href="http://www.mozilla.com/firefox/">Firefox</a> as it loads much much faster, uses less memory and is integrated to a higher level in the DE and relevant applications than Firefox.</p>
<p>However, it&rsquo;s not without it&rsquo;s cons either. Some pages don&rsquo;t display well (compared to other browsers) when the brower is in a window smaller than ~800x600, including this page when it has a wide picture. It doesn&rsquo;t appear to work with the <a href="http://www.mozilla.org/support/firefox/adblock.html">Mozilla css ad blocker</a> which was a godsend. Looks Like I&rsquo;ll have to use Konquerors internal ad-block which is a simple URL filter by the looks of it. :(</p>
<p>But my main gripe is that some things Just Don&rsquo;t Work. Well, they do, but you have to tell Konqueror to impersonate another browser. Like <a href="http://www.firstdirect.com">First Direct</a>, which blocks any browser they haven&rsquo;t &ldquo;tested&rdquo;. Using the same id as <a href="http://www.apple.com/safari/">Apples Safari Browser</a> the site works 100% fine.Another guilty one is Draytek. Well, more specifically their routers. They make use of javascript for their buttons and you have to tell Konqueror to impersonate Firefox or it won&rsquo;t work. Luckily Opera users have to do the same thing, but the bad news for Opera users is that they can only set which browser to impersonate on a global basis where Konqueror can do it on a site basis :)</p>
<p>So with a small tweak here and there, Konqueror is now in daily use. My hope is that Konqueror never gets ported to Windows as I see that as a lot of bloat that Firefox has. Konqueror compiles faster than Firefox and is a fair bit smaller than Firefox, and almost as good. 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[ISC dhcp is mine]]></title>
            <link href="https://roy.marples.name/blog/posts/isc_dhcp_is_mine/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/isc_dhcp_is_mine/</id>
            
            <published>2005-12-08T13:09:00+00:00</published>
            <updated>2005-12-08T13:09:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Well, in Gentoo anyway ;) A developer called max had the package, but as he&rsquo;s been inactive for over a year so he&rsquo;s been &ldquo;retired&rdquo; and I took it! Which makes me the maintainer for dhcpcd, pump and now dhcp (dhclient). Yay :)</p>
<p>So I&rsquo;ve closed all outstanding bugs (some marked NEEDINFO, UPSTREAM or TEST-REQUEST) bar one which should be solved when 3.0.4 goes into portage. I may put 3.0.4b2 in when 3.0.3-r1 goes stable as it&rsquo;s very good for me so far. Heck, I may even put it into ~ARCH but p.masked. :evil:</p>
<p>After actually taking time going through the code, it&rsquo;s not as badly written as I last thought- although it was almost a year ago when I last looked. There&rsquo;s a distinct lack of comments in places and it&rsquo;s hard to read, which makes it difficult for me to implement a cracking idea I&rsquo;ve had. Namely passing a string of setup commands like the config file OR an extra config file so that you can stack configs.</p>
<p>This idea stems from these issues I have with dhclient:</p>
<ul>
<li>You have to put the hostname into a config file to send the host name</li>
<li>I don&rsquo;t like messing with config files in /etc with sed/grep</li>
<li>Every other dhcp client can send hostname on the command line</li>
</ul>
<p>Well, hopefully I can find the time to write a patch for that over the comming Christmas/New Year break 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[KDE vs GNOME]]></title>
            <link href="https://roy.marples.name/blog/posts/kde_vs_gnome/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/kde_vs_gnome/</id>
            
            <published>2005-12-02T10:04:00+00:00</published>
            <updated>2005-12-02T10:04:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve been a long time <a href="http://www.gnome.org">GNOME</a> user pretty much since the start. I dabbled with GNOME and <a href="http://www.kde.org">KDE</a> when they were both in their early infancy (ie pre version 1) and finally settled on GNOME. KDE was (at the time) too slow, very klunky and loads of bugs. And it looked naff too!So, a long time using GNOME and yay life was good.</p>
<p>But recently, life has not been to good for me in GNOME land. Things changed, mostly for the better, but some for worse as well. The software got slower and more unreliable. Thankfully the 2.10 release solved most of the instability issues I had. So I thought why not take a look at KDE and see where it&rsquo;s at?</p>
<p>So, after emerging the split and newly into portage 3.5.0 ebuilds with gcc-4 (and it killed my laptop with the kdeendablefinal USE flag as it really does need 512 meg memory- my laptop as 464 useable after graphics card nicks some - even X took too much!) I gave it a whirl. Very nice, very taseful. The default theme for KDE looked swish even if it resembled my Windows XP box a little ;) The first thing that made me go &ldquo;Wow&rdquo; was konsole - as it loads very fast compared to gnome-terminal (I use the console a lot). Plus it has a nicer shade of colours, more pastel compared to gnome-terminal boldness.</p>
<p>Konqueror is nice too - again it loads much much much faster than Firefox, which is important for use on this slow laptop. It may not render as well as Firefox and it&rsquo;s a little slower and klunkier in use but it also compiles a lot lot faster whereas Firefox takes ages. Swings and roundabouts - I&rsquo;ll give Konq a whirl for a while ;)</p>
<p>I&rsquo;m not going to blather for ages about KDE vs GNOME- each has their merits, flaws (<a href="http://bugs.gentoo.org/114141">bug #114141</a>) and target audience and there&rsquo;s plently of room for each of them in the NIX world. But this GNOME user is going to try KDE for a while :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[stable api for net-scripts?]]></title>
            <link href="https://roy.marples.name/blog/posts/stable_api_for_net_scripts_/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/stable_api_for_net_scripts_/</id>
            
            <published>2005-11-24T12:32:00+00:00</published>
            <updated>2005-11-24T12:32:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Ever since baselayout-1.11 first came into being, I&rsquo;ve never been totally happy with the internal API I&rsquo;ve been using. Well, with the release of baselayout-1.12.0_pre11 I think I&rsquo;ve finally cracked it. Each module is now around 800- 1000 bytes smaller than the ones we&rsquo;ve been using thus far. The only function we now require is modulename_depend()- all the others are now optional.</p>
<p>With-r1 which fixes a few critical bugs, I think we&rsquo;re finally stable across the board. The only issue to be resolved (which is just changing default settings) is <a href="http://bugs.gentoo.org/112088">#112088</a> which defines default timeouts for ifplugd/netplugd and wpa_supplicant. baselayout-pre_10-r1 changed the defaults to-1 means means &ldquo;return instantly and mark inactive&rdquo; instead of 10 which means &ldquo;wait 10 seconds and mark started/stopped accordingly&rdquo;.</p>
<p>Personally, I like the-1 default which makes the most sense from a workstation/laptop perspective especially when you use udev/hotplug to start interfaces and don&rsquo;t have any interfaces aside from lo in your runlevels. Infact this whole issue seems to stem from having interfaces in a runlevel. We could alleviate this by making the default for <code>RC_STRICT_NET_CHECKING=&quot;lo&quot;</code> which solves it another way, but could mess some server configs.</p>
<p>Not many people have complained so far, so we&rsquo;ll see how we go :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Lest we forget]]></title>
            <link href="https://roy.marples.name/blog/posts/lest_we_forget/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/lest_we_forget/</id>
            
            <published>2005-11-11T21:31:00+00:00</published>
            <updated>2005-11-11T21:31:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<!-- s9ymdb:175--><img class="serendipity_image_right" width="73" height="110"  src="/blog/uploads/Misc/Poppies-178x269.serendipityThumb.jpg"  alt="" />
<p>Flanders fields the poppies blow<br>
Between the crosses, row on row<br>
That mark our place; and in the sky<br>
The larks, still bravely singing, fly<br>
Scarce heard amid the guns below.</p>
<p>We are the Dead. Short days ago<br>
We lived, felt dawn, saw sunset glow,<br>
Loved and were loved, and now we lie<br>
In Flanders fields.</p>
<p>Take up our quarrel with the foe:<br>
To you from failing hands we throw<br>
The torch; be yours to hold it high.<br>
If ye break faith with us who die<br>
We shall not sleep, though poppies grow<br>
In Flanders fields.</p>
<ul>
<li>John McCrae</li>
</ul>
<!-- s9ymdb:176--><a href="http://www.rodneyb.demon.co.uk/WcdrRM.htm"><img class="serendipity_image_left" width="81" height="110"  src="/blog/uploads/Misc/WcdrRM1d-184x250.serendipityThumb.gif"  alt="" /></a>
<p>I have no memory of <a href="http://www.rodneyb.demon.co.uk/WcdrRM.htm">Wing Commander Roy Marples</a>, but I have his name.
I will never, ever forget what he did. He fought in the 2nd World War, and rememberance day is about the 1st World War.
But war is war, 1st, 2nd &hellip; 3rd?</p>
<p>History teaches us one thing &hellip;. <a href="http://www.iraqbodycount.net/">we do not learn!</a></p>
<p>And yet we must otherwise every sacrifice made is meaningless &hellip;.</p>
<!-- s9ymdb:174--><img class="serendipity_image_center" width="600" height="327"  src="/blog/uploads/Misc/inflandersfields-600x327.jpg"  alt="" />
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The Need For Speed]]></title>
            <link href="https://roy.marples.name/blog/posts/the_need_for_speed/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_need_for_speed/</id>
            
            <published>2005-11-08T12:34:00+00:00</published>
            <updated>2005-11-08T12:34:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So we added a whole bunch of new shiny features to baselayout of late, one of these included new <a href="blog:2005/05/25/baselayout">parallel startup</a> code which required a better service dependency and ordering function. New parallel was nice and fast :) , whereas the new dependency and ordering function was dawg slow bro :(After much head scratching, there wasn&rsquo;t too much more optimizing that we could do at the time. The trace_dependencies functions has been re-written a few times to solve bugs and try and make it faster. Well, today I&rsquo;ve comitted a fix that cut&rsquo;s around 70% off the time it takes to run 8)We also think we&rsquo;ve found the problem with <a href="http://bugs.gentoo.org/104394">a service ordering bug</a> which I found out by luck on my server while testing the new code. Basically, a baselayout ebuild (not sure which one as they seem to work) or a stage3 tarball placed faulty symlinks in /etc/runlevels/{boot,default}. Now we know the solution (hopefully), we&rsquo;ll release a pre10 soon and maybe thing about making it stable?So if you&rsquo;re suffering from that bug, rc-status from baselayout-1.12.0_pre10 will tell you if you have any broken symlinks in your runlevels :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[madwifi is dead - long live rt2x00]]></title>
            <link href="https://roy.marples.name/blog/posts/madwifi_is_dead___long_live_rt2x00/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/madwifi_is_dead___long_live_rt2x00/</id>
            
            <published>2005-11-04T00:26:00+00:00</published>
            <updated>2005-11-04T00:26:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, madwifi has been pissing me off. For quite some time, ever since I got the card really. The madwifi-driver ebuild at first was good and reliable. But for a while the quality has been degrading somewhat, especially as wpa_supplicant now requries specific madwifi headers. And the latest batch in portage isn&rsquo;t exactly compatible. I also downloaded a CVS snapshop and tried that out. Oh dear, bad mojo! They now require you to run a special tool to create a friggin wireless interface! What happend to hotplug?</p>
<p>For example, I fully expect to insert a card, load the driver and there&rsquo;s the wireless interface waiting to be configured. But no, I have to tell it what sort of interface I want. Phooey! :(</p>
<p>So the quest for something new! At first I wanted an Intel chipset based card, but 10 mins research shows they are laptop only - sucks! Then I find that RaLink rt2x00 cards have native linux drivers with no firmware required and they get full use of the kernel as the drivers are pure GPL. So I placed the order and got to work on an ebuild for the rt2x00 beta driver which is a new all singing all dancing driver for all rt2x00 chipsets. RaLink open-sourced all their drivers (rt2400, rt2500, and a USB one) and the new rt2x00 driver is a rewrite combining all three + the generic ieee80211 stack.</p>
<p>Today I got my hardware - a pci and a pcmcia card. All working fine from my new ebuild.OK, there are a few caveats - SMP is broken, 4K stacks can&rsquo;t be enabled and low latency pre-emptive kernel don&rsquo;t work either (all I can live without). But the beta driver works. 8) It has a few issues, the most important one being the connectivity isn&rsquo;t quite there (it drops from time to time, but comes back automatically) and wpa_supplicant support is broken.</p>
<p>I&rsquo;m confident that this driver will shape up to be something good, it&rsquo;s already better than the prism54 driver and provided that they never go down the &ldquo;need to use our tools&rdquo; road like madwifi they&rsquo;ll do well :) Go  and try it out!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[bash faster than C shocker]]></title>
            <link href="https://roy.marples.name/blog/posts/bash_faster_than_c_shocker/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/bash_faster_than_c_shocker/</id>
            
            <published>2005-11-01T10:47:00+00:00</published>
            <updated>2005-11-01T10:47:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After yesterdays blog, <a href="http://dev.gentoo.org/~g2boojum/gblog/">g2boojum</a> asked if it would be faster to actually use the tsort C binary if available. My response was that I would expect it to be faster, but not by much as most of the work is making the dependancy tree to start with. Being the silly sort I am I decided to back myself up with benchmarks! :)</p>
<p>C tsort stopping</p>
<pre><code>real 0m0.343s
user 0m0.196s
sys 0m0.144s
</code></pre>
<p>C tsort starting</p>
<pre><code>real 0m0.243s
user 0m0.132s
sys 0m.112s
</code></pre>
<p>bash tsort stopping</p>
<pre><code>real 0m0.353s
user 0m0.248s
sys 0m0.108s
</code></pre>
<p>bash tsort starting</p>
<pre><code>real 0m0.239s
user 0m0.164s
sys 0m0.076s
</code></pre>
<p>So there we have it! But what does this mean? Why is C tsort faster at stopping than bash? Why is bash tsort faster at starting than C? More importantly does this so that I&rsquo;m a really good coder? :evil:</p>
<p>This is easily explained- when we &ldquo;stop&rdquo; we load all modules available. When we start we filter out duplicates based on user and then system preference, which means we&rsquo;re dealing with less modules. My bash code is more efficient, purely because I don&rsquo;t have to rebuild the entire PROVIDES array at the end of the sort as it gets changed during the sort- something which I cannot do in the C tsort. However, bash loops are notoriously slow, hence the more modules you throw at it the C tsort will overtake.</p>
<p>Attached is a patch (will apply to baselayout-1.12.0_pre10) that enables the C tsort. This is not being comitted to the tree as it adds more code, complexity and the C tsort may not be available all the time (/usr may be net mounted) and as proved, can actually be slower. What&rsquo;s more, it&rsquo;s unlikely that everyone will use the number of modules that I use (I have all of them &ldquo;loaded&rdquo; bar adsl) by the time we reach the sort, so bash is faster. :P So there. :P</p>
<p>However, there&rsquo;s not stopping you from seeing if you can improve it and tempt us into comitting it &hellip;. ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Network scripts speed boost]]></title>
            <link href="https://roy.marples.name/blog/posts/network_scripts_speed_boost/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/network_scripts_speed_boost/</id>
            
            <published>2005-10-31T14:48:00+00:00</published>
            <updated>2005-10-31T14:48:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>A few people say that our network scripts are slow. Well, they were damn slow when 1.11 first hit portage. :( Stopping is always the slowest as every module is loaded and evaluated. As we add more modules to do more fancy networking tricks, we get slower and slower. So over time we&rsquo;ve added a few speed ups.</p>
<p>First, we cached a lot of repeatedly called functions (mainly _provides, _before and _after). Then we removed a function which checked to see if a module over-wrote any functions (nice idea, but very very slow and didn&rsquo;t always work as you could nest functions in bash). This brought us from a stop time of around 15 seconds to the current stop time of around 5 seconds on my laptop (1.6 Celery for reference).</p>
<p>Ever since I&rsquo;ve been bugged with how slow the sort routine <a href="http://planet.gentoo.org/developers/agriffis">agriffis</a> wrote (which replaced my even slower bubble sort) as it&rsquo;s the slowest point of the whole process. Infact, sorting the modules when stopping normally took around 2.5 seconds on my laptop, the only part of the process which takes over 0.3 seconds.</p>
<p>So I had a wild idea, lets try and implement a <a href="http://blogs.msdn.com/ericlippert/archive/2004/03/16/90851.aspx">topological sort</a> routine. Luckily I had <a href="blog:2005/08/05/toposort">made one earlier</a> for the main rc system, and written in bash (the C tsort command is in /usr/bin and may not always be available).</p>
<p>This has reduced our times to as follows with <code>lan_config=( &quot;dhcp&quot; )</code></p>
<pre><code># time /etc/init.d/net.lan stop
real     0m3.005s
user     0m1.740s
sys      0m1.000s

# time /etc/init.d/net.lan start
real     0m2.662s
user     0m1.612s
sys      0m0.888s
</code></pre>
<p>Now, thats fast- almost cut the times in two! :)
We get even faster with less modules, and of course there&rsquo;s still the option to force modules.</p>
<p>Experience it when baselayout-1.12.0_pre10 hits a portage near you!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[ext3 vs reiserfs- a prism54 oddity]]></title>
            <link href="https://roy.marples.name/blog/posts/ext3_vs_reiserfs___a_prism54_oddity/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ext3_vs_reiserfs___a_prism54_oddity/</id>
            
            <published>2005-10-28T12:52:00+00:00</published>
            <updated>2005-10-28T12:52:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After finding out that <a href="http://bugs.gentoo.org/110521">a localmount bug</a> was actually a kernel issue, I also noticed that after creating a reiserfs root my prism54 card loaded by itself (when booting onto reiserfs). &ldquo;That&rsquo;s odd&rdquo; I thought as it hadn&rsquo;t done that for a long time and I&rsquo;d attributed it starting/not starting to udev issues.When booting ext3, it loads the prism54 driver just fine, but doesn&rsquo;t do anything else- not even call net.agent. When booting reiserfs it calls net.agent and loads the firmware and starts net.wlan just fine.So is this a kernel issue? I&rsquo;ll find out once gentoo-sources-2.6.14 hits the tree. If I can still reproduce this issue 100% I&rsquo;ll open a nice buggie for someone to try and fix :)Another oddity is that if you remove and insert the card repeatedly, it only &ldquo;starts&rdquo; every other time. There&rsquo;s no dmesg&rsquo;s about it when you insert it and nothing happens either, so I&rsquo;m guessing it&rsquo;s definitely kernel/udev related.EDIT: Looks like a ext3 error as it boots fine on reiser4 and xfs too</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dnsmasq just don't cut it no more]]></title>
            <link href="https://roy.marples.name/blog/posts/dnsmasq_just_don_t_cut_it_no_more/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dnsmasq_just_don_t_cut_it_no_more/</id>
            
            <published>2005-10-25T17:03:00+00:00</published>
            <updated>2005-10-25T17:03:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve been a long time user and trumpet blower for <a href="http://thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</a> which is a DNS forwarder and DHCP server. It&rsquo;s perfect for LAN&rsquo;s as it&rsquo;s small, light and fast especially when compared against the usual DHCP + BIND combo from <a href="http://www.isc.org">ISC</a>. What&rsquo;s more, it&rsquo;s very easy to configure and uses the standard /etc/hosts file to serve static DNS.However, it&rsquo;s not without its negative points as I discovered when setting up my new domain DNS server so I can serve IPv6 and redirect $familymember.marples.name to another IP.The main issue is you can&rsquo;t change which config file it uses, namely it always reads /etc/dnsmasq.conf. This isn&rsquo;t normally a problem, but I wanted a DNS server that told the world one thing and my LAN another. I&rsquo;m also not the worlds greatest C developer, so I didn&rsquo;t want to patch dnsmasq so it could work for my needs as what I want todo is probably outside the current scope of dnsmasq.I&rsquo;ve also had prior experience with BIND, but that was a long time ago and it wasn&rsquo;t pretty. <a href="http://www.powerdns.com/">PowerDNS</a> I&rsquo;ve also used, but my main gripe is that it takes ages to compile as it&rsquo;s C++ and my server isn&rsquo;t that fast. Another minus for PowerDNS is the inability to handle dynamic DNS as far as I could tell (which is a must when friends pop around with laptops).So to cut to the chase, I&rsquo;ve configured BIND + DHCP from ISC which handles what I need just fine as it now handles &ldquo;views&rdquo; which it didn&rsquo;t support last I used it. Views enable me to show one DNS to my LAN and another to the world :) A big plus thats come out of this is that name resolution is much faster :DThe moral of this story is that sometimes the software that you give kudos too isn&rsquo;t always the right tool for the job- and the right tool may sometimes be the tool that you least wanted to use :O</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[IPv6 Routing]]></title>
            <link href="https://roy.marples.name/blog/posts/ipv6_routing/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ipv6_routing/</id>
            
            <published>2005-10-24T12:17:00+00:00</published>
            <updated>2005-10-24T12:17:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Turns out that routing was very simple. Just obtain a tunnel from a broker (I use <a href="https://tb.ipv6.btexact.com/">BT Exact</a>).</p>
<p>Once you have a tunnel, you can set it up like so in baselayout</p>
<pre><code>iptunnel_sit1=&quot;mode sit remote $REMOTE_IPV4 ttl 64&quot;
config_sit1=( &quot;$TUNNEL_IPV6&quot; )
routes_sit1=( &quot;2000::/3&quot; )
</code></pre>
<p>Then setup radvd for your allocation block (don&rsquo;t forget to advertise the router this time) and you&rsquo;re good to go :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[IPv6]]></title>
            <link href="https://roy.marples.name/blog/posts/ipv6/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ipv6/</id>
            
            <published>2005-10-21T14:55:00+00:00</published>
            <updated>2005-10-21T14:55:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>IPv6- the future? Not yet! :O</p>
<p>The problem as I see it is that it&rsquo;s too complicated for end users. Even though I&rsquo;m the maintainer of Gentoo networking scripts, I know nada about IPv6. It&rsquo;s too complicated. Well it&rsquo;s actually quite easy, it&rsquo;s the documentation thats too complicated.</p>
<p>So here&rsquo;s a quick and easy for IPv6 on the home network :)</p>
<ol>
<li>Enable IPv6 in the kernel</li>
<li>Add &ldquo;ipv6&rdquo; to your USE flags</li>
<li>emerge-uaDvN world to get everything recompiled for ipv6</li>
<li>emerge iproute2 and baselayout-1.12.0 as you&rsquo;ll get much better ipv6 support :)</li>
</ol>
<p>Now we have a Gentoo IPv6 system, let&rsquo;s get to the meat! :D</p>
<p>If you look at the output from <code>ip addr</code> you get something like this
inet6 fe80::230:48ff:fe54:45a6/64 scope link</p>
<p>That shows an IPv6 address encoded with your NICs MAC address.</p>
<p>In simple terms, the network prefix is fe80::/64- this is akin to a subnet (255.255.255.0 or /24)
230:48ff:fe54:45a6 is based off the mac address.</p>
<p>Now fe80 is non routeable anywhere- it&rsquo;s just on your PC. So we need a routeable private IPv6 prefix- like 192.168. in IPv4 terms. Prefixes you can use are fecx, fedx, feex and fefx. For this example we&rsquo;ll use fec0.</p>
<p>Now, we combine these two bits of information to create a routeable IPv6 address <code>fec0::230:48ff:fe54:45a6/64</code>. Lets add this to conf.d/net</p>
<pre><code>config_eth0=( &quot;196.168.0.1/24&quot; &quot;fec0::230:48ff:fe54:45a6/64&quot; )
</code></pre>
<p>Restart net.eth0 and you have a site local IPv6 address :)</p>
<p>Lastly, we need to inform other machines about the IPv6 subnet. Todo that, we use radvd, so emerge it. Then slap this into /etc/radvd.conf</p>
<pre><code>interface eth0
{
    AdvSendAdvert on;
    prefix fec0::/64
    {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr off;
    };
};
</code></pre>
<p>Start radvd (/etc/init.d/radvd start) and hey presto, all IPv6 capable machines will now have their own IPv6 address as radvd configures a stateless network.</p>
<p>Thats it :D</p>
<p>So what&rsquo;s missing? Well, DHCP information for starters. IPv6 stateless config does not cater for this. You could emerge <a href="http://dhcpv6.sourceforge.net/">dhcpv6</a> and put a dhcp6s server and and get dhcp6c clients in use, but they don&rsquo;t do any dyanmic dns and I can&rsquo;t find an easy way to enable that. You could write a script on the server to parse the leases file and update a hosts file with the ipv6 info and then hup dnsmasq which can read host files but that&rsquo;s klunky. Especially as the hostname has to be coded into the dhcp6c.conf (just like dhclient- it cannot be specified on the commandline for some obscure reason).</p>
<p>But as we&rsquo;re using IPv6 addreses based on MAC addresses, they won&rsquo;t change. And they&rsquo;re unique. So the best solution is to put the addresses into a /etc/hosts file or install a DNS server to translate the name into an IPv6 address- <a href="http://thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</a> is very good for this.</p>
<p>Lastly, because radvd is just broadcasting subnet information there is no gateway/default route. This is because my ADSL router and ISP don&rsquo;t handle IPv6 so it&rsquo;s pointless setting one. You&rsquo;ll probably be in the same boat for a while, so &hellip;&hellip;</p>
<p>I&rsquo;ll look into a 6to4 tunnel so I can use IPv6 across my IPv4 only adsl router and access IPv6 on the internet. I&rsquo;ll even blog about it when I get it working :)</p>
<p>Thanks to johnm, tigger^ and brix in #gentoo-dev on irc.freenode.net for helpful stuff :)</p>
<p>Resources</p>
<ul>
<li><a href="http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO">TLDP Linux IPv6 HOWTO</a></li>
<li><a href="http://www.gentoo.org/doc/en/ipv6.xml">Gentoo IPv6 Router Guide</a></li>
</ul>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[wpa_supplicant over wired ethernet? naaah]]></title>
            <link href="https://roy.marples.name/blog/posts/wpa_supplicant_over_wired_ethernet__naaah/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/wpa_supplicant_over_wired_ethernet__naaah/</id>
            
            <published>2005-10-17T16:25:00+00:00</published>
            <updated>2005-10-17T16:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>seppelrockt asked on the <a href="http://forums.gentoo.org/viewtopic-t-392299.html">Gentoo Forums</a> about integrating xsupplicant with our network scripts seeing as baselayout has no support for it. As I don&rsquo;t have anything xsupplicant can work with, I never got around to writing a module for it. However, in his last paragraph he said he wanted to change to wpa_supplicant for auth over the LAN.</p>
<p>My first thought was &ldquo;WTF?&rdquo; as wpa_supplicant is just for associating with an AP and then doing encryption / authentication, so I told him so! Lo and behold, the cheeky git had the nerve to tell me I was wrong. :? So I checked out the latest wpa_supplicant and it did indeed have an option to work over a wired interface :O</p>
<p>So I set about the task of fixing up the wpa_supplicant module, which was much tricker than I thought as you could mix <a href="blog/archives/25-ifplugd-intergration.html">ifplugd</a> or <a href="/blog/archives/25-ifplugd-intergration.html">netplug</a> into the equation. I&rsquo;ve always worked under the assumption that you&rsquo;ll only ever have one daemon controlling the interface (netplug, ifplugd or wpa_supplicant- dhcp daemons don&rsquo;t), hence everything worked fine with the IN_BACKGROUND env var. Now we had two daemons controlling the same interface :jawdrop:</p>
<p>Luckily, thanks to a recent feature addition, we know which daemons are started by which init script- but more importantly the order they are started in. This means that when netplug detects that a cable has been removed, wpa_supplicant can now stop even though the init script was stopped from the background. We know this, because wpa_supplicant stops when not IN_BACKGROUND or it wasn&rsquo;t the first daemon started 8)</p>
<p>If you need to try out this wonderous beast, you can <a href="http://dev.gentoo.org/~uberlord/baselayout/wpa_supplicant-wired.patch">download the patch for baselayout-1.12.0_pre9-r1</a>.</p>
<p>EDIT: Patch updated 19:24 BST today- it works on wireless cards again!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[openvpn gets a facelift]]></title>
            <link href="https://roy.marples.name/blog/posts/openvpn_gets_a_facelift/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/openvpn_gets_a_facelift/</id>
            
            <published>2005-10-13T15:25:00+00:00</published>
            <updated>2005-10-13T15:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After being told that baselayout-1.12.0_pre9 broke openvpn, I took a look at its init script.
This baby had good ideas, but was poorly executed, hence causing breakage. As <a href="http://blog.the-luckyduck.de/archives/cat_2.html">luckyduck</a> is currently AWOI (absent with out internet) I decided to fix it. I also fixed a fair few outstanding openvpn bugs (mainly enhancements).</p>
<p>The new script is 3 quarters the size of the existing script as I&rsquo;ve taken advantage of knowing baselayout :)</p>
<p>However, I&rsquo;ve changed the config layout to match upstreams, so beware! Here&rsquo;s the default layout</p>
<ul>
<li>init.d/openvpn requires /etc/openvpn/openvpn.conf</li>
<li>init.d/openvpn.foo requires /etc/openvpn/foo.conf</li>
<li>init.d/openvpn.bar requires /etc/openvpn/bar.conf</li>
</ul>
<p>openvpn.foo and openvpn.bar are symlinks to openvpn.
Recognise this? net.ethx scripts work in a similar fashion. This allows us to start/stop each vpn.</p>
<p>Here&rsquo;s a list of the openvpn bugs I&rsquo;ve fixed today:</p>
<ul>
<li><a href="http://bugs.gentoo.org/98782">#98772</a> - optional iproute2 support</li>
<li><a href="http://bugs.gentoo.org/100943">#100943</a> - install all documentation</li>
<li><a href="%5Bhttp://bugs.gentoo.org/103711">#103711</a> - minimal support (don&rsquo;t build plugins)</li>
<li><a href="http://bugs.gentoo.org/105439">#105439</a> - start/stop specific vpns</li>
<li><a href="http://bugs.gentoo.org/105479">#105479</a> - enable static linking</li>
<li><a href="%5Bhttp://bugs.gentoo.org/107831">#107831</a> - don&rsquo;t error on files in /etc/openvpn</li>
<li><a href="http://bugs.gentoo.org/108945">#108945</a> - fix init script for baselayout-1.12</li>
</ul>
<p>Apologies to anyone this causes trouble to (maybe luckyduck, the openvpn maintainer - but he&rsquo;s away!) but the new config, init script and ebuild has solved every current outstanding openvpn bug reported in our bugzilla 8)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[ENGAGED]]></title>
            <link href="https://roy.marples.name/blog/posts/engaged/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/engaged/</id>
            
            <published>2005-09-26T15:00:00+00:00</published>
            <updated>2005-09-26T15:00:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>So when Abbey and myself were walking hand in hand across the wind swept beach near Estepona I whisked her onto some nearby rocks, wrapped her in my arms and asked her to marry me &hellip;&hellip;.She looked me lovingly in the eyes and said &ldquo;Yes&rdquo; 8)I&rsquo;m a very very very happy chappy right now :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Spain]]></title>
            <link href="https://roy.marples.name/blog/posts/spain/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/spain/</id>
            
            <published>2005-09-20T11:46:00+00:00</published>
            <updated>2005-09-20T11:46:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Off to Spain for two weeks :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[lighttpd]]></title>
            <link href="https://roy.marples.name/blog/posts/lighttpd/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/lighttpd/</id>
            
            <published>2005-09-19T17:25:00+00:00</published>
            <updated>2005-09-19T17:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Just changed my web server from <a href="http://httpd.apache.org">Apache</a> over to <a href="http://www.lighttpd.net">lighttpd</a>. Wasn&rsquo;t that much of a chore, just had to emerge 1.4.4 so that I get working ldap authentication via ssl/tls and emerge dev-lang/php with the cgi USE flag and voila.The site seems to be a bit snappier - especially horde as php no longer seems to segfault with iconv/utf8 errors 8).</p>
<p>Why did I change? Well, apache changing things around annoyed me and it takes a long time to emerge it. lighttpd is smaller, so less time emerging! Plus it&rsquo;s got a smaller memory footprint, so my server doesn&rsquo;t complain too much :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd-1 is gone]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_1_is_gone/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_1_is_gone/</id>
            
            <published>2005-09-17T02:25:00+00:00</published>
            <updated>2005-09-17T02:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>dhcpcd-2.0.0 went stable on all platforms a few days ago- due to the vast amount of bugs reported since it went stable on amd64 and x86 (zero), it&rsquo;s a good time to prune the old ebuilds.</p>
<p>This means that you have to use baselayout-1.11.x as older versions used the-z &ldquo;release lease but cache IP&rdquo; no longer works. It didn&rsquo;t work anyway from the DHCP servers perspective so you loose nothing :)</p>
<p>The main difference from the 1.3 gentoo patchset - aside from loosing the above - is the integration of the Debian and Gentoo patchsets. Yay.</p>
<p><a href="http://www.phystech.com/download/dhcpcd.html">Upstream is dead</a>, so we forked - <a href="mailto:simon@thekelleys.org.uk">Simon Kelly</a> (Debian dhcpcd maintainer) and I merged patchsets and created dhcpcd-2.0.0 :)</p>
<p>Which you now have 8)Woooooooooooo. Means absolutely didly aside from one small detail- no more 25k patches because the new upstream listens!</p>
<p>Enough - I need a smoke, more port and some more victims in ET :P</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Munted]]></title>
            <link href="https://roy.marples.name/blog/posts/munted/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/munted/</id>
            
            <published>2005-09-12T12:24:00+00:00</published>
            <updated>2005-09-12T12:24:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Got back yesterday evening from a stag weekend in Edinburgh. At work today and I&rsquo;m still <a href="http://www.urbandictionary.com/define.php?term=munted">munted</a> :sick:It was a fantastic blast in which the 8 legendary lads broke all beer drinking records whilst managing to avoid limb breakage whilst learning to snow board!Although we didn&rsquo;t take any cameras (Jon took his camcorder for the snowboarding though) I do have a picture of what the Stag (the groom to be, not me) looked like, taken from earlier in the year[[Screenshot(92,width=523,height=392)]]Let&rsquo;s hope that he looks a bit more sober for his wedding :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[ifplugd intergration]]></title>
            <link href="https://roy.marples.name/blog/posts/ifplugd_intergration/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/ifplugd_intergration/</id>
            
            <published>2005-09-08T16:16:00+00:00</published>
            <updated>2005-09-08T16:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://0pointer.de/lennart/projects/ifplugd/">ifplugd</a> is similar to <a href="http://www.red-bean.com/~bos/">netplug</a>. A few days ago, I <a href="blog:2005/09/02/netplug">wrote a netplug module</a> for baselayout. Writing one for ifplugd was a little more tricky as I had to alter the ifplugd init script a fair bit so they don&rsquo;t conflict with each other. Luckily, with a few recent baselayout enchancements we can now work out which init scripts launched which daemons via start-stop-daemon calls :)</p>
<p>To make things more consistent with other baselayout modules, you have to specify the exact options you want over the defaults like so <code>ifplugd_eth0=&quot;--api-mode=wlan&quot;</code></p>
<p>Still, I recommend netplug over ifplugd as it&rsquo;s smaller, lighter and more simple. Oh, and if anyone can get wlan mode to work with ifplugd, please let me know so I can get it working for wep on my prism54 ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[arpinginginginging]]></title>
            <link href="https://roy.marples.name/blog/posts/arpinginginginging/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/arpinginginginging/</id>
            
            <published>2005-09-07T14:22:00+00:00</published>
            <updated>2005-09-07T14:22:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After being inspired by a <a href="http://forums.gentoo.org/viewtopic-t-378346.html">forum post</a>, I wrote a new net-scripts module (arping) which replaces the apipa module. arping also does apipa, so you loose nothing if you ever used it. apipa was basically a wrapper around the arping tools to find a free address in the 169.254.0.0/16 range, so the new module name makes more sense.</p>
<p>Anyway, here&rsquo;s a sample config which tries to find a gateway and sets up the interface for it</p>
<pre><code>#configure for dhcp, then arping
config_eth0=( &quot;dhcp&quot; )
fallback_eth0=( &quot;arping&quot; )

# List gateways to arping
arping_eth0=&quot;192.168.1.1 10.1.1.1&quot;

# Map found gateways to config's
config_192168001001=( &quot;192.168.1.240/24&quot; )
fallback_192168001001=( &quot;apipa&quot; )
routes_192168001001=( &quot;default via 192.168.1.1&quot; )
config_010000000001=( &quot;10.0.0.254/8&quot; )
fallback_010000000001=( &quot;apipa&quot; )
routes_010000000001=( &quot;default via 10.0.0.1&quot; )
</code></pre>
<p>Those that want to try it out, <a href="http://dev.gentoo.org/~uberlord/baselayout/arping">can grab it from here</a>. Drop it into /lib/rcscripts/net.modules.d and delete the apipa module that &rsquo;s currently there. Requires baselayout-1.12.0_pre8 (will ship with pre9).</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[netplug]]></title>
            <link href="https://roy.marples.name/blog/posts/netplug/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/netplug/</id>
            
            <published>2005-09-02T12:25:00+00:00</published>
            <updated>2005-09-02T12:25:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p><a href="http://www.red-bean.com/~bos/">netplug</a> is a nice little daemon that detects ethernet cables being inserted and removed based on kernel netlink events. Unlike ifplugd, it doesn&rsquo;t use any other tricks or work with wireless devices. However, it is much smaller and encourages kernel driver devs to use netlink events properly- which is good :)</p>
<p>One thing I&rsquo;ve never liked about ifplugd is that it never seems to work well with the default settings and it currently runs from it&rsquo;s own init script- which makes it hard to integrate into baselayout automatically. netplug does not suffer from this as I deliberately didn&rsquo;t write or use the packages init script and it has no configuration so to speak.</p>
<p>Here&rsquo;s a rough diagram as to how it works</p>
<p>insert kernel module-&gt; hotplug event-&gt; hotplug starts net.eth0-&gt; net.eth0 starts-&gt; netplug launched-&gt; net.eth0 goes inactive
netplug gets a link beat-&gt; net.eth0 configures and goes started or inactive depending on result</p>
<p>This means that all the user has to do is create a link from net.lo to net.eth0, which is something I&rsquo;d like hotplug to do at some point so the user has nothing to configure in a DHCP based network. Well, they have to configure their NIC driver as an external module and trigger it via coldplug, but we&rsquo;re starting to get to the stage where everything &ldquo;Just Works&rdquo; (tm) 8)</p>
<p>Of course, you can disable netplug from running on specific interfaces via the modules variable <code>modules_eth0=( &quot;!netplug&quot; )</code></p>
<p>If you want to try it out, you&rsquo;ll need baselayout-1.12.0_pre8
So what are you waiting for? GO TRY IT :P</p>
<p>EDIT: If you have more than one interface regardless of type, you&rsquo;ll need the below patch otherwise netplugd will shut down</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-diff" data-lang="diff"><span style="background-color:#fcc">--- netplug     (revision 1468)
</span><span style="background-color:#fcc"></span><span style="background-color:#cfc">+++ netplug     (working copy)
</span><span style="background-color:#cfc"></span><span style="color:#030;font-weight:bold">@@-114,9 +114,14 @@
</span><span style="color:#030;font-weight:bold"></span># Returns 0 (true) when successful, non-zero otherwise
netplug_post_stop() {
	${IN_BACKGROUND} &amp;&amp; return 0
<span style="background-color:#fcc">-       ebegin &#34;Stopping netplug on $1&#34;
</span><span style="background-color:#fcc"></span><span style="background-color:#cfc">+       local iface=&#34;$1&#34;
</span><span style="background-color:#cfc">+       local pidfile=&#34;/var/run/netplug.${iface}.pid&#34;
</span><span style="background-color:#cfc">+
</span><span style="background-color:#cfc">+       [!-e ${pidfile} ]([)] &amp;&amp; return 0
</span><span style="background-color:#cfc">+
</span><span style="background-color:#cfc">+       ebegin &#34;Stopping netplug on ${iface}&#34;
</span><span style="background-color:#cfc"></span>        start-stop-daemon--stop--exec /sbin/netplugd \
<span style="background-color:#fcc">-	    --pidfile &#34;/var/run/netplug.$1.pid&#34;
</span><span style="background-color:#fcc"></span><span style="background-color:#cfc">+	    --pidfile &#34;${pidfile}&#34;
</span><span style="background-color:#cfc"></span>            eend $?
     }
</code></pre></div>]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[10 minute run]]></title>
            <link href="https://roy.marples.name/blog/posts/10_minute_run/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/10_minute_run/</id>
            
            <published>2005-08-16T07:38:00+00:00</published>
            <updated>2005-08-16T07:38:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>After watching a program about teenagers twice their recommended body weight and myself being a stone or two overweight I&rsquo;ve decided that if they can run a mile run every morning before breakfast then so can I! :jawdrop:OK, it&rsquo;s probably not a mile as it only took 10 minutes to run around the block but it&rsquo;s a good start. Especially seeing as by the end of it my lungs where searing with pain, I was feeling faint and my feet were like two bricks :barf: Which is the price you pay for being an overweight smoker who doesn&rsquo;t like excercise!Mission- to run around the block every weekday morning before work and see how much weight I loose :O</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Merging resolv.conf]]></title>
            <link href="https://roy.marples.name/blog/posts/merging_resolv_conf/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/merging_resolv_conf/</id>
            
            <published>2005-08-12T17:31:00+00:00</published>
            <updated>2005-08-12T17:31:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>baselayout-1.12.0_pre6 will now feature resolv.conf merging- basically taking the best information from active interfaces that we or dhcp has setup and merging it into one. For example</p>
<p>eth0 has</p>
<p><code>nameserver 1.2.3.4 nameserver 1.2.3.5 domain foo</code></p>
<p>eth1 has</p>
<p><code>nameserver 4.3.2.1 nameserver 4.3.2.2 search wibble wobble</code></p>
<p>This turns into a merged resolv.conf of</p>
<p><code>nameserver 1.2.3.4 nameserver 4.3.2.1 nameserver 1.2.3.5 search foo wibble wobble</code></p>
<p>However, if eth1 has a lower metric than eth0 (eth0 wireless, eth1 wired for example) then it becomes</p>
<p><code>nameserver 4.3.2.1 nameserver 1.2.3.4 nameserver 4.3.2.2 search wibble wobble foo</code></p>
<p>Duplicates are also removed :)
Incase you&rsquo;re wondering why not all the information was taken across, well the answer is due to libc limitations. If you consult the resolv.conf man page then you&rsquo;ll discover that you&rsquo;re limited to 3 nameservers and 6 search domains. Great!</p>
<p>It&rsquo;s a trivial excercise to change the numbers we limit too, but they&rsquo;ll have no effect with current libc. But if anyone uses a libc/resolver with greater limits I&rsquo;m happy to accept patches :P</p>
<p>As it took a lot less time todo than I first thought, I&rsquo;ll merge ntp.conf information too- hopefully in time for pre6 8)
EDIT: ntp.conf merging took 10 minutes and it is in :D</p>
<p>If anyone used the resolvconf package which Debian uses, then this does a similar thing but transparently and without the need for a daemon.</p>
<p>Fans of the baselayout-1.12.0_pre releases so far will be pleased to know that we now default RC_AUTO_INTERFACE to no ;)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[toposort to save the day]]></title>
            <link href="https://roy.marples.name/blog/posts/toposort_to_save_the_day/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/toposort_to_save_the_day/</id>
            
            <published>2005-08-05T16:15:00+00:00</published>
            <updated>2005-08-05T16:15:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>baselayout-1.12.0_pre4 hit portage today. The trace_dependencies() function in /lib/rcscripts/sh/rc-services.sh has caused a few headaches for many people. Symptoms include hanging, getting things in the wrong order and other such nasty voodoo. :O</p>
<p>So I hacked in a toposort function which is faster then the &ldquo;sort until nothing&rdquo; approach we used previously. We can&rsquo;t use tsort (C toposort program) as that&rsquo;s in /usr/bin and isn&rsquo;t available at boot time, so it&rsquo;s in bash! The toposort function is also non-infinite by definition, so circular deps should be a thing of the past- well, for that function anyway! ;)</p>
<p><a href="http://blogs.msdn.com/ericlippert/archive/2004/03/16/90851.aspx">Here&rsquo;s a good reference to toposort.</a></p>
<p>I&rsquo;ve also been chastised for my non-use of tabs (blame my vim settings :P ), so I&rsquo;ve now been a good boy and added <code># vim:ts=4</code> to all my stuff in baselayout and re-indented with proper tabs.</p>
<p>Lastly, I&rsquo;ve removed all the</p>
<p><code>e=$( iwconfig ${some_command} 2&gt;&amp;1) [-n ${e} ]([)] &amp;&amp; eerror &quot;dufus&quot;</code></p>
<p>and replaced it with</p>
<p><code>if ! iwconfig ${some_command} ; then eerror &quot;dufus&quot;; fi</code></p>
<p>which is much nicer and should now work as the affected wireless-tools isn&rsquo;t in portage anymore.
Or was it a driver problem? Either way, it&rsquo;s cleaner, better and here to stay. It works on my madwifi and prism54 so if it doesn&rsquo;t work for you then isn&rsquo;t that just teh sux0r! Bitch about it to the driver maintainers for your hardware }:)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Fixing the mess]]></title>
            <link href="https://roy.marples.name/blog/posts/fixing_the_mess/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/fixing_the_mess/</id>
            
            <published>2005-08-01T07:14:00+00:00</published>
            <updated>2005-08-01T07:14:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK, so the last baselayout-1.12.0-pre1 and pre2 was a bit of a mess. It borked many peoples systems :barf:The reason was trying to integrate <a href="http://bugs.gentoo.org/show_bug.cgi?id=69854"> a user submitted patch for improved parallel startup</a> with our new code that introduced starting, stopping and inactive statuses. The odd thing is that not one of the baselayout devs noticed this- but then, I don&rsquo;t suppose we have many failing services either!We think we&rsquo;ve fixed it in pre3, so it&rsquo;s been removed from package.mask today 8)Hopefully pre3 will resolve all those issues as we try and move it towards stable!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[We have no back lawn]]></title>
            <link href="https://roy.marples.name/blog/posts/we_have_no_back_lawn/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/we_have_no_back_lawn/</id>
            
            <published>2005-08-01T07:04:00+00:00</published>
            <updated>2005-08-01T07:04:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK. I am really really stiff all over. This gardening lark is the way to a trimmer bod all right ;) The key is to get going- sometimes I need a kick up the back side, but once I&rsquo;m going I&rsquo;m like the Duracel Bunny :PSo the back garden is pretty bare now. The grass has been taken up, another tree stump removed and some digging and weeding done. Even though it now looks very bare, it also looks very good as we can finally see some real progress! :) Abbey and I knocked up a rough guide to how we want our new garden too look, although the more exotic features will have to wait for a while :(Garden TODO List:Remove 3 tree stumps (1 is from a really really big fur tree- not going to be easy)Dig, weed, level, compress, level, compress, level, compress, level, compress back mudLay new turf on mudRelax :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Enjoy the Base]]></title>
            <link href="https://roy.marples.name/blog/posts/enjoy_the_base/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/enjoy_the_base/</id>
            
            <published>2005-07-20T10:16:00+00:00</published>
            <updated>2005-07-20T10:16:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>baselayout-1.12.0_pre1 sneaked past my radar :O , so I stabled 1.11.13 and did a 1.12.0_pre1-r1 unstable for all arches. Weeeeeeeeeeeeeeeeee :)Some note-worthy networking features1) If you use DHCP, you&rsquo;ll need the ~ARCH version of your fav DHCP client (except for dhclient)2) We now arping static IP&rsquo;s requested3) We calculate a route metric based on interface type so we can &ldquo;prefer&rdquo; a wired interface over a wireless one4) /etc/{resolv,ntp,yp}.conf will be moved to /var/lib/net-scripts and symlinked back /etc5) Each interface has it&rsquo;s own {resolv,ntp,yp}.conf in /var/lib/net-scripts/state/${interface}- we select the one to use based on route metric6) wpa_supplicant-0.4.x users now enjoy automatic network configuration when a new AP comes in range (the downside of this is that the actual interface config such as address, routes, dhcp, etc happen in the background now)7) You can now rename interfaces from an interface name or MAC address. This should really be done elsewhere, but so many lusers asked for it I&rsquo;ve now given themselves the chance to shoot themselves :evil:2- 5 can all be toggled by RC_AUTO_INTERFACE in /etc/conf.d/rcIt defaults to &ldquo;yes&rdquo; for our clueless users, but most servers will want it set to &ldquo;no&rdquo;.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[pump - the ricers choice]]></title>
            <link href="https://roy.marples.name/blog/posts/pump_the_ricers_choice/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/pump_the_ricers_choice/</id>
            
            <published>2005-07-13T11:51:00+00:00</published>
            <updated>2005-07-13T11:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I wrote another pump patch that allows pump to create /etc/ntp.conf based on ntp servers received from a DHCP server instead of getting my scripts to create it by parsing pump status output. This makes pump a bit faster. Suprisingly it is the fastest by far of the dhcp clients. Without giving any hard numbers (stats are lies and damn lies), here&rsquo;s my feelings on the fastest DHCP clients in portage:</p>
<ol>
<li>pump</li>
<li>udhcpc</li>
<li>dhcpcd (although it can easily be the slowest, it&rsquo;s normally better than dhclient)</li>
<li>dhclient</li>
</ol>
<p>So if you&rsquo;re a ricer, or just want a faster DHCP connection then use pump! It does everything 99% of DHCP users need to - the only thing it doesn&rsquo;t do that the others do is dump it&rsquo;s DHCP information into env vars so a script can parse them (maybe useful for samba WINS settings), but as I said not many users would need that functionality.</p>
<p>I&rsquo;m hopefull that I can write another pump patch so I can append a DNS search path option to specify the &ldquo;search foo bar&rdquo; option in /etc/resolv.conf. This means that the only thing the pump helper script needs to do is mark the net.eth0 service as inactive/started - which guess what, makes us faster! Debians dhcpcd patchset inspires me todo this - although hopefully more on dhcpcd later &hellip;.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Removing the back lawn]]></title>
            <link href="https://roy.marples.name/blog/posts/removing_the_back_lawn/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/removing_the_back_lawn/</id>
            
            <published>2005-07-11T15:44:00+00:00</published>
            <updated>2005-07-11T15:44:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I spent last weekend removing the turf from the back lawn. I removed about a third of it over the weekend- damn it&rsquo;s hard work especially in the blazing sun and the sweat rolling down your back and into your eyes. :(Arms are quite sore this morning, but should recover for another go Wednesday night. Hopefully I&rsquo;ll get the entire turf up in a week or two so we can lay down new turf before the start of Autumn (that&rsquo;s Fall to you colonials :P ).The plus side of all this hardwork is that I shed another few pounds :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[File Systems]]></title>
            <link href="https://roy.marples.name/blog/posts/file_systems/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/file_systems/</id>
            
            <published>2005-07-08T10:51:00+00:00</published>
            <updated>2005-07-08T10:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>My home server has been mis-behaving of late :sick:.Bash keep segfaulting during emerges - one time it caused zlib to get merged incorrectly which meant I had to haul a keyboard and monitor to it as ssh wouldn&rsquo;t let me in anymore. I was not a happy chappy :(</p>
<p>I&rsquo;m not sure why this is, as everything is as stable as rock (except for my horde + php5 combo which causes iconv utf8 assert errors in my apache logs). It&rsquo;s not like I&rsquo;m using any ricer flags either- I was however using reiser4.</p>
<p>So I moved the entire server over to reiserfs - still kept segfaulting. Hmmmmmz went I. xfs and jfs were out of the question (too slow for my other needs) so I tried ext3 for the first time. I knew that ext3 had a rep for being slow, but also knew that dir_index helps greatly. So after moving to ext3 last night the server actually seems slightly more responsive, but some i/o does take longer and the same stuff takes up around 20% more space (reiser is really good at packing).</p>
<p>Touching wood, the 3 emerges I&rsquo;ve done haven&rsquo;t segfaulted on me :)</p>
<p>But I suspect it&rsquo;s something in the hardware/environment as my main PC running reiserfs is perfect &hellip;&hellip; :?</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Save the Pikachu]]></title>
            <link href="https://roy.marples.name/blog/posts/save_the_pikachu/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/save_the_pikachu/</id>
            
            <published>2005-07-04T23:10:00+00:00</published>
            <updated>2005-07-04T23:10:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<!-- comment lost-->
<p>&hellip;.. because we have to &hellip;. and you must accept this   :puzzled:</p>
<p>Thanks for making me laugh Kumba :D</p>
<p>//me thinks that the people who matter about software patents will not be reading my blog or <a href="http://planet.gentoo.org">Planet Gentoo</a></p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Interface naming]]></title>
            <link href="https://roy.marples.name/blog/posts/interface_naming/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/interface_naming/</id>
            
            <published>2005-07-04T14:51:00+00:00</published>
            <updated>2005-07-04T14:51:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>OK - the number of forum posts regarding being able to specify the name of an interface and the kludgy solutions they came up with was making me cry too much :sick:</p>
<p>So, I wanged a new net-scripts module into baselayout svn today which should remedy the situation. net-tools (ifconfig) ships with nameif and I finally discovered that ip (iproute2) can do the same with the &ldquo;ip link set name&rdquo; command.</p>
<p>You&rsquo;ll be able to do the following in the next alpha release of baselayout 8)</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#033">rename_001122334455</span><span style="color:#555">=</span><span style="color:#c30">&#34;foo1&#34;</span> <span style="color:#09f;font-style:italic"># Rename based on MAC address</span>
<span style="color:#033">rename_eth1</span><span style="color:#555">=</span><span style="color:#c30">&#34;foo2&#34;</span> <span style="color:#09f;font-style:italic"># Rename based on current name</span>
</code></pre></div><p>Please note that it is preferable to ensure the device has it&rsquo;s correct name before any net.xxx scripts are called- you can do this by writing udev rules.</p>
<p>The reason for this is that we have to create a <code>net.$newname link</code> to net.lo in /etc/init.d if it doesn&rsquo;t exist, mark ourselves as stopped and then start <code>net.$newname</code> - which of course takes a lot longer (in CPU terms) than using a udev rule or similar.</p>
<p>Of course, if you have wireless-tools installed then you get a 3rd way of renameing things - ifrename which can be used by hotplug automatically.</p>
<p>Hopefully I&rsquo;ve now satisified all our grumpy users :p</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Pump it up]]></title>
            <link href="https://roy.marples.name/blog/posts/pump_it_up/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/pump_it_up/</id>
            
            <published>2005-06-30T15:40:00+00:00</published>
            <updated>2005-06-30T15:40:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>pump - one of the least liked dhcp clients for whatever reasons.</p>
<p>Due to changes in baselayouts networking <em>(basically moving <code>/etc/{resolv,ntp,yp}.conf</code> to <code>/var/lib/net-scripts/state/${iface}</code> and symlinking)</em> I&rsquo;ve had to pour over pumps code and make up some patches to enable this and route metrics. The code base is actually very clean - much like udhcps (in terms of readability).</p>
<p>So what does this mean for you? Well, probably not much - but it does mean that pump gets to stay in portage a while longer :P</p>
<p>All that remains is to add a <code>--script</code> option to pumps command line so that I can specify a script to call on dhcp state change (I could fudge /etc/pump.conf but that sucks) and add an <code>--keep-up</code> option so that pump does not shut the interface down on dhcp release. That is needed for ifplugd/wpa_supplicant or similar as they need the interface up to work.</p>
<p>So after that happens, I think I&rsquo;ll prod the guys for a baselayout-1.12.0-alpha3 release and see just what havoc the last few months of coding have caused :evil:</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[2 years with Abbey :)]]></title>
            <link href="https://roy.marples.name/blog/posts/2_years_with_abbey/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/2_years_with_abbey/</id>
            
            <published>2005-06-08T15:53:00+00:00</published>
            <updated>2005-06-08T15:53:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Actually, the date was on the 19th of April but I&rsquo;ve been loathe to post anything mainly as I took some very nice pictures and I have a technical problem transfering from my camera to here?</p>
<p>But Abbey has moaned royally! So here we go!</p>
<p>Here&rsquo;s to two fantasic years with Abbey!</p>
<p>She&rsquo;s consistenly made me very happy in many wonderful and different ways ;) We&rsquo;ve accomplished a lot- moved down south with my work, bought a house and we&rsquo;re now spending loads of hard earned pennies improving it :jawdrop:</p>
<p>Hopefully we can complete the back garden before this time next year so we can get a puppy which we both really want :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[vsftp gets taken over]]></title>
            <link href="https://roy.marples.name/blog/posts/vsftp_gets_taken_over/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/vsftp_gets_taken_over/</id>
            
            <published>2005-06-07T20:50:00+00:00</published>
            <updated>2005-06-07T20:50:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I took over vsftpd in Gentoo today as the current maintainer (rajiv) has not got the time for it anymore.As such I&rsquo;ve closed 5 bugs, bumped to 2.0.3 and will close a few more tomorrow 8)This is all because recent proftpd builds have really annoyed me. Strangely, vsftpd took just 1 hour to setup after working out how to host virtual sites. Not too shaby!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[dhcpcd gets a makeover]]></title>
            <link href="https://roy.marples.name/blog/posts/dhcpcd_gets_a_makeover/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/dhcpcd_gets_a_makeover/</id>
            
            <published>2005-06-03T16:09:00+00:00</published>
            <updated>2005-06-03T16:09:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>put a new dhcpcd-r10 into portage this morning. This gives a much saner {resolv,ntp,yp}.conf in /etc and the ability to create those files somewhere other than /etc. Also, it no longer clobbers these files unless the DHCP information returned defines them- ie no NTP information, then we leave the ntp.conf file intact.It also puts the interface name into the .sv file names now to handle multiple instances running.All I need now it to get pump dropped from portage as it&rsquo;s crap and I have no wish to fix it!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[The Magical Expanding configuration]]></title>
            <link href="https://roy.marples.name/blog/posts/the_magical_expanding_configuration/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/the_magical_expanding_configuration/</id>
            
            <published>2005-05-25T16:59:00+00:00</published>
            <updated>2005-05-25T16:59:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>As requested via a bug report, network configuration now supports bash expansion. This will make giving servers multiple IP addresses a snap. Here&rsquo;s an example</p>
<p><code>config_eth0=( &quot;192.168.0.{1..20}/24 brd +&quot; )</code>
gives you 20 IP addresses.</p>
<p><code>config_eth0=( &quot;192.168.{1..20}.{1..20}/24 brd +&quot; )</code>
gives you 400 IP addresses. (20x20)</p>
<p><code>config_eth0=( &quot;192.168.{1..20}.{1..20}/24 brd 192.168.{1..20}.{1..20}&quot; )</code><br>
Currently doesn&rsquo;t work as expected- it tries to add 160000 IP addresses with most of them duplicates thanks to a sequence in the broadcast field. Not sure how to solve this at present- but I don&rsquo;t see it as that much of a problem at this time.</p>
<p>The problem is that to get the first two examples working correctly, I need to replace spaces with _ (any char will do as long as it&rsquo;s not space) so that expansion works just by clever use of quoting and arrays- no loops.</p>
<p>Here&rsquo;s the current code- which accepts a string and returns an array</p>
<pre><code>expand_parameters() {
    local x=&quot;$( eval echo ${@// /_} )&quot;
    local-a a=( ${x} )
    a=( &quot;${a[)
    a=( &quot;${a[@](@]/#/\&quot;}&quot;)/%/\&quot;}&quot; )
    echo &quot;${a[*]//_/ }&quot;
}
</code></pre>
<p>Any ideas about how to fix it are welcome :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[baselayout gets parallel]]></title>
            <link href="https://roy.marples.name/blog/posts/baselayout_gets_parallel/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/baselayout_gets_parallel/</id>
            
            <published>2005-05-25T16:52:00+00:00</published>
            <updated>2005-05-25T16:52:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Merged some patches by Paul Pacheco into baselayout which makes parallel start much more parallel and only does a modules-update when needed. This boosts booting my laptop by around 40 seconds!The only down side is that I&rsquo;ve had to hide the init.d/* script output and replace it with generic Service Foo starting/started/stopped/failed messages as the output no longer lines up as we&rsquo;re running parallel.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Gentoo Developer]]></title>
            <link href="https://roy.marples.name/blog/posts/gentoo_developer/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/gentoo_developer/</id>
            
            <published>2004-10-28T10:11:00+00:00</published>
            <updated>2004-10-28T10:11:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I became a Gentoo developer today :) :lol: :evil: :shocked: :cool: :jawdrop:</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/tech" term="tech" label="tech" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Carly and Simon got married]]></title>
            <link href="https://roy.marples.name/blog/posts/carly_and_simon_got_married/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/carly_and_simon_got_married/</id>
            
            <published>2004-05-16T10:10:00+00:00</published>
            <updated>2004-05-16T10:10:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Carly and Simon got married yesterday and I&rsquo;ve got the <a href="http://roy.marples.name/blog/pages/gallery.html?serendipity%5Btoken%5D=be11818bd4c28fbb97ee833e628463bf&amp;serendipity%5Btoken%5D=be11818bd4c28fbb97ee833e628463bf&amp;serendipity%5Baction%5D=&amp;serendipity%5BadminAction%5D=&amp;serendipity%5Bsubpage%5D=%2Fblog%2Fpages%2Fgallery.html&amp;serendipity%5Bonly_path%5D=Parties%2FKath_30%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bkeywords%5D=&amp;serendipity%5Bonly_path%5D=Weddings%2FCarly_Simon%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bkeywords%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.name%5D=&amp;serendipity%5Bfilter%5D%5Bi.authorid%5D=&amp;serendipity%5Bfilter%5D%5Bi.extension%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DPI%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COPYRIGHT%5D=&amp;serendipity%5Bfilter%5D%5Bbp.TITLE%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT1%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT2%5D=&amp;serendipity%5Bfilter%5D%5Bbp.ALT%5D=&amp;serendipity%5Bsortorder%5D%5Border%5D=i.date&amp;serendipity%5Bsortorder%5D%5Bordermode%5D=ASC&amp;serendipity%5Bsortorder%5D%5Bperpage%5D=8&amp;go=+-+Go!+-+">pictures to prove it</a>! Abbey and I wish them all the best for the future</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[One year with Abbey]]></title>
            <link href="https://roy.marples.name/blog/posts/one_year_with_abbey/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/one_year_with_abbey/</id>
            
            <published>2004-04-19T10:09:00+00:00</published>
            <updated>2004-04-19T10:09:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>I&rsquo;ve now been dating Abbey for a whole year! A very nice milestone to reach and it&rsquo;s been the most enjoyable year of my life :)</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Kath's 30th Birthday party]]></title>
            <link href="https://roy.marples.name/blog/posts/kath_s_30th_birthday_party/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/kath_s_30th_birthday_party/</id>
            
            <published>2003-11-20T09:07:00+00:00</published>
            <updated>2003-11-20T09:07:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<p>Finally got around to posting the pictures of Kath&rsquo;s 30th Birthday party. Find them in the <a href="http://roy.marples.name/blog/pages/gallery.html?serendipity%5Btoken%5D=be11818bd4c28fbb97ee833e628463bf&amp;serendipity%5Btoken%5D=be11818bd4c28fbb97ee833e628463bf&amp;serendipity%5Baction%5D=&amp;serendipity%5BadminAction%5D=&amp;serendipity%5Bsubpage%5D=%2Fblog%2Fpages%2Fgallery.html&amp;serendipity%5Bonly_path%5D=Weddings%2FEmma_Richard%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bkeywords%5D=&amp;serendipity%5Bonly_path%5D=Parties%2FKath_30%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bkeywords%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.name%5D=&amp;serendipity%5Bfilter%5D%5Bi.authorid%5D=&amp;serendipity%5Bfilter%5D%5Bi.extension%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DPI%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COPYRIGHT%5D=&amp;serendipity%5Bfilter%5D%5Bbp.TITLE%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT1%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT2%5D=&amp;serendipity%5Bfilter%5D%5Bbp.ALT%5D=&amp;serendipity%5Bsortorder%5D%5Border%5D=i.date&amp;serendipity%5Bsortorder%5D%5Bordermode%5D=ASC&amp;serendipity%5Bsortorder%5D%5Bperpage%5D=8&amp;go=+-+Go!+-+">image gallery</a>!</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
        
        <entry>
            <title type="html"><![CDATA[Emma Gets Married]]></title>
            <link href="https://roy.marples.name/blog/posts/emma_gets_married/?utm_source=atom_feed" rel="alternate" type="text/html"  hreflang="en" />
            <id>https://roy.marples.name/blog/posts/emma_gets_married/</id>
            
            <published>2003-11-01T08:57:00+00:00</published>
            <updated>2003-11-01T08:57:00+00:00</updated>
            
            
            <content type="html"><![CDATA[<!-- s9ymdb:99--><img class="serendipity_image_left" width="83" height="110"  src="/blog/uploads/Weddings/Emma_Richard/IMG_0438-1200x1600.serendipityThumb.jpeg"  alt="" />
<!-- s9ymdb:101--><img class="serendipity_image_right" width="83" height="110"  src="/blog/uploads/Weddings/Emma_Richard/IMG_0439-1200x1600.serendipityThumb.jpeg"  alt="" />
<p>Well, Emma Pitt finally became Emma Hatton- you can find pictures of Emma getting married to Richard in the <a href="http://roy.marples.name/blog/pages/gallery.html?serendipity%5Btoken%5D=be11818bd4c28fbb97ee833e628463bf&amp;serendipity%5Baction%5D=&amp;serendipity%5BadminAction%5D=&amp;serendipity%5Bsubpage%5D=%2Fblog%2Fpages%2Fgallery.html&amp;serendipity%5Bonly_path%5D=Weddings%2FEmma_Richard%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bonly_path%5D=Weddings%2FEmma_Richard%2F&amp;serendipity%5Bonly_filename%5D=&amp;serendipity%5Bkeywords%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.date%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.name%5D=&amp;serendipity%5Bfilter%5D%5Bi.authorid%5D=&amp;serendipity%5Bfilter%5D%5Bi.extension%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.size%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_width%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bi.dimensions_height%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DPI%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.RUN_LENGTH%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bfrom%5D=&amp;serendipity%5Bfilter%5D%5Bbp.DATE%5D%5Bto%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COPYRIGHT%5D=&amp;serendipity%5Bfilter%5D%5Bbp.TITLE%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT1%5D=&amp;serendipity%5Bfilter%5D%5Bbp.COMMENT2%5D=&amp;serendipity%5Bfilter%5D%5Bbp.ALT%5D=&amp;serendipity%5Bsortorder%5D%5Border%5D=i.date&amp;serendipity%5Bsortorder%5D%5Bordermode%5D=ASC&amp;serendipity%5Bsortorder%5D%5Bperpage%5D=8&amp;go=+-+Go!+-+">image gallery</a>- which has been slightly re-arranged. I&rsquo;ve known Emma since she was about 6 months old and I wish her a very happy marriage to Richard :)</p>
<p>And yes, Kat had to wear a dress for the first time in years as she was a bridesmaid! Bless :lol:</p>
<p>If anyone knows how to use the anti red-eye function on a Canon IXUS 330 then please let me know as the manual instructions don&rsquo;t appear to work! Also if anyone knows how to do a manual focus as well- by all means let me know.</p>
]]></content>
            
                 
                    
                         
                        
                            
                             
                                <category scheme="https://roy.marples.name/blog/tags/life" term="life" label="life" />
                            
                        
                    
                
            
        </entry>
    
</feed>
