Open probonopd opened 7 years ago
Made an experimental AppImage using https://github.com/AppImage/AppImages/blob/master/recipes/ZeroNet.yml which bundles Python, ZeroNet, and the required libraries all into one single file that a user can download and execute. Eventually Tor could also be bundled.
More testing is required. An AppImage for testing can be downloaded from https://bintray.com/probono/AppImages/ZeroNet#files
If there is interest, it would be possible to make it work as part of the continuous Travis CI builds for HelloZeroNet/ZeroNet.
Any updates on this?
It would be nice if someone could add a pull request to make it part of Travis CI script
When running, as of today,
wget https://raw.githubusercontent.com/AppImage/AppImages/master/pkg2appimage
bash -ex pkg2appimage ZeroNet
# AppImage got produced, now let's run it
./out/ZeroNet-git.d6b7159.glibc2.15-x86_64.AppImage
then I am getting
[13:22:38] - Creating FileServer....
[13:22:38] TorManager Connecting to Tor Controller 127.0.0.1:9051
[13:22:38] TorManager Tor controller connect error: error: [Errno 111] Connection refused in TorManager.py line 170 > socket.py line 342
[13:22:38] TorManager Starting self-bundled Tor, due to Tor proxy port 127.0.0.1:9050 check error: No connection
[13:22:38] - Creating UiServer....
[13:22:38] - Unhandled exception: 'Config' object has no attribute 'ui_host'
Traceback (most recent call last):
File "zeronet.py", line 19, in main
main.start()
File "/tmp/.mount_ZeroNeSISODL/usr/share/zeronet/src/main.py", line 504, in start
actions.call(config.action, action_kwargs)
File "/tmp/.mount_ZeroNeSISODL/usr/share/zeronet/src/main.py", line 157, in call
func(**kwargs)
File "/tmp/.mount_ZeroNeSISODL/usr/share/zeronet/src/main.py", line 167, in main
ui_server = UiServer()
File "/tmp/.mount_ZeroNeSISODL/usr/share/zeronet/src/Ui/UiServer.py", line 61, in __init__
if config.ui_host:
AttributeError: 'Config' object has no attribute 'ui_host'
[13:22:38] - Unhandled exception
None
Traceback (most recent call last):
File "zeronet.py", line 91, in <module>
main()
File "zeronet.py", line 64, in main
traceback.print_exc(file=open(config.log_dir + "/error.log", "a"))
AttributeError: 'Config' object has no attribute 'log_dir'
Why? Can it be fixed?
You should remove the
- wget -q "https://raw.githubusercontent.com/probonopd/ZeroNet/b8fb53ba2027a99285fc68015293263eb2376b29/src/Config.py" -O usr/share/zeronet/src/Config.py
line from ZeroNet.yml as it overwrites the Config.py with an old version one
Thanks, this works. So it should be a matter of running (e.g., in Travis CI, but outside a Docker container)
wget https://raw.githubusercontent.com/AppImage/AppImages/master/pkg2appimage
bash -ex pkg2appimage ZeroNet
# Then upload
./out/ZeroNet-*-x86_64.AppImage
How long will it take until it gets official?
I don't know where to best hook this in...
Any chance there will ever be an official AppImage? All the work has already been done...
@HelloZeroNet
It would be nice if someone could add a pull request to make it part of Travis CI script
@HelloZeroNet might be waiting for that?
@probonopd
Any chance you can pin the python dependencies by listing their sha256 hashes in the build file among other techniques to make the appimage reproducible? Please see how Electrum BTC wallet does this for inspiration: https://github.com/spesmilo/electrum/tree/master/contrib/build-linux/appimage
Hello @HulaHoop0 thanks for your suggestion. Please have a look at https://github.com/AppImage/pkg2appimage/blob/master/recipes/ZeroNet.yml, I think it is possible to do it there. Feel free to send a pull request if you can get it working. Unfortunately I don't have the time to look into it myself currently.
The YML format is described at https://github.com/AppImage/pkg2appimage/blob/master/YML.md.
Continuation of https://github.com/HelloZeroNet/ZeroNet/issues/283 (we were told that this issue belongs into this project here).