Bug 193200 - [patch] www/suphp - add support for apache 2.4
Summary: [patch] www/suphp - add support for apache 2.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-31 10:54 UTC by Daniel Austin
Modified: 2015-07-28 23:44 UTC (History)
1 user (show)

See Also:


Attachments
add support for apache 2.4 (1.27 KB, patch)
2014-08-31 10:54 UTC, Daniel Austin
no flags Details | Diff
add support for apache 2.4 (revised) (2.37 KB, patch)
2014-11-18 23:55 UTC, Daniel Austin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Austin 2014-08-31 10:54:33 UTC
Created attachment 146591 [details]
add support for apache 2.4

The attached patch will allow suphp to run under apache 2.4 in the same way as it runs under 2.2.

Added files:
 - files/patch-configure


Poudriere testport logs at:

http://poudriere.dan.tm/latest-per-pkg/suphp/0.7.2_2/


Info for maintainer:

Whilst php-fpm is the preferred new method, it's not ideal for large shared hosting situations with hundreds of users and sites (having that many pools is very wasteful).
I've been using suphp under 2.4 for over a year in a way that php-fpm could not service.  No issues at all.

So long as no major vulnerabilities show up, I think we should continue to maintain suphp in the ports tree (which means requiring 2.4 support now that it's the default apache version)
Comment 1 Daniel Austin 2014-08-31 10:55:09 UTC
note: the BZ diff viewer isnt showing the full diff
Comment 2 Daniel Austin 2014-08-31 13:46:45 UTC
Ok full poudriere testport logs are online now (sorry, my 10.0/amd64 builder was busy!)
Comment 3 John Marino freebsd_committer freebsd_triage 2014-09-04 15:37:04 UTC
tested patch to unbreak on Apache 24, sending over to maintainer (although I see now Bryan already knew about it)
Comment 4 vedad 2014-11-18 17:08:23 UTC
Hi, any news on this?
Comment 5 Daniel Austin 2014-11-18 18:23:57 UTC
still waiting for maintainer approval
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2014-11-18 22:57:50 UTC
(In reply to John Marino from comment #3)
> tested patch to unbreak on Apache 24, sending over to maintainer (although I
> see now Bryan already knew about it)

What makes you think that? I only noticed this today.
Comment 7 Daniel Austin 2014-11-18 22:59:23 UTC
Hi Bryan,

I added you as CC when I opened the PR, you should've received copies of all the comments on here ;o


Thanks,

Dan.
Comment 8 Bryan Drewery freebsd_committer freebsd_triage 2014-11-18 23:03:24 UTC
(In reply to Daniel Austin from comment #7)
> Hi Bryan,
> 
> I added you as CC when I opened the PR, you should've received copies of all
> the comments on here ;o
> 
> 
> Thanks,
> 
> Dan.

I did, it was just lost in the noise.
Comment 9 Daniel Austin 2014-11-18 23:05:01 UTC
Ah no problem - I didn't want to chase it as I know you're busy!
Comment 10 Bryan Drewery freebsd_committer freebsd_triage 2014-11-18 23:05:48 UTC
The provided patch does not build with apache24.

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../../src -I/usr/local/include/apache24 -O2 -pipe -I/usr/include -fstack-protector -fno-strict-aliasing -DSUPHP_PATH_TO_SUPHP=\"/usr/local/sbin/s
uphp\" -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -std=gnu89 -MT mod_suphp.lo -MD -MP -MF .deps/mod_suphp.Tpo -c mod_suphp.c  -fPIC -DPIC -o .libs/mod_suphp.o
In file included from mod_suphp.c:24:
In file included from /usr/local/include/apache24/httpd.h:44:
In file included from /usr/local/include/apache24/ap_config.h:25:
/usr/local/include/apache24/ap_hooks.h:39:10: fatal error: 'apr.h' file not found
#include "apr.h"
         ^
1 error generated.
*** [mod_suphp.lo] Error code 1

make[4]: stopped in /wrkdirs/usr/ports/www/suphp/work/suphp-0.7.2/src/apache
1 error
Comment 11 Daniel Austin 2014-11-18 23:08:14 UTC
Hi Bryan,

I noticed that started happening a few weeks after I submitted the patch (I think due to a apr1 update).

Changing:

CONFIGURE_ARGS= CFLAGS="${CFLAGS}" --with-apxs=${APXS}

to

CONFIGURE_ARGS= CFLAGS="${CFLAGS} -I/usr/local/include/apr-1" --with-apxs=${APXS}

in Makefile fixes the issue.
It seems that "apr-1-config --cflags" no longer includes that include folder for some reason.

Let me know if you want me to do a new patch file.


Thanks,

Dan.
Comment 12 Bryan Drewery freebsd_committer freebsd_triage 2014-11-18 23:09:06 UTC
(In reply to Daniel Austin from comment #11)
> Hi Bryan,
> 
> I noticed that started happening a few weeks after I submitted the patch (I
> think due to a apr1 update).
> 
> Changing:
> [...]

Thanks, will try.
Comment 13 Daniel Austin 2014-11-18 23:14:50 UTC
Oops, I meant "apr-1-config --includes".

If I run it manually from the prompt, it gives me the correct " -I/usr/local/include/apr-1/" but if I do make within suphp it doesn't see it so I suspect some gnu configure strangeness perhaps.

Either way, modifying the line in Makefile works and i've got a few machines running with it :)


Thanks,

Dan.
Comment 14 Bryan Drewery freebsd_committer freebsd_triage 2014-11-18 23:17:44 UTC
(In reply to Daniel Austin from comment #11)
> Changing:
> 
> CONFIGURE_ARGS= CFLAGS="${CFLAGS}" --with-apxs=${APXS}
> 
> to
> 
> CONFIGURE_ARGS= CFLAGS="${CFLAGS} -I/usr/local/include/apr-1"
> --with-apxs=${APXS}

This is not sufficient.

It has some other issue now. I'll look into it in the next few days. Sorry for missing this PR for so long.

/bin/sh ../../libtool  --tag=CC    --mode=compile cc -DHAVE_CONFIG_H  -I. -I../../src     -I/usr/local/include/apache24 -O2 -pipe -I/usr/include -fstack-protector -fno-strict-aliasing  -DSU
PHP_PATH_TO_SUPHP=\"/usr/local/sbin/suphp\"  -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -std=gnu89 -I/usr/local/include/apr-1 -MT mod_suphp.lo -MD -MP -MF .deps/m
od_suphp.Tpo -c -o mod_suphp.lo mod_suphp.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../../src -I/usr/local/include/apache24 -O2 -pipe -I/usr/include -fstack-protector -fno-strict-aliasing -DSUPHP_PATH_TO_SUPHP=\"/usr/local/sbin/s
uphp\" -O2 -pipe -I/usr/local/include -fstack-protector -fno-strict-aliasing -std=gnu89 -I/usr/local/include/apr-1 -MT mod_suphp.lo -MD -MP -MF .deps/mod_suphp.Tpo -c mod_suphp.c  -fPIC -DP
IC -o .libs/mod_suphp.o
mod_suphp.c:47:25: error: expected ';' after top level declarator
module MODULE_VAR_EXPORT suphp_module;
                        ^
Comment 15 Bryan Drewery freebsd_committer freebsd_triage 2014-11-18 23:18:27 UTC
This is what I actually used:

-CONFIGURE_ARGS=        CFLAGS="${CFLAGS}" --with-apxs=${APXS}
+CONFIGURE_ARGS=        CFLAGS="${CFLAGS} -I`${LOCALBASE}/bin/apr-1-config --includedir`" --with-apxs=${APXS}
Comment 16 Daniel Austin 2014-11-18 23:55:39 UTC
Created attachment 149569 [details]
add support for apache 2.4 (revised)
Comment 17 Daniel Austin 2014-11-18 23:58:46 UTC
Hi Bryan,

I've updated the patch, and you'll see a 10.0/amd64 poudriere log in the original URL showing a successful build.


Thanks,

Dan.
Comment 18 Daniel Austin 2014-11-19 08:09:21 UTC
Comment on attachment 149569 [details]
add support for apache 2.4 (revised)

Hi Bryan,

poudriere testport logs for 8/9/10 (i386+amd64) now done at http://poudriere.dan.tm/latest-per-pkg/suphp/0.7.2_2/ from the new diff.

Summary of diff:

Modified:
        Makefile

New files:
        files/patch-configure
        files/patch-configure.ac


I'm happy to take over maintainer too if you wish, but i'll leave that up to you as it's your port :)


Thanks,

Dan.
Comment 19 vedad 2014-11-26 12:25:49 UTC
Hi, thanks for the feedback. What would be the next step so that this actually reaches the ports tree?

Thanks,
Comment 20 Bryan Drewery freebsd_committer freebsd_triage 2014-12-02 14:48:07 UTC
(In reply to vedad from comment #19)
> Hi, thanks for the feedback. What would be the next step so that this
> actually reaches the ports tree?
> 
> Thanks,

The patch still fails for me and I haven't had a chance to investigate why.

If it works for you then apply it locally for now.
Comment 21 Daniel Austin 2015-05-14 23:49:08 UTC
Any luck with this Bryan?

I can't get it to error on any of my poudriere installations using testport (and i'm running it from my own package builder on apache 2.4 too)


Thanks,

Daniel.
Comment 22 Bryan Drewery freebsd_committer freebsd_triage 2015-05-15 00:06:54 UTC
Funny, I just opened this today to take another look. I don't know yet.
Comment 23 Daniel Austin 2015-07-25 08:06:27 UTC
bump.
Comment 24 Bryan Drewery freebsd_committer freebsd_triage 2015-07-28 23:41:47 UTC
Note that only configure.ac is needed to be patched. That was the original problem with
the original patch. It was patching configure and having it overwritten.
Comment 25 commit-hook freebsd_committer freebsd_triage 2015-07-28 23:43:45 UTC
A commit references this bug:

Author: bdrewery
Date: Tue Jul 28 23:43:03 UTC 2015
New revision: 393137
URL: https://svnweb.freebsd.org/changeset/ports/393137

Log:
  Fix build with Apache 2.4.

  PR:		193200
  Submitted by:	Daniel Austin <freebsd-ports@dan.me.uk>

Changes:
  head/www/suphp/Makefile
  head/www/suphp/files/patch-configure.ac
Comment 26 Bryan Drewery freebsd_committer freebsd_triage 2015-07-28 23:44:09 UTC
Thanks!
Comment 27 commit-hook freebsd_committer freebsd_triage 2015-07-28 23:44:47 UTC
A commit references this bug:

Author: bdrewery
Date: Tue Jul 28 23:43:53 UTC 2015
New revision: 393138
URL: https://svnweb.freebsd.org/changeset/ports/393138

Log:
  MFH: r393137

  Fix build with Apache 2.4.

  PR:		193200
  Submitted by:	Daniel Austin <freebsd-ports@dan.me.uk>

Changes:
_U  branches/2015Q3/
  branches/2015Q3/www/suphp/Makefile
  branches/2015Q3/www/suphp/files/patch-configure.ac