Tuesday, 27 August 2013

procenv 0.26 released


Version 0.26 of the procenv utility is now available.

Changes:

  • Check to determine if running on a console now works for FreeBSD/kFreeBSD too.
  • Added ability to show all arguments (-A/--arguments)
    (useful when using --exec).
  • Added ability to display network details (-N/--network).
  • Added BSD/Hurd-specific signals.
  • Corrected output sort order.
  • Mount details now include block, inode and fsck details.
There are now 29 categories of environment information displayed when procenv is run (on Linux).

Grab it from:

This update should appear in Debian, Ubuntu and FreeBSD soon...

Friday, 23 August 2013

Upstart 1.10 released

Lots of goodness in this release (explanatory posts to follow):

  • upstart-local-bridge: New bridge for starting jobs on local socket connections.
  • upstart-dconf-bridge: New bridge for Session Inits to react to dconf/gsettings changes.
  • upstart-dbus-bridge: New '--bus-name' option to allow bus name variable to be included in dbus-event(7).
  • New "reload signal" stanza to allow jobs to specify a custom signal that will be sent to the main process (rather than the default SIGHUP).
  • Inclusion of Session Init sample jobs.
  • Re-exec fixes for handling chroot sessions.
  • Shutdown fix for Session Inits.
  • New python3 module and accompanying integration test suite for testing Upstart running as PID 1 and as a Session Init (privileged and non-privileged).

The Upstart cookbook has been updated for this release.

Saturday, 10 August 2013

Upstart Cookbook now updated for Upstart in Debian

I've started a long-overdue update to the Upstart Cookbook for Upstart on Debian. Look out for the Debian swirl! :-)

procenv 0.25 now builds on Android

Procenv 0.25 now builds natively under Android:


It also fixes an interesting issue that was causing it to fail to generate FreeBSD build logs. However, that is now fixed so you can see the FreeBSD build environment now too by looking at the port logs:

More logs to come - the FreeBSD ports seem to build rather slowly...)

Monday, 5 August 2013

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 current stable Debian release?

    $ debian-distro-info --stable
    wheezy
    

distro-info... Now with Added Milestone Goodness

I've been working with Benjamin recently to add a new feature which landed late last week in both Debian unstable and Ubuntu Saucy. So, we can now ask distro-info when a particular release milestone will happen (or has already happened):

  • How many days until Ubuntu Saucy is released?

    $ ubuntu-distro-info --devel --days
    73
  • How many days since the Ubuntu Saucy release was "created"?

    $ ubuntu-distro-info --devel --days=created
    -102
  • How many days until Ubuntu Precise goes "end-of-life" (desktop only!)

    $ ubuntu-distro-info --lts --days=eol
    1360
  • How many days since Debian sid was created?

    $ debian-distro-info --devel --days=created
    -7294

A Scripted Example

We can now write simple little scripts like this to show a popup when getting close to a release:
#!/bin/sh

set -- $(distro-info --devel --codename --days=release)

codename="$1"
days="$2"

# Only warn close to a release
[ "$days" -gt 30 ] && exit 0

zenity --info --text "$codename is released in $days days!"

Wait! Let's do that with Upstart!

In fact, you could turn the script above into an Upstart session job rather easily:
cat >>$HOME/.config/upstart/release-reminder.conf<<EOT
start on desktop-start

task
script
  set -- $(distro-info --devel --codename --days=release)

  codename="$1"
  days="$2"

  # Only warn close to a release
  [ "$days" -gt 30 ] && exit 0

  zenity --info --text "$codename is released in $days days!"
end script
EOT
Now, this script will run automatically every time you login, assuming you are running either:
The currently recognised milestones are "created", "release", "eol" and for Ubuntu LTS releases only "eol-server".

Further Ideas


We could conceivably enhance this feature further by adding in support for querying additional milestones such as "alpha-1" and "feature-freeze".

Want to know more?


For full details, read distro-info(1).



I'm going to DebConf13

Going to DebConf13! Vorlon and I will be giving a talk on Upstart ('Upstart in Debian'). So if you'd like to learn more about the awesome next-gen event-based init system, please drop by!