From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MDbeO-0005G8-FG for garchives@archives.gentoo.org; Mon, 08 Jun 2009 10:00:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 468B0E0327; Mon, 8 Jun 2009 10:00:19 +0000 (UTC) Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by pigeon.gentoo.org (Postfix) with ESMTP id C327BE032D for ; Mon, 8 Jun 2009 10:00:18 +0000 (UTC) Received: from [10.44.2.150] (host81-149-27-23.in-addr.btopenworld.com [81.149.27.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTPSA id 59DF627B14 for ; Mon, 8 Jun 2009 11:00:17 +0100 (BST) Message-ID: <4A2CE12E.70609@marples.name> Date: Mon, 08 Jun 2009 11:00:14 +0100 From: Roy Marples User-Agent: Thunderbird 2.0.0.21 (X11/20090521) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Detecting Baselayout2/OpenRC from init.d scripts (summary of debate and plans from bug 270646) References: <20090607195950.GI22927@orbis-terrarum.net> <18988.14596.869442.77191@a1ihome1.kph.uni-mainz.de> <4A2C46AB.4050607@marples.name> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: ba444921-cea2-4bcb-bffa-0d4f3f834a45 X-Archives-Hash: d1798848de15b93af340999e08c4a143 Robin H. Johnson wrote: > On Mon, Jun 08, 2009 at 12:00:59AM +0100, Roy Marples wrote: >>> Roy: [[ or [? >> Entirely depends on system. >> OpenRC uses /bin/sh to process the actual init script. We rely on /bin/sh >> claiming POSIX compat [1]. On Gentoo Linux systems, this is normally a link >> to bash, so you can use bashisms if you so wish. > Is "[[" a bashism or not? That's all I'm asking. > What's a good way to test for POSIX compatibility so that the testing > CAN actually be done. My testcase was 'bash --posix'. Testing under > busybox's ash seems to work perfectly with "[[" as well. bash(1) only documents the --posix option to modify how bash starts up. It does not mention restricting bash extensions such as [[ IIRC vapier patched busybox to alias [[ to [, which is worse as you still have to quote correctly as if [ and you don't get the =~ operator from [[. > >> But as you asked, here's what the good doc [1] has to say >> The following words may be recognized as reserved words on some >> implementations (when none of the characters are quoted), causing >> unspecified results: >> [[ ]] function select >> In other words, I won/t make any claims whether [[ ]] works in OpenRC. > That doesn't answer if it's a bashism. I interpret that part of the > document to simply be that it's implementation detail is not covered by > the POSIX spec. If it's not in the spec, then it has to be an extension. Thus, if bash is extending it then it's a bashism. > I'm all for going with something that will work more globally, IFF it > can be easily tested for (on pure Gentoo Linux machines, which is what > most developers are running, because they won't be bothered to test > under G/FBSD or Prefix/OSX etc), vs. just going by what the > specification says. The only available shell on Linux that doesn't do anything other than the POSIX spec is dash. However, even that shell is not entirely compliant (a few missing features last I looked). >> Just Do What The Fuck You Like, Just Don't Bug Me pretty much somes up my >> attitude right now. Why do I have this attiude? Well, bug #175783 is a very >> good example. It's over two years since I submitted replacement scripts and >> did more besides. It's just like the courier-imap fiasco when >> baselayout-1.12 was touted for stable, but this time I Just Don't Care. > There hasn't been any release of the mysql-init-scripts in 2 years. > It's not that anything contrary to your opinions has been done on that > bug, it's more that I haven't have any specific need to fix that package > yet. Other than the need to actually allow mysql to work on Gentoo/FreeBSD. Ah, you've already said that you don't want to run anything other than Linux. Fine, that's your choice, but please hand mysql over to someone who cares about Gentoo running on alternative OS's as you've just demonstrated you just don't care. Thanks Roy