tuxpoldo

Debian And Ubuntu Server Unofficial Packages For Bittorrent Sync

Recommended Posts

Why don't you just make a symlink yourself?


sudo rm -rf /var/lib/btsybc
sudo ln -s <wathever_the_dir_you_want> /var/lib/btsybc

morning,

i thought about a symlink too, but i think it is possible that a new user of btsync will not have the information about the processes inside that directory. it was only an idea of me to integrate it. maybe with a message like: "may be changed on systems with / on a sd-card or ssd" ;-)

Something like this... But perhaps in the next release...

thanks for your great support.

greetings

marcel_sch

Share this post


Link to post
Share on other sites

OK - now I understand your needs behind the idea of making the data path configurable. Adding the data path as a configurable parameter is not so simple as for the other parameters, since there are a lot of eventualities to keep in consideration:

  • If you offer a debconf based configuration, you should be aware of the fact that not every user is an advanced user (sysadmins prefer to do everything on their own ;-). So you must make sure, that all data entered is tested for consistency as much as possible
  • Since you can change these parameters also after the installation (using dpkg-reconfigure) you must handle also the situation where an already existing data directory has to be moved to a new location with all error possibilities this may imply...

The solution with the sybolic link is indeed a quite usual way to solve "hardcoded" paths, but in any case I will think about also adding the possibility to reconfigure the path...

Share this post


Link to post
Share on other sites

I tried your apt-source, but unfortunately, it does not work on my machines. The reason is, that debian.yeasoft.net claims to have an IPv6 address, but in fact is does not have one:

$ ping6 -n debian.yeasoft.net

PING debian.yeasoft.net(2001:4dd0:fbc4::42) 56 data bytes

^C

--- debian.yeasoft.net ping statistics ---

4 packets transmitted, 0 received, 100% packet loss, time 3023ms

$ ping -n debian.yeasoft.net

PING webhost2.yeasoft.net (77.232.232.105) 56(84) bytes of data.

64 bytes from 77.232.232.105: icmp_seq=1 ttl=53 time=8.07 ms

Share this post


Link to post
Share on other sites

I tried your apt-source, but unfortunately, it does not work on my machines. The reason is, that debian.yeasoft.net claims to have an IPv6 address, but in fact is does not have one:

Thank you for the report! The problem was an error in the firewall configuration (forgot to make the web server rules permanent). Now the site is reachable also via IPv6. Sorry for the inconvenience. I'm adding IPv6 to all my servers in the datacenter but I'm still learning ;-)

Share this post


Link to post
Share on other sites

How to set up umask for btsync in debian?

Mhhh. There is no straightforward way to achieve this... But it's an interesting question. I see that the umask can be passed to the start-stop-daemon command responsible for launching btsync in the startup script... I will think about the possibility to configure additional parameters perhaps with a sidecar-configuration file.... Stay tuned.

Share this post


Link to post
Share on other sites
I will think about the possibility to configure additional parameters perhaps with a sidecar-configuration file.
Yes, something like
"umask": 2,

in the settings.json of the transmission-daemon. On the other hand transmission-daemon starts from the name of itself, but btsync starts from the name of the root. If it matters of course... :rolleyes:

Share this post


Link to post
Share on other sites

Hi unfortunately I have a problem with the package =(

Raspberry Pi with raspbmc-rls-1.0-hardfp-b20130616-u20130616, freshly installes yesterday

I install via aptitude and debconf works fine, config files is created

first thing:

root@raspbmc:/usr/lib/btsync# service btsync restart

[ ok ] Stopping btsync instance 'debconf-default':.

[....] Autostarting btsync instance 'debconf-default':root@raspbmc:/usr/lib/btsync#

second (btsync-daemon has +x):

root@raspbmc:/usr/lib/btsync# ./btsync-daemon

bash: ./btsync-daemon: Datei oder Verzeichnis nicht gefunden

Thanks for all the work you put in this here!

SOLVED:

forgot about this little detail after executing it works =), perhals you can include it in your debconf script

ln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3

Share this post


Link to post
Share on other sites

Hi,

im very new to linux im trying to get this installed on my Pi, debian wheezy (using SSH), i seem to running into problems.

1. I first typed "sudo su" for root privileges.

2. i then typed, sudo gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15

sudo gpg --armor --export 6BF18B15 | apt-key add -

"ok" feedback

3. here is where i run into problems, i typed,

sudo echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list

"bash: lsb_release: command not found"

can someone explain what i've done wrong, thanks in advance.

Share this post


Link to post
Share on other sites

If you've done "sudo su" already, then why are you repeating sudo for the other commands?

You probably want "sudo su -" anyway, to pickup the super user environment properly.

Share this post


Link to post
Share on other sites

If you've done "sudo su" already, then why are you repeating sudo for the other commands?

You probably want "sudo su -" anyway, to pickup the super user environment properly.

Thanks, but there's still a problem with:

echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list

i keep getting "lsb_release: command not found"

Share this post


Link to post
Share on other sites

Thanks, but there's still a problem with:


echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list

i keep getting "lsb_release: command not found"

Strange, but true. It seems that your installation of debian wheezy does not contain the command lsb_release. This should not be, since lsb_release is part of the base file layout of any debian (and not only...) system. If you are really sure, that "wheezy" is the name of your release, you can also enter it manually:


echo deb http://debian.yeasoft.net/btsync wheezy main contrib non-free >> /etc/apt/sources.list.d/btsync.list

But if your debian is so different (or broken) that tehre is no lsb_release, it is likely that you will encounter more problems when trying to run btsync...

Share this post


Link to post
Share on other sites

Thanks tuxpoldo,

I managed to get it running, although when i ran "apt-get update" it did show "failed to fetch" and "404 not found".

Running "apt-get install btsync" worked like a charm.

I am running Raspbian "wheezy" on my Pi, should i be running a different OS?

The only alternative i found was Soft-float Debian "wheezy".

Share this post


Link to post
Share on other sites

INSTALLATION IN DEBIAN

Currently there are packages available for Debian squeeze, wheezy and sid supporting both i386 and amd64. A build for armhf and armel is available too for Debian Wheezy (rasbian). The packages can be easily installed by adding the btsync repository and then installing as usual:


sudo gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15
sudo gpg --armor --export 6BF18B15 | apt-key add -

sudo echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list
sudo echo deb-src http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list

sudo apt-get update
sudo apt-get install btsync

If you are not using Ubuntu or Debian or you want only to understand how this kind of deployment works, download the btsync deployment scripts here.

Do you plan to update the repository for version 1.1.22?

Share this post


Link to post
Share on other sites

Updated all packages to 1.1.22 - All Debian builds are now online. Ubuntu builds are on the way and should be online in about 1-2 hours.

Changelog:


btsync (1.1.22-1~sid) sid; urgency=low

* New upstream release
- Added support for specifying the credentials in the configuration
file using DAEMON_UID=xyz and DAEMONGID=xyz in the comments
- Added support for specifying the umask in the configuration
file using DAEMON_UMASK=nnnn in the comments
- Added debconf support for specifying the umask

-- Leo Moll <leo.moll@yeasoft.com> Sat, 29 Jun 2013 16:17:11 +0200

All the new configuration optios are not visible during initial setup (since it is only fine tuning). If you want to change these options, you have to do a


sudo dpkg-reconfigure btsync

The umask feature was inspired by acmodeu:

How to set up umask for btsync in debian?

His idea to put the information in the configuration file, did not work, since btsync does not accept unknown variables there, but inspired me to find a solution to this problem and also to improve the user and group specification. Furthermore there is now a possibility to add more configuration parameters in the future...

Share this post


Link to post
Share on other sites

I am running Raspbian "wheezy" on my Pi, should i be running a different OS?

The only alternative i found was Soft-float Debian "wheezy".

Raspbian wheezy is an excellent choice. I'm only wondering, that lsb_release is not included. It is part of the default packages installed by every debian... Very strange. I have also a Raspberry Pi with raspbian installed (I use it to build the packages), but I've not tested if lsb_release is included...

Anyway... now it works and this is the most important thing ;-)

Share this post


Link to post
Share on other sites

Strange, I've set umask to 0002 but still i'm getting drwxr-s--- on newly creadted and synced folders.

You are right. I made now some extensive tests, and I verified that btsync does something strange into the replicated folders. But let's start at the beginning: basically the feature works. Let's remember: the umask defines the bits that are masked out before creating a file/directory. That means: the standard library sets 777 as permissions for directories and 666 as permissions for files. Filtered by the default umask, this results in 755 and 644.

Basically this seems to work with btsync. If I look at the logfile (/var/lib/btsync/sync.log) I get exactly the permissions I expected:

with umask 0022:


yeasoft-gate2 /mnt/data/btsync-areas/leo # ls -la /var/lib/btsync/sync.log
-rw-r--r-- 1 root root 264 Jun 30 13:10 /var/lib/btsync/sync.log

with umask 0002:


yeasoft-gate2 /mnt/data/btsync-areas/leo # ls -la /var/lib/btsync/sync.log
-rw-rw-r-- 1 root root 264 Jun 30 13:12 /var/lib/btsync/sync.log

with umask 0000:


yeasoft-gate2 /mnt/data/btsync-areas/leo # ls -la /var/lib/btsync/sync.log
-rw-rw-rw- 1 root root 264 Jun 30 13:15 /var/lib/btsync/sync.log

The problem can be viewed in the replicated files:

with umask 0000:



yeasoft-gate2 /mnt/data/btsync-areas/leo/test # ls -la
total 16
drwxr-xr-x 3 root root 4096 Jun 30 13:30 .
drwxr-xr-x 11 root root 4096 Jun 30 13:30 ..
drwxr-xr-x 2 root root 4096 Jun 30 13:30 testumask0000
-rw-rw-r-- 1 root root 5 Jun 30 13:29 testumask0000.txt

with umask 0002:



yeasoft-gate2 /mnt/data/btsync-areas/leo/test # ls -la
total 24
drwxr-xr-x 4 root root 4096 Jun 30 13:33 .
drwxr-xr-x 11 root root 4096 Jun 30 13:30 ..
drwxr-xr-x 2 root root 4096 Jun 30 13:30 testumask0000
-rw-rw-r-- 1 root root 5 Jun 30 13:29 testumask0000.txt
drwxr-xr-x 2 root root 4096 Jun 30 13:33 testumask0002
-rw-rw-r-- 1 root root 5 Jun 30 13:32 testumask0002.txt

with umask 0022:




yeasoft-gate2 /mnt/data/btsync-areas/leo/test # ls -la
total 32
drwxr-xr-x 5 root root 4096 Jun 30 13:35 .
drwxr-xr-x 11 root root 4096 Jun 30 13:30 ..
drwxr-xr-x 2 root root 4096 Jun 30 13:30 testumask0000
-rw-rw-r-- 1 root root 5 Jun 30 13:29 testumask0000.txt
drwxr-xr-x 2 root root 4096 Jun 30 13:33 testumask0002
-rw-rw-r-- 1 root root 5 Jun 30 13:32 testumask0002.txt
drwxr-xr-x 2 root root 4096 Jun 30 13:35 testumask0022
-rw-r--r-- 1 root root 5 Jun 30 13:34 testumask0022.txt

What we see here is, that the umask feature works perfectly. None of the created files and directories contains masked out bits. But what we see here, shows also, that btsync does not create files and directories with standard permissions, but manipulates the permissions.

My theory is:

  1. btsync always creates directories with 0755 and for this reason, an umask of 0002 or 0000 does not change anything
  2. btsync always creates files with 664 and for this reason, only an umask of 0002 or 0000 changes something....

Hey BT Developers: any clues?

Share this post


Link to post
Share on other sites

Raspbian wheezy is an excellent choice. I'm only wondering, that lsb_release is not included. It is part of the default packages installed by every debian... Very strange. I have also a Raspberry Pi with raspbian installed (I use it to build the packages), but I've not tested if lsb_release is included...

Anyway... now it works and this is the most important thing ;-)

lsb_release is not included it seems, i tried a clean installation before i followed your steps i used:

sudo apt-get install lsb-release

it seems to work after that.

Share this post


Link to post
Share on other sites

I'm failing at the very first step, any idea what could be wrong? Running this on a Debian wheezy 64bit installation.


gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15
gpg: requesting key 6BF18B15 from hkp server pgp.mit.edu
?: pgp.mit.edu: Connection timed out
gpgkeys: HTTP fetch error 7: couldn't connect: Connection timed out
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

Share this post


Link to post
Share on other sites

No. From here it works. But look at the error message:


gpg: requesting key 6BF18B15 from hkp server pgp.mit.edu
?: pgp.mit.edu: Connection timed out
gpgkeys: HTTP fetch error 7: couldn't connect: Connection timed out

And now try to navigate to: http://pgp.mit.edu

If you can reach it, also


gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15

should work. If not, you have a generic connection problem to pgp.mit.edu. There may be several reasons for this:

  1. Sometimes websites are offline if they have problems with the hardware. This is only a temporary error
  2. Maybe the route from you to them is offline because of a failure in one of the routing sites. Also this is only a temporary failure
  3. Maybe you live in a country in which cryptography is forbidden and the government blocks access to sites with potential cryptographic content. Basically also this is a temporary failure, if people elects a different government or people starts a revolution ;-)

Share this post


Link to post
Share on other sites

did a bit of googling and it seems the keys are retrieved via port 11371. Key retrieved successfully.

Unfortunately, I couldn't read the first question I was asked after installation so to be safe I selected NO.

Now what are my next steps? => http://screencast.com/t/IIqgGyFakpz

Had a look at the configs and just not sure where to start...

i.e. I'd need to disable the webui since its on a server and I'm happy editing config files.

I'd also need to know if btsync really only uses ONE port? => listening_port as I'd need to configure my firewall to let btsync traffic through...

I'd be very grateful for any hints on where to start :-)

Share this post


Link to post
Share on other sites

did a bit of googling and it seems the keys are retrieved via port 11371. Key retrieved successfully.

gpg can use different protocols to retrieve keys. HTTP is one, but there is also a direct keyserver protocol that uses port 11371. The error message you got, suggests that HTTP was used as protocol...

Unfortunately, I couldn't read the first question I was asked after installation so to be safe I selected NO.

The first question asked you, if you want to define a default BitTorrent Sync instance. That means: debconf asks you a series of questions, and than it creates a configuration file for a default instance for you. This file is maintained by debconf and should not be edited manually. You can modify the configuration settings by executing the command


sudo dpkg-reconfigure btsync

Anyway you can add additional configuration files if you want to run more than one instance of btsync on a machine. The only reason to do that, usually is to have btsync to run under different user credentials.

Now what are my next steps? => http://screencast.com/t/IIqgGyFakpz

Something must be wrong with your terminal window size....

Had a look at the configs and just not sure where to start...

i.e. I'd need to disable the webui since its on a server and I'm happy editing config files.

I'd also need to know if btsync really only uses ONE port? => listening_port as I'd need to configure my firewall to let btsync traffic through...

I'd be very grateful for any hints on where to start :-)

For most people, creating the config file via debconf would be OK. But if you do not want a web gui, you must create your own configuration files manually. In this case, answering "No" to the first question, is the right choice. In order to create configuration files, you should look at the samples - especially at /etc/btsync/samples/complex.conf - a fully commented version.

For all other questions reguarding the functionality of btsync, you should post your questions in separate topics of the forum, since this topic is only related to the debian packaging itself.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.