v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
654 stars 58 forks source link

yad-settings doesn't work on systems with default shell being not bash #198

Closed cherio closed 1 year ago

cherio commented 1 year ago

I am experiencing this issue in ArchLinux with /bin/sh symlinked to dash.

yad-settings declares itself as a POSIX compatible shell script with shebang #!/bin/sh, however it looks like it is implemented to be bash specific. Since /bin/sh on any system is a symlink which can point to any POSIX compatible shell (it is not required and shouldn't be expected to point to bash), the shebang line should explicitly reference bash, for instance #!/usr/bin/env bash.

cherio commented 1 year ago

This was originally reported in Arch: https://bugs.archlinux.org/task/76501

v1cont commented 1 year ago

this looks like a bug in autotools. i'm not setting interpreter by hands but set it through AC_PATH_TOOL macro in configure

cherio commented 1 year ago

I am not an expert in packaging and assembly. I do see the source file yad-settings.in references bash

#! @BASH@
# -*- mode: sh -*-

however the distribution package in Arch contains the script with the first lines looking as

#! /bin/sh
# -*- mode: sh -*-

Do you think the problem is on the distribution (Arch) side? Should Arch build and packaging process change to generate correct shebang?

Sorry, as I said I am not an expert at this.

πŸ‡ΊπŸ‡¦πŸ‡ΊπŸ‡¦πŸ‡ΊπŸ‡¦

v1cont commented 1 year ago

i guess i'd fixed this in v12.1

cherio commented 1 year ago

Arch main repo already got the fix. Thank you!