From 046b4e7692e676fae36a408f1e133f94af7bc8e8 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: May 02 2018 04:20:11 +0000 Subject: remove systemd service definition stuff Nowadays we are only deploying in containerised environments, which do not use systemd. So this stuff is unused and can be deleted. --- diff --git a/MANIFEST.in b/MANIFEST.in index b121087..4a40b42 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,7 +6,6 @@ include pytest.ini include tests/*.py tests/client_secrets.json include tox.ini include fedmsg.d/*.py -recursive-include systemd * recursive-include conf * exclude conf/settings.py exclude conf/client.conf diff --git a/systemd/waiverdb.service b/systemd/waiverdb.service deleted file mode 100644 index aa0ae2d..0000000 --- a/systemd/waiverdb.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=WaiverDB Daemon -Requires=waiverdb.socket -After=network.target - -[Service] -EnvironmentFile=-/etc/sysconfig/waiverdb -ExecStart=/usr/bin/gunicorn --bind unix:/run/waiverdb/socket \ - waiverdb.wsgi:app - -[Install] -WantedBy=multi-user.target diff --git a/systemd/waiverdb.socket b/systemd/waiverdb.socket deleted file mode 100644 index 6b8fcf8..0000000 --- a/systemd/waiverdb.socket +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=WaiverDB Socket - -[Socket] -ListenStream=/run/waiverdb/socket - -[Install] -WantedBy=sockets.target diff --git a/waiverdb.spec b/waiverdb.spec index 449dcef..0668ddd 100644 --- a/waiverdb.spec +++ b/waiverdb.spec @@ -57,8 +57,6 @@ BuildRequires: python-configparser BuildRequires: python-flask-migrate BuildRequires: stomppy BuildRequires: fedmsg -%{?systemd_requires} -BuildRequires: systemd Requires: python3-flask Requires: python3-sqlalchemy Requires: python3-flask-restful @@ -124,13 +122,7 @@ make -C docs SPHINXOPTS= html man text PYTHONDONTWRITEBYTECODE=1 %py2_install %endif -%if %{with server} -install -d %{buildroot}%{_unitdir} -install -m0644 \ - systemd/%{name}.service \ - systemd/%{name}.socket \ - %{buildroot}%{_unitdir} -%else +%if ! %{with server} # Need to properly split out the client one day... rm %{buildroot}%{_bindir}/waiverdb ls -d %{buildroot}%{python2_sitelib}/waiverdb/* | grep -E -v '(__init__.py|cli.py)$' | xargs rm -r @@ -160,8 +152,6 @@ install -D -m0644 \ %files %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}*.egg-info -%{_unitdir}/%{name}.service -%{_unitdir}/%{name}.socket %attr(755,root,root) %{_bindir}/waiverdb %endif @@ -192,15 +182,4 @@ install -D -m0644 \ %{_mandir}/man7/waiverdb.7* %endif -%post -%systemd_post %{name}.service -%systemd_post %{name}.socket - -%preun -%systemd_preun %{name}.service -%systemd_preun %{name}.socket - -%postun -%systemd_postun_with_restart %{name}.service - %changelog