diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-10-03 01:41:20 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-03 14:53:00 -0700 |
commit | 0b20dd8f3d48ed4ad90d2ce0dce768c0e013600b (patch) | |
tree | 18a4b642057d06ae9144e72963e96591d5d482ac /Makefile | |
parent | 703f05ad5835cff92b12c29aecf8d724c8c847e2 (diff) | |
download | git-0b20dd8f3d48ed4ad90d2ce0dce768c0e013600b.tar.gz git-0b20dd8f3d48ed4ad90d2ce0dce768c0e013600b.tar.xz |
Makefile: do not set setgid bit on directories on GNU/kFreeBSD
The g+s bit on directories to make group ownership inherited is a
SysVism --- BSD and most of its descendants do not need it since they
do the sane thing by default without g+s. In fact, on some
filesystems (but not all --- tmpfs works this way but UFS does not),
the kernel of FreeBSD does not even allow non-root users to set setgid
bit on directories and produces errors when one tries:
$ git init --shared dir
fatal: Could not make /tmp/dir/.git/refs writable by group
Since the setgid bit would only mean "do what you were going to do
already", it's better to avoid setting it. Accordingly, ever since
v1.5.5-rc0~59^2 (Do not use GUID on dir in git init --share=all on
FreeBSD, 2008-03-05), git on true FreeBSD has done exactly that. Set
DIR_HAS_BSD_GROUP_SEMANTICS in the makefile for GNU/kFreeBSD, too, so
machines that use glibc with the kernel of FreeBSD get the same fix.
This fixes t0001-init.sh and t1301-shared-repo.sh on GNU/kFreeBSD
when running tests with --root pointing to a directory that uses
tmpfs.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -820,6 +820,7 @@ ifeq ($(uname_S),GNU/kFreeBSD) NO_STRLCPY = YesPlease NO_MKSTEMPS = YesPlease HAVE_PATHS_H = YesPlease + DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease endif ifeq ($(uname_S),UnixWare) CC = cc |