public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] How to handle Firebird with PHP now
@ 2025-02-10 19:07 Matthias Hanft
  2025-02-10 20:11 ` Michael
  0 siblings, 1 reply; 9+ messages in thread
From: Matthias Hanft @ 2025-02-10 19:07 UTC (permalink / raw
  To: gentoo-user

Hi,

I have many Firebird databases on my Gentoo server.

To compile PHP with Firebird support, I have the line

-firebird

in /etc/portage/profile/use.mask because the Firebird USE flag
of PHP was masked somewhen.

This worked without problems as long as Firebird (3.0) was in
the portage tree.

Now Firebird was completely removed from the portage tree.
So I installed Firebird (5.0) from its own homepage which
works without problems, too. I put the line

dev-db/firebird-5.0.1.1469

into /etc/portage/profile/package.provided. Not sure if this
was necessary, but apparently it doesn't harm...

...maybe except one point: Since then, revdep-rebuild always
reinstalls PHP (although it doesn't show any orphaned files).

The other/old revdep-rebuild.sh says, however,
"Dynamic linking on your system is consistent... All done."

I'd like to get the normal revdep-rebuild saying "everything
ok", too. So what's the correct way to deal with a manually
installed Firebird server while keeping the Firebird support
in PHP and not interfering with revdep-rebuild?

Thanks,

-Matt


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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-10 19:07 [gentoo-user] How to handle Firebird with PHP now Matthias Hanft
@ 2025-02-10 20:11 ` Michael
  2025-02-11  9:09   ` Matthias Hanft
  2025-02-14 13:29   ` Viorel Munteanu
  0 siblings, 2 replies; 9+ messages in thread
From: Michael @ 2025-02-10 20:11 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

On Monday 10 February 2025 19:07:07 Greenwich Mean Time Matthias Hanft wrote:
> Hi,
> 
> I have many Firebird databases on my Gentoo server.
> 
> To compile PHP with Firebird support, I have the line
> 
> -firebird
> 
> in /etc/portage/profile/use.mask because the Firebird USE flag
> of PHP was masked somewhen.
> 
> This worked without problems as long as Firebird (3.0) was in
> the portage tree.
> 
> Now Firebird was completely removed from the portage tree.
> So I installed Firebird (5.0) from its own homepage which
> works without problems, too. I put the line
> 
> dev-db/firebird-5.0.1.1469
> 
> into /etc/portage/profile/package.provided. Not sure if this
> was necessary, but apparently it doesn't harm...
> 
> ...maybe except one point: Since then, revdep-rebuild always
> reinstalls PHP (although it doesn't show any orphaned files).
> 
> The other/old revdep-rebuild.sh says, however,
> "Dynamic linking on your system is consistent... All done."
> 
> I'd like to get the normal revdep-rebuild saying "everything
> ok", too. So what's the correct way to deal with a manually
> installed Firebird server while keeping the Firebird support
> in PHP and not interfering with revdep-rebuild?
> 
> Thanks,
> 
> -Matt

According to http://gpo.zugaina.org/ firebird is provided by bgo-overlay.  I 
don't know if this overlay is checked by gentoo devs for the quality of its 
contents or not, but you could take a look.  Using an overlay will allow your 
system to know what files were installed by emerge.  I expect your 'revdep-
rebuild' behaviour will correct itself thereafter.

If the above overlay is not good, then you can create your own local overlay 
for this purpose.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-10 20:11 ` Michael
@ 2025-02-11  9:09   ` Matthias Hanft
  2025-02-11 10:02     ` Michael
  2025-02-14 13:29   ` Viorel Munteanu
  1 sibling, 1 reply; 9+ messages in thread
From: Matthias Hanft @ 2025-02-11  9:09 UTC (permalink / raw
  To: gentoo-user

Michael wrote:
> 
> According to http://gpo.zugaina.org/ firebird is provided by bgo-overlay.  I 
> don't know if this overlay is checked by gentoo devs for the quality of its 
> contents or not, but you could take a look.  Using an overlay will allow your 
> system to know what files were installed by emerge.  I expect your 'revdep-
> rebuild' behaviour will correct itself thereafter.

Thanks for the hint, but according to http://gpo.zugaina.org/Overlays/bgo-overlay/dev-db/firebird
there's just version 4.0 available; as I already installed version 5.0 from
https://www.firebirdsql.org/en/firebird-5-0#linux-x64 I don't want to downgrade.

I guess I could put some kind of "exceptions" into /etc/revdep-rebuild, but
I don't know what to configure in LD_LIBRARY_MASK and/or SEARCH_DIRS_MASK
as revdep-rebuild doesn't show any files and/or directories - it just
reinstalls PHP...

-Matt


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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-11  9:09   ` Matthias Hanft
@ 2025-02-11 10:02     ` Michael
  2025-02-11 16:30       ` Matthias Hanft
  0 siblings, 1 reply; 9+ messages in thread
From: Michael @ 2025-02-11 10:02 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]

On Tuesday 11 February 2025 09:09:55 Greenwich Mean Time Matthias Hanft wrote:
> Michael wrote:
> > According to http://gpo.zugaina.org/ firebird is provided by bgo-overlay. 
> > I don't know if this overlay is checked by gentoo devs for the quality of
> > its contents or not, but you could take a look.  Using an overlay will
> > allow your system to know what files were installed by emerge.  I expect
> > your 'revdep- rebuild' behaviour will correct itself thereafter.
> 
> Thanks for the hint, but according to
> http://gpo.zugaina.org/Overlays/bgo-overlay/dev-db/firebird there's just
> version 4.0 available; as I already installed version 5.0 from
> https://www.firebirdsql.org/en/firebird-5-0#linux-x64 I don't want to
> downgrade.
> 
> I guess I could put some kind of "exceptions" into /etc/revdep-rebuild, but
> I don't know what to configure in LD_LIBRARY_MASK and/or SEARCH_DIRS_MASK
> as revdep-rebuild doesn't show any files and/or directories - it just
> reinstalls PHP...
> 
> -Matt

Well, without knowing much at all about firebird, I understand it has a PHP 
extension.  I would think this sets up some reverse dependency symlinks, which 
revdep-rebuild finds by scanning /lib* directories and then wants to 
(re)install PHP.  Other than spending time rebuilding PHP, in itself it won't 
cause harm to your system.

Did you try running revdep-rebuild with the --debug --verbose --pretend 
options to see if it reveals the specific library objects affected?

Either way, since you probably intend to continue using firebird I suggest you 
consider if it is feasible to set up a local overlay to experiment with it.  
You could copy the ebuild for version 4.0 from the bgo-overlay, or the last 
firebird from portage attic and tweak it to make it compile and install on 
your system.

https://gitweb.gentoo.org/repo/gentoo.git/log/?qt=grep&q=firebird

Firebird was dropped from portage recently due to a lack of maintainer.  I 
appreciate it doesn't have the simplest of ebuilds, but if you become 
proficient in looking after your own ebuild, potentially with some advice from 
Gentoo devs, you could contribute your work for Firebird to return back to 
portage.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-11 10:02     ` Michael
@ 2025-02-11 16:30       ` Matthias Hanft
  2025-02-11 18:12         ` Michael Orlitzky
  0 siblings, 1 reply; 9+ messages in thread
From: Matthias Hanft @ 2025-02-11 16:30 UTC (permalink / raw
  To: gentoo-user

Michael wrote:
> 
> Did you try running revdep-rebuild with the --debug --verbose --pretend 
> options to see if it reveals the specific library objects affected?

Good idea:

[...]
 * Checking dynamic linking consistency
        analyse(), Searching for 15578 libs, bins within 17138 libraries and links
        LibCheck.__init__(), new searchlibs: ['32', '64']
        LibCheck.search(), Checking for broken 32 bit libs
        LibCheck.search(), Checking for broken 64 bit libs
        LibCheck.search(); FOUND: 64bit, libfbclient.so.2, /usr/lib64/php8.2/apache2/libphp8.so
        LibCheck.search(); FOUND: 64bit, libfbclient.so.2, /usr/lib64/php8.2/bin/php
        LibCheck.search(); Total found: 1 libs, 2 files in 791 milliseconds
 * Broken files that require: libfbclient.so.2 (64 bits)
        * /usr/lib64/php8.2/apache2/libphp8.so
        * /usr/lib64/php8.2/bin/php
        LibCheck.process_results(); total filepaths found: 2 in 1 milliseconds
 * Assign files to packages
        * /usr/lib64/php8.2/apache2/libphp8.so -> dev-lang/php-8.2.24
        * /usr/lib64/php8.2/bin/php -> dev-lang/php-8.2.24
        assign_packages(); assigned 1 packages, 0 orphans in 6469 milliseconds

As I understand it, both "libphp8.so" and "php" itself need "libfbclient.so.2".
But that does exist:

home01 /usr/lib64 # ls -l libfb*
lrwxrwxrwx 1 root root 32 Feb  9 11:11 libfbclient.so -> /opt/firebird/lib/libfbclient.so
lrwxrwxrwx 1 root root 34 Feb  9 11:11 libfbclient.so.2 -> /opt/firebird/lib/libfbclient.so.2
lrwxrwxrwx 1 root root 38 Feb  9 11:11 libfbclient.so.5.0.1 -> /opt/firebird/lib/libfbclient.so.5.0.1

home01 /usr/lib64 # ls -l /opt/firebird/lib
lrwxrwxrwx 1 root root      16 Aug  2  2024 libfbclient.so -> libfbclient.so.2
lrwxrwxrwx 1 root root      20 Aug  2  2024 libfbclient.so.2 -> libfbclient.so.5.0.1
-rwxr-xr-x 1 root root 2973336 Aug  2  2024 libfbclient.so.5.0.1

So, after re-emerging PHP, everything should be fine?!

home01 /usr/lib64/php8.2/apache2 # ldd libphp8.so  | grep libfb
        libfbclient.so.2 => /usr/lib64/libfbclient.so.2 (0x00007f434c0d3000)

home01 /usr/lib64/php8.2/bin # ldd php | grep libfb
        libfbclient.so.2 => /usr/lib64/libfbclient.so.2 (0x00007fe65f5ac000)

and actually PHP *does* wotk with Firebird.

I guess revdep-rebuild thinks "no portage ebuild contains libfbclient.so.2
which is needed by PHP, so let's just re-install PHP and hope for the best".
(Whereas the old "revdep-rebuild.sh" doesn't think so - strange, isn't it?)

I don't know portage (or revdep-rebuild) well enough to be able to say
'libfbclient.so.2 *is* available after all!'.

> Either way, since you probably intend to continue using firebird I suggest you 
> consider if it is feasible to set up a local overlay to experiment with it.  
> You could copy the ebuild for version 4.0 from the bgo-overlay, or the last 
> firebird from portage attic and tweak it to make it compile and install on 
> your system.
> https://gitweb.gentoo.org/repo/gentoo.git/log/?qt=grep&q=firebird

Hmmm... could be a solution indeed, but as long as it's just revdep-rebuild,
the pain threshold for an overlay and tinkering with the ebuild has not yet
been reached :-)

> Firebird was dropped from portage recently due to a lack of maintainer.  I 
> appreciate it doesn't have the simplest of ebuilds, but if you become 
> proficient in looking after your own ebuild, potentially with some advice from 
> Gentoo devs, you could contribute your work for Firebird to return back to 
> portage.

Unfortunately, I haven't got any clue how to build ebuilds - I'm just writing
application software. Regarding standard system software packages like Apache,
PHP, Firebird and all that, I'm just a dumb user as everyone else. Sorry!

-Matt


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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-11 16:30       ` Matthias Hanft
@ 2025-02-11 18:12         ` Michael Orlitzky
  2025-02-14 12:47           ` Matthias Hanft
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Orlitzky @ 2025-02-11 18:12 UTC (permalink / raw
  To: gentoo-user

On 2025-02-11 17:30:00, Matthias Hanft wrote:
> 
> Hmmm... could be a solution indeed, but as long as it's just revdep-rebuild,
> the pain threshold for an overlay and tinkering with the ebuild has not yet
> been reached :-)
> 

I think you are going to be stuck with revdep-rebuild issues
otherwise. Every installed file is associated with a package, and it's
that association that revdep-rebuild is probing when it decides that
PHP needs to be rebuilt. It thinks the firebird libs have been
upgraded and that PHP was linked to the old version because your
firebird libs aren't associated with any installed package. If that
were the case, rebuilding PHP would link it to the new libs and allow
the old ones to be cleaned up -- but for you it's just going to cause
PHP to be re-linked to the same libs that revdep-rebuild thinks are
orphaned.


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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-11 18:12         ` Michael Orlitzky
@ 2025-02-14 12:47           ` Matthias Hanft
  2025-02-15  3:11             ` Michael Orlitzky
  0 siblings, 1 reply; 9+ messages in thread
From: Matthias Hanft @ 2025-02-14 12:47 UTC (permalink / raw
  To: gentoo-user

Michael Orlitzky wrote:
> 
> I think you are going to be stuck with revdep-rebuild issues
> otherwise.

I succeeded in creating a file /etc/revdep-rebuild/98-firebird
with the line

LD_LIBRARY_MASK="libfbclient.so.2"

in it.  Then, revdep-rebuild says

[...]
 * Checking dynamic linking consistency
        analyse(), Searching for 15578 libs, bins within 17136 libraries and links
        LibCheck.__init__(), new searchlibs: ['32', '64']
        LibCheck.search(), Checking for broken 32 bit libs
        LibCheck.search(), Checking for broken 64 bit libs
        Library libfbclient.so.2 ignored as it is masked
        Library libfbclient.so.2 ignored as it is masked
        LibCheck.search(); Total found: 0 libs, 0 files in 789 milliseconds
        LibCheck.process_results(); total filepaths found: 0 in 0 milliseconds
Your system is consistent.

Hooray! :-)

-Matt


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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-10 20:11 ` Michael
  2025-02-11  9:09   ` Matthias Hanft
@ 2025-02-14 13:29   ` Viorel Munteanu
  1 sibling, 0 replies; 9+ messages in thread
From: Viorel Munteanu @ 2025-02-14 13:29 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1.1.1: Type: text/plain, Size: 685 bytes --]

La 10.02.2025 22:11, Michael a scris:
> According tohttp://gpo.zugaina.org/ firebird is provided by bgo-overlay.  I
> don't know if this overlay is checked by gentoo devs for the quality of its
> contents or not, but you could take a look.  Using an overlay will allow your
> system to know what files were installed by emerge.  I expect your 'revdep-
> rebuild' behaviour will correct itself thereafter.
>
> If the above overlay is not good, then you can create your own local overlay
> for this purpose.

This overly is generated from ebuilds uploaded by users to bugs to 
bugzilla (bugs.gentoo.org - hence the name bgo), see here 
http://bgo.zugaina.org/


Viorel


[-- Attachment #1.1.1.2: Type: text/html, Size: 1255 bytes --]

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 10083 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

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

* Re: [gentoo-user] How to handle Firebird with PHP now
  2025-02-14 12:47           ` Matthias Hanft
@ 2025-02-15  3:11             ` Michael Orlitzky
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Orlitzky @ 2025-02-15  3:11 UTC (permalink / raw
  To: gentoo-user

On 2025-02-14 13:47:56, Matthias Hanft wrote:
> Michael Orlitzky wrote:
> > 
> > I think you are going to be stuck with revdep-rebuild issues
> > otherwise.
> 
> I succeeded in creating a file /etc/revdep-rebuild/98-firebird
> with the line
> 
> LD_LIBRARY_MASK="libfbclient.so.2"
> 
> in it.

Nice, I didn't know about this.


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

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

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 19:07 [gentoo-user] How to handle Firebird with PHP now Matthias Hanft
2025-02-10 20:11 ` Michael
2025-02-11  9:09   ` Matthias Hanft
2025-02-11 10:02     ` Michael
2025-02-11 16:30       ` Matthias Hanft
2025-02-11 18:12         ` Michael Orlitzky
2025-02-14 12:47           ` Matthias Hanft
2025-02-15  3:11             ` Michael Orlitzky
2025-02-14 13:29   ` Viorel Munteanu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox