MantisBT - Doomseeker
View Issue Details
0003518Doomseeker[All Projects] Bugpublic2018-09-24 19:292018-10-27 22:54
0003518: /bin/bash is not portable for running Zandronum testing from Doomseeker; this doesn't work with OpenBSD's base operating system
/bin/bash is not POSIX-portable. This means running Zandronum testing binaries requires installing bash as a package, or manually changing Doomseeker's generated #!/bin/bash shell scripts to use a POSIX sh interpreter #!/bin/sh (or equivalent).

Changing Doomseeker's script generation code from #!/bin/bash to #!/bin/sh should remain compatible with bash and POSIX sh.
src/plugins/zandronum/zandronumbinaries.cpp creates the script.

// Create Unix script file
content  = "#!/bin/bash\n";

For this issue to occur in practice:

  1. Zandronum engine plugin needs to be loaded in Doomseeker.
  2. In Configuration (F5) → Zandronum, "Testing Releases" needs to be enabled and a valid path (configured correctly).
  3. A server running a testing release of Zandronum must be available in Doomseeker's server browser.
  4. The directory for Zandronum testing releases must be void of the specific Zandronum testing release run on the server, to download the release and (more importantly) generate the shell script to run this testing release from Doomseeker.
  5. The user must not have bash installed in their operating system (in example, from OpenBSD ports).
  6. Joining the Zandronum testing release server fails due to lack of bash dependency, unless /bin/bash is somehow symlinked to /bin/sh or another shell. (It isn't by default, and doesn't make much sense to do so.)
Not sure if this is a bug or a suggestion. The suggestion is "Remove /bin/bash dependency from Zandronum testing binary shell scripts", and this is the bug behind it.

I make assumptions Zandronum can be run on OpenBSD, and bash is not available on the operating system (although it is available as a package to install by the superuser/system administrator on OpenBSD).

OpenBSD uses Korn shell (ksh), which is POSIX sh compatible with additions.
No tags attached.
related to 0003499assigned Pol M Port Doomseeker to OpenBSD 
patch 0001-Use-POSIX-sh-scripts-for-Zandronum-testing-releases.patch (1,157) 2018-09-29 15:42
Issue History
2018-09-24 19:29WubTheCaptainNew Issue
2018-09-24 19:32WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11961#r11961
2018-09-24 19:35WubTheCaptainRelationship addedchild of 0003499
2018-09-24 19:36WubTheCaptainRelationship replacedrelated to 0003499
2018-09-24 19:41ZalewaStatusnew => acknowledged
2018-09-24 19:42WubTheCaptainAdditional Information Updatedbug_revision_view_page.php?rev_id=11963#r11963
2018-09-24 19:44WubTheCaptainAdditional Information Updatedbug_revision_view_page.php?rev_id=11964#r11964
2018-09-24 20:13WubTheCaptainSeverityminor => tweak
2018-09-29 07:11Blzut3Note Added: 0019804
2018-09-29 07:11Blzut3Target Version => 1.2
2018-09-29 15:30WubTheCaptainAssigned To => WubTheCaptain
2018-09-29 15:30WubTheCaptainStatusacknowledged => assigned
2018-09-29 15:37WubTheCaptainFile Added: 0001-Use-POSIX-sh-scripts-for-Zandronum-testing-releases.patch
2018-09-29 15:37WubTheCaptainNote Added: 0019824
2018-09-29 15:37WubTheCaptainStatusassigned => needs review
2018-09-29 15:42WubTheCaptainFile Deleted: 0001-Use-POSIX-sh-scripts-for-Zandronum-testing-releases.patch
2018-09-29 15:42WubTheCaptainFile Added: 0001-Use-POSIX-sh-scripts-for-Zandronum-testing-releases.patch
2018-09-29 15:43WubTheCaptainNote Added: 0019825
2018-09-30 07:05Blzut3Note Added: 0019837
2018-09-30 07:05Blzut3Statusneeds review => resolved
2018-09-30 07:05Blzut3Fixed in Version => 1.2
2018-09-30 07:05Blzut3Resolutionopen => fixed
2018-10-27 22:54WubTheCaptainStatusresolved => closed

2018-09-29 07:11   
This is a trivial change so setting target to 1.2.
2018-09-29 15:37   
Patch attached, patch by me, needs testing if merged (not sure if this is all that's required).
2018-09-29 15:43   
Reattached patch with an additional commit message paragraph explaining /bin/sh can be symlinked somewhere else, and that's fine too.
2018-09-30 07:05   
Merged and verified on Linux. [^]