Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639396 - dev-db/phpmyadmin-4.7.5 depends on dev-lang/php[crypt] not in >=7.2
Summary: dev-db/phpmyadmin-4.7.5 depends on dev-lang/php[crypt] not in >=7.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Jorge Manuel B. S. Vicetto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-01 17:11 UTC by Craig Andrews
Modified: 2018-01-29 14:40 UTC (History)
4 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 Craig Andrews gentoo-dev 2017-12-01 17:11:20 UTC
dev-db/phpmyadmin-4.7.5 depends on dev-lang/php[crypt]. The crypt USE flag was removed from php 7.2 (bug 639286) because upstream removed it: https://wiki.php.net/rfc/mcrypt-viking-funeral

Doing some quick testing, phpadmin seems to work fine with dev-lang/php-7.2. Searching the code reveals no use of the removed mcrypt_* functions: https://github.com/phpmyadmin/phpmyadmin/search?utf8=%E2%9C%93&q=mcrypt&type=
Comment 1 Brian Evans (RETIRED) gentoo-dev 2017-12-01 17:38:07 UTC
(In reply to Craig Andrews from comment #0)
> Doing some quick testing, phpadmin seems to work fine with dev-lang/php-7.2.
> Searching the code reveals no use of the removed mcrypt_* functions:
> https://github.com/phpmyadmin/phpmyadmin/search?utf8=%E2%9C%93&q=mcrypt&type=

phpmyadmin depends on phpseclib which the latter *can* use mcrypt if available and has fallbacks if it does not
Comment 2 Tomáš Mózes 2017-12-02 05:01:21 UTC
Mcrypt was moved to https://pecl.php.net/package/mcrypt, so probably it's enough to switch the depend from php[crypt] to pecl-mcrypt.
Comment 3 Craig Andrews gentoo-dev 2017-12-02 16:00:30 UTC
If it can not use mcrypt, that rather than unconditionally depend on pecl-mcrypt, we should add a use flag to conditionally depend upon it or not depend on it at all.

Also, shouldn't phpseclib be separated out into another ebuild? Or am I misunderstanding the situation?
Comment 4 Brian Evans (RETIRED) gentoo-dev 2017-12-06 19:22:27 UTC
After further examination of phpseclib 95% of the time it will use the openssl extension if it exists (except Crypt/Twofish.php), then fallback to mcrypt, then falls back to native code. Unless the calling application overrides it.

Finally, https://github.com/phpmyadmin/phpmyadmin/search?utf8=✓&q=phpseclib&type shows that mcrypt will rarely be used in current phpmyadmin since it only calls \phpseclib\Crypt\Random::string.

Random::string() calls PHP's random_bytes in >=7.0 and only (rarely) fails if there is not a valid source of randomness.  Then it falls back to openssl, then mcrypt and finally to pure PHP code.

Do what you need to, but packaging pecl-mcrypt for this small reason is not worth the effort IMO.
Comment 5 Brian Evans (RETIRED) gentoo-dev 2017-12-06 19:39:17 UTC
One mistake in my last comment,  the encrypted cookie code can call Crypt\AES from phpseclib if it exists.. which does use openssl first if it exists.

So the openssl extension (ssl USE on PHP) will always ensure speed on phpmyadmin.

Also if the phpseclib\Crypt\Random.php file is removed from phpmyadmin installs, it falls back to requiring openssl extension.
Comment 6 Larry the Git Cow gentoo-dev 2017-12-07 15:27:45 UTC
The bug has been closed via the following commit(s):

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

commit 7b43bd49cf249fe7b9923304f0d521b1f29866a6
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2017-12-01 17:13:16 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2017-12-07 15:27:27 +0000

    dev-db/phpmyadmin: Don't depend on dev-lang/php[crypt]
    
    The crypt use flag was removed in dev-lang/php-7.2 and isn't used
    
    Closes: https://bugs.gentoo.org/639396
    
    Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-db/phpmyadmin/Manifest                   |  8 ++--
 dev-db/phpmyadmin/phpmyadmin-4.7.5-r1.ebuild | 61 ++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 4 deletions(-)
Comment 7 Larry the Git Cow gentoo-dev 2018-01-29 14:40:46 UTC
The bug has been closed via the following commit(s):

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

commit 985ee5ebf46d5068c060ce4e59345c8d5af4e0ec
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2018-01-29 14:40:25 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2018-01-29 14:40:25 +0000

    dev-db/phpmyadmin: Don't depend on dev-lang/php[crypt]
    
    The crypt use flag was removed in dev-lang/php-7.2 and isn't used
    
    Closes: https://bugs.gentoo.org/639396
    Package-Manager: Portage-2.3.20, Repoman-2.3.6

 dev-db/phpmyadmin/phpmyadmin-4.7.7-r1.ebuild | 61 ++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)