summaryrefslogtreecommitdiff
path: root/src/librefetch/librefetch
diff options
context:
space:
mode:
Diffstat (limited to 'src/librefetch/librefetch')
-rwxr-xr-xsrc/librefetch/librefetch18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index 1f6bd9d..37f1641 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -216,6 +216,8 @@ doit() {
if [[ $base_dst == *.sig ]]; then
if ! [[ -e ${base_dst%.sig} ]]; then
extra_opts=("${src%.sig}" "${base_dst%.sig}")
+
+ msg2 "Libre source-ball signature not found. Attempting to create it."
doit || exit
fi
create_signature "${base_dst%.sig}" || exit
@@ -227,6 +229,7 @@ doit() {
export pkg_file=$dst
cd "$BUILDFILEDIR"
+ msg2 "Libre source-ball not found. Attempting to create it from upstream source."
"$makepkg" "${makepkg_opts[@]}" -p "$srcbuild" >&2 || exit
fi
fi
@@ -358,7 +361,7 @@ if ! declare -f mksource >/dev/null; then
mksource() { :; }
fi
prepare() { :; }
-build() { mksource; }
+build() { msg "Starting mksource()"; mksource; }
check() { :; }
package() { cp -a "$srcdir"/*/ "$pkgdir/"; }
'
@@ -388,19 +391,24 @@ modified_srcbuild() {
create_signature() {
local ret=$EXIT_SUCCESS
local filename="$1"
- msg "Signing package..."
-
+ local gpg_remind_msg="Ensure that your GPG key is referenced in the PKGBUILD 'validpgpkeys' array."
local SIGNWITHKEY=()
+
if [[ -n $GPGKEY ]]; then
SIGNWITHKEY=(-u "${GPGKEY}")
fi
+ msg "Signing libre source-ball..."
gpg --detach-sign --use-agent "${SIGNWITHKEY[@]}" --no-armor "$filename" &>/dev/null || ret=$EXIT_FAILURE
if (( ! ret )); then
- msg2 "Created signature file %s." "$filename.sig"
+ msg2 "Created signature file: %s.
+ ${gpg_remind_msg}" "${filename}.sig"
else
- error "Failed to sign package file."
+ error "Failed to sign the libre source-ball!!!
+ If you can not sign it now on this machine,
+ you can take it home, and run librerelease on it.
+ ${gpg_remind_msg}"
return $ret
fi
}