From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx-out-1.rwth-aachen.de ([134.130.5.186]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1YPc2R-0006Fw-7c for ptxdist@pengutronix.de; Sun, 22 Feb 2015 20:18:00 +0100 Message-ID: <54EA2B60.6040506@rwth-aachen.de> Date: Sun, 22 Feb 2015 20:17:52 +0100 From: =?UTF-8?B?Q2hyaXN0b3BoIFLDvGRpZ2Vy?= MIME-Version: 1.0 References: <1E9AED858BEB204B9DE4F807C7ED0EF617CDD326@EMSRVWIN2934.apps.edc.thyssenkrupp.com> <20150222093847.GC1532@pengutronix.de> In-Reply-To: <20150222093847.GC1532@pengutronix.de> Subject: Re: [ptxdist] (no subject) Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1631209679==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de --===============1631209679== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2JE10QLiFLocFpJWkEhAdI2NaNldEnILl" --2JE10QLiFLocFpJWkEhAdI2NaNldEnILl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am 22.02.15 um 10:38 schrieb Michael Olbrich: >> What is the intention of this brace usage here? >=20 > It's valid bash syntax. A bit of history here: > The standard for sh shells says, that the file descriptors up to 9 can = be > used inside the shell scripts. So that's what we used originally: With > "5>&1" we create a file descriptor that we can later use to write to st= dout > when the normal stdout is redirected to the log file. > However this solution as a problem: oder scripts can use the same file > descriptor numbers and the output is send to the wrong place. This happ= ened > e.g. with configure scripts. So we changed it to: > "exec {PTXDIST_FD_STDOUT}>&1". This is valid in bash and means that a n= ew > file descriptor is opened (with a currently unused number >=3D 10) and > anything written to it is send to stdout. The file descriptor number is= > stored in the specified variable (PTXDIST_FD_STDOUT). Thank you very much for the explanation. I've never heard or read about this feature before. > I don't know why the bash in Max OS X cannot handle this. Maybe it's to= o > old? What version are you using? Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist for my day-to-day work. That's why I didn't took the version numbers into account. But I was wrong: Ubuntu 10.04.4: bash 4.1.5(1)-release OS X 10.9.5: bash 3.2.53(1)-release Just for completeness: The redirection feature with the optional left hand {var} notation was introduced in bash 4.1-alpha (see http://git.savannah.gnu.org/cgit/bash.git/tree/CHANGES#n1550). bash 4.1 was released on 31 Dec. 2009. :-) > Maybe something like this works: > exec 7>&1 > exec 8>&1 > export PTXDIST_FD_STDOUT=3D7 > export PTXDIST_FD_STDERR=3D8 I've installed a recent bash 4.3.33 via homebrew instead. But this is only part of the fix, because the ptxdist' scripts have a hardcoded shebang to /bin/bash. Additionally I needed to replace the Apple bash: # mv /bin/bash /bin/bash.apple # ln -s /usr/local/bin/bash /bin/bash Here is also a potential fix for the configure script to check for a proper bash version. I've never worked with autoconf, so please check the patch carefully. diff -urd a/configure.ac b/configure.ac --- a/configure.ac 2013-12-18 10:48:42.000000000 +0100 +++ b/configure.ac 2015-02-22 19:16:21.000000000 +0100 @@ -101,9 +101,9 @@ # though the result /could/ be available to us directly as $BASH_VERSION= we # don't want to use, or trust it, incase the user is specifying a differ= ent # bash executable. -if `$BASH -c '[[ "$BASH_VERSION" \< "2.04" ]]'` ; then +if `$BASH -c '[[ "$BASH_VERSION" \< "4.1" ]]'` ; then AC_MSG_ERROR([ -$PACKAGE_NAME requires at least version 2.04 of bash, you can download a current +$PACKAGE_NAME requires at least version 4.1 of bash, you can download a current version of bash from ftp.gnu.org ]) fi This problem seems to be solved now. I'm now facing the problem, that host-zlib is not getting compiled with the compiler setup in ptxdist setup. But this is part of another story coming soon. Best regards, Christoph --=20 Christoph R=C3=BCdiger Am Horber Wald 19 73765 Neuhausen phone: +49 - 7158 - 12 84 670 --2JE10QLiFLocFpJWkEhAdI2NaNldEnILl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJU6itlAAoJEJdnP/u6PpCkl24P/0jSJC3wIMd+0XynJWY9Q7IM appQXTAS+78eC3XZs1anqiD+4iHpyU9O2PugdJIxlg0zajjSBft1KPb4EHNXqOXs 6Ri5q6SESDCpd4oIQDWPrdU8fr26ayD/hNsy5C4QEaIVktz+o0nBjB95yDmdCdmk PKfUovadyGk56RPgPvDH70le3ObsU7y2GjEGDjBRptm2kEQQOiH2p+IZTjwYkD6O ECZBomDUbZ6DH1fNKHOiLBN5pZsl9CDMTTIv6FZX3gD+ASrv8wqC7HIVKIrtKa/Z 9Rm7OJp/buUI3WCYPrcu9b0fRAvvaWkOe+RhOr/cQ1V8jWnO2NoMSIsmxAEbO18t Wk03fqLMy5rNnCKhOubte7fS4gaq43ur6/y8BT22FaYXASfkfCValcMLIlWPEdvH kXKjb4LMFmBgiKlBt+ujgkiKdbp3sxtnoBW2K1JGh/LYAmbJVugMSeu8yO9xkZKG Qc4Lap0yOG+cAc/0vkHyOagot+YT2opQaEnfI+EUmB0ELKQh74t+Ti848QMgaf+S jFZgwHSfPhwKFDJfFB/cveSYbtEElO+XI4Hk0BzB3bvtetLSJfOap9B6gyLumUo9 sdbSPiyCvAaiWGem3M5JmW/FAlJ2NDo/druRffxuaIXTs27cItXivV0t2EfdN+y7 ADgIDknuOa5CMI8QfagU =8gQA -----END PGP SIGNATURE----- --2JE10QLiFLocFpJWkEhAdI2NaNldEnILl-- --===============1631209679== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============1631209679==--