|
|
Log in / Subscribe / Register

Courtès: What's in a package

Courtès: What's in a package

Posted Sep 23, 2021 12:47 UTC (Thu) by swilmet (guest, #98424)
Parent article: Courtès: What's in a package

(speaking more generally about bundling/vendoring).

Bundling/vendoring a dependency is sometimes done because that dependency is not evolving well, in the direction that we want. So we simply pick up an older version that works well for us, and that's it. It's open source, after all.


to post comments

Courtès: What's in a package

Posted Sep 23, 2021 13:05 UTC (Thu) by mathstuf (subscriber, #69389) [Link] (2 responses)

The main project(s) I work on do vendor some dependencies, but I try to make sure that they at least behave well. This includes:

- options to use external copies;
- mangling symbols to avoid conflicts when co-existing with the "real" thing in a process;
- mangling library names to avoid runtime loader problems; and
- moving headers to a subdirectory to avoid conflicting with a "real" install.

Of course, there are some that we have patched for our own purposes (with upstreamed PRs, usually merged depending on upstream activity levels) and there's no public version that is viable yet.

I don't like doing it because it's a huge PITA, but when Windows and macOS are target platforms and you depend on lots of external libraries (no, Homebrew and MacPorts are not suitable in the general case for macOS), shipping copies is way *less* work than walking users through how to build with their pet copies (of which there's usually poor uniformity) and the `PATH` shenanigans that usually end up being required.

Courtès: What's in a package

Posted Sep 24, 2021 4:10 UTC (Fri) by pabs (subscriber, #43278) [Link] (1 responses)

For Windows/macOS, wouldn't just shipping the copies in the binary packages be enough? I wouldn't have thought having copies in the source repo would be needed. I believe there are package managers for Windows/macOS too, you could just direct users to installing via those.

Courtès: What's in a package

Posted Sep 24, 2021 11:51 UTC (Fri) by swilmet (guest, #98424) [Link]

With my limited experience with the MS Store, yes for Windows you prepare your package the way you want, installing dependencies separately (the version that works best), either with dynamic linking or static linking. No need to copy the source code in the main git repo (in that case).

Courtès: What's in a package

Posted Sep 24, 2021 2:47 UTC (Fri) by JanC_ (subscriber, #34940) [Link] (1 responses)

But if you fork something, why not maintain the fork separately, probably using a different name, so that it can also be used (and maintained) by others who disagree?

Courtès: What's in a package

Posted Sep 24, 2021 12:01 UTC (Fri) by swilmet (guest, #98424) [Link]

Sometimes it's just picking up an older tarball and building it, other times it's creating a small branch in git with a few commits.

And it's definitely possible to make the "light fork" parallel-installable with the main, upstream version, so that Linux distros can install both, see for example:
https://developer.gnome.org/documentation/guidelines/main...
(this is used for instance for the different major versions of GTK, they can co-exist on the same prefix).


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds