Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Detecting Baselayout2/OpenRC from init.d scripts (summary of debate and plans from bug 270646)
Date: Mon, 08 Jun 2009 00:12:01
Message-Id: robbat2-20090607T235729-602758906Z@orbis-terrarum.net
In Reply to: Re: [gentoo-dev] Detecting Baselayout2/OpenRC from init.d scripts (summary of debate and plans from bug 270646) by Roy Marples
1 On Mon, Jun 08, 2009 at 12:00:59AM +0100, Roy Marples wrote:
2 >> Roy: [[ or [?
3 > Entirely depends on system.
4 > OpenRC uses /bin/sh to process the actual init script. We rely on /bin/sh
5 > claiming POSIX compat [1]. On Gentoo Linux systems, this is normally a link
6 > to bash, so you can use bashisms if you so wish.
7 Is "[[" a bashism or not? That's all I'm asking.
8 What's a good way to test for POSIX compatibility so that the testing
9 CAN actually be done. My testcase was 'bash --posix'. Testing under
10 busybox's ash seems to work perfectly with "[[" as well.
11
12 > But as you asked, here's what the good doc [1] has to say
13 > The following words may be recognized as reserved words on some
14 > implementations (when none of the characters are quoted), causing
15 > unspecified results:
16 > [[ ]] function select
17 > In other words, I won/t make any claims whether [[ ]] works in OpenRC.
18 That doesn't answer if it's a bashism. I interpret that part of the
19 document to simply be that it's implementation detail is not covered by
20 the POSIX spec.
21
22 > Franky, I've given up on trying to enforce anything POSIX related over
23 > something else (like say GNU or implementation extensions over an accepted
24 > standard). I just don't care. I used to, but developer and user backlash
25 > (see the archives) was just too much for me and was one of the resaons why
26 > I retired from Gentoo.
27 I'm all for going with something that will work more globally, IFF it
28 can be easily tested for (on pure Gentoo Linux machines, which is what
29 most developers are running, because they won't be bothered to test
30 under G/FBSD or Prefix/OSX etc), vs. just going by what the
31 specification says.
32
33 > Just Do What The Fuck You Like, Just Don't Bug Me pretty much somes up my
34 > attitude right now. Why do I have this attiude? Well, bug #175783 is a very
35 > good example. It's over two years since I submitted replacement scripts and
36 > did more besides. It's just like the courier-imap fiasco when
37 > baselayout-1.12 was touted for stable, but this time I Just Don't Care.
38 There hasn't been any release of the mysql-init-scripts in 2 years.
39 It's not that anything contrary to your opinions has been done on that
40 bug, it's more that I haven't have any specific need to fix that package
41 yet. That bug there also raised the openrc detection issue. I hadn't
42 read the comments in it for nearly a year now.
43
44 --
45 Robin Hugh Johnson
46 Gentoo Linux Developer & Infra Guy
47 E-Mail : robbat2@g.o
48 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85

Replies