• [gentoo-user] How to handle Firebird with PHP now

    From Matthias Hanft@21:1/5 to All on Mon Feb 10 20:10:01 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Mon Feb 10 20:11:58 2025
    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.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmeqXY4ACgkQseqq9sKV ZxlBQRAA2Gjf/aO5fw9hSAEBF8GzACbxdyxd3uKn1ajMIYaaLgLikXnSUf+id7U8 Dn3qRkj8Vg+2SLQCbnsV+drTVjYFuILkusYoHbrDCUjMTyUoiBh2R4Qesk964RpI bhoJd/D87Eh+nshOaFcDF5otRD1XYditFtkj2DFmVu7uG1lP25K0jGNVdH90KXuN tOD0G3sXcDd+DQuLLOwNuZFUGPdM5yjrirxMOhPyQRw2WE8XBnCqxDtkRHT4cE/l QblBpI2qjeYaFfcDeXgKRa9aLtbfumgjoU+sh0r3JWPQQGZKB44hCV+ZhrUUBjZC Yp37LTxZ2t7U7OB81/LkebYfDnEzn9hAT8PMM/8BXJgealq8W6u6xhZuMIVHZrVc rYqNnBYLbVzVOjS4vz8dswZIF2JUmMuEfQ2ILO81DlzJXlNCBoShSW4+ZoDF78y9 IFCVBHr7vHdN+rdfN0az3rbYZYht54QDVTqADWJA7fypEYD6hvOkEMdyyQFJlAJ9 e4eadkkvsFjqCXDrZDBv6X8opkeP4+V2DIeJDKP17jbWR86NCHp5dYgIIYNSXIKx JKI51DCp9m0RuRqwtrwMrmzTPZxbPpuZH4sG1lu3Yu0cmeSph492C7Kg3AqVqIo8 plP9h2+Mht0K3gtIEzaWP18bs1EUonOYL3ytM0KOkvzXEnhFxJs=
    =SCs6
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Tue Feb 11 10:02:52 2025
    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.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmerIEwACgkQseqq9sKV ZxncQA/+NwZLeO7YGuIo1emhlOZBOHGBXjT4FV3fhZoBXvFnT4F49qXJOdFJbRdK +zgjGC7Br3FBsXrYd2wVMjiF+CBnCcxXWh1Fs2XYBhv99v1KxWPyIujK70N7B24t OT0rAinDnV97lcqVLSuqRULd34joYom+dxIVo7+J09t11YbCT8qDRNeKLHbhwXuX J14oCCyfTHNqGupQCx/2cXK7YbjsYIfqYUgtwI5LTGocmM020ArGXr+vL67N5n3h 5BrcwKLM4FkP/L2oLnutXljNascBKBY3Txro2o2FybKEP0s4r74fZvrR3YVHSTMZ JT81cDIn/HlMpyZ6WLeEILbaX//f1cxOkQuydol59KT0FdLC9ODzzcDH5gKpudTH asvqFbBmywh1/Ge84BO43IIj+fx/NfM2JYlQlBLz8YhFgf5WoLedh/+MFch7ZoTP +a7a6wtg1sLqk0rjm1GYXSmnoMvktWd3KfZ8zmSTVwDEnRqPasJqkF42rDAN5r20 IxHlVBqoSpg/8o1gnYRjqIQ2fCeJrnZ9uK7qj7J+CA953FDZFOYqsH9eDnUD6TdT FQh7FGB8n65n2PMIbIvOgFTUG+hpAF2RVMlkgt3k7FtPM+U5Z53MW9AmYGME+AkZ ZOThGNWwPYZb49tKwGuq96mt2gtVd0oxm6NWoT5qmH0CPLnPAAA=
    =Zpo5
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthias Hanft@21:1/5 to Michael on Tue Feb 11 10:20:01 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthias Hanft@21:1/5 to Michael on Tue Feb 11 17:40:02 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Orlitzky@21:1/5 to Matthias Hanft on Tue Feb 11 19:20:01 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthias Hanft@21:1/5 to Michael Orlitzky on Fri Feb 14 13:50:01 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Orlitzky@21:1/5 to Matthias Hanft on Sat Feb 15 04:20:01 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)