Search Results: "mak"

9 February 2011

Steve Kemp: Random tools I would use - and pictures

So previously I talked about pictures. Having spent a while playing with some new lighting ideas I'll present three recent images:
Now that's out of the way lets talk software. There are two specific things I think would be useful to me right now:
Opportunistic "cron"
I've got a few jobs that don't take long to run, and I schedule for once a day when my systems are idle. It'd be nice to have some long-running daemon which could trigger these odd-jobs (which do things like update my list of mutt mailboxes) when the system has been idle for >30 minutes, or some similar criterion. Ideally I'd say "Run this job when the system is idle, but if the system is never idle run it once a day, or once an hour regardless".
Content-aware tracking software
I use rsync to archive images across a number of systems. Imagine I rename a few images locally, I have to re-rsync even though ideally all I need to do is rename the contents remotely. The issue is remembering what I've changed. So given:
~/Images/Stolen-Souls/2011.02/
~/Images/Stolen-Souls/2011.02/02-Borcsa
~/Images/Stolen-Souls/2011.02/02-Camilla
~/Images/Stolen-Souls/2011.02/06-Indigo
~/Images/Stolen-Souls/2011.02/07-Rosa
If I rename "06-Indigo" then it's trivial to ssh to the remote host and do the same job. But what if I rename a bunch of individual files? Ideally I'd be able to run something like:
~$ tool --snapshot ~/Images/
~$ mv Images/old.jpg Images/new.jpg
~$ tool --show-changes ~/Images
mv Images/old.jpg Images/new.jpg
I half believe git can do something like this, but it seems like you should be able to index the filename+SHA1+size to ~/.snapshot, then later do the same thing and output a list of "mv" commands.
Anyway; I'm drunk. I'm probably not making sense, and I need to sleep. Goodnight. ObQuote: "Hello Mr. Svenning how have you been?" - Mallrats

Matthew Garrett: LCA 2011

I'm both back from LCA 2011 and also over the associated brutal jetlag, so if you sent me mail and I still haven't replied then it's fallen down some sort of cliff and you should probably shout at me until I do something about it. LCA was, as usual, excellent. Especially given that the original venue was the same distance above the river as the now somewhat misleadingly described dry dock on the opposite bank.

I did a bunch of talks this year, and they're now all online, so without further ado:

Enterprise power management - a discussion of power management with a focus on enterprise users, given at the plumbers miniconf. LWN did a writeup here, and every time I say "Tera" you should pretend that I'm saying "Giga". I have no good excuse.

Linux license compliance - about the poor observance of the GPL's conditions by vendors, given at the business miniconf. A useful example presented itself in the form of a GPL-violating Android tablet that I bought in literally the first store I went into in Australia this year. Probably also the last appearance of my Knuth t-shirt, because it appears to have several holes in places where it shouldn't.

Making laptops work in Linux - talking about identifying how laptop-specific functionality is wired up, with an emphasis on reverse-engineering ACPI methods to figure out how to make things work. This one was my presentation at the main conference.

The organisers and volunteers deserve incredible gratitude for the way the conference was managed, especially considering that the CBD was underwater a week and a half earlier.

8 February 2011

Cyril Brulebois: Debian XSF News #4

Here comes the forth Debian XSF News issue! I usually try to keep the items sorted chronologically (but grouped by topic when possible), so if you re wondering about the current status of X in unstable, make sure you read the last entry.

Lars Wirzenius: Growing the Debian development community

In an article about gender issues among American atheists, Sharon Moss and Lyz Liddell give a list of things to consider to be better community, not just for women:
  • Be a leader. Take responsibility for the tone of your group. If potential new members are being made to feel uncomfortable and aren t coming back, you re doing it wrong. As a leader, it is your job to prioritize the comfort of your attendees in programs, group dynamics, and communications. Try to put yourself in other members shoes and also ask for feedback.
  • Promote a sense of community. Take the time to socialize and get to know each other. If you re group isn t primarily a social group, thinking about adding some social time. Go to breakfast before the protest, compose your letters to the editor over coffee, or grab a pizza and beer after that lecture. When you know each other, you have each others backs. Being a jerk isn t tolerated.
  • Moderate discussions. Make sure everyone has the opportunity to participate- new people, quiet people, etc. Don t let conversation be dominated by one or two people who must win.
  • Embrace and accept different ways of communicating. Whether someone is an aggressive debater or not, make sure they re still welcome. The other atheist in the room isn t your enemy.
  • Encourage subgroups. Every event your group hosts doesn t need to appeal to your entire membership. Many women appreciate women-only space to express their nonbelief and to connect with other atheist women. Here at the Humanist Community of Central Ohio, we started a subgroup book club called Reasonable Women. When it grew to have about 25 regular members and was beginning to be a little too large and unwieldy to function as a book club, we created a second group, Heathen Chicks, which is just a social group that meets at a local cafe. It isn t just about creating women only space, for us, this has been a way to draw more women into other events our group hosts.
  • Foster women in leadership. Groups with women in leadership positions tend to have more women. Encourage women in your group to be visible in leadership.
These should work pretty well for Debian as well. I mean for the project in general, for getting all kinds of new people in, and getting them to stay, not just women, even if the gender imbalance is perhaps the biggest glaring problem we have. As a concrete suggestion, maybe it would be a good idea to continue the Debian party line that Joey set up for the squeeze release. We already have IRC, but having an audio chat with your Debian peers might be a nice addition. Specifically a social one, instead of something intended to boost productivity.

Richard Darst: Debian latex-beamer theme

A while ago, I gave a presentation on Debian, and made a latex-beamer color scheme for it. Over time I improved it some. Eventually, I grabbed the colors from the new debian website, since they are much nicer (lighter) than the old colors, and thus fit in a presentation better. Last year, I wanted to write this up so that others could use the scheme.The theme can be found here, and there are examples in this gallery. This is distributed as a few color lines you need to copy and paste into your presentation (it is not much, and I thought that was better than an external dependency). You need to select your own layout theme from those included in beamer, for examples see the gallery. The theme page lists many credits for ideas, in particular zack for the idea of the logo on the background, and some other useful links. I would welcome others to improve this theme and make it more distributable.As a reminder, there is another Debian wiki page for collecting presentations people have given, and it has some other useful links on it.

7 February 2011

Ana Beatriz Guerrero Lopez: post and pre-release fun

The last weeks before a Debian release are usually boring with respect to working on new stuff since unstable is pretty much closed to development. Now that the release is finished, this fun is back \o/ I have been in an upload frenzy since yesterday night and I have updated some packages in unstable: KOffice[1] and KOffice-l10n 2.3.1, yakuake, rsibreak and tintin++. Another of my packages, kid3, got magically updated itself in unstable before I had time to look at it, the magic of having active co-maintainers. [1] Thanks for the gentle push to update this, Pino :) I also emailed one of my upstream maintainers to ask him about the KDE 4 version of his application and he will likely make a release soon. One of the goals for wheezy is remove completely KDE 3 and Qt 3. If you are maintaining a KDE 3 or Qt 3 based application, we are about to start annoying you about this! See http://wiki.debian.org/kdelibs4c2aRemoval and http://wiki.debian.org/qt3-x11-freeRemoval The last 2 weeks before the release I had some fun watching how the Squeeze release countdown banner I published at http://news.debian.net spread to a lot of websites, personal blogs, community sites, forums to news portals.
The traffic has been increasing little by little through the 2 weeks the banner has been online and currently is still moderately high, since people keeps retweeting the news item about the Debian release. While writing these lines, the banner has been served 449575 times to a total of 244975 unique IP addresses!

Matt Zimmerman: A diversity statement for Ubuntu

The Ubuntu website states that we aim to make Ubuntu a wonderful place to participate . We developed the Ubuntu Code of Conduct to set a standard for participants to accept each other in the spirit of cooperation, and have improved it over time to state these principles more clearly. It is implicit in our philosophy that these and other Ubuntu values should hold equally true for everyone. I would like to propose that we upgrade this to an explicit statement on behalf of the project. I have spoken with many people who were interested in joining a free software project, but were put off because they felt unwelcome. I know various people who participate in Ubuntu today, but sometimes face difficult social obstacles in order to do so. Going forward, I would like for us, as members of the Ubuntu community, to make the extra effort to accept all kinds of people. This may sound simple, but it can be very difficult to put into practice. People often don t even notice they ve gotten it wrong, until the offended party points it out to them. We need tools and guidance to make this a reality. To that end, I would like to propose a diversity statement for Ubuntu. This draft has already received support from a majority of the Community Council, but I d like to take it a step further. Because I want this to be a commitment that we can all stand behind, I m also calling for support from the community as a whole. Please give this issue your consideration, and let me know in the comments if you can get on board with an official statement like this. The more support we have, the more real this commitment can be. Here s the text. Many thanks to Mary Gardiner, Valerie Aurora and Benjamin Mako Hill for their review and input.
The Ubuntu project welcomes and encourages participation by everyone. We are committed to being a community that everyone feels good about joining. Although we may not be able to satisfy everyone, we will always work to treat everyone well. Standards for behavior in the Ubuntu community are detailed in the Code of Conduct and Leadership Code of Conduct. We expect participants in our community to meet these standards in all their interactions and to help others to do so as well. Whenever any participant has made a mistake, we expect them to take responsibility for it. If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong. Although this list cannot be exhaustive, we explicitly honor diversity in age, culture, ethnicity, genotype, gender identity or expression, language, national origin, neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation, socio-economic status, subculture, and technical ability. Some of the ideas and wording for this statement were based on diversity statements from the Python community and Dreamwidth Studios (CC-BY-SA 3.0).

Jonathan McDowell: Why Linux? (Part 6: Freedom)

(This is part of a series of posts on Why Linux?) I think of myself as reasonably pragmatic in my approach to Free/Open Source software. I don't get worked up over which set of language people want to use. I use devices that require binary firmware to be downloaded to them (because just because I can't see it doesn't mean it doesn't exist). I have non-free in my sources.list. And yet, talking to other Linux users these days, I realize I'm much more of a Freedom nut job than average. I want the source, be it for a driver, a minor widget, or a full app. I don't buy nVidia. I will sacrifice a degree of functionality in order to get Free. And while I think WINE is an excellent piece of software, I think the best end result is that it's no longer necessary, not that it's a perfect implementation of the ABI. How does any of this help justify my use of Linux in the work place? As previously mentioned, I'm a developer. Most developers don't operate in a vacuum; they have to inter-operate with other ecosystems. And usually somewhere along the line there's a failure to document exactly how something is handled, or an ambiguity about what exact choice might be taken. If I have access to the source then I can check that out for myself. If I don't, I have to guess. As an example, a long time ago I was involved in writing a serial console driver for QNX. There came a point where the behaviour wasn't quite as we'd expect. Although the organisation had a license for the source, I wasn't allowed to look at it. Instead I had to come up with a series of suitable questions that someone who could look at the source could answer without violating any NDAs. If I'd been able to look at the source directly we'd have all saved a lot of time. And that's an example where someone could look at the source, rather than having to make a bunch of guesses and instrument tests to see which was right. Access to the Linux source has helped me in other commercial contexts too. At Black Cat we were able to take advantage of patches like grsecurity in order to tighten up shell account boxes. I wrote the IPv6 support for l2tpns, because we had access to the source and could. I've been able to look at the source to understand exactly what SCSI responses are sent in certain circumstances too (or understand exactly what the error that a user land test program was getting back meant). Also I'm a big believe in Linus' Law. I do think that good Free software is much better than proprietary software (there's some really bad Free software out there though, I'm not disputing that). The fact that smart people can look at it and scratch whatever their itch is means that we get a gradual process of improvement that can't be ignored. Equally as long as someone has an interest in the software, end users can't be left high and dry by organisations abandoning still users applications. I think that should be a powerful driver to business to look towards Free software. (Before my more astute readers point it out; yes, I am employed writing non-free software. See the first sentence. One day I'll find a job working on Free software that ticks enough of the other boxes to be viable.)

6 February 2011

Martin Michlmayr: Upgrading to Debian 6.0 (squeeze) on ARM

Debian 6.0 (squeeze) has been released. Here are some notes if you're running Debian on an ARM-based NAS device or plug computer and are planning to upgrade. First of all, make sure to read the release notes for Debian 6.0 on ARM. This document contains a lot of information on performing a successful upgrade. Second, during the kernel upgrade, you'll get the following message about the boot loader configuration:
The boot loader configuration for this system was not recognized. These
settings in the configuration may need to be updated:
 * The root device ID passed as a kernel parameter;
 * The boot device ID used to install and update the boot loader.
On ARM-based NAS devices and plug computers, you can simply ignore this warning. We put the root device into the ramdisk so it will be updated automatically. Finally, after doing the upgrade and before rebooting your system, make sure to run flash-kernel to activate the new kernel.

Lars Wirzenius: Idea: addsysuser

Debian got squeeze released, and ideas are brewing for what to do during the next release cycle. Here's an idea I had lying around. I'm throwing it out there, since I won't have time to do anything about it for at least a little while, but perhaps someone else thinks it's a good idea? Or, better yet, you can all tell me in comments why this is a bad idea, or at least why it should be designed in a different way.
NAME
       addsysuser, delsysuser - create and remove systems user in Debian pack 
       ages
SYNOPSIS
       addsysuser [options] username
       delsysuser [options] username
DESCRIPTION
       addsysuser creates a system user, and delsysuser removes it.  The  pur 
       puse  of these tools is to make it easier for Debian packages to create
       and remove system users as  the  pacakges  are  installed  and  purged.
       These are wrappers around adduser(8) and deluser(8).
       addsysuser  will  create the system user, unless it already exists.  If
       the user already exists, it does nothing.
       delsysuser removes the user.  However,  the  system  administrator  may
       configure  it  to  never remove the user, or to remove only some users.
       Use the /etc/adduser.conf for the settings:
       DELETESYSTEMUSERS
          Set to true or false  depending  on  whether  delsysuser  should
          remove the system user or not.  Defaults to true.
OPTIONS
       -p, --packagePACKAGE
          Record the user as being used by a specific package.  Many pack 
          ages can use the same user.  delsysuser  will  only  remove  the
          user when no packages are using it anymore.
       --no-act
          Only  pretend  to call adduser or deluser without actually doing
          so.  This allows easier testing of command lines.
FILES
       /etc/adduser.conf
          Configuration file for addsysuser and delsysuser.
EXAMPLE
       In the postinst script:
          addsysuser --package hello hellouser
       In the postrm script:
          delsysuser --package hello hellouser
SEE ALSO
       adduser(8), deluser(8).

Benjamin Mako Hill: Editor-to-Reader Ratios on Wikipedia

It's been reported for some time now that the number of active editors on Wikipedia (usually defined as people who have edited at least 5 times in a given month) peaked in 2007 and has been mostly stable since then. A graph of the total number of active editors in every month since Wikipedia's founding is shown below. The graph shows the aggregate numbers for all language Wikipedias. English Wikipedia is the largest component of this and is generally more variable. That said, very similar patterns exist for most larger languages. /copyrighteous/images/active_editors_all_wikpiedia.png Felipe Ortega, who has provided many of these statistics, has warned against fatalist claims. Although there seems to be a decrease in the total number of active editors over the last two years, the situation seems to have somewhat stabilized in most languages. New editors in Wikipedia are replacing folks at almost the rate that they are leaving. It is also widely known that the number of readers of Wikipedia has been increasing during this period. According to the report cards released by the foundation using comScore data, the number of unique visitors to Wikipedia each month has increased by 61 million people in the last year -- over 17%. This discrepancy between rising readership and stable or sinking editorship should raise major concern. After all, the Wikimedia Foundation's mission is two part: (1) to empower and engage people around the world to collect and develop educational content and (2) to disseminate it effectively and globally. Although the Foundation report cards include measures of raw levels of editorship, a better metric of engagement and empowerment might be the proportion of readers who engage in editing. I could not find reliable data on the number of unique readers reached each month for more than a few months in the last year. What is available, however, is wonderful data on page views each month going back to 2008. Analysis of the data from available report cards show that, at least during the last year, there is a very stable ratio of 35 page views per unique visitor, as estimated by comScore. Using that measure, we can do a back of the envelope estimation on the proportion of users that are editors for the period where page view data is available, dating back from February 2008 ( marked with the grey dashed lined above). The graphs below show the very different results you get when you consider the change in the number of Wikipedia editors and the change in the editor-to-reader ratio. Once again, these data are combined data for all language Wikipedias although graphs look very similar for most larger languages. The results are striking. Although there has been a 12% decrease between February 2008 and December 2010 in the number of active editors, there is a 42% decrease in the proportion of readers who edit at least five times a month. We can see that fulfilling the first half of the Wikimedia mission remains a struggle. /copyrighteous/images/wikipedia_editors_combined_graph.png Although the graphs above do not say anything directly about the most active core contributors to Wikipedia, the fact that Wikipedia is being maintained by a tiny -- and shrinking -- proportion of its readership does mean that the idea behind Wikipedia is under threat. Although none are as big as Wikipedia, there are lots of good encyclopedias out there. The reason Wikipedia is different, interesting, and important is because -- unlike all those others -- Wikipedia is the encyclopedia that anyone can edit. Wikipedia is powerful because it allow its users to transcend their role as consumers of the information they use to understand the world. Wikipedia allows users to define the reference works that define their understanding of the their environment and each other. But 99.98% of the time, readers do not transcend that role. I think that's a problem. Worse, that the number is growing. The Wikimedia Foundation recently ran a major successful effort to attract donations in its annual fundraiser. Jimmy Wales' smiling mug is apparently enough in the way of motivation to get something like 1% of its readers to donate money to support the project. I think that's very good news. If the Wikimedia community can entice even half of those people to contribute through an increased involvement in the projects themselves, they might do more than ensure Wikipedia's continued growth. They would help take a step toward the empowerment and engagement of those users in sharing their own knowledge, and the continued fulfillment of a critically important mission.

Erich Schubert: Debian Squeeze released!

Debian GNU/Linux 6.0 "squeeze" has been released today.
Congratulations to everyone involved in ironing the last few bugs out.
(My own involvement had been a bit limited recently, but I at least kept my few remaining packages in a ready-to-release state and helped with the occasional bug report and patch.)
Some people think that Ubuntu is the better Debian - I do NOT. Debian is a fun place, has great people working on it and is true to its aims at creating a truly free and high-quality distribution. The long release cycles of Debian are a feature, not a bug. Stable is for production systems, not toy projects.
The proper way of attributing Debian stable is conservative and sustainable, but not outdated. It actually can do everything you need - and will do so in 10 years.
If you have been using Open Source for as long as me (say 15+ years) you will probably have seen software hypes come and go. The one thing that has been always the same was Debian: dead reliable. There was a time when everyone was crazy about enlightement for it's shiny pretty UI. Almost like Compiz-Beryl just two years ago. It came, as a matter of fact Debian also had it, but it also went.
I also remember how people complained that Debian didn't ship Xgl back in 2006 when this was the latest hype (there was no Debian release in 2006). Well, Xgl died in 2008. The features remained, but done in a much nicer way, and also found their way into Debian. In fact, I also ran Xgl at least once, on Debian, but just not on "stable". One could say that Xgl never was quite "stable", was it?
Debian stable is good the way it is: an administrators choice. Of course, developers might have different needs, but there also is testing, unstable and experimental. Just make sure to align your choice with your needs. And sometimes, also rethink your needs: there is no "latest beta versions" and "stable platform" at the same time.

Charles Plessy: Long life to Squeeze !

Debian just published Squeeze today. It is an excellent release, that I hope I will keep for a long time on my machines. Among the improvements, boot has been accelerated. On my laptop with a second hand SSD, it only takes 20 seconds to see the login screen. I was amazed when I saw this for the first time. I was often upgrading from Stable to Testing quite quickly, to install more recent versions of desktop applications. But the backports change the game. I hope that I will not switch to Testing before one year or two. For Squeeze, I will also prepare backports for the packages I maintain. I hope that more people will enjoy them. Most of these packages are independant from the graphical system, and more in general from its core. The backports will allow to use recent version of these packages on top of a stable distribution. Since Lenny, Debian Med displays the contents of its metapackages with tasks pages, that include draft packages as well. Not all will make it in Debian, and I would like to have the feedback from our users to better chose our priorities. Contact us on the debian-med@lists.debian.org mailing list ! These new packages will also be distributed for Squeeze through the backports. Thanks again to everybody who contributed to the release of Squeeze !

Jan Wagner: Debian 6.0 squeeze released

Our baby was release just some moments ago. Many thanks to all who made this happen, I m very proud!
Also many thanks to the release team, ftpmaster, cd people, www-team, press folks and all who worked so hard today instead of having release party, to make it real.

5 February 2011

Tim Retout: Swirl

My employer moved offices to Park Gate about a year ago - there's a coffee/sandwich place just down the road, which I generally walk past to get my lunch. And it's got a sign outside: Cafe Crema served here I can't believe I didn't notice that swirl sooner. It will join my picture of the FreeBSD naughty toys machine from DebConf7. In other news, Debian squeeze is being released as I write this. It's been a fun two years. :) Also currently happening is FOSDEM - this is the second year I've missed it, so I reckon I'll make an effort for next year. Instead, today I was at a choral workshop with the Soton Phil, which was really good fun - especially when we danced (yes) through the Osanna from Mozart's Mass in C Minor.

Vincent Fourmond: ctioga superseded by ctioga2

First, some historical details: some 6 years ago, I discovered Ruby together with Tioga, a great library for producing plots. That immediately resulted in my first Ruby program, ctioga. But as years passed and more features were forced into ctioga, I was compelled to see my initial design mistakes, and think about a complete rewrite. This is where ctioga2 was born, some time at the beginning of 2009. I completely stopped using the old ctioga a few month after starting to work on ctioga2, but it took ages before I finally came up with a decent enough documentation to release and announce publicly. But now, it's done, and the first public release of ctioga2 is out, still fresh ! Here are a few highlights of the differences: In any case, you can make yourself an opinion of ctioga2 by looking at the galleries. Enjoy !

Julien Blache: pommed v1.36/v1.37: updates, fixes, MacBook7,1

pommed v1.36 is out and brings support for the MacBook7,1, along with a few fixes and updates. A typo in the pmac keyboard backlight has been fixed, so fading now works there too. Product IDs for the ANSI and JIS keyboard variants for pmac machines were also added. It s been like forever since I last touched that code; not a lot of people still use those (great) machines. This release also contains a small update that will make it compatible with future kernel releases as applesmc will no longer have a fixed a name and location in sysfs. Update: I just noticed a bug in 1.36, so 1.37 is out now. It also contains two patches that were submitted through Alioth.

Ian Wienand: Comcast self-setup with Netgear routers

I just got a Zoom 5341 modem to replace a very sketchy old Motorola model and so far it seems to work fine. However, the Comcast self-install switch process was not seamless. After you plug your new modem in the process starts fine, capturing your session and prompting you for your account. However at the next step it prompts you to download the Windows or Mac only client, directing you to an address http://cdn/.... It is at this point you can get stuck if you're behind a Netgear router (I have a WNDR3700) and probably others. The simple problem is that, for whatever reason, the factory firmware in this router does not pass on the domain search suffix through its inbuilt DHCP client. Without that, cdn doesn't resolve to anything, so you can't download the self-help tool and you're effectively stuck at a "can not find this page" screen. If you google at this point you can find many people who have hit this problem, and various information from erroneous suggestions that you've been hacked (?) to most people just giving up and moving into Comcast phone support hell. Assuming you now don't have internet access, you can complete the process with a quick swizzle. Somebody might be able to correct me on this, but I don't think you want to run the self-install tool from an actual computer plugged directly into the modem if you have a router in the picture, because the wrong MAC address will get registered. So, your best solution is to turn everything off, plug your computer directly into the modem, turn it on, get an address, download the tool, turn everything off, plug the router back-in to the modem and then run the self install tool. At this point, everything just worked fine for me. Netgear should probably fix this by correctly passing through the domain search suffixes in their routers. Comcast should probably fix this by doing some sort of geo-ip lookup to give clients a fully-qualified address in that webpage to download the tool even if their router is broken (or really, does downloading that file really require a content-delivery network?). You can probably fix this by running Openwrt on your router before you start. Otherwise, the Zoom modem and the Netgear WNDR3700 seem to make a very nice combination which I would reccommend.

Craig Small: JFFNMS and IPv6

ipv6-google-rrt.png One of the many Free Software projects I work on is JFFNMS, which is a network management system written in PHP. In light that the last IPv4 address blocks have now been allocated to APNIC it s probably timely to look at how to manage network devices in a new IPv6 world. First you need to get the basics sorted out and for that it is best to use the net-snmp command line utilities to check all is well. Then its onto what to do in JFFNMS itself. Now fixed with proper markup, I hope.
    strlcpy(hostname, a1, sizeof(hostname));
        if ((pptr = strchr (hostname, ':')))  
            remote_port = strtol (pptr + 1, NULL, 0);
         
Special Agent 6 All devices that are capable of being managed with SNMP have an agent. It s basically the SNMP server on the router, switch or server. The first step is to make sure it can accept and send traffic using IPv6. Depending on what the device is, it can be real simple. For example, my little Juniper router its a matter of setting the community and access control, just like IPv4 settings:
csmall@juniper1# set snmp community public clients 2001:db8:62:d0::/64
And then run snmpget on the command line to check
csmall@elmo$ snmpget -v 1 -c public udp6:2001:44b8:62:d0::4 system.sysObjectID.0
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2636.1.1.1.2.41
We have success! For Linux systems that use net-snmp you will need to make the snmp daemon listen on UDPv6 ports as well as adjusting the access control. Access control is a matter of adding com2sec6 lines to /etc/snmp/snmpd.conf They are the same format as com2sec lines and are reasonably straight forward. Next, get the daemon to listen to requests on the IPv6 ports as well. The snmpd(8) man page says:
By default, snmpd listens for incoming SNMP requests on UDP port 161 on all IPv4 interfaces. However, it is possible to modify this behaviour by specifying one or more listening addresses as arguments to snmpd.
It wouldn t of killed them to put comma separated list somewhere, now would it? My /etc/default/snmpd file now looks like:
SNMPDOPTS= -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid udp:127.0.0.1,udp6:[::1]:161
The bits in bold are the changes. Then its a quick check:
csmall@elmo$ snmpget -v 1 -c public udp6:[::1] system.sysObjectID.0
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
And we have working agents! JFFNMS Changes OK, we have a working IPv6 network and snmp works across our network so we can query devices. JFFNMS uses PHP so all should be well, shouldn t it? Database Tables This is an almost classic problem with converting IPv4 to IPv6. You have 15 bytes for a IP address string 111.222.333.444 . Ipv6 can be much larger than that. JFFNMS has things like
  CREATE TABLE  hosts (
    [...]
   ip  char(20) NOT NULL default '',
A simple fix to use a char(39) or varchar(39) will do the trick. Fixing the JFFNMS code One of the most troubling problems with the host entries is that the values entered by a user can be a hostname, IP address or IP address and port separated by a colon. There are lots of bits of code that separate out the port or address by just finding the colon or use non-IPv6 aware functions like gethostbyname() that will need to be fixed. I ve got a function to check for an IPv6 address, using the inet_pton() function.
  function is_ipv6($addr)
 
  $net_addr = @inet_pton($addr);
  if ($net_addr === FALSE   strlen($net_addr) < 16)
    return FALSE;
  return TRUE;
 
PHP functions PHP still has the old IPv4 only functions, but unlike libc does not have the Address Family independent functions. The most significant absence is the replacement functions for gethostbyname(). There is dnsgetrecord() but it is quite low-level (it won t recurse lookups if you get alias or CNAME results). It s a little hit and miss in PHP-land with what functions work with IPv6 addresses and what ones do not. fsockopen() and file() do work with IPv6. PHP and SNMP To query remote devices using SNMP, JFFNMS uses the PHP SNMP functions. Unfortunately, while there is some IPv6 support in PHP, it doesn t extend to the SNMP functions. The library does it, as the net-snmp command lines use the same library, it is just that the small shim between the script and net-snmp that is PHP gets in the way. Looking at the PHP code itself you find things like
    strlcpy(hostname, a1, sizeof(hostname));
        if ((pptr = strchr (hostname, ':')))  
            remote_port = strtol (pptr + 1, NULL, 0);
         
which definitely need to be fixed for IPv6. There is also some simple address lookup going on somewhere as well which will also need to fixed. In short, JFFNMS won t be doing SNMP based queries over IPv6 until php5-snmp can do it. Reachability JFFNMS also has a different sort of query called a reachability type. It s essentially a ping from the server running JFFNMS out to the device being managed. It uses fping to do this work, but there is also a program called fping6. It s a simple matter of checking the address type and then selecting fping or fping6 to do the reachability work. The JFFNMS code soon to be pushed into git has this change in it now. Anything Else? The next stage is to find anything else that will work with IPv6. A likely candidate is the TCP and UDP port types as they use nmap to discover the ports and the fsockopen() function call to poll it. fsockopen() does handle IPv6 addresses if you escape them in square brackets.

Benjamin Mako Hill: Antifeatures at the Free Technology Academy

In addition to lecturing for two courses at MIT this term, I recently had the pleasure of giving a lecture on antifeatures at the Free Technology Academy -- a program which offers Masters courses over the Internet. Quite a few of the FTA courses are about free software, free knowledge, and related topics! It was my first time giving a lecture to microphone and an empty room. Although I found it a little tricky to adapt to the lack of any audience, the FTA folks put together a great video. I'm psyched that the course material will be available as open education resources for anyone who might want to incorporate it into another course. If you've seen my LCA keynote about antifeatures (which is also available online), there's not going to be a whole new in the lecture. If didn't see it, you might want to check out the lecture. I'll be in the online discussion group around the Lecture for the next couple weeks but you need to sign up to participate.

Next.

Previous.