Mk/Uses/apache.mk: Port from Mk/bsd.apache.mk
AbandonedPublic

Authored by brnrd on Sep 10 2017, 7:55 PM.

Details

Summary
Mk/Uses/apache.mk: Port from Mk/bsd.apache.mk

 - Move to new Uses framework

Differential_Revision: 
Reviewed_by:
Approved by:
Test Plan

This has been running on my system for a while now (bar the 22/24 -> 2.2/2.4 fix in bsd.ports.mk) during active porting of mod_h2-devel and mod_md-devel.

Just rebuilt all my Apache and PHP ports, these were all OK
See also D12398 for the PHP 7.1 rework

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13531
Build 13755: arc lint + arc unit
There are a very large number of changes, so older changes are hidden. Show Older Changes
brnrd edited the test plan for this revision. (Show Details)Sep 10 2017, 8:01 PM
brnrd added reviewers: ohauer, pgollucci.
mat added a comment.Sep 11 2017, 8:09 PM

Please deprecate all the USE_APACHE*.

brnrd added a comment.Sep 12 2017, 6:57 AM
In D12308#255661, @mat wrote:

Please deprecate all the USE_APACHE*.

Isn't that what line 86 does, or am I missing something?

mat added a comment.Sep 13 2017, 8:28 AM
In D12308#255661, @mat wrote:

Please deprecate all the USE_APACHE*.

Isn't that what line 86 does, or am I missing something?

Well, all deprecation happen in Mk/bsd.sanitiy.mk, don't start putting some in other places.

brnrd updated this revision to Diff 33037.Sep 13 2017, 6:55 PM

Move warnings to Mk/bsd.sanity.mk

  • Warnings don't belong in Mk/Uses/*.mk
  • The APACHE_PORT directive has long been replaced by DEFAULT_VERSIONS
  • the www/apache-<mpm>-mpm ports have been deleted
mat added inline comments.Sep 13 2017, 9:23 PM
Mk/Uses/apache.mk
353–354

This code will never be used, you never set _USES_POST+=apache. See Mk/Uses/libtool.mk for an example of how to write a USES with b.p.post.m support.

Mk/bsd.port.mk
895–896

why this change ?

1986–1987

Are there any ports that have a USE_APACHE* defined after bsd.port.pre.mk ?
Because you cannot set USES after bsd.port.pre.mk, so this bit should rather go away, and the ports be fixed.

brnrd updated this revision to Diff 33164.Sep 17 2017, 11:33 AM
brnrd marked an inline comment as done.

Fix _POST usage

  • Revert spurious change on USE_LDCONFIG
  • Find ports with USE_APACHE after bsd.port.pre.mk

Open item: Check list of ports with incorrect USE_APACHE behavior

brnrd marked an inline comment as done.Sep 17 2017, 11:34 AM
brnrd added inline comments.
Mk/Uses/apache.mk
353–354

Looking at Mk/Uses/libtool.mk makes it clearer how that works

Mk/bsd.port.mk
895–896

Stale file in my tree? Fixed!

1986–1987
lang/php70
lang/php56
lang/php71
www/blogsum
www/otrs
security/shibboleth2-sp

Will investigate

brnrd edited the test plan for this revision. (Show Details)Sep 17 2017, 7:10 PM
brnrd edited the test plan for this revision. (Show Details)
brnrd marked an inline comment as done.Sep 17 2017, 7:30 PM
brnrd added inline comments.
Mk/bsd.port.mk
1986–1987

The PHP ports are actually 3-in-1. The main port, the mod_php port and the extensions. So the USE_APACHE isn't out of order
I've updated PHP 7.1 port nonetheless as there were some improvements possible with Options framework, saved about 100 lines of Makefile.

www/blogsum: Misinterpreted, order OK
www/otrs: Pending mainainer approval
security/shibboleth-sp: Pending maintainer approval

This revision was automatically updated to reflect the committed changes.
brnrd reopened this revision.Oct 7 2017, 7:28 PM
brnrd marked an inline comment as done.
brnrd added inline comments.
Mk/bsd.port.mk
1986–1987

These are now fixed/commited/closed

brnrd updated this revision to Diff 33802.Oct 7 2017, 7:31 PM
brnrd marked an inline comment as done.

Further checks and simplification

  • common22 is an alias for server,2.2
  • Re-order argumnents-checks (run,2.2+ returned an error)
  • apache_ARGS are already split in bsd.port.mk
  • Remove duplicate incorrect USES usage check
  • Remove conditional slated for removal in 2012
  • Remove duplicate MIN/MAX version determination
  • Simplify MIN/MAX determination
brnrd added a comment.Oct 7 2017, 7:36 PM
  • WITH(OUT)_MODULES should've long been removed in favor of OPTIONS framework
  • Simplify STATIC handling
Mk/Uses/apache.mk
82

Left-over from testing with an additional httpd-trunk port, removed locally

brnrd added a comment.EditedOct 7 2017, 9:37 PM

Several ports directly include Mk/bsd.apache.mk

  • Mk/Uses/php.mk
  • lang/php56
  • lang/php70
  • lang/php71
brnrd added a comment.Nov 14 2017, 8:35 PM

Any remarks?
I've done a full exp-run on the ports tree and haven't found failures due to this change.

brnrd updated this revision to Diff 35465.Nov 19 2017, 7:15 PM

Add CHANGES and direct includes changes

brnrd updated this revision to Diff 35466.Nov 19 2017, 8:11 PM

Add missing Mk/bsd.port.mk

brnrd updated this revision to Diff 35467.Nov 19 2017, 8:14 PM

Add lang/php72

antoine requested changes to this revision.Nov 19 2017, 8:32 PM
antoine added a subscriber: antoine.

The php stuff may work but it's only by luck. Setting USE_APACHE=22+ or USE_APACHE_RUN=22+ before including ${PORTSDIR}/Mk/Uses/apache.mk doesn't have any effect (${PORTSDIR}/Mk/Uses/apache.mk doesn't do anything from those variables)

This revision now requires changes to proceed.Nov 19 2017, 8:32 PM
mat added a comment.Nov 20 2017, 10:53 AM

Also, has anyone from apache@ reviewed this ?

Mk/Uses/apache.mk
104

Would probably be a good idea to make it fatal. At one point, old glue should be removed.

Mk/bsd.port.mk
1417–1421

:S/

In D12308#274191, @mat wrote:

Also, has anyone from apache@ reviewed this ?

Nope. The apache@ team seems to have insufficient time to fix things.
NB: I'm part of apache@

mat added a comment.Nov 27 2017, 1:25 PM
In D12308#274191, @mat wrote:

Also, has anyone from apache@ reviewed this ?

Nope. The apache@ team seems to have insufficient time to fix things.
NB: I'm part of apache@

It would be nice if someone else from apache@ had a look.

brnrd updated this revision to Diff 36429.Dec 10 2017, 8:47 PM
brnrd marked an inline comment as done.

Rework patches

Mk/bsd.sanity.mk

  • APACHE_PORT is fatal

Mk/bsd.port.mk

  • Properly transform versions 2.2-24 is now 2.2-2.4

Mk/Uses/apache.mk

  • DEFAULT_APACHE_VER is now fatal
  • Version checks updated and fixed
  • Version selection improved
  • Properly default to APACHE_DEFAULT
  • Prep for version 2.5
brnrd marked 2 inline comments as done.Dec 10 2017, 8:58 PM
In D12308#276609, @mat wrote:
In D12308#274191, @mat wrote:

Also, has anyone from apache@ reviewed this ?

Nope. The apache@ team seems to have insufficient time to fix things.
NB: I'm part of apache@

It would be nice if someone else from apache@ had a look.

Can't agree more, but I haven't had sufficient rapport on my requests for review sofar. See https://lists.freebsd.org/pipermail/freebsd-apache/2017-November/004408.html
I've had this in use for quite some time now and have

Mk/Uses/apache.mk
82

Re-added for addition of www/apache25-devel (see D13111)

Mk/bsd.port.mk
1417–1421

Got it. Improved for use-case of USE_APACHE= 22-24 using :C

brnrd updated this revision to Diff 36458.Dec 11 2017, 2:06 PM
brnrd marked an inline comment as done.

Add ports checkning APACHE_VERSION to diff

brnrd added inline comments.Dec 13 2017, 12:35 PM
Mk/Uses/apache.mk
282–286

Must appear before the previous APACHE_VERSION check

390

This must be the .else clause _APACHE_PORT_IS_MODULE is no longer used

brnrd updated this revision to Diff 36542.Dec 13 2017, 1:53 PM

Update diff after bulk build

  • Define APACHE_VERSION before using it
  • Use .else not .elif for do-build target
joneum added a subscriber: joneum.Jan 15 2018, 10:47 AM

The php stuff may work but it's only by luck. Setting USE_APACHE=22+ or USE_APACHE_RUN=22+ before including ${PORTSDIR}/Mk/Uses/apache.mk doesn't have any effect (${PORTSDIR}/Mk/Uses/apache.mk doesn't do anything from those variables)

Hi Antoine,

This has been long resolved, but the review is still blocked on this. The bulk run was successful, how do we proceed?

I started testing today and do a test on all ports (amd64/i386 FreeBSD 11.1) this weekend

brnrd added a comment.Mar 11 2018, 6:59 PM

This can be closed. Fixed in #464175
Forgot to add the DiffRev to the commit message :'(

brnrd accepted this revision.Mar 25 2018, 6:21 PM
This revision is now accepted and ready to land.Apr 8 2018, 12:39 PM
This revision now requires review to proceed.Apr 8 2018, 12:39 PM
brnrd removed a reviewer: portmgr.Apr 8 2018, 12:39 PM
This revision is now accepted and ready to land.Apr 8 2018, 12:39 PM
This revision now requires review to proceed.Apr 8 2018, 12:39 PM
brnrd removed a reviewer: portmgr.Apr 8 2018, 12:40 PM
This revision is now accepted and ready to land.Apr 8 2018, 12:40 PM
This revision now requires review to proceed.Apr 8 2018, 12:40 PM
brnrd abandoned this revision.Apr 23 2018, 6:55 PM

Abandoning as I can't close it and no response