Bug 215996 - [exp-run] Move inclusion of bsd.default-versions.mk to options section
Summary: [exp-run] Move inclusion of bsd.default-versions.mk to options section
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-01-12 13:48 UTC by Tijl Coosemans
Modified: 2017-02-11 20:27 UTC (History)
3 users (show)

See Also:


Attachments
patch (2.46 KB, patch)
2017-01-12 13:48 UTC, Tijl Coosemans
no flags Details | Diff
patch2 (27.30 KB, patch)
2017-01-13 21:00 UTC, Tijl Coosemans
no flags Details | Diff
patch3 (27.31 KB, patch)
2017-01-23 11:48 UTC, Tijl Coosemans
no flags Details | Diff
patch4 (28.78 KB, patch)
2017-02-01 16:10 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tijl Coosemans freebsd_committer 2017-01-12 13:48:13 UTC
Created attachment 178791 [details]
patch

Move inclusion of bsd.default-versions.mk from pre-makefile section to options section in bsd.port.mk so ftp/curl/Makefile no longer has to include it and bsd.default-versions.mk can expect ARCH to be defined.
Comment 1 Mathieu Arnold freebsd_committer 2017-01-13 08:40:07 UTC
No, see the review and or PR for why it is put where it is and not earlier like I first wanted to do.
Comment 2 Tijl Coosemans freebsd_committer 2017-01-13 11:32:46 UTC
(In reply to Mathieu Arnold from comment #1)
But you still think it would be better if bsd.default-version.mk was included in the options section of bsd.port.mk, right?  Now that FreeBSD 9 is EoL it's time to remove WITH_OPENSSL_PORT from port Makefiles.

The patch does something else by the way.  It moves the .endif from the options section down a bit.  Currently there's some code between the options section and the pre-makefile section that gets executed on every include of bsd.port.*mk (this includes parsing bsd.options.mk multiple times).  This should probably be committed even without the bsd.default-version.mk change.
Comment 3 Tijl Coosemans freebsd_committer 2017-01-13 21:00:05 UTC
Created attachment 178866 [details]
patch2

The patch now removes WITH_OPENSSL_PORT from all ports as well.  After this we can work on bug 213811 (Set SSL_DEFAULT=openssl).
Comment 4 Tijl Coosemans freebsd_committer 2017-01-13 21:01:04 UTC
Reopen to request exp-run.
Comment 5 Antoine Brodin freebsd_committer 2017-01-23 10:54:48 UTC
Can you refresh the patch?
Comment 6 Tijl Coosemans freebsd_committer 2017-01-23 11:48:19 UTC
Created attachment 179252 [details]
patch3

Updated patch.
Comment 7 Mathieu Arnold freebsd_committer 2017-01-23 13:47:29 UTC
(the original idea will not solve ftp/curl's problem, it should be fixed to not chose the default options depending on the default ssl version, like always GSSAPI_BASE, and tell people using openssl from ports to change the options.)
Comment 8 Mathieu Arnold freebsd_committer 2017-01-23 13:49:02 UTC
Oh, we can use :? now that 9 is out, forgot about it.
Comment 9 Antoine Brodin freebsd_committer 2017-01-25 17:53:48 UTC
New failures on 10.3 i386:

+ {"origin"=>"devel/efl", "phase"=>"configure", "errortype"=>"configure_error"}
+ {"origin"=>"sysutils/ori", "phase"=>"build", "errortype"=>"linker_error"}

17 skipped due to efl

Failure logs:

http://package22.nyi.freebsd.org/data/103i386-default-PR215996/2017-01-25_17h24m36s/logs/errors/efl-1.18.4_2.log
http://package22.nyi.freebsd.org/data/103i386-default-PR215996/2017-01-25_17h24m36s/logs/errors/ori-0.8.1_5.log
Comment 11 Tijl Coosemans freebsd_committer 2017-02-01 16:10:42 UTC
Created attachment 179498 [details]
patch4

Fix efl and ori.
Comment 12 Antoine Brodin freebsd_committer 2017-02-02 20:59:42 UTC
Exp-run looks fine.
Comment 13 commit-hook freebsd_committer 2017-02-05 21:21:18 UTC
A commit references this bug:

Author: tijl
Date: Sun Feb  5 21:20:27 UTC 2017
New revision: 433456
URL: https://svnweb.freebsd.org/changeset/ports/433456

Log:
  - Remove inclusion of bsd.default-versions.mk from ftp/curl/Makefile so
    bsd.default-versions.mk can rely on ARCH being defined.
  - In bsd.port.mk move inclusion of bsd.default-versions.mk from the
    pre-makefile section to the options section so the variables can be used
    earlier.  Also put the bit of code sitting between the options section and
    the pre-makefile section into the options section.
  - Remove last few cases where ports set WITH_OPENSSL_PORT.  This variable is
    handled in bsd.default-versions.mk and some ports were setting it after
    including bsd.port.options.mk.  After FreeBSD 9 EoL all but a few ports,
    and then only when setting non-default options, work without setting that
    variable.

  PR:		215996
  Exp-run by:	antoine
  Approved by:	portmgr (antoine)

Changes:
  head/Mk/bsd.default-versions.mk
  head/Mk/bsd.port.mk
  head/Tools/scripts/chkversion.pl
  head/benchmarks/wrk/Makefile
  head/databases/mariadb100-client/files/patch-cmake_ssl.cmake
  head/databases/mariadb100-server/Makefile
  head/databases/mariadb100-server/files/patch-cmake_ssl.cmake
  head/deskutils/owncloudclient/Makefile
  head/devel/efl/Makefile
  head/devel/efl/files/extra-patch-configure.ac
  head/devel/efl/files/patch-configure.ac
  head/devel/efl/files/patch-m4_efl.m4
  head/dns/knot1/Makefile
  head/dns/validns/Makefile
  head/ftp/curl/Makefile
  head/irc/irssi-fish/Makefile
  head/net/freeradius2/Makefile
  head/net/freeradius3/Makefile
  head/net-im/jabberd/Makefile
  head/net-mgmt/virt-viewer/Makefile
  head/security/opencryptoki/Makefile
  head/security/softhsm2/Makefile
  head/sysutils/ori/Makefile
  head/sysutils/ori/files/
  head/sysutils/ori/files/patch-SConstruct
  head/sysutils/syslog-ng36/Makefile
  head/www/mod_tsa/Makefile
  head/www/nginx/Makefile
  head/www/nginx-devel/Makefile
  head/www/node/Makefile
  head/www/node4/Makefile
  head/www/node6/Makefile
Comment 14 Bradley T. Hughes freebsd_committer 2017-02-11 19:54:09 UTC
This patch changed the default build options for www/node4, www/node6, and www/node without so much as a headsup or UPDATING entry. Any particular reason why these were changed?
Comment 15 Bradley T. Hughes freebsd_committer 2017-02-11 19:55:35 UTC
I am the maintainer for these ports, which is why I asked :)
Comment 16 Tijl Coosemans freebsd_committer 2017-02-11 20:10:05 UTC
It needs openssl 1.0.2 and FreeBSD 10 only has 1.0.1.  This is only temporary.  The next step is to let ports use ports openssl by default instead of the base system openssl.

If you want you could limit the change to just FreeBSD 10 using something like this:

OPTIONS_DEFAULT_FreeBSD_10=BUNDLED_SSL
OPTIONS_DEFAULT=${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}}
Comment 17 Bradley T. Hughes freebsd_committer 2017-02-11 20:27:23 UTC
Yes, indeed, I had worked quite a bit with the build toggles when I changed the default build to use a shared openssl. It was by accident that I noticed the default changed back to the bundled one.

The node.js project recently introduce the ability to use an external CA store in v7.5.0, and I would really like to change www/node to use ca_root_nss instead of a hardcoded CA store built into the node.js binary.

Thanks for the feedback, I will submit some PRs to keep node.js building with a shared openssl at least on 11.x. I was thinking about doing what you suggested, too, changing the default for FreeBSD 10.x to use BUNDLED_SSL until the default for ports changes.

Thanks for the feedback :)