Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.1 & 6.2: t/29unreadable.t tests fail when run as root #27

Closed
veryrusty opened this issue Oct 25, 2024 · 7 comments · Fixed by #28
Closed

6.1 & 6.2: t/29unreadable.t tests fail when run as root #27

veryrusty opened this issue Oct 25, 2024 · 7 comments · Fixed by #28

Comments

@veryrusty
Copy link

It's not uncommon to have perl modules installed by root in docker images, especially for one-off, quick tasks. Doing so causes the unreadable files tests to fail in releases 6.1 and 6.2.

eg docker run --rm -ti perl:5.38 bash -c 'cpanm Module::Pluggable; cat /root/.cpanm/work/*/build.log'

and the root user can read the write-only files:

#   Failed test at t/29unreadable.t line 31.
#     Structures begin differing at:
#          $got->[0] = 'Unreadable::Foo'
#     $expected->[0] = Does not exist

#   Failed test at t/29unreadable.t line 36.
#     Structures begin differing at:
#          $got->[0] = 'Unreadable::Foo'
#     $expected->[0] = Does not exist
# Looks like you failed 2 tests of 6.
t/29unreadable.t .............
veryrusty added a commit to PerlDancer/Dancer2 that referenced this issue Oct 30, 2024
Module::Pluggable added checks for unreadable files in v6.1 and v6.2.
Those tests fail when installed as root, which may happen in a docker
file, such as under github actions.

While we have no explicit dependency on Module::Pluggable, our
dependencies do, such as Config::Any.

This is a bit of a crutch until Module::Plugable is patched.
Upstream issue: simonwistow/Module-Pluggable#27
veryrusty added a commit to PerlDancer/Dancer2 that referenced this issue Oct 30, 2024
Module::Pluggable added checks for unreadable files in v6.1 and v6.2.
Those tests fail when installed as root, which may happen in a docker
file, such as under github actions.

While we have no explicit dependency on Module::Pluggable, our
dependencies do, such as Config::Any.

This is a bit of a crutch until Module::Plugable is patched.
Upstream issue: simonwistow/Module-Pluggable#27
cromedome pushed a commit to PerlDancer/Dancer2 that referenced this issue Oct 30, 2024
Module::Pluggable added checks for unreadable files in v6.1 and v6.2.
Those tests fail when installed as root, which may happen in a docker
file, such as under github actions.

While we have no explicit dependency on Module::Pluggable, our
dependencies do, such as Config::Any.

This is a bit of a crutch until Module::Plugable is patched.
Upstream issue: simonwistow/Module-Pluggable#27
@veryrusty
Copy link
Author

@simonwistow anything we can do to help resolve this ?
eg making a PR from @michal-josef-spacek patch from 156367

@firefart
Copy link

firefart commented Nov 2, 2024

For cross reference https://rt.cpan.org/Public/Bug/Display.html?id=156367

gmcharlt pushed a commit to evergreen-library-system/Evergreen that referenced this issue Nov 4, 2024
Installing in Docker as root we can run into an issue with installing
the dependency for Email::Send (Module::Pluggable)

Issue described here:
simonwistow/Module-Pluggable#27

Release-note: Fix installation issue in docker containers.

Signed-off-by: blake <[email protected]>
Signed-off-by: Jane Sandberg <[email protected]>
gmcharlt pushed a commit to evergreen-library-system/Evergreen that referenced this issue Nov 4, 2024
Installing in Docker as root we can run into an issue with installing
the dependency for Email::Send (Module::Pluggable)

Issue described here:
simonwistow/Module-Pluggable#27

Release-note: Fix installation issue in docker containers.

Signed-off-by: blake <[email protected]>
Signed-off-by: Jane Sandberg <[email protected]>
gmcharlt pushed a commit to evergreen-library-system/Evergreen that referenced this issue Nov 4, 2024
Installing in Docker as root we can run into an issue with installing
the dependency for Email::Send (Module::Pluggable)

Issue described here:
simonwistow/Module-Pluggable#27

Release-note: Fix installation issue in docker containers.

Signed-off-by: blake <[email protected]>
Signed-off-by: Jane Sandberg <[email protected]>
gmcharlt pushed a commit to evergreen-library-system/Evergreen that referenced this issue Nov 4, 2024
Installing in Docker as root we can run into an issue with installing
the dependency for Email::Send (Module::Pluggable)

Issue described here:
simonwistow/Module-Pluggable#27

Release-note: Fix installation issue in docker containers.

Signed-off-by: blake <[email protected]>
Signed-off-by: Jane Sandberg <[email protected]>
@level420
Copy link

level420 commented Nov 5, 2024

@simonwistow It would be very kind to have PR #28 merged and a new version published on cpan. Thank you in advance.

@firefart
Copy link

@simonwistow any update on this?

@maaarghk
Copy link

@simonwistow pls :')

@matthewf-ucsd
Copy link

I would also like to express my hope that this PR can be merged. I'm adding:

RUN cpanm Module::Pluggable::Object --force

... as a workaround in my Dockerfile in the meantime, but it feels dirty to force a test

@davewood
Copy link

davewood commented Jan 9, 2025

would be nice to see this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants