RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1329181 - freeradius-python fix libpython2.7.so dependency at compile time
Summary: freeradius-python fix libpython2.7.so dependency at compile time
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: freeradius
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 7.3
Assignee: Nikolai Kondrashov
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-21 10:49 UTC by Nilesh Parmar
Modified: 2019-12-16 05:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 20:36:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1954 0 normal SHIPPED_LIVE freeradius bug fix and enhancement update 2017-08-01 18:29:54 UTC

Description Nilesh Parmar 2016-04-21 10:49:09 UTC
Description of problem:
freeradius-python fix libpython2.7.so dependency at compile time

Version-Release number of selected component (if applicable):
freeradius-python-3.0.4-6.el7

How reproducible:
Always

Steps to Reproduce:

1] install freeradius-python
2] Enable python module: 
    $ ln -s /etc/raddb/mods-available/python /etc/raddb/mods-enabled/
3] Run radiusd in debug mode:-
    $ radiusd -X


Actual results:
Fails loading python module

Expected results:
Load python module without error

Additional info:
 
https://github.com/FreeRADIUS/freeradius-server/blob/f4f26418724ee68e7bda8dbea989bc35479c4029/src/modules/rlm_python/rlm_python.c#L771

As per below code it seems it is expecting library version name should be in this format (libpythonpy_major.py_minor.so) but by default library available on system after install python library as a name "libpython2.7.so.1.0" so after install the Freeradius it needs to create symlink of libpython as freeradius code expects.


		python_dlhandle = dlopen("libpython" STRINGIFY(PY_MAJOR_VERSION) "." STRINGIFY(PY_MINOR_VERSION) ".so", RTLD_NOW | RTLD_GLOBAL);


freeradius installation code needs to create symlink from libpython as below
ln -sf /usr/lib64/libpython2.7.so.1.0 /usr/lib64/libpython2.7.so

Comment 4 Nikolai Kondrashov 2016-04-25 17:12:57 UTC
Thank you for the report, Nilesh.

This is indeed is a problem. However, adding such a symlink in the freeradius-python package is the wrong solution. This symlink belongs to the python-devel package, and the actual workaround would be installing that package.

Meanwhile I submitted a patch upstream fixing this issue another way:
https://github.com/FreeRADIUS/freeradius-server/pull/1592

Let's see what upstream replies.

Comment 5 Nikolai Kondrashov 2016-04-25 18:20:52 UTC
Sorry, reset the qa_ack accidentally (not sure how that happened).
Patrik, could you please restore it? Thank you.

Comment 8 Nikolai Kondrashov 2017-02-15 17:47:52 UTC
Upstream wasn't interested in taking the fix. If we are to fix this, we'll need to carry a patch to generated configure files ourselves, which is far from optimal. Provided there is a workaround of installing the python-devel package, I suggest we close this as WONTFIX. Anyone against?

Comment 9 Nikolai Kondrashov 2017-02-16 08:51:34 UTC
Going to try to convince upstream again after consulting with others. Perhaps we can still get this in.

Comment 10 Jaroslav Aster 2017-02-16 09:33:18 UTC
Hi Nikolai,

yes, this workaround works, I have tested it, but I think it is not correct that base package depends on devel package. Convince upstream is better way :-). I suggest keep this bug open for now.

Comment 11 Nikolai Kondrashov 2017-02-28 12:32:38 UTC
Upstream has accepted my fix. Jaroslav, Patrik, please consider ACK'ing.

The test would be trivial:
1. Make sure python-devel package is not installed and/or there is no
   "/usr/lib64/libpython2.7.so" file, or similar unversioned library.
2. Start FreeRADIUS.
3. Test passes if python modules work and/or the log doesn't contain the
   following or similar message:

    Failed loading libpython symbols into global symbol table:
    libpython2.7.so: cannot open shared object file: No such file or directory

Comment 15 errata-xmlrpc 2017-08-01 20:36:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1954


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