f24c8b60c5
(2) Fix asvn knoweledge about svn command location [1] (3) Add STATIC option to build only static binaries [2] (4) Activate mod_authz_svn in package installation [3] PR: [1] ports/133778, [3] ports/133898 Submitted by: [2] David O'Brien
123 lines
4.8 KiB
Text
123 lines
4.8 KiB
Text
--- contrib/client-side/asvn.orig 2008-01-28 03:24:25.000000000 +0300
|
|
+++ contrib/client-side/asvn 2009-04-29 15:41:48.000000000 +0400
|
|
@@ -42,7 +42,7 @@
|
|
# $LastChangedBy: blair $
|
|
# $LastChangedRevision: 29065 $
|
|
|
|
-SVN=/usr/bin/svn
|
|
+SVN=/usr/local/bin/svn
|
|
ACTION=""
|
|
DEV_PROP="dir:devices"
|
|
SYM_PROP="dir:symlinks"
|
|
@@ -52,7 +52,7 @@
|
|
TMPFILE2=/tmp/asvn.tmp2.$$
|
|
PCWD=`/bin/pwd`
|
|
SKIPSVN='\( -name .svn -prune -false \)'
|
|
-PRINTDETAILS="-printf \"file='%p' mode=%m user=%u(%U) group=%g(%G)\n\""
|
|
+PRINTDETAILS="-printf \"file='%p' mode=%m user=(%U) group=(%G)\n\""
|
|
|
|
trap cleanup 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
|
|
@@ -64,7 +64,8 @@
|
|
function basedirname()
|
|
{
|
|
refname="$1"
|
|
- dir="`dirname \"$2\"`"
|
|
+ shift
|
|
+ dir="`dirname \"$*\"`"
|
|
ref="`expr \"$dir\" : \"$refname/\(.*\)\"`"
|
|
if [ -z "$ref" ]
|
|
then
|
|
@@ -111,7 +112,7 @@
|
|
|
|
function recorddirinfo
|
|
{
|
|
- eval "find $PCWD $SKIPSVN -o \( -type d ! -name .svn -print \)" |while read dirlist
|
|
+ eval "gfind \"$PCWD\" $SKIPSVN -o \( -type d ! -name .svn -print \)" |while read dirlist
|
|
do
|
|
updatedirsymlinks $1 "$dirlist"
|
|
updatedirdevices $1 "$dirlist"
|
|
@@ -132,7 +133,7 @@
|
|
#
|
|
# Obtain the list of devices in this directory
|
|
#
|
|
- find "$dir" \( \( -type b -o -type c -o -type p \) -print \) -o -type d ! -name "`basename \"$dir\"`" -prune | while read file
|
|
+ gfind "$dir" \( \( -type b -o -type c -o -type p \) -print \) -o -type d ! -name "`basename \"$dir\"`" -prune | while read file
|
|
do
|
|
echo -n `find "$file" -printf "file='%f' mode=%m user=%u(%U) group=%g(%G)"`
|
|
[ -b "$file" ] && echo -n ' type=b'
|
|
@@ -200,10 +201,10 @@
|
|
grep -q "$info" $TMPFILE && continue # This line still matches
|
|
file="`expr \"$info\" : \"file='\(.*\)' \"`"
|
|
mode=`expr "$info" : ".*' mode=\([0-9]*\) "`
|
|
- user=`expr "$info" : ".* user=\([^(]*\)("`
|
|
- uid=`expr "$info" : ".* user=[^(]*(\([0-9]*\) "`
|
|
- group=`expr "$info" : ".* group=\([^(]*\)("`
|
|
- gid=`expr "$info" : ".* group=[^(]*(\([0-9]*\) "`
|
|
+# user=`expr "$info" : ".* user=\([^(]*\)("`
|
|
+ uid=`expr "$info" : ".* user=[^(]*(\([0-9]*\)"`
|
|
+# group=`expr "$info" : ".* group=\([^(]*\)("`
|
|
+ gid=`expr "$info" : ".* group=[^(]*(\([0-9]*\)"`
|
|
type=`expr "$info" : ".* type=\(.\)"`
|
|
major=`expr "$info" : ".* major=\([0-9]*\)"`
|
|
minor=`expr "$info" : ".* minor=\([0-9]*\)"`
|
|
@@ -213,7 +214,8 @@
|
|
#
|
|
rm -f "$dir/$file"
|
|
mknod --mode=$mode "$dir/$file" $type $major $minor
|
|
- chown $user:$group "$dir/$file"
|
|
+# chown $user:$group "$dir/$file"
|
|
+ chown $uid:$gid "$dir/$file"
|
|
addignorefile "$dir/$file"
|
|
done
|
|
fi
|
|
@@ -234,7 +236,7 @@
|
|
#
|
|
# Obtain the list of symlinks in this directory
|
|
#
|
|
- find "$dir" \( -type l -printf "file='%f' dest='%l'\n" \) -o -type d ! -name "`basename \"$dir\"`" -prune |
|
|
+ gfind "$dir" \( -type l -printf "file='%f' dest='%l'\n" \) -o -type d ! -name "`basename \"$dir\"`" -prune |
|
|
sort >$TMPFILE
|
|
|
|
#
|
|
@@ -320,7 +322,7 @@
|
|
# Find all the directories and files
|
|
cp /dev/null $TMPFILE
|
|
|
|
- eval "find $PCWD $SKIPSVN -o \( \( -type d ! -name .svn \) -o -type f \) $PRINTDETAILS" | while read info
|
|
+ eval "gfind \"$PCWD\" $SKIPSVN -o \( \( -type d ! -name .svn \) -o -type f \) $PRINTDETAILS" | while read info
|
|
do
|
|
device=`expr "$info" : "file='\(.*\)' mode"`
|
|
info=`expr "$info" : "file='.*' \(mode.*\)"`
|
|
@@ -343,15 +345,16 @@
|
|
else
|
|
info=`$SVN propget $FILE_PROP "$dir/$file"`
|
|
mode=`expr "$info" : "mode=\([0-9]*\) "`
|
|
- user=`expr "$info" : ".* user=\([^(]*\)("`
|
|
- uid=`expr "$info" : ".* user=[^(]*(\([0-9]*\) "`
|
|
- group=`expr "$info" : ".* group=\([^(]*\)("`
|
|
- gid=`expr "$info" : ".* group=[^(]*(\([0-9]*\) "`
|
|
- if [ "$user" = "" -o "$group" = "" -o "$mode" = "" ]
|
|
+# user=`expr "$info" : ".* user=\([^(]*\)("`
|
|
+ uid=`expr "$info" : ".* user=[^(]*(\([0-9]*\)"`
|
|
+# group=`expr "$info" : ".* group=\([^(]*\)("`
|
|
+ gid=`expr "$info" : ".* group=[^(]*(\([0-9]*\)"`
|
|
+ if [ "$uid" = "" -o "$gid" = "" -o "$mode" = "" ]
|
|
then
|
|
echo "property $FILE_PROP not set for $dir/$file"
|
|
else
|
|
- chown $user:$group "$dir/$file"
|
|
+# chown $user:$group "$dir/$file"
|
|
+ chown $uid:$gid "$dir/$file"
|
|
chmod $mode "$dir/$file"
|
|
fi
|
|
fi
|
|
@@ -391,7 +394,7 @@
|
|
|
|
[ "$ACTION" = "pre" ] && pre_checkin $@
|
|
|
|
-$SVN $@
|
|
+$SVN "$@"
|
|
|
|
[ $? = 0 -a "$ACTION" = "post" ] && post_checkout $@
|
|
|