Broken executable-in-var (was: Announcing my new old repository)

Bart van Strien <[email protected]>
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <[email protected]>
On 01/08/15 15:00, Thomas Leonard wrote:
> Presumably it can't find gpg for some reason. This might give a clue:
>
> $ 00install run -w'strace -f -e process'
> http://0install.net/2007/interfaces/FeedLint.xml
> http://0install.bartbes.com/love.xml

So turns out this is related to a problem I had earlier, worked around 
and promptly forgot about. On my system the stubs generated by 
executable-in-var are broken. I first came across this when packaging 
kotlin (http://0install.bartbes.com/kotlin.xml), but apparently that's 
causing this gpg failure in feedlint, too.

Here's the contents on the generated 'ZEROINSTALL_GPG' file:

    #!/home/bartbes/.cache/0install.net/implementations/sha256new_YEPNC3CZ7CVC6ZJNS3PALMWAOKPHLKZP65KLLNICQ5HYFRDOKTNQ/files/0install
    runenv


I never quite figured out why it doesn't work, but it doesn't. An error 
I saw whilst running kotlin either truncated the command in the message, 
or truncated the command trying to run it, so it may be related to the 
long file path.

For JAVACMD, I manually changed the file to the following, after which 
it worked fine:

    #!/bin/sh
    exec
    /home/bartbes/.cache/0install.net/implementations/sha256new_YEPNC3CZ7CVC6ZJNS3PALMWAOKPHLKZP65KLLNICQ5HYFRDOKTNQ/files/0install
    runenv JAVACMD "$@"


Maybe the script generation file should emit that instead? Possibly with 
a basename call, like this:

    #!/bin/sh
    exec
    /home/bartbes/.cache/0install.net/implementations/sha256new_YEPNC3CZ7CVC6ZJNS3PALMWAOKPHLKZP65KLLNICQ5HYFRDOKTNQ/files/0install
    runenv $(basename "$0") "$@"


Which, as far as I can tell, is valid syntax in POSIX sh (and I tested 
this with bash4/bash3/zsh/dash), so it should be perfectly portable. I 
just replaced the ZEROINSTALL_GPG's file contents with what I just 
suggested and feedlint now works fine (and fails on a redirect instead...).

Regards,

Bart van Strien

------------------------------------------------------------------------------

_______________________________________________
Zero-install-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/zero-install-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.