From 6f8fce936a4d941e85129e0a877b969aeed92f3f Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 17 Jul 2018 20:15:30 +0000 Subject: [PATCH] - don't install distro wide, this allows multiple CAs for users --- easy-rsa.spec | 30 +++++++++++------------------- tld.patch | 21 --------------------- 2 files changed, 11 insertions(+), 40 deletions(-) delete mode 100644 tld.patch diff --git a/easy-rsa.spec b/easy-rsa.spec index fc53a68..1e1588e 100644 --- a/easy-rsa.spec +++ b/easy-rsa.spec @@ -2,12 +2,11 @@ Summary: Small RSA key management package Summary(pl.UTF-8): Mały pakiet do zarządzania kluczami RSA Name: easy-rsa Version: 3.0.4 -Release: 0.1 +Release: 1 License: GPL v2 Group: Applications/Networking Source0: https://github.com/OpenVPN/easy-rsa/releases/download/v%{version}/EasyRSA-%{version}.tgz # Source0-md5: d163f0681b4b2067f107badeb9151629 -Patch0: tld.patch URL: http://openvpn.net/easyrsa.html BuildRequires: autoconf >= 2.59 BuildRequires: automake >= 1:1.9 @@ -30,16 +29,15 @@ dystrybucji OpenVPN. %prep %setup -q -n EasyRSA-%{version} -%patch0 -p1 %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/easy-rsa/keys} +install -d $RPM_BUILD_ROOT{%{_sbindir},%{_datadir}/easy-rsa} -install -p easyrsa $RPM_BUILD_ROOT%{_sbindir} -mv openssl-easyrsa.cnf $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa -mv vars.example $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa/vars -mv x509-types $RPM_BUILD_ROOT%{_sysconfdir}/easy-rsa +mv easyrsa $RPM_BUILD_ROOT%{_datadir}/easy-rsa +mv openssl-easyrsa.cnf $RPM_BUILD_ROOT%{_datadir}/easy-rsa +mv vars.example $RPM_BUILD_ROOT%{_datadir}/easy-rsa +mv x509-types $RPM_BUILD_ROOT%{_datadir}/easy-rsa %clean rm -rf $RPM_BUILD_ROOT @@ -47,14 +45,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc COPYING.md README.md README.quickstart.md doc -%dir %{_sysconfdir}/easy-rsa -%attr(750,root,root) %dir %{_sysconfdir}/easy-rsa/keys -%attr(750,root,root) %dir %{_sysconfdir}/easy-rsa/x509-types -%attr(640,root,root) %dir %{_sysconfdir}/easy-rsa/x509-types/COMMON -%attr(640,root,root) %dir %{_sysconfdir}/easy-rsa/x509-types/ca -%attr(640,root,root) %dir %{_sysconfdir}/easy-rsa/x509-types/client -%attr(640,root,root) %dir %{_sysconfdir}/easy-rsa/x509-types/code-signing -%attr(640,root,root) %dir %{_sysconfdir}/easy-rsa/x509-types/server -%config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/vars -%config(noreplace) %attr(640,root,root) %verify(not md5 mtime size) %{_sysconfdir}/easy-rsa/openssl-easyrsa.cnf -%attr(750,root,root) %{_sbindir}/easyrsa +%dir %{_datadir}/easy-rsa +%attr(755,root,root) %{_datadir}/easy-rsa/easyrsa +%{_datadir}/easy-rsa/openssl-easyrsa.cnf +%{_datadir}/easy-rsa/vars.example +%{_datadir}/easy-rsa/x509-types diff --git a/tld.patch b/tld.patch deleted file mode 100644 index 91ca7c6..0000000 --- a/tld.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur EasyRSA-3.0.4.orig/vars.example EasyRSA-3.0.4/vars.example ---- EasyRSA-3.0.4.orig/vars.example 2018-01-21 15:37:26.000000000 +0000 -+++ EasyRSA-3.0.4/vars.example 2018-07-17 15:07:46.127952424 +0000 -@@ -47,7 +47,7 @@ - # itself, which is also where the configuration files are located in the - # easy-rsa tree. - --#set_var EASYRSA "${0%/*}" -+set_var EASYRSA "/etc/easy-rsa" - - # If your OpenSSL command is not in the system PATH, you will need to define the - # path to it here. Normally this means a full path to the executable, otherwise -@@ -69,7 +69,7 @@ - # WARNING: init-pki will do a rm -rf on this directory so make sure you define - # it correctly! (Interactive mode will prompt before acting.) - --#set_var EASYRSA_PKI "$PWD/pki" -+set_var EASYRSA_PKI "/etc/easy-rsa/keys" - - # Define X509 DN mode. - # This is used to adjust what elements are included in the Subject field as the DN -- 2.46.0