aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trunk/lib/common.sh21
-rw-r--r--trunk/src/createpkg3
-rwxr-xr-xtrunk/src/templatepkg21
3 files changed, 24 insertions, 21 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 26c550f..c4224c8 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -799,6 +799,27 @@ function commit_changes {
}
+function check_svn_repo {
+
+ # check a svn repository URL
+ # usage: set_svn_repo <repository>
+
+ if [ ! -z "$1" ]; then
+ if echo $1 | grep -q -v -e "^svn://"; then
+ if echo $1 | grep -q -v -e "svn+.\+://"; then
+ if echo $1 | grep -q -v -e "^file://"; then
+ echo $BASENAME: invalid repository URL $1
+ return 1
+ fi
+ fi
+ fi
+ else
+ echo $BASENAME: no repository defined
+ return 1
+ fi
+
+}
+
# -----------------------------------------------
# update jail functions
# -----------------------------------------------
diff --git a/trunk/src/createpkg b/trunk/src/createpkg
index 3fe392b..4b48854 100644
--- a/trunk/src/createpkg
+++ b/trunk/src/createpkg
@@ -716,7 +716,10 @@ if [ $SIGN_PACKAGES -eq $on ]; then
fi
if [ ! -z "$SIGN_PACKAGES_USER" ]; then
+ REPOSITORY_OWNER="$(get_owner $(dirname $PACKAGES_DIR))"
+ chown $SIGN_PACKAGES_USER `dirname $PACKAGES_DIR`
su $SIGN_PACKAGES_USER -c "gpg --use-agent --armor -sb -u $SIGN_KEYID $PACKAGES_DIR/$PKG_NAME"
+ chown $REPOSITORY_OWNER `dirname $PACKAGES_DIR`
else
gpg --use-agent --armor -sb -u $SIGN_KEYID $PACKAGES_DIR/$PKG_NAME
fi
diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg
index 3f0284a..8d98950 100755
--- a/trunk/src/templatepkg
+++ b/trunk/src/templatepkg
@@ -147,27 +147,6 @@ function usage {
}
-function check_svn_repo {
-
- # check a svn repository URL
- # usage: set_svn_repo <repository>
-
- if [ ! -z "$1" ]; then
- if echo $1 | grep -q -v -e "^svn://"; then
- if echo $1 | grep -q -v -e "^svn+ssh://"; then
- if echo $1 | grep -q -v -e "^file://"; then
- echo $BASENAME: invalid repository URL $1
- return 1
- fi
- fi
- fi
- else
- echo $BASENAME: no repository defined
- return 1
- fi
-
-}
-
function import_export_templates {
# import from or export to $TEMPLATE_FOLDER in a svn repository