wireshark-3.6.5-x86_64-1salix15.0.xzm optimizing?

If you are looking for a specific 64-bit package and you can't find it in any of the 64-bit repos, please post a request for it here
User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

wireshark-3.6.5-x86_64-1salix15.0.xzm optimizing?

Post#1 by Rava » 08 Oct 2023, 21:29

My system Port 5.0.1 XFCE 4.16.

Code: Select all

root@rava:/tmp# TMP=/mnt/sda2/tmp/ getmod -M wireshark-4.0.8-x86_64-1ponce
Reading Package Lists...Done
Suggested packages:
  alsa-lib bzip2 elfutils eudev expat gcc libffi libjpeg-turbo libpng pcre xz 
  zlib brotli cairo cdparanoia elfutils fontconfig freetype fribidi graphite2 
  harfbuzz libX11 libXau libXdmcp libXext libXrender libXv libdrm libglvnd 
  libgudev libogg libtheora libunwind libvisual libvorbis libxcb libxml2 mesa 
  opus orc pango pixman wayland 
The following NEW packages will be installed:
  libminizip graphene gstreamer gst-plugins-base hunspell jasper judy mariadb 
  openal-soft speech-dispatcher qt5 wireshark 
0 upgraded, 0 reinstalled, 12 newly installed, 0 to remove, 0 not upgraded.
Need to get 34.0kB/153.7MB of archives.
Do you want to continue? [y/N] y

Done
Verifying package hunspell-1.7.1-x86_64-1_slack15.0.txz.
Installing package hunspell-1.7.1-x86_64-1_slack15.0.txz:
PACKAGE DESCRIPTION:
# hunspell (spell checker and morphological analyzer library)
#
# Hunspell is a spell checker and morphological analyzer library
# and program designed for languages with rich morphology
# and complex word compounding or character encoding.
# Hunspell interfaces: Ispell-like terminal interface using ncurses
# library, Ispell pipe interface, and OpenOffice.org UNO module.
#
# Homepage: http://hunspell.sourceforge.net/
#
Executing install script for hunspell-1.7.1-x86_64-1_slack15.0.txz.
Package hunspell-1.7.1-x86_64-1_slack15.0.txz installed.
Verifying package mariadb-10.5.22-x86_64-1_slack15.0.txz.
Installing package mariadb-10.5.22-x86_64-1_slack15.0.txz:
PACKAGE DESCRIPTION:
# mariadb (Drop-in replacement for the MySQL Database Server)
#
# MariaDB is a backward compatible, drop-in replacement branch of the
# MySQL(R) Database Server. It includes all major open source storage
# engines, including the Aria storage engine.
#
# Homepage: http://mariadb.org/
#
Executing install script for mariadb-10.5.22-x86_64-1_slack15.0.txz.
Package mariadb-10.5.22-x86_64-1_slack15.0.txz installed.
Verifying package qt5-5.15.3_20220318_e507d3e5-x86_64-1_slack15.0.txz.
Installing package qt5-5.15.3_20220318_e507d3e5-x86_64-1_slack15.0.txz:
PACKAGE DESCRIPTION:
# qt5 (a C++ graphical user interface toolkit)
#
# Qt is a complete and well-developed object-oriented framework for
# developing graphical user interface (GUI) applications using C++.
#
# Homepage: http://www.qt.io/
#
Executing install script for qt5-5.15.3_20220318_e507d3e5-x86_64-1_slack15.0.txz.
Package qt5-5.15.3_20220318_e507d3e5-x86_64-1_slack15.0.txz installed.
Verifying package wireshark-3.6.5-x86_64-1salix15.0.txz.
Installing package wireshark-3.6.5-x86_64-1salix15.0.txz:
PACKAGE DESCRIPTION:
# wireshark (packet sniffer and protocol analyzer)
#
# Wireshark (aka Ethereal) is a free packet sniffer computer
# application.  It is used for network troubleshooting, analysis,
# software and communications, protocol development and education.
#
# Wireshark uses the cross-platform Qt widget toolkit. Its
# powerful features make it the tool of choice for network
# troubleshooting, protocol development, and education worldwide.
#
# https://www.wireshark.org
Executing install script for wireshark-3.6.5-x86_64-1salix15.0.txz.
Package wireshark-3.6.5-x86_64-1salix15.0.txz installed.
Verifying package libminizip-1.2.11-x86_64-1salix15.0.txz.
Installing package libminizip-1.2.11-x86_64-1salix15.0.txz:
PACKAGE DESCRIPTION:
# libminizip (compression library)
#
# libminizip is small library to compress and decompress zip files
# with the help of zlib.
#
Executing install script for libminizip-1.2.11-x86_64-1salix15.0.txz.
Package libminizip-1.2.11-x86_64-1salix15.0.txz installed.
Verifying package speech-dispatcher-0.10.2-x86_64-5.txz.
Installing package speech-dispatcher-0.10.2-x86_64-5.txz:
PACKAGE DESCRIPTION:
# speech-dispatcher (device independent speech synthesizer)
#
# Speech Dispatcher project provides a high-level device independent
# layer for access to speech synthesis through a simple, stable and well
# documented interface.
#
# Homepage: http://devel.freebsoft.org/speechd/
#
Executing install script for speech-dispatcher-0.10.2-x86_64-5.txz.
Package speech-dispatcher-0.10.2-x86_64-5.txz installed.
Verifying package jasper-2.0.33-x86_64-1.txz.
Installing package jasper-2.0.33-x86_64-1.txz:
PACKAGE DESCRIPTION:
# jasper (free implementation of the JPEG-2000 standard)
#
# The JasPer Project is an open-source initiative to provide a free
# software-based reference implementation of the codec specified in the
# JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1).jasper:
#
# Homepage: http://www.ece.uvic.ca/~mdadams/jasper/
#
Executing install script for jasper-2.0.33-x86_64-1.txz.
Package jasper-2.0.33-x86_64-1.txz installed.
Verifying package graphene-1.10.6-x86_64-1.txz.
Installing package graphene-1.10.6-x86_64-1.txz:
PACKAGE DESCRIPTION:
# graphene (a thin layer of types for graphic libraries)
#
# A thin layer of types needed to write a canvas library dealing with
# points, rectangles, affine matrices, 2D transformations, 4x4 matrices,
# projections, transformations, vectors, and quaternions. It does not
# deal with windowing system surfaces, drawing, scene graphs, or input,
# keeping things small and essential.
#
# Homepage: https://ebassi.github.io/graphene/
#
Executing install script for graphene-1.10.6-x86_64-1.txz.
Package graphene-1.10.6-x86_64-1.txz installed.
Verifying package gst-plugins-base-1.18.5-x86_64-1.txz.
Installing package gst-plugins-base-1.18.5-x86_64-1.txz:
PACKAGE DESCRIPTION:
# gst-plugins-base (base set of GStreamer plugins)
#
# GStreamer Base Plug-ins is a well-groomed and well-maintained 
# collection of GStreamer plug-ins and elements, spanning the 
# range of possible types of elements one would want to write 
# for GStreamer. It also contains helper libraries and base 
# classes useful for writing elements. A wide range of video 
# and audio decoders, encoders, and filters are included.
#
Executing install script for gst-plugins-base-1.18.5-x86_64-1.txz.
Package gst-plugins-base-1.18.5-x86_64-1.txz installed.
Verifying package judy-1.0.5-x86_64-4.txz.
Installing package judy-1.0.5-x86_64-4.txz:
PACKAGE DESCRIPTION:
# judy (sparse dynamic array library)
#
# Judy is a C library that provides a state-of-the-art core technology
# that implements a sparse dynamic array. A Judy array consumes memory
# only when it is populated, yet can grow to take advantage of all
# available memory if desired. Judy's key benefits are scalability,
# high performance, and memory efficiency.
#
# homepage: http://judy.sourceforge.net
#
Executing install script for judy-1.0.5-x86_64-4.txz.
Package judy-1.0.5-x86_64-4.txz installed.
Verifying package gstreamer-1.18.5-x86_64-1.txz.
Installing package gstreamer-1.18.5-x86_64-1.txz:
PACKAGE DESCRIPTION:
# gstreamer (streaming multimedia framework)
# 
# GStreamer is a library that allows the construction of graphs of a
# media-handling components, ranging from simple Ogg/Vorbis playback 
# to complex audio (mixing) and video (non-linear editing) processing.
# Applications can take advantage of advances in codec and filter 
# technology transparently. Developers can add new codecs and filters
# by writing a simple plugin with a clean, generic interface.
# 
# GStreamer is released under the LGPL.
# 
Executing install script for gstreamer-1.18.5-x86_64-1.txz.
Package gstreamer-1.18.5-x86_64-1.txz installed.
Verifying package openal-soft-1.21.1-x86_64-2.txz.
Installing package openal-soft-1.21.1-x86_64-2.txz:
PACKAGE DESCRIPTION:
# openal-soft (OpenAL 3D audio API)
#
# OpenAL Soft is an LGPL-licensed, cross-platform, implementation of the
# OpenAL 3D audio API. OpenAL Soft provides capabilities for playing
# audio in a virtual 3D environment. It also facilitates streaming
# audio, multi-channel buffers, and audio capture.
#
# Homepage: https://openal-soft.org
#
Executing install script for openal-soft-1.21.1-x86_64-2.txz.
Package openal-soft-1.21.1-x86_64-2.txz installed.
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on /mnt/sda2/tmp//wireshark-3.6.5-x86_64-1salix15.0.xzm, block size 262144.
[===========================================================/] 16536/16536 100%

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
	compressed data, compressed metadata, compressed fragments,
	compressed xattrs, compressed ids
	duplicates are removed
Filesystem size 214251.32 Kbytes (209.23 Mbytes)
	24.16% of uncompressed filesystem size (886714.24 Kbytes)
Inode table size 111066 bytes (108.46 Kbytes)
	21.84% of uncompressed inode table size (508622 bytes)
Directory table size 150348 bytes (146.82 Kbytes)
	36.98% of uncompressed directory table size (406540 bytes)
Number of duplicate files found 882
Number of inodes 15274
Number of files 13685
Number of fragments 570
Number of symbolic links 416
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1173
Number of ids (unique uids + gids) 2
Number of uids 2
	root (0)
	mysql (27)
Number of gids 2
	root (0)
	mysql (27)

====> '/mnt/sda2/tmp//wireshark-3.6.5-x86_64-1salix15.0.xzm' was created successfully.
wireshark-3.6.5-x86_64-1salix15.0.xzm was created successfully. But it is abysmal large:

Code: Select all

root@rava:/tmp# ls -o /mnt/sda2/tmp//wireshark-3.6.5-x86_64-1salix15.0.xzm
-rw-r--r-- 1 guest 219394048 2023-10-08 23:06 /mnt/sda2/tmp//wireshark-3.6.5-x86_64-1salix15.0.xzm
209.23 MB for a mere network monitoring tool. I guess that's the price for going with a GUI solution instead of using tcpdump. :)

Has anyone tried optimizing the wireshark module?

I am sure there could be stuff stripped away.
Like all LOCALEs. And only keep the absolute needed stuff from the largest dependencies, like qt5-5.15.3_20220318_e507d3e5-x86_64-1_slack15.0.txz 94.4MB as txz - mariadb 10.5.22-x86_64-1_slack15.0 28.3MB also as txz.


I wish there was an option telling getmod to not delete the folder in which it installs the packages into, so that one can delete stuff in there (like all LOCALEs that are not essential since every program can run as English version by default) and try creating a smaller module (that might fail when one strips off too much; therefore one must always keep the previous working module.


* Keep the non-stripped version as made by getmod. e.g. app-name.xzm

* Only strip LOCALEs and create a e.g. app-name_v2.xzm module.
Test app-name_v2.xzm - if it works try stripping away more.

* Create a 3rd version: app-name_v3.xzm But keep app-name.xzm and app-name_v2.xzm

* Continue until your program fails. then try and check thoroughly the last seemingly working module.
Cave! That module might work for your current DE but not for other DEs, or might only work because you have some other non-standard modules loaded that cover some of the now-stripped-out dependencies. So it might not work for you in the future when you no longer have these other modules loaded as well.
Therefore: always keep app-name.xzm and app-name_v2.xzm as in my explanation example above.
Cheers!
Yours Rava

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3941
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

wireshark-3.6.5-x86_64-1salix15.0.xzm optimizing?

Post#2 by ncmprhnsbl » 09 Oct 2023, 01:01

first, i draw your attention to: Porteus-v5.01 is released!
Slackware package managers included: slapt-get and slackpkg (in core) and slpkg (in 05-devel)
A simple wrapper for slapt-get: slapt-mod : to produce a module of the package (a revision of getmod by babam)
Updated the onboard FAQ documents regarding package management.
the main difference between slapt-mod and getmod is the conf file: /etc/slapt-get/slapt-modrc, in which there are settings to keep or remove: headers, man pages, docs and locales(with an option to keep your preferred)
the default is remove all.
the name change(to slapt-mod) is meant to better reflect what it is a wrapper for and differentiate it from getpkg(which ironically produces a module by default ;p)
you are, of course welcome to use whatever you want.

now, that doesn't address the excess or unwanted dependencies.
1. qt5. there is a bundle: qt5-base that may be enough: extract your module, do

Code: Select all

ROOT=<your_extracted_module> removepkg qt5
activate qt5-base bundle and your recreated module and see if it works
if you really want to strip qt5, be sure to remove the usr/lib64/cmake files as well ass the webengine lib is the largest thing you won't need.
2. we already have openal-soft under the name of OpenAL, though probly an older version.. not huge so maybe ignore
3. hunspell seems a weird inclusion.. spellchecking what exactly?
4. mariadb could be optional too
5. speech-dispatcher? i think most of this stuff is part of slackwares "qt5 complex" ie. everything you might everwant is included..

without looking, i guess that wireshark-cli is also included in the package if that is enough for you..
i think the easiest optimization approach is to grab only the wireshark package, install that and do ldd on the binaries to see what's really needed to run.
to sum up: slapt-get and salix auto dependency resolution is for those who don't care about optimization. (but is handy to find out what you might need )
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Rapha_
Shogun
Shogun
Posts: 238
Joined: 12 Jun 2021, 21:59
Distribution: Xfce 4.12 - 5.rc3 - x86_64
Location: France

wireshark-3.6.5-x86_64-1salix15.0.xzm optimizing?

Post#3 by Rapha_ » 09 Oct 2023, 01:46

A test with sbbdep :

Code: Select all

sbbdep --quiet /var/lib/pkgtools/packages/wireshark-3.6.5-x86_64-1salix15.0
(fillAllAndNew) can't read file /var/adm/packages/mozjs78-78.15.0esr-x86_64-port
(fillAllAndNew) can't read file /var/adm/packages/llvm-13.0.0-x86_64-2
(fillAllAndNew) can't read file /var/adm/packages/gtk+3-3.24.33-x86_64-2ncm
(fillAllAndNew) can't read file /var/adm/packages/boost-1.78.0-x86_64-2_slack15.0
(fillAllAndNew) can't read file /var/adm/packages/binutils-2.37-x86_64-port
aaa_glibc-solibs = 2.35-x86_64-2 | glibc = 2.35-x86_64-2
aaa_libraries = 15.0-x86_64-19
aaa_libraries = 15.0-x86_64-19 | glib2 = 2.70.3-x86_64-1
aaa_libraries = 15.0-x86_64-19 | libcap = 2.63-x86_64-1
aaa_libraries = 15.0-x86_64-19 | zlib = 1.2.13-x86_64-1_slack15.0
aaa_libraries = 15.0-x86_64-19 | zstd = 1.5.5-x86_64-1_slack15.0
brotli = 1.0.9-x86_64-7
gnutls = 3.7.9-x86_64-1_slack15.0
libgcrypt = 1.9.4-x86_64-1
libnl3 = 3.5.0-x86_64-3
libpcap = 1.10.1-x86_64-1
libssh = 0.9.6-x86_64-1
libxml2 = 2.9.14-x86_64-1_slack15.0
lz4 = 1.9.3-x86_64-3
nghttp2 = 1.46.0-x86_64-1
opus = 1.3.1-x86_64-3
sbc = 1.5-x86_64-3
speexdsp = 1.2.0-x86_64-3


sonames not found via standard paths: 
 for /usr/bin/wireshark: libQt5Core.so.5, libQt5Gui.so.5, libQt5Multimedia.so.5, libQt5PrintSupport.so.5, libQt5Widgets.so.5, libminizip.so.1
 for /usr/lib64/libwireshark.so.15.0.5: liblua.so
this does not necessarily mean there is a problem 
the application can either have its own environment  or the soname is resolved via a link name
you can re-check the affected files with --ldd

it seem to need only :

for /usr/bin/wireshark: libQt5Core.so.5, libQt5Gui.so.5, libQt5Multimedia.so.5, libQt5PrintSupport.so.5, libQt5Widgets.so.5, libminizip.so.1
for /usr/lib64/libwireshark.so.15.0.5: liblua.so

User avatar
AcnapyxoB
Samurai
Samurai
Posts: 191
Joined: 24 Dec 2014, 10:15
Distribution: Porteus 5.01
Location: Planet Earth

wireshark-3.6.5-x86_64-1salix15.0.xzm optimizing?

Post#4 by AcnapyxoB » 09 Oct 2023, 04:54

Rava wrote:
08 Oct 2023, 21:29
Has anyone tried optimizing the wireshark module?
Here You are 27MB:
https://disk.yandex.com/d/EpyXyK7dWVSGOw
Porteus v5.01 KDE x86_64

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

wireshark-3.6.5-x86_64-1salix15.0.xzm optimizing?

Post#5 by Rava » 09 Oct 2023, 11:40

ncmprhnsbl wrote:
09 Oct 2023, 01:01
differentiate it from getpkg(which ironically produces a module by default ;p)
Really, it does? That is quite ironic indeed.
ncmprhnsbl wrote:
09 Oct 2023, 01:01
the webengine lib is the largest thing you won't need.
What's the exact name of that webengine lib?
ncmprhnsbl wrote:
09 Oct 2023, 01:01
i think the easiest optimization approach is to grab only the wireshark package, install that and do ldd on the binaries to see what's really needed to run.
Sometimes the easiest, sometimes not.
At the beginning you have no clue how many missing dependencies have missing dependencies on their own. Usually when i hit the 30th solved dependency and that created lots of new sub-sub-sub-dependencies I simply give up.

Thanks on the insights into what is most likely unneeded. And stripping off all but the bare minimum can create astonishing results, like my now outdated GIMP module that had all needed dependencies to run (albeit with some non consequential warnings) in XFCE:

gimp-2.10.8-x86_64-1_stripped+minimal_dependencies_rava.xzm - a mere 13.80 MB. :Yahoo!:
Cheers!
Yours Rava

Post Reply