Author Archive

Using osc build to make a jail on openSUSE

Thursday, March 11th, 2010

Before I start let me say that there may be easier or more direct ways to do this.  This has the advantage of being pretty easy for me to do.  I’m not going to discuss why you might want to do this, or what a jail is, etc..

You can get the most recent osc and build tools from the openSUSE:Tools repository.  You will also need an account on the build service.

Create an empty directory
mkdir jail/

Go into that directory and create a dummy RPM .spec file
cd jail/
vim jail.spec

Name:           jail
Version:        0
Release:        0
Summary:        Jail
License:        Jail
Group:          Jail
BuildRequires:  vim gdb glib2-devel zypper
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description

%prep

%build

%install

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)

%changelog

The BuildRequires: tag is where you specify which packages you want installed in your jail, what I have listed there is just an example.

Also create an empty .osc directory (this prevents an ugly bug where the jail tries to delete itself)
mkdir .osc/

You’ll need to be logged in to OBS if you aren’t already
osc ls
Enter your credentials at the prompts

If for some reason that didn’t work you may need to put your password into your .oscrc file
vim ~/.oscrc
Toward the bottom…

[https://api.opensuse.org]
user=<YOUR USERNAME>
pass=<YOUR PASSWORD>

If your password changed you may need to delete any lines that say passx=<GARBAGE>, or manipulate your GNOME Keyring.

Now you should be ready to build a jail

osc build --local-package --root=</path/to/new/jail> --alternative-project=openSUSE:<VERSION> <ARCH>

<VERSION> is, for example, 11.2
<ARCH> is only needed if you want a different arch (i586 on an x86_64 machine)
</path/to/new/jail> is where you want the tool to put your jail (not the directory you’re in!), I use /var/tmp/jail
You may be prompted for your root password
When the jail is built (assuming it worked) it will fail complaining about an empty package, ignore that and get on with your life: you only wanted a jail, not a package.

At this point you can chroot into your jail
sudo chroot /path/to/new/jail
or if you are changing architectures…
sudo linux32 chroot /path/to/new/jail

Yay, you’re done!

Fly-Swatter Cookies

Saturday, October 31st, 2009

Aunt Laurel came over to help us carve pumpkins.  Later we made fly-swatter cookies.

fly-swatter-cookies

They started out as peanut-butter cookies (actually cashew-butter) but rather than press them with a fork as usual Laurel thought we should use this spatula that had square holes.  I observed that they looked like we’d used a fly swatter to press them so we put chocolate-chips as flies.  We had some roasted pumpkin seeds Laurel put on as wings.  Noah suggested we should put licorice for the handle (this would not go well in the oven so we used popsicle sticks).  The wings looked more lively before the oven but the end result looks more like the flies had been swatted.  Delicious.

Wallet Pens

Monday, August 17th, 2009

Long ago I had a Zebra Pocket Pen which I kept in my wallet. Lately I’ve been trying to slim down my pockets so I went looking for another. Unfortunately they were discontinued several years ago. My search for a replacement yielded some interesting results so I thought I’d share.

The Wallet Pen

the-wallet-pen
Apparently this is one of Oprah’s favorite things. Hand made of sterling silver, only 3″ long and with a curious action (press end to open, press tip to close) this is the most expensive option at nearly $50. It gets rave reviews from most users but take that with a grain of salt as people who spend more for something often deceive themselves to justify the expense. That being said I still want it and would gleefully accept a gift of one.

Levenger Walletini

levenger-walletini
Also only 3″ and with a clip very similar to the original wallet pen this one twists to open. Chrome plated instead of silver or stainless steel. The mid-range price of $32 makes me feel like it would make more sense to just get the silver one.

Derringer Wallet Pen

derringer-wallet-pen
4″ long with a stainless steel barrel, this is actually almost identical to the Zebra Pocket Pen and even uses Zebra refills. A cheaper option at only $8 shipped.

Zebra Mini T3

zebra-mini-t3
It turns out Zebra Japan (and Zebra UK, and maybe every region except US?) still sells the pen I used to have. This and the remarkable similarity of the Derringer makes me wonder if there is some kind of licensing deal going on here. I’ve seen them for as little as $5 + shipping.

PicoPad Wallet Notes

picopad-wallet-notes
This is a credit card sized notepad (15 sticky notes) with a tiny pen (really a pen refill with some wings stuck to it). I rarely need a note pad and the pen looks uncomfortable but maybe you feel differently. $3.

Conclusion

I’m quite happy with the Zebra T3. Zebra is well known for quality, the price is fair, and the 4″ barrel fits nicely into my wallet. They also sell a mechanical pencil, the TS3, of the same dimensions.

I still want to own “The Wallet Pen” some day. Please send me one.

Ceiling Fan

Thursday, August 6th, 2009

Cameron came down to help me install our new ceiling fan. We got derailed in a big way but in the end we got it up and reasonably well balanced. I am very happy with the result.

ceiling fan

Update: On a hunch I just discovered that the fan blade that the balancing weight eventually went on was the one exactly opposite the Hunter logo. Yay!

hunter-logo

One of the lame things about buying a ceiling fan is the Energy Star label. Fans are rated for their efficiency in cubic feet per minute per watt. The range goes from 60 or so to around 185. You’d think that the EPA would grant the Energy Star label to fans that have a higher airflow efficiency but instead it’s granted only to fans that use compact-fluorescent lighting. Way to go EPA!

This reminds me of when Australia outlawed incandescent bulbs. Regulations ought to make sense. Instead of “no incandescents” the regulations should state “must produce at least n lumens per watt”. Then if someone comes up with an incandescent bulb that’s more efficient than CFLs we won’t have to go to congress to get permission to buy one.

Trans Plant

Sunday, August 2nd, 2009

This weekend, in preparation for paving that obnoxious strip of would-be grass between the sidewalk and the street, I worked myself silly to get that area cleared.

cleared strip

This means I finally put the rest of the roadbase gravel into the garden and put the fence back together. No veggies this year, sorry. Hopefully next year some peppers, tomatoes, cucumbers, and maybe some garlic or something. Yellow squash may go in the front flower bed like we planned this year (but didn’t).

empty garden

And I transplanted the irises. This was really a lot of work and we can only hope that they’ll survive the ordeal. I think I did just barely. Since I assumed they wouldn’t enjoy being out of the soil for two or more days I worked late into the night thinning them into their new home.

irises in wheelbarrow

I am profoundly weary today but very satisfied with all we got done over the weekend. We even got to enjoy a delicious lunch with the Hughes’ at Saigon. Oh, and we bought us a ceiling fan for our bedroom. More on that when it’s installed (gotta gripe about “energy star”).

Mono Appliance for VirtualPC

Thursday, July 2nd, 2009

With the release of Mono 2.4.2 we are introducing an appliance image for Virtual PC. This makes a lot of sense for Mono as one of our favorite target user groups is .NET developers looking to get an application running on Linux. Many of these developers use Virtual PC.

All three of our appliance images (LiveCD, VMware, and now VirtualPC) contain exactly the same packages, etc. In fact our .vhd is actually just the .vmdk from the VMware appliance built in SUSE Studio and converted using qemu-img (requires a recent version, possibly unreleased). And actually the .vmdk we provide boots just fine under other VMs such as QEMU and VirtualBox. Linux can be nice that way.

We hope this will make Mono even easier for .NET developers to use but you may want to use VMware anyway.  The VirtualPC appliance has some problems:

  • There are no “VM Additions”.  They exist but they are not open source and IIRC the ones that exist don’t work on a recent Linux. So no handy stuff like drag-and-drop or mouse-in-mouse-out.
  • Things can be a bit slow / choppy at times.  This clears up after a while or maybe after a reboot.  Not sure what’s going on there.
  • We added some kernel parameters to make things run a little better: noreplace-paravirt i8042.noloop clock=pit. Joseph Hill dug these up on the Internet somewhere.
  • On the new Windows Virtual PC (the one for Windows 7) you don’t get a network device by default.  As far as I can tell we’re the only project shipping a .vmc configuration file with our .vhd anyway so the expectation seems to be that you will configure your own VM.

Find this and other fine Mono products at http://go-mono.com/mono-downloads/.

Grandstream HandyTone 503

Thursday, June 18th, 2009

My current SIP ATA is the HT503 from GrandStream. I bought it because if I’m going to use VoIP at all at home I need to have a reliable fallback, at least until all my ducks (ISP, router, QoS, ATA, etc.) are in a row. And realistically I’m probably going to be paying huge monthly fees to Qwest for nothing but local phone service for the rest of my life.

ht503

The HT503 has an FXS and an FXO so that it sits between our phones and our land-line. This means I can pick up the phone and place a call on the public switched telephone network (PSTN) or on the Internet depending on how I dial. It also means that calls coming in from the Internet or the PSTN all ring the same phones. Thus I can try VoIP (and get my wife to try it) without disrupting our lives. (It can also do fun things like let me call in from the Internet and place a local call on my land-line but I don’t use those features.)

The dark side to this story is that my first HT503 completely failed it’s firmware upgrade and would not boot at all. Two more shipping charges later I had another HT503 which I upgraded far more carefully. Why would any embedded device not have some fail-safe recovery method? Dunno.

To add insult to injury when I finally got the new device configured I found that it would not dial on the PSTN reliably. I tried to tweak settings to get it working but I failed and had to pull the plug. Months later I saw that there had been many firmware revisions since my last try so with renewed confidence I upgraded and tried again. Sadly I got the same result: when I’d dial a ten-digit phone number I would get a message from Qwest that I had dialed wrong.

It turns out this was actually my fault (sort of). Recently central Utah was moved to ten-digit dialing to accommodate a new area code they decided to overlay on the same region. I decided it would be nice to have the device do the right thing when a seven-digit number was dialed, so I programmed the dial-plan to add 801 to the front of any seven-digit number. It turns out, though, that GrandStream dial-plans are not interpreted the way I thought they were. For some reason when I dialed a ten-digit number the device would truncate the number and slap 801 on the front resulting in a new, wrong, ten-digit number (801-801-5550 if I dialed 801-555-0123). I still don’t know how to write the correct dial-plan for this. After dropping the seven-digit rule everything works.

Actually there was one more brief problem where an incoming PSTN call would ring but when the person answering the call picked up they would hear a busy tone and the caller would continue to hear ringing. That problem went away. I’m not sure if I did something to fix it. When the HT503 makes a connection between it’s FXO and it’s FXS it does so by having the one port call the other on the local loopback interface. The answer to this mystery may be in that architecture somewhere. One thing it means is that if you select a lossy codec for both interfaces it seems to actually encode and decode the audio even though it’s on the same device.

Overall I’m actually going to hazard recommending this device. It’s compact, affordable, full of great features, and so far (apart from my own mistakes) has been very reliable.