Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140180 - documentation for virtuals, both for end user and developer
Summary: documentation for virtuals, both for end user and developer
Status: RESOLVED NEEDINFO
Alias: None
Product: Community Relations
Classification: Unclassified
Component: Developer Relations (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Devmanual Team
URL: http://devmanual.gentoo.org/
Whiteboard: Documentation writer needed
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-12 21:07 UTC by Josh Nichols (RETIRED)
Modified: 2020-03-09 09:52 UTC (History)
5 users (show)

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


Attachments
A start atleast (bug140180.patch,2.65 KB, patch)
2007-11-14 03:25 UTC, Mark Loeser (RETIRED)
Details | Diff
Added in the LICENSE blurb (bug140180.patch,2.87 KB, patch)
2007-11-24 21:20 UTC, Mark Loeser (RETIRED)
Details | Diff
make repoman ignore empty LICENSE for "virtual" category (repoman_missing_license.patch,633 bytes, patch)
2007-11-24 22:16 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Nichols (RETIRED) gentoo-dev 2006-07-12 21:07:20 UTC
Since the Java team switched from 'old style' to 'new style' virtuals, there have been a number of questions / confusion about virtuals in general. I think it would be beneficial to have documentation, both for users and devs, about virtuals.

I asked in #-doc, and was informed that it wasn't really documented very well, as in only in the virtuals files themselves, only by passing in the dev handbook, and only briefly discussed in the devmanual.

I was advised to assign it to devrel by curtis119.
Comment 1 nm (RETIRED) gentoo-dev 2007-01-22 04:16:46 UTC
There seems to be a fair amount of stuff on virtuals added to the handbook since this bug was written....
Comment 2 Christina Gianelloni (RETIRED) gentoo-dev 2007-08-01 19:56:05 UTC
nichoj, are you satisfied with the handbooks inclusion of virtuals currently so we may close the bug?
Comment 3 Josh Nichols (RETIRED) gentoo-dev 2007-08-01 21:51:16 UTC
Here's what I see now for virtuals documentation:

User:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1&style=printable

Developer:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=3&chap=1

The user stuff is probably sufficient.

The developer stuff looks a little crufty, as it only talks about the 'old-style' virtuals.
Comment 4 Christina Gianelloni (RETIRED) gentoo-dev 2007-08-02 16:16:12 UTC
I think the requested documentation should be in the developer manual, once there we will remove it from the developer handbook (which is going more towards policy.)
Comment 5 Mark Loeser (RETIRED) gentoo-dev 2007-11-14 03:25:55 UTC
Created attachment 135934 [details, diff]
A start atleast

Here is at least a start to this bug.  One thing that needs to be resolved (can't remember who exactly brought this up now) is the LICENSE in virtuals.  It should probably be the combination of all LICENSES of the packages that can satisfy it, that way ACCEPT_LICENSE would work correctly on it.  Please correct me if I'm not making sense.
Comment 6 Ciaran McCreesh 2007-11-14 03:31:02 UTC
LICENSE should be empty, and repoman should be fixed to accept explicit LICENSE="". Virtuals don't require accepting any licenses themselves.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2007-11-14 03:43:06 UTC
(In reply to comment #6)
> LICENSE should be empty, and repoman should be fixed to accept explicit
> LICENSE="". Virtuals don't require accepting any licenses themselves.
> 

Sounds perfectly reasonable.  ACCEPT_LICENSE should then automatically accept something that lacks a license then?  Just want to make sure we get it documented clearly somewhere.
Comment 8 Ciaran McCreesh 2007-11-14 03:48:36 UTC
(In reply to comment #7)
> ACCEPT_LICENSE should then automatically accept something that lacks a license
> then?

It should... Don't know if it does, but it should.
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-16 00:27:09 UTC
LICENSE="as-is" is perfectly acceptable, too.  Of course, if you wanted to get pedantic about the thing, it should probably be GPL-2 since the "virtual" itself is a Gentoo product, and therefore falls under our normal licensing.
Comment 10 Ciaran McCreesh 2007-11-16 00:32:50 UTC
Neither as-is nor GPL-2 makes sense. The virtual itself is an empty package, and thus has no licence.
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-16 17:44:54 UTC
Well, what makes up a virtual is the dependency information provided.  As I see it, the ebuild itself *is* the virtual, since the ebuild itself provides everything.  We specifically didn't want ACCEPT_LICENSE to allow blank LICENSE, or to have any sort of wildcard capabilities.  Everything must have a license.  If there is no license giving us the rights to use the code, then copyright takes over and we're not allowed to redistribute it.  Without copyright assignment, this even covers Gentoo-created code.  There's tons and tons of discussion on it, on the gentoo-dev/gentoo-nfp mailing lists, and also in a bug or two.  I'd link to them all, but I'm being lazy... ;]
Comment 12 Mark Loeser (RETIRED) gentoo-dev 2007-11-16 17:49:02 UTC
Well, if everything needs to have a license, then the virtual ebuild needs to list all of the licenses of the packages that can satisfy the virtual, like I originally brought up.

Chris:  I'll look around and see what I can find on mailing lists or documented elsewhere on the behavior of ACCEPT_LICENSE and what is allowed for the LICENSE variable.
Comment 13 Ciaran McCreesh 2007-11-16 23:05:14 UTC
Chris: You're confusing the licence of the ebuild with the licence of the virtual. They're two entirely different things, even when the ebuild installs nothing.

We don't stick LICENSE="GPL-2" in ebuilds for non-GPL-2 things, despite the licence terms of the ebuilds. By extension, it shouldn't be added to the licence of a virtual ebuild merely because of the ebuild's metadata.

The only sensible solution here is for virtuals to have LICENSE="", and to make repoman accept that. ACCEPT_LICENSE should accept LICENSE="", since there is no license to accept for the package, in the same way that the resolver accepts DEPEND="" as resolved, since there are no dependencies to accept for that package.

(Note that LICENSE is like DEPEND, not KEYWORDS, in that it's an all-of resolution except where any-of blocks are in effect, whereas KEYWORDS is an any-of resolution.)

Now, you could argue that the tree itself should have an explicit metadata license of some kind, and that users should have to accept the tree's license. But that's an entirely separate issue.
Comment 14 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-20 20:44:55 UTC
(In reply to comment #13)
> Chris: You're confusing the licence of the ebuild with the licence of the
> virtual. They're two entirely different things, even when the ebuild installs
> nothing.

I know what I was saying.  I was not confusing the two.  Unlike other packages, new-style virtuals are a special case.  The old-style "virtuals" are GPL-2 by virtue of being in the profiles, which are all GPL-2.

We specifically decided on two things with the ACCEPT_LICENSE stuff.  One, is that all ebuilds (and as such, packages) *must* have a license, making LICENSE="" invalid for our usage.  This is simply because something without a license falls under copyright and is then restricted from redistribution without the express consent of the copyright holder.  Second, that ACCEPT_LICENSE="*" (or other wild cards) were invalid.  A package must have a license.  If it exists in the tree, there has to be something to it, even if it is just metadata.  As such, that data *must* have a license if we're planning on shipping it.  Since Gentoo-produced code is licensed under the GPL-2, it should be GPL-2.  I'd honestly accept any license which would be suitable, such as "freedist" or "as-is" or even some indication that it is public domain.  However, it *needs* some kind of license.  That being said, the virtual doesn't need to list the LICENSE of each possible providing package.  After all, if I have a GPL-2 package and a CDDL package which provide the same functionality, I don't need to accept the CDDL license to install the GPL-2 package.  Ciaran is exactly correct in that the license of the virtual is independent of the licenses of its children.  All I am saying is that the virtual *must* have a license.  This can be argued ad nauseum, but in the end, the Foundation is going to do what it feels is necessary to cover its own ass, even if said means are *more* than required by law.  It is better to be safe than sorry.  US copyright law is fairly simple.  If you don't have express permission to redistribute from the copyright holder, you have *no* right to redistribute whatsoever.  Since we don't have a proper legal copyright assignment system, we would have to ask the individual copyright owner of the virtual for permission and keep that on file somewhere.  I think it is much easier to just assign a license to the virtual, even if you feel that it is unnecessary to do so, for the reasons stated above.
Comment 15 Ciaran McCreesh 2007-11-20 20:56:03 UTC
Chris: Your argument is entirely invalid since the virtual isn't distributing anything. The LICENSE keyword only applies to the things installed by the package (and not including any Gentoo-authored metadata). Thus, in this specific case, LICENSE="" is correct, and the only thing the Foundation needs to care about is the usual ebuild copyright assignment and licensing.
Comment 16 Mark Loeser (RETIRED) gentoo-dev 2007-11-20 22:02:32 UTC
I have to agree with Ciaran on this one.  We already have the license for the "ebuild" at the top, which is what you seem to be talking about Chris.  Since the virtual doesn't install anything besides the metadata that we already have a GPLv2 on, I don't see the purpose of putting anything into LICENSE.

And if we need to put a license in the variable, its going to have to be the possible licenses for all packages that can satisfy that virtual, otherwise I can't see any sane way that ACCEPT_LICENSE would allow that virtual to be installed.  (someone correct me if I'm mistaken here)
Comment 17 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-20 22:23:48 UTC
(In reply to comment #16)
> Since
> the virtual doesn't install anything besides the metadata that we already have
> a GPLv2 on, I don't see the purpose of putting anything into LICENSE.

Please explain this.  If the metadata that we're installing is covered under the GPLv2, why would that not cover the package, too?  If it does, then the package is GPL-2 and should have an appropriate LICENSE.

> And if we need to put a license in the variable, its going to have to be the
> possible licenses for all packages that can satisfy that virtual, otherwise I
> can't see any sane way that ACCEPT_LICENSE would allow that virtual to be
> installed.  (someone correct me if I'm mistaken here)

This is incorrect for one reason.  New-style virtuals are packages.  The license of the virtual is the license for the virtual, not for every single package the virtual could *possibly* install.  As I said, I don't need to accept CDDL to install a GPL-2 application.  At the same time, with the new-style virtuals, most things depend on the virtual, not what the virtual provides, so I could see a situation where someone could get the virtual package but not the actual package due to license restrictions/masks.

At any rate, its become a bit obvious that I'm not getting my point across.  As such, I'll simply defer any decision/discussion once it comes up to the Foundation and let consensus take over.
Comment 18 Ciaran McCreesh 2007-11-22 13:50:04 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Since
> > the virtual doesn't install anything besides the metadata that we already have
> > a GPLv2 on, I don't see the purpose of putting anything into LICENSE.
> 
> Please explain this.  If the metadata that we're installing is covered under
> the GPLv2, why would that not cover the package, too?  If it does, then the
> package is GPL-2 and should have an appropriate LICENSE.

The metadata for every package, if it is copyrightable, is GPL-2, yet we do not stick LICENSE="GPL-2" for every package because the metadata is covered by the tree's (not explicitly accepted and outside of the scope of LICENSE / ACCEPT_LICENSE) license.

> At any rate, its become a bit obvious that I'm not getting my point across.

We all understand your point. It's just wrong.
Comment 19 Mark Loeser (RETIRED) gentoo-dev 2007-11-23 06:43:46 UTC
Portage team: Comments and input on how this is currently implemented, and how we want this to work?
Comment 20 Marius Mauch (RETIRED) gentoo-dev 2007-11-23 15:20:12 UTC
a) virtuals should not have a value in LICENSE for reasons stated above (unless they actually install something to $ROOT)
b) an empty value for LICENSE doesn't mask an ebuild
Comment 21 Mark Loeser (RETIRED) gentoo-dev 2007-11-24 21:20:29 UTC
Created attachment 136923 [details, diff]
Added in the LICENSE blurb

Added in a small blurb about setting the LICENSE variable to an empty string.  Anyone see anything wrong with this?
Comment 22 Zac Medico gentoo-dev 2007-11-24 22:16:19 UTC
Created attachment 136931 [details, diff]
make repoman ignore empty LICENSE for "virtual" category
Comment 23 Ulrich Müller gentoo-dev 2007-12-19 06:20:53 UTC
Wouldn't above-mentioned arguments apply to HOMEPAGE as well?
Comment 24 Mark Loeser (RETIRED) gentoo-dev 2008-01-09 03:12:23 UTC
(In reply to comment #23)
> Wouldn't above-mentioned arguments apply to HOMEPAGE as well?
> 

Good point.  Lets do that too.  I'll update the doc tomorrow (way too tired to do so now).

Zac: do you agree?  And can you add that into the repoman check if so.

Thanks
Comment 25 Zac Medico gentoo-dev 2008-01-09 04:15:16 UTC
(In reply to comment #24)
> Zac: do you agree?  And can you add that into the repoman check if so.

Yes, the current ~arch version of portage ignores both missing HOMEPAGE and LICENSE.
Comment 26 Bo Ørsted Andresen (RETIRED) gentoo-dev 2008-05-19 15:33:07 UTC
I think it's worth mentioning self-blocking virtuals which is the only reason why old style cannot be deprecated. also in the new style section it might be worth saying explicitly that they are regular packages with any-of runtime dependencies..
Comment 27 Zac Medico gentoo-dev 2008-05-19 19:07:30 UTC
One additional feature the new style virtuals do not have (yet) is the ability to set a preference in the profile without necessarily pulling the package into the system set (accomplished with old style virtuals via the "virtuals" file in the profile). For an example of how this can be useful, see bug 161953.
Comment 28 Mark Loeser (RETIRED) gentoo-dev 2008-05-29 02:32:41 UTC
Just added this to devmanual.  If you find anything wrong with it, please hit me with the cluebat and add QA back to this bug.  We are done as far as I can tell.  Not sure if devrel wants to do anything additional with regards to the dev handbook.
Comment 29 Ulrich Müller gentoo-dev 2008-05-29 06:50:20 UTC
http://devmanual.gentoo.org/general-concepts/virtuals/
The running text says: "a new-style virtual has an empty string for the value of the LICENSE and HOMEPAGE variables" while the example has a non-empty HOMEPAGE. Shouldn't this be made consistent?
Comment 30 Mark Loeser (RETIRED) gentoo-dev 2008-05-29 12:56:55 UTC
(In reply to comment #29)
> http://devmanual.gentoo.org/general-concepts/virtuals/
> The running text says: "a new-style virtual has an empty string for the value
> of the LICENSE and HOMEPAGE variables" while the example has a non-empty
> HOMEPAGE. Shouldn't this be made consistent?
> 

Yea, oops...I suck :)  Thanks
Comment 31 Mark Loeser (RETIRED) gentoo-dev 2009-05-15 21:09:29 UTC
QA is done here.
Comment 32 Pacho Ramos gentoo-dev 2014-11-15 18:29:27 UTC
Is there anything more that could be changed in current devmanual?