Skip to content

Commit

Permalink
fix: build libarchive 3.6.2 on ubuntu-20.04 to ensure compatibility w…
Browse files Browse the repository at this point in the history
…ith GLIBC 2.31+
  • Loading branch information
maxirmx committed Dec 21, 2024
1 parent 0f508bf commit 3b0b0ea
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 22 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ jobs:
with:
repository: metanorma/metanorma

- uses: metanorma/metanorma-build-scripts/inkscape-setup-action@main
- uses: metanorma/ci/inkscape-setup-action@main

- uses: metanorma/ci/ghostscript-setup-action@main

- uses: actions/download-artifact@v4
with:
Expand All @@ -156,23 +158,14 @@ jobs:
mv pkg/ffi-libarchive-binary-*-${{ matrix.env.platform }} pkg/ffi-libarchive-binary
echo "gem 'ffi-libarchive-binary', path: 'pkg/ffi-libarchive-binary'" > Gemfile.devel
# https://github.com/rubygems/rubygems/issues/5160
- if: matrix.ruby == '3.0'
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
bundler: ${{ env.BUNDLER_VER }}
rubygems: latest

- if: matrix.ruby != '3.0'
uses: ruby/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: ${{ env.BUNDLER_VER }}
bundler-cache: true

- run: bundle exec rake
continue-on-error: ${{ matrix.experimental }}

# ----- Release -----
release:
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Binaries for ffi-libarchive

image:https://img.shields.io/gem/v/ffi-libarchive-binary.svg["Gem Version", link="https://rubygems.org/gems/ffi-libarchive-binary"]
image:https://github.com/fontist/ffi-libarchive-binary/actions/workflows/rspec.yml/badge.svg["Build Status", link="https://github.com/fontist/ffi-libarchive-binary/actions/workflows/rspec.yml"]
image:https://github.com/fontist/ffi-libarchive-binary/actions/workflows/test-and-release.yml/badge.svg["Build Status", link="https://github.com/fontist/ffi-libarchive-binary/actions/workflows/test-and-release.yml"]

== Purpose

Expand Down
10 changes: 5 additions & 5 deletions lib/ffi-libarchive-binary/libarchive_recipe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class LibarchiveRecipe < MiniPortileCMake
ROOT = Pathname.new(File.expand_path("../..", __dir__))

def initialize
super("libarchive", "3.7.4")
super("libarchive", "3.6.2")
@printed = {}

@files << {
url: "https://www.libarchive.org/downloads/libarchive-3.7.4.tar.gz",
sha256: "7875d49596286055b52439ed42f044bd8ad426aa4cc5aabd96bfe7abb971d5e8",
url: "https://www.libarchive.org/downloads/libarchive-3.6.2.tar.gz",
sha256: "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3",
}

@target = ROOT.join(@target).to_s
Expand All @@ -40,12 +40,12 @@ def generator_flags

def default_flags
[
"-DENABLE_OPENSSL:BOOL=ON", "-DENABLE_LIBB2:BOOL=OFF", "-DENABLE_LZ4:BOOL=OFF",
"-DENABLE_OPENSSL:BOOL=ON", "-DENABLE_LIBB2:BOOL=OFF", "-DENABLE_LZ4:BOOL=OFF",
"-DENABLE_LZO::BOOL=OFF", "-DENABLE_LZMA:BOOL=ON", "-DENABLE_ZSTD:BOOL=OFF",
"-DENABLE_ZLIB::BOOL=ON", "-DENABLE_BZip2:BOOL=OFF", "-DENABLE_LIBXML2:BOOL=OFF",
"-DENABLE_EXPAT::BOOL=ON", "-DENABLE_TAR:BOOL=OFF", "-DENABLE_ICONV::BOOL=OFF",
"-DENABLE_CPIO::BOOL=OFF", "-DENABLE_CAT:BOOL=OFF", "-DENABLE_ACL:BOOL=OFF",
"-DENABLE_TEST:BOOL=OFF",
"-DENABLE_TEST:BOOL=OFF", "-DENABLE_UNZIP:BOOL=OFF",
"-DCMAKE_INCLUDE_PATH=#{include_path}",
"-DCMAKE_LIBRARY_PATH=#{library_path}"
]
Expand Down
6 changes: 3 additions & 3 deletions lib/ffi-libarchive-binary/openssl_recipe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class OpensslRecipe < BaseRecipe
ROOT = Pathname.new(File.expand_path("../..", __dir__))

def initialize
super("openssl", "1.1.1w")
super("openssl", "1.1.1n")

@files << {
url: "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz",
sha256: "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8",
url: "https://www.openssl.org/source/openssl-1.1.1n.tar.gz",
sha256: "40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a",
}

@target = ROOT.join(@target).to_s
Expand Down
2 changes: 1 addition & 1 deletion lib/ffi-libarchive-binary/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module LibarchiveBinary
VERSION = "0.3.1"
VERSION = "0.3.2"
end
1 change: 1 addition & 0 deletions spec/binary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
def unarchive(archive, target)
Dir.chdir(target) do
flags = ::Archive::EXTRACT_PERM
puts "===> #{archive}"
reader = ::Archive::Reader.open_filename(archive)

reader.each_entry do |entry|
Expand Down

0 comments on commit 3b0b0ea

Please sign in to comment.