Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
clients:ratox [2015/09/08 01:00] cmotcclients:ratox [2015/09/23 06:30] (current) – [debootstrap/chroot method(Debian, Ubuntu, etc only] fixed a typo I missed a second ago cmotc
Line 14: Line 14:
  
 ===== Features ===== ===== Features =====
-1 v 1 messaging: Yes + 
-File transfer: Yes +  * 1 v 1 messaging: Yes 
-Group chat: No +  File transfer: Yes 
-Audio: Yes +  Group chat: No 
-Video: No +  Audio: Yes 
-DNS discovery: No +  Video: No 
-Chat logs: Yes +  DNS discovery: No 
-Proxy support: Yes +  Chat logs: Yes 
-Offline message: Yes +  Proxy support: Yes 
-Offline transfers: Yes +  Offline message: Yes 
-Contact aliases: No +  Offline transfers: Yes 
-Contact blocking: No +  Contact aliases: No 
-Save file encryption: Yes +  Contact blocking: No 
-Multilingual: No +  Save file encryption: Yes 
-Multiprofile: Yes +  Multilingual: No 
-Typing notification: No +  Multiprofile: Yes 
-Audio notifications: No +  Typing notification: No 
-Emoticons: No +  Audio notifications: No 
-Spell check: No +  Emoticons: No 
-Desktop sharing: No +  Spell check: No 
-Inline images: No +  Desktop sharing: No 
-File resuming: No +  Inline images: No 
-Read receipts: No +  File resuming: No 
-Message splitting: Yes +  Read receipts: No 
-Changing nospam: Yes +  Message splitting: Yes 
-toxi URI: No+  Changing nospam: Yes 
 +  * tox URI: No
  
 NOTE: Some of these features are not intended to be developed NOTE: Some of these features are not intended to be developed
Line 47: Line 48:
 ===== Installation ===== ===== Installation =====
  
 +ratox has not been updated to use the new Tox API yet, and must be compiled against the old api, which is available here [[https://github.com/irungentoo/toxcore/releases/tag/api_old_version|here]] as a zip and as a tar.gz file. However, installing the old API alongside the contemporary API can be confusing and potentially cause conflicts. There are a few ways to work around this and get a binary of ratox running.
 +
 +==== debootstrap/chroot method(Debian, Ubuntu, etc only) ====
 +
 +This one is time and space consuming, but it's also relatively easy and offers an environment in which you can continue to build against the old API for as long as it works. As of the time of this posting(2015/9/23), it's still possible to send messages between an official version of nTox from the Debian repo and a home-compiled version of ratox built in a chroot. This means that the old API still works, for now. For any fledgling programmers and admins new to the concept of a chroot, it's a way of using a directory on your computer as if it were your root filesystem, which allows you to install the dependencies you'll need to build ratox without interfering with your real root system. 
 +
 +=== Step Zero, install dependencies ===
 +
 +You'll need to install the debootstrap and chroot packages from your package manager. Just do
 +
 +<code>
 +    sudo apt-get install debootstrap chroot
 +</code>
 +
 +or install via your own preferred package manager.
 +
 +=== Step one, use debootstrap to create a system to chroot into ===
 +
 +First, create a folder for holding your old Tox API project workspace. This will be the base of your chroot filesystem.
 +
 +<code>
 +    mkdir -p ~/oldtox_workspace/
 +</code>
 +
 +Next, use debootstrap to install a basic filesystem into that folder. debootstrap will retrieve and set up a base Debian system into the workspace folder.
 +
 +<code>
 +    sudo debootstrap <your-distribution-codename> oldtox_workspace
 +</code>
 +
 +=== Step two, prepare to connect to the chroot environment ===
 +
 +You'll have to mount the /proc and /sys pseudo-filesystems in your guest before you can compile ratox. You can do this two ways, depending on what you need.
 +
 +== 2.a If you are experimenting with the old Tox API or are updating software that used it to the new Tox API. ==
 +
 +If you are going to be using the old Tox API frequently, then you may be better off adding your chroot's /proc and /sys pseudo-filesystems using your base system's /etc/fstab. This will cause them to be mounted automatically.
 +
 +<code>
 +    proc /home/you/oldtox_workspace/proc proc defaults 0 0
 +    sysfs /home/you/oldtox_workspace/sys sysfs defaults 0 0
 +</code>
 +
 +== 2.b If you just want Ratox again. ==
 +
 +If you're just wanting an environment to compile Ratox in so you can use it, perhaps to write more [[http://git.2f30.org/ratox-nuggets/|nuggets]] or even something like [[https://github.com/Paraknight/catox|Catox, a Ratox-Based Tox client]], then I recommend creating a helper script which you can run to mount the pseudo-filesystems and launch into the chroot automatically.
 +
 +<code>
 +    #! /bin/sh
 +    sudo mount proc $HOME/oldtox_workspace/proc -t proc
 +    sudo mount sysfs $HOME/oldtox_workspace/sys -t sysfs
 +    sudo chroot oldtox_workspace
 +</code>
 +
 +=== Step three, install build dependencies in the chroot ===
 +
 +<code>
 +    apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm libsodium13 libsodium-dev
 +</code>
 +
 +If you're running an oldstable or LTS, your distribution's package manager may not have libsodium yet. You can do a couple of things to change that, and since you're in a chroot the consequences are pretty minimal. If you can't install libsodium from your package manager, you're choices are to:
 +
 +== 3.a Install it from source ==
 +
 +libsodium has minimal dependencies and compiles in the pretty much the classic autoreconf, make, make install pattern.
 +
 +<code>
 +    git clone git://github.com/jedisct1/libsodium.git
 +    cd libsodium
 +    git checkout tags/1.0.3
 +    ./autogen.sh
 +    ./configure
 +    make check
 +    sudo make install
 +    cd ..
 +</code>
 +
 +== 3.b Install it from Jessie repositories using apt-pinning ==
 +
 +You can also get it from Jessie while still keeping most of your system on oldstable.
 +<code>
 +    echo "deb http://ftp.debian.org/debian jessie main" | tee /etc/apt/sources.list.d/jessie.list
 +</code>
 +
 +And make sure that apt knows to only use Jessie's packages when instructed to.
 +<code>
 +    echo "Package: *
 +    Pin: release a=oldstable
 +    Priority: 999
 +
 +    Package: *
 +    Pin: release a=stable
 +    Priority: 500
 +    " | tee /etc/apt/preferences
 +</code>
 +
 +**Remember these steps are only necessary on oldstable(Debian 7 "Wheezy") and older versions of Ubuntu.**
 +
 +You'll also need to install the Tox AV libraries to build ratox. Here's how to work out it's dependencies, including on older versions Debian based systems.
 +
 +<code>
 +    sudo apt-get install libopus-dev libvpx-dev pkg-config
 +</code>
 +
 +If you're on an older version of Ubuntu and you do not have access to libopus through the repositories, the simplest way to get it is though the Ubuntu SDK team's private package archive. Only follow these steps if you don't have access to the packages through your repository.
 +
 +== 3.c libopus backport, the Ubuntu way ==
 +<code>
 +    sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get dist-upgrade
 +    sudo apt-get install libopus-dev
 +</code>
 +
 +
 +== 3.d libvpx is available all the way back in squeeze, but if you need a newer version then you can always build it from source or add it from Jessie using backports as well(See above). ==
 +
 +<code>
 +    git clone https://chromium.googlesource.com/webm/libvpx
 +    cd libvpx
 +    ./configure
 +    make -j3
 +    sudo make install
 +    cd ..
 +</code>
 +
 +== If you're using Debian Squeeze, you may need to compile libvpx from source or install it from squeeze-backports. The instructions for using a backports repository are identical to the instructions for using a distribution repository like Jessie (See above). ==
 +
 +<code>
 +    wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz
 +    tar xvzf opus-1.0.3.tar.gz
 +    cd opus-1.0.3
 +    ./configure
 +    make -j3
 +    sudo make install
 +    cd ..
 +</code>
 +
 +=== Step Four, download and build the old Tox API ===
 +
 +For this part, we first need to retrieve the old Tox API. It's available as a [[https://github.com/irungentoo/toxcore/releases/tag/api_old_version|"Release" from Github, dated March 11.]]
 +
 +From within your chroot, wget the old API as a tar.gz.
 +
 +<code>
 +    wget https://github.com/irungentoo/toxcore/archive/api_old_version.tar.gz
 +</code>
 +
 +Now untar and gunzip it.
 +
 +<code>
 +    tar -xvzf api_old_version.tar.gz -C toxcore-old
 +    cd toxcore-old
 +</code>
 +
 +Finally, you can just compile and install toxcore.
 +
 +<code>
 +    autoreconf -i
 +    ./configure
 +    make
 +    sudo make install
 +</code>
 +
 +=== Step five, compile and install ratox ===
 +
 +All that work you just did makes this step really, really easy. Just
 +
 +<code>
 +    git clone git://git.2f30.org/ratox
 +    cd ratox
 +    make
 +    sudo make install
 +</code>
 +
 +and that's it. You now have a ratox binary you can use, study, modify, or package as you see fit.
 ===== Usage ===== ===== Usage =====
  
Print/export