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

build/debian/makedist_debian.sh: [Errno 2] No such file or directory: '.TriblerVersion' #7047

Closed
LillyWho opened this issue Sep 11, 2022 · 3 comments · Fixed by #7244
Closed
Assignees

Comments

@LillyWho
Copy link

LillyWho commented Sep 11, 2022

From a fresh clone, the expected file doesn't exist, so the script build/update_version_from_git.py fails

INFO:__main__:Arguments: Namespace(repo='.') Traceback (most recent call last): File "/home/lilly/tribler/build/update_version.py", line 21, in <module> ref_name = Path('.TriblerVersion').read_text().rstrip('\n') File "/usr/lib/python3.10/pathlib.py", line 1132, in read_text with self.open(mode='r', encoding=encoding, errors=errors) as f: File "/usr/lib/python3.10/pathlib.py", line 1117, in open return self._accessor.open(self, mode, buffering, encoding, errors, FileNotFoundError: [Errno 2] No such file or directory: '.TriblerVersion'

@LillyWho
Copy link
Author

So the .TriblerVersion and .TriblerCommit files are missing because the script build/update_version_from_git.py doesn't exist anymore and build/update_version.py is expecting those files to be there when they aren't, and running it after creating empty files by that name does nothing.

Seems the build guide for Debian needs an overhaul

@xoriole
Copy link
Contributor

xoriole commented Sep 20, 2022

@LillyWho The process of building Tribler for different operating systems was recently refactored and the step for generating the version from the latest git tag is separated. Further Linux build is done using Github Actions workflow. You can find out the build instructions here: https://github.com/Tribler/tribler/blob/main/.github/workflows/build_ubuntu.yml

To create the build locally, you'll need to run the following commands from Tribler project directory:

git describe | python -c "import sys; print(next(sys.stdin).lstrip('v'))" > .TriblerVersion

git rev-parse HEAD > .TriblerCommit

export "TRIBLER_VERSION=$(head -n 1 .TriblerVersion)"

./build/debian/makedist_debian.sh

Seems the build guide for Debian needs an overhaul

Good point! the documentation should be updated here: https://tribler.readthedocs.io/en/latest/building/building.html

@xoriole xoriole self-assigned this Sep 20, 2022
@LillyWho
Copy link
Author

I did manage in the end by taking a mild guess at what those files should contain, pasting accordingly the version and commit and running again. Probably roughly the same as what you did there. Seems to me like the script needs to have that extra step added. That would make things easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants