summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothée Floure <timothee.floure@fnux.ch>2018-08-11 14:53:33 +0200
committerTimothée Floure <timothee.floure@fnux.ch>2018-08-11 14:53:33 +0200
commitacc1ab588347dcb4ffe61493ea4afeb0fde3187d (patch)
tree710fa5b63732c0ef28e2effd2ca11d51c93af075
parentb92b3e2d76c5dbe739cdee6ab0dbbe83cfb63507 (diff)
downloadrpm-erlang-certifi-master.tar.gz
rpm-erlang-certifi-master.tar.xz
rpm-erlang-certifi-master.zip
Patch to point to the default Fedora CA bundleHEADmaster
-rw-r--r--erlang-certifi-enforce_fedora_ca_bundle.patch21
-rw-r--r--erlang-certifi.spec14
2 files changed, 28 insertions, 7 deletions
diff --git a/erlang-certifi-enforce_fedora_ca_bundle.patch b/erlang-certifi-enforce_fedora_ca_bundle.patch
new file mode 100644
index 0000000..1655238
--- /dev/null
+++ b/erlang-certifi-enforce_fedora_ca_bundle.patch
@@ -0,0 +1,21 @@
+--- src/certifi.erl.orig 2018-08-11 12:26:46.924043683 +0200
++++ src/certifi.erl 2018-08-11 12:27:00.485097548 +0200
+@@ -8,17 +8,7 @@
+ %% @doc CACertFile gives the path to the file with an X.509 certificate list
+ %% containing the Mozilla CA Certificate that can then be used via the
+ %% cacertfile setting in ssl options passed to the connect function.
+-cacertfile() ->
+- PrivDir = case code:priv_dir(certifi) of
+- {error, _} ->
+- %% try to get relative priv dir. useful for tests.
+- AppDir = filename:dirname(
+- filename:dirname(code:which(?MODULE))
+- ),
+- filename:join(AppDir, "priv");
+- Dir -> Dir
+- end,
+- filename:join(PrivDir, "cacerts.pem").
++cacertfile() -> '/etc/ssl/certs/ca-bundle.crt'.
+
+ %% @doc CACerts builds an X.509 certificate list containing the Mozilla CA
+ %% Certificate that can then be used via the cacerts setting in ssl options
diff --git a/erlang-certifi.spec b/erlang-certifi.spec
index 1e044d4..2da0978 100644
--- a/erlang-certifi.spec
+++ b/erlang-certifi.spec
@@ -8,18 +8,22 @@
Name: erlang-%{realname}
Version: 2.3.1
Release: 1%{?dist}
-Summary: CA bundle adapted from Mozilla
+Summary: Dummy certifi (certificate bundle) package for erlang
License: BSD
URL: https://github.com/%{upstream}/%{upstream_reponame}
Source0: https://github.com/%{upstream}/%{upstream_reponame}/archive/%{version}/%{upstream_reponame}-%{version}.tar.gz
+Patch0: erlang-certifi-enforce_fedora_ca_bundle.patch
BuildRequires: erlang-rebar sed erlang-parse_trans
Requires: erlang-rebar
%description
-%{summary}.
+Upstream certifi provides a custom CA bundle to erlang. Since custom CA bundles
+cannot be packaged in Fedora, this 'dummy' package patches certifi to point to
+the default Fedora CA bundle.
%prep
-%autosetup -n %{upstream_reponame}-%{version}
+%setup -q -n %{upstream_reponame}-%{version}
+%patch0
# Fix dependency version issue
sed -i 's/{parse_trans, "3.2.0"}/{parse_trans, "3.3.0"}/' rebar.config
@@ -29,10 +33,6 @@ sed -i 's/{parse_trans, "3.2.0"}/{parse_trans, "3.3.0"}/' rebar.config
%install
%{erlang_install}
-cp -arv priv/ %{buildroot}%{erlang_appdir}/
-
-%check
-%{erlang_test}
%files
%license LICENSE