Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 760869 - net-irc/irker: uses bashisms in rc script
Summary: net-irc/irker: uses bashisms in rc script
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam James
Keywords: PATCH
Depends on:
Blocks: nonbash
  Show dependency tree
Reported: 2020-12-20 11:54 UTC by Sam James
Modified: 2021-03-11 06:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

gentoo-bug-760869.patch (gentoo-bug-760869.patch,3.84 KB, patch)
2020-12-20 13:37 UTC, Kerin Millar
Details | Diff
gentoo-bug-760869-r1.patch (gentoo-bug-760869-r1.patch,3.89 KB, patch)
2020-12-20 15:09 UTC, Kerin Millar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester gentoo-dev Security 2020-12-20 11:54:22 UTC
$ sudo /etc/init.d/irkerd start
/lib/rc/sh/ 16: [[: not found
/lib/rc/sh/ 23: [[: not found
/lib/rc/sh/ 27: [[: not found
/lib/rc/sh/ 28: [[: not found
/lib/rc/sh/ 29: [[: not found
/lib/rc/sh/ 30: [[: not found
 * Starting irkerd ...
Comment 1 Kerin Millar 2020-12-20 13:37:58 UTC
Created attachment 678927 [details, diff]

Address bug 760869, along with a few other quality issues.
Comment 2 Kerin Millar 2020-12-20 13:51:30 UTC
One more thing. The following two commands serve no purpose and can be removed. The subsequent tests do not depend on them being set.

: "${IRKERD_NICK:=}"
Comment 3 Sam James archtester gentoo-dev Security 2020-12-20 14:54:06 UTC
I don’t know what I’ve done to deserve a comprehensive patch for my own bug within so little time of filing it, but a huge thank you!

I’ll look at it properly and apply it soon as I’m currently Bugzillaing-via-phone. Could you include the GCO sign off too? (sorry)
Comment 4 Kerin Millar 2020-12-20 15:09:10 UTC
Created attachment 678936 [details, diff]
Comment 5 Larry the Git Cow gentoo-dev 2021-03-11 06:12:22 UTC
The bug has been closed via the following commit(s):

commit 57c3b63a002a67aad884624fc89fe57c50e94eb5
Author:     Kerin Millar <>
AuthorDate: 2021-03-11 06:11:12 +0000
Commit:     Sam James <>
CommitDate: 2021-03-11 06:11:12 +0000

    net-irc/irker: remove bashisms from init script
    Quote the ${parameter:=word} expansions (SC2223), while removing two
    that are spurious.
    Remove the -z test which does absolutely nothing. It can never be true,
    because IRKERD_USER will always contain something. As an aside, the
    "nobody" account is not intended for running services. If ever the test
    is re-instated, it should be carried out _before_ checkpath is invoked,
    for reasons that should be obvious.
    Remove the use of the [[ keyword in favour of the POSIX test command
    Employ a vastly improved method of conveying the user-specified options.
    Obviously, POSIX sh doesn't support arrays so we must still perform
    word-splitting upon IRKERD_OPTS. However, potential pathname expansion
    can still be suppressed with set -f, so let's do that.
    Next, proceed to assemble a list of positional parameters using the set
    builtin. This completely eliminates the possibility for word-splitting
    and pathname expansion to be performed upon the other IRKERD_*
    variables, instead conveying them verbatim. Note that the start function
    is altered to define a ( ... ) compound command, so that the effects of
    set -f do not persist beyond the intended scope of the function.
    Signed-off-by: Kerin Millar <>
    Signed-off-by: Sam James <>

 net-irc/irker/files/irkerd.confd |  4 ++--
 net-irc/irker/files/irkerd.initd | 29 ++++++++++++-----------------
 2 files changed, 14 insertions(+), 19 deletions(-)