summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Rinnestam <fredrik@crux.nu>2017-02-23 18:26:36 +0100
committerFredrik Rinnestam <fredrik@crux.nu>2017-02-23 18:29:10 +0100
commitdcb8845eaf69cbefe62e58b03090c986391333d3 (patch)
tree4bf6bd1ec410ec55991ef9ff94c8d11d0bdb79c6
parente5c99f7b1a729016c689f240c69b8b2bdc4ed4aa (diff)
downloadpkgutils-dcb8845eaf69cbefe62e58b03090c986391333d3.tar.gz
pkgutils-dcb8845eaf69cbefe62e58b03090c986391333d3.tar.xz
pkgmk: Removed checking for in make_signature()pkgutils-5.40.1
this is an artifact from make_md5sum() and NOT needed for make_signature(). In fact, this check breaks make_signature() because now packages that don't have a $source don't get any .signature at all, even though it can (and should) create a sha256 for the footprint and Pkgfile. Patch by Camille (onodera).
-rwxr-xr-xpkgmk.in40
1 files changed, 19 insertions, 21 deletions
diff --git a/pkgmk.in b/pkgmk.in
index 5d8a2663..d70d045e 100755
--- a/pkgmk.in
+++ b/pkgmk.in
@@ -360,31 +360,29 @@ make_signature() {
local FILE LOCAL_FILENAMES
local REPO
- if [ "$source" ]; then
- for FILE in "$PKGMK_PKGFILE" "$PKGMK_FOOTPRINT" ${source[@]}; do
- LOCAL_FILENAMES="$LOCAL_FILENAMES `get_filename $FILE`"
- done
+ for FILE in "$PKGMK_PKGFILE" "$PKGMK_FOOTPRINT" ${source[@]}; do
+ LOCAL_FILENAMES="$LOCAL_FILENAMES `get_filename $FILE`"
+ done
- if [ ! "$PKGMK_PRIVATEKEY" ]; then
- REPO=${PWD%/*}
- REPO=${REPO##*/}
- REPO=${REPO%.git}
- fi
+ if [ ! "$PKGMK_PRIVATEKEY" ]; then
+ REPO=${PWD%/*}
+ REPO=${REPO##*/}
+ REPO=${REPO%.git}
+ fi
- if [ "$REPO" ]; then
- PKGMK_PRIVATEKEY="/etc/ports/${REPO}.sec"
- fi
+ if [ "$REPO" ]; then
+ PKGMK_PRIVATEKEY="/etc/ports/${REPO}.sec"
+ fi
- sha256sum --tag $LOCAL_FILENAMES | sed 's|^SHA256 (.*/\(.*\))\(.* = .*\)|SHA256 (\1)\2|' | \
- signify -S -e -x - -q -s "$PKGMK_PRIVATEKEY" -m - > ${PKGMK_SIGNATURE}.tmp
+ sha256sum --tag $LOCAL_FILENAMES | sed 's|^SHA256 (.*/\(.*\))\(.* = .*\)|SHA256 (\1)\2|' | \
+ signify -S -e -x - -q -s "$PKGMK_PRIVATEKEY" -m - > ${PKGMK_SIGNATURE}.tmp
- if [ $? -ne 0 ]; then
- rm ${PKGMK_SIGNATURE}.tmp
- error "Creating signature failed"
- exit $E_SIGNATURE
- else
- mv ${PKGMK_SIGNATURE}.tmp ${PKGMK_SIGNATURE}
- fi
+ if [ $? -ne 0 ]; then
+ rm ${PKGMK_SIGNATURE}.tmp
+ error "Creating signature failed"
+ exit $E_SIGNATURE
+ else
+ mv ${PKGMK_SIGNATURE}.tmp ${PKGMK_SIGNATURE}
fi
}

Generated by cgit