mike watkins dot ca : Entries tagged with “Freebsd”

Entries tagged with “Freebsd”

June 14 2009

It's Alive

Gosh, has it been three months since I posted last? House renos are coming along, but it only gets worse from here before it gets better. We'll be cooking on the patio soon enough.

Semi-random tech link of the day: FreeBSD ports now default to Python 2.6. Yay. You could always force FreeBSD to use a specific Python version -- edit /etc/make.conf and add the line PYTHON_DEFAULT_VERSION=python2.6 or whatever version you like.

I smell a skunk nearby. No, really, they like to walk down the sidewalk past my office window. Unpleasant, but not nearly as bad as having them spray the house. And this leads me to the skunk control tip of the day: do not try to dissuade two skunks from fighting at 2am in the morning below your kitchen window by throwing water at them.

March 10 2009

Time to Move, Random Observations

Looking Forward To Python 3

In my tech feed today I noted Thomas Guest sticking to his new year commitment to publish Python 3.x compatible code examples. I hope this becomes something of a meme and becomes more and more common in the pythonosphere.

On The Move

I'm decommissioning an older server I have co-located in New Jersey so over the next week or so I'll be moving my non-commercial sites and applications to a Virtual Private Server (VPS). I'm hoping to deploy all apps on the VPS using >= Python 3.1 (alpha, beta, released) alone.

Thanks to QP having already been released on Python 3 this won't be terribly difficult although as most of the applications are document centric, a workaround for docutils is inevitable for the time being as much of the content on the pro bono sites and applications I host lives in ReST format.

Markdown (the freewisdom.org version, not the ActiveState produced markdown2 code) on the other hand is already more or less serviceable under Python 3 after some 2to3 incantations.

Debian != FreeBSD but ~ Enough

After many years of running a FreeBSD-only shop at home and at work this move has more or less forced me to gain some deeper Linux knowledge. In this case I elected to have the VPS decked out with Debian 5.

While it is refreshing to explore a new OS environment just to see the differences, I do miss FreeBSD on the box, particularly the FreeBSD ports system, and I'll no doubt continue to trip on on the file system hier differences but I'll live I guess.

One aspect of running a VPS as opposed to a dedicated server is that you tend to need to be more circumspect about RAM usage. The default install of bind9 consumed a huge amount of ram which for what the VPS needs to deliver is just plain silly. So a query for "python bind alternative" drove me to choose another name daemon.

MaraDNS turns out to be a nicely lightweight authoritative and recursive DNS that uses far less machine resources than bind does. It seems to be a good alternative for a box which needs to serve up a few dozen or hundred records rather than tens of thousands, and it might even be a good choice for the latter too.

The config file uses Python syntax but that's as far as the Python "integration" goes. I like its "template" and "default" approach; I had a fairly swift looking bind setup which used include files but the MaraDNS config is even simpler - one template file serves all. Nice.

December 04 2008

Python 3 System Side Effects

Heads up to package maintainers and Unix/Linux users: Depending on your system's package system you may run into problems like this build problem on FreeBSD, should you make Python 3 your base install of Python:

$ portmaster -B firefox3
 |snip|
 /usr/local/bin/python ../toolkit/xre/make-platformini.py --print-buildid > buildid
   File "../toolkit/xre/make-platformini.py", line 15
     print datetime.now().strftime('%Y%m%d%H')
                  ^
 SyntaxError: invalid syntax
 gmake[3]: *** [export] Error 1
 gmake[3]: Leaving directory `/usr/ports/www/firefox3/work/mozilla/config'
 gmake[2]: *** [export_tier_base] Error 2
 gmake[2]: Leaving directory `/usr/ports/www/firefox3/work/mozilla'
 gmake[1]: *** [tier_base] Error 2
 gmake[1]: Leaving directory `/usr/ports/www/firefox3/work/mozilla'
 gmake: *** [default] Error 2
 *** Error code 2

 Stop in /usr/ports/www/firefox3.
 *** Error code 1

I must admit I'd not thought of FreeBSD's ports system as being vulnerable to Python 3 changes, but of course "scripting" languages like Python (and Ruby and Perl and ...) are heavily used by thousands of package distributions.

The simple fix: Keep the 2.x line of Python on yours systems... ../bin/python will just have to point to 2.x for the time being.