The GPL does not require public distribution of derivative works; only that the original licensor could not prevent licensees (even indirect ones) from performing redistribution. This is used all the time: within corporations it's normal to patch/fix GPL'd software and not distribute the changes outside of the organization, with the caveat that distribution could not be stopped by GPL licensing terms; usually, instead, it will be stopped by employment contracts.
The GPL has gone through a lot of hoops to warp itself in such a way that it takes a normally restriction-based system (licensing) and turns it into a limited guarantee of freedom from restrictions. But, it can't really subvert something like a gag order.
Consider the case of a dual license, where one license is a GPL and another license is some permissive noncommercial license. The restrictions of both licenses apply, and thus, the result is a composite set of licensing terms that resemble a GPL with commercial use restrictions. The GPL's interaction with any other set of laws that restrict distribution will operate the same way.
The GPL does not require public distribution of derivative works; only that the original licensor could not prevent licensees (even indirect ones) from performing redistribution. This is used all the time: within corporations it's normal to patch/fix GPL'd software and not distribute the changes outside of the organization, with the caveat that distribution could not be stopped by GPL licensing terms; usually, instead, it will be stopped by employment contracts.
The GPL has gone through a lot of hoops to warp itself in such a way that it takes a normally restriction-based system (licensing) and turns it into a limited guarantee of freedom from restrictions. But, it can't really subvert something like a gag order.
Consider the case of a dual license, where one license is a GPL and another license is some permissive noncommercial license. The restrictions of both licenses apply, and thus, the result is a composite set of licensing terms that resemble a GPL with commercial use restrictions. The GPL's interaction with any other set of laws that restrict distribution will operate the same way.