Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 752738 - mail-filter/opendkim: migrate to lua eclasses
Summary: mail-filter/opendkim: migrate to lua eclasses
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Orlitzky
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: slotted-lua
  Show dependency tree
 
Reported: 2020-11-03 15:36 UTC by Marek Szuba
Modified: 2020-12-23 14:52 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 Marek Szuba archtester gentoo-dev 2020-11-03 15:36:57 UTC
In order for Gentoo Linux to properly support side-by-side installation of
different versions of Lua (including LuaJIT), please migrate this package as
to lua.eclass (for packages which should support multiple Lua implementations
at the same time, i.e. most likely Lua modules) or lua-single.eclass (for
packages which only have to support one Lua implementation at a time). For
details, consult documentation of respective eclasses as well as
already-migrated ebuilds in the tree.

Please note that since slotted dev-lang/lua is currently masked, your
migrated ebuilds should be masked as well. There is a section of package.mask,
created in September 2020, which you can use for this purpose so that it will
be easier in the future to unmask them all in one go.

Thank you in advance for your effort!
Comment 1 Ralph Seichter 2020-11-03 17:11:04 UTC
Please note that I won't have time to work on this issue throughout the month of November. Perhaps somebody else (mjo?) would like to give it a shot?
Comment 2 Larry the Git Cow gentoo-dev 2020-12-09 15:05:59 UTC
The bug has been referenced in the following commit(s):

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

commit 4b33152c76d8149fe3120cacdb7435b894395a3b
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2020-12-09 15:01:33 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2020-12-09 15:01:47 +0000

    mail-filter/opendkim: new masked revision with slotted lua.
    
    This is relatively untested, of course, but at least I've picked out
    the compatible versions of Lua and have put the eclass variables in
    approximately the right places.
    
    Bug: https://bugs.gentoo.org/752738
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 mail-filter/opendkim/opendkim-2.10.3-r25.ebuild | 235 ++++++++++++++++++++++++
 1 file changed, 235 insertions(+)

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

commit 867cdd9826942e19b4cfa3f7d4e907c758cdb2da
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2020-12-09 14:43:04 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2020-12-09 15:01:46 +0000

    profiles: mask >=mail-filter/opendkim-2.10.3-r25 for slotted lua.
    
    Bug: https://bugs.gentoo.org/752738
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 profiles/package.mask | 1 +
 1 file changed, 1 insertion(+)
Comment 3 Marek Szuba archtester gentoo-dev 2020-12-21 11:35:45 UTC
Thanks for having taken care of this, mjo! I've had a look and overall it looks okay - except for two things:
 - I think there is a typo (an unnecessary }) in LUA_COMPAT?
 - the way ...-lua-pkgconfig.patch works I am pretty sure configure will automagically select lua5.1 if it is present regardless of the value of LUA_SINGLE_TARGET. It should either check for "lua" before "lua5.1", or just check for "lua" only.
Comment 4 Michael Orlitzky gentoo-dev 2020-12-21 13:38:27 UTC
(In reply to Marek Szuba from comment #3)
> Thanks for having taken care of this, mjo! I've had a look and overall it
> looks okay - except for two things:
>  - I think there is a typo (an unnecessary }) in LUA_COMPAT?

Thanks, fixed.

>  - the way ...-lua-pkgconfig.patch works I am pretty sure configure will
> automagically select lua5.1 if it is present regardless of the value of
> LUA_SINGLE_TARGET. It should either check for "lua" before "lua5.1", or just
> check for "lua" only.

Yeah, I even mentioned that in

  https://github.com/trusteddomainproject/OpenDKIM/issues/62

but at the time, the additional check for lua5.1.pc didn't hurt anything (and leaving it in there made it easier to get the PR merged...)

I opened another issue for the new problem:

  https://github.com/trusteddomainproject/OpenDKIM/issues/111

Unless some distro ships *only* lua5.1.pc and not lua.pc, I think dropping it is the best idea.
Comment 5 Marek Szuba archtester gentoo-dev 2020-12-21 15:42:50 UTC
Right. In the meantime (i.e. before upstream reacts, assuming they do), would you rather update the Gentoo patch accordingly yourself or shall I do it? I would very much prefer the former, given I've still got quite a few timed-out packages to migrate.

Or you could for the time being limit the migrated ebuild to lua5-1 and leave the patch be.
Comment 6 Michael Orlitzky gentoo-dev 2020-12-23 04:05:53 UTC
I finally worked up the courage to throw out all of the existing Lua-detecting voodoo:

  https://github.com/trusteddomainproject/OpenDKIM/pull/112

It's not in Gentoo yet, but I'll get to it soon. If you want to go forward with the migration and if I haven't added the new patches yet, feel free to drop lua5.2 support from the ebuild. I can always add it back after the holidays.
Comment 7 Larry the Git Cow gentoo-dev 2020-12-23 14:52:19 UTC
The bug has been closed via the following commit(s):

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

commit 963327d7be7c7d0047fed6b3dd119c382e94b2f7
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2020-12-23 12:33:53 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2020-12-23 14:52:06 +0000

    mail-filter/opendkim-2.10.3-r25: temporarily limit LUA_COMPAT to lua5.1
    
    Lua detection as it stands now will always prefer lua5.1, if installed,
    over whatever version is pointed at by the eclass-provided pkgconfig
    wrapper. Until the relevant patch has been merged into the tree, thus
    making sure that if the user requests building against lua5-2 OpenDKIM
    really *is* built against that version, stick with 5.1 only.
    
    Closes: https://bugs.gentoo.org/752738
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 mail-filter/opendkim/opendkim-2.10.3-r25.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)