Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566412 - [Future EAPI] Provide a way to query licenses (LICENSEDIR)
Summary: [Future EAPI] Provide a way to query licenses (LICENSEDIR)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: future-eapi 373349
  Show dependency tree
 
Reported: 2015-11-21 18:57 UTC by Michał Górny
Modified: 2019-03-22 14:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-21 18:57:52 UTC
Ebuilds are repeatedly attempting to do random stuff on top of ${PORTDIR}/licenses. This is wrong for so many reasons:

1. licenses can come from different repositories, so PORTDIR may not have the used license at all,

2. PORTDIR is not available during binpkg install (and is invalid in non-src_* phases),

3. PORTDIR is not even long-term guaranteed to have a specific structure,

4. some people actually symlink files from PORTDIR to the package... seriously.


So far the potentially-valid uses I have seen are:

A. displaying a specific license snippet during install as required by the license,

B. installing the license file to the filesystem as supposedly required by the license,

C. installing the COPYING file somewhere to make 'About' dialog work.

In some cases, the actual license wasn't included in the distribution package.


I think we should carefully think whether we actually need ebuilds to be able to access licenses or ebuild writers should resort to other solutions when required files are not available in distribution package (FILESDIR? SRC_URI?).

If we consider it useful, we should provide a proper way of accessing license files. In particular, it should provide access to the effective licenses used by ebuild or binary package (i.e. all licenses mentioned by LICENSE, taken from appropriate repositories or the binary package file).

In particular, I think we could deploy a solution similar to the one used by distfiles. Create a 'license' subdirectory inside worktree, and copy/symlink appropriate license files there.
Comment 1 Ulrich Müller gentoo-dev 2019-03-22 14:03:42 UTC
(In reply to Michał Górny from comment #0)
> So far the potentially-valid uses I have seen are:
> [...]
> 
> In some cases, the actual license wasn't included in the distribution
> package.

This looks like it would affect only corner cases. If a package installs its license or displays it during installation, then I would assume that it would normally include it in the tarball. If there are really packages where that isn't the case, then the license can be fetched separately via SRC_URI.

> [...]

> In particular, I think we could deploy a solution similar to the one used by
> distfiles. Create a 'license' subdirectory inside worktree, and copy/symlink
> appropriate license files there.

See above, this is useful only for a few packages, while creating useless overhead for all others.

WONTFIX?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-22 14:14:12 UTC
wfm.