Saturday, February 28, 2009

Using UPX-UCL

Rugxulo recently posted a news item about compiling UPX-UCL. For those who don't know: UPX is a n executable compressor for multiple platforms, supporting tons of formats. UPX even allows commercial use of stubs. UPX's default builds use NRV or LZMA for compressing, but the sources include UCL (compatible with NRV with only slightly less efficient compression). Rugxulo wrote that he compiled UPX-UCL with DJGPP 2.04 / G++ 4.3.2, and that several "tuned" binaries were available for 486, 586, 686. Available from www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/upx/. I want to commend Rugxulo for taking the time to compile and distribute this UPX-UCL. I believe software freedom is very important, a core component of FreeDOS. Without software freedom, FreeDOS wouldn't really be free.

My issue with UPX is that I'm not convinced NRV compression can be used with Free software, like FreeDOS. According to the UPX web site:
UPX is copyrighted software distributed under the terms of the GNU General Public License, with special exceptions granting the free usage for commercial programs as stated in the UPX License Agreement.

UPX uses the NRV compression library for compression services. A compatible but somewhat less efficient OpenSource implementation is available through the UCL compression library.
Looking further, I understand that UPX uses NRV, but NRV is not available under the GNU GPL. I have always been wary of this, because the GNU GPL is very clear that linking GPL'd code with non-GPL'd libraries is not allowed. Yet the UPX site says:
The stub which is imbedded in each UPX compressed program is part of UPX and UCL, and contains code that is under our copyright. The terms of the GNU General Public License still apply as compressing a program is a special form of linking with our stub.
I asked the Free Software Foundation folks about this, and was told basically, this is allowed, and doesn't present a problem for compressing programs that are under the GNU GPL. The FSF compares this to packaging a GNU GPL program with a non-free packager. But they encourage using an all-free solution instead.

So it's an important milestone for us that we now have a UPX-UCL available for FreeDOS. Having an all-free UPX-UCL removes the questions surrounding this issue. I encourage all FreeDOS developers to use this UPX-UCL rather than any version of UPX that uses NRV. Above all, I ask that FreeDOS developers choose the UCL method to compress your programs, where you use UPX to compress your binaries.

No comments:

Post a Comment