Live data from Hacker News

Sequoia PGP is now LGPL 2.0

sequoia-pgp.org

41–50 of 69 posts

Re: Sequoia PGP is now LGPL 2.0

#41

Earlier quoted context omitted.

Quite right. I contribute a Rust component to a larger AGPL-3.0 project and went with MPL-2.0 over LGPL for this reason. A bit off-topic, but I wonder if the FSF's ideas about dynamic linking have been litigated yet. It has always seemed a pretty suspicious to me that a dynamically linked program, existing only in volatile memory, could really be a copyright work at all, let alone a derivative one. I found this LWN a…

To think that I had entertained the thought for 6 months or so that I had did it enough a d would not have to post this link again: https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDyn... The LGPL text does not require dynamic linking. It's FUD. What the LGPL requires is that the LGPL part can be replaced. That's possible with static linking, that's possible with other languages than the ones relying on a lin…

> That's possible with static linking,

Yes, but in practice it tend to not matter.

> (1) If you statically link against an LGPLed library, you must also provide your application in an object (not necessarily source) format, so that a user has the opportunity to modify the library and relink the application.

Now to get the "oh C objects" thing out of the way, GPLv3 defines:

> “Object code” means any non-source form of a work.

Still this means what you need is to distribute you application in a partial compiled state which can be relinked with the LGPL library (or a updated version) to re-produce the final application. (You also might need to provide the tools to do so if they are not freely available.)

Also let's not forgot the context, i.e. you don't want (or can't) provide the source code of the "main application" which links against the LGPL library.

Now if you program in C, providing a (set-of) pre-compiled pre-symbol stripped objects is feasible.

But most (new) programs are not in C anymore and most new languages do not have clear ABI boundaries at library level. Only clear API boundaries.

A good example are generics or template programming.

E.g. even in C++ if there is heavy use of template programming around the library boundary can make LGP infeasible for that use case. And we are still in C++ which is rather close to C in how it compiles stuff.

If we go a step further, e.g. into Rust it becomes even more of a mess. (It is possible, at least theoretically, with a lot of hacks and restrictions, but totally a nightmare not worth even considering. And again if generics are used a lot, all the generic code at the interface boundary leaks.)

Then there is the additional complexity this introduces to CI.

So possible yes, but for many projects not worth considering.

> What the LGPL requires is that the LGPL part can be replaced.

Not quite, they require you to provide intermediates which can be re-linked with a alternate version of the library.

Which means if you want to e.g. provide the functionality through binary patching it gets tricky, because you need to provide a binary without the LGPled library (1) which you then can "patch" the library into. Instead of being able to provide a binary with the LGPled library in it and allowing you to replace/update it. Which means various approaches around binary patching just became way more complex.

(1): The reason for it is that the object you provide falls itself under license terms.

So ya, no dynamic linking requirement. But for some modern languages still a major problem. And conceptually too closely bound to the concept of the C-compilation process IMHO.

Re: Sequoia PGP is now LGPL 2.0

#42

Earlier quoted context omitted.

To think that I had entertained the thought for 6 months or so that I had did it enough a d would not have to post this link again: https://www.gnu.org/licenses/gpl-faq.en.html#LGPLStaticVsDyn... The LGPL text does not require dynamic linking. It's FUD. What the LGPL requires is that the LGPL part can be replaced. That's possible with static linking, that's possible with other languages than the ones relying on a lin…

While it's true that the LGPL doesn't specifically require dynamic linking, it requires something that is effectively dynamic linking. The way you'd have to do static linking isn't something that is easy to set up in most build systems, and deprives you of the ability to do certain post-build steps (such as signing the build) or certain build options (LTO) without some pain.

If you provide intermediate binary build artifacts i.e. C object files, there it no problem with LTO or signing builds.

I.e. nothing in the LGPL requires you to sign the changed/re-linked binary as far as I known. Similar nothing requires you to sign the provided intermediate artifacts.

Still only relay viable for C, and maybe C++ if no/few templates where used around the interface. (Or scripting languages bundles with a runtime into a binary.)

Re: Sequoia PGP is now LGPL 2.0

#43

Earlier quoted context omitted.

While it's true that the LGPL doesn't specifically require dynamic linking, it requires something that is effectively dynamic linking. The way you'd have to do static linking isn't something that is easy to set up in most build systems, and deprives you of the ability to do certain post-build steps (such as signing the build) or certain build options (LTO) without some pain.

If the source code for your application is available and buildable, that satisfies the LGPL’s definition of “Corresponding Application Code”, regardless of how it’s linked. You don’t need the object code if you have the source code; you can replace the library by rebuilding the application. So this is only an inconvenience for proprietary closed-source applications. Making the library conveniently usable by closed-so…

> available and buildable

But what does buildable mean, no-one but you has access to your CI (which also might likely not be public).

So do you need to provide another CI, a make-file you maintain additionally, etc.? Or is it good enough so that someone could run "the right CLI commands to build and link the project".

Re: Sequoia PGP is now LGPL 2.0

#44

Earlier quoted context omitted.

> The way you'd have to do static linking isn't something that is easy to set up in most build systems, it's trivial in CMake which is the most used buildsystem in languages with a linker, just set -DBUILD_SHARED_LIBS=0 on the command line > and deprives you of the ability to do certain post-build steps (such as signing the build) why would it ? I build my app as a set of static libs linked together in the end and th…

> it's trivial in CMake which is the most used buildsystem in languages with a linker, just set -DBUILD_SHARED_LIBS=0 on the command line Building or using static libraries isn't hard. Doing so in a way that doesn't violate the LGPL's replacement requirement is. The document you yourself linked says this about developing statically-linked libraries with the GPL: > If you statically link against an LGPLed library, you…

GPLs definition of "object" is not a .o file but "anything which is not source code".

Re: Sequoia PGP is now LGPL 2.0

#45

Earlier quoted context omitted.

The parent comment literally posted the same link. I am aware of the replacement concept and how it is technically distinct from an outright ban on static linking. > That's possible with static linking, that's possible with other languages than the ones relying on a linker step, etc. We are talking about Rust, not languages other than Rust. Could you walk us through how you would offer a Rust binary with a statically…

> Could you walk us through how you would offer a Rust binary with a statically linked LGPL Rust crate that is replaceable according to the license requirements (v2.0, 2.1, 3.0, pick your poison), without also releasing the binary's source code? I see that rustc has a "--emit obj" option, from there surely any decent build system would allow enough customization to do what you want but there's enough raw capability t…

> I see that rustc has a "--emit obj" option, from there surely any decent build system would allow enough customization to do what you want but there's enough raw capability to write a user guide that says "build your stuff with rustc --emit obj lgpl_lib_1.rs -o lgpl_lib_1.o and link with our proprietary .o with lld" ; and you'd be good to go.

No, that is not how it works, like not at all.

Rust doesn't use the same concepts for building as C.

1. You don't build stuff with `rustc` in general. (You build it with cargo.)

2. You don't produce object files in general, sure rust can produce them and if you link something over the C-ABI it can make sense. What the compiler produces in general for linking libraries are rlibs.

3. rlibs are not just unstable in their format, they are more like a implementation details, don't expect to be able to link in a library as rlib. Like at all.

4. Rust widely uses generics similar to C++ templates this means part of the code which is not supposed to become public will leak if the libary interface involves templates/generics.

5. In rust (and somewhat in C) you normally don't link two "objects" to produce the final binary you build it with a number of "object" dependencies. But this doesn't work with what LGPL requires from you. It can be easy to make a public open-source skeleton you link in all LGPL libraries and your code then to make the linking magic work.

6. `rust --emit` is mainly meant for debugging, and some special use cases around embedding. Don't expect good integration with build tools.

And most important:

What is theoretically possible doesn't matter, what matters is what is practical. I.e. simple, and fast to setup and maintain.

Even for a C CI the requirements the static linking of a LGPL library puts up can make it easily not worth it.

> only that there is a way to patch

No, you need to be able to provide a non LGPL object which you can re-link with the LGPLed libary, so "just" binary patching isn't a legal option.

Re: Sequoia PGP is now LGPL 2.0

#47
post #20

Earlier quoted context omitted.

The parent comment literally posted the same link. I am aware of the replacement concept and how it is technically distinct from an outright ban on static linking. > That's possible with static linking, that's possible with other languages than the ones relying on a linker step, etc. We are talking about Rust, not languages other than Rust. Could you walk us through how you would offer a Rust binary with a statically…

I don't think it matters that it is impractical. It isn't the FSF's job to write Rust tooling, it is to write licenses. I do agree that that the concern is becoming much more orthogonal both to the FSF's goals and to the way software is built. But that doesn't change the fact that the license works the way it does, nor does it let you insert the words 'dynamic linking' in it.

> I don't think it matters that it is impractical.

But it does matter, it practice it matters more then what is legal if we are honest.

> It isn't the FSF's job to write Rust tooling

Yes, but it doesn't mean that it's not a bad license for the given use-case.

If it's impractical, then in practice there is not much difference to the license simply forbidding the usage (iff the company cares about what is legal).

Through the question is is it a bad license for the given use-case? I.e. does Sequoia provide a rust API or do they provide a C-API written in rust.

Licensing a rust "for-rust" library as LGPL is in practice so close to GPL, that you just could have made it GPL. But a rust C-ABI library/program (e.g. a system library) is a different matter and binding in a LGPL C-ABI library into a rust project still somewhat practical doable (but still quite annoying).

Re: Sequoia PGP is now LGPL 2.0

#48

Earlier quoted context omitted.

> it's trivial in CMake which is the most used buildsystem in languages with a linker, just set -DBUILD_SHARED_LIBS=0 on the command line Building or using static libraries isn't hard. Doing so in a way that doesn't violate the LGPL's replacement requirement is. The document you yourself linked says this about developing statically-linked libraries with the GPL: > If you statically link against an LGPLed library, you…

GPLs definition of "object" is not a .o file but "anything which is not source code".

So basically you could just tar up all the .o files and provide linking instructions?

Re: Sequoia PGP is now LGPL 2.0

#49
This is an excellent UVP to have over GnuPG. I'll probably end up using sequoia for my app for this reason alone (amusing it's dependency graph is manageable).

Curious as to why LGPLv3 wasn't chosen though.

Re: Sequoia PGP is now LGPL 2.0

#50
post #20

Earlier quoted context omitted.

I don't think it matters that it is impractical. It isn't the FSF's job to write Rust tooling, it is to write licenses. I do agree that that the concern is becoming much more orthogonal both to the FSF's goals and to the way software is built. But that doesn't change the fact that the license works the way it does, nor does it let you insert the words 'dynamic linking' in it.

> I don't think it matters that it is impractical. But it does matter, it practice it matters more then what is legal if we are honest. > It isn't the FSF's job to write Rust tooling Yes, but it doesn't mean that it's not a bad license for the given use-case. If it's impractical, then in practice there is not much difference to the license simply forbidding the usage (iff the company cares about what is legal). Throu…

It's still meaningful. When I worked with an F500 corporation they wouldn't allow using GPLed libraries in internal tools without specific review from legal, but LGPL was fine. And it gives someone who wants to use the library in a proprietary product the option of improving rust toolchains to support dynamic linking better; given that proprietary code authors have done things like writing a wrapper for a GPL library that then uses pipes to talk to their main code, this gives them a better route.
Post reply on HN