Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Cmake and RPM

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Wed, 17 Aug 2016 11:49:28 +0200
Congratulations with the successful build of the RPMs.
If anything, you could file a bug with your main considerations, but with Jeff on the case this might be in good hands already.

Thanks,
Jaap


> On 17 Aug 2016, at 11:39, Jonne Zutt <jonne.zutt.ml@xxxxxxxxx> wrote:
> 
> The "File listed twice" is a known issue I've read, and only a warning.
> For the Installed (but unpackaged) file, I've added the following to the %files sections of the rpm spec:
> %exclude %{_libdir}/pkgconfig
> 
> Hurray!
> Package successfully built in /export/home/jzutt/wireshark/wireshark/packaging/rpm/RPMS.
> 
>  38M -rw-rw-r-- 1 jonne jonne  38M Aug 17 04:34 packaging/rpm/RPMS/x86_64/wireshark-2.3.0-1.x86_64.rpm
> 3.4M -rw-rw-r-- 1 jonne jonne 3.4M Aug 17 04:34 packaging/rpm/RPMS/x86_64/wireshark-qt-2.3.0-1.x86_64.rpm
> 
> I will test these rpms tomorrow. I wonder if there is anything I can do to help improve wireshark related to this mail thread, or is my distribution/system considered old or unsupported? Or maybe I've given sufficient details for others?
> 
> Thanks very much for helping me, and let me know if there's more I can do,
> Jonne.
> 
> 
> 
> On Wed, Aug 17, 2016 at 11:03 AM, Jonne Zutt <jonne.zutt.ml@xxxxxxxxx> wrote:
> id -u and id -g return numbers greater than am_max_uid=2097151 # 2^21 - 1 and am_max_gid (same number), and therefore, _am_tools gets set to none, which results in am__tar set to false ...
> 
> I commented out the "_am_tools=none" lines in the configure script. It decided to use pax then:
> checking whether UID '868232633' is supported by ustar format... no
> checking whether GID '868232633' is supported by ustar format... no
> checking how to create a ustar tar archive... (_am_tools = gnutar plaintar pax cpio none) pax
> 
> It takes much longer to create the wireshark-2.3.0.tar.xz now :)
> 
> A lot more happened when running "make rpm-package" this time.
> It looks pretty good actually, executables are also in packaging/rpm/BUILDROOT subfolders.
> 
> But, some more work to do, as the rpm is not yet created:
> 
> RPM build errors:
>     File listed twice: /usr/local/bin/dumpcap
>     Installed (but unpackaged) file(s) found:
>    /usr/local/lib64/pkgconfig/wireshark.pc
> 
> 
> 
> 
> On Wed, Aug 17, 2016 at 10:41 AM, Jonne Zutt <jonne.zutt.ml@xxxxxxxxx> wrote:
> Currently looking into this:
> 
>  $ egrep "am__.*tar =" Makefile
> am__tar = false
> am__untar = false
> 
> On Wed, Aug 17, 2016 at 10:34 AM, Jonne Zutt <jonne.zutt.ml@xxxxxxxxx> wrote:
> After a "make" or "make all", I do not have the tar ball, also not in my top-level build directory.
> Also not after a "make rpm-package".
> My packaging/rpm folder, including sub-folders, is quite empty except for a few Makefiles and wireshark.spec and wireshark.spec.in.
> 
> "make dist" does create the archive in my top-level build directory, but it doesn't look good (empty):
> $ ls -lsh wireshark-2.3.0.tar.xz
> 4.0K -rw-rw-r-- 1 jonne jonne 32 Aug 17 02:33 wireshark-2.3.0.tar.xz
> 
> Running "make rpm-package" also removes the wireshark-2.3.0.tar.xz in my top-level build directory, so that's why I perhaps do not see it after a "make" or "make all" too, it might get created and deleted later.
> 
> The executables are in a .libs folder in my top-level build directory:
> $ ls .libs
> capinfos  dftest     dumpcap  lt-wireshark  randpkt   rawsharkS.o  text2pcap  tsharkS.o  wiresharkS.o
> captype   dftestS.o  editcap  mergecap      rawshark  reordercap   tshark     wireshark
> 
> And for each or most of them there's also a script in the top-level build directory:
> $ file wireshark tshark mergecap
> wireshark: POSIX shell script, ASCII text executable, with very long lines
> tshark:    POSIX shell script, ASCII text executable, with very long lines
> mergecap:  POSIX shell script, ASCII text executable, with very long lines
> 
> This is the first part of logging of "make dist":
> $ make dist
> make  dist-xz am__post_remove_distdir='@:'
> make[1]: Entering directory `/home/jonne/wireshark/wireshark'
> if test -d "wireshark-2.3.0"; then find "wireshark-2.3.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "wireshark-2.3.0" || { sleep 5 && rm -rf "wireshark-2.3.0"; }; else :; fi
> test -d "wireshark-2.3.0" || mkdir "wireshark-2.3.0"
>  (cd capchild && make  top_distdir=../wireshark-2.3.0 distdir=../wireshark-2.3.0/capchild \
>      am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> make[2]: Entering directory `/home/jonne/wireshark/wireshark/capchild'
> make[2]: Leaving directory `/home/jonne/wireshark/wireshark/capchild'
>  (cd caputils && make  top_distdir=../wireshark-2.3.0 distdir=../wireshark-2.3.0/caputils \
>      am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> make[2]: Entering directory `/home/jonne/wireshark/wireshark/caputils'
> make[2]: Leaving directory `/home/jonne/wireshark/wireshark/caputils'
>  (cd codecs && make  top_distdir=../wireshark-2.3.0 distdir=../wireshark-2.3.0/codecs \
>      am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> 
> Not much seems to happen there, and also not afterwards.
> 
> At the end of "make dist", I see:
> 
> make[2]: Entering directory `/home/jonne/wireshark/wireshark/wsutil'
> make[2]: Leaving directory `/home/jonne/wireshark/wireshark/wsutil'
>  (cd extcap && make  top_distdir=../wireshark-2.3.0 distdir=../wireshark-2.3.0/extcap \
>      am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> make[2]: Entering directory `/home/jonne/wireshark/wireshark/extcap'
> make[2]: Leaving directory `/home/jonne/wireshark/wireshark/extcap'
>  (cd docbook && make  top_distdir=../wireshark-2.3.0 distdir=../wireshark-2.3.0/docbook \
>      am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> make[2]: Entering directory `/home/jonne/wireshark/wireshark/docbook'
> make[2]: Leaving directory `/home/jonne/wireshark/wireshark/docbook'
> test -n "" \
> || find "wireshark-2.3.0" -type d ! -perm -755 \
>         -exec chmod u+rwx,go+rx {} \; -o \
>   ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
>   ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
>   ! -type d ! -perm -444 -exec /bin/sh /export/home/jonne/wireshark/wireshark/install-sh -c -m a+r {} {} \; \
> || chmod -R a+r "wireshark-2.3.0"
> tardir=wireshark-2.3.0 && false | XZ_OPT=${XZ_OPT--e} xz -c >wireshark-2.3.0.tar.xz
> make[1]: Leaving directory `/home/jonne/wireshark/wireshark'
> if test -d "wireshark-2.3.0"; then find "wireshark-2.3.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "wireshark-2.3.0" || { sleep 5 && rm -rf "wireshark-2.3.0"; }; else :; fi
> 
> The script at the end removes the wireshark-2.3.0 folder again, and leaves me with an empty tar.xz.
> I don't see <top-level>/.libs referenced anywhere.
> 
> I disabled the removal of this wireshark-2.3.0 folder. There's a lot of files in there. It has a total size of 226M. It doesn't contain executables like wireshark, mergecap, tshark though.
> 
> How is the above xz command supposed to know what it should compress?
> I guess that does not look good. Should that not be part of the previous find command?
> 
> Jonne.
> 
> On Wed, Aug 17, 2016 at 12:25 AM, Jeff Morriss <jeff.morriss.ws@xxxxxxxxx> wrote:
> 
> 
> On Tue, Aug 16, 2016 at 2:46 PM, Jonne Zutt <jonne.zutt.ml@xxxxxxxxx> wrote:
> I don't seem to have any /path/to/wireshark-2.3.0.tar.xz anywhere.
> Should make dist create that?
> 
> 
> For completeness: yes, the "make dist" step (the first step of "make rpm-package") should have created the source tarball in the top-level directory of your build directory.  One of the subsequent steps should symlink that into your SOURCES directory.
> 
> Do you not have the source tarball even in your top-level build directory?
> 
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
> 
> 
> 
> 
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe