Bug 1326227 - apxs creates symlink to libphp
Summary: apxs creates symlink to libphp
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: httpd
Version: httpd24
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.4
Assignee: Luboš Uhliarik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-12 08:21 UTC by Ondřej Pták
Modified: 2019-09-26 12:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-26 12:55:33 UTC
Target Upstream Version:


Attachments (Terms of Use)
part of reproducer: minimal module (787 bytes, text/plain)
2016-04-12 08:21 UTC, Ondřej Pták
no flags Details

Description Ondřej Pták 2016-04-12 08:21:36 UTC
Created attachment 1146286 [details]
part of reproducer: minimal module

Description of problem:
Building httpd module with apxs tool generates symlink to php (for example from php55 collection), even if module don't need php.
This is nothing serious, but I can see no reason why apxs should create such symlink.

Version-Release number of selected component (if applicable):
httpd24-httpd-devel-2.4.18-7

How reproducible:
always

Steps to Reproduce:
requires: httpd24-httpd-devel, php55-php
1. ls -l /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp*
2. apxs -ci mod_dummy.c
3.

Actual results:
1)
-rwxr-xr-x. 1 root root 4353016 Jun 10  2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so
3)
-rwxr-xr-x. 1 root root 4353016 Jun 10  2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so
lrwxrwxrwx. 1 root root      16 Apr 12 04:11 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp5.so -> libphp55-php5.so

Expected results:
1)
-rwxr-xr-x. 1 root root 4353016 Jun 10  2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so
3)
-rwxr-xr-x. 1 root root 4353016 Jun 10  2015 /opt/rh/httpd24/root/usr/lib64/httpd/modules/libphp55-php5.so

Additional info:

Comment 1 Joe Orton 2017-03-31 07:16:33 UTC
The reasons are that:

a) apxs runs instdso.sh to install the module DSO, which runs libtool --mode=install, which runs "ldconfig -n" on the directory after copying.

b) libphp*.so is installed with a different filename to the module SONAME.

# readelf -d /opt/rh/httpd24/root/usr/lib64/httpd/modules/librh-php70-php7.so | grep SONAME
 0x000000000000000e (SONAME)             Library soname: [libphp7.so]

... so ldconfig creates a symlink from libphp7.so to librh-php70-php7.so

Remi. I don't suppose that (b) is trivial to fix?

We could probably work around (a) as well, e.g by preventing libtool running ldconfig somehow (not clear how), but it seems low priority, I'm going to defer this.

Comment 2 Joe Orton 2017-03-31 07:17:08 UTC
Actually CC'ing Remi for question in comment 1.

Comment 3 Joe Orton 2017-03-31 07:19:47 UTC
I suppose in theory somebody could depend on the ldconfig behaviour to create the "right" module name to reference in LoadModule.  I'm a bit reluctant to touch this to maybe break something, probably we should fix this in Fedora first and see what happens.

Comment 10 Joe Orton 2019-09-26 12:55:33 UTC
I can't see any way around this without major surgery to libtool to not run ldconfig for modules, which seems correct but overkill.


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