anatol / quarry

Rubygems binary repository for Arch Linux
GNU General Public License v3.0
53 stars 25 forks source link

Add KBSecret gem #81

Closed woodruffw closed 6 years ago

woodruffw commented 6 years ago

KBSecret is a secrets manager backed by Keybase and KBFS.

I'm not that familiar with the Arch Linux ecosystem and this is my first experience with quarry, so please let me know if this isn't correct/anything additional is required!

woodruffw commented 6 years ago

Thanks!

anatol commented 6 years ago

Thank you for contributing to quarry and Arch Linux.

The ruby-kbsecret package is available in the quarry binary repo already. Please give it a try and let me know if there are any issues.

Celti commented 6 years ago

It looks like ruby-inih (pulled as a kbsecret dependency) has a bug.

/usr/lib/ruby/gems/2.5.0/gems/inih-1.1.0/lib/inih.rb has the line require_relative "../ext/inih/inih", which doesn't exist. ./ext/inih.so does, but my ruby knowledge is basically nonexistent these days, not quite sure what it's looking for.

ETA: Maybe it's not so rusty. Simply updating that line to look for inih.so fixes it.

woodruffw commented 6 years ago

Weird. Ruby < 2.5.0 searched for both .rb and .so with just the name, no extension.

So you're saying this change worked?

diff --git a/lib/inih.rb b/lib/inih.rb
index 2f7020b..3198c93 100644
--- a/lib/inih.rb
+++ b/lib/inih.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true

-require_relative "../ext/inih/inih"
+require_relative "../ext/inih/inih.so"

 # The primary namespace for {INIH}.
 module INIH
Celti commented 6 years ago

No, I replaced ../ext/inih/inih with ext/inih.so. After your note, I've just tested it and it works just fine with ext/inih as well. I think this might be an issue with how quarry normalises paths for gem resources?

woodruffw commented 6 years ago

Could be, yeah (I know that ruby-inih works when installed from gem).

anatol commented 6 years ago

The root of the issue that gem install is very relaxed about what files it installs. Some gem install test files, temp files, .gitignore, editor leftovers etc.. Quarry does active cleanup and tries to install minimum files needed at runtime.

inih already installs /usr/lib/ruby/gems/2.5.0/gems/inih-1.1.0/lib/ext/inih.so but instead the code looks up for /usr/lib/ruby/gems/2.5.0/gems/inih-1.1.0/ext/inih/inih.so.

I patches quarry to install second copy of inih.so but it is better if inih used lib/ext/inih.so library instead.

woodruffw commented 6 years ago

I patches quarry to install second copy of inih.so but it is better if inih used lib/ext/inih.so library instead.

Thanks. I'll look at changing ruby-inih to use that path later today.

anatol commented 6 years ago

Thanks! Check the rubygems doc, it has some info about native libs layout http://guides.rubygems.org/gems-with-extensions/

woodruffw commented 6 years ago

I released ruby-inih 1.1.1 as a fix -- does quarry need to be told to update the package, or will it automatically update the dependency tree?

anatol commented 6 years ago

Awesome! I reverted my change, rebuilt new ruby-inih Arch package and things look great. Thanks a lot.

woodruffw commented 6 years ago

Great! Thanks to you too!