Wireshark – Building RPMs a different way since 2.6.4

The Wireshark team are changing the way they support the toolsets to build the program. There are alerts at the end of the ./configure step that indicates

configure: Builds using Autotools might be removed in the future.

So it was no surprise that when building Wireshark 2.6.4 that the make rpm-package failed with the following message

+ cd /home/publisher/sourcecode/wireshark-2.6.4/packaging/rpm/BUILD
+ rm -rf wireshark-2.6.4
+ /usr/bin/xz -dc /home/publisher/sourcecode/wireshark-2.6.4/packaging/rpm/SOURCES/wireshark-2.6.4.tar.xz
+ /usr/bin/tar -xf -
/usr/bin/tar: This does not look like a tar archive
/usr/bin/tar: Exiting with failure status due to previous errors
error: Bad exit status from /var/tmp/rpm-tmp.Ck9TXv (%prep)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.Ck9TXv (%prep)
make[2]: *** [all-local] Error 1
make[2]: Leaving directory `/home/publisher/sourcecode/wireshark-2.6.4/packaging/rpm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/publisher/sourcecode/wireshark-2.6.4/packaging/rpm'
make: *** [rpm-package] Error 2

This was a bit disheartening, as the tools worked in previous versions. But we can get around this quite easily. We just need to place to place the files in the right place and run the rpmbuild process.

In the original Building Wireshark 2.4.0 for CentOS 7, we downloaded the file from the Wireshark website, and then extracted it, and worked on it. Part of the configure process that is run that way creates the wireshark.spec file that is used to drive the rpmbuild process.

So we need to place the file we downloaded in the ~/rpmbuild/SOURCES directory. Then we extract it to a scratch location, and run through the ./configure process. Once this is done we can move the wireshark.spec file from scratch/wireshark-2.6.4/packaging/rpm/SPECS/ to ~/rpmbuild/SPECS/

Once this is done, we start the rpmbuild process using this command below.

rpmbuild -ba wireshark.spec

This then builds the rpm files, which are found in ~/rpmbuild/RPMS/. These can then be signed, and managed in your usual fashion.

This site uses Akismet to reduce spam. Learn how your comment data is processed.