Archive

Archive for the ‘gentoo’ Category

The Week That Would Not Stop

September 14th, 2006

Bleah. Totally run down. Stressed out, burned out, and all-around fried. But still clinging desperately to life in the hopes that it might all settle down at some point. (It has to settle down, right?)

Thanks to a bumper crop of ragweed, I have spent the last two weeks wanting to claw my eyes out. Puffy. Sore. Goopy. Crusted over when I wake up. I feel like someone has scraped sandpaper over my corneas. I feel like I haven’t slept since the allergies really kicked in.

Work is a super giant happy fun ball of stress as I attempt to coordinate a lot of last-minute things, deal with incomprehensible bug reports, and generally attempt to save the world. So far… meh… I think the world’s still in trouble. It’s taken me until today to start working on the things I was supposed to be doing on Monday. I guess it would help if I could get more than five minutes of uninterrupted time, but apparently that’s out of the question at this point. *sigh*

I’m way behind on dealing with some vaguely important email for Clepy. I have had a tiff with DirecTV over their habit of failing to send me a bill and then charging me lots of late fees. (Surprisingly, not the first time they’ve done that to me…)

And it doesn’t help that I’ve had things to do every night this week: Clepy (and post-Clepy festivities) on Monday, wine group Tuesday, German class Wednesday, and an appointment tonight. Tomorrow, I expect I’ll probably just stay late at work, except that the parts for the new closet organizer system thing have arrived and I want to get started on that too.

Good lord, it’s Thursday, and I still haven’t picked up the new Star Wars DVD’s, with the Han-shoots-first-thank-you-very-much original cut. For those that know me, that should give you an indication of what a general shitstorm it’s been lately.

On the plus side, I finished The Confusion over Labor Day weekend. On the minus side, I still have about a thousand pages (hardback!) of The System of the World still to go… by which point I suspect that I will need to re-read Cryptonomicon since it has enough bits that tie in with the other books. It’d be easier if my eyes didn’t feel like they were about to explode out of my head (see above).

…And I think I might have finally hit the point where Gentoo in particular, and Linux in general, is dead to me, the way someone who crosses Tony Soprano ends up in the deli slicer, or taken out to the Pine Barrens and disappeared. Midway through my third (fourth?) day of trying to get the emerge -eav world step of the upgrade to gcc-4.1, I am just about at the end of my geek rope. I fell in love with Gentoo because its packaging and update system “just worked”, freeing me up to waste my time configuring and tweaking everything else to be just so. But this update is just insultingly murderous, as all kinds of supposedly stable things just won’t fucking build right–because, y’know, that would be too easy. So, even if I have to turn in my geek badge and live life as a lesser mortal, beholden to the software update whims of Apple, I think that’d be okay with me, because this kind of time-waste is something I simply cannot allow in my life any longer.

Grr. Argh!

books, clepy, computers, geekery, gentoo, health, house, life, linux, naughty-words, rants, work

Hibernating Penguins

November 7th, 2005

Partly because I don’t want to lose these links, and partly because David Stanek wanted some advice on getting his Gentoo boxen to hibernate… Here are the two most useful links that I came across, which got me working without any troubles:

Most important for me with my ThinkPad’s clock drift issues was to make sure to set SaveClock yes. This means I don’t have to use rdate or ntp to fix the time after reawakening, which is problematic if there’s no Internet access handy at the time.

Since my ThinkPad doesn’t support ACPI, I whipped up a simple script to use APM to monitor my battery charge and automatically hibernate once the charge drops below a given threshold. On my laptop, I put it in /usr/local/bin/autohibernate.py and added it to my /etc/conf.d/local.start so that it automatically kicks off as soon as I boot up.

So, there you go, Dave! Hope that helps!

geekery, gentoo, links, linux

In Which Apache Reverse Proxies for Twisted Running MoinMoin

October 2nd, 2005

I’m posting this more to remember how the heck I got it working than to be any sort of definitive reference. But some folks might find it useful…

In /etc/portage/package.keywords:

www-apps/moinmoin ~x86
www-apache/mod_proxy_html ~x86
dev-libs/libxml2 ~x86

Emerge stuff:

emerge apache2
emerge moinmoin
emerge libxml2
emerge mod_proxy_html
emerge twisted

Read a bit of Apache Week’s excellent and helpful article on running a reverse proxy on Apache. Admire its usefulness.

In /etc/conf.d/apache2:

APACHE2_OPTS="-D PROXY"

(plus whatever you would have had otherwise)

In /etc/apache2/httpd.conf:

<IfDefine PROXY>
    LoadModule proxy_module                  modules/mod_proxy.so
    LoadModule proxy_connect_module          modules/mod_proxy_connect.so
    LoadModule proxy_ftp_module              modules/mod_proxy_ftp.so
    LoadModule proxy_http_module             modules/mod_proxy_http.so
    LoadFile   /usr/lib/libxml2.so
    LoadModule proxy_html_module             modules/mod_proxy_html.so
</IfDefine>

In /etc/apache2/vhosts.d/20_wiki.domain.com.conf:

<VirtualHost *:80>
    ProxyPass / http://localhost:8081/
    ServerName wiki.domain.com
</VirtualHost>

I chose to run the twisted server on 8081 because I want to play with TurboGears in the coming days, and its standalone server likes to run on 8080 by default, which is also where twistd wants to run by default. I’d rather have the next “new guy” running on its default as I play with it; that should make life slightly easier.

Follow instructions on creating a wiki instance.

Follow instructions on running Moin behind a Twisted server. Edit the mointwisted.py to have the twistd server listen on the port specified in the file in vhosts.d (in this case 8081).

Drop a nice little init.d script into /etc/init.d/mywiki:

#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: $

depend() {
        after net
}

start() {
        ebegin "Starting MyWiki (twistd)"
        /usr/share/moin/mywiki/mointwisted start
        eend $? "Failed to start MyWiki (twistd)"
}

stop() {
        ebegin "Stopping MyWiki (twistd)"
        /usr/share/moin/mywiki/mointwisted stop
        eend $? "Failed to stop MyWiki (twistd)"
}

Fire up the twistd server using the init.d script; connect to http://localhost:8081/ to verify that the wiki itself is running. Fire up apache and connect to http://wiki.domain.com/ to verify that the reverse proxy magic is happening correctly.

Rejoice!

geekery, gentoo, linux, python

All the King’s Horses

September 25th, 2005

I’m slowly but surely getting my main home Gentoo box back in order after deciding to blow it away and reinstall last weekend. I had been running an amd64-native environment for about a year, and along the way I had gotten really tired of all the packages that weren’t available, didn’t work right, and things that were outright unsupported–like any sort of 3D acceleration for my video card whatsoever, though I will grant that it was my fault for not taking 64-bit into account when checking hardware compatibility.

I’ve managed to get most things working again, plus a few things that I hadn’t managed to win the battle with before:

  • Mostly stable kernel–needs some small tweaks but mostly solid
  • Onboard gigabit ethernet (yay)
  • X with honest-to-goodness hardware acceleration, GL, all manner of goodness
  • A comfortable Fluxbox/ROX desktop setup
  • Automated rsync of iTunes library from my iMac to the Gentoo box; 36 GB later, all is happy
  • SlimServer, so that the house is again filled with music
  • Apache (required figuring out the Gentoo Apache maintainers’ latest round of WTF)
  • Internal dev & staging environments for pirnat.com
  • photos.pirnat.com is alive again
  • PHP iCalendar installed and running again to provide personal calendar service
  • …which means WebDAV is back too, so that Liz and I (and my folks) can all publish our calendars to each other again
  • emergeminion, my silly little emerge --sync && emerge -upv world script that mails me every morning with stuff that needs to be updated, is finally able to send mail again
  • Python 2.4.1, so that I can start catching up on some of the more recent additions to the language

I still need to futz around with:

  • Framebuffer/bootsplash
  • Onboard sound — almost working
  • MoinMoin — to start rebuilding my wine wiki, as I managed to lose it all when I incorrectly assumed that I had backed up the data
  • TurboGears — to start experimenting with the latest, shiniest thing in Python web app development
  • I could have sworn I wasn’t using 91% of my main disk before I blew away & reinstalled everything… Have to track down where all my space has gone.

Some useful things I picked up along the way (some after much swearing and frustration):

  • Tiger no longer seems to like burning CD’s straight from ISO images. It instead turns them into very lovely ISO-9660/hybrid discs with an ISO on them–aka coasters. Dragon Burn is your friend.
  • The new Gentoo Apache setup for vhosts doesn’t like to have a vhost config that begins with 01_ — for reasons passing understanding, it wanted to always serve up index.cgi as the default resource, even without having index.cgi in the DirectoryIndex directive, and even when there were index.html and index.shtml files that it should have used in preference.
  • If SlimServer doesn’t want to read your iTunes Library.xml file, even if you tell it exactly where it is, turn on debugging. This will cause everything to magically just start working–while it may cause slight embarassment on the SlimDevices mailing list, at least you’ve got all your playlists and music again.
  • A stage3 x86 Gentoo install can really bite your ass when you want to start updating packages if you’ve changed your make.conf to use a more appropriate march setting. You will have all manner of issues with things wanting to use a gcc that you never even had on your box, and no amount of fix_libtool_files.sh will save you (though it will help slightly). The trick here is needing to do emerge -e system so that the underlying system gets its act together, and then following it with an emerge -e world. It’s time-consuming, but it gets the job done.
  • sstmp, the default mailer that gets installed when you throw a cron system onto your box, needs a little bit of love before it will actually do anything useful when it comes to talking to the outside world. The particularly important bits are:
    root=your_email@your_isp.com
    mailhub=mail.your_isp.com
    rewriteDomain=your_domain
    hostname=_HOSTNAME_
    FromLineOverride=YES

Once I check a few more things off of the “gosh, I’d really like to take care of that” list, I’ll hopefully free up enough time or energy for something more useful–I’d like to spiff up the look of pirnat.com a bit, dive into some coding, figure out what (if anything) I might (be able to) work with Dave on presenting at PyCon in February…

computers, geekery, gentoo, linux

Reboot Trauma

September 20th, 2005

Like a lot of folks who run Linux, I often go months between reboots. Usually, that makes me feel all spiffy and great, but sometimes it means that I’ve forgotten something important along the way that will bite me when I least expect it to. Today, as you have probably guessed by now, was one of the latter sort.

I use Synergy pretty heavily here at work to share one keyboard and mouse between my Gentoo and WIn2k machines; I absolutely adore it, and it’s been a huge productivity booster for me. At this point, with my current setup, I don’t think I could live without it. However, it does have a small tendency to freak out every now and then, causing your mouse pointer to get lost in the cold, dark ether, and not to reappear without restarting X. Generally it’s not a big deal to fix–I just switch over to a text console and do /etc/init.d/xdm restart and I’m back in business (minus the state of my workspace). Today, though, trying to switch over into console land locked up the whole machine; based on the graphical noise that got introduced to the display when it died, I think the framebuffer may have been upset about things, causing the kernel to disappear in a puff of unhappiness.

I couldn’t ssh into it from Win2k, so my only recourse left was a hard reset. Everything was going swimmingly until I saw this unlikely and ominous message during startup:

/dev/eth0 does not exist!

Now, this Linux box is a P3 450, almost six years old, so at this point I’m starting to be a little concerned about hardware starting to fail, which is something I just don’t have time for this week. Panic started to sink in as I ran down the options of what might be wrong; obviously, the kernel wasn’t seeing my card, but I hadn’t touched the kernel in six months or more. How could it have been working all that time if it wasn’t “right”? What could possibly have changed since my last reboot?

It dawned on me finally that I’d recently gotten the 2005.1 baselayout update. Which had overwritten my /etc/modules.autoload.d/kernel-2.6 file. Which I hadn’t thought was an issue, because I usually compile in everything that I will need on a daily basis. Except, apparently, for my NIC, which for some inexplicable reason had been compiled as a module. I’m sure that, back in February or whenever I rolled it that it seemed like a brilliant idea, but it’s pretty freaking daft in retrospect.

A one-line change later, I am back in business and feeling pretty dumb about the entire thing.

So, kids, today’s lessons are:

  • Be extra careful when you apply a baselayout update
  • If you need a driver all the time, compile it straight into the kernel so that you don’t forget it later on
  • /dev/eth0 does not exist? Check out your /etc/modules.autoload.d/kernel-2.6 file!

geekery, gentoo, linux, psa, work