Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Friday, March 12, 2010

Part 3a: xlog - Preparing to hack, the aftermath.

The previously published parts of this series can be found here:

Some build issues...

After completing a build, it would be nice if we could return the code the state we started from. This is actually more than a 'nice to have' as it is a useful indicator of completeness. For example, if a particular compiled file isn't removed in a 'make clean', then maybe the associated source code hasn't been added to the source repository. There is not necessarily any logic in this, except that something is wrong, needs to be looked at and fixed.

I think of this as being a zero'th order test for any software that I compile from source, and git makes this issue very easy to describe and characterise.

With regards to 'xlog', after a build and a 'make clean', the 'git status' command reveils the following (where I've reformatted the output just a little.)

Changed but not updated:
  deleted:    po/xlog.pot
and
  modified:   CVS/Entries
  modified:   data/doc/CVS/Entries
  modified:   po/CVS/Entries
  modified:   src/CVS/Entries
and
Untracked files:
  AUTHORS
  CVSROOT/
  ChangeLog
  Makefile.in
  autom4te.cache/
  configure
  data/Makefile.in
  data/desktop/Makefile.in
  data/doc/Makefile.in
  data/dxcc/Makefile.in
  data/glabels/Makefile.in
  data/man/Makefile.in
  data/maps/3D2/Makefile.in
  data/maps/3Y/Makefile.in
  data/maps/E5/Makefile.in
  data/maps/FK/Makefile.in
  data/maps/FO/Makefile.in
  data/maps/FR/Makefile.in
  data/maps/HK0/Makefile.in
  data/maps/JD/Makefile.in
  data/maps/KH8/Makefile.in
  data/maps/Makefile.in
  data/maps/SV/Makefile.in
  data/maps/VP6/Makefile.in
  data/maps/VP8/Makefile.in
  data/mime/Makefile.in
  data/pixmaps/Makefile.in
  data/remote/Makefile.in
  data/utils/Makefile.in
  src/Makefile.in
  src/logfile/Makefile.in

The first issue is with po/xlog.pot, which has mysteriously disappeared. It can be restored with the following.

$ git checkout -- po/xlog.pot
I have seen glib errors when trying to run the application and haven't got to the bottom of this yet. I don't see the error occur if I make sure that the above file is present, but I haven't been able to reliably replicate to problem.

The '''CVS/Entries''' files can be committed to the git repository, but looking at the actual differences shows that this is only due to timestamp changes from upstream. It would probably be safe enough to ignore these files, and git has a file that allows these this to be set. (An exercise for the reader. Have a look at the man page for git.)

$ git diff CVS/Entries
diff --git a/CVS/Entries b/CVS/Entries
index 30be513..42e4863 100644
--- a/CVS/Entries
+++ b/CVS/Entries
@@ -36,4 +36,4 @@ D/xlog////
 /missing/1.3/Wed Jan 14 11:45:11 2009//
 /mkinstalldirs/1.3/Wed Jan 14 11:45:11 2009//
 /xlog-2.0.lsm/1.1/Tue Feb 10 09:33:11 2009//
-/aclocal.m4/1.8/Thu Mar 11 11:55:55 2010//
+/aclocal.m4/1.8/Thu Mar 11 12:54:52 2010//

Finally, other than '''AUTHORS''' and '''ChangeLog''' (which are symbolic links as specified in README.cvs) all of the other files have come into existence in the build process and should be able to be safely removed, as they didn't exist in the original source.

$ rm -rf autom4te.cache
$ rm configure
$ find . -name Makefile.in | xargs -n 1 rm

This leaves use with the following, which is where we want to be:

$ git status
# On branch master
# Untracked files:
#   (use "git add ..." to include in what will be committed)
#
# AUTHORS
# ChangeLog
nothing added to commit but untracked files present (use "git add" to track)


A git repository with the code that I will be working on in the next blog posts has been setup here: http://git.mawsonlakes.org/cgi-bin/gitweb.cgi?p=paul/xlog.

Monday, March 08, 2010

Appendix: References (links etc.) for xlog hacking.

Useful Webpages

xlog

git

git - The Fast Version Control System

epkg

epkg is an encap package manager.

Software Repository

I'll be updating my code changes to xlog here.

Part 3: xlog - Preparing to hack

The previously published parts of this series can be found here:
So, we've downloaded the source code for xlog from the CVS repoistory:
  cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/xlog co xlog
Even before configuring, the first thing I do is put the whole thing into a Git repository. The main reason for doing this upfront is that it then becomes possible to see what files are created or altered during the software building process. When we get around to making changes we can then make use of branches and commits.
  cd xlog
  git init-db
  git add .
  git commit -m 'Initial commit'
Use 'git status' to see which files are different.

Lets now build the software, as per README.cvs.

  ln -s ...
  autoconf
  automake
  ./configure
  make
  make install
Now, 'make install' will fail unless you give yourself system (root) privileges as it will try to install the code into the system directories (eg. /usr/bin, /usr/lib etc.). For the developer, there are several methods to get around this requirement. I use a tool called 'epkg', which allows software to be installed

To update the repository from upstream:

  (commit any outstanding changes to another branch)
  git checkout master
  cvs update
These changes can then be pulled into a local working branch by using:
  git checkout (your-branch)
  git rebase master

Thursday, March 04, 2010

Part 2: Hacking on xlog

In the first part on "Hacking on xlog" I eluded to the fact that xlog was good, but that I wanted to made some changes to it. The following article discusses these changes. What changes do I want to make to xlog?
  • Be able to add additional rules for more contests - Currently xlog has some useful rules and checks (eg. duplicates) but they are either overly general (check for all the duplicates in a log file) or specific to a particular competition. It would be good able to support different contests rules by either an extension language or a plug-in or dynamic library architecture.
  • Make the User Interface (UI) layout configurable - It would be good to be able to modify the UI to suit the way that I setup and use my set radio. Gnome and Gtk+ applications can be written using libglade, where the UI is defined in an XML file along with the functions that they call. It is then possible to rearrange the interface via the XML code, without touching any of the underlying code. Currently, xlog has 'hardcoded' all of the widgets and their positions into the code of the application itself.
  • Add support for other forms of radio operation - Logging is necessary in on-air contests but there are other types of radio operation where a suitable logging application would also be very useful. Examples include: Running nets, Message Relaying and Emergency Operations.
  • Multiple Operator Support - Support for multi-user access and multiple user logs. This would be useful for multiple user stations and for collating logs for competition managers.
In order to make these changes and make any form of useful contribution, I'm going to have to download the code and spend some time poking around in it, just to understand how it works. More about this in my next post.

Tuesday, February 23, 2010

Logging Software for Amateur Radio contacts - xlog

Introduction

Something that I have recently been looking into is Amateur Radio logging software available on Linux, in particular Ubuntu and Gnome. One of the things that Ham (Amateur) Radio operators like to do is make contacts with other Hams, exchange details and sometimes, even exchange physical 'QSL Cards', which are postcards giving details of the contact made (Frequency, Equipment used etc.). In general, the more and varied these contacts are the greater the enjoyment found in the hobby. In addition to the adhoc 'CQ' contacts, there are regular contests, where operators try to make contacts in a particular period of time, on particular radio bands. Logs of the contacts make are submitted to the contest manager and points are awarded based on the contest rules. Rules include such things as a point for every contact made, multipliers for contacts made in particular bands and bonus points given for particular types of contacts. The software that I have found and I am most happy with is called 'xlog', which does most of what I want. I would like to be able to get it to do more (see below) and there are a couple of things which if they were done just a little bit differently would make if even more useful and easy to customise. The software is licensed under the GPL v2, so in the words of Jeremy Clarkson - 'How hard can it be?' The plan is to put together a series of posts about my experience with working on this software. Future posts will follow something like the following outline..
  • What do I want to change?
  • Getting the source - and using git.
  • Setting up the development environment - using epkg
  • Making changes.
  • Getting these changes back into xlog.
Watch this space.

Wednesday, December 16, 2009

Expect Kakapo

Its of to Linux.Conf.Au 2010 in Wellington, New Zealand. Work isn't paying for the trip this time around, so I'll be going as a hobbist. I'll miss out on the Professional Delegates Networking session, which would have been good, but there is usually plenty of left over swag to buy at the end of the week. For those that missed the reference in the title, a Kakapo is a flightless nocturnal native New Zealand parrot. Some of the things I want to get out of this conference:
  • Peoples experiences, both good and bad, with organising a Linux User Group. There is a group of Adelaide people looking to start up one in the New Year... any advice would be most welcome.
  • Thoughts, comments on how to get people talking about, using and experiencing Free and Open Source Software (see first point).
  • Meeting other Linux Users who are also Ham Operators (VK5FPAW listening).
  • Put together an Arduino board by hand - see the Arduino mini-conference.
.. now what have I missed.

Sunday, January 20, 2008

Off to Linux.Conf.Au 2008

It's January! ...and that means that it is again time for the Annual Linux.Conf.Au, this year being held in Melbourne from Monday, 28 January to Saturday, 2 February 2008. It's returning to the location where it all started in 1999, where the 'Conference for Australian Linux Users' (CALU) was held. I attended that one, missed the next two LCA's but have been to every one since. (There was no LCA in 2000.) If you are interested in this history, more details can be found on the Linux.Org.Au website. As always, LCA is going to be incredibly interesting. It is going to very tough choosing between speakers (http://linux.conf.au/programme/presentations) as the entire week is packed with lots of people talking about lots of technically interesting linux and Free and Open Software related stuff.. my current short list looks like: Hardware / Software Hacking: Joining Second Life to the Real World, The Kernel Report, OLPC, Peace, Love, and Rockets!, Kernel hacking: hacking on lguest Clustered Samba - not just a hack any more, Parrot: a VM for Dynamic Languages, The Replicators Are Coming!, Farsight 2: Video conferencing made easy, Create your own Open Source Dance Mat, The Australian Open Source Industry & Community Census 2007. Amongst all this, there are also the Mini-confs, Birds of a Feather (BoFs) sessions, the hacking in the hallways and the catching up with people not seen since the last LCA. The only down side (that I can see) is that the conference has limited places and that they have all sold out. This won't stop you getting to meet some of the fantastic people or technology. If you are in Melbourne on Saturday, 2 February, make you way down to Union House, Melbourne University for the Open Day. More details and the online registration are here.

Monday, June 11, 2007

One Laptop Per Child

I was fortunate enough to be sent an OLPC laptop, when they did their run of the B2 (the second build of the X0-1). This came about through my participation in the Linux.Conf.Au conference in Sydney, earlier in the year, and was one of the coolest things that has ever happened at any of the LCA conferences.. ever. (Even better than the dunk tank in at the Adelaide Conference - sorry Michael). I've named it sparky, and he's starting to become known as a bit of a celebrity. For more information about the OLPC project itself, see their website: laptop.org

Connecting Up 07

Sparky recently appeared at the Connecting Up 07 conference in Adelaide in the Linux Australia booth, along with two of his mates. Lisa Harvey, the Managing Director of Energetica in New South Wales borrowed Sparky as an example in her talk - 'Clever Cookies, Innovation in the Non-Government Organisation sector'. Hand delivered by Joel Stanly, the three laptops had just come back from a weekend in Melbourne where they had put in a guest appearance at a teachers conference. Here you see Joel attempting to cross North Terrace in Adelaide, which is currently subject to construction work as the new tram line is being put in. Other people also had a chance to have a look and play. All in all, the everyone who came to the booth got a chance to meet Sparky. There was also a funky piece of networking (if I do say so myself) that was done to get Sparky to be able to access the local wireless internet service.. it involved two other laptops, a crossover cable and a 802.11b network card with some dodgy firmware, but nothing that a periodic shell script couldn't fix. I'll let you join the dots.

Since Connecting Up..

Sparky has also spent two weeks with Dave the 'life kludger', who spend some time looking at accessibility. You can find the writeup, with some great pictures in Dave's blog.

What next?

Sparky needs an operation. In order to fix a couple of hardware issues, he needs someone with some surface mounted component soldering skills. The details are here: B2_Suspend_ECR Watch this space.

Tuesday, May 15, 2007

At ConnectingUp07

It has been a while since I have added an entry to this blog, but given where I have been the last couple of days, I thought it was about time I added an entry. I have been at ConnectingUp07, which is a very exciting conference, being held in Adelaide, on using Information and Communication Technology (ICT) in the Not-for-profit sector and community groups. Talks have ranged from business orientated talks (what services are available), how to produce effective web fund-raising campains, and some of the more interesting ICT projects done in the wider Australian community. I have been looking after the Linux Australia booth, and it has been really great to hear from the people in the sector making use of Free and Open Source software in their projects. There are some definite lessons that Linux Australia can learn from this event, both in the information that was presented ("How to develop effective online strategies."), and how we can present ourselves in a way that is relevent to this sector. Some notes:
  • Many of the talks were by businesses and organisations offering services to Not-for-profit sector. This included consulting services, bulk-buying (eg. computer hardware and telecommunications sevices) and software.
  • Free and Open Source software was often mentioned in project reports, where budgets were limited. It was shown that Free and Open Source software was able to solve real problems
  • Online services (myspace, youtube, flickr, blogspot, digg) were described as essential tools for building a community around a particular issue or organisation, as well regular targeted emails. Use of these systems need to be part of a complete online web strategy, and not individually seen as an end itself.
This article was written on one of three 'One Laptop Per Child' (OLPC) laptops which were being demonstrated in the Linux Australia booth.

Wednesday, December 27, 2006

2007: The Year of the Penguin

Here in Australia we saw the film 'Happy Feet' open on Boxing day (26 December). It had been released in the United States on November 17-19, and in other places around the world on December 8. The promotion of this film has got me thinking about my other favourite penguin and what 2007 may hold. Almost every year, since 2000, has been declared as the year that Linux will make it on the desktop, and while inroads have been made in some key cases, Linux hasn't managed to capture the hearts of desktop users just yet. I predict that this will all change in 2007, and would like to take this moment to announce that 2007 is the International Year of the Penguin. Well.. I can at least pretend. According to Wikipedia it is the International Year of Planet Earth and with the current issue of global warming, the Penguin makes an ideal mascot. How we can care for our environment is also important, and I can't think of any better way for making use of older PC's than installing Linux on them and allowing them to continue to be useful.

Friday, December 08, 2006

Apple, Linux Operating System, and others.

Something occured to me the other day, and that was how long will it be before Apple switches it's operating system to Linux. I cannot claim to be 'in the know' about anything in the greater IT industry. I have put together the following arguments given what I do know about the use of Free and Open Source Software (FOSS) and my general knowledge of the consumer IT marketplace. I have been using Linux on my PowerPC based Mac Mini for almost two years now, and I could not have asked for better hardware for my open source operating system. There are numerious links and discussions on the net about running Linux on Apple hardware, from the old and new PowerPC models, through to the new Intel based PC's and Laptops. A quick search in Google throws up the following: * http://www.linuxjournal.com/article/7012 * http://www.oreillynet.com/pub/a/oreilly/editors/apple_linux_0503.html * http://www.linux-on-laptops.com/apple.html As these, and other articles indicate, Apple has been very canny in it's dealing with the Free and Open Source Software community. The Linux Kernel runs on their hardware very well. In the past, commercial grade Linux systems have been driven by vendors who have produced their own distribution to sell (RedHat with Enterpiose Linux, Novell with Suse) or else have used certified their sytems to run with these distributions. Apple has steered clear of this, rather they adopted the Open Source Mach kernel, changed the system to meet their needs, and released it as their proprietory operating system MaxOS X. Why should they change? The world is maturing in it's use of Free and Open Software. There are now many examples of communities of software developers which support Free and Open Source software projects, and this community of communities has always learnt from each other, exchanging ideas, and continuing to grow and advance. As if it needed proving, over the last two years the Ubuntu community and Canonical have show that with good leadership it is possible to build a highly successful and popular FOSS project based on an open community development model. Recent agreements between Microsoft and Novell, owner of the Suse distribution, have shown that commercially controlled distributions are open to abuse. The developer and user community that is built around these distribution then suffers accordingly. Whatever the agreements are between these two organisations, Novell must have made some concessions to Microsoft. How can there be a deal without them. These concessions, if they are an acknowledgment of technology which is solely owned and controlled by Microsoft (in the form of software patents) mean that Novel will have to restrict what it's developers can and can't do, regardless of how small, of what that may be. The Free and Open Source Software movement is similar to the internet in this regard. To use a quote - "The Internet interprets censorship as conjestion and routes around it." So what should Apple learn from this? Apple is a single vendor, doing unique things, and reaping the benefits. It has made use of the Free and Open Source Community to open the market for it's servers, particularly in the Higher Education market. The FOSS community, with IBM, has fought and thought that they had won the battle against the unsubstantiated claims brought against them by SCO. Microsoft, a backer of SCO, has now signed a deal with Novell, and is making more intellectual property claims against the FOSS community and Linux in particular. The fact that this has been done under the guise of 'consumer protection' for Novell's customers, a small fraction of our community, makes it even more of a travesty. Apple have shown that they are open to change. They were able to move their entire product line from PowerPC to Intel based processers, and they were able to do this because they had build their Operating System on a base which is designed to be portable. Linux is now (if you believe the web reports) the primary platform for networking research and development. It used to be netBSD. Apple can hold onto their current system, as good as it is, and re-implement all the improvements that will be emerging, or they can (if they haven't already done so) port their gloss and shine to run on top of Linux. In the process, they will be building on the best software development community in the world, strengthening the Free and Open Source movement and guarantee the ongoing existence of this fantastic world wide resource.

Wednesday, October 11, 2006

Opinion: 5 Reasons Why Vista Will Be Microsoft's Last General Purpose Operating System

Microsoft Vista is on its way, the beta has been released, and prices have been announced. The last update from Microsoft also contained several fixes for it. Everything looks to be heading the the right direction. so why am I saying that this will be their last general purpose operating system? Here are my predictions for the Australian Operating System Market over the next 12 months, and into the future. 1. Microsoft's Do-not Operate System The release of Vista see Microsoft expanding on their policy on distributing different builds for different types of users. At last count seven different varieties have been listed - Starter, Home Basic, Home Premium, Professional, Small Business, Enterprise, and Ultimate. While this may be seem like clever marketing, where a user can buy a product that suits their needs, it will be the source of a lot of frustration. There will be features and applications which will be only supported on the more expensive versions. They have tried the software subscription model in the past, and it looks like that are trying it again. Users will realise that when they buy a computer with Vista installed, you won't be getting an Operating System, they'll be getting a Do-not Operate System (DOS). With the inclusion of more Digital Rights Management (Digital Restriction Management) and anti-piracy measures, there will be things that you used to do that will no longer be possible, because Vista and Microsoft won't let you... unless you pay more money. This is not that far fetched. Imagine a world where you will need to buy a licence for every movie that you want to watch, and only those from the specified list. In the above business model, this is not very far off. 2. Linux captures the desktop I don't necessarily like the battle field analogies, but here I am going to make an exception. I have witnessed one public skirmish, and I am pleased to say that for the members of the community that mattered, Linux was the last man standing. It has been predicted for a long time, but the deciding battle will be fought and won by Linux on the desktop in 2006-7. Why? By way of an example, in it's short two year existence, Ubuntu have created and released five(5) full versions of their Linux distribution, each one significantly better than the previous. Based on Debian, which has been around even longer, with backing from Canonical, Ubuntu have build up an incredible amount of experience and expertise around making, producing, and distributing quality software. This all-round, general purpose software is 'really free', and will enable anyone, anywhere, with commodity hardware, to participate in the commercial market place with a fraction of the related expenses that existing companies have. Why would a commercial organization spend money on something that was not going to directly lower expenses and increase profits. Their competitors weren't. News of local and international Free and Open Source projects are being heard, and organizations are starting to listen. Institutions, both Government and Not-for-profit, which supply services to the public are under increasing pressure to supply more for less. They will have to take a long hard look at Vista and try and figure out why they should be paying their money. It will be possible to make money by taking the older PC's, incapable of running Windows Vista, and converting them to workstations running Linux, which will have everything that an organisation needs. -- Watch for it. This will happen very rapidly -- 3. Professional Linux Support Services The increase of use within the corporate environment is being be spearheaded by the the large Linux supporting companies - IBM, Novell and Redhat. From the outsider, they have looked to be struggling to get customers using Linux on the desktop. This is all about to change. With this help, IT departments will find out how easy it is to install, run, and maintain an environment of Linux desktops. There may be an additional catalyst, like a large virus outbreak infecting Microsoft hosts, but this may not be necessary. Sites with web based applications will be able to be rollout/changed immediately, particularly in places like call-centres. Businesses with internal applications written in C# and Java will follow shortly after. As this migration starts, additional savings will become obvious. Ongoing cost of virus protection and software subscriptions will diminish, which in turn can be put back into the organisation as IT training, taken an profit, or feed back to the Free and Open Source software community as contributions or even donations. 4. Linux in the Community The Linux developer community in Australia has begun to engage the rest of the community in areas of mutual concern. Copyright Laws, Digital Rights Management (or Digital Restriction Management) and the Free Trade Agreement are all things which will directly effect every person whether they know about it or not. Software will again become known as something that can be freely and legally shared and developed. Free and Open Source Software will become part of the education of our children. 5. Linux and the Economy Reports will emerge regarding the importance of Free and Open Source Software and Linux to the Australian economy, and the numbers will not be small. There will no longer be any excuses for not supporting its adoption, and government and non-government organisations will be scrambling to maximise the benefits. I would also like to suggest that Free and Open Source software will be a Federal Government election issue in 2007. How each of the major parties approach it is something I can't predict, but they will ignore it to their peril. Free and Open Source software and Linux is not going away, and a government that ignores this is not doing their people any favours. ... so where does this leave Vista? The only market for Microsoft that makes sense to me is the one for embedded computers and appliances. The XBox, Windows OS on mobile phones, and Media Centre are the places where Microsoft are able to use their technology to its best potential, and where people will continue to be willing to pay for it. A buyer of one of these items, purchases them with a particular feature set and use in mind. The hardware and software are purchased together as a complete unit. Original equipment manufacturers (OEMs) and retailers want to sell lots of identical widgets, which they can service or replace easily. The operating systems required to get these products through the market will need to become more specialised. The days when a general purpose operating system could be used in this case, even on higher performance hardware, has pretty much gone. So what about Vista? This leaves Microsoft, after Vista's release, with two options. Either continue with the with the old Windows model, which doesn't make a whole lot of business sense, or reinvent themselves and again start to make something useful.