[arch-commits] Commit in (5 files)

Tim Meusel bastelfreak at archlinux.org
Sun May 16 16:32:43 UTC 2021


    Date: Sunday, May 16, 2021 @ 16:32:43
  Author: bastelfreak
Revision: 935901

Add ruby27-httpclient

Added:
  ruby27-httpclient/
  ruby27-httpclient/repos/
  ruby27-httpclient/trunk/
  ruby27-httpclient/trunk/PKGBUILD
  ruby27-httpclient/trunk/disable-broken-TLS-test.patch

-------------------------------+
 PKGBUILD                      |   60 ++++++++++++++++++++++++++++++++++++++++
 disable-broken-TLS-test.patch |   21 ++++++++++++++
 2 files changed, 81 insertions(+)

Added: ruby27-httpclient/trunk/PKGBUILD
===================================================================
--- ruby27-httpclient/trunk/PKGBUILD	                        (rev 0)
+++ ruby27-httpclient/trunk/PKGBUILD	2021-05-16 16:32:43 UTC (rev 935901)
@@ -0,0 +1,60 @@
+# Maintainer: Tim Meusel <tim at bastelfreak.de>
+# Contributor: Christian Rebischke <chris.rebischke at archlinux.org>
+# Contributor: farwayer <farwayer at gmail.com>
+# Contributor: Tim Meusel <tim at bastelfreak.de>
+
+_gemname='httpclient'
+pkgname="ruby27-${_gemname}"
+pkgver=2.8.3
+pkgrel=1
+pkgdesc='gives something like the functionality of libwww-perl (LWP) in Ruby'
+arch=('any')
+url="https://github.com/nahi/${_gemname}"
+license=('RUBY')
+makedepends=('ruby27-rdoc')
+depends=('ruby2.7')
+options=(!emptydirs)
+source=("${url}/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz"
+        'disable-broken-TLS-test.patch')
+sha512sums=('b65b5adb97af069d7ff6b6f4cccd6a42c6d9c88b797e9495768fe1f36a6bd93defe50190edc201de5e39c4e306ba0bd17a8ff2f8eba4d636dacafa06c172967d'
+            'fcdb88f83ea1663f1f21113f7943223ffc1c69dc0f1305d74e8a96b3752f905c1bfa3727f2eb9dae9742db16d222ba5971a072b065a6c7ce535615b51fdb8712')
+
+prepare() {
+  cd "${srcdir}/${_gemname}-${pkgver}"
+
+  # Allow latest gem dependencies
+  sed --in-place 's|~>|>=|g' Gemfile
+
+  # fix wrong license name in gemspec
+  sed --in-place "s/'ruby'/'Ruby'/" "${_gemname}.gemspec"
+
+  # don't load the bundler setup. That would require us to
+  # provide all 'development' dependencies
+  sed --in-place '/setup/d' Rakefile
+
+  # test_auth.rb does a bunch of windows specific NTLM tests
+  # they don't apply to Arch
+  rm test/test_auth.rb
+
+  # one test verifies the openssl store.
+  # a) this test has nothing to do with the actual httpclient
+  # b) the used certificate is expiried so the test fails
+  patch --forward --verbose --strip=1 --input='../disable-broken-TLS-test.patch'
+}
+
+build() {
+  cd "${srcdir}/${_gemname}-${pkgver}"
+  gem-2.7 build "${_gemname}.gemspec"
+}
+
+package() {
+  cd "${srcdir}/${_gemname}-${pkgver}"
+  local _gemdir="$(gem-2.7 env gemdir)"
+  gem-2.7 install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
+
+  install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
+
+  rm -rf "${pkgdir}/${_gemdir}/cache"
+}
+
+# vim: ts=2 sw=2 et:

Added: ruby27-httpclient/trunk/disable-broken-TLS-test.patch
===================================================================
--- ruby27-httpclient/trunk/disable-broken-TLS-test.patch	                        (rev 0)
+++ ruby27-httpclient/trunk/disable-broken-TLS-test.patch	2021-05-16 16:32:43 UTC (rev 935901)
@@ -0,0 +1,21 @@
+diff --git a/test/test_ssl.rb b/test/test_ssl.rb
+index 2e634d7..2c779d3 100644
+--- a/test/test_ssl.rb
++++ b/test/test_ssl.rb
+@@ -80,16 +80,6 @@ end
+     assert(str.scan(/^hello$/)[0])
+   end
+ 
+-  def test_verification_without_httpclient
+-    raw_cert = "-----BEGIN CERTIFICATE-----\nMIIDOTCCAiGgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBCMRMwEQYKCZImiZPyLGQB\nGRYDb3JnMRkwFwYKCZImiZPyLGQBGRYJcnV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KszXg\nLoAYhGxtjCJaKlbzduMK0YO6aelgW1+XnVIKcA7DJ9egk5d/dFZBPFfwumwr9hTH\nh7/fp3Fr87weI+CkfmFyJZrsEBlXJBVuvPesMVHTh3Whm5kmCdWcBJU0QmSq42ZL\n72U0PXLR\n-----END CERTIFICATE-----"
+-    ca_cert = ::OpenSSL::X509::Certificate.new(raw_ca_cert)
+-    cert = ::OpenSSL::X509::Certificate.new(raw_cert)
+-    store = ::OpenSSL::X509::Store.new
+-    store.add_cert(ca_cert)
+-    assert(store.verify(cert))
+-  end
+-
+   def test_verification
+     cfg = @client.ssl_config
+     cfg.verify_callback = method(:verify_callback).to_proc



More information about the arch-commits mailing list