[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2014-08-04 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Alasdair Macdonald alasdairgmacdon...@gmail.com changed:

   What|Removed |Added

 CC||alasdairgmacdon...@gmail.co
   ||m

--- Comment #12 from Alasdair Macdonald alasdairgmacdon...@gmail.com ---
I encountered this problem in the context of an imagemagick command for
creation of thumbnails on a Synology NAS.

The NAS has /bin/ash by default, linked to busybox. But it doesn't have bash.

Without /bin/bash, the following command fails because of references to
/bin/bash in includes/GlobalFunctions.php:

/bin/bash '/path/to/limit.sh' ''\''/usr/bin/convert'\'' -version'
'MW_INCLUDE_STDERR=;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200;
MW_FILE_SIZE_LIMIT=10 2400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'

error is:
-ash: /bin/bash: not found

I've simplified subsequent commands to show only the imagemagick command and
not the MW_ settings.


If I test ash instead of bash:
/bin/ash '/path/to/limit.sh' ''\''/usr/bin/convert'\'' -version'

error is:
/path/to/limit.sh: line 33: syntax error: bad substitution
So, ash [busybox] doesn't like my limit.sh.

After linking /bin/bash to /bin/ash or to /bin/busybox the error changes:
/bin/bash '/path/to/limit.sh' ''\''/usr/bin/convert'\'' -version'

error is:
/path/to/limit.sh: bash: applet not found
So, busybox still doesn't like limit.sh.

If I try to execute limit.sh directly:
/path/to/limit.sh ''\''/usr/bin/convert'\'' -version'

error is:
.sh: not found
(because, I think, my limit.sh has references to /bin/bash)

Of course there is a solution in my case and it is easy to apply, although it
would not have been as simple if I didn't have bash already available in /opt,
and even more problematic if I weren't able to add bash at all:
ln -s /opt/bin/bash  /bin/bash

However it doesn't seem right to me that /bin/bash should be assumed to be
present. When I only had this error to work on -ash: /bin/bash: not found, I
thought that the answer must be a MediaWiki configuration setting for the
shell. Something like wgShell. Perhaps that would have security implications.

This isn't a solution for my environment:

echo $SHELL
/bin/ash

because of the aforementioned limitations of ash / busybox.

The only other global solution that I can think of is to test for various
possible shells, one after the other. In which case the sequence for testing
may matter, perhaps breaking environments that currently work.



(In reply to Platonides from comment #7)
 The current problem seems to be /bin/bash, hardcoded in
 includes/GlobalFunctions.php and in the recursive call through
 /usr/bin/timeout
 
 Although wfShellExec() is only calling limit.sh on Linux (It has been like
 that since the stone age (r11789) but the basic limit features should work
 on other *nix).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2014-08-04 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

--- Comment #13 from Bawolff (Brian Wolff) bawolff...@gmail.com ---
Re comment 12: starting in 1.24 we will use bourne shell if bash is
unavailable.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2014-06-21 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Mark A. Hershberger m...@everybody.org changed:

   What|Removed |Added

 CC||m...@everybody.org
   Target Milestone|1.21.x release  |---

--- Comment #11 from Mark A. Hershberger m...@everybody.org ---
Removing target milestone that was in the past.

If you want this in a specific release, have a good reason AND you are willing
to find resources to fix this bug, feel free to change it to something
appropriate.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2014-06-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Bawolff (Brian Wolff) bawolff...@gmail.com changed:

   What|Removed |Added

 CC||bawolff...@gmail.com

--- Comment #9 from Bawolff (Brian Wolff) bawolff...@gmail.com ---
I was just talking to a user on irc who's using busybox, which doesn't have
bash installed.

We should probably be checking if /bin/bash is executable (Sometimes bsds might
have bash), instead of checking if linux.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2014-06-19 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

--- Comment #10 from Bawolff (Brian Wolff) bawolff...@gmail.com ---
semi-related patchset https://gerrit.wikimedia.org/r/#/c/140880/

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2014-04-29 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Derk-Jan Hartman hartman.w...@gmail.com changed:

   What|Removed |Added

 CC||hartman.w...@gmail.com
   Assignee|dereck...@espace-win.org|wikibugs-l@lists.wikimedia.
   ||org

--- Comment #8 from Derk-Jan Hartman hartman.w...@gmail.com ---
Resetting assignee.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2014-02-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Nemo federicol...@tiscali.it changed:

   What|Removed |Added

 Status|PATCH_TO_REVIEW |NEW
 CC||federicol...@tiscali.it

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-07-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Andre Klapper aklap...@wikimedia.org changed:

   What|Removed |Added

   Keywords|patch-in-gerrit |
 Status|ASSIGNED|PATCH_TO_REVIEW

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-05-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Nemo federicol...@tiscali.it changed:

   What|Removed |Added

   Target Milestone|1.21.0 release  |1.21.x release

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-04-09 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

--- Comment #7 from Platonides platoni...@gmail.com ---
What's the status of this bug with the new includes/limit.sh ?

The current problem seems to be /bin/bash, hardcoded in
includes/GlobalFunctions.php and in the recursive call through /usr/bin/timeout

Although wfShellExec() is only calling limit.sh on Linux (It has been like that
since the stone age (r11789) but the basic limit features should work on other
*nix).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-03-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

--- Comment #5 from Andre Klapper aklap...@wikimedia.org ---
(In reply to comment #4)
 Gerrit change #47559 will do the job, replacing ulimit5.sh by a new script.
 This change is still to be improved to solve issues raised in this bug.

The patch was merged.

Dereckson: The remaining issues are what is listed as In a second step, we
should see: in comment 0 here? In case you don't plan to work on them, feel
free to reset the assignee and ASSIGNED status.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-03-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Platonides platoni...@gmail.com changed:

   What|Removed |Added

 CC||platoni...@gmail.com

--- Comment #6 from Platonides platoni...@gmail.com ---
includes/limit.sh checks that /usr/bin/timeout exists and is executable before
using it. Otherwise it simply runs the command without enforcing the wall clock
limit. So not really a problem.
Feel free to suggest where to document it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-02-06 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

--- Comment #4 from Dereckson dereck...@espace-win.org ---
Gerrit change 47045 abandoned.

Gerrit change 47559 will do the job, replacing ulimit5.sh by a new script. This
change is still to be improved to solve issues raised in this bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-02-05 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Andre Klapper aklap...@wikimedia.org changed:

   What|Removed |Added

   Keywords||patch-in-gerrit
   Priority|Unprioritized   |Normal

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-02-01 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

--- Comment #3 from Dereckson dereck...@espace-win.org ---
[ Documentation note to add ]

Our extension uses the timeout command, part of the GNU core utilities.

On BSD systems, you have to install the coreutils package to make this command
available. If not, limits defined by the extension code will be ignored.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-01-31 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

Dereckson dereck...@espace-win.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #1 from Dereckson dereck...@espace-win.org ---
[ Taking this bug. ]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 44568] bin/ulimit5.sh isn't UNIX compliant

2013-01-31 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=44568

--- Comment #2 from Dereckson dereck...@espace-win.org ---
Gerrit change 47045

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l