Wireshark 3.0.2 RPM

Issues related to applications and software problems
VeeDub
Posts: 39
Joined: 2019/12/21 02:34:05

Wireshark 3.0.2 RPM

Post by VeeDub » 2021/01/13 19:49:38

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.

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: Wireshark 3.0.2 RPM

Post by Whoever » 2021/01/13 21:56:05

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.

VeeDub
Posts: 39
Joined: 2019/12/21 02:34:05

Re: Wireshark 3.0.2 RPM

Post by VeeDub » 2021/01/13 22:27:49

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

VeeDub
Posts: 39
Joined: 2019/12/21 02:34:05

Re: Wireshark 3.0.2 RPM

Post by VeeDub » 2021/01/13 22:30:43

Where did you clone the git repository to?
I'm on my way now

Thanks

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Wireshark 3.0.2 RPM

Post by TrevorH » 2021/01/14 01:20:14

Please don't build as root. It's dangerous.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

VeeDub
Posts: 39
Joined: 2019/12/21 02:34:05

Re: Wireshark 3.0.2 RPM

Post by VeeDub » 2021/01/14 06:45:33

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

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: Wireshark 3.0.2 RPM

Post by Whoever » 2021/01/14 06:59:56

Use this command to list the files and find where wireshark is installed:

Code: Select all

rpm -qls wireshark

VeeDub
Posts: 39
Joined: 2019/12/21 02:34:05

Re: Wireshark 3.0.2 RPM

Post by VeeDub » 2021/01/14 09:22:52

@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?

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Wireshark 3.0.2 RPM

Post by TrevorH » 2021/01/14 12:35:26

wireshark is the GUI, the text command is tshark. They should be in different packages: wireshark vs wireshark-cli.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sml
Posts: 305
Joined: 2020/01/17 09:01:44

Re: Wireshark 3.0.2 RPM

Post by sml » 2021/01/14 19:44:07

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.
Last edited by sml on 2021/01/16 09:58:44, edited 1 time in total.

Post Reply