Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666330 - Repoman: Update for new copyright policy
Summary: Repoman: Update for new copyright policy
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL: https://www.gentoo.org/glep/glep-0076...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 642072 666776
  Show dependency tree
 
Reported: 2018-09-16 09:41 UTC by Ulrich Müller
Modified: 2019-08-11 18:26 UTC (History)
1 user (show)

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


Attachments
repoman: Update header check for Gentoo repo policy. (0001-repoman-Update-header-check-for-Gentoo-repo-policy.patch,4.13 KB, patch)
2019-06-03 15:13 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2018-09-16 09:41:47 UTC
The new copyright policy defined by GLEP 76 says that the copyright notice should read:

Copyright YEARS Gentoo Authors

Repoman should be updated accordingly.


   RepoMan scours the neighborhood...
     ebuild.badheader              1
      app-editors/emacs/emacs-26.1-r3.ebuild: Invalid Gentoo Copyright on line: 1
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-09-16 10:19:13 UTC
Actually repoman should also allow for verbose list of authors.
Comment 2 Mike Gilbert gentoo-dev 2018-09-16 14:01:48 UTC
> Actually repoman should also allow for verbose list of authors.

That makes the copyright check and auto-update feature a bit harder to implement. We would not want to check/update the date range for all authors. Instead, we would need to scan the list and check for an author that matches the current user. If said user works for a company that claims the copyright, that gets even more complex.

I wonder if it is actually necessary to update the years in the copyright notice in most cases; do the sort of trivial edits that happen over most of an ebuild's lifespan warrant a copyright length extension?. Maybe we should just remove that part and reduce the repoman check to look for any copyright notice at all.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-09-16 14:34:52 UTC
I think we can consider a few separate features:

1. Generic check for copyright line presence and well-formedness.

2. Check that ensures that at least one copyright line covers current year.

3. Auto-update if "Gentoo Authors" are used.

4. (Maybe) automatic change from GF to Gentoo Authors.
Comment 4 Mike Gilbert gentoo-dev 2018-09-16 15:02:28 UTC
(In reply to Michał Górny from comment #3)
> 2. Check that ensures that at least one copyright line covers current year.

I still wonder if this is actually necessary.
Comment 5 Zac Medico gentoo-dev 2018-09-20 19:32:59 UTC
commit 9f089d270503d18ee8800fe97f26c6644f20cac9
Author: Michał Górny <mgorny@gentoo.org>
Date:   2018-09-18 11:07:55 +0200

    repoman: Automatically convert copyright to 'Gentoo Authors'
    
    Automatically convert 'Gentoo Foundation' copyright to 'Gentoo Authors'
    when updating the copyright date.
    
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Reviewed-by: Zac Medico <zmedico@gentoo.org>

commit 2e6b40509dfffe8dd028dcc5d725a0ac9188d8b7
Author: Michał Górny <mgorny@gentoo.org>
Date:   2018-09-18 10:57:08 +0200

    repoman: Allow copyright updates for 'Gentoo Authors'
    
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Reviewed-by: Zac Medico <zmedico@gentoo.org>

commit c4096aff486da02fb2ddd410f934fe9e418741ba
Author: Michał Górny <mgorny@gentoo.org>
Date:   2018-09-18 10:49:55 +0200

    repoman: Update header checks for the new copyright policy
    
    Update the header checks to account for the new copyright policy:
    - there can be multiple copyright lines,
    - copyright owner can be anyone,
    - at least one copyright line should match last modification date.
    
    This requires updating the check to appropriately allow the license
    line to move down.  Additionally, the copyright date error is separated
    from invalid copyright line error.
    
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Reviewed-by: Zac Medico <zmedico@gentoo.org>
Comment 6 Larry the Git Cow gentoo-dev 2018-09-22 09:41:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d46bdef8c7e928114e8d80198e6899fca9d4a558

commit d46bdef8c7e928114e8d80198e6899fca9d4a558
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-09-22 09:23:58 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-09-22 09:40:53 +0000

    app-portage/repoman: version bump to 2.3.11
    
    Support the new Gentoo Authors copyright policy and automatically apply
    the new policy when updating copyright headers.  Earlier versions of
    repoman will report an ebuild.badheader warning for the new copyright
    headers. Users of earlier versions of repoman should be advised to
    simply ignore the ebuild.badheader warning, or else upgrade to the
    latest version of repoman.
    
    Bug: https://bugs.gentoo.org/666330
    Package-Manager: Portage-2.3.49, Repoman-2.3.11

 app-portage/repoman/Manifest              |  1 +
 app-portage/repoman/repoman-2.3.11.ebuild | 63 +++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
Comment 7 Ulrich Müller gentoo-dev 2019-01-18 14:51:56 UTC
In its 2019-01-13 meeting, the Council has made "Gentoo Authors" mandatory for ebuilds:

The simplified form of the copyright attribution according to GLEP 76 [1], i.e., "Copyright YEARS Gentoo Authors", MUST [2] be used for ebuilds and profile files in the Gentoo repository.
[1] https://www.gentoo.org/glep/glep-0076.html#simplified-attribution
[2] https://www.ietf.org/rfc/rfc2119.txt

Repoman should be updated again to reflect this new policy, therefore reopening.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-01-18 16:10:43 UTC
Are you saying that repoman ought to enforce this for all third-party repos?
Comment 9 Ulrich Müller gentoo-dev 2019-01-19 10:02:04 UTC
(In reply to Michał Górny from comment #8)
> Are you saying that repoman ought to enforce this for all third-party repos?

Since it had enforced "Gentoo Foundation" before, I won't expect a problem there.

Also, if necessary, couldn't the check be controlled by an entry in layout.conf?
Comment 10 Brian Dolbec (RETIRED) gentoo-dev 2019-01-19 17:20:19 UTC
(In reply to Ulrich Müller from comment #9)
> (In reply to Michał Górny from comment #8)
> > Are you saying that repoman ought to enforce this for all third-party repos?
> 
> Since it had enforced "Gentoo Foundation" before, I won't expect a problem
> there.
> 
> Also, if necessary, couldn't the check be controlled by an entry in
> layout.conf?

Actually, instead of layout.conf it should be in /metadata/repoman/ config where all options can be controlled or overridden, extended.  Currently they are not yet used there without using the --experimental-repository-modules <y|n> option.
Comment 11 Ulrich Müller gentoo-dev 2019-06-03 11:54:00 UTC
Ping.

Could this be implemented please, in order to avoid further useless discussions? The simplest solution would be to allow only a single copyright line in header.py, and require Gentoo Authors in copyright_re.
Comment 12 Ulrich Müller gentoo-dev 2019-06-03 15:13:31 UTC
Created attachment 578516 [details, diff]
repoman: Update header check for Gentoo repo policy.

Attached patch would enforce the "Gentoo Authors" line.

I took the simple approach of (mostly) reverting to the previous check for a single line, because we know that this code had worked before.
Comment 13 Larry the Git Cow gentoo-dev 2019-06-03 18:39:28 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=1f2d1e63a605d5ad4a9257e0102b9803bc59aeb6

commit 1f2d1e63a605d5ad4a9257e0102b9803bc59aeb6
Author:     Ulrich Müller <ulm@kph.uni-mainz.de>
AuthorDate: 2019-06-03 15:02:02 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-06-03 18:38:42 +0000

    repoman: Update header check for Gentoo repo policy.
    
    By decision of the Gentoo Council in its 2019-01-13 meeting, ebuilds
    in the Gentoo repository MUST use the simplified form of the copyright
    attribution according to GLEP 76, i.e.: "Copyright YEARS Gentoo Authors".
    
    Update the header check accordingly, mostly by reverting to the
    simpler single line check that was in place before commit c4096aff48.
    
    Bug: https://bugs.gentoo.org/666330
    Signed-off-by: Ulrich Müller <ulm@kph.uni-mainz.de>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 repoman/cnf/linechecks/linechecks.yaml             |  1 -
 .../modules/linechecks/gentoo_header/header.py     | 45 ++++++++--------------
 2 files changed, 15 insertions(+), 31 deletions(-)
Comment 14 Zac Medico gentoo-dev 2019-06-03 22:28:04 UTC
(In reply to Ulrich Müller from comment #12)
> Created attachment 578516 [details, diff] [details, diff]
> repoman: Update header check for Gentoo repo policy.
> 
> Attached patch would enforce the "Gentoo Authors" line.
> 
> I took the simple approach of (mostly) reverting to the previous check for a
> single line, because we know that this code had worked before.

Release in repoman-2.3.14.
Comment 15 Ulrich Müller gentoo-dev 2019-08-11 18:26:51 UTC
Closing, this is fixed in repoman-2.3.15.