summaryrefslogtreecommitdiff
path: root/app-portage/getdelta
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-portage/getdelta
reinit the tree, so we can have metadata
Diffstat (limited to 'app-portage/getdelta')
-rw-r--r--app-portage/getdelta/Manifest6
-rw-r--r--app-portage/getdelta/files/getdelta-0.7.9.patch252
-rw-r--r--app-portage/getdelta/getdelta-0.7.9-r2.ebuild46
-rw-r--r--app-portage/getdelta/metadata.xml16
4 files changed, 320 insertions, 0 deletions
diff --git a/app-portage/getdelta/Manifest b/app-portage/getdelta/Manifest
new file mode 100644
index 000000000000..40fe84c47930
--- /dev/null
+++ b/app-portage/getdelta/Manifest
@@ -0,0 +1,6 @@
+AUX getdelta-0.7.9.patch 9393 SHA256 7f6b977e707f338510c4852d6812b1a4803c996cea98192c542bb36de9b4d87b SHA512 c9c363c8e36245a8cd409d3a43c0d9110c409311f6972893d993f16f2911496c33c50c98e8dd9138b52bb7d7dc5ffb56b0611c28e9682ea5ac189cb27c5755dc WHIRLPOOL e4d2ccc8e1a50ca1174183394f3464e82d95dd7be3c5a3dad8d7fe596196ad28a2daf09603ed4ff3b5eafce67f7bcd4d3d996bd672805ed11bf1d5d5433b8e0b
+DIST getdelta-0.7.8.tar.bz2 10335 SHA256 72bd5dac59e86a5c78217a15e3198df513152dc784a8685b1a8c2c5efdb34217 SHA512 66374ce1a0ec5492d11478ddcaeb67b497a44357605f3cd1b9176796ca9f69d8c6865f9db188a6d7722c4ab372a5a317dfa6fafe97d9f08f76f332469f1ee2b2 WHIRLPOOL 88e6f1df59e4897c3c667634b8d08c0a225daad56f627793074947b8f2bd3840b9108e50e0506fe49ca2ab43179d43c902f3da49a994b1886b855bb3cc65f395
+EBUILD getdelta-0.7.9-r2.ebuild 1391 SHA256 2b116f25a5ac6a047ab0a06469efc6aeb0901151e4a65b03e8bb7d1eec20881a SHA512 5d50594b215d4901b7378d627d78c51162bc39ec75901ecb00722658704948bc4e8dffc4eba4467fb2c32bf0dc389c7b1d0f7930c3cfb318f16bfb1da81deb1a WHIRLPOOL 8821a3e0877532f7a4fcdba98ca84e06867ee205b4a2f4cccaa000f3c7424a19796f535127bbc0191ee123dc9a1b567b998861683a48f0b2fc04a1993255371e
+MISC ChangeLog 2468 SHA256 09f1dc1393ee22015f37a79bebd5ce01986fad9f31b3bab6737bce52c44896fd SHA512 9c3041c8b79bcc73a71884bbaae8043b04cb43f04ddb0531f225a7666cf4bdc9ed16c8a0d0bce5e24ff5e7df1545716f7f65523761518244360d3b4b025ac6b7 WHIRLPOOL 33a343db93464fd623afd69b583cf3b7ddacceb0063a08c6f2555c01e2d19b855e16b4d355c3d33d533587974f3342ebcc706f37422a2c9a5d28860e61695643
+MISC ChangeLog-2015 4496 SHA256 8b83addcef5950dd0e2a4781146dbd67afeb3bdd8798affc1dba66302abd1f66 SHA512 2328b4b3e0ba54fd05677d76183813da2a103fb1a4493c510d2b954dd80f360cc1d9d9ae4e5618777eee0685a3c5299d0727428bbfecf0180cb0ce5d82437eaf WHIRLPOOL b8e3f4015a63e1c68fe0bffadb7cd7f44de8c1056284e7070de663ffa9cfd890d710150f1716358d6a32069413e863f274ac74def2050852ad06f74ec243f880
+MISC metadata.xml 495 SHA256 470b264a335319f6017d0a732f2928060c37263df90e12a03dab96754fec3840 SHA512 1e2fbc185f118b58adafb9ccc5c03d56d3802aa719601ba2bda7cdc2fae31a4f558261087d1da74e33786539f7b827a24acc9ad85a0ae4dadd26be31417efd92 WHIRLPOOL dd4a3bd3db297bd2bc61b1ea613de0b297768661b1f5a12153ba0e0d9a59627b93a36927a9ed06421df7f745df28a643691516a1f1c7b81bc7be8c2be9970886
diff --git a/app-portage/getdelta/files/getdelta-0.7.9.patch b/app-portage/getdelta/files/getdelta-0.7.9.patch
new file mode 100644
index 000000000000..9ab117e59c95
--- /dev/null
+++ b/app-portage/getdelta/files/getdelta-0.7.9.patch
@@ -0,0 +1,252 @@
+--- getdelta.sh 2007-07-13 16:30:26.000000000 +0000
++++ getdelta.sh 2010-08-27 17:23:31.692000002 +0000
+@@ -25,6 +25,9 @@
+ VERSION="0.7"
+
+ # Changelog
++# version 0.7.9 2008/10/08
++# - add second parameter for destination name (EAPI=2)
++# - quote more carefully
+ # version 0.7.8 2007/07/13
+ # - added option -O to call of emerge when finding mirrors
+ # - replaced some calls of coreutils with bash-internals
+@@ -326,13 +329,13 @@
+
+ remove() {
+ output "${GREEN}You have chosen to remove ${CYAN}$1\n"
+- pushd ${DISTDIR} >/dev/null 2>&1
++ pushd -- "${DISTDIR}" >/dev/null 2>&1
+ removeme=true
+ for n in $(grep -v "^#" ${DO_NOT_REMOVE})
+ do
+ grep -q $n <<< "$1" && removeme=false && output "${CYAN}${1}${RED} is not deleted, since it matches ${n} in ${DO_NOT_REMOVE}"
+ done
+- $removeme && rm -f $1
++ $removeme && rm -f -- "$1"
+ popd >/dev/null 2>&1
+ }
+
+@@ -349,7 +352,7 @@
+ -e "s/src4/srcDDD/g" \
+ -e "s/src5/srcEEE/g" \
+ -e "s/src6/srcFFF/g" \
+- -e "s/src7/srcGGG/g" <<< $MASK_FILENAME)
++ -e "s/src7/srcGGG/g" <<< "$MASK_FILENAME")
+ fi
+
+ # ignore PR for src-files of firefox
+@@ -375,7 +378,7 @@
+ -e "s/rc//g" \
+ -e "s/[\._-]//g" \
+ -e "s/\+//g" \
+- -e "s/ //g" <<< $MASK_FILENAME)
++ -e "s/ //g" <<< "$MASK_FILENAME")
+ }
+
+ # create or update a config-file
+@@ -384,6 +387,7 @@
+ add_to_configfile LOCAL_MIRROR "" "set this to one or more (space separated) URI ending with '/' if you want to check one or more local mirror(s) first\n# most people just leave it empty."
+ add_to_configfile DELTUP_SERVER "http://linux01.gwdg.de/~nlissne/deltup.php" "deltup-server to use"
+ add_to_configfile FETCH "/usr/bin/wget -t 1 --passive-ftp" "command to use for downloading"
++add_to_configfile FETCHNAME "\$FETCH -O" "command to use for downloading; first parameter is the filename, second the url"
+ add_to_configfile QUEUERETRY 15 "number of seconds to wait before a queued request is retried"
+ add_to_configfile MAXIMUM_ACCEPTABLE_QUEUEPOS "15" "the maximum queuepos you would accept (if higher download full archive instead)"
+ add_to_configfile QUEUETIMEOUT 900 "when a dtu-request is queued - how long should we wait max. before downloading the original archive instead (in seconds)"
+@@ -424,14 +428,14 @@
+ add_to_donotremove "^rp-pppoe"
+
+
+-if [ -z $1 ]
++if [ -z "$1" ]
+ then
+ COLOR=true
+ echo -e "${YELLOW}getdelta.sh version ${VERSION}"
+ echo "This script has to be called like this:"
+ echo -e "${CYAN}$0 <URI>"
+ echo -e "\n${YELLOW}To use it, you should just put the following line into your /etc/make.conf"
+- echo -e "${GREEN}FETCHCOMMAND=\"$0 \\\${URI}\""
++ echo -e "${GREEN}FETCHCOMMAND=\"$0 \\\"\\\${URI}\\\" \\\"\\\${FILE}\\\"\""
+ echo -e "\n${YELLOW}There is a config-file ${CYAN}${GETDELTA_CONFIGFILE}${YELLOW} with some variables to control the behaviour of this script."
+ echo -e "Edit it to your needs.${NORMAL}"
+ exit 1
+@@ -464,10 +468,12 @@
+ output "use getdelta.sh for your FETCHCOMMAND, only." &&
+ sleep 5 && exit 1
+
+-pushd $DISTDIR >/dev/null 2>/dev/null
++pushd -- "$DISTDIR" >/dev/null 2>/dev/null
+ ORIG_URI=$1
+ NEW_FILE=$(basename $ORIG_URI)
+
++[ -z "${NEW_FILE}" ] && NEW_FILE=${ORIG_URI##*/}
++
+ # repoman downloads metadata.dtd with FETCHCOMMAND
+ # this should not be done with getdelta - so just fetch the file and exit
+
+@@ -475,7 +481,7 @@
+ # dtu files.
+ if [ "${NEW_FILE}" = "metadata.dtd" ] || [ "$GETDELTA" = "0" ]
+ then
+- $FETCH $@
++ $FETCHNAME "$NEW_FILE" "$ORIG_URI"
+ exit $?
+ fi
+
+@@ -516,7 +522,7 @@
+ #
+ output "${GREEN}Searching for a previously downloaded file in ${YELLOW}${DISTDIR}\n"
+
+-first_chars=$(sed 's/[[:digit:]][[:print:]]*$//' <<< $NEW_FILE)
++first_chars=$(sed 's/[[:digit:]][[:print:]]*$//' <<< "$NEW_FILE")
+ length_first_chars=${#first_chars}
+ [ $length_first_chars -lt 3 ] && first_chars="${NEW_FILE:0:2}"
+
+@@ -527,7 +533,7 @@
+ let len1=${#mask}
+ filelist=""
+
+-for name in $( ls ${first_chars}* 2>/dev/null )
++for name in $( ls -- "${first_chars}"* 2>/dev/null )
+ do
+ mask2=$(mask_name "${name}")
+ # add any file, that results in the same mask or differ not more than two letters
+@@ -582,7 +588,7 @@
+
+ # find matching part of filename - first: frontmatch
+ x=0;
+- a=($NEW_FILE $filelist)
++ a=("$NEW_FILE" $filelist)
+ match=""
+ while [ -z "$match" ]
+ do
+@@ -657,7 +663,7 @@
+ FILE_IS_CORRUPT=false
+ if $CHECK_OLD_FILE
+ then
+- file_digest=$(grep -h ${best_candidate} ${FILESDIR}/digest-* | sed -n 1p)
++ file_digest=$(grep -h ${best_candidate} "${FILESDIR}"/digest-* | sed -n 1p)
+ if [ "$file_digest" ]
+ then
+ file_md5=$(cut -d ' ' -f2 <<< "$file_digest")
+@@ -669,7 +675,7 @@
+ FILE_IS_CORRUPT=true
+ fi
+ else
+- if [ $(rev <<< ${best_candidate} | cut -d. -f2 | rev) = "tar" ]
++ if [ $(rev <<< "${best_candidate}" | cut -d. -f2 | rev) = "tar" ]
+ then
+ output "${YELLOW}Could not find a digest-file for ${CYAN}${best_candidate}${YELLOW}. Testing file integrity with tar.\n"
+ if ! tar -tf ${best_candidate} >/dev/null
+@@ -698,17 +704,16 @@
+
+ # Remember where we are, and go to a new dir there we can work
+ tmp_dwn_dest="${DISTDIR}/.getdelta-`date +%N`-tmp"
+- mkdir ${tmp_dwn_dest}
++ mkdir -- "${tmp_dwn_dest}"
+ # If user abort Ctrl+C (signal 2), remove tmp-dir; enabable trap again and send it again to stop wget
+- trap "rm -r ${tmp_dwn_dest}; trap 2; kill -2 $$" 2
+- pushd ${tmp_dwn_dest} >/dev/null 2>&1
++ trap 'rm -r -- "${tmp_dwn_dest}"; trap 2; kill -2 '$$ 2
++ pushd -- "${tmp_dwn_dest}" >/dev/null 2>&1
+
+ # thanks to MATSUI Fe2+ Tetsushi for idea and patch
+ FILESIZE=$(stat -c %s "${DISTDIR}/${best_candidate}")
+ let TIMELIMIT=${FILESIZE}/${BANDWIDTH}
+ [[ $TIMELIMIT -lt $QUEUETIMEOUT ]] && QUEUETIMEOUT=$TIMELIMIT
+-
+- if $FETCH "${DELTUP_SERVER}${query}"
++ if $FETCH "${DELTUP_SERVER}${query}" -O ${best_candidate}-${NEW_FILE}.dtu
+ then
+ # thanks to deelkar for this much more elegant solution to the "broken pipe" problem with "head -n1"
+ GOTFILE=$(ls -c | sed -n 1p)
+@@ -718,15 +723,15 @@
+ # may have sento to us.
+
+ # first: the request have been queued
+- if [ "${GOTFILE}" = "deltup-queued" ]
++# if [ "${GOTFILE}" = "deltup-queued" ]
++ if [[ "$(file -bi ${GOTFILE}|cut -d ";" -f1)" != "application/x-bzip2" && "$(cat ${GOTFILE}|cut -d "," -f1)" != "sorry" ]]
+ then
+ let QTMOUT=$(date +%s)+QUEUETIMEOUT
+- while [ -f deltup-queued ]
++ while [[ "$(file -bi ${GOTFILE}|cut -d ";" -f1)" != "application/x-bzip2" && "$(cat ${GOTFILE}|cut -d "," -f1)" != "sorry" ]]
+ do
+ output "${GREEN}destination file: ${CYAN}${NEW_FILE}\n"
+- output "${YELLOW}$(cat deltup-queued)"
+- QUEUEPOS=$(grep "has been queued" deltup-queued | cut -d. -f2 | cut -d")" -f1)
+- rm -f deltup-queued
++ output "${YELLOW}$(cat ${GOTFILE})"
++ QUEUEPOS=$(grep "has been queued" ${GOTFILE} | cut -d. -f2 | cut -d")" -f1)
+ TSTAMP=$(date +%s)
+ if ((TSTAMP<QTMOUT)) && ((QUEUEPOS<=MAXIMUM_ACCEPTABLE_QUEUEPOS))
+ then
+@@ -741,7 +746,7 @@
+ sleep 1
+ done
+ echo -n -e "${NORMAL}"
+- $FETCH "${DELTUP_SERVER}${query}"
++ $FETCH "${DELTUP_SERVER}${query}" -O ${best_candidate}-${NEW_FILE}.dtu
+ GOTFILE=$(ls -c | sed -n 1p)
+ else
+ if ((TSTAMP>=QTMOUT))
+@@ -761,20 +766,20 @@
+ done
+ fi
+
+- if [ -f ${best_candidate}-${NEW_FILE}.failed ]
++ if [ "$(cat ${GOTFILE}|cut -d "," -f1)" = "sorry" ]
+ then
+ output "\n${RED}The server could not build the dtu-file for ${NEW_FILE}\n"
+- output "${YELLOW}reason:\n${RED}$(cat ${best_candidate}-${NEW_FILE}.failed)\n"
+- rm -rf ${best_candidate}-${NEW_FILE}.failed
++ output "${YELLOW}reason:\n${RED}$(cat ${GOTFILE})\n"
++ rm -rf -- "${GOTFILE}"
+ fi
+
+- if [ -f ${best_candidate}-${NEW_FILE}.dtu ]
++ if [ -f "${best_candidate}-${NEW_FILE}.dtu" ]
+ then
+ output "${GREEN}Successfully fetched the dtu-file - let's build ${NEW_FILE}...\n"
+- downloadsize=$(stat -c %s ${best_candidate}-${NEW_FILE}.dtu)
+- if deltup -p -v -D ${DISTDIR} ${best_candidate}-${NEW_FILE}.dtu
++ downloadsize=$(stat -c %s "${best_candidate}-${NEW_FILE}.dtu")
++ if deltup -p -v -D "${DISTDIR}" "${best_candidate}-${NEW_FILE}.dtu"
+ then
+- newsize=$(stat -c %s ${NEW_FILE})
++ newsize=$(stat -c %s "${NEW_FILE}")
+ let savedsize=${newsize}-${downloadsize}
+ let percent=${savedsize}*100/${newsize}
+ unit="bytes"
+@@ -791,8 +796,8 @@
+ esac
+ output "${YELLOW}This dtu-file saved ${UCOLOR}${savedsize} ${unit} (${percent}%)${YELLOW} download size.\n"
+ fi
+- mv -f ${NEW_FILE} ${DISTDIR} &&
+- ${REMOVE_OLD} && remove "${best_candidate}"
++ mv -f -- "${NEW_FILE}" "${DISTDIR}" &&
++ ${REMOVE_OLD} && remove ${best_candidate}
+ fi
+
+ fi # if $FETCH "${DELTUP_SERVER}${query}"
+@@ -812,7 +817,7 @@
+ read
+ fi
+ popd >/dev/null 2>&1
+- rm -rf ${tmp_dwn_dest}
++ rm -rf -- "${tmp_dwn_dest}"
+ #stop respond to trap2
+ trap 2
+ fi # if ! FILE_IS_CORRUPT
+@@ -824,10 +829,10 @@
+
+ # Ok, once we are here, we should have got the delta (and used it)
+ # or we still have to download the full file
+-if ! [ -f ${DISTDIR}/${NEW_FILE} ]
++if ! [ -f "${DISTDIR}/${NEW_FILE}" ]
+ then
+ output "${RED}The dtu could not be fetched,${YELLOW} downloading full file from original URL\n"
+- $FETCH $ORIG_URI
++ $FETCHNAME "$NEW_FILE" "$ORIG_URI"
+ # remember we had a fallback to use correct exitcode for portage
+ FALLBACK=$?
+ fi
diff --git a/app-portage/getdelta/getdelta-0.7.9-r2.ebuild b/app-portage/getdelta/getdelta-0.7.9-r2.ebuild
new file mode 100644
index 000000000000..df2523078442
--- /dev/null
+++ b/app-portage/getdelta/getdelta-0.7.9-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="dynamic deltup client"
+HOMEPAGE="http://linux01.gwdg.de/~nlissne/"
+SRC_URI="http://linux01.gwdg.de/~nlissne/${PN}-0.7.8.tar.bz2"
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~sparc ~x86"
+
+RDEPEND="app-portage/deltup
+ dev-util/bdelta"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+}
+
+src_install () {
+ # portage has moved make.globals, so we just hotfix it
+ sed -i -e "s:/etc/make.globals:/usr/share/portage/config/make.globals:g" "${WORKDIR}"/getdelta.sh || die "Couldn't fix make.globals path"
+
+ # make.conf has now two locations. This should fix it ( #461726 )
+ sed -i -e "s:source /etc/make.conf:source /etc/make.conf || source /etc/portage/make.conf:" "${WORKDIR}"/getdelta.sh || die "Couldn't fix make.conf path"
+
+ sed -i -e "s:/bin/sh:/bin/bash:" "${WORKDIR}"/getdelta.sh || die
+ dobin "${WORKDIR}"/getdelta.sh || die
+}
+
+pkg_postinst() {
+ elog "You need to put"
+ elog "FETCHCOMMAND=\"/usr/bin/getdelta.sh \\\${URI}\""
+ elog "into your /etc/make.conf to make use of getdelta"
+
+ # make sure permissions are ok
+ touch "${ROOT}"/var/log/getdelta.log
+ mkdir -p "${ROOT}"/etc/deltup
+ chown -R portage:portage "${ROOT}"/{var/log/getdelta.log,etc/deltup}
+ chmod -R ug+rwX "${ROOT}"/{var/log/getdelta.log,etc/deltup}
+}
diff --git a/app-portage/getdelta/metadata.xml b/app-portage/getdelta/metadata.xml
new file mode 100644
index 000000000000..9b449d0de5af
--- /dev/null
+++ b/app-portage/getdelta/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>nlissne@linux01.gwdg.de</email>
+ <name>Nicolai Lissner</name>
+ </maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>