Re: shepherd-action debug help needed

2023-10-31 Thread Attila Lendvai
> Exit code 127 means "command not found". [1] More information is
> available in stderr (or sometimes stdout) if you can capture it.

but how come binaries are not found when i have the full path for the 
commands...?

the install binary is only used to set the umask of the result. without it, a 
simple invokation of tar also fails, even without --gzip.

i dug a bit deeper, and it turned out that the SYSTEM call i thought was coming 
from guile was rebound by shepherd to point to its own SPAWN-SHELL-COMMAND. 
through various complex code paths, it ends up calling fork+exec-command. 
SPAWN-SHELL-COMMAND's role is to make the SYSTEM call non-blocking.

as a quick test, i have added a simple (system "ls -l /bin/sh") call to my 
action, and that fails, too.

i'll need to add proper logging to shepherd and see what's going wrong. but for 
that i need https://issues.guix.gnu.org/61750 merged.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Justice is not concerned with the results of the various transactions, but 
only with whether the transactions themselves are fair.”
— F.A. Hayek (1899–1992), 'Law, Legislation and Liberty', I.6.j




Re: shepherd-action debug help needed

2023-10-30 Thread Development of GNU Guix and the GNU System distribution.
Hi Attila,

On Mon, Oct 30 2023, Attila Lendvai wrote:

> 2023-10-30T14:24:12 Cmd returned exit code 127

Exit code 127 means "command not found". [1] More information is
available in stderr (or sometimes stdout) if you can capture it.

Another option would be to forgo the shell magic in (system cmd-string)
and reimplement that call using system*, open-pipe* and friends. The
"install" step could become a Guile loop over the file names. The
deconstruction might likewise help you pinpoint the command that fails
because the executable was not found.

Kind regards
Felix

[1] https://linuxconfig.org/how-to-fix-bash-127-error-return-code