public inbox for [email protected]  
help / color / mirror / Atom feed
postgresql13-devel vs libpq-devel
2+ messages / 2 participants
[nested] [flat]

* postgresql13-devel vs libpq-devel
@ 2025-04-14 16:24  Marcin Cieslak <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Marcin Cieslak @ 2025-04-14 16:24 UTC (permalink / raw)
  To: [email protected]

Hello and big thanks for keeping this running. I've been a long time user of PGDG
packages and after many years I have run into my first problem:

The RHEL 9 machine I have has postgresql13, -libs, -server and -devel
installed from the PGDG repository (all at the 13.20-1PGDG revision).

Today I have tried to rebuild a package provided by Red Hat (rsyslog)
and it has a build time dependency on libpq-devel [1].

dnf --enablerepo pgdg-common --enablerepo pgdg13 install libpq-devel

does nothing since "postgresql13-devel" already "obsoletes" libpq-devel
but it does not full replace it (it does not "provide" libpq-devel).

This is kind of expected, I could install postgresql13-devel, postgresdql14-devel
up to the 18 if I really like in parallel. I can't do this with libpq-devel.

However, the RPM packages obviously want to have it Red Hat way, no the Postgres way.

Today, as it happens, RHEL 9 has 13.20 in their base, and I have 13.20-1PGDG
installed, but this is just a nice coincidene - I have simply done

dnf erase --noautoremove postgresql13-devel
dbf install libpq-devel

Is there any elegant solution to this problem? For example, is there
any clean way to say "please using my postgresql13-devel and instead of libpq-devel?"
to rpmbuild? That would require telling PATH and pkgconf to go somewhere else...

Or maybe postgresql13-devel and libpq-devel should get along with each other?
I think postgresql13-libs and RHEL's libpq do, and both provide "libpq.so.5()".

All the best,
Marcin

[1] https://src.fedoraproject.org/rpms/rsyslog/blob/b80cab473af65b2e3b503fc5b5cb115162065857/f/rsyslog.s...


Attachments:

  [application/pkcs7-signature] smime.p7s (3.6K, 2-smime.p7s)
  download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: postgresql13-devel vs libpq-devel
@ 2025-04-15 12:52  Devrim Gündüz <[email protected]>
  parent: Marcin Cieslak <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Devrim Gündüz @ 2025-04-15 12:52 UTC (permalink / raw)
  To: Marcin Cieslak <[email protected]>; [email protected]

Hi Marcin,

On Mon, 2025-04-14 at 16:24 +0000, Marcin Cieslak wrote:
> 

> The RHEL 9 machine I have has postgresql13, -libs, -server and -devel
> installed from the PGDG repository (all at the 13.20-1PGDG revision).
> 
> Today I have tried to rebuild a package provided by Red Hat (rsyslog)
> and it has a build time dependency on libpq-devel [1].
> 
> dnf --enablerepo pgdg-common --enablerepo pgdg13 install libpq-devel
> 
> does nothing since "postgresql13-devel" already "obsoletes" libpq-deve
> but it does not full replace it (it does not "provide" libpq-devel).

That's because I never thought of replacing libpq-devel (not that I did
not want to, I missed that) 

> 
> This is kind of expected, I could install postgresql13-devel,
> postgresdql14-devel
> up to the 18 if I really like in parallel. I can't do this with libpq-
> devel.
> 
> However, the RPM packages obviously want to have it Red Hat way, no
> the Postgres way.
> 
> Today, as it happens, RHEL 9 has 13.20 in their base, and I have
> 13.20-1PGDG
> installed, but this is just a nice coincidene - I have simply done
> 
> dnf erase --noautoremove postgresql13-devel
> dbf install libpq-devel
> 
> Is there any elegant solution to this problem? For example, is there
> any clean way to say "please using my postgresql13-devel and instead
> of libpq-devel?"
> to rpmbuild? That would require telling PATH and pkgconf to go
> somewhere else...

There are two options in here:

1. Edit the spec file and replace libpq-devel BR with libpq5-devel.

2. (As you suggested): Export PATH like this (and line 45):

https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/main/non-common/plxslt/main/plxs...

In your case replace %{pginstdir} with /usr/pgsql-13

I'd do the latter (see below)


> Or maybe postgresql13-devel and libpq-devel should get along with each
> other?
> I think postgresql13-libs and RHEL's libpq do, and both provide
> "libpq.so.5()".

So, history first: After introducing multiple version installation about
15 years ago (I know, I know...) my plan was to wait until 8.4 is EOLed
so that I could build a common libpq/libpq-devel package in our repo. It
never happened as I did not want to break any builds. But that is now
past.

In the last couple weeks I made a few attempts to build a libpq5-devel
which provides all pieces of a postgresql$latestMajorVersion-devel . It
is still WIP. Once that is done I can *also* obsolete libpq-devel.

-HTH

Regards,
-- 
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachments:

  [application/pgp-signature] signature.asc (858B, 2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-04-15 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-14 16:24 postgresql13-devel vs libpq-devel Marcin Cieslak <[email protected]>
2025-04-15 12:52 ` Devrim Gündüz <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox