Subject: bug#51352: closed (Matterbridge contained a lot of vendored code)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 11 Dec 2024 21:20:02 +0000

Your bug report

#51352: Matterbridge contained a lot of vendored code

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
51352: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51352
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Matterbridge contained a lot of vendored code
From: Sharlatan Hellseher <[email-masked]>
To: [email-masked]
Date: Wed, 11 Dec 2024 21:18:04 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Closing this one as matterbridge on the way of unbundle all packages
from vendor to make it possible to upgrade. Vendor is no longer provided
in the latest version of the package.

See commit 1dd7a47b652f9533290abb17261476fafaf92eb7.

--
Thanks,
Oleg

Subject: Matterbridge contained a lot of vendored code
From: Denis 'GNUtoo' Carikli <[email-masked]>
To: [email-masked]
Date: Sat, 23 Oct 2021 16:57:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

When I sent the patch adding matterbridge to Guix, I only notified that
I didn't know if it contained vendored code or not at the last moment
(after the patch was sent, during the discussion about it, and before
it was merged).

The issue is that I didn't know go at all and more specifically I didn't
know its the compilation system worked. So I managed to create a
package for matterbridge by looking at how it was done for other go
packages.

After learning more about how go compilation worked, I found out that
matterbridge contained a lot of vendored code.

And Guix explicitly wants to avoid bundles code. In the "16.6 Submitting
Patches" section of the manual[1], we have:
> 6. Make sure the package does not use bundled copies of software
> already available as separate packages.
And here while most dependencies are not already packaged, some are,
and I guess that I should read between the lines and conclude that all
the matterbridge dependencies should rather be packaged.

So the question is what should we do about that. 

As I understand with the go build system, or you vendor all
dependencies, or you vendor none, and I've not yet managed to find a
way to workaround that yet in Guix (to do a progressive unvendoring).

So instead I've started working on unvendoring matterbridge[2]
completely, but if we go this route, there are more than 500
dependencies.

To do that I first used the following command:
    guix import go -r github.com/42wim/matterbridge

I then started looking at each package definition that Guix didn't
manage to detect the license of, and I read the licenses to find if
they were free software. All the licenses I read were FSDG compliant.
Usually they had some extra text indicating the provenance of the code
or they would have multiple free software licenses.

Then I started adding packages for the dependencies that guix import go
didn't manage to find.

Theses are repositories that are being forked from the official ones
for a reason or another.

I've not finished that yet, but I still think it was a good idea to
open a bug report as I've now more understanding of the problem.

Given the huge amount of dependencies I was wondering what was the best
approach here:
- Would it makes sense to remove matterbridge from Guix, or should we
  fix it instead?
- If we fix it by packaging each dependencies, would it be ok if that
  is done step by step, like if dependencies are packaged and patches
  for them are sent, without necessarily a way to seriously test if
  the packaged dependency work until they are used by other software
  (like matterbridge)?

Also when I'll manage to update matterbridge[3] how should we deal with
such amount of packages? Would I need to send one (generated) patch for
the upgrade of each package?

I also guess that sticking as much as possible to what Guix import go
generates would help in situations like that as it would make the
maintenance faster.

References:
-----------
[1]https://guix.gnu.org/manual/en/guix.html#Submitting-Patches
[2]https://git.replicant.us/contrib/GNUtoo/infrastructure/guix/log/?h=matterbridge-unvendor
[3]Right now there is a compilation issue that I didn't manage to fix,
  even with help from #guix).

Denis.