raspiblitz: Tor repo doesn't support architecture 'armhf' (32bit ARM) - need to compile from source?

This is a possible issue for all newly set up Tor nodes:

$ sudo apt update
                                     
Hit:5 https://deb.torproject.org/torproject.org buster InRelease                   

N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'https://deb.torproject.org/torproject.org buster InRelease' doesn't support architecture 'armhf'

Reported in RaspiBolt: https://github.com/Stadicus/RaspiBolt/issues/656

If this remains to be an issue there are two obvious solutions:

Methods to compile Tor from source:

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Adding [arch=arm64] seems to help:

cat /etc/apt/sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian buster main contrib non-free
#deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free
#deb-src http://deb.debian.org/debian buster-updates main contrib non-free

deb [arch=arm64] https://deb.torproject.org/torproject.org buster main
deb-src [arch=arm64] https://deb.torproject.org/torproject.org buster main

Then I get no warnings.

admin@raspberrypi:~ $ sudo apt update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 http://archive.raspberrypi.org/debian buster InRelease
Get:5 https://deb.torproject.org/torproject.org buster InRelease [3,524 B]
Get:6 https://deb.torproject.org/torproject.org buster/main Sources [1,250 B]
Get:7 https://deb.torproject.org/torproject.org buster/main arm64 Packages [2,392 B]
Fetched 7,166 B in 2s (3,530 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

On a fresh 1.7.1 image I did:

sudo apt-get purge ".*:armhf"
sudo dpkg --remove-architecture armhf
sudo apt update
sudo apt full-upgrade

raspiblitz is runing fine so far.

Compiled Tor with this simple script (from https://2019.www.torproject.org/docs/debian#source):

$ cat tor.sh
dpkg -l tor

apt install -y build-essential fakeroot devscripts
apt build-dep -y tor deb.torproject.org-keyring
mkdir ~/debian-packages; cd ~/debian-packages
apt source tor
cd tor-*
debuild -rfakeroot -uc -us
cd ..
dpkg -i tor_*.deb

dpkg -l tor

on a RPi4 4GB upgraded Tor successfully (the node is up and running):

$ time sudo bash tor.sh
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-===================================
ii  tor            0.3.5.10-1   armhf        anonymizing overlay network for TCP

...

(Reading database ... 108632 files and directories currently installed.)
Preparing to unpack tor_0.4.4.5-1~d10.buster+1_armhf.deb ...
Unpacking tor (0.4.4.5-1~d10.buster+1) over (0.3.5.10-1) ...
Setting up tor (0.4.4.5-1~d10.buster+1) ...
Installing new version of config file /etc/init.d/tor ...
Installing new version of config file /etc/logrotate.d/tor ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                Architecture Description
+++-==============-======================-============-===================================
ii  tor            0.4.4.5-1~d10.buster+1 armhf        anonymizing overlay network for TCP

real	26m37.872s
user	36m28.415s
sys	4m0.555s

Question is if we should take up with the 36 mins build time or maybe should ship the tor_*.debs on the SDcard (compile in the build_sdcard.sh) even if it is not active by default (before v1.7)?

I merged the PR 1769 and for the next v1.6.2 release sd card image I will run once manually the update so that the self buil packages will already we on the sd card. Putting on final testing for RC1.

@openoms is there a specific feature/setting that we want/need from tor 0.4.X ? Or could we live with 0.3.5?