Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl3: Remove version holdback for OS <10.14. #24547

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devel/openssl/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in devel/openssl/Portfile

View workflow job for this annotation

GitHub Actions / macos-12

port test openssl: Warning: openssl is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

Check warning on line 1 in devel/openssl/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port test openssl: Warning: openssl is configured to build for the architecture(s) 'arm64', but did not install any Mach-O files.

Check warning on line 1 in devel/openssl/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port test openssl: Warning: openssl is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

PortSystem 1.0
PortGroup openssl 1.0
Expand All @@ -6,7 +6,7 @@
name openssl
epoch 2
version [openssl::default_branch]
revision 17
revision 18

categories devel security
platforms darwin
Expand Down
41 changes: 19 additions & 22 deletions devel/openssl3/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ legacysupport.newest_darwin_requires_legacy 8

set major_v 3
name openssl$major_v
# For rolling back to 3.1.4 release where needed. Must now stay.
# For former rollback to 3.1.x release where needed. Must now stay.
epoch 1
version ${major_v}.3.1
revision 0
revision 1

# Please revbump these ports when updating the openssl3 version/revision
# - freeradius (#43461)
Expand Down Expand Up @@ -53,26 +53,23 @@ checksums rmd160 f7d3736a023dcf7d40db016182ca6d1de5a6fa69 \
sha256 777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e \
size 18055752

# 3.2.0 is currently broken for OS < 10.14, see #68766
if {${os.platform} eq "darwin" && ${os.major} < 18} {

subport ${name}-devel {
conflicts ${name}
}
Comment on lines -59 to -61
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking this silently drops the openssl-devel port, but I'm fine with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you're right. I guess strictly speaking, it should have been obsoleted in favor of the main port. But probably the only users were a few people (besides myself) testing the new version on the older platforms, so it's not clear it's worth worrying about.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, properly obsoleting this is more important than appears at first glance, due to the deficient handling of existing installs that don't match current Portfiles. Although each installed instance keeps a copy of the Portfile used to create it, base does a poor job of using that information, leading to at least two known problems:

  1. Activating a downlevel port instance apparently computes its dependencies based on its current Portfile, not the saved one.
  2. Attempts to clean an installed port with no current Portfile are refused, based on the lack of a current PortIndex entry.

Thus, I think it's worth properly obsoleting the opensl3-devel port. PR coming.


if {$subport eq $name} {
conflicts ${name}-devel
version ${major_v}.1.6
revision 0

distname openssl-${version}

checksums rmd160 4f026a75f201f77cdfe1f5976d5a57883cce060f \
sha256 5d2be4036b478ef3cb0a854ca9b353072c3a0e26d8a56f8f0ab9fb6ed32d38d7 \
size 15672690
}

}
# Use timegm() in crypto/asn1/a_time.c
# Fixes build on 10.4, and is generally preferable, anyway
#
# Since v3.2.0, crypto/asin1/a_time.c has included timezone compensation
# which uses timegm() in some cases, or localtime() adjusted for the
# timezone in others. Since timegm() is considered nonstandard, it uses
# it in an opt-in basis, which currently includes only FreeBSD and
# WebAssembly. On the Mac (at least) the 'timezone' variable which it
# otherwise relies on is a variable when __DARWIN_UNIX03 is set, and is
# a function when not, which is incompatible with this use. By
# default, __DARWIN_UNIX03 is set on 10.5+ but not on 10.4, leading to a
# build failure on 10.4. Meanwhile, timegm() is available on all Mac
# versions, and is preferable when available. This fix adds __APPLE__ to
# the conditions for using timegm(), thereby building successfully on all
# OS versions with slightly less code.
#
patchfiles-append patch-use-timegm.diff

if {${os.platform} eq "darwin" && ${os.major} < 11} {
# Having the stdlib set to libc++ on 10.6 causes a dependency on a
Expand Down
11 changes: 11 additions & 0 deletions devel/openssl3/files/patch-use-timegm.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- crypto/asn1/a_time.c.orig 2024-06-04 05:53:04.000000000 -0700
+++ crypto/asn1/a_time.c 2024-06-13 14:47:19.000000000 -0700
@@ -599,7 +599,7 @@ int ASN1_TIME_compare(const ASN1_TIME *a
# define timezone _timezone
#endif

-#if defined(__FreeBSD__) || defined(__wasi__)
+#if defined(__FreeBSD__) || defined(__wasi__) || defined(__APPLE__)
# define USE_TIMEGM
#endif

2 changes: 1 addition & 1 deletion net/openssh/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PortGroup compiler_blacklist_versions 1.0

name openssh
version 9.7p1
revision 0
revision 1
categories net
maintainers {@artkiver gmail.com:artkiver} openmaintainer
license BSD
Expand Down
2 changes: 1 addition & 1 deletion perl/p5-net-ssleay/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup perl5 1.0

perl5.branches 5.28 5.30 5.32 5.34
perl5.setup Net-SSLeay 1.94
revision 0
revision 1
license Artistic-2
maintainers nomaintainer
description Perl extension for using OpenSSL
Expand Down
2 changes: 1 addition & 1 deletion sysutils/freeradius/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup muniversal 1.0

name freeradius
version 3.0.21
revision 21
revision 22
checksums rmd160 04a038b701f19d9c598e826a795a0cdaacd3768b \
sha256 c22dad43954b0cbc957564d3f8cbb942ff09853852d2c2155d54e6bd641a4e7d \
size 3184588
Expand Down