Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439778 - dev-lang/php - add USE=mail
Summary: dev-lang/php - add USE=mail
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PHP Bugs
URL: https://bugs.php.net/bug.php?id=67145
Whiteboard:
Keywords:
: 508938 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-26 18:01 UTC by Anthony Ryan
Modified: 2014-05-05 07:30 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 Anthony Ryan 2012-10-26 18:01:10 UTC
dev-lang/php unconditionally depends on virtual/mta I would like to request a use flag for toggling this dependency.

The php configuration process already checks if sendmail is installed, and disables it internally if it's not found on the system.

Reproducible: Always
Comment 1 Ole Markus With (RETIRED) gentoo-dev 2012-10-27 06:35:24 UTC
I do not think this is a very good idea. Even with the proposed USE flag off, mail() would be available if an MTA is installed.

Also, the default MTA is extremely lightweight and will not have any practical impact on a system.
Comment 2 Anthony Ryan 2012-10-27 07:05:43 UTC
I completely agree that it would be preferable to have a --without-sendmail configuration option, and if there's interest here my next step will be to begin working to have such a configuration option included in future versions of PHP.

As for the impact of MTA on the system, I do acknowledge it's inconsequential in terms of space, compile time, and resources. I simply can't help but believe that a system which sends no mail, should not require any mail related packages be installed.

I'm just being a purist about unused packages on my machines, if the Gentoo developer community does not feel this is worth changing, I will respect that decision.
Comment 3 Jamie Learmonth 2012-11-05 09:36:39 UTC
Whilst I don't see much need for this myself, adding +mail (default on) to the ebuild and conditionally pulling in the virtual would make this possible with little impact to users. This way experienced users who really don't want it have the option to disable it. However, it opens up a can of worms where at this point any webapp which depends on php with mail support _should_ add dev-lang/php[mail] as a dependancy.
Comment 4 Ole Markus With (RETIRED) gentoo-dev 2013-01-02 19:30:57 UTC
Sorry, but I still do not think this is a very good idea. Try asking upstream to add that --without-sendmail flag instead.
Comment 5 Ole Markus With (RETIRED) gentoo-dev 2014-04-28 12:53:19 UTC
*** Bug 508938 has been marked as a duplicate of this bug. ***
Comment 6 C. Wijtmans 2014-04-28 14:14:59 UTC
(In reply to Ole Markus With from comment #4)
> Sorry, but I still do not think this is a very good idea. Try asking
> upstream to add that --without-sendmail flag instead.

upstream says they dont depend on sendmail during compiling. this is a valid bug.
Comment 7 Ole Markus With (RETIRED) gentoo-dev 2014-04-28 14:29:07 UTC
Please read the discussion.
Comment 8 C. Wijtmans 2014-04-28 14:32:01 UTC
(In reply to Ole Markus With from comment #7)
> Please read the discussion.

i did, have you?
Comment 9 C. Wijtmans 2014-04-28 14:32:26 UTC
(In reply to C.J. Wijtmans from comment #8)
> (In reply to Ole Markus With from comment #7)
> > Please read the discussion.
> 
> i did, have you?

I even reported it upstream already and got a reply.
Comment 10 Ole Markus With (RETIRED) gentoo-dev 2014-04-28 14:38:26 UTC
I guess you did not. PHP does not depend on an MTA, but it, at compile time, checks the system for an MTA and compiles in mail support. It is not a flag that either disables or enables this check.

See: http://us3.php.net/manual/en/configure.about.php
Comment 11 C. Wijtmans 2014-04-28 14:40:06 UTC
(In reply to Ole Markus With from comment #10)
> I guess you did not. PHP does not depend on an MTA, but it, at compile time,
> checks the system for an MTA and compiles in mail support. It is not a flag
> that either disables or enables this check.
> 
> See: http://us3.php.net/manual/en/configure.about.php

and? If that is the case remove the MTA dependency or add a use flag. Simple.
Comment 12 C. Wijtmans 2014-04-28 14:41:01 UTC
Also it is exactly what Anthony and I have said.
Comment 13 Ole Markus With (RETIRED) gentoo-dev 2014-04-28 14:43:01 UTC
(In reply to C.J. Wijtmans from comment #11)
> (In reply to Ole Markus With from comment #10)
> > I guess you did not. PHP does not depend on an MTA, but it, at compile time,
> > checks the system for an MTA and compiles in mail support. It is not a flag
> > that either disables or enables this check.
> > 
> > See: http://us3.php.net/manual/en/configure.about.php
> 
> and? If that is the case remove the MTA dependency or add a use flag. Simple.

And I said I do not think it is a good idea and resolved it as WONTFIX. Status of this bug stands.
Comment 14 C. Wijtmans 2014-04-28 15:41:02 UTC
Your opinion is invalid.
Comment 15 Ole Markus With (RETIRED) gentoo-dev 2014-04-28 16:07:16 UTC
(In reply to C.J. Wijtmans from comment #14)
> Your opinion is invalid.

Um, not when it comes to PHP in the package tree. I suggest you create an overlay with a PHP ebuild version that suit your needs.
Comment 16 C. Wijtmans 2014-04-28 16:32:27 UTC
(In reply to Ole Markus With from comment #15)
> (In reply to C.J. Wijtmans from comment #14)
> > Your opinion is invalid.
> 
> Um, not when it comes to PHP in the package tree. I suggest you create an
> overlay with a PHP ebuild version that suit your needs.

Well i suggest a new dev then. Maybe Anthony.
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-28 16:42:34 UTC
(In reply to C.J. Wijtmans from comment #16)
> Well i suggest a new dev then. Maybe Anthony.

Seeing how most of your bug reports are failures, your suggestions ought not to carry much weight.
Comment 18 C. Wijtmans 2014-04-28 16:47:28 UTC
(In reply to Jeroen Roovers from comment #17)
> (In reply to C.J. Wijtmans from comment #16)
> > Well i suggest a new dev then. Maybe Anthony.
> 
> Seeing how most of your bug reports are failures, your suggestions ought not
> to carry much weight.

gentoo is becoming a failure.
Comment 19 C. Wijtmans 2014-04-28 16:49:09 UTC
(In reply to C.J. Wijtmans from comment #18)
> (In reply to Jeroen Roovers from comment #17)
> > (In reply to C.J. Wijtmans from comment #16)
> > > Well i suggest a new dev then. Maybe Anthony.
> > 
> > Seeing how most of your bug reports are failures, your suggestions ought not
> > to carry much weight.
> 
> gentoo is becoming a failure.

I might as well switch to bloatbuntu.
Comment 20 Matthew Schultz 2014-04-28 16:52:08 UTC
(In reply to C.J. Wijtmans from comment #19)
> (In reply to C.J. Wijtmans from comment #18)
> > (In reply to Jeroen Roovers from comment #17)
> > > (In reply to C.J. Wijtmans from comment #16)
> > > > Well i suggest a new dev then. Maybe Anthony.
> > > 
> > > Seeing how most of your bug reports are failures, your suggestions ought not
> > > to carry much weight.
> > 
> > gentoo is becoming a failure.
> 
> I might as well switch to bloatbuntu.

Nobody is forcing you to use Gentoo.  Clearly this problem should be resolved with upstream.  You can file an upstream bug here: https://bugs.php.net/
Comment 21 C. Wijtmans 2014-04-28 16:53:41 UTC
(In reply to Matthew Schultz from comment #20)
> (In reply to C.J. Wijtmans from comment #19)
> > (In reply to C.J. Wijtmans from comment #18)
> > > (In reply to Jeroen Roovers from comment #17)
> > > > (In reply to C.J. Wijtmans from comment #16)
> > > > > Well i suggest a new dev then. Maybe Anthony.
> > > > 
> > > > Seeing how most of your bug reports are failures, your suggestions ought not
> > > > to carry much weight.
> > > 
> > > gentoo is becoming a failure.
> > 
> > I might as well switch to bloatbuntu.
> 
> Nobody is forcing you to use Gentoo.  Clearly this problem should be
> resolved with upstream.  You can file an upstream bug here:
> https://bugs.php.net/

Another person that cant read. I already filed a bug report and got a reply.
Comment 22 Matthew Schultz 2014-04-28 16:56:32 UTC
(In reply to C.J. Wijtmans from comment #21)
> (In reply to Matthew Schultz from comment #20)
> > (In reply to C.J. Wijtmans from comment #19)
> > > (In reply to C.J. Wijtmans from comment #18)
> > > > (In reply to Jeroen Roovers from comment #17)
> > > > > (In reply to C.J. Wijtmans from comment #16)
> > > > > > Well i suggest a new dev then. Maybe Anthony.
> > > > > 
> > > > > Seeing how most of your bug reports are failures, your suggestions ought not
> > > > > to carry much weight.
> > > > 
> > > > gentoo is becoming a failure.
> > > 
> > > I might as well switch to bloatbuntu.
> > 
> > Nobody is forcing you to use Gentoo.  Clearly this problem should be
> > resolved with upstream.  You can file an upstream bug here:
> > https://bugs.php.net/
> 
> Another person that cant read. I already filed a bug report and got a reply.

It would be helpful if you posted the upstream url.
Comment 23 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-28 17:46:09 UTC
All the ugly "C.J. being C.J" aside, there is something to say for replacing PHP_PROG_SENDMAIL with a PROG_SENDMAIL=/usr/lib/php$MAJOR.$MINOR/bin/sendmail (pointing to a simple wrapper script) and doing a PHP_SUBST(PROG_SENDMAIL) in configure.in. Matching that wrapper with a proper $PATH/sendmail should be trivial if done safely.

But I'd change this bug's resolution to UPSTREAM if that's not going to be done.
Comment 24 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-28 17:58:01 UTC
https://bugs.php.net/bug.php?id=63891
Comment 25 Matti Bickel (RETIRED) gentoo-dev 2014-04-28 22:09:07 UTC
In this particular case, even adding the mta to package.provided may help you, if you really, really want to get rid of the mta. Note I don't advise or support that.
Comment 26 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-29 01:33:41 UTC
(In reply to Matti Bickel from comment #25)
> In this particular case, even adding the mta to package.provided may help
> you, if you really, really want to get rid of the mta. Note I don't advise
> or support that.

In that case you might as well make sure you install a simple MTA and have mail delivered to /dev/null or do local delivery, since you're going to end up with a mail() function that will always fail one way or another.
Comment 27 Ole Markus With (RETIRED) gentoo-dev 2014-04-29 07:23:24 UTC
The impact of having an MTA installed is much, much lower than having to maintain a distro patch. I suggest you rather take the fight with upstream.
Comment 28 Matti Bickel (RETIRED) gentoo-dev 2014-04-29 20:11:23 UTC
(In reply to Jeroen Roovers from comment #26)
> In that case you might as well make sure you install a simple MTA and have
> mail delivered to /dev/null or do local delivery, since you're going to end
> up with a mail() function that will always fail one way or another.

If you go to such length to cripple mailing, I kinda assumed you have mail() in disable_functions. Which is also the upstream position in the linked bug. I don't see this changing.
Comment 29 C. Wijtmans 2014-04-29 20:40:29 UTC
(In reply to Matti Bickel from comment #28)
> (In reply to Jeroen Roovers from comment #26)
> > In that case you might as well make sure you install a simple MTA and have
> > mail delivered to /dev/null or do local delivery, since you're going to end
> > up with a mail() function that will always fail one way or another.
> 
> If you go to such length to cripple mailing, I kinda assumed you have mail()
> in disable_functions. Which is also the upstream position in the linked bug.
> I don't see this changing.

in other words install bloatbuntu or deinstall php?
Comment 30 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-29 20:56:06 UTC
(In reply to C.J. Wijtmans from comment #29)
> in other words install bloatbuntu or deinstall php?

If you think dev-lang/php _isn't_ bloated but a simple package like msmtp or ssmpt or esmtp _is_, then you will be in for a shock when you switch to what Ubuntu _doesn't_ consider to be bloated.

Also, bashing one distro in the bug tracker of another distro is delightfully pointless.

Also, setting virtual/mta up as package.provided has been suggested as an alternative. You should look it up in portage(5). There, we provided for you.
Comment 31 Anthony Ryan 2014-05-05 07:30:27 UTC
I see this gained some popularity all of a sudden.

I have an issue open with the PHP upstream here to add a configure flag for evenutally reopening this issue: https://bugs.php.net/bug.php?id=63891

But since this has been a low priority issue for me, I haven't had a chance to work on a patch / pull request for php itself.

A comment specifically for you C.J. Wijtmans, try to respect and understand the explanation given for this being a closed issue right now. The reason for rejection was stated, and there are clear actions that can be taken to get this issue ready for a second look. Work on solutions, it's more productive than bickering and insulting the developers (who volunteer their time).