Archive for the 'Programming' Category

Mar 08 2016

GPL No Fun

Published by under Programming,Software,Thoughts

I saw a blog post called “GPL Fun” by Jonathan Riddell on Ubuntu Planet today, and it triggered this immediate stomach reaction:

The GPL remains the #1 reason why it’s always a smarter choice to bet on FreeBSD or other BSD-/MIT-licensed products/projects for commercial use. I doubt that the Nas4Free Folks will ever have a discussion – or lawsuit – like the one that VMware is seeing because they use some kind of modified Linux kernel in their ESXi hypervisor.

I believe that putting the Linux kernel under the GPL was a very, very bad idea at the time. I never understood when Linus Torvalds said that he “was afraid that somebody could take away Linux”. Did somebody ever “take away” FreeBSD? Yes, Apple built something called OS X and later iOS on top of FreeBSD that they didn’t have to openly share with the world anymore – but the original FreeBSD was still there for everybody else, so in my understanding of the term nobody took anything away.  Did Apple take away SQLite (which is in the Public Domain) when they integrated it into Aperture? No, SQLite is still there for everybody to use.

It is the whole purpose of the BSD/MIT license to enable the kind of business that Apple has been doing with their taking of the FreeBSD foundation and turning it into a commercial product.

The reason why the author of SQLite put his work into the Public Domain was to make absolutely sure that “anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

Unless you want to force a certain ideology down your user’s throats, one where everybody is FORCED to share his own derivative work with the world, there absolutely is no upside to choosing the GPL as your license. Putting something under the GPL only means that you’re not really willing to give something away and let it be truly free   – you want something back in case somebody wants to build something else on top of your work and you’re intentionally sabotaging traditional software licensing business models with the GPL. That’s not really the spirit of “free” and “open” – it’s the spirit of restriction, it’s the spirit of “I want to keep control, just in case”. I don’t think that this is “fun”, it’s the opposite, actually. Hence “GPL No Fun” is a more fitting title.

I understand the temptation behind the GPL. After all, a lot of time and work goes into any piece of software, so once you decide to open it and share it, isn’t it only fair to get something back from the people who might want to use and modify it? Sure. But it’s also inconsequential to impose onto others. It was your own choice to open your work and share it, that is what YOU, the original author, wanted to do. In my view, it’s just not right to force others down the same road – unless, of course, your intention is to prevent them from maybe making money with your work. But if you’re going down that route, then you could as well use a proprietary, commercial license for your product. That would at least be consequential, and there’s nothing wrong with that in my opinion. People deserve to get paid for their work. But if you’re pretending to give something away and if you’re pretending to make software free by using the GPL or similar open source licenses with certain backdoors and trapdoors, then you shouldn’t be surprised when someone like me will question your motives for doing so.

I don’t want to have a religious or ideological debate about this on my page, so comments will be disabled for this post. It would all be redundant anyway – the web is full of that stuff, just google your way through GPL vs BSD and have some fun with it.

No responses yet

Feb 03 2014

Remotely restart the SNMP daemon on Ubuntu 12.04 LTS via a Python skript

Published by under Python

It can happen that the SNMP daemon on a server crashes or stops, sometimes without leaving any hints in the system’s logfiles. If you’re running a monitoring server like WhatsUp, you can define a monitor for the SNMP service and should it be reported as down, you can define an action that launches the following Python skript to restart the daemon:

import paramiko

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy( paramiko.AutoAddPolicy())
ssh.connect('', username='pythonuser', password='password')

stdin, stdout, stderr = ssh.exec_command( "sudo service snmpd restart")


In order for this skript to work properly, the user “pythonuser” needs to be able to execute sudo commands without having to type in a password again. The used Python ssh-library, paramiko, does not easily support the use of sudo commands, so it is easier to work around the problem by allowing the user “pythonuser” to run certain commands without having to provide a password again.

In order to allow “pythonuser” to run the “service” command via “sudo” without entering an additional password, this line has to be added to the end of /etc/sudoers on the server on which you need to restart the snmp daemon:

pythonuser ALL=NOPASSWD: /usr/sbin/service

IMPORTANT: This line MUST be at the end of the file, otherwise it will NOT override any settings defined for the “sudo” or other user groups (whose members must provide passwords).

No responses yet

« Prev - Next »