diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-18 13:50:58 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-18 13:50:58 +0000 |
commit | 320961789816e8725319195e79a53caa8328f6ea (patch) | |
tree | cc0540edce3910d221ea4bec799dfd2eee733150 /trunk/src/createpkg | |
parent | bf2e7f6e5e4ecc3862e65b8c8218b108d44bed96 (diff) | |
download | simplepkg-320961789816e8725319195e79a53caa8328f6ea.tar.gz simplepkg-320961789816e8725319195e79a53caa8328f6ea.tar.bz2 |
minor fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@685 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/createpkg')
-rw-r--r-- | trunk/src/createpkg | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 0694d24..a1c0baa 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -716,10 +716,13 @@ if [ $SIGN_PACKAGES -eq $on ]; then fi if [ ! -z "$SIGN_PACKAGES_USER" ]; then - REPOSITORY_OWNER="$(get_owner $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 $PACKAGES_DIR + if tmpfile="`su $SIGN_PACKAGES_USER -c "mktemp $TMP/createpkg_sig.XXXXXX"`"; then + su $SIGN_PACKAGES_USER -c "gpg --use-agent --armor -sb -u -o $tmpfile $SIGN_KEYID $PACKAGES_DIR/$PKG_NAME" + cp $tmpfile $PACKAGES_DIR/$PKG_NAME.asc + su $SIGN_PACKAGES_USER -c "rm -f $tmpfile" + else + echo "Error signing package: could not create tmp file." + fi else gpg --use-agent --armor -sb -u $SIGN_KEYID $PACKAGES_DIR/$PKG_NAME fi |