diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2fb436e5eb086e994e740e4b3f536ad82beb99dd..a2a359cc01c3a7f702ccfb735b293d454ed90e47 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -103,9 +103,8 @@ client_wheel_sdist: - python3 setup.py bdist_wheel - python3 setup.py sdist artifacts: - expire_in: 1 day - paths: - - cc7_artifacts/ + when: on_success + untracked: true client_rpm: @@ -153,6 +152,5 @@ deploy_rpm: dependencies: - client_rpm - server_rpm - when: manual diff --git a/packaging/fts-rest-server.spec b/packaging/fts-rest-server.spec index 0fb232491c32950e1d1ceb44022a8825e46691b8..1e9106e718c3310126dffd2259e8d7909ec5e9e6 100644 --- a/packaging/fts-rest-server.spec +++ b/packaging/fts-rest-server.spec @@ -61,17 +61,18 @@ mkdir -p %{buildroot}%{python3_sitelib} mkdir -p %{buildroot}%{_libexecdir}/fts3rest mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d mkdir -p %{buildroot}%{_sysconfdir}/fts3 -mkdir -p %{buildroot}/%{_var}/log/fts3rest +mkdir -p %{buildroot}%{_var}/log/fts3rest cp -r fts3rest/fts3rest %{buildroot}%{python3_sitelib} cp fts3rest/fts3rest.wsgi %{buildroot}%{_libexecdir}/fts3rest cp fts3rest/fts3rest.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/fts3rest.conf -cp fts3rest/fts3config %{buildroot}%{_sysconfdir}/fts3 +cp fts3rest/ftsrestconfig %{buildroot}%{_sysconfdir}/fts3 %files %license LICENSE %config(noreplace) %{_sysconfdir}/httpd/conf.d/fts3rest.conf -%config(noreplace) %{_sysconfdir}/fts3/fts3config +%config(noreplace) %{_sysconfdir}/fts3/ftsrestconfig %{python3_sitelib}/fts3rest/ +%attr(0755,fts3,fts3) /var/log/fts3rest %{_libexecdir}/fts3rest # Install, set SELinux diff --git a/src/fts3/rest/client/delegator.py b/src/fts3/rest/client/delegator.py index 0743f9b208bb5e3c091ed0d73e2a6f37d0e43a88..49e87d5dd2178bdee34286a9e1cf56f7d4b7db5a 100644 --- a/src/fts3/rest/client/delegator.py +++ b/src/fts3/rest/client/delegator.py @@ -130,7 +130,7 @@ class Delegator(object): def _get_remaining_life(self, delegation_id): r = self.get_info(delegation_id) - if r is None: + if not r: return None else: expiration_time = datetime.strptime( @@ -220,11 +220,11 @@ class Delegator(object): m2.x509_name_set_by_nid( proxy_subject._ptr(), X509.X509_Name.nid["commonName"], - str(int(time.time())), + str(int(time.time())).encode("utf-8"), ) else: m2.x509_name_set_by_nid( - proxy_subject._ptr(), X509.X509_Name.nid["commonName"], "proxy" + proxy_subject._ptr(), X509.X509_Name.nid["commonName"], b"proxy" ) proxy.set_subject(proxy_subject) diff --git a/src/fts3rest/fts3rest.conf b/src/fts3rest/fts3rest.conf index 389741f231b6e39d90af7b2546b7b68bbbcec7e2..e1919bb57f1f8a871c2fa1719673876f56bfa173 100644 --- a/src/fts3rest/fts3rest.conf +++ b/src/fts3rest/fts3rest.conf @@ -34,7 +34,7 @@ Listen 8446 Require all granted </Location> - WSGIDaemonProcess ftsrest processes=2 threads=15 user=ftsflask group=ftsflask + WSGIDaemonProcess ftsrest processes=2 threads=15 display-name=fts3rest user=fts3 group=fts3 WSGIProcessGroup ftsrest WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On diff --git a/src/fts3rest/fts3rest.wsgi b/src/fts3rest/fts3rest.wsgi index d89c73ae4e515b51c2f0cf4339005ffd6f5f3306..5c96ac4256f2039bba8e8e4b952680f48eb3a924 100644 --- a/src/fts3rest/fts3rest.wsgi +++ b/src/fts3rest/fts3rest.wsgi @@ -1,6 +1,6 @@ from fts3rest.config.middleware import create_app -default_config_filename = '/etc/fts3/fts3config' +default_config_filename = '/etc/fts3/ftsrestconfig' #default_config_filename = ( # "/home/ftsflask/fts-rest-flask/src/fts3rest/fts3rest/tests/fts3testconfig" #) diff --git a/src/fts3rest/fts3rest/config/config.py b/src/fts3rest/fts3rest/config/config.py index a1287c80be617dd64a38add2b928c42da80ee41a..3f915c767999f8847325178c598ceccafb8e2d6d 100644 --- a/src/fts3rest/fts3rest/config/config.py +++ b/src/fts3rest/fts3rest/config/config.py @@ -21,7 +21,7 @@ import logging log = logging.getLogger(__name__) -def fts3_config_load(path="/etc/fts3/fts3config", test=False): +def fts3_config_load(path="/etc/fts3/ftsrestconfig", test=False): """ Read the configuration from the FTS3 configuration file """ diff --git a/src/fts3rest/fts3config b/src/fts3rest/ftsrestconfig similarity index 100% rename from src/fts3rest/fts3config rename to src/fts3rest/ftsrestconfig