Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 669254

Summary: app-emulation/docker-18.06.1 installs init script with bashisms
Product: Gentoo Linux Reporter: Nico R. <n-roeser>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED FIXED    
Severity: normal CC: mrueg, zlogene
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nico R. 2018-10-21 22:43:45 UTC
app-emulation/docker-18.06.1 installs /etc/init.d/docker which includes calls to ulimit:

  ulimit -n 1048576

and

  ulimit -u unlimited


There is a QA notice issued when the package is emerged:

 * QA Notice: shell script appears to use non-POSIX feature(s):
 *    possible bashism in /etc/init.d/docker line 17 (ulimit):
 *      ulimit -n 1048576
 *    possible bashism in /etc/init.d/docker line 21 (ulimit):
 *      ulimit -u unlimited

And the ulimit -u call causes an error (which is ignored) when the init script is run:

# rc-service docker start
docker            |/lib/rc/sh/openrc-run.sh: 21: ulimit: Illegal option -u
docker            | * Starting docker ...
# 


/bin/bash is a symlink to dash on this system, and the dash man page documents ulimit -n, but not ulimit -u. The bash man page lists ulimit -n and ulimit -u.
Comment 1 Nico R. 2018-10-27 07:50:16 UTC
> /bin/bash is a symlink to dash on this system,

Sorry. Of course, I didn’t mean /bin/bash, but /bin/sh:
/bin/sh -> dash
Comment 2 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-01-17 08:04:23 UTC
this has been fixed.