Page 1 of 3

Wireshark 3.0.2 RPM

Posted: 2021/01/13 19:49:38
by VeeDub
Hello,

I'm trying to install Wireshark.

By default CentOS seems to have 1.x ... which is somewhat dated.

I have found some instructions here to create a 3.0.2 RPM https://doublefault0.wordpress.com/2019 ... -centos-7/

The trouble is that these instructions don't work fully and as I'm out of my depth here, I'm hoping that someone can help me to troubleshoot.

The command that fails is:

Code: Select all

cmake3 -LH /root/wireshark
Error

Code: Select all

CMake Error: The source directory "/root/wireshark" does not appear to contain CMakeLists.txt.

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/13 21:56:05
by Whoever
Did you see the comments on that web page?

Where did you clone the git repository to? The instructions assume /root/wireshark but I think that may not be correct in your case. In any case, building the package when logged in as root is not advised.

There should be a directory created that contains a file called CMakeLists.txt. Find that directory and replace /root/wireshark with it.

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/13 22:27:49
by VeeDub
Did you see the comments on that web page?
Did you notice who posted those comments? :D
Where did you clone the git repository to?
I just followed the instructions, I must admit I'm not across the detail of the process. Which of course is now why I'm stuck when they failed.

I think the git repository has been cloned to a wireshark folder in my home directory

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/13 22:30:43
by VeeDub
Where did you clone the git repository to?
I'm on my way now

Thanks

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/14 01:20:14
by TrevorH
Please don't build as root. It's dangerous.

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/14 06:45:33
by VeeDub
Hello,

So I have created the rpm

Used yum to install the package, and when I do

Code: Select all

sudo yum list installed
the package is listed as installed

Yet when I type

Code: Select all

wireshark
Which is supposed to be the way to launch from the command line; I get command not found

And when I use find, I can't find any instance of wireshark

Would appreciate suggestions on how to troubleshoot

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/14 06:59:56
by Whoever
Use this command to list the files and find where wireshark is installed:

Code: Select all

rpm -qls wireshark

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/14 09:22:52
by VeeDub
@Whoever

Thanks for the command.

Looking at the output from the rpm -qls command there looks to be an issue with the install; as there is no wireshark executable

Code: Select all

normal        /etc/ld.so.conf.d/wireshark.conf
normal        /usr/local/bin/capinfos
normal        /usr/local/bin/captype
normal        /usr/local/bin/dumpcap
normal        /usr/local/bin/editcap
normal        /usr/local/bin/idl2wrs
normal        /usr/local/bin/mergecap
normal        /usr/local/bin/mmdbresolve
normal        /usr/local/bin/randpkt
normal        /usr/local/bin/rawshark
normal        /usr/local/bin/reordercap
normal        /usr/local/bin/sharkd
normal        /usr/local/bin/text2pcap
normal        /usr/local/bin/tshark
Any thoughts on how I might proceed from here?

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/14 12:35:26
by TrevorH
wireshark is the GUI, the text command is tshark. They should be in different packages: wireshark vs wireshark-cli.

Re: Wireshark 3.0.2 RPM

Posted: 2021/01/14 19:44:07
by sml
Do it the right way: rebuild Fedora source packages.
  1. Install wireshark-3.2.7 from Fedora 31 updates:

    Code: Select all

    rpm -ip https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/31/Everything/SRPMS/Packages/w/wireshark-3.2.7-1.fc31.src.rpm
  2. Patch the specfile to use CMake 3:

    Code: Select all

     sed -ri '/^(%cm|Bu)/s/cmake/&3/;/post):/s/-udev//' ~/rpmbuild/SPECS/wireshark.spec
  3. Recreate the source rpm:

    Code: Select all

    rpmbuild -bs ~/rpmbuild/SPECS/wireshark.spec
    Rebuild the package:
  4. Code: Select all

    mock -r epel-7-x86_64 ~/rpmbuild/SRPMS/wireshark-3.2.7-1.el?.src.rpm
Here are the wireshark packages I built this way.