Обсуждение: Packages that provide extensions should Requires: an exact version
Hi
Currently it looks like packages that build extensions have:
Requires: postgresql94-server
e.g.
# repoquery -i -R plr93-0:8.3.0.15-1.f20.x86_64 | grep server
postgresql93-server
but this means they can be installed against any PostgreSQL server,
whether or not it's compatible.
Extensions should have a Requires: definition for the exact server
version they're compiled against.
As that might be annoying to maintain, I'm wondering if we can use RPM's
auto-buildrequires stuff to grab the server version, have the server
package Provides: it, and then auto-add appropriate Requires: like RPM
does with libc:
Requires: libc.so.6(GLIBC_2.14)(64bit)
or Perl:
perl(:MODULE_COMPAT_5.18.2)
That way it won't be possible to install extensions against an
incompatible server binary.
Thoughts?
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
On 08/12/2014 04:26 PM, Craig Ringer wrote: > As that might be annoying to maintain, I'm wondering if we can use RPM's > auto-buildrequires stuff to grab the server version, have the server > package Provides: it, and then auto-add appropriate Requires: like RPM > does with libc: > > > Requires: libc.so.6(GLIBC_2.14)(64bit) > > or Perl: > > perl(:MODULE_COMPAT_5.18.2) Specifically, wrapping the %__find_provides script . e.g. %define %__find_provides ... except that according to https://bugzilla.redhat.com/show_bug.cgi?id=395961 this won't work because RPM uses an internal dependency generator . (They're also rude about it in the bug comments). It looks like, depending on rpm version, a find_provides or find_requires wrapper must use rpmdeps if it's present and otherwise fall back to find-provides / find-requires . Too fiddly for now, that's an idea for later. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 08/13/2014 10:53 AM, Craig Ringer wrote: > On 08/12/2014 04:26 PM, Craig Ringer wrote: >> As that might be annoying to maintain, I'm wondering if we can use RPM's >> auto-buildrequires stuff to grab the server version, have the server >> package Provides: it, and then auto-add appropriate Requires: like RPM >> does with libc: >> >> >> Requires: libc.so.6(GLIBC_2.14)(64bit) >> >> or Perl: >> >> perl(:MODULE_COMPAT_5.18.2) > > Specifically, wrapping the %__find_provides script . > > e.g. > > %define %__find_provides > > ... except that according to > https://bugzilla.redhat.com/show_bug.cgi?id=395961 this won't work > because RPM uses an internal dependency generator . > > (They're also rude about it in the bug comments). > > It looks like, depending on rpm version, a find_provides or > find_requires wrapper must use rpmdeps if it's present and otherwise > fall back to find-provides / find-requires . Can detect this with: _use_internal_dependency_generator -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services