dyne / tomb

the Crypto Undertaker
https://dyne.org/software/tomb
GNU General Public License v3.0
1.32k stars 151 forks source link

cloakify support: update to python3 #474

Closed Narrat closed 3 months ago

Narrat commented 1 year ago

Old title: Remove python2 or update to python3

While looking into various cases I noticed that tomb checks for python2. Which is EOL, deprecated, dead, whatever. Either remove any reference or if it is really needed update it to python3.

Edit: Reason being cloakify. Not sure if it was really needed to check for python2 if there is a check on cloakify itself. Regardless. Point being python2 is EOL. And distributions are dropping the support. I know that Arch and Fedora already removed it.

Occurence in the codebase:

$ rg python2 .
./doc/tomb.1
218:consequently \fIpython2\fR. This function does not support asymmetric

./extras/dismissed/qt/Makefile
6:  python2 -3 tombqt/create.py
8:  python2 -3 tombqt/open.py

./extras/dismissed/INSTALL.python
14:package python-qt4 in debian or ubuntu, python2-pyqt in archlinux.  If you are
23:2. do `sudo python2 setup.py install'
28:2. do `python2 setup.py build_ui'
29:3. do `sudo python2 setup.py install'

./extras/install_cloakify.sh
7:python2 $PWD/extras/cloakify/cloakify.py $@" > /usr/bin/cloakify
9:python2 $PWD/extras/cloakify/decloakify.py $@" > /usr/bin/decloakify

./extras/test/Dockerfile
5:RUN apt-get install -y -q zsh cryptsetup gpg gawk libgcrypt20-dev steghide qrencode python python2.7 python3-pip python3-dev libssl-dev make gcc sudo gettext bsdmainutils file pinentry-curses xxd libsodium23 libsodium-dev doas

./extras/test/setup
55:command -v python2 > /dev/null && test_set_prereq PYTHON2

./tomb
1017:   # Check for python2
1018:   command -v python2 -V 1>/dev/null 2>/dev/null || PYTHON2=0
$ rg PYTHON2 .
./tomb
1018:   command -v python2 -V 1>/dev/null 2>/dev/null || PYTHON2=0

./extras/test/80_steganography.sh
68:if test_have_prereq PYTHON2 CLOAKIFY DECLOAKIFY; then

./extras/test/setup
55:command -v python2 > /dev/null && test_set_prereq PYTHON2

Edit: As it seems to be related to cloakify

$ rg cloakify .
./ChangeLog.md
76:integration of cloakify to support new cloak/uncloak commands that

./doc/tomb.1
217:places; it depends from the availability of \fIcloakify\fR and

./tomb
1019:   # Check for cloakify
1020:   command -v cloakify 1>/dev/null 2>/dev/null || CLOAKIFY=0
1021:   # Check for decloakify
1022:   command -v decloakify 1>/dev/null 2>/dev/null || DECLOAKIFY=0
1833:# Requires cloakify to be installed
1837:cloakify_key() {
1864:   cloakify $TOMBKEYFILE $cipher >$destfile
1866:       _warning "Encoding error: cloakify reports problems."
1879:decloakify_key() {
1919:   decloakify $textfile $cipher >$destkey
3569:           cloakify_key $PARAM
3575:               _failure "Decloakify not installed: cannot decipher keys from texts" }
3576:           decloakify_key $PARAM

./extras/install_cloakify.sh
3:wget https://github.com/TryCatchHCF/Cloakify/archive/v1.0.3.tar.gz -O /tmp/cloakify.tar.gz
4:mkdir -p extras/cloakify
5:tar -xvf /tmp/cloakify.tar.gz --strip-components=1 -C $PWD/extras/cloakify
7:python2 $PWD/extras/cloakify/cloakify.py $@" > /usr/bin/cloakify
9:python2 $PWD/extras/cloakify/decloakify.py $@" > /usr/bin/decloakify
10:chmod +x /usr/bin/cloakify
11:chmod +x /usr/bin/decloakify

./extras/test/setup
56:command -v cloakify > /dev/null && test_set_prereq CLOAKIFY
57:command -v decloakify > /dev/null && test_set_prereq DECLOAKIFY
Narrat commented 1 year ago

Related: https://github.com/dyne/Tomb/pull/342 https://github.com/TryCatchHCF/Cloakify/pull/1 https://github.com/TryCatchHCF/Cloakify/pull/4 https://github.com/TryCatchHCF/Cloakify/pull/9

Narrat commented 1 year ago

Maybe update/switch to https://github.com/asrabon/Cloakify-3 ? Any comment in this regard @heat-wave? As this was your child, maybe you have better insight? :)

jaromil commented 3 months ago

@heat-wave seems to have stopped any activity on github since to years now, really hope he is well and sound ❤️. Lets move forward with this update meanwhile

jaromil commented 3 months ago

fixed in 44d7f5fb6b7fd76fcc69fa1c208ec9e01523b8ec