View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005611 | GNUnet | other | public | 2019-02-26 08:56 | 2019-02-28 11:17 |
Reporter | nikita | Assigned To | nikita | ||
Priority | normal | Severity | block | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | Git master | ||||
Target Version | 0.11.0 | Fixed in Version | 0.11.0 | ||
Summary | 0005611: packaging: sed'ing /usr/bin/env is causing problems | ||||
Description | For details read http://mail-index.netbsd.org/tech-pkg/2019/02/26/msg020856.html As a solution I propose to remove the #!/@xENV@ python2.7 line and write a small shell script which just searches for python2.7, if found executes gnunet-qr via "python2.7 /path/to/gnunet-qr" and if not tells you to install python2.7. Since we'd only have to sed the path to gnunet-qr (@PREFIX@/bin/gnunet-rq) this would be less problematic. Since I'm hitting this issue in pkgsrc I am convinced that other packaging systems will hit similar issues, which is why this is a blocker for 0.11.0 assigned to Christian for request for feedback. | ||||
Tags | No tags attached. | ||||
|
I'm committing a solution for this, can be easily reverted. |
|
https://git.gnunet.org/gnunet.git/commit/?id=5f80de3fbc0c4b43fb93d0ef4460aea16b2c78e0 |
|
I think this wrapper is wrong, needs to get the arguments to gnunet-qr.py |
|
Right now, gnunet-qr.py is missing from the install although it's in bin_SCRIPTS in src/util/Makefile.am strange enough, my PLIST mentions bin/gnunet-qr.py and bin/gnunet-qr as expected. ..which however is not a problem for gnunet. |
|
1) Can we reliable distribute gnunet-qr, has anyone tested it in recent times? 2) From a packagers perspective it would make more sense to move this to contrib/scripts/ and install only if the systems packager does it. 2 only applies if no critical piece of software is using gnunet-qr right now. |
|
1) It fails right now on my system: $ gnunet-qr Traceback (most recent call last): File "/home/grothoff/bin/gnunet-qr", line 3, in <module> from builtins import str ImportError: No module named builtins 2) Not sure why it "would make more sense". Sounds more like a way to 'forget' about it. 3) Use of gnunet-qr is strictly optional, the idea was to have something to combine with gnunet-bcd to print business cards with GNS QR code, and then offer a way to import the QR codes. But gnunet-qr is just used for that, and not really integrated with anything else. |
|
for 1 you need python2.7 future module (as already stated in the README). |
|
I could make a check for this and an error message if not found. |
|
That would be better, indeed. |
|
2 and 3, okay. Is the current format okay for you (the last 2 patches in src/util)? |
|
It also then asks to install zbar-python, but these days the package is called python-zbar... |
|
no, zbar-python and python-zbar are entirely different packages? wrt failure, please try again (I don't have the required zbar and can't test) |
|
Any comment about https://bugs.gnunet.org/view.php?id=5611#c14041 ? |
|
You mean https://pypi.org/project/zbar/ right? |
|
curl is free software, no problem with stealing some of their code with attribution as done in gnunet-qr. |
|
https://packages.debian.org/stretch/python-zbar is the package I need. |
|
> Use of gnunet-qr is strictly optional, the idea was to have something to combine with gnunet-bcd to print business cards with GNS QR code, and then offer a way to import the QR codes. But gnunet-qr is just used for that, and not really integrated with anything else. But gnunet-bcd is optional and in --enable-experimental as well. It doesn't make sense as chosen category to make gnunet-qr(.py) experimental as well, but its only user is in experimental. |
|
Before I resolve this, can you confirm that this works from HEAD as it is? |
|
Doesn't work, I now get: $ gnunet-qr /usr/bin/python2.7: can't open file '/bin/gnunet-qr.py': [Errno 2] No such file or directory ERROR: python2.7 or future not found |
|
but this should sed the prefix.. For me in the pkgsrc-wip this results in /usr/pkg/bin/gnunet-qr.py |
|
locally not sure, running a rebuild now |
|
Fixed in https://git.gnunet.org/gnunet.git/commit/?id=b6d9c70fa5ce58243327829b66e37382b4412555 ? |
|
bah now I get a syntax error, as expected. So we can not check for future with an exception. I'd say just deal with it, whoever doesn't read the readme or has a packager who doesn't do so will have to read the readme. |
|
Can you use it even though it reports syntax error for me? |
|
Pushed with a revert of the future check which can't work. Blame future for that. In my opinion it's okay to fail without exception here. |
|
It kind-of works again, except that without python-future I still don't get a warning, but I *do* get the python 'future' warning *if* the program is closed without a QR code. So likely that message is in the wrong place... |
|
you don't get a warning because this doesn't work the way future is intended to be used (first import in a file). About the closing warning, which commit did you pull from? |
|
Latest in master. |
|
And this is python-zbar? I've just packaged it and all I get is a shared object installed to the python 2.7 sitedir, no module to import |
|
Even Debian doesn't have more. |
|
Yes, I am definitively using the Debian python-zbar package. |
|
Okay, my package was faulty, now I can import zbar. Let me try to reproduce your errors. |
|
I understand what you mean. While I don't have a functional gnunet-qr through my packages (yet), I will try and make the error message disappear. It's i nthe wrong place. |
|
Give it a shot now. I have trouble opening /dev/video0 (which exists, probably python code and/or permissions issue). |
|
Without python-future, I still get (but not RC): $ gnunet-qr Traceback (most recent call last): File "/home/grothoff/bin/gnunet-qr.py", line 2, in <module> from builtins import str ImportError: No module named builtins |
|
Yes, you need (read: require, mandatory, won't run without this!) python-future. I have written this in the README and in this ticket. |
|
If you really want to I can revert to drop python future changes, but I need to look at the history of the file to see what was applied anyway. Future was used before I found out this can not use python3. meta question: Wasn't I clear enough about "you need future"? |
|
You are perfectly clear about it. My point was just that IF the intention was to inform the user about python-future, the same way we inform them about python-zbar, then it's not yet working. I've also tested _with_ python-future, and then this works fine. |
|
python future requires to be added at the first line of a module. It's a syntax error to import it at any line below. Because of this, we can't check for failures. For some things, people are expected to read releasenotes and readmes. If they don't, they will have to search what the error message means and report it. It sucks, yes. But as I wrote in the previous message, we don't future for this script. I have reverted it. |
|
"python future requires to be added at the first line of a module. It's a syntax error to import it at any line below. Because of this, we can't check for failures." I doubt this interpretation of what I've read so far. |
|
For a last test, can you try and pass a couple of switches to the shell script that calls the python file? Since we have no future module anymore, we can close this if it works. |
|
We have eliminated the future and solved the bug. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-02-26 08:56 | nikita | New Issue | |
2019-02-26 08:56 | nikita | Status | new => assigned |
2019-02-26 08:56 | nikita | Assigned To | => Christian Grothoff |
2019-02-26 09:22 | nikita | Note Added: 0014039 | |
2019-02-26 09:36 | nikita | Note Added: 0014040 | |
2019-02-26 09:57 | nikita | Note Added: 0014043 | |
2019-02-26 10:08 | nikita | Note Added: 0014045 | |
2019-02-26 10:09 | nikita | Note Edited: 0014045 | |
2019-02-26 10:50 | nikita | Note Edited: 0014045 | |
2019-02-26 10:53 | nikita | Note Added: 0014046 | |
2019-02-26 11:41 | Christian Grothoff | Note Added: 0014047 | |
2019-02-26 11:42 | nikita | Note Added: 0014048 | |
2019-02-26 11:42 | nikita | Note Edited: 0014048 | |
2019-02-26 11:43 | nikita | Note Added: 0014049 | |
2019-02-26 11:43 | Christian Grothoff | Note Added: 0014050 | |
2019-02-26 11:44 | nikita | Note Added: 0014051 | |
2019-02-26 11:44 | Christian Grothoff | Note Added: 0014052 | |
2019-02-26 11:45 | Christian Grothoff | Assigned To | Christian Grothoff => nikita |
2019-02-26 11:49 | nikita | Note Added: 0014053 | |
2019-02-26 11:50 | nikita | Note Added: 0014054 | |
2019-02-26 11:50 | nikita | Note Added: 0014055 | |
2019-02-26 11:53 | Christian Grothoff | Note Added: 0014056 | |
2019-02-26 11:55 | Christian Grothoff | Note Added: 0014057 | |
2019-02-26 11:55 | nikita | Note Added: 0014058 | |
2019-02-26 14:35 | nikita | Note Added: 0014060 | |
2019-02-26 14:35 | nikita | Assigned To | nikita => Christian Grothoff |
2019-02-26 14:35 | nikita | Status | assigned => feedback |
2019-02-26 16:01 | Christian Grothoff | Note Added: 0014062 | |
2019-02-26 16:03 | Christian Grothoff | Assigned To | Christian Grothoff => nikita |
2019-02-26 16:05 | nikita | Note Added: 0014063 | |
2019-02-26 16:05 | nikita | Note Added: 0014064 | |
2019-02-26 16:30 | nikita | Note Added: 0014071 | |
2019-02-26 16:30 | nikita | Assigned To | nikita => Christian Grothoff |
2019-02-26 16:36 | nikita | Note Added: 0014072 | |
2019-02-26 16:36 | nikita | Status | feedback => assigned |
2019-02-26 16:40 | nikita | Note Added: 0014073 | |
2019-02-26 16:45 | nikita | Note Added: 0014074 | |
2019-02-26 16:57 | Christian Grothoff | Note Added: 0014076 | |
2019-02-26 17:03 | nikita | Note Added: 0014077 | |
2019-02-26 17:21 | Christian Grothoff | Note Added: 0014078 | |
2019-02-26 17:34 | nikita | Note Added: 0014079 | |
2019-02-26 17:36 | nikita | Note Added: 0014080 | |
2019-02-26 17:36 | Christian Grothoff | Note Added: 0014081 | |
2019-02-26 17:42 | nikita | Note Added: 0014082 | |
2019-02-26 17:44 | nikita | Note Added: 0014083 | |
2019-02-26 17:48 | nikita | Note Added: 0014084 | |
2019-02-26 18:53 | Christian Grothoff | Note Added: 0014086 | |
2019-02-26 19:04 | nikita | Note Added: 0014087 | |
2019-02-26 19:05 | nikita | Note Added: 0014088 | |
2019-02-26 19:06 | nikita | Note Edited: 0014088 | |
2019-02-26 19:08 | Christian Grothoff | Note Added: 0014089 | |
2019-02-26 19:14 | nikita | Note Added: 0014090 | |
2019-02-26 19:17 | nikita | Note Added: 0014091 | |
2019-02-26 19:30 | nikita | Note Added: 0014092 | |
2019-02-26 19:40 | nikita | Assigned To | Christian Grothoff => nikita |
2019-02-26 19:44 | nikita | Status | assigned => resolved |
2019-02-26 19:44 | nikita | Resolution | open => fixed |
2019-02-26 19:44 | nikita | Note Added: 0014093 | |
2019-02-26 19:44 | nikita | Status | resolved => feedback |
2019-02-26 19:44 | nikita | Resolution | fixed => reopened |
2019-02-26 19:44 | nikita | Status | feedback => resolved |
2019-02-26 19:44 | nikita | Resolution | reopened => fixed |
2019-02-26 19:44 | nikita | Fixed in Version | => 0.11.0 |
2019-02-28 11:17 | Christian Grothoff | Status | resolved => closed |