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

Updating freebsd to omit the devcrypto engine which is breaking #1915

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- openssl-1.0.2zi/crypto/engine/eng_cryptodev.c.orig 2017-07-06 01:00:00 UTC
+++ openssl-1.0.2zi/crypto/engine/eng_cryptodev.c
@@ -35,7 +35,7 @@
#if (defined(__unix__) || defined(unix)) && !defined(USG) && \
(defined(OpenBSD) || defined(__FreeBSD__))
# include <sys/param.h>
-# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
+# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || (__FreeBSD_version >= 500041 && __FreeBSD_version < 1300000))
johnmccrae marked this conversation as resolved.
Show resolved Hide resolved
# define HAVE_CRYPTODEV
# endif
# if (OpenBSD >= 200110)
11 changes: 11 additions & 0 deletions config/patches/ruby/ruby-3.0.3-maybe_unused.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- "a/include/ruby/internal/attr/maybe_unused.h"
+++ "b/include/ruby/internal/attr/maybe_unused.h"
@@ -27,7 +27,7 @@
/** Wraps (or simulates) `[[maybe_unused]]` */
#if RBIMPL_HAS_CPP_ATTRIBUTE(maybe_unused)
# define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
-#elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused)
+#elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused) && (__STDC_VERSION__ >= 202000L)
# define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
#elif RBIMPL_HAS_ATTRIBUTE(unused)
# define RBIMPL_ATTR_MAYBE_UNUSED() __attribute__((__unused__))
1 change: 1 addition & 0 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@

if version.start_with? "1.0"
patch source: "openssl-1.0.1f-do-not-build-docs.patch", env: patch_env
patch source: "openssl-1.0.2zi-freebsd-nocryptodev.patch", env: patch_env
elsif version.start_with? "1.1"
patch source: "openssl-1.1.0f-do-not-install-docs.patch", env: patch_env
elsif version.start_with? "3.0"
Expand Down
4 changes: 4 additions & 0 deletions config/software/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@
end
end

if freebsd? && version.satisfies?("~> 3.0.3")
patch source: "ruby-3.0.3-maybe_unused.h.patch", plevel: 1, env: patch_env
end

# disable libpath in mkmf across all platforms, it trolls omnibus and
# breaks the postgresql cookbook. i'm not sure why ruby authors decided
# this was a good idea, but it breaks our use case hard. AIX cannot even
Expand Down