This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Can rpmbuild be used to create a tshark package?

0

I've been using rpmbuild to create a wireshark rpm that includes a plugin I've made. This works fine but I want to create a tshark only package that can run on a server.

I used this configure command in the spec file:

./configure --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --disable-wireshark --disable-editcap --disable-capinfos --disable-mergecap --disable-text2pcap --disable-idl2wrs --disable-dftest --disable-randpkt --disable-rawshark

But I get the following error once rpmbuild gets to the install part:

RPM build errors:
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/wireshark
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/editcap
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/mergecap
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/text2pcap
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/dftest
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/capinfos
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/randpkt
File not found: /usr/src/packages/BUILDROOT/wireshark-1.4.4-38.1.x86_64/usr/bin/rawshark

Does anyone know what I'm doing wrong? Obviously it's trying to package up all those binaries but I indicated inside the configure command not to compile those ones..

asked 12 Apr '11, 11:58

Tokolosh's gravatar image

Tokolosh
11335
accept rate: 0%


2 Answers:

2

Certainly it should be possible--I'd be willing to bet that Redhat's RPMs are built with rpmbuild. You might want to start with their spec file, if you're doing it that way though...

answered 12 Apr '11, 17:44

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

Good suggestion. So good that I went ahead already and got a tshark spec file form a src rpm on opensuse.org. Seems to have done the job fairly well. Thank you =]

(13 Apr '11, 10:05) Tokolosh

0

You will need to edit the packaging/rpm/SPECS/wireshark.spec.in file. Specifically, you will need to modify the CFLAGS line to match your desired configuration. See also this related question.

answered 12 Apr '11, 12:30

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

Yeh lol that was me.

I wanted to avoid using make to generate the rpm because in the past that resulted in buggy package.

(12 Apr '11, 13:35) Tokolosh