Bug 1324558 - Requires should be on major version of postgres
Summary: Requires should be on major version of postgres
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: postgis
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1324719
TreeView+ depends on / blocked
 
Reported: 2016-04-06 15:47 UTC by Jozef Mlich
Modified: 2020-03-04 04:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1324719 (view as bug list)
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
Proposed patch (1.41 KB, application/mbox)
2016-04-06 15:52 UTC, Jozef Mlich
no flags Details
Proposed patch (1.79 KB, patch)
2016-04-06 16:25 UTC, Jozef Mlich
no flags Details | Diff

Description Jozef Mlich 2016-04-06 15:47:58 UTC
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'

Comment 1 Jozef Mlich 2016-04-06 15:52:54 UTC
Created attachment 1144265 [details]
Proposed patch

I would like to ask you for review of that patch.

Comment 2 Pavel Raiskup 2016-04-06 16:17:46 UTC
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.

Comment 3 Jozef Mlich 2016-04-06 16:25:58 UTC
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.

Comment 4 Dave Johansen 2016-04-06 17:33:20 UTC
(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.

Comment 5 Pavel Raiskup 2016-04-07 05:41:51 UTC
(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.

Comment 6 Fedora Admin XMLRPC Client 2020-03-04 04:19:36 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.


Note You need to log in before you can comment on or make changes to this bug.