Posts

Showing posts with the label ubuntu

procenv update

Earlier today I released procenv 0.34 . Quite a bit has changed since version 0.27 including: Recognises AARCH64, SuperH (fix), PPC64, PPCspe, PPC64LE, OpenRISC systems. Added symbolic names in ' --ranges '. Displays Linux binary personality (and flags). Improved ' --capabilities ' output showing not only bounding set, but also whether each capability is supported, permitted, effective and inheritable values. Added ' --memory ' which shows NUMA memory details. Added ' --cpu ' which displays CPU affinity details. Added rpm spec file allowing it to build on RHEL5, Fedora, etc . Improved ' --sizeof ' which now shows lots more standard types. Displays FreeBSD Capsicum capabilities. Lots of fixes. Version 0.34 is now available in Debian sid whilst Ubuntu Trusty will be released with procenv 0.33 (which lacks the binary personality information). Take a look at the links on the main procenv page to see the different environments that it...

Counting down to Ubuntu and Debian releases with distro-info

A while back I though, "wouldn't it be great if the Ubuntu release schedule could be accessed as some form of web service?" That would allow all sorts of fun scripts to be written. Yes, you could write code to parse the wiki page, but I think the technical term for that is "gross". However, there is now a much simpler alternative in the form of distro-info . If you've never used this awesome tool written by Benjamin Drung you've been missing out! It can tell you all sorts of interesting information. A few examples... Examples of how to use distro-info What is the current development release on the system I am running on? $ distro-info --devel saucy What is the current Debian development release? $ debian-distro-info --devel sid What are the currently supported Ubuntu releases? $ ubuntu-distro-info --supported lucid precise quantal raring saucy What's the latest Ubuntu LTS release? $ ubuntu-distro-info --lts precise What's the c...

A simple two-player QML game for Ubuntu Touch using the Ubuntu SDK: noughts and crosses (aka tic-tac-toe)!

Image
Inspired by Rick 's recent blog posts, and keen to write a blog post with a ridiculously long title, I've been reading up on QML recently. Still bearing the scars from the XML horrors of working with J2EE in the early days, that 3-byte acronym ending in "ML" initially subconsciously somewhat filled me with trepidation. However, as soon as I actually saw some QML, I could see these fears were unfounded ( ! :-)  And in fact I now love QML. It's clean, elegant, powerful, declarative and (OMG YAY!) you can even "%-bounce" on the braces in vim! :-) That said, the qtcreator IDE is extremely good, managing to provide just enough of what you want without requiring endless additional configuration. But it doesn't stop there. The Design Team have done some incredible work in creating the  Ubuntu SDK  components: not only do they look fantastic (if you have the ubuntu-ui-toolkit-examples package installed, try running /usr/lib/ubuntu-ui-toolkit/demos/lau...

Upstart User Sessions in Ubuntu Raring

Image
Overview Ubuntu Raring now includes Upstart 1.8 . Upstart 1.7 and 1.8 combined mark a major milestone since they bring the proven power of Upstart to the user as never before: not only is Upstart now managing the system, but it is also capable of managing the default Ubuntu user's desktop sessions too. Why? Question:  Why reuse a system facility at the user level in this way? The modern Linux desktop environment is a very dynamic one: users start and stop applications, switch workspaces, search the dash, adjust personal settings in the panel, connect to different networks, hot-plug USB devices and so on. All of these activities can be represented by "events". Stepping back a second, recall that Upstart was written  from the outset  to take advantage of  the dynamic nature of a modern Linux system . Long gone are the days when a system booted serially. A modern Linux system abounds with "events" from all sorts of different sources: The user plugs or ...

Coverity static analysis for C, C++ and Java code

It's a well known principle of software engineering that the earlier bugs can be caught, the lower the overall cost. As such, testing needs to happen at every level. Once your project is at the coding stage, the earliest form of testing is on the code itself , not on the binaries the compiler produces. We run a variety of tools over critical codebases such as Upstart and Whoopsie regularly to identify issues well before they "escape into the wild". These tools include Coverity Scan  (see the list of projects already using it ). If you really care about your code and you are involved with a C, C++ or Java project, I'd strongly encourage you to take a look at this awesome tool. If you aren't directly involved in such projects, try contacting those running them and suggesting they use Coverity. The Coverity Scan service is entirely free for OSS projects. You will need to register to obtain an account and then download the client analysis tool. Once setup, a...

Upstart 1.8 released

Hot on the heels of Upstart 1.7  comes Upstart 1.8 which includes two interesting new features: The File Bridge Upstart now provides the upstart-file-bridge , a bridge that allows jobs to react to file events. Here are a few examples: Start a job when file is created, modified or deleted: start on file FILE=/run/app.pid Start job when file is created (only): start on file FILE=/run/app.pid EVENT=created Start job when any files within a directory are created, modified or deleted: start on file FILE=/var/log/ Start job when files that match a glob pattern are created in the indicated directory: start on file FILE=/var/crash/*.crash EVENT=created Even better, this bridge is available to both system jobs and users session jobs. See upstart-file-bridge(8) and file-event(7) for further details. The GUI The upstart-monitor tool covered in a previous post has also been added to the release. This allows you to see what events Upstart is emitting and ho...

A bazaar hook to reduce VCS meta-data asynchrony

What changed? Sometimes, when using VCS systems such as bazaar, there is a tendency to forget to perform the necessary 'book-keeping' for those not using it because you get so focused on the tooling itself. Most VCS systems expect the author to provide a brief explanatory message per commit. This log is invaluable since it (hopefully!) provides insightful context into the programmers intentions. However, that meta-data is only available to those with a copy of the branch/checkout/stream/view or whatever your VCS calls it. But what about those who only come into contact with the project via release tarballs for example? I'm thinking specifically of changelogs. Debian and Ubuntu provide the incredibly useful ' dch ' (aka debchange ) tool which synchronises the VCS commit message with the latest ' debian/changelog ' file entry. But what if you're not working on a Debian project? When you're working on a fast-paced project, or just working at a...

Upstart with "stateful re-exec" now in Ubuntu Raring

After a lot of testing, we have today landed Upstart 1.6.1 in Ubuntu Raring with " stateful re-exec " goodness. What this means is that for all future Upstart upgrades, no reboot is required to make use of the newly-installed version: Upstart will restart itself with no interruption to service such that existing jobs will continue to run. Additionally, it means that an upgrade to any of Upstarts dependent libraries (such as libc and libnih ) can also trigger Upstart to restart itself so that it will automatically start using those new library versions whilst maintaining continuity of service. For those of us who dislike downtime and want to remain current, this is known as a "win" ;-)

procenv now in Debian and Ubuntu: how you can use it

The procenv utility covered in a previous post is now at version 0.15 and also available in Debian Sid and Ubuntu Raring . So, you can do the usual " sudo apt-get install procenv " followed by simply " procenv " to run it. However, due to the way this utility is built, there is a little more you can do. Read on... procenv runs itself as part of its build (at the end of course :-). What this means is that you can now see what that build environment is like by looking at the build logs: Debian build logs Ubuntu build logs (you need to expand the "twistie" to see the log files. If you haven't already heard, for the Ubuntu Raring cycle, autopkgtest ( DEP-8 ) tests -- where package builds automatically trigger tests that run on an environment very similar to a "normal" system -- are a hot topic. procenv is DEP-8 enabled, so again, we get to see exactly what such an autopkgtest environment provides . With this information, you can...

Upstart 1.6 released

New Upstart Release Today we released Upstart 1.6, which includes the " stateful re-exec " feature, allowing Upstart to continue to supervise jobs after an upgrade of either itself, or any of its dependent libraries: https://launchpad.net/upstart/1.x/1.6 This will be available in Ubuntu Raring very soon. Thanks to all the contributors: A.Costa Colin Watson Eric S. Raymond Jason Conti Loïc Minier Steve Langasek   Like to get involved? If you'd like to get involved with Upstart Development... Take a look at the ideas page Study the Hacking Upstart Together presentation Read the Upstart Cookbook Read the code Subscribe to the mailing list Join us on #upstart on freenode Here's an early draft of what's planned for the next cycle: https://wiki.ubuntu.com/FoundationsTeam/Specs/RaringUpstartUserSessions If you're interested in contributing, let me know! Update on Upstart in Debian ... But wait - there's m...

Call for Testing: Upstart stateful re-exec

If you'd like to help out testing the new "stateful re-exec" feature of Upstart which we hope to land for Ubuntu Quantal, see the details here: https://lists.ubuntu.com/archives/upstart-devel/2012-September/001948.html In brief (more posts will follow), "stateful re-exec" allows Upstart to be restarted (or upgraded!) without rebooting your system. A basic restart or re-exec isn't difficult, but what stateful re-exec does is maintain Upstarts internal state over the re-exec such that it continues to track jobs and log job output. This is an early cut of the code so don't install it on any critical systems . Additionally, there are some caveats... https://wiki.ubuntu.com/FoundationsTeam/Specs/QuantalUpstartStatefulReexec#Phase_1_Limitations ... but we plan for that list to dwindle quickly over the coming days and weeks.

pull-debian-source with apt-get or "how to download a Debian package from Ubuntu the hard but fun way"

Have you ever wanted to download a Debian  package from an Ubuntu system? Well you are not alone: hidden away in the wonderful " ubuntu-dev-tools " package is the tool for you - the excellent pull-debian-source , written by  tumbleweed . This is a really useful tool which is also fast ! $ sudo apt-get install -y ubuntu-dev-tools $ pull-debian-source hello pull-debian-source: Downloading hello version 2.8-1 pull-debian-source: Downloading hello_2.8.orig.tar.gz from ftp.debian.org (0.665 MiB) pull-debian-source: Downloading hello_2.8-1.debian.tar.gz from ftp.debian.org (0.006 MiB) dpkg-source: info: extracting hello in hello-2.8 dpkg-source: info: unpacking hello_2.8.orig.tar.gz dpkg-source: info: unpacking hello_2.8-1.debian.tar.gz Or, to download the at package from the sid release: $ pull-debian-source at sid pull-debian-source: Downloading at version 3.1.13-1 pull-debian-source: Downloading at_3.1.13.orig.tar.gz from ftp.debian.org (0.117 MiB...

Job Logging in Upstart

Job Logging in Upstart The big Upstart feature in Ubuntu Precise is "job logging" (in fact, it turned out to be a significantly bigger feature than we'd originally envisaged :-). This had been a wishlist item for some time and a lot of folk were very keen to see this implemented. All system jobs now have their stdout and stderr logged automatically  by default to a text file in directory  /var/log/upstart/ . Why did we make this the default? Surely daemons and services don't generally write any output? True, but when they do produce output, it is worth capturing since it has a very high chance of being an error message. And errors should not be ignored. For jobs that do not produce any output, there is minimal overhead and of course no log is written. The logger actually uses pseudo-ptys just like  script(1) , xterm(1) , expect(1) ,  screen(1)  et al . This is advantageous for a number of reasons, but from the logging perspective the biggie i...

A quick libnih tutorial

Introduction The NIH Utility Library ( libnih ) is a small, efficient and most importantly safe library of general purpose routines. It was written by Keybuk so you can be assured that it is extremely elegant, well-designed, well-tested (includes 2863 tests currently!) and well-written. NIH is used by Upstart, the event-based init daemon which is used by: Ubuntu Desktop Ubuntu Server Ubuntu Cloud RedHats RHEL 6 Chromium OS  (and Chrome OS) That's a lot of deployments of Upstart and NIH around the world!! (And we're not even including mobile device operating systems in that list). But why not just use glib I hear you ask? Well, glib is a very large library whereas NIH is small and designed for low-level daemons and systems which may be resource-constrained. Also, lets not forget that NIH, like Upstart , comes with a very comprehensive test suite so bugs are rare. Other reasons to use NIH: It handles garbage collection for you That's rig...