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 135bab4
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
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,36 @@ | ||
From 38c1bcd2fe7a3735c52fdd9dd9127814cbcc44e6 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 | ||
|
||
--- | ||
lib/rbnacl/init.rb | 2 +- | ||
lib/rbnacl/sodium.rb | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/lib/rbnacl/init.rb b/lib/rbnacl/init.rb | ||
index cd0168b..a3cc12b 100644 | ||
--- a/lib/rbnacl/init.rb | ||
+++ b/lib/rbnacl/init.rb | ||
@@ -5,7 +5,7 @@ module RbNaCl | ||
# Defines the libsodium init function | ||
module Init | ||
extend FFI::Library | ||
- ffi_lib "sodium" | ||
+ ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23"] | ||
|
||
attach_function :sodium_init, [], :int | ||
end | ||
diff --git a/lib/rbnacl/sodium.rb b/lib/rbnacl/sodium.rb | ||
index c72b000..f12ac45 100644 | ||
--- a/lib/rbnacl/sodium.rb | ||
+++ b/lib/rbnacl/sodium.rb | ||
@@ -8,7 +8,7 @@ module RbNaCl | ||
module Sodium | ||
def self.extended(klass) | ||
klass.extend FFI::Library | ||
- klass.ffi_lib "sodium" | ||
+ klass.ffi_lib ["sodium", "libsodium.so.18", "libsodium.so.23"] | ||
end | ||
|
||
def sodium_type(type = nil) |
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