You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Work around mtree quirk
Turns out mtree -U won't complain but also won't actually create any directories if not all of uname, gname, and mode are specified, even when it can't enforce the ownership. But it's happy if you give it any gname.
This commit is contained in:
@@ -703,7 +703,7 @@ UNIVERSAL_ARCHS
|
||||
startupitem_install
|
||||
MPFRAMEWORKSDIR
|
||||
MPAPPLICATIONSDIR
|
||||
MTREE_UGNAME
|
||||
MTREE_GNAME
|
||||
DSTMODE
|
||||
RUNUSR
|
||||
DSTGRP
|
||||
@@ -7014,10 +7014,15 @@ printf "%s\n" "$DSTMODE" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
# Don't set uname or gname in .mtree files unless root
|
||||
# Don't set real uname or gname in .mtree files unless root
|
||||
# https://trac.macports.org/ticket/49501
|
||||
if test "$DSTUSR" = "root" ; then
|
||||
MTREE_UGNAME="uname=root gname=$DSTGRP"
|
||||
MTREE_GNAME="$DSTGRP"
|
||||
else
|
||||
# This has to be set to something or mtree won't create any directories.
|
||||
# It doesn't matter what it's set to for non-root though, as it can't
|
||||
# change the ownership anyway.
|
||||
MTREE_GNAME="admin"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
+8
-3
@@ -227,12 +227,17 @@ MP_CHECK_RUNUSER
|
||||
MP_DIRECTORY_MODE
|
||||
MP_SHARED_DIRECTORY
|
||||
|
||||
# Don't set uname or gname in .mtree files unless root
|
||||
# Don't set real uname or gname in .mtree files unless root
|
||||
# https://trac.macports.org/ticket/49501
|
||||
if test "$DSTUSR" = "root" ; then
|
||||
MTREE_UGNAME="uname=root gname=$DSTGRP"
|
||||
MTREE_GNAME="$DSTGRP"
|
||||
else
|
||||
# This has to be set to something or mtree won't create any directories.
|
||||
# It doesn't matter what it's set to for non-root though, as it can't
|
||||
# change the ownership anyway.
|
||||
MTREE_GNAME="admin"
|
||||
fi
|
||||
AC_SUBST(MTREE_UGNAME)
|
||||
AC_SUBST(MTREE_GNAME)
|
||||
|
||||
# Check for default directories
|
||||
MP_PATH_APPLICATIONS
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# MacPorts filesystem hierarchy, for internal use only. Changes to this file will not stick across installations.
|
||||
#
|
||||
|
||||
/set type=dir @MTREE_UGNAME@ mode=@DSTMODE@
|
||||
/set type=dir uname=root gname=@MTREE_GNAME@ mode=@DSTMODE@
|
||||
.
|
||||
man type=link link=share/man
|
||||
..
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# MacPorts filesystem hierarchy, for internal use only. Changes to this file will not stick across installations.
|
||||
|
||||
/set type=dir @MTREE_UGNAME@ mode=@DSTMODE@
|
||||
/set type=dir uname=root gname=@MTREE_GNAME@ mode=@DSTMODE@
|
||||
.
|
||||
bin
|
||||
..
|
||||
|
||||
Reference in New Issue
Block a user