[tor-bugs] #11190 [Obfsproxy]: obfsproxy shebang should point to "python2", not "python"

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Apr 12 11:49:15 UTC 2014


#11190: obfsproxy shebang should point to "python2", not "python"
-------------------------+-------------------------------------------------
     Reporter:  yawning  |      Owner:  asn
         Type:  defect   |     Status:  reopened
     Priority:  normal   |  Milestone:
    Component:           |    Version:
  Obfsproxy              |   Keywords:  python version, obfsproxy, tbb,
   Resolution:           |  flashproxy, MikePerry201404R
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-------------------------------------------------

Comment (by asn):

 Replying to [comment:7 yawning]:
 > Replying to [comment:6 dcf]:
 > > Replying to [comment:5 yawning]:
 > > > I'm not sure how many python scripts we actually ship in TBB 3.6,
 but the correct fix for obfsproxy is in my userrepo as `bug_11190`.  Other
 PTs that contain `#!/usr/bin/python` should also be changed, since it's
 fairly clear that the build process doesn't cause distutils/setuptools to
 modify all of the scripts.
 > > I think it's just due to some setuptools weirdness in how obfsproxy is
 set up. The "obfsproxy" executable isn't actually mentioned in setup.py,
 and it should be. If it were instead listed under `scripts`, then its
 shebang would be modified appropriately.
 >
 >
 > Well that would explain why the descriptor is just copying the script
 from the source tree.  asn is there any reason why this is the case?
 >
 > To be honest I think doing both (changing the shebang to be more
 explicity) *and* fixing setup.py is the right thing to do here, if only
 because I hate having bin/obfsproxy being perpetually stuck in my git
 status as changed (Yes, I could just stick it in `.git/info/exclude` since
 it's unlikely to change much, but I shouldn't have to).
 >
 > (Edit: Fixed quoting failure)

 Hm, I see.

 The reason that obfsproxy's setup.py is weird, is because I wanted the
 executable to be called 'obfsproxy' even though the entry point file is
 called 'pyobfsproxy.py'. After some research on the net, I arrived at
 these lines:
 {{{
     packages = find_packages(),
     entry_points = {
         'console_scripts': [
             'obfsproxy = obfsproxy.pyobfsproxy:run'
             ]
         },
 }}}

 So, you are saying that the setup.py completely ignores `/bin/obfsproxy`
 and instead makes its own executable with the wrong shebang? So I would
 need to fix both the setup.py to not ignore `/bin/obfsproxy` , and also
 `/bin/obfsproxy` to have a proper shebang.

 I will try to look into this tomorrow.

 Sorry for the shitty behavior.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11190#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list