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
Actually repoman should also allow for verbose list of authors.
> 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.
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.
(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.
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>
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(+)
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.
Are you saying that repoman ought to enforce this for all third-party repos?
(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?
(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.
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.
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.
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(-)
(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.
Closing, this is fixed in repoman-2.3.15.