dreamer / boxtron

Steam Play compatibility tool to run DOS games using native Linux DOSBox
https://luxtorpeda.gitlab.io/
GNU General Public License v2.0
404 stars 5 forks source link

FAIL: test_verify_preconfig #54

Open xiota opened 9 months ago

xiota commented 9 months ago

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
Kristinaa78 commented 9 months ago

Same problem here; however, putting unpacked tarball to compatibilitytools.d worked like a charm.

Dpbm commented 9 months ago

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:

  1. downgrade the tar version
  2. 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:

  1. download the .tar.xz file from the GNU website
  2. unpack it
    tar xvf tar-1.34.tar.xz
    cd ./tar-1.34
  3. 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

4. And finally, go to the `boxtron directory` and run 
```bash
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:

  1. Change the constant in the code and put the exact used version of tar in the README.md.
  2. add the tar binary together with the code, then, for building, use it instead of the user's system one.
xiota commented 9 months ago

Is this a tar bug that needs to be reported to them?

Dpbm commented 9 months ago

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.