16 August 2009

GPL'ed JkDefrag closes source, becomes MyDefrag

The great JkDefrag MSWindows application, which I had written about here, was released as GPL'ed Free Software up until the 3.36 release. The application allowed a user to defrag a Windows hard drive much better than the built-in Windows defragmenter, using the same underlying technology as the Windows version but with much better options and results.

Unfortunately, the 4.0 release of the software has been renamed MyDefrag, and it has been released under a closed-source, non-Free license.

The newest release, MyDefrag, has built-in scripting capabilities and claims to have improved the speed and memory usage of JkDefrag, while still relying on the underlying API of the built-in Windows drive defragmenter.

The name change is summarized on the JkDefrag page, reading:
It is no longer the "JK" (Jeroen Kessels) defragger, but "my" (your) defragger!

How can a closed-source piece of shareware ever be "my" software? Software written and released under a Free Software license, like JkDefrag was, is truly "my software" because users have access and rights over the code in that software.

Shareware has no such promises as are given under the GPL or other Free Software licenses; in fact the license for this software now reads that "J.C. Kessels or another party may require the user to ... pay service charges related to providing MyDefrag to the user". Meaning, where once JkDefrag was Free software (in both senses of the term), now MyDefrag may end up costing you money if the company decides to charge, perhaps even retroactively. Not for the license mind you, but for just Providing the software to you.

The last release of JkDefrag is still available, along with the GPL source code. Although I cannot code, it would be great if this project were kept alive to help MSWindows machines survive. Not that their demise would be a bad thing, and in fact something that security professionals and FLOSS supporters everywhere would relish.

14 August 2009

Installing PHP extensions with pecl on Debian

'pecl' downloads packages from a repository for PHP apps or libraries, and installs them somehow as PHP packages. Or something. I don't really know what this does or means but as a sysadmin, our developers need this done occasionally.

So, in today's example, we need the GPG extension for PHP so that we can encrypt files using PHP.

shell# php -m
## big list of php extensions, and it seems we do not have GnuPG installed.



shell# pecl install gnupg
WARNING: channel "pecl.php.net" has updated its protocols, use "channel-update pecl.php.net" to update
downloading gnupg-1.3.1.tgz ...
Starting to download gnupg-1.3.1.tgz (19,331 bytes)
......done: 19,331 bytes
5 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed

shell# pecl install phpize
No releases available for package "pecl.php.net/phpize"
Cannot initialize 'channel://pecl.php.net/phpize', invalid or missing package file
Package "channel://pecl.php.net/phpize" is not valid
install failed


Lets first get the channel info correct:

shell# pecl channel-update pecl.php.net

Updating channel "pecl.php.net"

Update of Channel "pecl.php.net" succeeded



So now we need 'phpize' installed:

shell# aptitude install php5-dev
...
The following NEW packages will be installed:

autoconf automake automake1.4 autotools-dev libtool php5-dev shtool
...

shell# pecl install gnupg
WARNING: channel "pecl.php.net" has updated its protocols, use "channel-update pecl.php.net" to update
downloading gnupg-1.3.1.tgz ...
...
...
checking if nawk is broken... no
checking for gnupg support... yes, shared
checking for gnupg files in default path... not found
configure: error: Please reinstall the gpgme distribution
ERROR: `/tmp/pear/temp/gnupg/configure' failed



Now we need the development packages for gpgme according to that last error message:

shell# aptitude search gpgme
p libgpgme-ruby - GPGME bindings for the Ruby language
p libgpgme-ruby1.8 - GPGME bindings for the Ruby language
p libgpgme-ruby1.9 - GPGME bindings for the Ruby language
p libgpgme11 - GPGME - GnuPG Made Easy
p libgpgme11-dev - GPGME - GnuPG Made Easy

shell# aptitude install libgpgme11 libgpgme11-dev
...
The following NEW packages will be automatically installed:
libgpg-error-dev libpth-dev libpth20
...

shell#


Now, one last time:

shell# pecl install gnupg
downloading gnupg-1.3.1.tgz ...
Starting to download gnupg-1.3.1.tgz (19,331 bytes)
......done: 19,331 bytes
5 source files, building
running: phpize
...
...
Build process completed successfully
Installing '/usr/lib/php5/20060613+lfs/gnupg.so'
install ok: channel://pecl.php.net/gnupg-1.3.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=gnupg.so" to php.ini

shell#


As the instructions state again, make sure to edit your php.ini file to add
extension=gnupg.so
into that file's extensions area.

Easy huh? Well, if you know what you're looking for it can be.

Nagstamon: Nagios Status Monitor on Debian Sid

I went looking for a Nagios System Monitor of sorts, hoping for a KDE Plasmoid for my desktop, so that I could have an eye on our work Nagios which would alert me if one of our servers or part of the network went down.

I came across Nagstamon which seems to do the job, and it lives in the System Tray of my KDE 4.3 desktop. Although written for GNOME, it works fine in KDE with a few required packages:


shell$ sudo aptitude update

shell$ sudo aptitude install python-setuptools python2.5 python-gnome2-extras python-lxml librsvg2-common

shell$ wget http://downloads.sourceforge.net/project/nagstamon/nagstamon/nagstamon%200.8.2/nagstamon_0.8.2_all.deb

shell$ sudo dpkg -i ./nagstamon_0.8.2_all.deb


If you're getting an error, "glib.GError: Couldn’t recognize the image file format for file ‘/usr/lib/nagstamon/resources/nagstamon.svg’ " you're missing the package named 'librsvg2-common'.

Many thanks go to the developer of this package, Henri Wahl, and the package for other Linux package formats and whatnot can be found on the Sourceforge page at http://sourceforge.net/projects/nagstamon/files/