From 4fa91488af77139cb43b8e56bc8a1ad22b971b12 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Thu, 26 Oct 2023 23:02:47 -0400 Subject: [PATCH] Update to 1.5.0, fix review items --- pinnwand.spec | 31 +++++++++++++++++++++++++------ sources | 1 + 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 sources diff --git a/pinnwand.spec b/pinnwand.spec index e50a0e0..d1c078e 100644 --- a/pinnwand.spec +++ b/pinnwand.spec @@ -1,4 +1,4 @@ -%global gittagversion 1.4.0 +%global gittagversion 1.5.0 %global gittag v%{?gittagversion} Name: pinnwand @@ -26,7 +26,16 @@ little more complex %prep %autosetup -p 1 -n pinnwand-%{version} -sed -i 's/docutils = "^0.19/docutils = ">=0.19/' pyproject.toml + +# NOTE(neil): 2023-10-26 pinnwand 1.4.0 wants 0.19, but Fedora has 20.X +# at the same time, 1.5.0 wants sqlalchemy >= 2, but Fedora has not upgraded to +# it yet. See: +# https://src.fedoraproject.org/rpms/python-sqlalchemy/pull-request/16 +sed -i 's/sqlalchemy>=2/sqlalchemy<2/' pyproject.toml + +# Upstream switched to `pdm` from poetry for 1.5.0, but this prevents creation +# of the pinnwand entrypoint during build +sed -i 's/tool\.poetry\.scripts/project.scripts/' pyproject.toml %generate_buildrequires %pyproject_buildrequires @@ -38,23 +47,33 @@ sed -i 's/docutils = "^0.19/docutils = ">=0.19/' pyproject.toml %pyproject_install %pyproject_save_files pinnwand - -install -Dpm 0644 %{_sourcedir}/pinnwand.service %{buildroot}%{_unitdir}/%{name}.service +install -Dpm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service install -Dpm 0644 etc/pinnwand.toml-example %{buildroot}%{_sysconfdir}/%{name}/%{name}.toml %check %pytest +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + %files -f %{pyproject_files} +%dir %{_sysconfdir}/%{name} %doc README.md %license LICENSE %{_bindir}/%{name} %{_unitdir}/pinnwand.service %config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml - - %changelog +* Thu Oct 26 2023 Neil Hanlon - 1.5.0-1 +- Update to 1.4.0 + * Thu Aug 03 2023 Neil Hanlon - 1.4.0-1 - Update to 1.4.0 diff --git a/sources b/sources new file mode 100644 index 0000000..6003f45 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pinnwand-1.4.0.tar.gz) = 4cf3c22679bafa7256e5caa2304922312a0e35aadb909611c49eafa46d053202dc903a886620c16f28449a4a29bc745ceb35e5cf787d7281bc966a818dd31b2e