fearedbliss

Recommended Download Link For Linux Packagers

Recommended Posts

Hello all,

 

I've been maintaining an ebuild I made when BTSync first started for Gentoo inside my overlay.

 

However, there are two problems that turn up from time to time:

 

1. I can't use the link in the front page. For example, the Linux build for 1.4.72 is available directly from the front page but it isn't available from the link I've been using to get a direct and static build:

 

Example: http://syncapp.bittorrent.com/1.4.72/btsync_x64-1.4.72.tar.gz

 

I got that link from the main thread for the latest desktop build:

 

http://forum.bittorrent.com/topic/30866-latest-desktop-build-13109/

 

2. Sometimes that link that I gave in the example doesn't have the latest available (like in this current situation).

 

What is a reliable link that I can use as a packager for pulling new builds?

 

- fearedbliss

Share this post


Link to post
Share on other sites

What is a reliable link that I can use as a packager for pulling new builds?

You can obtain static links for the latest builds for all platforms via: http://www.bittorrent.com/sync/download

 

For example, the latest Linux x64 build can be obtained via http://download-new.utorrent.com/endpoint/btsync/os/linux-x64/track/stable

Share this post


Link to post
Share on other sites

The problem is that since that link doesn't have a specific number (rather than just a -HEAD reference), I won't be able to make a build that reliable (and always) gets the same build between different points in time.

 

So using that link in February, wouldn't necessarily download the same program in June, thus causing breakage.

 

EDIT:

 

Like using this link lets me get a specific build frozen in time and it's always reproducible (Like now 1.4.72 came out but I can still get this one):

 

http://syncapp.bittorrent.com/1.3.109/

Edited by fearedbliss

Share this post


Link to post
Share on other sites

I've decided to download a copy of the btsync 1.4.72 that's on the main page and host it on my website, is this legally allowed (unmodified distribution)? Basically my ebuild is just a bash script that downloads the tarball from my website and installs it on the machine. I noticed on the link below that the person needed to put a notice saying that this is an unofficial btsync binary? It's just mirroring though so it still official, or does it mean unofficial as in that it's no longer coming from the main site?

 

Also if I need to put the notice, I'm assuming I just need to put a notice inside the bash script that is displayed before the user downloads the application?

 

http://forum.bittorrent.com/topic/31030-btsync-license/

Share this post


Link to post
Share on other sites

I have the same problem.

The version must be specified in the build script.

A repository for making all versions available would be greatly appreciated.

 

The alternative, as fearedbliss said, would be to host the tar ball ourselves.

Share this post


Link to post
Share on other sites

Today (or yesterday?) they updated the btsync version. I discovered it by casually reading this topic and then checking... This will make our work really hard. Furthermore there is no changelog...

Yes, at the moment I'm hosting renamed files on my webspace. so that I can still use the build scripts from spksrc. But this  getting on my nerves ...

 

We should write emails directly to the BitTorrent team, because at the moment we are ignored. I don't understand why the downloads aren't available on http://syncapp.bittorrent.com/1.4.75 anymore ...

 

EDIT: Or we should post here every day so this topic becomes hot ....

Share this post


Link to post
Share on other sites

Yes, at the moment I'm hosting renamed files on my webspace. so that I can still use the build scripts from spksrc. But this  getting on my nerves ...

 

We should write emails directly to the BitTorrent team, because at the moment we are ignored. I don't understand why the downloads aren't available on http://syncapp.bittorrent.com/1.4.75 anymore ...

 

EDIT: Or we should post here every day so this topic becomes hot ....

 

Same problem, same solution  :P  Look: http://archive.yeasoft.net/btsync/

 

And this was my nice (not any more working) script for creating the source archive for Debian packaging:

 

#!/bin/bash# base download locationsBASE_BIN_LOCATION=http://syncapp.bittorrent.comBASE_DOC_LOCATION=http://btsync.s3-website-us-east-1.amazonaws.comfunction cleanup_temp() {	for ARCH in arm powerpc geode i386 x64 freebsd_i386 freebsd_x64; do		rm -f btsync_${ARCH}-${VERSION}.tar.gz	done	rm -rf temp-btsync}function move_dest() {	if [ -d ${VERSION} ]; then		rm -rf "${VERSION}"	fi	mkdir -p "${VERSION}"	mv temp-btsync/btsync-common/BitTorrentSyncUserGuide.pdf "${VERSION}"	for ARCH in arm powerpc geode i386 x64 freebsd_i386 freebsd_x64; do		mv btsync_${ARCH}-${VERSION}.tar.gz "${VERSION}"	done	mv btsync-${BINVERSION}.tar.gz btsync-common_${BINVERSION}.orig.tar.gz "${VERSION}"}function get_downloads() {	echo "Getting BitTorrentSyncUserGuide.pdf"	if ! wget -q ${BASE_DOC_LOCATION}/BitTorrentSyncUserGuide.pdf; then		echo "Failed to get BitTorrentSyncUserGuide.pdf" >&2		return 1	fi	mkdir -p temp-btsync/btsync	mv BitTorrentSyncUserGuide.pdf temp-btsync/btsync	for ARCH in arm powerpc geode i386 x64 freebsd_i386 freebsd_x64; do		case ${ARCH} in		x64)			DEST=amd64			;;		freebsd_i386)			DEST=kfreebsd-i386			;;		freebsd_x64)			DEST=kfreebsd-amd64			;;		*)			DEST=${ARCH}			;;		esac		echo "Getting btsync_${ARCH}-${VERSION}.tar.gz"		if ! wget -q ${BASE_BIN_LOCATION}/${VERSION}/btsync_${ARCH}-${VERSION}.tar.gz; then			echo "Failed to get btsync_${ARCH}-${VERSION}.tar.gz" >&2			return 1		fi		mkdir -p temp-btsync/btsync/${DEST}		if ! tar xzf btsync_${ARCH}-${VERSION}.tar.gz -C temp-btsync/btsync/${DEST}; then			echo "Failed to extract btsync_${ARCH}-${VERSION}.tar.gz" >&2			return 1		fi		touch -r temp-btsync/btsync/${DEST}/btsync temp-btsync/btsync/${DEST}		touch -r temp-btsync/btsync/${DEST}/btsync temp-btsync/btsync	done	return 0}if [ -z $1 ]; then	echo 'USAGE: makesrcarchive <version>'	exit 1;fiVERSION=$1if ! get_downloads; then	cleanup_temp	exit 1;fiif [ "$2" != "-d" ]; then	# get the real version number from binary	# BINVERSION=$(temp-btsync/btsync/amd64/btsync --help | grep "BitTorrent Sync" | cut -d' ' -f 3)	BINVERSION=${VERSION}	# rename source directory	mv temp-btsync/btsync temp-btsync/btsync-common	# create archive	echo "Creating source archive btsync-${BINVERSION}.tar.gz"	tar czf btsync-${BINVERSION}.tar.gz -C temp-btsync btsync-common	touch -r temp-btsync/btsync-common btsync-${BINVERSION}.tar.gz	echo "Creating symbolic link to .orig archive"	ln -sf btsync-${BINVERSION}.tar.gz btsync-common_${BINVERSION}.orig.tar.gz	touch -h -r temp-btsync/btsync-common btsync-common_${BINVERSION}.orig.tar.gz	# move to destination	move_destfi# tidy upcleanup_temp

Share this post


Link to post
Share on other sites

I have the same issue.

 

I'm maintaining btsync recipe layer (meta-btsync) for OpenEmbedded/Angstrom Linux at http://github.com/imyller/meta-btsync

 

The tuxpoldo/Yeasoft archive is a great alternative and a download mirror (Thank you for that!) but I think everyone here agrees that there should be an official bittorrent.com hosted repository.

 

 

 

 

Share this post


Link to post
Share on other sites

Folks,

 

Please see 1.4.72 and 1.4.75 builds available on syncapp.bittorrent.com. Publicly released builds will be available on syncapp.bittorrent.com in future.

Share this post


Link to post
Share on other sites

Please see 1.4.72 and 1.4.75 builds available on syncapp.bittorrent.com. Publicly released builds will be available on syncapp.bittorrent.com in future.

 

Bravo!!! We love you!

Share this post


Link to post
Share on other sites

Hello guys,

 

I'm scraping the version number from the download webpage... I hope it is in sync with syncapp.bittorrent.com :)

 

Here is my (beta quality) slackbuild:

#!/bin/sh# Slackware build script for btsync## Copyright 2014 Elfo <jmfl {at} sapo [dot] pt># All rights reserved.## Redistribution and use of this script, with or without modification, is# permitted provided that the following conditions are met:## 1. Redistributions of this script must retain the above copyright#    notice, this list of conditions and the following disclaimer.## THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.PRGNAM=btsyncBUILD=${BUILD:-1}TAG=${TAG:-_elfo}if [ -z "$ARCH" ]; then  case "$( uname -m )" in    i?86) ARCH=i386 ;;    arm*) ARCH=arm ;;       *) ARCH=$( uname -m ) ;;  esacfiCWD=$(pwd)TMP=${TMP:-/tmp}PKG=$TMP/package-$PRGNAMOUTPUT=${OUTPUT:-/tmp}# this is here because x64 does not conform with the output of uname -mif [ "$ARCH" = "x86_64" ]; then  BTARCH="x64"else  BTARCH=$ARCHfiset -eVERSION=$(curl http://www.bittorrent.com/sync/download | grep "linux-$BTARCH" | grep -o '<span>.*</span>' | sed 's/\(<span>\|<\/span>\)//g')wget syncapp.bittorrent.com/$VERSION/btsync_$BTARCH-$VERSION.tar.gzrm -rf $PKGmkdir -p $TMP $PKG $OUTPUTcd $TMPrm -rf $PRGNAM-$VERSIONmkdir -p $TMP/$PRGNAM-$VERSIONcd $PRGNAM-$VERSIONtar xvf $CWD/btsync_$BTARCH-$VERSION.tar.gzchown -R root:root .find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \;mkdir -p $PKG/usr/bin/ $PKG/usr/doc/$PRGNAM-$VERSION $PKG/installcp -a LICENSE.TXT $CWD/README\      $PKG/usr/doc/install -m 0755 btsync $PKG/usr/bin/btsynccat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuildcat $CWD/slack-desc > $PKG/install/slack-desccd $PKG/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

 

Share this post


Link to post
Share on other sites

I'm scraping the version number from the download webpage... I hope it is in sync with syncapp.bittorrent.com :)

Please be aware that the main download site (www.bittorrent.com/sync/download) and the site where direct download links are published (syncapp.bittorrent.com/x.x.x) are generally not both updated at the same time! They can often be several days or more out of sync.

Share this post


Link to post
Share on other sites

That is unfortunate, as there is no easy way to automatically find the version number of the latest build.

Maybe a fix would be to have a "syncapp.bittorrent.com/latest/" that would be linked to whatever version happened to be the latest on syncapp.bittorrent.com

 

The idea is to place a script on an hourly cron job to check your server for a change in the latest version number. If version changes, download tarball and rebuild slackware package.

Share this post


Link to post
Share on other sites

@elfo

You can simply find the latest available on syncapp.bittorrent.com. It returns "File not found text" if version does not exist and version does not hop more than 15-20 builds at a time.

Share this post


Link to post
Share on other sites

@RomanZ

 

I think it would be far more elegant to get the version right away with something like

curl "http://syncapp.bittorrent.com/latest/" | grep "Sync version" | sed 's/\(<h3>\|<\/h3>\)//g' | cut -d " " -f 3

...than hammering your webserver 15 to 20 times hoping to get a hit instead of a "file not found".

 

It would be greatly appreciated, by all package builders, if you help us make the process of building the bittorrent sync package for our distros fully automated :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.