diff options
-rw-r--r-- | src/lib/messages.sh | 2 | ||||
-rwxr-xr-x | src/librefetch/librefetch | 18 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/lib/messages.sh b/src/lib/messages.sh index b96c637..b0fcf1e 100644 --- a/src/lib/messages.sh +++ b/src/lib/messages.sh @@ -238,3 +238,5 @@ setup_traps() { trap '_libremessages_trap_exit INT "Aborted by user! Exiting..."' INT trap '_libremessages_trap_exit USR1 "An unknown error has occurred. Exiting..."' ERR } + +DBG() { printf "\033[01;34m${1}\033[00m\n" >&2 ; true ; } 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 } |