From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: build-aux/git-hooks/pre-push Date: Tue, 02 May 2023 13:55:02 +0800 Message-ID: <874jove0qx.fsf@yahoo.com> References: <875y9cef96.fsf.ref@yahoo.com> <875y9cef96.fsf@yahoo.com> <871qk0ef2g.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="898"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 02 07:56:18 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptizp-000AaD-Uy for ged-emacs-devel@m.gmane-mx.org; Tue, 02 May 2023 07:56:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptiz5-0004zx-1q; Tue, 02 May 2023 01:55:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptiyq-0004wK-CO for emacs-devel@gnu.org; Tue, 02 May 2023 01:55:21 -0400 Original-Received: from sonic304-20.consmr.mail.ne1.yahoo.com ([66.163.191.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptiyn-0003Hn-Pt for emacs-devel@gnu.org; Tue, 02 May 2023 01:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683006910; bh=oWB4+uPmPtvQUJkjUF73mZSQLcLeajHgQIwrfRsYv20=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=ieM3YJVo/Kd5Clw4qJrqBvURzjnTgN5BubQEL005AXOuBULuv796Hvau32+lwQfhKCI8ZUCZEV1KllO5kiMCDXOk2ofiasmHNLptwfkTtdkFJZK3ocwfE605lcr+8TscsGvxPdN8I/D+s8ayDdCPIvOAcmYS/8AbJieSJHy/tHelxJkXw0vYMTXXkuS85z0TGSclyrbIQZl7Jh2+kyFtrajjCpBKjxNbMlWhElsWvYuCZJadCYhPr1EkoTqmQFAvoXgEJ5nV5HVBgj8o1BOuvpf+ZOMdqVyuSEDl38SshDd1ax8aoIaxhIfSEYZ8qxX9pc7OkSpgWEHtEhSlfFUMyw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683006910; bh=xHPgAJus9bl3OVVAcqGSnG6APxGwoo4+uCpqskHYsT4=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=X4i9x2GfjMYxR7EdYA6Ss1vpfnYYlu0xNpyNyPyytQ6QwPb9vGyLXqra8iprNzHp6XA+JePSIZjdJjbt0Y0S/QeO7b3GHkNPn+zAjRthZE+oOOyPMn8f7QHxBOMfWRmZkEhrkQfa8YJH1vLIeMbdIoaf1ZzivQiLq1qRJqztmXlEEWdDVINaQq+1iAMcVdReItgIillCoJThG8geVcb1XdoWA/BfMo+Xr2PHJcAQkqgjoBmPjUWAqDcWbOK+/7sQFvW/y4fpbPLLL/vQk+m2x+XvAMlA0gE+gkSC/9yQIrBiIXgq1tNA0dJEZOfdBBK1dL5IXS6AUFK39Sel9Tahcg== X-YMail-OSG: Gdsbd4MVM1kFlKMQztP5qXObVy8pPnvLERiA6LROcYa5Me0ohJni1dwxuZBFDMq mtM_ZP0v4q3HRiexsu5dRwqUioN6x0jPNyNubhWjRUIw3XriU6UfmyxxpxJE1TqKU_mh720Xa_eY W8biXro638qs93VM1qcr3YBwwjv0GiX5OQhUKjFBTEuGbcnprMyWs.MwE8TOHEXFOf0bP2tiCrZx sULu0HAxexNGw2nD8JAJj6B3AX12AKsuV9PCM6B4Zsu.tFt_5Xa10na8ihxx2WTBlnQkwA4ho9Yw BXbA.2xGMFMdMNn1Gsg_P1DGjYo5aU6SJ9vCxYKD7r8k.TKvcL9kJX3tvRj2e1.hpXNuDyxd88YZ 12del567diY1g9Ifc7.1ZruE9cV2x7jLmU561TTs1nkOBtiEhEoOw67NHcDmFZEjabJm8mu64vIG KmOWtixWb33aXoPmFPJWagawPhgP_IcuMwhfujP4uQZ84XMtdNAx12qKGq28lTU7NEdSOIbac9WX 9LcL8ttJ54Cnifir2XekDRkZjjUFP5.OocreyCsooDRa8CuqRV.DWYA32orkaa5ASWCwvNu.E5I. GdkRaQbFX5b7EqExKDIbmQnFKTRwobhEW8RI24DajfEADRrpAah_dDbck7oTdUaqEHTf.WFsMUEM cUlBTJExLf3imP84FzVuxRZXNhCk6HF.cJ0vypL7AtpF2Xhwjx_xzL0CXnsi8ffF5ymxMPksUBd7 YV3FUT5c1C25Md_YOTPaihCLHvG47jPWCa6vqdTfFFlcIWq4jL7qRqmAvCc2vd6TuZc8VY5zY2w3 HVSBAHKQ3vScm7TpCRBZcRxHIJDyGBedtEJEPa4WKo X-Sonic-MF: X-Sonic-ID: e1234d9d-708b-4ba9-bbb3-306f0ad66554 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Tue, 2 May 2023 05:55:10 +0000 Original-Received: by hermes--production-sg3-6d6fb994f6-qwzcd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3e666660786dc98e9416f097d637530b; Tue, 02 May 2023 05:55:06 +0000 (UTC) In-Reply-To: (Jim Porter's message of "Mon, 1 May 2023 22:35:23 -0700") X-Mailer: WebService/1.1.21417 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.191.146; envelope-from=luangruo@yahoo.com; helo=sonic304-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305747 Archived-At: Jim Porter writes: > On 4/30/2023 11:33 PM, Po Lu wrote: >> Btw, I notice that the script falls back to awk if gawk cannot be found. >> Maybe in that case, the awk script should be rewritten to not utilize >> getline, sub, function, and other features which do not work with Unix >> awk? Or maybe it should try harder to find a POSIX awk? > > I'm not sure the best way to do it, but I think trying to find a POSIX > awk would be the simplest solution. Hmm, ok. Unfortunately for some reason the most reliable way to do that I can think of would be to generate the script with Autoconf... and that leads to a chicken-egg problem, since the hook is installed from autogen.sh. Perhaps we could simply look for: - /usr/xpg4/bin/awk - mawk - nawk in that order, and not run the script at all if a suitable awk can't be found. > That awk script isn't *terribly* complex, but it uses enough POSIX awk > features that I wouldn't want to try and make it work with UNIX awk > (even if I knew exactly how to do that). `(autoconf)Limitations of Usual Tools' describes the limitations of Unix awk.