Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#64523 - [devtools] offload-build expects a posix compliant shell on the server

Attached to Project: Arch Linux
Opened by Filipe Laíns (FFY00) - Friday, 15 November 2019, 22:17 GMT
Last edited by morganamilo (morganamilo) - Tuesday, 19 November 2019, 05:15 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Pierre Schmitz (Pierre)
Levente Polyak (anthraxx)
Eli Schwartz (eschwartz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:


Steps to reproduce:
- Change shell to a non posix compliant shell (ex. fish) in the target server

This task depends upon

Comment by Filipe Laíns (FFY00) - Friday, 15 November 2019, 22:19 GMT
This got submitted before I finished writing.

Description:
In line 94 of offload-build we ssh into the target server and run a set of posix commands. If the default shell is not posix compliant this will fail.

Steps to reproduce:
- Change shell to a non posix compliant shell (ex. fish) in the target server
- Invoke offload-build
Comment by Eli Schwartz (eschwartz) - Sunday, 17 November 2019, 00:21 GMT
I'm not sure what to say about this, since attempting to write a fish-compliant script would surely result in it not being compatible with POSIX shells either. Should we also try to support powershell? How should we detect "the remote server uses X shell" anyway?

When I write scripts, I write them to expect a POSIX environment specifically because it is meant to be portable. This includes things which are intended to be sourced into, say, /etc/profile in order to use it... or in this case, run via ssh. I'm not sure it makes sense to try to support everyone's unconventional personal shell outside of that?

My understanding is this shortcoming is known and expected by fish users, who therefore start fish by execing it in their .bashrc.
Comment by morganamilo (morganamilo) - Tuesday, 19 November 2019, 05:07 GMT
Maybe you can run everything through /bin/sh? Seems as the system's shell should always be posix, regardless of the user's.
Comment by Eli Schwartz (eschwartz) - Tuesday, 19 November 2019, 05:13 GMT
No. ssh is already running a complex command via, essentially, /bin/bash -c '....' or in the reporter's case, /bin/fish -c '....', and running

/bin/fish -c '/bin/sh -c "...."'

is not really going to help anything, but it will be nightmarish to try to get quoting right.

Loading...