From a2d24145d7cf528ff6794c3e8844cb72e330278d Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Thu, 25 Mar 2010 13:37:39 -0500 Subject: [PATCH] commitpkg should upload files with correct permissions. In other words, if package tarballs need permissions of 0664, they should have those permissions when they arrive at the server. -p --chmod should do that. Signed-off-by: Christopher Brannon --- commitpkg | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/commitpkg b/commitpkg index 8e1e72b..cee9d43 100755 --- a/commitpkg +++ b/commitpkg @@ -74,6 +74,9 @@ if [ "$1" = '-l' ]; then shift 2 fi +# Correct permissions for uploaded files: 0664. +goodperms="ug=rw,o=r" + echo -n 'committing changes to trunk...' if [ -n "$1" ]; then svn commit -q -m "upgpkg: $pkgbase $pkgver-$pkgrel @@ -96,7 +99,9 @@ for _arch in ${arch[@]}; do fi echo -n 'uploading ' - rsync -c -h -L --progress $rsyncopts "${pkgfile}" -e ssh $server:staging/$repo || abort + # Add --chmod $goodperms to send source permissions of 664, + # and -p to preserve file permissions. + rsync -p --chmod $goodperms -c -h -L --progress $rsyncopts "${pkgfile}" -e ssh $server:staging/$repo || abort done archrelease $repo-${_arch} || abort done -- 1.7.0.3