Search Results: "tar"

10 February 2009

Francois Marier: Starting a Free Software project

Getting started with a Free Software project and making it available to the community can be confusing for first-time software authors. However there are a couple of things worth knowing that will help you attract more users and increase the likelihood that your software will be part of a Free Software distribution like Debian.
Idea, Name and LicenseAt the core, a Free Software project starts with an idea. It's the reason why you wrote the software in the first place. Where this becomes interesting is when your think that your software could be useful to others. That's when you should think about sharing your code.

Of course, one of the very first decisions you'll need to make is to name your project. This is of course a very personal decision, but if you're struggling to find something exciting and trendy, consider choosing something that:
Another choice you will need to make before your first release is the license. While that topic may not be familiar or interesting to you, I highly recommend that you carefully consider your options since your license choice can influence the type of community that will form around your project.
Public ReleaseMaking your project publicly available can be as simple as dropping a tarball on a mailing list. However, if you want your project to reach all of the users for which it could be useful, there are a few other things you might want to do.

One of these things is to provide a digital home for your project. That homepage should provide access to all of the services related to your project. Such services usually include source control, bug tracking, mailing list and file areas. I've got some ideas about what that homepage should contain later but first things first, let's look at what that tarball should contain.
Tarball ContentsMost people downloading your source code will either be end-users or
distribution maintainers. Here's what they will be looking for:This is pretty much the minimum that you need to provide in order for your code release to be useful to others and to be legally distributed by others. There are a few more things that you should think about if you would like to increase the likelihood that your software will be included in a Free Software distribution.

After putting all of this together, you should be ready for the initial public release of your project and will now be moving to the next phase: supporting your growing community.

John Goerzen: Review: Video Editing Software

We recently bought a Canon Vixia HG20 camcorder. The HG20 records in AVCHD format (MPEG-4 h.264) at up to 1920 1080. To get from the camcorder to a DVD (or something we can upload to the web), I need some sort of video editing software. This lets me trim out the boring bits, encode the video for DVD, etc. Background In addition to DVD creation and web uploading, I want the ability to burn high-definition video discs. 1920 1080 is significantly higher resolution than you get from a DVD. There are two main ways to go: a blu-ray format disc, or an AVCHD disc. A blu-ray disc has to be burned onto BD-R media, which costs about $5 each, using a blu-ray burner, which costs about $200. AVCHD discs use the same h.264 encoding that the camcorder does, meaning they have better compression and can be burned onto regular DVD+R media, fitting about 30 minutes onto a DVD. Moreover, it is possible to move AVCHD files directly from a camcorder to an AVCHD disc without re-encoding, resulting in higher quality and lower playing time. The nicer blu-ray players, such as the PS3, can play AVCHD discs. AVCHD seems pretty clearly the direction the industry is moving. Compared to the tape-based HDV, ACVHD has higher quality with lower bitrates, better resolution, and much greater convenience. Hard disk or SD-based AVCHD camcorders are pretty competitive in terms of price by now too, often cheaper than tape-based ones. The downside of AVCHD is that it takes more CPU power to process. Though as video tasks are often done in batch, that wouldn t have to be a huge downside. The bigger problem is that, though all the major video editing software claims to support AVCHD, nobody really supports it well yet. The Contenders Back when I got my first camcorder in about 2001 the one that I m replacing now you pretty much had to have a Mac to do any sort of reasonable consumer or prosumer-level video editing. We bought our first iMac back then to work with that, and it did work well with the MiniDV camera. Today, there s a lot more competition out there. The Mac software stack has not really maintained its lead some would even say that it s regressed and the extremely high cost of buying a Mac capable of working with AVCHD, plus Final Cut Express, makes that option completely out of the question for me. It would be roughly $2500. Nobody really supports AVCHD well yet, even on the Mac. Although most programs advertise support of smart rendering a technique that lets the software merely copy unchanged footage when outputting to the same format as the input none of them have smart rendering that actually works with AVCHD source material. Though this fact is never documented, though discussed on forums. Another annoyance, having used Final Cut Express in the past, is that with these programs you can t just go to the timeline and say delete everything between 1:35 and 3:52 ; you have to go in and split up clips, then select and delete them. They seem to be way too concerned about dealing with individual clips. I briefly used Cinelerra on Linux to do some video editing. It s a very powerful program, but geared at people that are far more immersed in video editing than I. For my needs, it didn t have enough automation and crashed too much and that was with MiniDV footage. It apparently does support AVCHD, but I haven t tried it. I ve tried three programs and considered trying a fourth. Here are my experiences: Ulead/Corel VideoStudio Pro X2 Commonly referenced as the go to program for video editing on Windows, I started with downloading the Free Trial of it from Corel. Corel claims that the free trial is full-featured all over on their website, but I could tell almost instantly that it wasn t. I wound up buying the full version, which came to about $65 after various discounts. I wanted to like this program. Its output options include AVCHD disc, Blu-ray disc, DVD+R, and the like. Its input options include MiniDV, AVCHD, ripping from DVD, ripping from Bluray, and just about every other format you can think of. And it heavily advertised proxy editing , designed to let you edit a scaled-down version of AVCHD video with a low-CPU machine, but refer back to the original high-quality footage for the output. It didn t pan out that way. The biggest problem was the constant crashing. I really do mean constant. It probably crashed on me two dozen times in an hour. If you are thinking that means that it crashes pretty much as soon as I can get it re-opened, you d be correct. Click the Play button and it hangs. Click a clip and it hangs. Do anything and it hangs. It did seem to work better with the parts of the source that had been converted to a low-res version with Smart Proxy, though it didn t eliminate the hangs, just reduced them. And every time I d have to End Task, it would forget what it had already converted via Smart Proxy even if I had recently saved the project and have to start over from scratch. I spent some time trying to figure out why it always thought my project was 720 480 even when it was 1920 1080, and why the project properties box didn t even have an option for 1920 1080. After some forum searching, it turns out that the project properties box is totally irrelevant to the program. Yay for good design, anyone? VideoStudio Pro X2 does have good output options, allowing combination of multiple source files onto a single DVD or AVCHD disc as separate titles. Unfortunately, its DVD/AVCHD rendering process also yes hangs more often than not. The documentation for VideoStudio Pro X2 is of the useless variety. It s the sort of thing that feels like it s saying The trim tool is for trimming your clips without telling you what trimming your clips means, or making it obvious how to remove material from the middle of a clip. The proxy editing feature isn t what it should be either. Instead of being something that just automatically happens and Works in the background, you have to manage its queue in the foreground and it forgets what it was doing whenever the program hangs. On the rare occasion when pressing Play did not cause a hang, the AVCHD footage played back at about 0.5fps far, far worse than PowerDirector manages on the same machine. Bits that had been rendered for proxy editing did appear to play at full framerate. I have applied for a refund for this purchase from Corel under their 30-day return policy, and have already uninstalled it from my disk. What a waste. CyberLink PowerDirector 7 Ultra This was the second program I tried, and the one I eventually bought. Its feature set is not quite as nice as Corel s, especially when it comes to versatility of output options. On the other hand, it feels done. It only crashed two or three times on me apparently that s GOOD on Windows? Things just worked. It appears to have proxy editing support, but it is completely transparent and plays back with a decent framerate even without it. It can output to AVCHD, Bluray, and DVD, though smart rendering doesn t work with AVCHD source material. Its weakness compared to the Corel package is that it doesn t have as many options for formatting these discs. You can have only one title on a disc, though you can have many chapters. You have some, but not much, control over compression parameters. The same goes for exporting files for upload to the web or saving on your disk. The documentation is polished and useful for the basics, though not extensive. Overall, this package works, supports all the basics I wanted from it, so I m using it for now. Adobe Premiere Elements 7 I downloaded the trial of this one too. I opened it up, and up popped a dialog box asking what resolution my project would be, interlacing settings, etc. I thought YES now that s the kind of program I want. As I tried out the interface, I kept thinking the same. This was a program not just for newbies, but for people that wanted a bit more control. Until it came to the question of output. Premiere Elements 7 was the only package I looked at that had no option to burn an AVCHD disc. DVD or Blu-ray only. That s a deal-breaker for me. There s no excuse for a program in this price range to not support the only affordable HD disc option out there. So I didn t investigate very much farther. Another annoying thing is that Adobe seems to treat all of their software as a commercial. I m a user, not an audience, dammit. I do not want to buy some photoshop.net subscription when I buy a video editing program. I do not want to see ads for stuff when I m reading PDFs. LEAVE ME ALONE, ADOBE. I just felt sleazy even giving them my email address, let alone installing the program on my system. I think I will feel like a better person once I reboot into Windows and wipe it off my system. Pinnacle Studio 12 Another program that comes highly rated. But I never installed it because its minimum system requirements state that it needs an Intel Core 2 Quad 2.66GHz or higher for 1920 1080 AVCHD editing. And I have only a Core 2 Duo 2.66GHz half the computing horsepower that it wants. And since they offer no free trial, I didn t bother even trying it, especially since PowerDirector got by fine with my CPU. Conclusions This seems to be a field where we can say all video editing software sucks; some just suck a little less. I m using PowerDirector for now, but all of the above programs should have new versions coming out this year, and I will be keeping a close eye to see if any of them stop being so bad.

9 February 2009

Steve Kemp: It is an army bred for a single purpose

It is funny the way things work out when you're looking for help. Recently I was working on a Ruby + FUSE based filesystem and as part of the development I added simple diagnostic output via trivial code such as this:
@debug && puts "called foo(# param );"
That was adequate for minimal interactive use, but not so good for real live use. In real live use I started outputing messages to a dedicated logfile, but in practise became overwhelmed by thousands of lines of output describing everything ever applied to the filesystem. I figured the natural solution was to have a ring-buffer. (Everybody knows what a ringbuffer is, right?) It could keep the last 500 messages and newer debug information would just replace older entreis. That'd be just enough to be useful if I had a problem, but not so overwhelming it would get ignored. In Perl I found a nice ringbuffer library, but for Ruby nothing. Locking a region of shared memory via shmget, shmset and keeping an array of a few hunded strings would be simple, but it seems odd I have to code this myself. I started searching around and I accidentally stumbled upon the unrelated IPC::DirQueue perl module. Not useful for my ringbuffer logging problem, but beautifully useful. There is no package for Debian but that was easily created:
dh-make-perl --build --cpan IPC::DirQueue
Already I have a million and one uses for it - not least to solve my problem of maintaining a centralised quarantine for all the spam mail rejected by N MX machines. (Which currently uses a combination of rsync and lockfiles.) This is the reason why sites like Perl Advent Calendar are useful - they introduce a useful module every day or two, and introduce you to thinks that you can use in the future. Of course keeping a sustainable site like that up and running is hard which is why sites like debaday struggle to attract contributors, for example. Anyway random happyness. ObFilm: Lord of the rings: Two Towers

Julian Andres Klode: debimg reloaded - debimg core started


Today, I have published the first pieces of debimg 0.1. The published code includes the resolver, the compression module and the fetcher module. It is rewritten from scratch, this time with a PEP8-conforming style, and more flexible. Because debimg.core does not depend on any specific configuration format, but is configured solely via parameters, it is more flexible than debimg 0.0. This new code enables people to write their own programs related to Debian images easily. And if you want to, you can use the facilities provided by debimg.configuration and debimg.frontend to write your own program using debimg configuration files (not implemented yet, core needs to be finished first). Debimg 0.1 will use YAML configuration files, supports multiple repositories, and much more. We could even implement support for pinning packages. Debimg 0.1 is more than the others. It is a library (actually a python package, debimg.core), it is a program designed for end-users and developers. The enormous flexibility allows us to create applications for almost everyone. My vision is that someone who needs a custom Debian image simply fires up the debimg GTK+ frontend, selects the packages he/she wants and clicks build. And when someone needs more flexibility, there will be configuration files which lets you configure most aspects. And if this does not suffice, you can write your own application by importing the modules, replacing some functions, methods, etc. and simply call the main() function of the frontend. The goals:
  • flexibility, high speed, and cool features.
  • be a show case for the features of the low-level python-apt bindings (apt_pkg, apt_inst)
  • high-quality code, no hacks, every single function/method/class/module documented.
  • be a library, and a program.
  • provide a graphical front-end to assist the unexperienced users.
  • provide powerful file-based configuration for advanced developers.
  • And finally, provide a replacement for debian-cd in the near future.
More: Posted in Debian, debimg

Julian Andres Klode: Really, don t use codenames for pinning.


You can not use codenames for pinning packages to a specific release. Everything like this just fails, and can result in apt not finding any candidate for a package. You can see this for example in Bug#512318, and Bug#513864 seems to be related to that one. If you want to target Lenny and you don t have Etch in your sources.list, pin stable at a higher priority than testing. This means that the pin automatically migrates once Lenny becomes stable (which happens hopefully in 2 weeks). Posted in Debian

MJ Ray: Setting up and sustaining a global FOSS-based business (Ian Lynch)

Another Monday, start of the working week and I m thinking about business again. Ian Lynch of The Learning Machine is a smart cookie who I ve collaborated with before. He leads a free-software-based business which is very different from TTLLP s cooperative model and he gave a talk about it to Manchester Free Software. Here are the headlines:-
Building a FOSS Business
  • No fees from licenses
  • Services allied to FOSS
  • Something everyone needs
  • Low cost to produce
  • Low cost to distribute
  • Encourage FOSS take up
  • Increase the number of FOSS contributors
  • Make money to support FOSS development
Background theory and research
  • Clay Christensen and the theory of disruptive innovation
  • The innovators dilemma
  • Seeing What is Next
Business Growth
  • 3 horizons of business growth
  • Horizon 1 current profitable business
  • Horizon 2 business with clear potential
  • Horizon 3 possibilities currently being explored
  • Pipeline for growth
Tipping points
  • Critical mass
  • Viral effects
The ideal product
  • Something everyone needs
  • Something that costs nothing to make
  • Something that costs nothing to distribute
  • Something that has increasing value the more that is bought.
The INGOTs
  • International Grades Open Technologies
  • Market disruption
  • Lower barriers to entry
  • Target those currently not in the market
  • Provide products that are good enough
  • Improve and add features over time
Primary Schools - KS3
  • No-one targets primary schools
  • Very little certification in KS3
  • Use specialist schools community plans
  • Upsell from primary to secondary
  • KS3 add value at with less work for teachers
Developing world
  • Enable developing countries into the qualifications market
  • Target those making the transition to FOSS
  • Ally to netbook/smartphone internet access to lower costs
  • Use UK Awarding Body status for credibility.
The above points are under a Creative Commons cc-by-sa license and the original report was at Manchester Free Software. Sometimes FSUK-Manchester produce videos of talks, but I ve not seen this one yet. Watch their page for details. What can Ian s business analysis teach us about free software businesses? What interesting questions does it leave open? Have you had anything to do with the INGOTs? I ve not worked in education for a while, so I d love to hear tales from the chalkface about them.

8 February 2009

Brandon Holtsclaw: Twitter vs. SMS ( text ) Messages

You know, the more I ve been using Twitter the last week or so ( @imbrandon ) I have noticed many things that I ll be blogging about. But one of those such things is the language used on Twitter by large is not the same Language that is used in SMS messages even though the two technologies while very different have quite a bit that would effect the language used in common such as the 140 character limit on tweets and that largely the people that use twitter also make use of SMS messages too. SMS messages always seem to be much more abbreviated than Tweets , here is an example ( fictional to explain the point better ) : Twitter to Mark : @MarkRosky Me and Sarah are having coffee at Starbucks on 4th and Grand, come join us if you have time.
SMS to Mark : grabbin cup o java at da spot. get down here Now I m curious if this is because most people started ( and continue ) to use SMS via limited phone keyboards instead of fuller featured ones on Blackberries, iPhones, and other smart phones ? Is it a mindset when using a device other than a full computer , e.g. when you send a tweet via SMS does it follow the SMS language or Twitter s ? Or am I mistaken and its a whole different demographic ? I d love to hear your thoughts in the comments

Joey Hess: focusing on the screen

Biella asks if I can read novels from a screen. Yes, I've read what has to be getting close to a thousand novels that way, over the past 8+ years. I was thinking about this just the other day as I read The once and future e-book: on reading in the digital age. That article does a good job arguing against many of the common complaints about ebooks, such as "I can't read an ebook in the bathtub".
my pile of paper
Right now, I have a pile of paper books I want to read or am in the middle of reading. But if I want something new to read, I don't reach for that pile, but for my (much larger) directory of ebooks. The pile of paper is reserved for special occasions: plane trips, camping, etc. I started reading ebooks in circumstances where it was too hard to get access to paper ones. Traveling in the third world, hauling along a lot of paper books wasn't practical. Living rural, where every book had to be backpacked in. I've stuck with it because it works for me and because I've enjoyed stretching my muscles of concentration on the screen. To me, the focus required to read an ebook from the screen is similar to the focus required to work on a program. And completly different than skimming through a web page. The best example of this that I have right now is Real World Haskell, which I've almost finished (hurrah!) reading in a combination of paper and web editions. I was only able to stick with reading this book when I got the paper version. I use the web version for reference, or for looking for help on a challenging part of the book. For reading, it's just too much a web page; too easy to skim, or be distracted by the comments that can be attached to every paragraph, or jump off to Wikipedia.
screenshot of my ebook reader
Just as most programmers tune their development environment so that it uniquely suites them, I've put a lot of thought, trial, and error into tuning my ebook reading environment. The most important thing seemed to be getting rid of anything that interfered with focusing on the text. Since I wasn't (easily) able to use that environment for reading Real World Haskell, I wasn't able to read it from the screen.

Ingo Juergensmann: Asrock P4V88 and 4 GB barrier - Part 4

After being able to plug in all four 1G DIMMs, the machine recognizes them as 4x 1GB dual-ranked. Sadly only 3.1 GB are usuable., though. But more annoying are random lockups from the radeon driver:

CODE:
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_reset] *ERROR* radeon_cp_reset called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_start] *ERROR* radeon_cp_start called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_reset] *ERROR* radeon_cp_reset called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_start] *ERROR* radeon_cp_start called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_reset] *ERROR* radeon_cp_reset called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_start] *ERROR* radeon_cp_start called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_reset] *ERROR* radeon_cp_reset called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_start] *ERROR* radeon_cp_start called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738458] [drm:radeon_cp_idle] *ERROR* radeon_cp_idle called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738506] [drm:radeon_cp_reset] *ERROR* radeon_cp_reset called without lock held, held 0 owner f4faf5c0 f4faf5c0
Feb 8 12:01:50 muaddib kernel: [239359.738530] [drm:radeon_cp_start] *ERROR* radeon_cp_start called without lock held, held 0 owner f4faf5c0 f4faf5c0
.....


The machine itself is still reachable and working, but the radeon module causes 100% CPU load and X is not killable.

sigh

John Goerzen: Jacob Update

Last week, we got a new HD camcorder. Jacob has really enjoyed watching video of himself on TV. He wants to watch it over and over. He ll start cackling when it gets close to the parts he thinks are funny. He ll jabber about it That Jacob funny! Sometimes when he hears a question that I asked him on the video, he ll answer it for himself now. Today, I woke up feeling like vomiting. I haven t yet, but it s been really close. Terah and I explained to Jacob that my tummy hurts. Jacob came over to me and said kiss it! , and kissed me. (If he gets hurt, he wants a kiss where it hurts.) I ve been in bed sometimes, at the desk sometimes, and at the couch sometimes. It s one of these annoying things where I can t sleep, but the only way I can not feel like vomiting in bed makes me sore after awhile, and sitting at the desk or reading something only works for a little while. As I was sitting at the desk, Jacob came in and wanted to watch some train videos. See old train! See old train IN SNOW! He usually sits on my lap, his squirmy 2-year-old self, and watches the videos off Youtube. Today I told him he would have to be very still, and he did a very good job of it. Later he saw me on the couch. Dad sleeping, he said. He gave me a hug, then said, I sleep there too. For about a minute, he had his head on the pillow facing me, with a big smile on his face. Then he was off to find a book or something. Dad have ouchies. It s very sweet to see his sense of compassion developing already. Even if the bounciness sometimes made my stomach more queasy.

Uwe Hermann: List of my Creative Commons licensed photos being used elsewhere

As you may know I maintain a Creative Commons licensed photoblog at my website. I'm also cross-posting some of the better photos to my flickr page. Even with my humble, and not really widely-known little photoblog, you can already see the Creative Commons license's effects on media sharing and remixing/reusing kick in. Quite a number of my photos have already been used by other people for various different purposes (blogs posts, articles, even album covers), including some of the "bigger" sites such as the Wall Street Journal Blog or Cult of Mac... Here's the list of places I know of where my photos are used. Please leave a comment if you spot more of them in the wild. I intend to keep this list updated as more of my photos appear elsewhere. (Oh, and I have no idea why people seem to be so obsessed with my "Sugar" photo...) Sugar Sugar
Clock Clock
Autumn Leaf Autumn Leaf
Scissors Scrissors
Soccer World Championship 2006 Soccer World Championship 2006
Organized Organized
Dandelion Dandelion II
Intel Celeron CPU Intel Celeron CPU
Smoke Smoke
Sun and trees Sun and Trees
POSIX.1g Posix.1g

Wouter Verhelst: Tartan theme

Debian so needs a Debian Tartan theme. For reference, my .Xresources file contains these xtartan configuration items:
XTartan.colorCode.EB: rgb:09FF/21FF/48FF
XTartan.colorCode.DR: rgb:57FF/0000/0AFF
XTartan.colorCode.DY: rgb:E4FF/A8FF/48FF
XTartan.Mine.nextTartan: Debian
XTartan.Debian.sett: %a EB16 DY2 EB16 DR16 BK2 DR16 W6 BK2 W2 BK2 W2 DR6 W2 DR6 W6 BK2 W2 BK2 W2 BK2 W2 DR6 W2 BK2 W2 DR6 W2 BK2 W6 DR6 W6 BK2 W2 DR16 BK2 DR16
Which (when calling xtartan -r -t Debian) provides for a nice Tartan background; but it's not a theme. I'd do it myself, but I'm not a graphical guy; but I would so love such a theme. Someone with graphical skills please make it!

Russell Coker: Bridging and Redundancy

I ve been working on a redundant wireless network for a client. The network has two sites that have pairs of links (primary and backup) which have dedicated wireless hardware (not 802.11 and some proprietary controller in the device - it s not an interface for a Linux box). When I first started work the devices were configured in a fully bridged mode, so I decided to use Linux Bridging (with brctl) to bridge an Ethernet port connected to the LAN with only one of the two wireless devices. The remote end had a Linux box that would bridge both the wireless devices at it s end (there were four separate end-points as the primary and backup links were entirely independent). This meant of course that packets would go over the active link and then return via the inactive link, but needless data transfer on the unused link didn t cause any problems. The wireless devices claimed to implement bridging but didn t implement STP (Spanning Tree Protocol) and they munged every packet to have the MAC address of the wireless device (unlike a Linux bridge which preserves the MAC address). The lack of STP meant that the devices couldn t be connected at both ends. They also only forwarded IP packets so I couldn t use STP implementations in Linux hosts or switches to prevent loops. Below (in the part of this post which shouldn t be in the RSS feed) I have included the script I wrote to manage a failover bridge. It pings the router at the other end when the primary link is in use, if it can t reach it then it removes the Ethernet device that corresponds to the primary link and adds the device related to the secondary link. I had an hourly cron job that would flip it back to the primary link if it was on the secondary. I ended up not using this in production because there were other some routers on the network which couldn t cope with a MAC address changing and needed a reboot after such changes (even waiting 15 minutes didn t result in the new MAC being reliably detected). So I m posting it here for the benefit of anyone who is interested.
#!/usr/bin/perl -w use strict;
use Sys::Syslog;
use POSIX; my $cfg_file = "/etc/bridged.cfg";
my $daemon = 1; openlog("bridged", "pid cons", "local1") or die "openlog"; if($ARGV[0] and $ARGV[0] eq "-d")

$daemon = 0;
open(CFG, "<" . $cfg_file) or die "Can't read \"$cfg_file\".";
my %cfg = ( SLEEP => '30',
PING_INTERVAL => '3',
PING_COUNT => '3',

);
while(<CFG>)

chomp;
if($_ =~ /^#/ or length($_) == 0) next;
my ($name, $val) = split(/ *= */);
$name =~ s/ \t*$//;
$val =~ s/^ \t*//;
$cfg $name = $val;

close(CFG); system("ifconfig $cfg IF1 up");
system("brctl addif $cfg BRIDGE $cfg IF1 ");
system("brctl setpathcost $cfg BRIDGE $cfg IF1 25");
system("brctl delif $cfg BRIDGE $cfg IF2 ");
system("ifconfig $cfg IF2 down"); my $route1 = 1; if($daemon == 1)

my $rc = fork();
if($rc > 0)

# parent
exit(0);
if($rc != 0)

error("Can't fork.");
POSIX::setsid();
my $pidfile = "/var/run/bridged.pid";
open(PID, ">" . $pidfile) or error("Can't open $pidfile.");
print PID getpid() . "\n" or error("Can't write to $pidfile.");
close(PID); open(STDIN, "</dev/null") or error("Can't open /dev/null.");
open(STDOUT, ">/dev/null") or error("Can't open /dev/null.");
open(STDERR, ">/dev/null") or error("Can't open /dev/null.");

syslog("info", "starting up, 60 second delay");
sleep(60);
syslog("info", "now running"); sub ping_host

my $ip = shift;
open(CMD, "ping -i $cfg PING_INTERVAL -c $cfg PING_COUNT $ip sed -n \"/transmitted/s/^.*\\([0-9].*\\).received.*\$/\\1/p\" ");
my $count = <CMD>;
close(CMD);
if($count == 0)

syslog("err", "Host $ip can't be pinged");

return $count;
while(sleep($cfg SLEEP ))

if($route1)

unlink("$cfg SIGNAL ");
if(ping_host($cfg PING1 ) == 0)

system("ifconfig $cfg IF2 up");
system("brctl addif $cfg BRIDGE $cfg IF2 ");
system("brctl setpathcost $cfg BRIDGE $cfg IF2 50");
system("brctl delif $cfg BRIDGE $cfg IF1 ");
system("ifconfig $cfg IF1 down");
syslog("warning", "Interface $cfg IF1 is broken, using interface $cfg IF2 ");
$route1 = 0;


else

if(stat("$cfg SIGNAL "))

unlink("$cfg SIGNAL ");
system("ifconfig $cfg IF1 up");
system("brctl addif $cfg BRIDGE $cfg IF1 ");
system("brctl setpathcost $cfg BRIDGE $cfg IF1 25");
system("brctl delif $cfg BRIDGE $cfg IF2 ");
system("ifconfig $cfg IF2 down");
syslog("warning", "Interface $cfg IF1 is considered to be fixed");
sleep(60);
$route1 = 1;


MJ Ray: The Phone Co-op AGM 2009

Yesterday I phoned into The Phone Co-op AGM 2009 and heard the reports, most of which you can read in the PDF annual report from the AGM website. There were also various questions from members, which I scribbled down as follows:-
What does ADSL mean?
Asymmetric Digital Subscriber Line. Essentially, what we sell as broadband.
How many day-equivalents of training did part-time employees get on average? (I think this was the question, but I got a bit lost.)
Information not immediately available. ThePhoneCoop will research and reply later. The number of part-time employees is an asterisk footnote in the non-financial performance indicators.
Where are the Phone Co-op s investments?
Most of the share capital is for investment in TPC, but surpluses arise for various reasons and are invested outside. Current locations include 40k in long-term investments, including 10k in the Co-operative Group, 20k in Westmill wind farm, 5k in a hydro power project; 60k is in the ICOF share account, 1.4m in the Co-operative Group, [...I missed some. I was struggling to keep up. Some of this may be wrong anyway...] 486k in Midcounties Cooperative share account, 20k in Chelmsford Star; total of about 2.9m.
Is ICOF deciding recipients of the sustainability fund or The Phone Co-op?
The arrangement with ICOF is now ending for various reasons and now TPC will partner with Black Country Reinvestment Society. Don t want to manage the fund directly because it s not a core task for a phone company.
The increase in turnover is described as mainly to existing customers. Has there been an increase in the number of customers?
The Phone Co-op is recruiting 150-200pcm residential and 30 business customers, but losing a similar number. Have recruited new staff to try to improve this.
Is share account interest being cut in line with banking interest?
Just cut to 3%, but there has been a net inflow of investment. Current interest receipts from TPC cover it due to long-term investments, but they will mature, so the interest rate will be cut gradually to keep it sustainable.
Purchase from other cooperatives is 11% and falling. What is being done to increase it?
[I missed the answer to this.]
What is happening about getting a new office?
The Phone Co-op still has an option on a site in Chipping Norton, but no planning permission. An alternative commercial building which was being discussed with its owner was lost to housing (planning permission granted there!). There is a general lack of suitable sites available and things are happening cautiously in the current climate.
If we re trying to save paper, why did members receive two envelopes in the post for this AGM?
The report was sent from Calverts directly, to save time, postage, staff and report miles
Is the description of non-white in the performance indicators a problem for mixed white+non-white people?
Will look into this.
How many affinity schemes are there?
There are currently 300 and they are being reviewed for the best way to work better with them.
Are acquisitions likely?
Expect the credit crisis to being opportunities. There are benefits from more traffic and so on. TPC has been contacting potential suppliers and intermediaries asking after other providers in difficulties.
What is the deferred income shown in the financial statements?
Pre-billed broadband and similar products.
Is the investment in the Co-operative Group risky?
TCG holds around 4bn in assets under and is one of the longest continuously-traded companies in the UK.
Are ThePhoneCo-op s 0845 numbers advantageous to TPC or the caller?
Still yes for TPC, paying 1p/min at peak; probably not advantageous to caller these days.
There are 15% sales to cooperatives shown. What s the largest cooperative and what % of that is it?
Shown in the annual report. [The numbers in report work out to about 15% of all sales I think. So, nearly all sales to cooperatives are sales to Midcounties?]
All errors and omissions in the above are mine. I heard the allocation approved, then I had to leave before the special meeting and the presentations. If anyone has links to them or coverage, please leave me a comment. Other comments welcome, too.

Chris Lawrence: Repurposed content

Herein I present a rant on one-tailed tests in the social sciences; feedback welcome:
Unless you have a directional hypothesis for every coefficient before your model ever makes contact with the data, you have no business doing a one-tailed statistical test. Besides if your hypotheses are solid and you have a decent n, the tailedness shouldn t determine significance/lack thereof. Thought experiment: assume you present a test in a paper that comes out p=.06, one-tailed. That means you have a hypothesis that doesn t really work to begin with (sorry, approaches conventional levels of statistical significance ). More importantly, if you just made up the tailedness hypothesis post facto to put a little dagger (or heaven forbid a star) next to the coefficient, you really did a two-tailed test with p=.12 and then post-hoc justified it to make the finding sound better than it really was. Now here s the center of the rant: I really don t believe you actually knew the directionality of your hypothesis before you ran the test and were willing to stick with it through thick and thin, since I know that you d be figuratively jumping up and down with excitement and report a significant result if the sign was not as expected and it came out p=.003 two-tailed (p=.0015 one-tailed, opposite directionality), rather than lamenting how it turned out with p=.9985 on your original one-tailed test. I dare say nobody has ever published an article claiming the latter (although I might give it a positive review just for kicks). And I really don t feel the need to have these discussions with sophomores and juniors, hence why I prefer books that just talk about two-tailed tests (aka not Pollock [a textbook I really like otherwise]) so I don t feel the need to rant.
See also: this FAQ from UCLA, which is a little more lenient but not much.

Ian Wienand: Converting DICOM images

If you go for an ultrasound or some other imaging procedure, they may give you a CD with the images that requires some overly complicated and under-featured Windows viewer. Chances are these images are in DICOM format, which is like the AVI of the medical world. Your first clue will be that file might report the file as an unoptimised QuickTime movie, e.g.
$ file ./QMAG0001
./QMAG0001: Apple QuickTime movie (unoptimized)
After figuring out the file type wasn't actually anything to do with QuickTime, I tried some of the many different tools and methods to convert this to something viewable. Unfortunatley, the DICOM viewer in GIMP and ImageMagick (probably the same thing?) didn't like the files at all, and neither did a range of other tools. I finally managed to do it with the dcm2pnm tool from the Debian dcmtk package -- just point it at the file and it spits out a PNM which is easily converted by all graphics tools. You can also encapsulate a series of images in a DICOM file, like a little movie. dcm2pnm extracts these easily, but requires the --all-frames options. An ffmpeg recipe to turn these extracted files into a more easily viewable movie is:
$ ffmpeg -qscale 5 -r 20 -b 9600 -i foo.%d.ppm movie.mp4
I certainly can't guarantee this will actually work for you, as DICOM appears to be an extremely complicated format with many possible vendor extensions. But hopefully it's a starting point!

Daniel Burrows: Dear Lazyweb, does anyone understand job control?

I've been banging my head against this all day and it doesn't make any more sense than it did when I started. I have a need to write some code that can manage job control on a terminal. More specifically, I need to run a single process and stuff it into the background at will, so that it gets suspended when it tries to read from the terminal. So, there's a controller process and a subprocess process.
 controller  ----------> subprocess
               manages
The man-pages and glibc info documentation make this look simple: disable TOSTOP if it's enabled via tcsetattr() so that the subprocess can write to the terminal, then start the subprocess in a new process group (by fork()ing and calling setpgid()). Once it's going, you can put it in the foreground or background by calling tcsetpgrp() to set the terminal's foreground process group to the subprocess (to put it in the foreground), or to the controller process (to put the subprocess in the background). Whenever the subprocess is in the background, it will be sent SIGTTIN if it tries to read from the terminal. I have everything working -- except for the very last sentence of that last paragraph. I can see my processes being put into the right process group, and I can see them going into the foreground and the background. For instance, here the first line is the controller process and the rest of the lines are the process group of the subprocess (this one started a few other processes).
STAT CMD                           PID  PGID TPGID  PPID   SID
Ss+  ./src/aptitude              26989 26989 26989 26980 26989
S    ./src/aptitude              26991 26991 26989 26989 26989
S    /bin/sh -c /usr/sbin/dpkg-p 27027 26991 26989 26991 26989
S    /usr/bin/perl -w /usr/sbin/ 27028 26991 26989 27027 26989
Z    [dpkg-preconfigu] <defunct> 27034 26991 26989 27028 26989
S    /bin/sh -e /tmp/lynx-cur.co 27039 26991 26989 27028 26989
S    whiptail --backtitle Packag 27043 26991 26989 27028 26989
If I try to move the background process into the foreground, it is marked as the foreground process in this session:
STAT CMD                           PID  PGID TPGID  PPID   SID
Ss   ./src/aptitude              26989 26989 26991 26980 26989
S+   ./src/aptitude              26991 26991 26991 26989 26989
S+   /bin/sh -c /usr/sbin/dpkg-p 27027 26991 26991 26991 26989
S+   /usr/bin/perl -w /usr/sbin/ 27028 26991 26991 27027 26989
Z+   [dpkg-preconfigu] <defunct> 27034 26991 26991 27028 26989
S+   /bin/sh -e /tmp/lynx-cur.co 27039 26991 26991 27028 26989
S+   whiptail --backtitle Packag 27043 26991 26991 27028 26989
Note that the background process is not suspended, even though it's busy reading from the tty. If I manually suspend the process group with kill -TTIN -26991, it stops as expected:
STAT CMD                           PID  PGID TPGID  PPID   SID
Ss   ./src/aptitude              26989 26989 26991 26980 26989
T+   ./src/aptitude              26991 26991 26991 26989 26989
T+   /bin/sh -c /usr/sbin/dpkg-p 27027 26991 26991 26991 26989
T+   /usr/bin/perl -w /usr/sbin/ 27028 26991 26991 27027 26989
Z+   [dpkg-preconfigu] <defunct> 27034 26991 26991 27028 26989
T+   /bin/sh -e /tmp/lynx-cur.co 27039 26991 26991 27028 26989
T+   whiptail --backtitle Packag 27043 26991 26991 27028 26989
So the signal isn't being blocked or ignored. I can also run programs in a normal shell, outside my harness (e.g., links &) and watch them auto-suspend, but the same thing doesn't happen when I start them directly under my controller process. It's not even that they're starting as foreground processes: I start them in the background, and they never see a SIGTTIN. Does anyone have a clue what's going on? Hopefully it's as simple as a flag I have to set somewhere... Oh, and for extra fun, this is all happening inside a VTE terminal widget. That shouldn't make a difference (after all, it's what gnome-terminal uses, and SIGTTIN behaved as expected when I tested it there), but who knows, it might be relevant. [UPDATE] I did a little more testing: I was bringing the subprocess into the foreground whenever the terminal was active, so I couldn't try typing into the terminal while the subprocess was in the background. If I do that, it does get SIGTTIN and it suspends. So it looks like select() doesn't count as a read for the purposes of job control. I doubt there's much I can do to get around that. :-(

7 February 2009

Holger Levsen: FOSDEM streams live

The streams from FOSDEM are live since 2min now, yay!

Updated and more verbose info is available on -project.

To say it mildly, the setup was chaotic, we could only get into the room 30min before our talked started. Which then started 30min late and was recorded at least, as the beginning of Lucas' talk which is still running.

BTW, that we couldn't get into the rooms earlier isn't within the FOSDEM organizers responsibility, but the universities. And, one has to say, the university is also pretty nice providing the venue free of charge.

More later.

Pablo Lorenzzoni: Alright! I surrender: Git rules!

Everybody seems to be using git these days I am not very found of hypes , as I told you before, but there s been some time I ve been evaluating git. I was happy with svk for quite a long time Lately, though, I ve been developing and extending a lot of ruby libraries, and all of them seem to be hosted at GitHub and using git So, why not give it a serious try? I chose a simple task on my TODO-list: to extend xmpp4r-simple to support XMPP PubSub, so I could use it in an internal project at my company. So I cloned its git repo and started developing. Not a really hard task, since all I had to do was use the underlying library (xmpp4r not surprisingly also in GitHub) and mimic what Blaine s done for the callbacks and it was ready (and working although I still need to put more time on the test suite). I am still exploring It will take some time to migrate my stuff (and maybe a lot will remain in my company s Subversion), but that s what git-svn is for, isn t it? Right now I am looking for ways to work with git-buildpackage and Debian git tools Do you have some advice on that?

6 February 2009

John Goerzen: Microsoft Windows: A Culture of Mediocrity

This is a giant rant with a small point at the end. So be warned. Earlier this week, I booted up Windows for the first time in a few months. About 2 minutes after it came up, just after I had started up an app, it informed me that it desperately needed to restart because it had applied some updates, and unless I clicked cancel, it would. So I restarted. The Saga Begins Then I opened up the program for my negative scanner. This device has an infrared dust-detection system that is not well supported in SANE. I can insert a 6-frame negative, it will load it in, identify where the 6 frames are, and scan it at 4000 DPI. So anyhow, I opened it up and started scanning. Surprisingly, it was REALLY SLOW. Normally it takes about 3 minutes per frame, and I could tell it wasn t going to do that. It sounded as if the computer couldn t keep up with the scanner. I tried to get Windows to tell me if it was talking to the scanner at USB 2.0 speeds, but this information was nowhere to be found. So I went down under my desk and moved some USB devices to different ports. Got back up from under the desk, and: BLUE SCREEN OF DEATH was there. Reboot. Scanner now works at normal speed. So I started it scanning, then went off to watch the Purdue game with Terah. Came back a little while later, expecting it to be ready for the next negative, only to manage to catch it in the nick of time before it helpfully rebooted my machine again due to yes more updates. So I saved, rebooted, and finally scanning worked after that. Also I disabled automatic installation of updates. A Turn For The Worse A few days later, I was getting expecting a new camcorder, and I was planning to use Windows for video editing. Originally, my hard disk had Windows, a Windows emergency recovery partition, and Linux on it. When I upgraded my motherboard and added a SATA HDD, I moved almost all of Linux to it. So there was now a lot of free space on that original drive, and the recovery partition is useless with the new motherboard anyhow. So I figure: delete that recovery partition, and expand the NTFS partition to take up the whole of the disk. Easy enough, right? So I do this, and much to my annoyance, Windows now refused to boot. It would just hang. No boot menu, no splash screen. Just hang. Linux saw and could access the NTFS partition just fine. So I went hunting for my XP install CD. Finally found it. Boot off the thing. It spends 5 minutes loading drivers for all sorts of things I don t have off the CD, then promptly crashes, saying inaccessible boot device. A hunch or two later and I m twiddling bits in the BIOS to try to get it to see my SATA DVD burner properly. No luck. I finally download the drivers for my chipset from Gigabyte, have to use Wine to extract them, then scrounge up a working floppy to put them on. Reboot. Blue screen again but a different one. Twiddle some more bits in the BIOS. Reboot. Success! Recovery console is mine! I run chkdsk, and fixboot, which everybody in the forums says will fix this. Neither made any difference at all, but the recovery console could see the NTFS partition just fine. Grumble. More googling, and I try testdisk for Linux. It twiddled some bits on the NTFS boot sector and my partition table. Reboot. And UGH. Now Linux won t even boot and Grub won t start. Download Debian live CD. Boot from it. Inspect disk with fdisk. Turns out testdisk just renumbered my partitions. Restore the previous numbering: Windows on partition 2, Linux /boot on partition 5. Save, reboot. Grub is back. Linux boots. Try Windows. And . Still hangs, but this time only after saying that HAL.DLL is missing or corrupt. Reboot into Linux. HAL.DLL is right there where it should be, and at the size it should be. Ponder this for a bit. I then tried looking at boot.ini. On a lark, I wondered if deleting the recovery partition meant that boot.ini no longer considers Windows to be partition 2, even though that s what the partition table says. Change it to partition 1, save. Reboot. SUCCESS IS MINE! WINDOWS BOOTS! Only 4 hours after expanding its partition. I told some friends about this trouble booting. What on earth did you do, John? I expanded the NTFS partition. And the response: Ahh. That ll do it. Expanding a partition is something we do routinely on Linux. Even on running production servers. Even WHILE THEY RE RUNNING. And I never have a problem like this. And even if I did, I wouldn t have to use some tool written FOR A DIFFERENT OS to fix it. Argh. The Problems Multiply A few days later, I got a new Canon Vixia HG20 camcorder. It shoots in AVCHD format 1920 1280@60i, h.264, which is a standard format for hard disk or SD card HD camcorders. I needed some basic video editing software that would let me do simple edits and burn a BDMV or AVCHD disc onto DVD+R formats that Blu-ray players can play, yet are cheap to make. After poking around, I decided to download the free trial of Ulead/Corel VideoStudio Pro X2. The free trial supposedly was the full version of the program, though it quite obviously wasn t after installing it. So I bought the full version and was greeted by about an 800MB download instead of the 120MB full version free trial download. Now here s the thing about VideoStudio Pro X2. IT S CRAP. It has crashed on me at least two dozen times, usually when I click the Play button. Its interface is really clunky. There s no way to mark a start and an end point, and say just delete everything between there, regardless of what clips they re in. The AVCHD disc creator wants to re-encode the entire project, even though it s ALREADY IN AVCHD. Though you can work around that by exporting the entire project to an AVCHD *FILE* which is smart enough not to re-encode it then making a disc from that. The project properties likes to say I m editing 720 480 even when I m editing 1920 1080, and doesn t even have a box for 1920 1080. Though after some Googling, it turns out that the project properties settings are irrelevant anyway. Yay for good design? So after all this crashing, I went out and did some more Googling. I found this lovely quote:
In short, every application I and our Labs tester tried iMovie, Pinnacle Studio, Ulead Video Studio, Sony Vegas and Avid Liquid at best could open but barely play some clips, and more often simply hung or crashed.
So what we have here is a whole culture of mediocrity. Everybody advertises that they work with AVCHD, yet nobody actually WORKS with AVCHD. And this is the format that the industry is rapidly moving to for HD HDV s days are quite numbered.

Next.

Previous.