unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Set also the group of installed files
@ 2018-06-21 14:31 Ulrich Mueller
  2018-06-21 14:53 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Mueller @ 2018-06-21 14:31 UTC (permalink / raw)
  To: emacs-devel

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?= <ulm@gentoo.org>
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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-21 20:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-21 14:31 [PATCH] Set also the group of installed files Ulrich Mueller
2018-06-21 14:53 ` Eli Zaretskii
2018-06-21 15:27   ` Ulrich Mueller
2018-06-21 20:32     ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).