views:

313

answers:

3

Can I use upx packer to compress a commercial program? Or does GPL restrict me from doing that?

+1  A: 

IANAL, but the output of a program is not a derivative work. You can compress whatever you want, including a commercial program.

Edit: Also, think of it this way, if you couldn't do this, then any image you create with the GIMP would have to be under the GPL, for example. The GPL only matters when you are distributing the program or a derivative work of it.

Zifre
+3  A: 

Yes, you can. Please have a look at the UPX license. There's a special exception for commercial applications so they can use UPX.

Note to Zifre: UPX is GPL, but it's not the same as creating an image with GIMP, since part of the UPX code is added to the commercial application (the decompressing part). That's why the exception in the license is required.

Stefan
You could have just commented on my answer. But you're right, I forgot about the exception for the stub.
Zifre
A: 

The thing with UPX is that a loader stub gets included to your program. That's why there is an exception to GPL in UPX license:

SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES

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.

Hereby Markus F.X.J. Oberhumer and Laszlo Molnar grant you special permission to freely use and distribute all UPX compressed programs (including commercial ones), subject to the following restrictions:

  1. You must compress your program with a completely unmodified UPX version; either with our precompiled version, or (at your option) with a self compiled version of the unmodified UPX sources as distributed by us.
  2. This also implies that the UPX stub must be completely unmodfied, i.e. the stub imbedded in your compressed program must be byte-identical to the stub that is produced by the official unmodified UPX version.
  3. The decompressor and any other code from the stub must exclusively get used by the unmodified UPX stub for decompressing your program at program startup. No portion of the stub may get read, copied, called or otherwise get used or accessed by your program.
abababa22