New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #18156 (closed update: fixed)

Opened 4 years ago

Last modified 4 years ago

scapy still depends on Python 2.4

Reported by: jwiegley@… Owned by: pmq@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: msavory@…, snc@…
Port: scapy

Description

It should depend on 25 nowadays.

Attachments

Portfile-scapy.diff (1.1 KB) - added by snc@… 4 years ago.
diff using python25
Scapy2_buildlog.txt (18.0 KB) - added by msavory@… 4 years ago.
Build log after Committed in r54905.
Portfile (1.8 KB) - added by msavory@… 4 years ago.
My draft Scapy 2 portfile

Change History

comment:1 Changed 4 years ago by blb@…

  • Owner changed from macports-tickets@… to pmq@…

comment:2 Changed 4 years ago by pmq@…

  • Cc msavory@… added

Shouldn't we kill the port actually? I find it easier nowadays to just use mercurial (but still install all deps using MacPorts), because there's no 'stable' version (as in tagged as stable). What do you think, would it be a good idea to just nuke it?
Cc'ing Mike as I understand he's interested in that matter.

comment:3 follow-up: ↓ 4 Changed 4 years ago by blb@…

Is 2.0.0.11 not stable? Also, you can always create a scapy-devel to checkout with hg.

comment:4 in reply to: ↑ 3 Changed 4 years ago by msavory@…

As 2.0.0 versions now requires Python 2.5, there are now the 2.5 dependancy ports to match, I was intending on creating a scapy2 port and leaving scapy as the stable version 1, but I have not done anything about it. I do use it regularly.

comment:5 Changed 4 years ago by jwiegley@…

One of the whole charms of MacPorts is that it installs all the dependencies for you and "just works". I would love to see the Scapy port continue, which after installation would provide a "scapy" script which could you run and everything would Do What It Should.

comment:6 Changed 4 years ago by msavory@…

Yes, I'll take that as a reminder to work on something. So what do people think about keeping scapy and adding a scapy2 port? I like that scapy also picks up the MP wireshark and other tools.

comment:7 Changed 4 years ago by pmq@…

  • Status changed from new to assigned

Finally had some time. Questions:

  • can we make it depend on Python 2.6? (it seems the 2.5 PortGroup depends on that?)
  • is there a need to have some sort of +kitchensink variant that enables the dependencies on TeX and ghostscript? Been building all day. Thoughts?

Also, thanks about the "picks up the MP tools", I forgot I did these reinplaces, and you're right it justifies having it in the tree.

comment:8 Changed 4 years ago by msavory@…

Unfortunately, I still have no time for at least another 2 weeks. Feel free to pick up and run in any direction....

scapy declared its dependencies as

Library Dependencies: python24, py-readline, py-pylibpcap, py-libdnet, py-crypto, py-gnuplot, py-pyx, graphviz

My thoughts on the best path was to just build a new scapy2 port that depends on python25 py25-readline py25-pylibpcap py25-libdnet py25-crypto py25-gnuplot py25-pyx py25-pygraphviz

and used the pyton port group code to install as a framework.

It seem at the moment, python on Macports has no generic way to manage the different Python versions in any dynamic way.

Philippe changed from scapy1.x to scapy2.x when he introduced the python 2.5 dependency, it just seems like we need to follow suit.

Then we need to get this page updated to cover Leopard and that we are not darwinports http://www.secdev.org/projects/scapy/portability.html

comment:9 Changed 4 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

comment:10 Changed 4 years ago by snc@…

  • Version changed from 1.7.0 to 1.7.1
  • Type changed from defect to update

We're trying to get ports off of python24. I move that we simply update scapy to use python25 and its version to the 2.X branch.

Changed 4 years ago by snc@…

diff using python25

comment:11 Changed 4 years ago by snc@…

  • Cc snc@… added

Cc Me!

comment:12 Changed 4 years ago by pmq@…

Diff looks fine to me. Unsure wether the reinplaces still work.

comment:13 Changed 4 years ago by snc@…

  • Status changed from assigned to closed
  • Resolution set to fixed

Committed in r54905.

comment:14 Changed 4 years ago by msavory@…

Upgrade does not actually install a new scapy version.

$ sudo port   uninstall scapy
--->  Deactivating scapy @2.0.0.10_0
--->  Uninstalling scapy @2.0.0.10_0
$ sudo port   install scapy
--->  Fetching scapy
--->  Verifying checksum(s) for scapy
--->  Extracting scapy
--->  Configuring scapy
--->  Building scapy
--->  Staging scapy into destroot
--->  Installing scapy @2.0.0.10_0
--->  Activating scapy @2.0.0.10_0
--->  Cleaning scapy
$ sudo port contents  scapy
Port scapy contains:
  /opt/local/bin/scapy.py
  /opt/local/etc/ethertypes
$ sudo   /opt/local/bin/scapy.py
Password:
/opt/local/bin/scapy.py:3156: Warning: 'with' will become a reserved keyword in Python 2.6
/opt/local/bin/scapy.py:3158: Warning: 'with' will become a reserved keyword in Python 2.6
Welcome to Scapy (1.2.0.2)
>>> 

comment:15 Changed 4 years ago by msavory@…

It seems I do not have permission to reopen ticket

Changed 4 years ago by msavory@…

Build log after Committed in r54905.

comment:16 Changed 4 years ago by snc@…

Alrighty, I'll bump the revision.

comment:17 Changed 4 years ago by msavory@…

Not sure its that simple, Scapy 2 is now a Framework install

comment:18 Changed 4 years ago by msavory@…

Also looks to me that the portfile selects

distfiles ${name}.py:code ethertypes:files

so still pulls the 1.2 branch not the current 2.0 branch

comment:19 Changed 4 years ago by msavory@…

OK so I started again with my local porttfile, (attached in my next post)

It Has the correct get syntax now and downloads the release (a zip file)

But the unzip stage errors out at

warning [/opt/local/var/macports/distfiles/python/scapy-2.0.0.10.zip]:  61 extra bytes at beginning or within zipfile
  (attempting to process anyway)

Changed 4 years ago by msavory@…

My draft Scapy 2 portfile

comment:20 Changed 4 years ago by msavory@…

Here are the instructions for installing scapy 2 (it uses the standard distutils method)

https://www.secdev.org/projects/scapy/doc/installation.html#installing-scapy-v2-x

comment:21 Changed 4 years ago by snc@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:22 Changed 4 years ago by snc@…

  • Status changed from reopened to closed
  • Resolution set to fixed

Updated in r54993, based on msavory's Portfile. Revision to 2.

comment:23 Changed 4 years ago by msavory@…

Sorry if I was not clear, My Portfile still does not build... See failed buildlog attached to ticket

Please reopen ticket

comment:24 Changed 4 years ago by snc@…

Your build log was for 2.0.0.10_0. This is 2.0.0.10_2. I tried it before I committed it; built for me.

comment:25 Changed 4 years ago by msavory@…

Scapy 1.x was a single executable scapy.py source file

Scapy 2.x is a zipped framewrk build that needs to be installed using sudo python setup.py install

I would guess that the Portfile now simply doesnt install anything (check port contents scapy)

I will check the new revision when It gets here

comment:26 Changed 4 years ago by msavory@…

Thanks, It looks like it does install now, The portgroup code must take care of the whole setup thing....

Thanks

I guess my portfile was better than I thought.....

Note: See TracTickets for help on using tickets.