Search Results: "will"

1 March 2008

Patrick Winnertz: First pics from CLT08 online

After nearly 2 days I'll put some fotos of the CLT08 online. It's a quite cool event which many nice people and I'm pleased to meet them (again). :) In some minutes is the start of the social event, I'll hope it will be as good as the last year, which many very cool drinks ;-) Have fun to view the fotos! (Sorry for some not so good pictures :))

David Nusinow: Shell Scripting

I've never bothered to learn the gory details of shell scripting. This is somewhat embarrassing for me, although at the same time I don't feel like I've really suffered for the decision. I know enough of the basics to do some cool things (for loops, if tests and whatnot) but the the syntax is fraught with such problems that it feels like a waste of time to do more. Obviously, others have felt similarly, which is why perl was invented.

I've become more interested in it again recently though, mainly because I've been reading a lot of Kernighan. I don't want to deal with Bourne syntax though, which eliminates the only two shells I've ever spent serious time with in my life, bash and zsh, as well as ksh. I know csh scripting is considered harmful 'n shit, so that's right out.

Since I only want to shell script for local use, I don't need to worry about portability so I can try using more exotic shells. I'm also willing to script in a different language from the shell that I use, so the doors are really open. There's scsh if I want to write scheme, zoidberg if I want to write perl, rush if I want to write ruby.

What looked most appealing is rc though, which has a very nice Bourne-like syntax that's not nearly so warty. It was reimplemented before plan9 was released, and the reimplementation is in Debian, although I ran in to some undocumented differences with the plan9 version very fast. It may be worth trying out the plan9 version at this point to see how that goes.

Any other suggestions from the lazyweb are greatly appreciated. It'd be nice to have this aspect of my toolbox be more solid.

29 February 2008

Eddy Petrișor: sarge + cowbuilder = love

Update:
A disclaimer/warning is needed: UNLESS you KNOW what you're doing, you probably are better off building packages for each of the supported Debian distros.


I know it sounds cheesy, but I couldn't find a better name.


At my workplace we are packaging software to work for as many distros as possible at one time. As a consequence the .deb packages we produce should work fine on all Debian distros: oldstable, stable, testing, sid.

To make sure we achieve that, we are building them in an oldstable chroot. OTOH, using pbuilder is very demanding on I/O, especially when entering the chroot and when exiting it. That slows down a lot the build system and is time to change that.


One reliable alternative is to use cowbuilder (part of cowdancer package). What is interesting is that cowbuilder relies on the existance of /usr/bin/cow-shell inside the chroot, so the cowdancer package needs to be installed both in the chroot and the host machine.

But cowdancer was not a part of sarge, so, if you try to create a new sarge cow directory with cowbuilder, it will fail at the end saying it didn't found the cowdancer package. Also trying to login via cowbuilder --login will complain it didn't found /usr/bin/cow-shell.


The fix for this is simple, once you figured it out and saw that cowdancer is available in sarge as a backport:
cowbuilder --create --distribution sarge --basepath /var/cache/pbuilder/sarge.cow --othermirror 'deb http://www.backports.org/debian sarge-backports main'
You may prefer to be sure that the only thing from backports is cowdancer and use a more hands-on approach[1]. Also, this will eliminate the need to correct later the apt sources to exclude backports[2].

Write the same command as before, but omit everything starting with --othermirror. Then install by hand the package in the chroot.
twix:/home/eddy# cowbuilder --create --distribution sarge --basepath /var/cache/pbuilder/sarge.cow
twix:/home/eddy# chroot /var/cache/pbuilder/sarge.cow
twix:/# wget http://ftp.de.debian.org/backports.org/pool/main/c/cowdancer/cowdancer_0.23~bpo.1_i386.deb
twix:/# dpkg -i cowdancer_0.23~bpo.1_i386.deb
twix:/# rm cowdancer_0.23~bpo.1_i386.deb
twix:/# exit
twix:/home/eddy# cowbuilder --update


Since after the bootstrap all .deb packages will be in the apt cache in the chroot, you might want to save some disk space:
twix:/home/eddy# cowbuilder --login --save-after-login
twix:/# aptitude clean
twix:/# exit

That's it!


If anything is broken somehow, missing or whatnot, cowbuilder --login --save-after-login is your friend.

[1] the initial bootstrap does not pull from backport anything else but cowdancer
[2] since you want to compile for plain sarge, not sarge+backports ;-)

Ben Armstrong: Using wiki.debian.org for project management

From the start of the DebianEeePC project, we have used a combination of the irc channel and our wiki site to our great advantage. The DebianEeePC/HowTo/Install document has been actively maintained as we go, serving not only as a good reference for new users, but also for existing users and developers to see where improvements are being made and what is left to work out. Recently, we’ve started using the wiki for task management as well. Patterned after DebianInstaller/Bugs, we now have DebianEeePC/Bugs where we link to reports on the BTS for packages we maintain and our own usertags on packages we don’t maintain. As well, we are keeping a DebianEeePC/Todo to manage our tasks. I see from a search through the wiki that lots of other Debian subprojects keep Todo lists, but most of them have little more structure than point-form lists. A few, though, have structured these pages a bit more carefully. For instance, some of these use tables listing who each task is assigned to, when it was assigned, and when it is completed. Our point-form list is a bit more free-form regarding task assignments. Participants can register their interest in a given task and what they are doing as a subpoint of the task. As for state changes over time, we rely on the revision history on “info” page for people to be able to see state changes for particular Todo items. When something is done, it just gets dropped from the list. I haven’t exhaustively reviewed everyone’s Todo page, but from my brief survey I haven’t seen a couple of things I’ve added to try to help people choose what to do next. The first is to tag items with six difficulty/importance pairs, rating each actionable item from Easy/Urgent to Hard/Wishlist. The second is to state dependencies between items using anchors. It would be nice to see any of you are doing something similar and hear about whether it has worked out well for you. I’m happy with how the irc/wiki combination has helped with project management. In the past with a different project I’ve made an abortive attempt to use the task management system at Alioth, but it just seemed too cumbersome and nobody ended up using it. With the wiki, it appears barriers to participation in task management are sufficiently lowered that everyone is willing to help keep it up. And with irc, we can keep on top of defining and assigning (or more usually volunteering to do) various tasks, and making sure the wiki is kept completely up to date. It takes a bit of discipline to do, but after the habits are established, it gets easier, and the rewards are well worth it.

John Goerzen: hg.complete.org is no more

As of today, hg.complete.org is no more. I have removed mercurial and hgwebdir from my server, removed hg from my DNS zone, and converted everything that was in Mercurial over to Git. (Except for hg-buildpackage, which I have orphaned) So there is now stuff at git.complete.org.

I still have a ton of Darcs repos to convert, which will take more time.

Also I have heard a lot of people say that the GitPlugin for Trac is not very good. I have two Trac instances running it: one for commithooks and another for ListLike. Both seem OK so far, but I haven't pushed them very much yet.

28 February 2008

Andrew Pollock: [debian] It's all Bob's fault (or 3 years of maintaining dhcp3)

So today is the third anniversary of my first upload of the ISC DHCP v3 package to Debian. It all started back in the days of the linux.conf.au 2005 organising committee. Bob Edwards, who ran the ANU Department of Computer Science computer labs (which ran on Debian at the time), was constantly complaining about bugs like #286011, once he'd found out I was a Debian developer. So I figured I'd try and do something about it, so I think I emailed the maintainers, who had been fairly inactive (the last upload before mine was in July the year before), and asked if they'd like me to NMU the package. I think Matt Zimmerman emailed me back and told me to knock myself out, and add myself as an uploader while I was at it, and well, the rest is history... I've had fun fixing bugs, trying to clean things up, deal with a pretty archaic upstream build system and get the package up to current Debian standards compliance. One of the highlights was being able to finally get rid of Debian Installer's dependence on the v2 DHCP client package, so we could finally jettison the v2 packages for Lenny (which reminds me, I still have to figure out how to handle the transition from Etch with respect to that). I've been working hard to try and get as many of the patches in Debian's DHCP packages incorporated upstream. Unfortunately, they have a totally unpredictable release cycle, and they have feature releases and bug fix releases. The feature releases are very few and far between, and they won't introduce new features into a bugfix release. Speaking of patches, my personal philosophy is that distribution packages shouldn't differ radically in behaviour or functionality from their upstream source, so I've resisted incorporating some of the more deviant patches from Ubuntu, instead forwarding them directly upstream. There's still a bit of work to be done with the package. The ISC released version 3.1.0 a while ago, and that's the version I'm trying to standardise on for Lenny. It's got new support for a domain-search option, which means people can stop abusing the domain-name option to set a domain search list in their clients. The domain-search option is also honoured by Mac OS X (Leopard), and I dare say Windows Vista probably supports it as well, but I haven't checked. Unfortunately the client-side support for the domain-search option is a bit flaky in 3.1.0, so I'm hoping the ISC will release 3.1.1 real soon now, as I believe most of the flakiness issues are addressed in it. Of course, for Lenny to do the right thing consistently with this new option, #460609 and #465158 need to be resolved also. The last thing I'm trying to sort out for Lenny is the reasonably in-demand LDAP patch. It's been floating around out-of-tree for longer than I've been maintaining the package. Jos L. Redrejo Rodr guez has been kind enough to clean up the patch for me, so that rather than bastardising the standard DHCP package to build a dhcp3-server package that has LDAP support, it basically builds DHCP twice, once with the patch and once without, and the dhcp3-server-ldap package just diverts /usr/sbin/dhcpd3 out of the way and plonks in the LDAP-enabled binary in its place. I hope to upload a new revision of the package that builds this new binary package within the next week (hopefully this weekend). After that's done, and hopefully 3.1.1 has been released, and Lenny is out of the way, I'm going to focus on transitioning away from a versioned set of DHCP packages. The whole "3" in everything was to allow the v2 and v3 packages to coexist. I've sought advice from the release team about this, and they said not to bother, but it feels really gross to have the version 4 package (4.0.0 has been released by the ISC for a while now as well) be still called dhcp3, and to install into /etc/dhcp3 and other such versioned directories. The final thing I want to look into is collaborative maintenance. I've been wanting to do this for a while, but I wanted to get the package into a revision control system (shock horror, it's not currently) and I've been baulking at how to do it the "right" way. I'm pretty sold on using Git for the revision control system, I just haven't figured out the right approach yet. Martin Krafft's articles about it have been interesting, but feel a bit overly advanced, and don't quite suit my situation. I've been hesitant to start using Git, then discover I've done it all wrong, and have to start again. I need to just bite the bullet. My upstream also doesn't use Git, and doesn't make their revision control system publicly available, so I just get the tarballs when they're released. Speaking of upstream, I made the discovery last year that they're just down the road from me in Redwood City, so I've been trying to improve relations by getting the main folks who work on DHCP at ISC to pop up to Google for lunch every now and then, which so far has happened twice, and been good a opportunity to have a chat. In fact, they're keen for Debian to join the DHCP Forum (Debian is already a member of the BIND Forum) and I think they've started talking to the Debian folks responsible for our BIND Forum membership about extending that to cover the DHCP Forum as well. So that's about it. I think after three years of being the sole uploader, I'll formally put myself in as the maintainer and Eloy as an uploader until I get around to implementing collaborative maintenance.

Holger Levsen: FOSDEM 2008 Debian dev room videos sneak preview

Somehow the title of this blog post makes me think of a very long german word and doesn't sound really english to me. But I guess you either already noticed or don't care or both :-)

So, whatever: right now the encoding batch of the high resolution theora videos from the Debian dev room at FOSDEM is running and the the low resolution theora videos are being uploaded. Yay! These videos will become available at the usual place within the next hours.

These are unedited videos as they were recorded to hard disk in Brussels. And even like this they already look really great, thanks to dvswitch and the slidegrabber and they also sound really good! IMHO ;-) (And for sure, the high res ones are much better than the low res ones...) Out of fourteen talks, ten will need simple post-processing: just cutting away something in the beginning and at the end. The other four are a bit more complicated, as I'll need to grab from tape and cut them together.

And there is significantly more stuff I want and will blog about these recordings and our setup in general, but this will have to wait. It's 1:42 AM and I'm a bit tired :)

So I'll just say "thank you all who made this possible" (you know who you are and I don't "only" mean the volunteers listed on our event wiki page but all helpful people at FOSDEM) and have fun at (or watching the streams from) the Linux Audio Conference!

P.S.: "umount -l" made my day.

Filip Van Raemdonck: PyGTK/glade object reuse

Someone asked on the PyGTK mailinglist if it is possible to reuse certain parts of a libglade window several times within an application.
It certainly is, and it's not even hard to do!

I've quickly written a demo application to show how it's done.
The user interface designed in glade is really simple, a textbox with two toggle buttons underneath. Activating one button will display a second, disparate textbox beside the original one. Deactivating it will remove that second textarea.
The other button will display and remove a copy of the first textbox which was there from application startup.
The full widget tree of this interface is shown in the first screenshot. Glade widget tree The actual code to the demo application is rather brief.
The main point to keep in mind is that you can't actually reuse the same widget, more than once, at one time. You could reuse it if you'd make sure it's never used more than once at the same time, and keep track of it (you also have to make certain it doesn't get accidentally destroyed along the way!)

What the demo really does, and what libglade allows you to do, is use (parts of) the same interface definition over and over again to build distinct PyGTK objects and add them to the existing interface. At least the PyGTK implementation of libglade, and possibly the native C libglade as well, actually caches the interface definition in case you'd want to reuse parts of it for additional object creation.

Let's have a closer look at how it's done:
import gtk, gtk.glade
class ReuseDemo:
  def __init__ (self):
    self.gladefile = 'glade-reuse-demo.glade'
    self.xml = gtk.glade.XML (self.gladefile)
    self.win = self.xml.get_widget ('firstWindow')
    self.theContainer = self.xml.get_widget ('theHBox')
    self.xml.signal_autoconnect (
                     dict (gtk_main_quit=gtk.main_quit,
                     btn1_toggled=self.toggle1,
                     btn2_toggled=self.toggle2))
    self.buttons = (self.xml.get_widget ('tbtn1'), self.xml.get_widget ('tbtn2'))
    self.childTree = None
    self.win.show_all()
Demo application window First step is to import the gtk and gtk.glade modules.
The actual demo is in a little class; it's constructor starts by storing the name of the glade file, because it's needed later to construct the additional objects from (even if the caching should mean it isn't really re-read anymore). The xml tree from this file is parsed by pyglade and the window object is retrieved from the first of the two windows defined in it. At this point the window is already a PyGTK object!

The container that needs to have objects added to and removed from is also retrieved and stored as a class attribute. The signals for the two toggle buttons and to allow a graceful exit by means of the windowmanager close button are connected to their handlers, and the two togglebuttons' objects are also retrieved and stored away for later reference. Finally, a variable to hold a reference to the secondary textbox objects is initiated, and the window is shown.
  def toggle1 (self, btn):
    self.toggle (btn, 'txtContent', 1)
  def toggle2 (self, btn):
    self.toggle (btn, 'txtOther', 2)
The two toggle button callbacks call a single method, with the gladeXML tagname for the respective textbox object each one needs to display or remove and an index number for arguments (in addition to the togglebutton object reference that the callback received as it's first argument).
  def toggle (self, btn, tagname, idx):
    self.buttons[(idx%2)].set_sensitive (not btn.get_active())
    if not btn.get_active():
      if self.childTree:
        self.theContainer.remove (self.childTree)
        self.childTree = None
    else:
      objXML = gtk.glade.XML (self.gladefile, root=tagname)
      self.childTree = objXML.get_widget (tagname)
      self.theContainer.pack_end (self.childTree)
The important logic is in the final method. First, the button which is not toggled is disabled or enabled for user interaction, depending on the activated state of the toggled button. Because the indices passed on by the two toggle buttons' callbacks were one-based, while the python tuple that holds references to the toggle buttons is zero-based, the remainder of a division by two of the callback index will automatically point to the button that was not toggled. Alternatively the values 1 and 0, in that order, and thus pointing directly to the tuple indices could also have been used as index arguments for the two callbacks.

The necessity of disabling the other button when one is activated, and therefore two textboxes are displayed, is because the demo isn't written to support displaying more than two textboxes at the same time, but especially removing the correct textbox when three would be visible. If it were extended in that sense, the need to disable the other button would disappear.

Next the activated state is tested; if the button is deactivated, the second textbox is removed from the container and the reference to it removed, while if it's activated, a new object is instantiated from the gladeXML description and added to the container.
Here's where the gladeXML tagnames come in: to recreate only part of the widget tree, and retrieve the actual widget from the parsed tree. Note that you must reconstruct the parse tree here; retrieving the same object from the original parsetree and trying to add it a second time to the container will result in a GTK+ warning (on the console) and nothing being added at all.

That's all there is to it, really. All that is left is to instantiate a class instance and start the GTK+ mainloop:
if __name__ == '__main__':
  ReuseDemo()
  gtk.main()
The second screenshot is an example of how the application might look in one specific state.

A tarball with the glade and python code is available from the sysfs download area.

Eddy Petrișor: Postfix - (almost) a satellite system

When installing postfix and configuring it to act as a "Satellite system", all mails, including messages to root, will go to the remote mail delivery system. Also, there might be a local user account that absolutely doesn't exist on the remote MTA and should stay on the local machine, but, by default, this doesn't happen.

This is not good.

What is needed in such a case is virtual_alias_maps and a /etc/postfix/virtual file such as:

root root@localhost
root@fqdn.domain.name root@localhost
eddy eddy@localhost
eddy@fqdn.domain.name eddy@localhost

Don't forget to run postmap /etc/postfix/virtual, after restarting the system.


This tip is particularly useful on laptops.

MJ Ray: South-West MP Promotes Credit Unions as Reasonable Universal Credit

John Penrose said:
"[...] the credit union movement in this country is exactly the kind of excellent initiative that [...] fulfils many of the necessary and vital functions that she has mentioned and is aimed at those at the bottom of the income scale."
Source I've emailed him a thank-you and been told that ABCUL will explain to Fiona Mactaggart how they're working to increase coverage and capacity. I've noticed credit unions in the south-west expanding their areas, or merging in order to serve more members. I think we've also got a credit union rep on the board of Cooperatives-SW again. Yay. Now, back to coding.

MJ Ray: Current Issues / Council Chief Exec Online Chats

The council chief executive is currently open for online chats for another 30 minutes at the council web site.  You need a fully tricked-out browser and will probably have to wait some time.  It's not really an online question time - you can't see anyone else's questions being answered.  I'll post here about my experience later.

Lucas Nussbaum: Google Summer of Code s real goals?

There’s an interesting discussion about Google Summer of Code going on debian-devel@. The question can be summarized as “Should we allow current Debian contributors to be students in GSOC?“? The GSOC FAQ says:
Google Summer of Code has several goals:
  • Get more open source code created and released for the benefit of all;
  • Inspire young developers to begin participating in open source development;
  • Help open source projects identify and bring in new developers and committers;
  • Provide students in Computer Science and related fields the opportunity to do work related to their academic pursuits during the summer (think “flip bits, not burgers”);
  • Give students more exposure to real-world software development scenarios (e.g., distributed development, software licensing questions, mailing-list etiquette).
The problem is that those goals are clearly conflicting: Another problem is that in the past, some students that were also debian contributors had problems organizing themselves: they used some of their GSOC time to work on their usual Debian tasks, leading to results that were a bit disappointing. But it’s possible that this is mainly a management problem (however, mentoring people takes a lot of time, and only students are paid, not their mentors). How do you deal with that in your project?

MJ Ray: SPI Meeting Wed 27 Feb 1900Z irc.oftc.net/#spi

The SPI meeting mentioned took place on Wed 27 Feb 2008 1900Z. I've posted the highlights and log to spi-general. I wasn't there because I was moderating the local cycle forum's meeting. It's a little disappointing that the announcement was so late, but at least it happened. It seems very disappointing that correspondence isn't being reported by the secretary, but maybe there's some innocent explanation that will come out now I've asked the question on-list.

MJ Ray: Current Issues / NS Cycle Forum 2008-02-27

I was at the North Somerset Cycle Forum yesterday.  There wasn't any feature presentation, but there were still several interesting topics.

We reviewed last year's work and were introduced to the 08/09 work programme. Lots of last year's work was completed, or is nearly done and the funding for the couple of failed projects was transferred elsewhere.

Among things that have been improved but not completed last year was Hewish rail bridge. That bridge on NCN 33 is single-track with "temporary" lights which are dangerous because they don't detect cyclists accurately. There is now a cycle bypass of the lights along a shared surface, but Network Rail do want to fix it before it collapses and they want a fairly large contribution from NSCouncil to make it take 40 tonnes instead of 7 tonnes. That's been put forward for 09/10 year funding, because it will remove lorries from a long diversion through residential areas in Ebdon, Ebdon Grounds and North Worle.

On the Strawberry Line (NCN 26), work on Winscombe to Shute Shelf and Congresbury station are about to go out to tender now. Sandford ramp should be built late spring. The River Yeo crossing at Tutshill (which will take 7 miles and Congresbury off Weston-Clevedon rides) will be investigated independently of the tidal trail walk.  The town end of the current Locking Road WsM cycle lanes are up for improvement, as is New Bristol Road Worle.

We looked at the latest draft of the North Somerset Cycle Map and suggested changes.  My contributions were to suggest remapping part of North Worle and marking Clevedon Road WsM as a suggested route, because I think that will have benefits when the Tropicana is rebuilt.

North Somerset are applying for Weston-super-Mare to be one of the new cycling demonstration towns.

Combining two of my hats, I agreed to take up the loss of (council?) cycle stands from the Cooperative Food store (ex-LocalPlus) in Long Ashton and see if we can behave better. 

Future meetings: Thu 24 Apr, Tue 24 June (both 6pm), Wed 10 Sep, Thu 13 Nov, Tue 6 Jan, all Locking Castle Campus Room 2 unless changed.

Any comments or questions?

27 February 2008

Neil Williams: Debconf8 flights

Noting comments by bubulle and Debian-uk preparations, I've started looking at flights for Debconf8 with an eye to actually making a booking.
There appears that there will be a variety of Debian-ites hanging around Madrid airport and catching an apparently very limited number of flights to Buenos Aires as I seem to only be able to find 2 flights a day between Madrid and Buenos Aires.
Bubulle notes a connection from Paris to Madrid, I (and most of the UK team) would need a connection from London to Madrid. For some bizarre reason, leaving from Gatwick is more expensive than leaving from Heathrow. That's a PITA for me because my return flight home leaves from Gatwick.
More annoying is that the evening flight is much more expensive than the (very) early morning flight. So much so that it comes out at almost double the cost of even a relatively expensive hotel for the night.
My current ruminations revolve around:
flight  780.62   	- Expedia Special Fare
07:25 Depart London (LHR)
Arrive Buenos Aires (EZE) 19:25 Fri 1-Aug

13:25 Depart Buenos Aires (EZE)
Arrive London (LHR) 10:05 tip+1 day Sun 17-Aug

The arrival back in London is good for me because it provides plenty of time to get between Heathrow and Gatwick, even on a Sunday. :-)
I guess London is a little further from Madrid than Paris - my trip comes out at over 1,000 compared to 900 from Paris. Can't really justify a return Eurostar for that difference.
(Yes, I'm travelling out for DebCamp too.)

Steve Kemp: I'm wearing my heart like a crown

For the past couple of days I've been working on some "easy hosting" setup for Debian. This is a continuation of my shell-script based solution, but intended to be much more dynamic. The system makes it simple for us to deploy a Debian Etch installation, and allow users to create virtualhosts easily. (And by easily I mean by creating directories, and very little else.) So, for example, to create a new website simple point the IP address of your domain example.org to the IP of your machine. Then run:
mkdir -p /srv/example.com/cgi-bin
mkdir -p /srv/example.com/htdocs
If you then want to allow FTP access to upload you may run:
echo "mysecretpass" > /srv/example.com/ftp-password
This will give you FTP access, username "example.com", password "mysecretpass". You'll be chrooted into the /srv/example.com/ directory. All of this is trivial. Via Apache's mod_vhost_alias, and a simple script to split logfiles and generate statistics via webalizer for each domain. The only thing that I really needed to do was to come up with a simple shell script & cron entry to build up an FTP password file for pure-ftpd. So here's where it gets interesting. The next job, obviously, is to handle mail for the domains. Under Debian it should be a matter of creating an appropriate /etc/exim/exim4.conf - and ignoring the rest of the setup. I'm getting some help with that, because despite knowing almost too much about SMTP these days I'm still a little hazy on Exim4 configuration. I'm watching the recent debian configuration packages system with interest, because right now I'm not touching any configuration files I'm sure that it is only a matter of time.
In other news I cut prices, and am seeing a lot of interest in my mail-scanning. Finally my .emacs file has been tweaked a lot over the previous few days. Far too much fun. (support files.)

Neil Williams: Problems with minicom over USB

Embedded systems (especially bootloaders) need serial connections but many laptops and modern desktops simply do away with the serial port altogether. Up until now, I've kept my previous desktop machine around (which happens to also have a parallel port so acts as the home network print server because I don't have a USB printer either) and then connect to minicom over SSH.
Now, yes, I can configure networking over USB once the device is installed but to actually fix installation problems, I need serial on my other machines. I've got a USB to serial converter, turns out to be a Prolific 2303 chipset (it's the basic one with a cable from Maplins) which is quite well supported.
Now the weird stuff.
My powerpc laptop sees the Prolific chipset and configures a USB device that, initially, minicom complains about - but if I set the port from 'dmesg' (/dev/ttyUSB0) in minicom -s, it works. Well, almost. I can see the output of the device but no keyboard strokes are passed on to the board which means it's almost workable whilst still being completely useless.
My problematic HP laptop accepts the Prolific chipset but does not configure a USB device node. Without a device node, minicom just fails.
Bah.
This HP laptop is still causing me grief. USB seems to fail after hibernation and only works at all if irqfixup is added to the kernel boot parameters. With irqfixup, the laptop randomly hangs. I almost need to setup parallel configs in grub of "run USB but don't hibernate" and "run for more than 1 hour" as mutually exclusive. Oh, and the external monitor connection used for presentations is only seen if the projector is connected during a reboot of the HP laptop.
Bah x 3.

Russell Coker: Redirecting Output from a Running Process

Someone asked on a mailing list how to redirect output from a running process. They had a program which had been running for a long period of time without having stdout redirected to a file. They wanted to logout (to move the laptop that was used for the ssh session) but not kill the process (or lose output). Most responses were of the form “you should have used screen or nohup” which is all very well if you had planned to logout and leave it running (or even planned to have it run for a long time). Fortunately it is quite possible to redirect output of a running process. I will use cat as a trivial example but the same technique will work for most programs that do simple IO (of course programs that do terminal IO may be more tricky - but you could always redirect from the tty device of a ssh session to the tty device of a screen session). Firstly I run the command “cat > foo1” in one session and test that data from stdin is copied to the file. Then in another session I redirect the output: Firstly find the PID of the process:
$ ps aux grep cat
rjc 6760 0.0 0.0 1580 376 pts/5 S+ 15:31 0:00 cat Now check the file handles it has open:
$ ls -l /proc/6760/fd
total 3
lrwx—— 1 rjc rjc 64 Feb 27 15:32 0 -> /dev/pts/5
l-wx—— 1 rjc rjc 64 Feb 27 15:32 1 -> /tmp/foo1
lrwx—— 1 rjc rjc 64 Feb 27 15:32 2 -> /dev/pts/5 Now run GDB:
$ gdb -p 6760 /bin/cat
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc
[lots more license stuff snipped]
Attaching to program: /bin/cat, process 6760
[snip other stuff that’s not interesting now]
(gdb) p close(1)
$1 = 0
(gdb) p creat(”/tmp/foo3″, 0600)
$2 = 1
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from program: /bin/cat, process 6760 The “p” command in GDB will print the value of an expression, an expression can be a function to call, it can be a system call… So I execute a close() system call and pass file handle 1, then I execute a creat() system call to open a new file. The result of the creat() was 1 which means that it replaced the previous file handle. If I wanted to use the same file for stdout and stderr or if I wanted to replace a file handle with some other number then I would need to call the dup2() system call to achieve that result. For this example I chose to use creat() instead of open() because there are fewer parameter. The C macros for the flags are not usable from GDB (it doesn’t use C headers) so I would have to read header files to discover this - it’s not that hard to do so but would take more time. Note that 0600 is the octal permission for the owner having read/write access and the group and others having no access. It would also work to use 0 for that parameter and run chmod on the file later on. After that I verify the result:
ls -l /proc/6760/fd/
total 3
lrwx—— 1 rjc rjc 64 2008-02-27 15:32 0 -> /dev/pts/5
l-wx—— 1 rjc rjc 64 2008-02-27 15:32 1 -> /tmp/foo3 <====
lrwx—— 1 rjc rjc 64 2008-02-27 15:32 2 -> /dev/pts/5 Typing more data in to cat results in the file /tmp/foo3 being appended to. Update: If you want to close the original session you need to close all file handles for it, open a new device that can be the controlling tty, and then call setsid().

26 February 2008

Christian Perrier: Crazyness of flight prices

Here comes this time of the year where I try booking a flight to go to Debconf. That roughly means finding the cheapest way to go from CDG to EZE (Buenos Aires airport code). And, as usual, that means finding the crazyness of flight prices: the cheapest I found as of now is EUR902 with Air Europa through Madrid. The funniest is that the very same flight, *from Madrid*, costs EUR1407. Air France, which has a daily direct flight from Paris to Buenos Aires, is very expensive for me (EUR1150) and I bet that it could be as low as EUR900 for people coming.....from outside France, with a connection. That seems to be the interesting effect of airline companies trying to attract passengers to their long distance hubs. In short, I would bet that at least for all European people around, the cheapest route to Buenos Aires will be a route with a connection somewhere lese in Europe. So, even if one lives close to one of the biggest hubs in Europe, you nearly have no chance to use the direct flights it has to many places around...unless you're ready to pay for it.

Russell Coker: Future Versions of Windows

There is currently a lot of speculation about the future of Windows following the massive failure of Vista in the market. One theory that is being discussed is that Microsoft will cease kernel development and adopt a Unix kernel in the same way that Apple adopted a BSD based kernel. I predict that MS in it’s current incarnation (*) will never do that. Having an OS kernel that enables easy porting of code to/from other platforms is entirely against their business model which relies on incompatibility to lock customers in. Whatever kernel MS use, it has to be incompatible in some ways with everything else. One easy way of achieving this would be to have a shared object (DLL) interface published and have the interface between the libc and other libraries and the kernel be undocumented and ever-changing (simply renumbering the system calls on every minor version increment would be a good start). The DLL interface could then have the complex APIs that MS loves to force on their victims (see Stewart Smith’s post about getting a file size in Windows for an example of the horror [1]). The advantage of this approach would be that MS could cease developing an OS kernel (something that they were never much good at) and concentrate on owning the proprietary DLLs. There would be nothing stopping them from using a Linux kernel for this, as long as they release all source to the kernel they use (including the patch to renumber the system calls) they would be within the terms of the GPL. My specific prediction is that some time between Jan 2011 and Dec 2016 Microsoft will release systems with the majority of the kernel code coming from BSD or Linux as their primary desktop and server operating systems. Could people who disagree please make specific predictions for the future (including dates and actions) so that we can determine who was most accurate. (*) For future incarnations of Microsoft after chapter 11 or being split in the way that AT&T was there seems no possibility to predict their actions.

Next.

Previous.