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: [PATCH] Set also the group of installed files Date: Thu, 21 Jun 2018 16:31:34 +0200 Message-ID: <23339.46790.117747.841207@a1i15.kph.uni-mainz.de> 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 1529591386 25345 195.159.176.226 (21 Jun 2018 14:29:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2018 14:29:46 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 21 16:29:42 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 1fW0aj-0006Vy-Qy for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 16:29:41 +0200 Original-Received: from localhost ([::1]:55813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW0cr-0005vt-6L for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2018 10:31:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW0cj-0005vm-Mo for emacs-devel@gnu.org; Thu, 21 Jun 2018 10:31:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW0cf-0000qH-Oi for emacs-devel@gnu.org; Thu, 21 Jun 2018 10:31:45 -0400 Original-Received: from dev.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:47385 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 1fW0cf-0000ny-HD for emacs-devel@gnu.org; Thu, 21 Jun 2018 10:31:41 -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 309A3335C7E; Thu, 21 Jun 2018 14:31:38 +0000 (UTC) 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:226567 Archived-At: Currently the files in the lisp and etc directories are being installed using a pair of tars, followed by a recursive chown. This however adjusts only the user, but not the group ownership. When building Emacs in a sandboxed environment (as it is the case for Gentoo), the installed files will afterwards belong to root but to the group of the build user. Note that this also doesn't match the behaviour of install(1) which sets both user and group ownership. See patch included below. Ulrich >From 851904d043ce268878444140df7eec8ff5de9a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Thu, 21 Jun 2018 01:27:44 +0200 Subject: [PATCH] Set also the group of installed files * Makefile.in (set_installuser): Also set the group, in order to match install(1) behavior. --- Makefile.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 52d44d9708..d659d7a56f 100644 --- 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}" ### Install the files that are machine-independent. ### Most of them come straight from the distribution; the exception is -- 2.17.1