Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 819513 - app-portage/g-cpan creates ebuilds with (soon to be) deprecated EAPI=5
Summary: app-portage/g-cpan creates ebuilds with (soon to be) deprecated EAPI=5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH, UPSTREAM
: 856328 (view as bug list)
Depends on: 856331
Blocks: EAPI5Removal
  Show dependency tree
 
Reported: 2021-10-22 17:08 UTC by Jack
Modified: 2022-07-05 11:49 UTC (History)
6 users (show)

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


Attachments
Patch for EAPI=8 (EAPI8.patch,644 bytes, patch)
2022-07-03 12:10 UTC, Ian Pickworth
Details | Diff
Updated patch for EAPI=8 (EAPI8.patch,1.65 KB, patch)
2022-07-03 13:16 UTC, Ian Pickworth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2021-10-22 17:08:47 UTC
g-cpan itself has been updated to EAPI=7, but it still generates ebuilds using EAPI-5.  (in bin/g-cpan line 698 in master, although I'm using 0.17.0)

Reproducible: Always

Steps to Reproduce:
1. use g-cpan to generate an ebuild for a Perl module

Actual Results:  
resulting ebuild uses EAPI=5

Expected Results:  
it should use any EAPI higher than 5, which is pending deprecation.
Comment 1 Ian Pickworth 2022-07-03 12:10:57 UTC
Created attachment 789908 [details, diff]
Patch for EAPI=8

Somewhat surprised this morning when the 100+ gcpan modules I have threw EAPI-5 not supported messages.
So I made this patch for app-portage/g-cpan-0.17.0

It updates the generated ebuild files to EAPI 8, with a few changes that I deduced from looking at other perl packages.

I placed this in /etc/portage/patches/app-portage/g-cpan-0.17.0 and rebuilt g-cpan.

Afterwards I installed Term-Title. Worked.
Comment 2 Ian Pickworth 2022-07-03 12:46:00 UTC
My Patch has a bug - it does not address change from MODULE_A_EXT to DIST_A_EXT.

I'll make a new patch in due course
Comment 3 Ian Pickworth 2022-07-03 13:16:49 UTC
Created attachment 789911 [details, diff]
Updated patch for EAPI=8

Changed all occurrences of MODULE_ to DIST_

I had one package that needed DIST_A_EXT - so that is tested.

I don't have packages to test DIST_SECTION - so can't test that
Comment 4 Ulrich Müller gentoo-dev 2022-07-03 13:23:07 UTC
(In reply to Ian Pickworth from comment #3)
> Created attachment 789911 [details, diff] [details, diff]
> Updated patch for EAPI=8

-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Foundation

The copyright holder should also be updated (Gentoo Authors).

Could you also open an upstream pull request with your fix, please?
https://github.com/gentoo-perl/g-cpan
Comment 5 Ian Pickworth 2022-07-03 14:35:02 UTC
(In reply to Ulrich Müller from comment #4)
> 
> The copyright holder should also be updated (Gentoo Authors).
> 

Just to be sure, do you mean the line should look like this?

+# Copyright 1999-2022 Gentoo Authors
Comment 6 Ulrich Müller gentoo-dev 2022-07-03 14:44:07 UTC
(In reply to Ian Pickworth from comment #5)
> Just to be sure, do you mean the line should look like this?
> 
> +# Copyright 1999-2022 Gentoo Authors

Yes.
Comment 7 Ian Pickworth 2022-07-03 14:54:07 UTC
Pull request submitted:
https://github.com/gentoo-perl/g-cpan/pull/50
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-03 22:25:36 UTC
*** Bug 856328 has been marked as a duplicate of this bug. ***
Comment 9 Larry the Git Cow gentoo-dev 2022-07-03 22:33:02 UTC
The bug has been referenced in the following commit(s):

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

commit 128d47e603e3d0c43fa4ececc1e15f62961d0b7a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-03 22:32:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-03 22:32:57 +0000

    app-portage/g-cpan: add 0.18.0
    
    Bug: https://bugs.gentoo.org/819513
    Signed-off-by: Sam James <sam@gentoo.org>

 app-portage/g-cpan/Manifest             |  1 +
 app-portage/g-cpan/g-cpan-0.18.0.ebuild | 65 +++++++++++++++++++++++++++++++++
 app-portage/g-cpan/g-cpan-9999.ebuild   | 25 +++++++------
 3 files changed, 80 insertions(+), 11 deletions(-)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-03 22:34:05 UTC
Big thanks to Ian.
Comment 11 Larry the Git Cow gentoo-dev 2022-07-03 22:39:31 UTC
The bug has been referenced in the following commit(s):

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

commit 6103e4eac8e4a07187cccc324a198a8ad0705c4e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-03 22:39:22 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-03 22:39:22 +0000

    app-portage/g-cpan: add ewarn for recreating overlay/ebuilds
    
    Bug: https://bugs.gentoo.org/819513
    Signed-off-by: Sam James <sam@gentoo.org>

 .../g-cpan/{g-cpan-0.18.0.ebuild => g-cpan-0.18.0-r1.ebuild} | 12 ++++++++++++
 app-portage/g-cpan/g-cpan-9999.ebuild                        | 12 ++++++++++++
 2 files changed, 24 insertions(+)
Comment 12 Nico Baggus 2022-07-04 07:59:45 UTC
Small cosmetic thing:

Ebuild generated with g-cpan 0.18.0-r1 still identifies itself with:

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# This ebuild generated by g-cpan 0.17.0
Comment 13 Ian Pickworth 2022-07-04 20:05:16 UTC
(In reply to Nico Baggus from comment #12)
> Small cosmetic thing:
> 
> Ebuild generated with g-cpan 0.18.0-r1 still identifies itself with:
> 
> # Copyright 1999-2022 Gentoo Authors
> # Distributed under the terms of the GNU General Public License v2
> # This ebuild generated by g-cpan 0.17.0

In bin/g-cpan there is this:
   our $VERSION = App::gcpan->VERSION();

In lib/App/gcpan.pm there is this:
   our $VERSION = '0.17.0';

Clearly would be better if it was derived from the version of the installed package.
Maybe edited by the e-build. I don't know enough e-build lingo - if someone wants to give me some pointers on how to include some processing directly after the source is prepared I'd be willing to give it a go.
Comment 14 Ian Pickworth 2022-07-05 11:49:30 UTC
(In reply to Ian Pickworth from comment #13)
> Clearly would be better if it was derived from the version of the installed
> package.

I have just created defect https://bugs.gentoo.org/856541
which provides a patch to the ebuild file to change the version to match the package full version.