Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 406811

Summary: Feature request: enhance portage with "buildsrcpkg" that captures all source files for GPL compliance
Product: Portage Development Reporter: Ed Wildgoose <gentoo>
Component: CoreAssignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: enhancement CC: bertrand
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Ed Wildgoose 2012-03-03 18:59:46 UTC
When using gentoo for building packages for distribution, many licenses burden us with the requirement to provide all source used to generate that distribution. At present this is somewhat challenging as there are several places "source" could come from (eg $FILESDIR, http download, git, etc)

It would be helpful if portage were enhanced with a function, eg "buildsrcpkg" that can capture all source files used to build an ebuild

On the surface it seems that this can be performed by capturing everything in $A and ${PORTDIR}/${CATEGORY}/${PN}.  However, this may possibly miss some unusual sources (git?).  Additionally it will often include "too much" since often patches are downloaded but not applied, or apply only to other ebuilds. Perhaps we can do better by eg, tracking the files used by the epatch hook, and files copied in/deleted out of the source tree?
Comment 1 Zac Medico gentoo-dev 2012-03-04 07:20:32 UTC
If you're trying to fulfill this kind of license requirement, I think the most reasonable approach is to keep a snapshot of the portage tree, and copy of $DISTDIR containing $A for all of your built packages. That's all that would be required to enable anyone to reproduce the build from scratch. Using live vcs/git sources makes it basically impossible to reproduce the build, so you should instead create snapshots if you need the build to be reproducible.