Xpra-org / xpra-html5

HTML5 client for Xpra
Mozilla Public License 2.0
209 stars 55 forks source link

Release v11 can't be installed due to the missing `.git` folder #282

Closed Rush-iam closed 8 months ago

Rush-iam commented 8 months ago

I get a new Xpra Client from the releases GitHub page and it does not contain the .git folder, so I am getting:

# python setup.py install
Warning: could not get branch information
Error: git describe --always --tags returned 128
Traceback (most recent call last):
  File "/tmp/tmp.ys1CoF00VC/setup.py", line 617, in <module>
    sys.exit(main(sys.argv))
  File "/tmp/tmp.ys1CoF00VC/setup.py", line 568, in main
    record_vcs_info()
  File "/tmp/tmp.ys1CoF00VC/setup.py", line 134, in record_vcs_info
    info = get_vcs_info()
  File "/tmp/tmp.ys1CoF00VC/setup.py", line 103, in get_vcs_info
    parts = get_output_line("git describe --always --tags").split("-")
AttributeError: 'NoneType' object has no attribute 'split'

I tried:

# git describe --always --tags
fatal: not a git repository (or any of the parent directories): .git

All previous releases did not require the .git folder.

totaam commented 8 months ago

Thanks, fixed: cbebd58b2a8bc133f05b818798ddf1ae97d3afb1

arrowd commented 7 months ago

Should downstream wait for a new release containing this change or there is no ETA? We can patch it locally, ofc.

arrowd commented 7 months ago

Disregard previous queestion, I had to do more patching anyways.

totaam commented 7 months ago

@arrowd v11 already includes this fix, does it not? Edit: it does not, v11.1 will have it: 2bdca6c5ba1459c21317e7f51e933b83e06d36fa

totaam commented 7 months ago

I had to do more patching anyways.

@arrowd Please do share why the fix isn't in mainline?

arrowd commented 7 months ago

My previous communication with upstream wasn't a pleasant one. You can grab the patch here if you wish: https://github.com/freebsd/freebsd-ports/blob/main/x11/xpra-html5/files/patch-setup.py

totaam commented 7 months ago

My previous communication with upstream wasn't a pleasant one

I have no idea what you're referring to.


-                    except OSError:
+                    except:

Do you happen to know which type of exception is thrown here instead of OSError? My guess is that you're using yuicompressor and it's not installed. You should be using the copy compressor instead of silencing valid errors. https://github.com/Xpra-org/xpra-html5/blob/20dddce76047ee95fcdc3d2b57672429951ab38b/setup.py#L303

arrowd commented 7 months ago

I got "module not found" exception. The patch gets me into the catch block, which just calls the yuicompressor executable, that is actually available in the system.

totaam commented 7 months ago

@arrowd with the commit above (and the one already merged for the .git folder), you should be able to drop your patch for the next release.

arrowd commented 7 months ago

Good to know, thanks!