Dave Johansen proposed following change in spec file. The postgresql requires full version, we should require just major version to keep compatibility with older bug fix versions: -Requires: postgresql >= 9.2.5 +Requires: postgresql >= 9.2 The required version of postgresql is obtained using following macro: %global pg_version_built %(if [ -x %{_bindir}/pg_config ]; then %{_bindir}/pg_config --version | /bin/sed 's,^PostgreSQL *,,gi'; else echo %{pg_version_minimum}; fi) Requires: postgresql >= %{pg_version_built} The regular expression could be replaced as follows: pg_config --version | /bin/sed 's,^PostgreSQL *\([0-9]*\.[0-9]\)\..*,\1,gi'
Created attachment 1144265 [details] Proposed patch I would like to ask you for review of that patch.
I don't understand why the 'postgresql' package is required in the first place. I've seen that this requirement has been removed from Fedora, by commit d1af82f4f2fb724112640692086326761e40bd17 (and I think this did not break things out there), could we do similar thing in EPEL7? I.e. shouldn't we require postgresql-server >= 9.2? Looks like 7e5b6b7dc79dbacf5ec261669b5478d59fbdefbf was added with aim to fix the Fedora N -> Fedora N+1 issues (that commit was not done against epel, but something like f13 or so), so it does not look like very important Requires: guard in EPEL (where will be PostgreSQL 9.2 version forever) .. .. anyway, would it make sense to do change like: - Requires: postgresql >= %{pg_version_built} + Requires: postgresql-server >= 9.2 In EPEL 7 only? I wouldn't care much about regressions, as once there will be RHEL8 or EPEL8 variant, those packages will have the proper "MODULE_COMPAT" guard inherited from actual Fedora package.
Created attachment 1144273 [details] Proposed patch It seems, the regular expression in my previous comment was incorrect. I have removed the postgresql requires at all and added postgresql-server as Pavel suggested. I am using the same pg_version_minimum macro as it looks reasonable for me.
(In reply to Jozef Mlich from comment #3) > Created attachment 1144273 [details] > Proposed patch > > It seems, the regular expression in my previous comment was incorrect. I > have removed the postgresql requires at all and added postgresql-server as > Pavel suggested. I am using the same pg_version_minimum macro as it looks > reasonable for me. Please, don't change the requirement to be on postgresql-server unless the tools (like shp2pgsql) are broken out into a separate package that can be installed on "client machines". Breaking the package into "client" and "server" components would potentially be a nice change in a future Fedora release, but I believe that's a separate issue from what's being discussed here.
(In reply to Dave Johansen from comment #4) > Please, don't change the requirement to be on postgresql-server unless the > tools (like shp2pgsql) are broken out into a separate package that can be > installed on "client machines". Good point, thanks. So we could simply just require postgresql 9.2 in EPEL7. So you please have a look at commit: http://pkgs.fedoraproject.org/cgit/rpms/postgis.git/commit/?h=epel7&id=4168e4f867d3af4183cada6 > Breaking the package into "client" and "server" components would potentially > be a nice change in a future Fedora release, but I believe that's a separate > issue from what's being discussed here. We require postgresql-server in Fedora, so we should probably do it rather sooner than later in Fedora.
This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component.
EPEL 7 entered end-of-life (EOL) status on 2024-06-30. EPEL 7 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.