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] RPM generation

From: Dario Lombardo <dario.lombardo.ml@xxxxxxxxx>
Date: Mon, 16 Apr 2018 12:13:09 +0200


On Mon, Apr 16, 2018 at 10:22 AM, Peter Wu <peter@xxxxxxxxxxxxx> wrote:

Which instructions? I looked for "cmake -" in the source tree, and all
documentation in docbook/ suggest a build dir next to the source dir.
The only example that creates a build dir in the source tree is the
Gitlab CI configuration.

When searching on google about cmake, I usually find instructions like "mkdir build;cd build;cmake ..;make". I didn't mean instructions related to wireshark.
 

The general recommendation is to do an out-of-tree build (where the
build directory is not equal to the source tree). This could either be
in-tree (mkdir build && cd build) or in a different location (mkdir
/tmp/build && cd /tmp/build).

They are both perfectly fine, indeed. I was just pointing out that sometimes (like the openSUSE %cmake macro) there is the general assumption that the build dir is under the source dir. This assumption can be found in wireshark/CMakeLists.txt, under the rpm-package target, where _git_description is set based on "git describe" output. This works if and only if the build dir is under the source dir and not if it's somewhere else.