Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAIL: test_verify_preconfig #54

Open
xiota opened this issue Sep 27, 2023 · 4 comments
Open

FAIL: test_verify_preconfig #54

xiota opened this issue Sep 27, 2023 · 4 comments
Labels
compatibility report Game compatibility reports

Comments

@xiota
Copy link

xiota commented Sep 27, 2023

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
@xiota xiota added the compatibility report Game compatibility reports label Sep 27, 2023
@Kristinaa78
Copy link

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

@Dpbm
Copy link

Dpbm commented Oct 2, 2023

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
  1. 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
  1. 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:

  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
Copy link
Author

xiota commented Oct 2, 2023

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

@Dpbm
Copy link

Dpbm commented Oct 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility report Game compatibility reports
Projects
None yet
Development

No branches or pull requests

3 participants