revdep-rebuild and library cleanup mess

I got tired of doing it by hand, so I wrote a somewhat simple script to do it for me. usage is:./lib_cleanup.sh libnspr4.so.6 libplc4.so.6 libplds4.so.6 libcrypto.so.0.9.7

b2evo sucks for trying to inline a script so see this link for the script.

***WARNING: THIS CODE MIGHT EAT YOUR SYSTEM, KILL YOUR DOG, AND MAKE YOU IMPOTENT. YOU HAVE BEEN WARNED***

This one goes out to the RIAA

(This is not a test of the Emergency Broadcast System. This is the real thing)

Kick back watch it crumble
See the drowning, watch the fall
I feel just terrible about it
That’s sarcasm, let it burn

I’m gonna make a toast when it falls apart
I’m gonna raise my glass above my heart
Then someone shouts “That’s what they get!”

For all the years of hit and run
For all the piss broke bands on VH1
Where did all, their money go?
Don’t we all know

Parasitic music industry
As it destroys itself
We’ll show them how it’s supposed to be

Music written from devotion
Not ambition, not for fame
Zero people are exploited
There are no tricks, up our sleeve

Gonna fight against the mass appeal
We’re gonna kill the 7 record deal
Make records that have more than one good song
The dinosaurs will slowly die
And I do believe no one will cry
I’m just fucking glad I’m gonna be
There to watch the fall

Prehistoric music industry
Three feet in la brea tar
Extinction never felt so good

If you think anyone would feel badly
You are sadly, mistaken
The time has come for evolution
Fuck collusion, kill the five

Whatever happened to the handshake?
Whatever happened to deals no-one would break?
What happened to integrity?
It’s still there it always was
For playing music just because
A million reasons why

(All) dinosaurs will die
(All) dinosaurs will die
(All) dinosaurs will die

credit to http://www.plyrics.com/lyrics/nofx/dinosaurswilldie.html

Local mirror inactivity got you down?

Then use SLP!

I setup my home network with openslp and wrote a little script that writes a script for portage to execute. The concept goes a little like this:

You run a local rsync/distfile mirror. You have clients that want to use emerge and you don’t want it to suck up your bandwidth. Tell them to use your local services like this:

Server side:
emerge openslp

edit /etc/slp.reg so it looks like the following:

service:portage.rsync://192.168.1.1/gentoo-portage,en,65535
description=Gentoo Portage rsync tree
service:portage.http://192.168.1.1/distfiles,en,65535
description=Gentoo Portage distfiles mirror
(yes I know I shouldn’t have a /distfiles at the end of the URL, but I messed up my apache config and am too lazy to change it)

now do /etc/init.d/slpd start and you’re done with the server!

Client side:
emerge openslp

Using your favorite editor, create /usr/local/bin/portage-slp-services (or some other suitable location for a file to execute when a network device comes up) and add the following:

#!/bin/bash
PORTAGE_SOURCE_FILE=/etc/portage-slp.sh
rm ${PORTAGE_SOURCE_FILE}
touch ${PORTAGE_SOURCE_FILE}
SLP_SYNC=$(slptool findsrvs service:portage.rsync | sed -r -e 's/service:portage.(.*),(.*)/\1/g')
SLP_HTTP=$(slptool findsrvs service:portage.http | sed -r -e 's/service:portage.(.*),(.*)/\1/g')
SYNC=${SLP_SYNC}
GENTOO_MIRRORS="${SLP_HTTP} $(portageq gentoo_mirrors)"
echo "SYNC=${SYNC}" > ${PORTAGE_SOURCE_FILE}
echo "GENTOO_MIRRORS=\"${GENTOO_MIRRORS}\"" >> ${PORTAGE_SOURCE_FILE}

Then edit /etc/make.conf and add source /etc/portage-slp.sh to the end.

Finally, edit /etc/conf.d/net and add the following:

postup() {
/usr/local/bin/portage-slp-services
}

and you’re done!

do a touch /etc/portage-slp.sh the first time so portageq doesn’t barf(it barfs when trying to source a non-existent file) and restart your network device. You should find that you’ll use your local mirrors first if found when the network device came up.

There is one security concern: At this moment, we assume that whoever publishes a slp record is honest, there is no checking. until we have tree signing in place, you can use gpg to sign the slp record and then verify it on the client, both that the record is correct and signed by someone you trust.

That’s it for now, keep tuned for more developments!

EFIKA fun

So I received my EFIKA board last week. My project was supposed to be to integrate the opencores wishbone bus interface to the efika, but that requires a FPGA on board. This batch of the boards doesn’t have one, though there is a “prototype” area where I think one was meant to go. This means I can’t really do my project, as I’m left working through slow i2c or complex PCI.

All is not lost however. I won’t be lame and do nothing with the board. I’ve ordered a bunch of stuff for a new project(about $200 USD worth) a 40G HDD, passive pci riser, picoATX PSU(DC-DC, 60W), and a intel PRO/1000 PCI ethernet adapter.

What am I going to do with all this you might ask? I’m going to try to turn the EFIKA into a iSCSI target. The board isn’t really designed for it, but it’ll do for a prototype. I’ll soon buy some LiPol(Lithium Polymer) batteries and build a battery circuit for the board, probably interfacing to the i2c bus. I plan on stuffing all of this into a case the size of a small 5.25″ external bay.

For those of you who don’t know, iSCSI is a way to send/receive scsi commands via ethernet. I call it poor mans Fibre Channel. I decided to go this route because there is no sub $1000 iscsi target available. If sucessful, this should actually have some market value for small installs that still need some form of shared storage.

After I get a working prototype, I’ll work with the GNAP folks to make a id10t proof install for the board.

Wish me luck!

PePLink 200BG and wifi.google.com

So, not satisified with the free wifi that the apartment provides(it’s only to be used for occasional access), I bought a PePLink CPE device, recommended by google. This a ARM9 SBC with a 200mW 802.11b/g radio and a 5dbi antenna. Google caps your link at 1M/1M, but it’s really a reasonable speed, considering it’s free. A one time payment of $180(I paid more than I had to to pick one up locally) to bring the signal indoors is well worth it IMO. Testing at all the popular sites shows me at 960k/930k. I’m debating purchasing a higher gain antenna just for stabilities sake.

Now for the bad news on all of this. The PePLink device runs linux(no, this isn’t bad), but it seems they violate the GPL license. I can’t find the source code or a written offer anywhere on their website or in the support CD provided. I also cannot find a copy of the GPL license text anywhere in the mentioned areas.

I find this quite odd as peplink has openly supported linux in the past. They were a supporter of FOSDEM in bruxelles back in 2005. A quick google search returns lots of articles regarding peplink and OSS. Even some of the PR material they use mentions linux.

I suspect this is merely an oversight by the company(perhaps a www redesign?) and not a blatent misuse of GPL code. I’ll be emailing their business development department in the next couple of days to point out the possible license violation and ask where I can find the source. I’ll blog as I receive more information.

For the record, this is some info that I extracted from the kernel in the firmware image:


Linux
(none)
2.4.24-rmk2
#492 Fri Dec 2 13:03:43 HKT 2005

cpu fun

While looking at options 2.6.18 provided, I came across cpu “hotplug”, where one can turn on/off CPUs on the fly. On my workstation(dual opteron 248) I enabled CONFIG_HOTPLUG_CPU and rebooted. A simple # echo 0 > /sys/devices/system/cpu/cpu1/online and /proc/cpuinfo only shows one processor. This showed up in dmesg:

CPU 1 is now offline
SMP alternatives: switching to UP code

After # echo 1 > /sys/devices/system/cpu/cpu1/online /proc/cpuinfo shows both CPUs and dmesg contains this:

SMP alternatives: switching to SMP code
Booting processor 1/2 APIC 0x1
Initializing CPU#1
Calibrating delay using timer specific routine.. 4410.23 BogoMIPS (lpj=22051180)
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
CPU 1/1 -> Node 0
AMD Opteron(tm) Processor 248 stepping 0a
CPU 1: Syncing TSC to CPU 0.
CPU 1: synchronized TSC with CPU 0 (last diff 2 cycles, maxerr 821 cycles)

This makes me wonder “how much” the CPU is shut down… I wonder if this could be used as some sort of power management for SMP systems.

Time to find a ammeter….

Begining of the end

After watching people fight some more in #gentoo-dev this afternoon, the question “Why the fuck do I bother to waste my time with a distribution that only wastes my time?” popped into my mind. I haven’t been able to find an answer yet. Sadly, this indicates the beginning of the end for me. I’m losing interest in anything gentoo at a fast rate. Just the thought of reading public gentoo mailing lists makes me physically ill. I want to vomit.

I still believe that most gentoo developers are good people. There are a lot of examples that can be pointed to to show that teamwork really does work. Unfortunately, people are now using trolling tactics to push their agenda. The recent “Paludis and Profiles” thread on the gentoo-dev mailing list is a perfect example.

So, to my fellow gentoo devs, I have the following 2 things to say:
1. Grow up. Fighting never solves anything.
2. Speak out about what you think is wrong. Don’t allow others to bully you around into accepting something that you don’t think is best for gentoo. You won’t always win your argument, but in the end gentoo will be a better place.