boxtron
boxtron copied to clipboard
FAIL: test_verify_preconfig
Attempting to build using aur/boxtron and aur/boxtron-git.
FAIL: test_verify_preconfig (test_preconfig.TestPreconfig.test_verify_preconfig)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/main-builder/pkgwork/src/boxtron/tests/test_preconfig.py", line 44, in test_verify_preconfig
self.assertEqual(preconfig.CHECKSUM, preconfig.__checksum__())
AssertionError: 'c0452d6addcde172b71cac7b339e074f5f13a7ad83f2ee4736d47025dcbc760e' != '17bf9cedc6e694983eb2a49c2add264b0e84c4efd3b1fba307cfcab5e21843e5'
- c0452d6addcde172b71cac7b339e074f5f13a7ad83f2ee4736d47025dcbc760e
+ 17bf9cedc6e694983eb2a49c2add264b0e84c4efd3b1fba307cfcab5e21843e5
Same problem here; however, putting unpacked tarball to compatibilitytools.d
worked like a charm.
Hey guys, I had the same problem with hash mismatch. After some investigation I think that I found the solution.
I've tried some different approaches to solve it. First of all I've thought that just changing the CHECKSUM
constant from the preconfig.py
file could solve it, but actually, after testing in different operational systems, the tests passed in one of them, but not in the other.
So, I went more deeply in the code, and after some time I've figured out that maybe the problem here is the tar
version. I've tested with the version 1.35
and this one produced the wrong HASH, but the version 1.34
raised the correct result.
So, there're two possible approaches to solve it:
- downgrade the tar version
- update the hash constant
Before a pull request, to pass the test, either change the constant from
CHECKSUM = 'c0452d6addcde172b71cac7b339e074f5f13a7ad83f2ee4736d47025dcbc760e'
to
CHECKSUM = '17bf9cedc6e694983eb2a49c2add264b0e84c4efd3b1fba307cfcab5e21843e5'
or downgrade the tar
command.
To do that, just download the version 1.34
from here, and the compile all the source code. You can follow the INSTALL
guide that comes with the source but, for a simpler example, just do the following:
- download the
.tar.xz
file from theGNU
website - unpack it
tar xvf tar-1.34.tar.xz
cd ./tar-1.34
- build it
mkdir -p $HOME/old-tar
mkdir -p $HOME/tar-1.34
sudo mv /usr/bin/tar $HOME/old-tar
./configure --prefix=$HOME/tar-1.34
make
make install
sudo ln -s $HOME/tar-1.34/bin/tar /usr/bin
- And finally, go to the
boxtron directory
and run
make test
Actually to solve it permanently it's a little tricky, once it depends of the user system, I have two ideas in mind:
- Change the constant in the code and put the exact used
version of tar
in theREADME.md
. - add the
tar
binary together with the code, then, for building, use it instead of the user's system one.
Is this a tar
bug that needs to be reported to them?
I actually don't know if it's a bug, or they just improved their compression algorithm and, because of it, it's causing a hash mismatch.
Might the problem here is to use tar
instead of others, like zip
, rar
, etc.