Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654158 - net-analyzer/wireshark should install cmake/modules/*.cmake
Summary: net-analyzer/wireshark should install cmake/modules/*.cmake
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on: 545688
Blocks:
  Show dependency tree
 
Reported: 2018-04-26 23:52 UTC by Anton Bolshakov
Modified: 2018-05-02 20:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
wireshark-2.5.1.ebuild (DRAFT) (wireshark-2.5.1.ebuild,7.25 KB, text/plain)
2018-04-28 15:21 UTC, Anton Bolshakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2018-04-26 23:52:40 UTC
I noticed that wireshark ebuild uses a custom src_install function.

Unlike CMakelists.txt, it does not installed few *.cmake files which might be required for standalone plugins (https://github.com/CoreSecurity/SAP-Dissection-plug-in-for-Wireshark/issues/15)

CMakelists.txt
install(
        FILES
                ${CMAKE_MODULE_PATH}/FindGLIB2.cmake
                ${CMAKE_MODULE_PATH}/FindWireshark.cmake
                ${CMAKE_MODULE_PATH}/FindWSWinLibs.cmake
                ${CMAKE_MODULE_PATH}/UseAsn2Wrs.cmake
                ${CMAKE_MODULE_PATH}/LocatePythonModule.cmake
                ${CMAKE_MODULE_PATH}/UseMakeDissectorReg.cmake
                ${CMAKE_BINARY_DIR}/WiresharkConfig.cmake
                ${CMAKE_BINARY_DIR}/WiresharkConfigVersion.cmake
        DESTINATION
                ${CMAKE_INSTALL_MODULES_DIR}


In particular, the SAP plugin uses WiresharkConfig.cmake to discover all information about wireshark.

Please include these files as well.

Thank you.

emerge --info 
Portage 2.3.24 (python 3.5.5-final-0, default/linux/amd64/17.0/hardened, gcc-6.4.0, glibc-2.25-r11, 4.16.4-pentoo x86_64)
=================================================================
System uname: Linux-4.16.4-pentoo-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-gentoo-2.4.1
KiB Mem:     7971208 total,   1256232 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Thu, 26 Apr 2018 04:15:01 +0000
Head commit of repository gentoo: 6e56663ad2f11eb0e3c0032dee225f75725bf3e5
Head commit of repository pentoo: 2396755e1570e38a75c7836d044d58e24317b835

sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r2::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r11::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.asia.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: 

local-overlay
    location: /usr/local/portage
    masters: gentoo
    priority: 0

pentoo
    location: /data/pentoo/pentoo
    sync-type: git
    sync-uri: https://github.com/pentoo/pentoo-overlay
    masters: gentoo

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA OPERA-12 NVIDIA-CUDA PUEL AdobeFlash-11.x Google-TOS dlj-1.1 google-chrome Oracle-BCLA-JavaSE Intel-SDP skype-4.0.0.7-copyright baudline"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ANDROID_HOME="/opt/android-sdk-update-manager"
ANDROID_SWT="/usr/share/swt-3.7/lib"
ANT_HOME="/usr/share/ant"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="cxx unicode internal-glib python_targets_python3_5 python_targets_python2_7 multilib hardened pic xtpax -jit -orc"
CALLIGRA_FEATURES="karbon plan sheets stage words"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache"
COLORTERM="truecolor"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
CXXFLAGS="-march=native -O2 -pipe"
DEFAULT_ABI="amd64"
DISPLAY=":0"
DISTDIR="/usr/portage/distfiles"
EDITOR="/usr/bin/mcedit"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS=" --ask-enter-invalid --keep-going=y --binpkg-respect-use=y --tree --verbose --with-bdeps=y --autounmask=n --buildpkg-exclude "sys-kernel/compat-drivers sys-kernel/ax88179_178a x11-drivers/ati-drivers x11-drivers/nvidia-drivers sys-fs/zfs-kmod sys-kernel/spl                   sys-power/bbswitch pentoo/pentoo-installer x11-drivers/xf86-video-virtualbox app-emulation/virtualbox-guest-additions                    app-emulation/virtualbox-modules app-emulation/vmware-modules app-emulation/open-vm-tools-kmod sys-kernel/genkernel                  sys-kernel/pentoo-sources dev-python/twisted-web net-analyzer/metasploit sci-libs/lapack-reference x11-base/xorg-drivers app-admin/genmenu" --usepkg-exclude "sys-kernel/compat-drivers sys-kernel/ax88179_178a x11-drivers/ati-drivers x11-drivers/nvidia-drivers sys-fs/zfs-kmod sys-kernel/spl                         sys-power/bbswitch pentoo/pentoo-installer x11-drivers/xf86-video-virtualbox app-emulation/virtualbox-guest-additions                        app-emulation/virtualbox-modules app-emulation/vmware-modules app-emulation/open-vm-tools-kmod sys-kernel/genkernel                  sys-kernel/pentoo-sources dev-python/twisted-web net-analyzer/metasploit sci-libs/lapack-reference x11-base/xorg-drivers app-admin/genmenu""
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp \${port:+-P \${port}} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FFLAGS="-O2 -pipe"
GCC_SPECS=""
GENTOO_MIRRORS="http://gentoo.aditsu.net:8000/"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx"
GRUB_PLATFORMS=""
GSETTINGS_BACKEND="dconf"
HOME="/root"
INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.29.1/info:/usr/share/info"
INPUT_DEVICES="evdev keyboard mouse synaptics"
INSTALL_MASK="*.la"
IUSE_IMPLICIT="abi_x86_64 prefix prefix-chain prefix-guest"
JAVAC="/etc/java-config-2/current-system-vm/bin/javac"
JAVA_HOME="/etc/java-config-2/current-system-vm"
JDK_HOME="/etc/java-config-2/current-system-vm"
KERNEL="linux"
L10N="en ru"
LANG="en_SG.UTF-8"
LANGUAGE=""
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_CTYPE="ru_RU.utf8"
LC_MESSAGES="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBDIR_amd64="lib64"
LIBDIR_x32="libx32"
LIBDIR_x86="lib32"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LINGUAS="en ru"
LOGNAME="root"
Comment 1 Anton Bolshakov 2018-04-27 02:13:52 UTC
ok, so I figure it out. That sap plugin uses cmake build tool (find_package function) and expects these *.cmake files which will only be installed if wireshark compiled using cmake as well. However, Gentoo builds wireshark using autotools and these files does not get generated.

I have already requested sap plugin author to use an independent approach.

What would be your recommendation?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-27 07:48:52 UTC
(In reply to Anton Bolshakov from comment #0)
>         DESTINATION
>                 ${CMAKE_INSTALL_MODULES_DIR}

Where would that be?
Comment 3 Anton Bolshakov 2018-04-27 08:39:03 UTC
(In reply to Jeroen Roovers from comment #2)
> (In reply to Anton Bolshakov from comment #0)
> >         DESTINATION
> >                 ${CMAKE_INSTALL_MODULES_DIR}
> 
> Where would that be?

set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/${PLUGIN_VERSION_DIR}")
set(CMAKE_INSTALL_MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME})

It goes into /usr/lib64/wireshark/*.camke in my system.
Comment 4 Anton Bolshakov 2018-04-27 08:48:28 UTC
FYI, I converted the ebuild to cmake quickly, and it configured and installed the required files properly.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-28 09:58:04 UTC
(In reply to Anton Bolshakov from comment #4)
> FYI, I converted the ebuild to cmake quickly, and it configured and
> installed the required files properly.

OK. Where is it?

(Alternatively configure.ac and Makefile.am would need to be patched to set many cmake related variables. This is not trivial stuff. Either the SAP plugin should look for both the pkgconfig file and the cmake modules, or wireshark upstream should implement installing the cmake modules when autotools are used as they see fit. But I wouldn't mind switching to cmake.)
Comment 6 Anton Bolshakov 2018-04-28 15:21:51 UTC
Created attachment 528726 [details]
wireshark-2.5.1.ebuild (DRAFT)

I will be overseas for the next 2 weeks and might not be able to produce a proper ebuild. I'm attaching the current draft ebuild for now.

TODO:
 - src_configure: cmake-utils_use_xx optsions need to be converted to EAPI=6 and tested
 - src_install: doins ${wsheader} not getting installed

everything else should work fine.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2018-05-02 15:54:00 UTC
Comment on attachment 528726 [details]
wireshark-2.5.1.ebuild (DRAFT)

Pity you missed the 2.6.0 release.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2018-05-02 16:43:54 UTC
Comment on attachment 528726 [details]
wireshark-2.5.1.ebuild (DRAFT)

(Attached to the wrong bug.)
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2018-05-02 18:40:27 UTC
qlist -eo wireshark |grep cmake$
/usr/lib64/wireshark/WiresharkConfig.cmake
/usr/lib64/wireshark/LocatePythonModule.cmake
/usr/lib64/wireshark/UseMakePluginReg.cmake
/usr/lib64/wireshark/FindGLIB2.cmake
/usr/lib64/wireshark/FindWireshark.cmake
/usr/lib64/wireshark/WiresharkConfigVersion.cmake
/usr/lib64/wireshark/UseAsn2Wrs.cmake
/usr/lib64/wireshark/FindWSWinLibs.cmake

Fixed in 2.6.0-r1 and the live ebuild.
Comment 10 Anton Bolshakov 2018-05-02 20:34:55 UTC
looks very good. Thank you!