forked from theforeman/foreman-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch RbNaCl to find system libsodium
The patch is taken from this PR RubyCrypto/rbnacl#186.
- Loading branch information
1 parent
b2cc92c
commit d4ebaec
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
packages/plugins/rubygem-rbnacl/0001-Added-support-for-Heroku.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From c788aea2c6dcf6c24cd5e9af2d2ce3ee42714bcd Mon Sep 17 00:00:00 2001 | ||
From: Andrew Kane <[email protected]> | ||
Date: Sat, 1 Dec 2018 15:03:36 -0800 | ||
Subject: [PATCH] Added support for Heroku | ||
|
||
(cherry picked from commit 38c1bcd2fe7a3735c52fdd9dd9127814cbcc44e6) | ||
--- | ||
lib/rbnacl/init.rb | 2 +- | ||
lib/rbnacl/sodium.rb | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git lib/rbnacl/init.rb lib/rbnacl/init.rb | ||
index baa0f4d..9c07f49 100644 | ||
--- lib/rbnacl/init.rb | ||
+++ lib/rbnacl/init.rb | ||
@@ -8,7 +8,7 @@ module RbNaCl | ||
if defined?(RBNACL_LIBSODIUM_GEM_LIB_PATH) | ||
ffi_lib RBNACL_LIBSODIUM_GEM_LIB_PATH | ||
else | ||
- ffi_lib "sodium" | ||
+ ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23"] | ||
end | ||
|
||
attach_function :sodium_init, [], :int | ||
diff --git lib/rbnacl/sodium.rb lib/rbnacl/sodium.rb | ||
index bafbda6..4b7988c 100644 | ||
--- lib/rbnacl/sodium.rb | ||
+++ lib/rbnacl/sodium.rb | ||
@@ -11,7 +11,7 @@ module RbNaCl | ||
if defined?(RBNACL_LIBSODIUM_GEM_LIB_PATH) | ||
klass.ffi_lib RBNACL_LIBSODIUM_GEM_LIB_PATH | ||
else | ||
- klass.ffi_lib "sodium" | ||
+ klass.ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23"] | ||
end | ||
end | ||
|
||
-- | ||
2.31.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,13 @@ | |
|
||
Name: %{?scl_prefix}rubygem-%{gem_name} | ||
Version: 4.0.2 | ||
Release: 1%{?dist} | ||
Release: 2%{?dist} | ||
Summary: Ruby binding to the Networking and Cryptography (NaCl) library | ||
Group: Development/Languages | ||
License: MIT | ||
URL: https://github.com/cryptosphere/rbnacl | ||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem | ||
Patch0: 0001-Added-support-for-Heroku.patch | ||
|
||
# start specfile generated dependencies | ||
Requires: %{?scl_prefix_ruby}ruby(release) | ||
|
@@ -46,6 +47,7 @@ gem unpack %{SOURCE0} | |
%{?scl:EOF} | ||
%setup -q -D -T -n %{gem_name}-%{version} | ||
%patch0 -p0 | ||
%{?scl:scl enable %{scl} - << \EOF} | ||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec | ||
|
@@ -95,5 +97,8 @@ cp -a .%{gem_dir}/* \ | |
%{gem_instdir}/spec | ||
%changelog | ||
* Tue Jul 27 2021 Adam Ruzicka <[email protected]> 4.0.2-2 | ||
- Add patch to find system libsodium | ||
* Tue Jul 20 2021 Adam Ruzicka <[email protected]> 4.0.2-1 | ||
- Add rubygem-rbnacl generated by gem2rpm using the scl template |