4c3e / rnsup.sh

Reticulum install tool for Debian/Ubuntu/Raspbian
MIT License
3 stars 1 forks source link

Add to dependencies: libffi-dev rustc libssl-dev #1

Open tabbyrobin opened 2 years ago

tabbyrobin commented 2 years ago

On my system these were missing and script failed without them: sudo apt install libffi-dev rustc libssl-dev

P.S. Thanks for making this script! Incidentally, after installing those deps manually, it worked on my system (Debian 10), with stock debian rustc (I did not have to use rustup).

markqvist commented 2 years ago

What kind of system was this, if you dont mind sharing? It would be ideal if we could detect whether they are actually needed before installing, since they should only be necessary on systems that dont have precompiled wheels for pyca/cryptography.

tabbyrobin commented 2 years ago

I'm guessing the issue is due to Debian 10 being quite old now? This system is Debian 10 in a VM inside Qubes OS. Generally qubes vms just use normal x86_64 binary packages.

Preinstalled cryptography on this system is version 2.6.1. pip3 install cryptography --upgrade --only-binary :all: gets me cryptography 3.3.2. Pypi rns pkg seems to want cryptography>=3.4.7.

As a sidenote: the instructions on cryptography website say that the rustc toolchain on debian 10 is too old to compile cryptography, and that you have to use rustup. (But, they say, debian 11 rust is new enough.) But I was able to get it to work with stock d10 rustc.

Perhaps rnsup.sh could: 1) first try pip3 install rns --only-binary :all: (or even pip3 install rns --only-binary cryptography) 2) if that fails, then apt-get install libffi-dev libssl-dev (and maybe rustc, or maybe use rustup) 3) then try again pip but accepting sdist this time pip3 install rns

markqvist commented 2 years ago

Preinstalled cryptography on this system is version 2.6.1.

Hmm, yeah, that is quite old. The absolute minimum that RNS will support is 2.8, but I really recommend going with a newer version if possible.

But I was able to get it to work with stock d10 rustc

This is good info, nice to know!

I think the approach you outlined sounds reasonable. There is also sometimes a binary package in the package repository of the distro, but I don't remember if that is the case for Debian 10, and I don't have access to a d10 box right now. It is usually called something like python3-cryptography. It might be worth investigating if that is also the case on d10.

There is also the rnspure package (full software implementation of RNS, no binary dependencies), but it should really only be used in extreme cases at the moment, due to a variety of factors, including a quite severe performance hit, and rather unproven cryptographic primitives.