From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id C51616DE0207 for ; Wed, 30 Jan 2019 13:06:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.2 X-Spam-Level: X-Spam-Status: No, score=-0.2 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U2Z9EZsx8br4 for ; Wed, 30 Jan 2019 13:06:29 -0800 (PST) Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by arlo.cworth.org (Postfix) with ESMTPS id 706E26DE01E1 for ; Wed, 30 Jan 2019 13:06:29 -0800 (PST) Received: by mail-vk1-f193.google.com with SMTP id j23so235757vke.13 for ; Wed, 30 Jan 2019 13:06:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=ESKVZCdL0d+6CQfDV/0dzqpoLCzpSsJYgK/UQmCvQ+E=; b=qTsB+WIBr586D/3q1LWXSV0vFICCiE3twF8uaziGhVzyjaUw+AUOSDiW2jrN4MzxY8 JudtsDOVlROA9W7sMetbC6EWFAu0Ihu6zb/CFw8DnQALSZQeXGc6fqn+X/SjTqn26ggn SCul9+i8loaUzrBCZD11JS4UkMk9EbYP8L93IvPlV/b6TeQpmwB9X+zq0fST4GTGsGfG c7IiCJdCcCm1PRrLSegqj26cnVgjFu7s+MC7Fk/uevh1ygMlKwvaNK6WB6d3lztpsbqg 4B6gZ1YeVnUDqCIFtfPE/raBxD9mTC9RrLqHL2aYJDy4WpEuFLjbDHCBiilL4+FZQJf/ Rwzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=ESKVZCdL0d+6CQfDV/0dzqpoLCzpSsJYgK/UQmCvQ+E=; b=cG3PQGwPe/cdICGbM46yhtT0sM+ktyzj3wAWg9+yGwKwwRIwqj65YTUn5LBABEM0LT nmEnS7R9L//VsiDp94+L68zrVurj/GUHgOxu6OYXg9wZExbo0CK8IoolDr5MEuYG0u0T bE0RgB042AWZn56cCxQOnXgVnWGYPIC0Ce50zXHaovMFpQtomHucPP/whMBs7cWJ0jTf uFFlP7mJfgbvKnLX/wYfATV9eBvnoA49j1DmeBROlnH/c4uUsJ6kYQYwAEqfcfiFBLAc d1a3awVrn2eN8apZeLM21VxZG9PhC2GtTTHF/NOTruhAmnMxIONhaEI9tEwn14eKkJaX yebQ== X-Gm-Message-State: AHQUAuYaDKM+1HDm4kE/eHuqH22FSol6fC9331oJeKMJK9k9mvj9BDir ybGblKtZmod1oIaLyGzFIw8= X-Google-Smtp-Source: AHgI3Iaz8o2Trn/dPFEXg65cuSHoCzZedFT+2BlfqekCu5BheCPuUQtMxl0ww7oSRkdEgPjCw7HT1w== X-Received: by 2002:a1f:e7c5:: with SMTP id e188mr2826303vkh.92.1548882386288; Wed, 30 Jan 2019 13:06:26 -0800 (PST) Received: from localhost ([103.199.39.230]) by smtp.gmail.com with ESMTPSA id b131sm3280422vkf.45.2019.01.30.13.06.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jan 2019 13:06:25 -0800 (PST) From: Danh Doan To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] configure: resolve real path to bash In-Reply-To: <87imy6kk5n.fsf@tethera.net> References: <20190118144354.29052-1-congdanhqx@gmail.com> <87imy6kk5n.fsf@tethera.net> Date: Thu, 31 Jan 2019 04:06:18 +0700 Message-ID: <87womln9dh.fsf@congdanhqx.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Thu, 31 Jan 2019 14:45:36 -0800 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2019 21:06:30 -0000 David Bremner writes: > =C4=90o=C3=A0n Tr=E1=BA=A7n C=C3=B4ng Danh writes: > >> The old code somehow resolves to `bin/sh' on Arch Linux/Void Linux >> auto build systems. >> > > I'm not sure if this is better or worse than > > https://nmbug.notmuchmail.org/nmweb/show/20190117021132.28327-1-david= %40tethera.net Sorry for the noise, I somehow couldn't find your patch at that time. And I only recognized readlink(1) is not POSIX after sending the patch. I wonder if it's better to keep `/usr/bin/env bash` instead of resolving bash to specific file. Something like this: diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 04913a06..2252e818 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -117,7 +117,6 @@ endif install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)" mkdir -p "$(DESTDIR)$(prefix)/bin/" ifeq ($(HAVE_BASH),1) - sed "1s|^#!.*|#! $(BASH_ABSOLUTE)|" < $(emacs_mua) > $(DESTDIR)$(prefix)/= bin/notmuch-emacs-mua chmod 755 $(DESTDIR)$(prefix)/bin/notmuch-emacs-mua endif ifeq ($(WITH_DESKTOP),1) > > I welcome input on this. > > One issue is that readlink(1) is not in POSIX, so we can expect some > portability pains. > > d --=20 Danh