Blog

  • Fix FTBFS Jam

    As of me writing this post, there are about 428 packages that have failed to build from source (FTBFS)]. We’re doing a FTBFS jam this Wednesday (29 June, 2011). If you’re interested in helping out, drop by in #ubuntu-motu) and just generally say that you want to help fix FTBFS and someone will be able to guide you. We have a list of packages that are potential targets to be fixed.

    While we won’t try to fix everything, we’ll be focusing on specifc failures, the ones caused by toolchain changes. Ubuntu is changing the way it handles shared library linking. Similar changes are also happening in Debian.

    Before I get into spare details of the reason for these build failures, I’d like to emphasise that the failures that we’re targetting to fix are quite easy and just needs some tinkering with make files. I recently fixed a build failure in the redis package. Take a look at the build log of the failure, the patch that fixed it, and the build log after the fix.

    Cause of the failure

    For more information on fixing these failures, please see the Ubuntu wiki page and the Debian wiki page.

    Previously, the linker (ld) would allow indirect linking of shared library symbols. For example, if you had a function spin in the library libwheel, and the library libcar used libwheel, then a program that used libcar would have the ability to call spin even though it never directly used libwheel. This kind of indirect linking leads to fragile code; when the dependency chain of a shared library changes, it can break the program that used it.

    ld now runs with the --no-copy-dt-needed-entries option enabled by default. This option is also sometimes called --no-add-needed. This means that, in the example above, the spin function would only be available when libwheel was directly linked by adding -lwheel to the command-line compiler flags, and not available indirectly through libcar. Also, ld runs with the --as-needed option enabled by default. This means that, in the example above, if no symbols from libwheel were needed by racetrack, then libwheel would not be linked even if it was explicitly included in the command-line compiler flags.

    The solution to a build error caused by indirect linking, is to directly link all needed libraries in the compiler flags on the command-line. For example, if you were previously linking with -lcar -ltruck, you would now need to explicitly add -lwheel. For example:

    gcc -Wall racetrack.c -lcar -ltruck -lwheel -o racetrack 

    The --as-needed option also makes the linker sensitive to the ordering of libraries on the command-line. You may need to move some libraries later in the command-line, so they come after other libraries or files that require symbols from them. For example, the following link line is wrong, and needs to be changed so that libraries come after objects that use them:

    gcc -Wall -lwheel -lcar -ltruck -o racetrack racetrack.c 

    When problems result from the --no-copy-dt-needed-entries option, the linker will always give you a hint at the right fix in the error message, for example ‘try adding it to the linker command line’.

  • Hacking on Ubuntu Single Sign-On

    As most of you, who’ve used community projects like Loco Team Portal and Summit know, we use login.launchpad.net as our open id provider. I believe the future is to use login.ubuntu.com. It is more consitent in terms of design, and is the exact same code as login.launchpad.net but with different configuration and theme.

    We have bugs for both the projects to switch to login.ubuntu.com, but it isn’t really easy because login.ubuntu.com configuration is actually more stricter. We can’t login from it locally, i.e., it will not pass on my credentials back to my app if I’m running my app on 127.0.0.1. The ISD team suggested that I just run SSO locally and do my testing. After running Launchpad, what could be so hard right? Famous last words 😉

    I fetched the source of SSO and started the bootstrap as the instructions said. It failed because some of the configs were in a private branch. With much hair-pulling, head-desking, and lots of help from David and Ricardo, I finally got it running last week. One of the main problems of doing this was the configuration for SSO are not stored in the ‘django way’ of things. It’s stored as .cfg files with some configglue magic. Configglue wasn’t originally open-sourced and thus the configs were private. The other problem was my inexperience with postgres 🙂

    After configglue was open-sourced, the configs still sat in a private branch because nobody got around to fixing the bootstrap process, until last week. On Friday, Ricardo finally gave me the good news!. The bootstrap process is now fixed so that community members can actually run SSO without hair pulling. We can now easily work on doing the transition from login.launchpad.net to login.ubuntu.com

  • Landing with tarmac

    I heard about Tarmac a few weeks ago when Shane mentioned it in one of his intern diary blog posts. At that point I didn’t actually look into it much since I thought it was something that’s internal to Canonical. Last week, Michael Hall told me about Tarmac again and how they use it to land branches. This time though, I could grasp what it was since it sounded to provide a functionality Launchpad’s PQM. Every time Tarmac is run, it checks for approved branches that are ready to land. If it finds that they satisfy the conditions (optional) that are defined in its config, it lands them. (It can do more, please read the documentation for that).

    I’m now running Tarmac for both Loco Team Portal project and the Summit project The really cool commitmessage plugin allowed me to define how each commit should look. I’ve formatted it in a way easy to figure out how did the review and who authored the change, and which bugs it fixed. If you want to see how it looks like, checkout the last few commits for summit. I did find a bug in tarmac documentation for which I now submitted a merge request 🙂

  • Cleaning up the Planet

    For a while I’ve noticed that Planet Ubuntu configurations are in a sort of mess. Officially, individuals who are Ubuntu members and some other organizations (more details) can post to the planet. But when someone’s membership expires, cleaning the config is a painful and tedious task. Additionally, there is also no way, other than manual, to verify if the folks with their feeds listed in the planet config file are people with Ubuntu membership. In this regard, I brought this matter up with the Community Council.

    Cleaning up the Mess

    The community council has decided that every feed would be ‘owned’ by an Ubuntu member whose launchpad ID should be in the nick field. This will help us run a script to check if all the ‘owners’ of the feeds are Ubuntu members. If there are team / organization feeds, an Ubuntu member should put their launchpad ID in the nick field and this individual would be responsible for the feeds of that team. Please note that its OK for an Ubuntu member to sponsor multiple feeds. That way a member of the community can be the sponsor for their own feed as well as an affiliated organisation or sub-project, like in the example below.

    [http://feeds.feedburner.com/nigel-ubuntu] name = Nigel Babu face = nigelbabu.png nick = nigel  [http://ubuntuclassroom.wordpress.com/feed/?mrss=off] name = Ubuntu Classroom face = ubuntuclassroom.png nick = ubuntuclassroom 

    In this example, I should be changing the nick for my feed to nick = nigelbabu since my Launchpad ID is nigelbabu. For the classroom feed, I should change nick = ubuntuclassroom to nick = nigelbabu since I’m an Ubuntu member part of the team and I’m willing to own that feed.

  • Cookies and hugs to Penny!

    Yesterday, I talked about summit and how we need help with its development. I’m happy today that Penelope Stowe has joined us in breaking fixing summit. Congrats for her first merge proposal.

    Here are your cookies 🙂