From 78a19d9b14208ac6b4f372acb74f1f3a2cb7f65f Mon Sep 17 00:00:00 2001 From: efajardo Date: Sat, 25 Feb 2006 08:01:34 -0800 Subject: [PATCH 1/4] Adding support for EL8 builds SOFTWARE-4230 --- rpm/x509-scitokens-issuer.spec | 51 ++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/rpm/x509-scitokens-issuer.spec b/rpm/x509-scitokens-issuer.spec index 9f209ff..d8d7799 100644 --- a/rpm/x509-scitokens-issuer.spec +++ b/rpm/x509-scitokens-issuer.spec @@ -1,14 +1,11 @@ Name: x509-scitokens-issuer -Version: 0.7.0 +Version: 0.6.0 Release: 1%{?dist} Summary: SciTokens issuer based on X509 authentication. License: Apache 2.0 URL: https://scitokens.org -# Detect builds on Darwin in the CMS environment. -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) - # Generated from: # git archive v%{version} --prefix=%{name}-%{version}/ | gzip -7 > ~/rpmbuild/SOURCES/x509-scitokens-issuer-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz @@ -23,17 +20,31 @@ Requires: python-ndg_httpsclient %endif BuildRequires: cmake -BuildRequires: python2-devel -BuildRequires: python2-setuptools BuildRequires: davix-devel BuildRequires: json-c-devel +%if 0%{?rhel} >= 8 +%define __python /usr/bin/python3 +%endif + +%if 0%{?rhel} >= 8 +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-scitokens +Requires: python3-requests +Requires: python3-flask +Requires: python3-mod_wsgi +%else +BuildRequires: python2-devel +BuildRequires: python2-setuptools Requires: python2-scitokens Requires: python-requests Requires: python-flask +Requires: mod_wsgi +%endif Requires: httpd Requires: gridsite -Requires: mod_wsgi + %description %{summary} @@ -41,7 +52,11 @@ Requires: mod_wsgi %package client Summary: Client for X509-based token issuer +%if 0%{?rhel} >= 8 +Requires: python3-requests +%else Requires: python-requests +%endif %description client A client library for the x509-scitokens-issuer. @@ -50,28 +65,19 @@ A client library for the x509-scitokens-issuer. %setup %build -%{py2_build} +%{py_build} %cmake . %install make install DESTDIR=%{buildroot} -%{py2_install} +%{py_install} rm %{buildroot}%{_bindir}/cms-scitokens-init -%if %isdarwin -# we should use /usr/local to avoid SIP problem on OSX -rm -f %{buildroot}/usr/local/lib/systemd/system/cms-mapping-updater.service -rm -f %{buildroot}/usr/local/lib/systemd/system/cms-mapping-updater.timer - -%else - %if 0%{?rhel} < 7 rm -f %{buildroot}/usr/lib/systemd/system/cms-mapping-updater.service rm -f %{buildroot}/usr/lib/systemd/system/cms-mapping-updater.timer %endif -%endif - %post %systemd_post httpd.service @@ -113,7 +119,7 @@ fi %config(noreplace) %{_sysconfdir}/httpd/conf.d/x509_scitokens_issuer.conf %{_bindir}/cms-update-mapping %{_bindir}/cms-scitoken-init -%{python2_sitelib}/x509_scitokens_issuer* +%{python_sitelib}/x509_scitokens_issuer* %attr(0700, apache, apache) %dir %{_localstatedir}/cache/httpd/%{name} %ghost %attr(-, apache, apache) %{_localstatedir}/cache/httpd/%{name}/dn_mapping.json @@ -131,11 +137,8 @@ fi %{_bindir}/macaroon-init %changelog -* Wed Dec 19 2018 Brian Bockelman - 0.7.0-1 -- Implement new OAuth 2.0-based request for 'macaroons' (or similar). - -* Mon Oct 08 2018 Brian Bockelman - 0.5.4-1 -- Do not attempt to read Macaroon responses larger than 1MB. +* Tue Aug 18 2020 Edgar Fajardo - 0.6.0-1 +- Adding support for EL8 * Tue Sep 4 2018 Edgar Fajardo - 0.5.3-1 - Adding the correct requirements From dd18118f503023b4532eb99a1f7c518efd15a7b7 Mon Sep 17 00:00:00 2001 From: efajardo Date: Sat, 25 Feb 2006 08:05:56 -0800 Subject: [PATCH 2/4] Adding back the darwin support --- rpm/x509-scitokens-issuer.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rpm/x509-scitokens-issuer.spec b/rpm/x509-scitokens-issuer.spec index d8d7799..50ac376 100644 --- a/rpm/x509-scitokens-issuer.spec +++ b/rpm/x509-scitokens-issuer.spec @@ -6,6 +6,10 @@ Summary: SciTokens issuer based on X509 authentication. License: Apache 2.0 URL: https://scitokens.org +# Detect builds on Darwin in the CMS environment. +%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) + + # Generated from: # git archive v%{version} --prefix=%{name}-%{version}/ | gzip -7 > ~/rpmbuild/SOURCES/x509-scitokens-issuer-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz @@ -73,11 +77,20 @@ make install DESTDIR=%{buildroot} %{py_install} rm %{buildroot}%{_bindir}/cms-scitokens-init +%if %isdarwin +# we should use /usr/local to avoid SIP problem on OSX +rm -f %{buildroot}/usr/local/lib/systemd/system/cms-mapping-updater.service +rm -f %{buildroot}/usr/local/lib/systemd/system/cms-mapping-updater.timer + +%else + %if 0%{?rhel} < 7 rm -f %{buildroot}/usr/lib/systemd/system/cms-mapping-updater.service rm -f %{buildroot}/usr/lib/systemd/system/cms-mapping-updater.timer %endif +%endif + %post %systemd_post httpd.service From 68dc7f598fc275e70a82536339a8cfdd48f11f3a Mon Sep 17 00:00:00 2001 From: efajardo Date: Sat, 25 Feb 2006 08:07:22 -0800 Subject: [PATCH 3/4] Fixing the changelog --- rpm/x509-scitokens-issuer.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rpm/x509-scitokens-issuer.spec b/rpm/x509-scitokens-issuer.spec index 50ac376..be08497 100644 --- a/rpm/x509-scitokens-issuer.spec +++ b/rpm/x509-scitokens-issuer.spec @@ -1,5 +1,5 @@ Name: x509-scitokens-issuer -Version: 0.6.0 +Version: 0.8.0 Release: 1%{?dist} Summary: SciTokens issuer based on X509 authentication. @@ -150,9 +150,15 @@ fi %{_bindir}/macaroon-init %changelog -* Tue Aug 18 2020 Edgar Fajardo - 0.6.0-1 +* Tue Aug 18 2020 Edgar Fajardo - 0.8.0-1 - Adding support for EL8 +* Wed Dec 19 2018 Brian Bockelman - 0.7.0-1 +- Implement new OAuth 2.0-based request for 'macaroons' (or similar). + +* Mon Oct 08 2018 Brian Bockelman - 0.5.4-1 +- Do not attempt to read Macaroon responses larger than 1MB. + * Tue Sep 4 2018 Edgar Fajardo - 0.5.3-1 - Adding the correct requirements - Bug fixes From 66ae67e01391d557e4113e468532db41180898de Mon Sep 17 00:00:00 2001 From: efajardo Date: Fri, 21 Aug 2020 09:13:44 -0700 Subject: [PATCH 4/4] Remove extra spaces added --- rpm/x509-scitokens-issuer.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/rpm/x509-scitokens-issuer.spec b/rpm/x509-scitokens-issuer.spec index be08497..cd612c5 100644 --- a/rpm/x509-scitokens-issuer.spec +++ b/rpm/x509-scitokens-issuer.spec @@ -9,7 +9,6 @@ URL: https://scitokens.org # Detect builds on Darwin in the CMS environment. %define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) - # Generated from: # git archive v%{version} --prefix=%{name}-%{version}/ | gzip -7 > ~/rpmbuild/SOURCES/x509-scitokens-issuer-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz