Opened 9 years ago

Closed 5 years ago

#48363 closed update (wontfix)

Update wireshark-devel to 1.99.7

Reported by: mdeaudelin (Mathieu Deaudelin-Lemay) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: hsivank@…
Port: wireshark-devel

Description

The current version of wireshark-devel is far behind the stable version at this time, nevermind the development one. I have made a patch to bring it up to speed.

Highlights:

  • Installs latest development version (1.99.7)
  • Now provides an application stub in /Applications/MacPorts/ (when built with GUI on OS X)
  • Qt 5 GUI: new qt5 variant, which is the default. Qt 4 (variant qt), GTK 2 and GTK 3 all still available.
  • Kerberos now optional: new krb5 variant, enabled by default, can be disabled to avoid depending on kerberos5.

The modified Portfile is based on the one of the wireshark port, since it contains the changes between versions 1.9.0 and 1.12.6. The patch may be a little less readable because of this. Therefore, I am also providing a diff between the current wireshark Portfile and my proposed wireshark-devel Portfile for reference.

Attachments (8)

patch-Portfile-wireshark-devel-1.99.7.diff (10.2 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
Patch for the Portfile
ForReference-Portfile-vs-wireshark-port.diff (6.6 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
(For reference only:) Diff comparing the current wireshark Portfile to my proposed wireshark-devel Portfile.
patch-osxapp.diff (12.0 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
Patch file referred to by Portfile. Required for OS X app stub. (revised)
patch-Portfile-wireshark-devel-1.99.7.2.diff (12.4 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
Patch for the Portfile (revised). Fixed whitespace and passed the path of ${applications_dir} to the Makefile.
ForReference-Portfile-vs-wireshark-port.2.diff (8.7 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
(For reference only:) Diff comparing the current wireshark Portfile to my proposed wireshark-devel Portfile. (revised)
patch-osxapp.2.diff (12.1 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
Patch file referred to by Portfile. Required for OS X app stub. (revised x2)
patch-Portfile-wireshark-devel-1.99.8.diff (12.9 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
Updated patch for 1.99.8. Fixes problem creating app bundle.
patch-osxapp.3.diff (11.9 KB) - added by mdeaudelin (Mathieu Deaudelin-Lemay) 9 years ago.
Updated offsets so the patch continues to apply cleanly.

Download all attachments as: .zip

Change History (21)

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Patch for the Portfile

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

(For reference only:) Diff comparing the current wireshark Portfile to my proposed wireshark-devel Portfile.

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Attachment: patch-osxapp.diff added

Patch file referred to by Portfile. Required for OS X app stub. (revised)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Your patch hardcodes the location /Applications/MacPorts; you should instead arrange to use the value of the MacPorts variable ${applications_dir}.

Now that we guarantee that MacPorts is running on Tcl 8.5, we no longer wish to use the "eval ... [glob ...]" idiom; instead, use "... {*}[glob ...]" (the "expand operator").

Some of the whitespace in your patch is not aligned properly.

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Patch for the Portfile (revised). Fixed whitespace and passed the path of ${applications_dir} to the Makefile.

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

(For reference only:) Diff comparing the current wireshark Portfile to my proposed wireshark-devel Portfile. (revised)

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Attachment: patch-osxapp.2.diff added

Patch file referred to by Portfile. Required for OS X app stub. (revised x2)

comment:2 Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Thank you for the feedback. I have updated the patches accordingly.

comment:3 Changed 9 years ago by hadrielk@…

Hi, thanks for working on this! I've been waiting for a 1.99.x wireshark-devel port, but didn't know how the portfiles work.

A few of comments:

  1. the 1.99.8 development release should be coming out tomorrow (July 23rd, 2015) sometime in the afternoon - might want to wait for that.
  2. Qt5 is the default GUI now, not GTK. I don't know how macports handles defaults, so I can't tell what it considers default for the GUI.
  3. I don't see a dependency on asciidoc, but that is needed when building the docs now - it started back in 1.10 or 1.11 if I recall. The docs aren't built by default, so you may have missed it. (or I may have missed it in the lists)

Thanks!

comment:4 Changed 9 years ago by hadrielk@…

Forgot one more comment: the current portfile appears to reference the port "lua", which is currently Lua 5.2. But if/when Ticket #46621 is resolved, that will make port "lua" point to Lua 5.3, which Wireshark will not compile with. I don't know how to prevent that from happening, since there is no port "lua52" to reference currently. I guess I'll comment on it in that ticket.

comment:5 Changed 9 years ago by mike-savory

Tried a build for 1.99.8 based on your new patches. Updated the hashes, in a private portfile for 1.99.8 and it all seems to build correctly then when installing, I get :

make[1]: Leaving directory `/opt/local/var/macports/build/_Users_msavory_mp_net_wireshark/wireshark/work/wireshark-1.99.8'

CREATE WIRESHARK APP BUNDLE

Package Qt5Core was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Core.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Core' found
Package QtCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtCore' found
Can't find the Qt frameworks directory

Any suggestions on fixing this... I have tried rebooted since installing

$ port installed | grep qt

qt5-mac @5.4.2_1 (active)

comment:6 Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Sorry for the lack of updates. I originally made this under OS X 10.11 beta 1, but since I upgraded to beta 6, qt5-mac no longer builds, and so I have been unable to update my patches. I should have something working within a few days hours.

Last edited 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay) (previous) (diff)

comment:7 in reply to:  5 Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Replying to msavory@…:

Tried a build for 1.99.8 based on your new patches. Updated the hashes, in a private portfile for 1.99.8 and it all seems to build correctly then when installing, I get : [...]

Any suggestions on fixing this...

Adding this to line 163 of the Portfile will fix this.

    destroot.env-append         PKG_CONFIG_PATH=${configure.pkg_config_path}

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Updated patch for 1.99.8. Fixes problem creating app bundle.

Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Attachment: patch-osxapp.3.diff added

Updated offsets so the patch continues to apply cleanly.

comment:8 in reply to:  3 Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Replying to hadrielk@…:

  1. Qt5 is the default GUI now, not GTK. I don't know how macports handles defaults, so I can't tell what it considers default for the GUI.

The default is set in the Portfile, around line 70. We previously used +x11 (the GTK2 port) unless the user asked otherwise, but I have changed it to +qt5 in my patch.

  1. I don't see a dependency on asciidoc, but that is needed when building the docs now - it started back in 1.10 or 1.11 if I recall. The docs aren't built by default, so you may have missed it. (or I may have missed it in the lists)

Neither the wireshark nor wireshark-devel ports have built the docs so far, so I was not building them either, thus the dependency is not required. However, it would probably be useful to create a variant for that, such as +docs. I'll look into it, but it may be good to split it in another ticket targeting both ports.

Forgot one more comment: the current portfile appears to reference the port "lua", which is currently Lua 5.2. But if/when Ticket #46621 is resolved, that will make port "lua" point to Lua 5.3, which Wireshark will not compile with. I don't know how to prevent that from happening, since there is no port "lua52" to reference currently. I guess I'll comment on it in that ticket.

Thanks for pointing this out, as we need to keep it in mind. Until they split lua52 and lua53 from the lua port, there isn't much we can do though.

comment:9 Changed 9 years ago by hsivank@…

There are some mistakes with patch-Portfile-wireshark-devel-1.99.8.diff
The Portfile declare itself as conflict

conflicts       wireshark-devel

I'm not sure about listing xorg-* port with x11 variant.

I just post an alternative Portfile based on cmake (see Portfile-cmake-1.99.8​ on #40782)

It doesn't require patch against osxapp and it builds fine with qt5,gtk2 and gtk3 variants

Last edited 9 years ago by hsivank@… (previous) (diff)

comment:10 in reply to:  9 ; Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Replying to hsivank@…:

I'm not sure about listing xorg-* port with x11 variant.

That comes from the current wireshark 1.12.6 portfile. I suppose there is a reason why they put it there.

I just post an alternative Portfile based on cmake (see Portfile-cmake-1.99.8​ on #40782)

I will comment about that there.

It doesn't require patch against osxapp and it builds fine with qt5,gtk2 and gtk3 variants

Your patch does not create a launcher in the Applications folder when building the gtk2 or gtk3 variants. Mine does.

comment:11 in reply to:  10 ; Changed 9 years ago by hsivank@…

Replying to macports@…:

Replying to hsivank@…:

I'm not sure about listing xorg-* port with x11 variant.

That comes from the current wireshark 1.12.6 portfile. I suppose there is a reason why they put it there.

looking at "port rdeps gtk2" it seems that gtk2 already provides this ports

It doesn't require patch against osxapp and it builds fine with qt5,gtk2 and gtk3 variants

Your patch does not create a launcher in the Applications folder when building the gtk2 or gtk3 variants. Mine does.

Yes this was not supported before ...
My patch does not try to make a *complete* bundle (it does not duplicate librairies from prefix to bundle)
It just overwrites destroot phase to create a functional bundle from prefix.
The same things could be done for gtk2 or gtk3 variants without patching wireshark source.
In my opinion instead using custom tool (as ugly osx-app.sh) to generate bundle, it will be better to use fixup_bundle() from cmake/cpack This would be the next step but i got no time for it ...

Last edited 9 years ago by hsivank@… (previous) (diff)

comment:12 in reply to:  11 Changed 9 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

Replying to hsivank@…:

My patch does not try to make a *complete* bundle (it does not duplicate librairies from prefix to bundle)

Mine doesn't either. The patch changes the appropriate lines in osx-app.sh to create symlinks rather than copy the files.

The same things could be done for gtk2 or gtk3 variants without patching wireshark source.

In its current state, the gtk launcher does not compile. It needs some patches to work. Also, the launcher scripts need to be modified, if the gtk launcher is to be used, since they expect to find GTK binaries in the application bundle itself.

In my opinion instead using custom tool (as ugly osx-app.sh) to generate bundle, it will be better to use fixup_bundle() from cmake/cpack This would be the next step but i got no time for it ...

I agree that it is an ugly hack, but since it works that way upstream, I was trying to keep it as close as possible to that.

comment:13 Changed 5 years ago by mf2k (Frank Schima)

Resolution: wontfix
Status: newclosed

It was replaced by wireshark3.

Note: See TracTickets for help on using tickets.