From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Set also the group of installed files Date: Thu, 21 Jun 2018 17:27:28 +0200 Message-ID: <23339.50144.819516.554832@a1i15.kph.uni-mainz.de> References: <23339.46790.117747.841207@a1i15.kph.uni-mainz.de> <83sh5gqjh6.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1529594744 4480 195.159.176.226 (21 Jun 2018 15:25:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2018 15:25:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 21 17:25:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fW1St-000115-HH for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 17:25:39 +0200 Original-Received: from localhost ([::1]:56073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW1Uz-0007BL-0v for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 11:27:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW1Uq-00079n-1F for emacs-devel@gnu.org; Thu, 21 Jun 2018 11:27:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW1Up-000392-7L for emacs-devel@gnu.org; Thu, 21 Jun 2018 11:27:40 -0400 Original-Received: from dev.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:44885 helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fW1Uk-00036z-RH; Thu, 21 Jun 2018 11:27:34 -0400 Original-Received: from a1i15.kph.uni-mainz.de (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 8ADA5335C99; Thu, 21 Jun 2018 15:27:32 +0000 (UTC) In-Reply-To: <83sh5gqjh6.fsf@gnu.org> X-Mailer: VM 8.2.0b under 24.3.1 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:ea4a:1:5054:ff:fec7:86e4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226572 Archived-At: >>>>> On Thu, 21 Jun 2018, Eli Zaretskii wrote: >> --- a/Makefile.in >> +++ b/Makefile.in >> @@ -518,7 +518,10 @@ INSTALL_ARCH_INDEP_EXTRA = @INSTALL_ARCH_INDEP_EXTRA@ >> set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ >> `id -un 2> /dev/null`; do \ >> [ -n "$${installuser}" ] && break ; \ >> - done >> + done; \ >> + installgroup=$$(id -gn 2>/dev/null); \ >> + [ -n "$${installgroup}" ] && \ >> + installuser="$${installuser}:$${installgroup}" > Is 'id' sufficiently portable to use it here? The -g and -n options are specified by POSIX. I have only tested it on GNU/Linux and FreeBSD though. Also it should fall back to the current behaviour if "id" errors out for some reason.