Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#67942 closed defect (fixed)

py310-absl @1.4.0: metadata files are installed without world readable permissions

Reported by: snowflake (Dave Evans) Owned by: emcrisostomo (Enrico Maria Crisostomo)
Priority: Normal Milestone:
Component: ports Version: 2.8.99
Keywords: Cc: jmroot (Joshua Root)
Port: py-absl

Description

These ports are building OK on the buildbots, but I've noticed in the last few day that there are many failures building them on my local machines, which run macOS 10.11.6 and 13.4.1.

Ports which are failing are py38-acme py39-automat py310-bcrypt py310-beautifulsoup4 py39-pikepdf. There are many more. I tried deleting all my Python ports and reinstalling them from source, but it made no difference. Not all ports fail.

Many of the failures report this error:

PermissionError: [Errno 13] Permission denied: '/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/absl_py-1.4.0-py3.10.egg-info/PKG-INFO'

The file site-packages/absl_py-1.4.0-py3.10.egg-info/PKG-INFO is owned by the py-absl port, which is not the port being built. There's no good reason why the build is trying to access this file during the build phase.

How to repeat:

sudo port clean py310-bcrypt
sudo port -s build py310-bcrypt

Attachments (1)

py-err.log (9.7 KB) - added by snowflake (Dave Evans) 15 months ago.
Last 100 lines of the log

Download all attachments as: .zip

Change History (6)

Changed 15 months ago by snowflake (Dave Evans)

Attachment: py-err.log added

Last 100 lines of the log

comment:1 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Does the problem go away if you uninstall the py310-absl port?

comment:2 Changed 15 months ago by jmroot (Joshua Root)

Owner: changed from jmroot to emcrisostomo
Port: py-absl added; python removed
Summary: Many Python ports are failing to build locally where Python versions are 3.8 or 3.9 or 3.10py310-absl @1.4.0: metadata files are installed without world readable permissions

There is a long-standing requirement/bug (depending who you ask) of the pkg_resources module installed by setuptools that means that the metadata of all installed modules has to be readable by all users that may use pkg_resources. See e.g. #56279, #52687. Until and unless someone fixes pkg_resources to handle unexpected permissions better, all we can do is fix the permissions in all python module ports (and fortunately we want those files to be world readable anyway.)

comment:3 in reply to:  1 Changed 15 months ago by snowflake (Dave Evans)

Replying to ryandesign:

Does the problem go away if you uninstall the py310-absl port?

Yes it does. I uninstalled all the py*-absl ports and it worked. I'm currently reinstalling all the ports I deleted and it's looking very promising. Results will be known in a couple of hours.

The reason I did not have a problem with py311-absl is that I never had it installed in the first place. The reason all the ports were building on the buildbots is that they always build with only the required ports installed.

I don't have a rational explanation as to why py*-absl was breaking the build, but I notice it was last updated 2023-07-30 14:16:47 +0100, which is about the time my builds started failing.

comment:4 Changed 15 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In f0de87b17ab948f76be5fc81a4caca80778a2ab3/macports-ports (master):

py-absl: enable pep517 build

As well as the usual benefits, this avoids permissions issues with the
metadata files that can break pkg_resources.

Fixes: #67942

comment:5 Changed 15 months ago by jmroot (Joshua Root)

Cc: jmroot added
Note: See TracTickets for help on using tickets.