You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute permissions of resources files in a module are lost when installed.
Context
I package SAT solvers as %?RESOURCES with my modules. They are executables built with Build.pm which my modules exist to provide an interface to.
The Problem
I use for instance Proc::Async.new: :w, %?RESOURCES<minisat>, |@args to invoke the minisat solver. The module builds and tests fine but does not work anymore once installed:
$ perl6 t/01-samples.t
1..2
1..72
An operation first awaited:
in method solve at /home/tab/src/perl6/rakudo/install/share/perl6/site/sources/0C6C12ACC2FF2F74FEEE89C23438C489D9C6B45F (SAT) line 22
in sub sat-ok at /home/tab/src/perl6/rakudo/install/share/perl6/site/sources/429246F12FAEA55B204C2F99094A7AB4E03AF6DB (Test::SAT) line 32
in block at t/01-samples.t line 18
in sub subtest at /home/tab/src/perl6/rakudo/install/share/perl6/sources/2D4A7CA10695CD2B374573413D261A660E282E2A (Test) line 415
in sub subtest at /home/tab/src/perl6/rakudo/install/share/perl6/sources/2D4A7CA10695CD2B374573413D261A660E282E2A (Test) line 405
in block <unit> at t/01-samples.t line 13
Died with the exception:
Tried to get the result of a broken Promise
in block at /home/tab/src/perl6/rakudo/install/share/perl6/site/sources/02823F56C44CDD021467DA2B1C3B5196EF4628DB (SAT::Solver::MiniSAT) line 56
Original exception:
permission denied
in block at /home/tab/src/perl6/rakudo/install/share/perl6/site/sources/02823F56C44CDD021467DA2B1C3B5196EF4628DB (SAT::Solver::MiniSAT) line 56
# Looks like you planned 72 tests, but ran 0
The permission denied error boils down to missing execute permissions on the installed minisat program.
Workaround
I currently set the owner's execute bit when the module is loaded:
BEGIN sink with %?RESOURCES<minisat>.IO { .chmod: 0o100 +| .mode };
History
I issued this as ugexe/zef#280 where ugexe suggested that my workaround is a bad idea and
As for rakudo, it seems like distribution META6.json would have to be able to contain file meta data ( because it cannot be assumed a Distribution IO is backed by a filesystem at all ), and that CompUnit::Repository::Installation ( CURI ) would have to be able to understand and act upon it in ( in a cross-platform manner no less ).
The text was updated successfully, but these errors were encountered:
Execute permissions of
resourcesfiles in a module are lost when installed.Context
I package SAT solvers as
%?RESOURCESwith my modules. They are executables built with Build.pm which my modules exist to provide an interface to.The Problem
I use for instance
Proc::Async.new: :w, %?RESOURCES<minisat>, |@argsto invoke theminisatsolver. The module builds and tests fine but does not work anymore once installed:The
permission deniederror boils down to missing execute permissions on the installedminisatprogram.Workaround
I currently set the owner's execute bit when the module is loaded:
History
I issued this as ugexe/zef#280 where ugexe suggested that my workaround is a bad idea and
The text was updated successfully, but these errors were encountered: