Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 569042 - >=app-eselect/eselect-php-0.8.1[apache2] breaks PHP support: Please package mask and/or news item and/or -D PHP5 compatibility
Summary: >=app-eselect/eselect-php-0.8.1[apache2] breaks PHP support: Please package m...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-21 19:49 UTC by Sebastian Pipping
Modified: 2016-01-09 20:34 UTC (History)
1 user (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 Sebastian Pipping gentoo-dev 2015-12-21 19:49:00 UTC
Hi!

It's rather easy to overlook the change from -DPHP5 to -DPHP.  I will save you the details of how hard this bit me today.  I would like to suggest to make the current situation more user friendly.  In particular, I would like to suggest

 * a portage news entry and

 * considering a temporary backwards compatibility layer.

For the latter, I could imagine that something like

  <IfDefine PHP5>
    Define PHP
  </IfDefine>

on top could work.

If putting >=app-eselect/eselect-php-0.8.1 into package.mask again, that's what I would suggest to do first to win some time.

What do you think?

Thanks and best, Sebastian
Comment 1 Sebastian Pipping gentoo-dev 2015-12-21 19:58:33 UTC
- putting [..] into package.mask again
+ putting [..] into package.mask again is an option
Comment 2 Michael Orlitzky gentoo-dev 2015-12-21 21:10:57 UTC
(In reply to Sebastian Pipping from comment #0)
> 
> For the latter, I could imagine that something like
> 
>   <IfDefine PHP5>
>     Define PHP
>   </IfDefine>
> 

This is apache-2.4 only unfortunately. I tried a similar approach but using a custom Error <https://httpd.apache.org/docs/2.4/mod/core.html#error> message to tell the users what do to. Same problem.
Comment 3 Tomáš Mózes 2015-12-21 21:18:42 UTC
I would vote for a news item.
Comment 4 Sebastian Pipping gentoo-dev 2016-01-04 00:28:24 UTC
News item posted for review to gentoo-dev:
http://thread.gmane.org/gmane.linux.gentoo.devel/99222
Comment 5 Michael Orlitzky gentoo-dev 2016-01-09 17:34:46 UTC
I've done a bunch of work on eselect-php that (hopefully) mitigates this entirely. Your existing 70_mod_php5.conf was never supposed to go away. Now we ship it (in addition to the new 70_mod_php.conf) for backwards-compatibility.

And in eselect-php-0.8.5, the user gets a warning when he tries to change his apache target unless he's updated his configuration:

  $ sudo eselect php set apache2 1
  !!! Warning: The apache2 configuration has changed in this
  !!! Warning: version of eselect-php. You should define "-D PHP"
  !!! Warning: and not "-D PHP5" for apache. The module is now
  !!! Warning: loaded by 70_mod_php.conf (was 70_mod_php5.conf).
  !!! Warning: After you have changed "-D PHP5" to "-D PHP", 
  !!! Warning: you should remove 70_mod_php5.conf to eliminate
  !!! Warning: this warning. Until you have done so, your eselect
  !!! Warning: choices for apache2 will have no effect.

  Please restart apache for the changes to take effect.

Combined, those two changes should prevent breakage on upgrades and surprises for anyone who skips the elog message.
Comment 6 Sebastian Pipping gentoo-dev 2016-01-09 20:34:58 UTC
Thank you!