Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 340175 - net-mail/courier-imap-4.8.0: convert init.d to POSIX shell
Summary: net-mail/courier-imap-4.8.0: convert init.d to POSIX shell
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 270662 484694 (view as bug list)
Depends on:
Blocks: 609070
  Show dependency tree
 
Reported: 2010-10-08 17:35 UTC by Alec Moskvin
Modified: 2017-02-12 15:34 UTC (History)
4 users (show)

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


Attachments
Patch to remove bashisms from the init-scripts (courier-imap-bashisms-fix.patch,3.66 KB, patch)
2010-10-08 17:38 UTC, Alec Moskvin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Moskvin 2010-10-08 17:35:58 UTC
OpenRC is shell-agnostic, and so it should not be assumed that the shell executing init-scripts is bash - only POSIX constructions should be there.

Reproducible: Always
Comment 1 Alec Moskvin 2010-10-08 17:38:03 UTC
Created attachment 249962 [details, diff]
Patch to remove bashisms from the init-scripts
Comment 2 SpanKY gentoo-dev 2010-10-09 21:20:27 UTC
POSIX compliance is not a requirement.  it's up to the maintainer to include it.

please do not cc people yourself.  let the wranglers take care of it.
Comment 3 Alec Moskvin 2010-10-10 01:16:50 UTC
(In reply to comment #2)
> POSIX compliance is not a requirement.  it's up to the maintainer to include
> it.

I think it's a perfectly valid bug if OpenRC tries to run bash scripts with /bin/sh ("the POSIX shell").

If the init-scripts are assumed to be written in bash, then it should run them with bash. And if the scripts are supposed to POSIX-compliant, then they shouldn't contain bash-specific features.

So either way, it's either a bug in the init-scripts or in OpenRC. Am I wrong in my thinking?
Comment 4 Toralf Förster gentoo-dev 2013-09-12 19:57:45 UTC
*** Bug 484694 has been marked as a duplicate of this bug. ***
Comment 5 rraneiendiarendiraendiaend 2015-06-20 17:50:41 UTC
(In reply to SpanKY from comment #2)
> POSIX compliance is not a requirement.  it's up to the maintainer to include
> it.

Why isn't it a requirement? If I understood correctly the goal of the gentoo project is maximum customization. The fact that many shell scripts (ebuilds, init scripts, etc) rely on non-POSIX-shell functionality actually reduces choices.

For instance, I would not like to use bash as /bin/sh but currently I can't replace bash because many init scripts (e.g hostname or courier-imap) rely on a bunch of bashisms (which sucks a lot). Another thing I would like to do is replace coreutils with busybox (see bug 60805) but you can't do that either since many shell scripts used by gentoo also rely on gnuisms (which sucks as well).

So in my opinion POSIX compliance should be a requirement, why isn't it?
Comment 6 Pacho Ramos gentoo-dev 2016-08-09 08:54:13 UTC
*** Bug 270662 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Savchenko gentoo-dev 2017-02-12 13:00:49 UTC
Alec, thanks, patch is applied in the tree.
Comment 8 Alec Moskvin 2017-02-12 15:34:20 UTC
That was fast, thanks! :P