Bug 2106536 - Azote entrypoint script fails to find python library path
Summary: Azote entrypoint script fails to find python library path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: azote
Version: 36
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Bob Hepple
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-12 21:59 UTC by James Harmison
Modified: 2022-07-23 01:59 UTC (History)
1 user (show)

Fixed In Version: azote-1.9.5-2.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-14 00:34:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description James Harmison 2022-07-12 21:59:37 UTC
Description of problem:
Azote's executable is a shell script that uses a python one-liner to identify the python purelib path. This one-liner has not been updated in accordance with the following guidance:
https://docs.fedoraproject.org/en-US/fedora/latest/release-notes/developers/Development_Python/#_sysconfig_get_pathkey_returns_paths_with_local

Version-Release number of selected component (if applicable):
1.9.5-1.fc36

How reproducible:
Always

Steps to Reproduce:
1. Install azote
2. Attempt to start azote from the terminal (or otherwise)

Actual results:
```
$ azote
/usr/bin/azote: line 4: cd: /usr/local/lib/python3.10/site-packages/azote: No such file or directory
/usr/bin/python3: can't open file '/home/james/Projects/home-infra/main.py': [Errno 2] No such file or directory
```

Expected results:
Azote should start


Additional info:
```
$ cat $(which azote)
#!/usr/bin/sh

LIB=$(python3 -Ic "from sysconfig import get_path; print(get_path('purelib'))")
cd $LIB/azote
exec /usr/bin/python3 main.py "$@"
```

It should be as simple as a patch to change the `get_path` call to include the `rpm_prefix` scheme.

Comment 1 James Harmison 2022-07-13 18:56:34 UTC
I've never contributed to dist-git for Fedora before so I may have messed something up, but mockbuilds for rawhide and f36 work fine with my patch in the pull requests I opened.

https://src.fedoraproject.org/rpms/azote/pull-requests

I don't think upstreaming would be appropriate as these changes related to Fedora-specific packaging of Python libraries.

Comment 2 James Harmison 2022-07-13 18:59:36 UTC
Additionally, I have this to offer showing a functional program with these changes:

https://mattermost.jharmison.com/files/ne8y3a5yn7y68dtkn4jkgh4xrc/public?h=raz4M6e2UXhtnDTeVzoU6H7axcYrzklXd63l-vYMxz4

Comment 3 Fedora Update System 2022-07-14 00:31:13 UTC
FEDORA-2022-1f006fb7e7 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1f006fb7e7

Comment 4 Bob Hepple 2022-07-14 00:34:44 UTC
Thanks - merged and built. Please give it a test run on f36. You can find an RPM at https://koji.fedoraproject.org/koji/taskinfo?taskID=89477524

Comment 5 Fedora Update System 2022-07-15 01:20:08 UTC
FEDORA-2022-1f006fb7e7 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-1f006fb7e7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-1f006fb7e7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 James Harmison 2022-07-15 15:30:45 UTC
Apologies for the delay @bob.hepple

https://mattermost.jharmison.com/files/6t9dewhc47f9jdhfhiggiqyq7y/public?h=G6yruz7mz4dS6sAa2PwMz8AyT10GVLh79ZSpBeRgjjQ

Works fine, just normal Azote bugs left to clean up upstream now. Thanks.

Comment 7 Bob Hepple 2022-07-19 02:39:56 UTC
Ping.

Apparently bugzilla requires an answer to this, even though it's closed. So here it is!

Thanks for testing it out.

Comment 8 Fedora Update System 2022-07-23 01:59:22 UTC
FEDORA-2022-1f006fb7e7 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


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