A couple times I’ve had to answer to question: What licenses ship out with our system? If you are shipping something on top of RedHat (in our case, CENTOS) or SuSE ( I haven’t tested this) you can generate a list of package names and licenses with the following command.
rpmquery -a –qf %-30{NAME}:%{LICENSE}”\n”