Skip to content

Support libtidy in buster of architecture amd64#10

Merged
libc merged 2 commits into
libc:masterfrom
spk:fix-lib-tidy5.6-debian
Mar 21, 2019
Merged

Support libtidy in buster of architecture amd64#10
libc merged 2 commits into
libc:masterfrom
spk:fix-lib-tidy5.6-debian

Conversation

@spk
Copy link
Copy Markdown
Contributor

@spk spk commented Mar 17, 2019

Hi, this add support for Debian buster libtidy path

cf https://packages.debian.org/buster/amd64/libtidy5deb1/filelist

Can be tested with this Dockerfile:

FROM debian:buster-slim

WORKDIR /usr/local/src
RUN set -ex \
    && apt-get update -qqy \
    && apt-get -qqy --no-install-recommends install \
        build-essential libtidy-dev ruby-dev bundler git \
    && apt-get purge -y \
    && apt-get autoremove -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY . .
RUN bundle install

Cheers!

@libc
Copy link
Copy Markdown
Owner

libc commented Mar 18, 2019

Hello!

Thank you for the PR!

I actually want to stop this silly business of guessing the path to the library. I think the only reason I included it in the first place is because ffi didn't look in /opt at the time.

If it would just have ffi_lib('tidy') it seems to work just fine with the Dockerfile you mentioned. I'd rather have that. Do you want to change the PR to a cleaner version of pseudo-code below?

begin
  ffi_lib(Tidy.library_path || 'tidy')
rescue LoadError
  ffi_lib(Dir.glob[...])
rescue LoadError
  raise ...
end

Cheers.

@spk
Copy link
Copy Markdown
Contributor Author

spk commented Mar 20, 2019

Hello! Thanks for the feedback, sure I see what you mean I will try to improve this PR with your recommendations

@spk
Copy link
Copy Markdown
Contributor Author

spk commented Mar 20, 2019

I'm found on https://github.com/ffi/ffi/wiki/Loading-Libraries#linux-packages that we can just put first the tidy and then the others hope 9c8d05e is ok for you @libc ?

@libc libc merged commit 7aaa2da into libc:master Mar 21, 2019
@libc
Copy link
Copy Markdown
Owner

libc commented Mar 21, 2019

Yep. Thank you.

@libc
Copy link
Copy Markdown
Owner

libc commented Mar 21, 2019

I put version 1.0 out with this change.

Cheers

@spk spk deleted the fix-lib-tidy5.6-debian branch March 22, 2019 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants