From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mdn8k-0003Z5-7w for mharc-grub-devel@gnu.org; Wed, 19 Aug 2009 11:31:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mdn8g-0003YX-Mi for grub-devel@gnu.org; Wed, 19 Aug 2009 11:31:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mdn8c-0003Y8-O3 for grub-devel@gnu.org; Wed, 19 Aug 2009 11:31:50 -0400 Received: from [199.232.76.173] (port=44451 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mdn8c-0003Xy-JE for grub-devel@gnu.org; Wed, 19 Aug 2009 11:31:46 -0400 Received: from xvm-190-8.ghst.net ([217.70.190.8]:55643 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mdn8b-00073Z-RW for grub-devel@gnu.org; Wed, 19 Aug 2009 11:31:46 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1Mdn8Z-0007Tm-45 for grub-devel@gnu.org; Wed, 19 Aug 2009 17:31:43 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1Mdn8Y-00028f-7O for grub-devel@gnu.org; Wed, 19 Aug 2009 17:31:42 +0200 Date: Wed, 19 Aug 2009 17:31:42 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090819153142.GF7859@thorin> References: <20090807121257.GA7839@thorin> <20090817140111.GO32551@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Reimplement 10_freebsd.in using 10_linux.in X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2009 15:31:50 -0000 On Mon, Aug 17, 2009 at 04:27:51PM +0200, Vladimir 'phcoder' Serbinenko wrote: > >> 1) stat and readlink are different. Does anyone have an idea how to > >> make scripts always use right syntax? > > > > AFAIK a custom autoconf snippet is the only way. > I would prefer it to be done on runtime if possible. Why? > >  Do you know how to reliably > > identify GNU-incompatible readlink? > Perhaps "readlink --version | head -n 1 |grep GNU" ? It's better to check for features, but if we have to check for vendor, there's _AC_PATH_PROG_FLAVOR_GNU. > > I'm not sure what "readlink -f /" will do > > on FreeBSD. > > > It complains about unknown option. Does it exit non-zero? Then the check is simple. > >> -  if path=`readlink -f $path` ; then : ; else > >> +  if path=`realpath $path` ; then : ; else > > > > Note that this introduces an external dependency on GNU systems (readlink is > > part of coreutils), which better be avoided (specially since the version of > > realpath commonly used there has a problematic license). > > > On FreeBSD it's a part of base system AFAIR. GNU readlink is available > through ports but is named greadlink. Perhaps we should try in script > first realpath and if it's not found try readlink? I was concerned about the other realpath, usually found in GNU/Linux distributions. Anyway, we could check greadlink, then readlink and then realpath. > >> 3) Version isn't detected correctly. > > > > Since this part is not in your patch, can you explain the problem? > > > I haven't looked in it but I guess the problem is that the kernel is > named just "kernel" with no version string. Oh, right. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."