From 9f75f273828420dac22205f352a0a8488d4220b3 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Wed, 26 Jun 2019 02:49:19 -0400 Subject: sq - mkmetedata --- parabolaiso/TORRENT_METADATA.sample | 11 +++++++++-- parabolaiso/mkmetadata | 9 ++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/parabolaiso/TORRENT_METADATA.sample b/parabolaiso/TORRENT_METADATA.sample index 0bb94ef..4c16080 100644 --- a/parabolaiso/TORRENT_METADATA.sample +++ b/parabolaiso/TORRENT_METADATA.sample @@ -1,5 +1,11 @@ # metadata requisites: 'mktorrent', 'rhash' # if these are not installed, then no .torrent, magnet, or checksum files will be created +# to enable .torrent file generation, copy this file to ./TORRENT_METADATA + +# all of the constant values in this sample file are specific to parabola official releases +# for custom ISOs, all of these values should be changed in ./TORRENT_METADATA +# if a torrent file is not desired, then this file can be ignored + # TORRENT_ANNOUNCE_URL (string) # will be embedded into the .torrent file @@ -26,8 +32,9 @@ https://mirror.freedif.org/Parabola/iso # will be embedded into the .torrent file # if ISOS_URL is defined below, a URL will be appended to this, pointing # to where the GPG signature of the ISO will be expected to be hosted -readonly TORRENT_COMMENT="Parabola GNU/Linux-libre Official Release - GPG signature: " +readonly TORRENT_COMMENT="Parabola GNU/Linux-libre Official Release" # ISOS_URL (string) -# is used to make a URL to the master repo where the ISO and GPG signature will be hosted +# is used to make a URL to the master repo where the ISO will be hosted +# the torrent comment will indicate this as the location of the canonical GPG signature readonly ISOS_URL=https://repo.parabola.nu/iso diff --git a/parabolaiso/mkmetadata b/parabolaiso/mkmetadata index 1724765..2bf336e 100755 --- a/parabolaiso/mkmetadata +++ b/parabolaiso/mkmetadata @@ -14,12 +14,11 @@ which rhash &> /dev/null && readonly HAS_RHASH=1 || readonly HAS_RHASH=0 readonly SHOULD_MKTORRENT=0 [[ -n "${ISOS_URL}" ]] && readonly PUBLIC_URL="${ISOS_URL}/$(basename ${OUT_DIR})" -[[ -n "${ISOS_URL}" ]] && readonly SIG_URL="${PUBLIC_URL}/${IMG_NAME}.sig" -[[ -n "${ISOS_URL}" ]] && readonly PUBLISH_MSG="The directory: '${OUT_DIR}' should be copied in tact to the repo server such that it is accessible via the URL: ${PUBLIC_URL}/" -[[ -n "${ISOS_URL}" ]] && (( ${SHOULD_MKTORRENT} )) && SIG_MSG="The torrent expects the GPG signature to be accessible at: ${SIG_URL}" +[[ -n "${ISOS_URL}" ]] && readonly SIG_URL=" - GPG signature: ${PUBLIC_URL}/${IMG_NAME}.sig" +[[ -n "${ISOS_URL}" ]] && readonly PUBLISH_MSG="The directory: '${OUT_DIR}' should be copied to the repo server entirely, preserving the directory name; such that it is accessible via the URL:\n\t${PUBLIC_URL}/\nThe GPG signature of the ISO should be added to that directory; such that it is accessible at the URL:\n\t${SIG_URL}" readonly ISO_HOST_PATH=$(echo "$(basename ${OUT_DIR})/${IMG_NAME}" | sed 's|\s|%20|') -readonly WEBSEEDS_CSV=$(echo $urls | sed -E "s|([^ ]+)|\1${ISO_HOST_PATH}|g" | tr ' ' ',') +readonly WEBSEEDS_CSV=$(echo ${TORRENT_WEBSEED_URLS} | sed -E "s|([^ ]+)|\1${ISO_HOST_PATH}|g" | tr ' ' ',') readonly PKGLIST_SUCCESS_MSG="\t=> copied $(basename ${PKGLIST} 2> /dev/null)" readonly SHA512SUMS_SUCCESS_MSG="\t=> SHA512SUMS appended" @@ -63,4 +62,4 @@ then echo "$MAKE_METADATA_MSG" popd > /dev/null fi -[[ -n "${ISOS_URL}" ]] && echo "\n${PUBLISH_MSG}\n${SIG_MSG}" +[[ -n "${ISOS_URL}" ]] && echo -e "\n${PUBLISH_MSG}\n" -- cgit v1.2.2