diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-26 17:44:24 +0000 |
commit | 3a4bbfd6c88ea4c2af0d1ed6a6df6ffedd19b142 (patch) | |
tree | 841d99caedeb43d468c0ed667f5c9a9c76f5e388 /debian | |
parent | Merging upstream version 4.2.4. (diff) | |
download | wireshark-3a4bbfd6c88ea4c2af0d1ed6a6df6ffedd19b142.tar.xz wireshark-3a4bbfd6c88ea4c2af0d1ed6a6df6ffedd19b142.zip |
Adding debian version 4.2.4-1.debian/4.2.4-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/changelog | 24 | ||||
-rw-r--r-- | debian/control | 4 | ||||
-rw-r--r-- | debian/control.in | 279 | ||||
-rw-r--r-- | debian/control.t64.in | 289 | ||||
-rw-r--r-- | debian/headers-check.c | 2 | ||||
-rw-r--r-- | debian/libwireshark17t64.symbols | 2 | ||||
-rw-r--r-- | debian/patches/0001-wslua-Fix-support-for-Lua-5.1-and-5.2-on-32bit.patch | 699 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/po/sv.po | 41 | ||||
-rwxr-xr-x | debian/rules | 38 | ||||
-rw-r--r-- | debian/watch | 3 |
11 files changed, 1361 insertions, 21 deletions
diff --git a/debian/changelog b/debian/changelog index c2476fed..12894d9f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +wireshark (4.2.4-1) unstable; urgency=medium + + [ Martin Bagge ] + * Update Swedish debconf translation (Closes: #1060670) + + [ Balint Reczey ] + * debian/control: Drop comment about libgnutls28-dev's version's GPL + compatibility. All supported releases already have the GPL2+ compatible + libgnutls28-dev version. + * Generate debian/control from control.in based on the target release + * ACK NMU + * Drop t64-related changes for backports + * debian/watch: Update handling GitLab's page to make uscan work again + * New upstream version 4.2.4: + - security fixes (Closes: #1068111): + - T.38 dissector crash (CVE-2024-2955) + * Update symbols for libwireshark17t64 + * libwireshark-dev: Ship missing dfilter-loc.h. + Also check if dfilter.h is usable, too, in debian/headers-check.c. + (Closes: #1068410) + * Cherry-pick upstream patch to fix Lua 5.2 integration on 32 bit systems + + -- Balint Reczey <balint@balintreczey.hu> Fri, 26 Apr 2024 11:30:27 +0200 + wireshark (4.2.2-1.1) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/control b/debian/control index 05b20b37..dd4939cb 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,8 @@ Source: wireshark Maintainer: Balint Reczey <balint@balintreczey.hu> Section: net Priority: optional -Build-Depends: dpkg-dev (>= 1.22.5), qt6-5compat-dev, +Build-Depends: dpkg-dev (>= 1.22.5), + qt6-5compat-dev, qt6-base-dev, qt6-base-dev-tools, qt6-multimedia-dev, @@ -26,7 +27,6 @@ Build-Depends: dpkg-dev (>= 1.22.5), qt6-5compat-dev, lsb-release, libparse-yapp-perl, libglib2.0-dev, -# libgnutls28-dev >= 3.2.14-1 is GPLv2+ compatible. libgnutls28-dev, libgcrypt-dev, libkrb5-dev, diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 00000000..e8f06ae5 --- /dev/null +++ b/debian/control.in @@ -0,0 +1,279 @@ +Source: wireshark +Maintainer: Balint Reczey <balint@balintreczey.hu> +Section: net +Priority: optional +Build-Depends: @QT_BUILD_DEPS@, + libpcap0.8-dev, + flex, + libz-dev, + debhelper (>= 12), + po-debconf, + python3, + python3-ply, + python3-pytest <!nocheck>, + python3-pytest-xdist <!nocheck>, + libc-ares-dev, + xsltproc, + dh-python, + docbook-xsl, + docbook-xml, + libxml2-utils, + libcap2-dev | libcap-dev, + lsb-release, + libparse-yapp-perl, + libglib2.0-dev, + libgnutls28-dev, + libgcrypt-dev, + libkrb5-dev, + liblua5.2-dev, + libsmi2-dev, + libmaxminddb-dev, + libopencore-amrnb-dev, + libopus-dev, + libsystemd-dev, + libnl-genl-3-dev [linux-any], + libnl-route-3-dev [linux-any], + asciidoctor, + cmake (>= 3.5), + libsbc-dev, + libnghttp2-dev, + libnghttp3-dev, + libssh-gcrypt-dev, + liblz4-dev, + libsnappy-dev, + libzstd-dev, + libspandsp-dev, + libxml2-dev, + libbrotli-dev, + libspeexdsp-dev, + libminizip-dev, + libbcg729-dev, + libxkbcommon-dev +Build-Conflicts: libsnmp4.2-dev, + libsnmp-dev +Standards-Version: 4.6.0.1 +Rules-Requires-Root: no +Vcs-Browser: https://salsa.debian.org/debian/wireshark +Vcs-Git: https://salsa.debian.org/debian/wireshark.git -b debian/master +Homepage: https://www.wireshark.org/ + +Package: wireshark-common +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libwireshark17 (>= ${binary:Version}), + libwiretap14 (>= ${binary:Version}), + debconf, + libcap2-bin [linux-any] +Recommends: wireshark (>= ${binary:Version}) | tshark (>= ${binary:Version}) +Breaks: wireshark (<< 2.0.0~), + wireshark-gtk (<< 3.0.0), + wireshark-qt (<< 2.0.0~rc3+g841d5e1) +Replaces: wireshark (<< 2.0.0~), + wireshark-qt (<< 2.0.0~rc3+g841d5e1) +Description: network traffic analyzer - common files + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package provides files common to both wireshark and tshark + (the console version). + +Package: wireshark +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + wireshark-common (= ${binary:Version}), + @QT_DEPS@ +Recommends: @QT_RECOMMENDS@ +Conflicts: wireshark-qt (<< 4.4~), + wireshark-gtk (<< 3.0.0~) +Replaces: wireshark-qt (<< 4.4~), + wireshark-gtk (<< 3.0.0~) +Description: network traffic analyzer - graphical interface + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + +Package: tshark +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + wireshark-common (= ${binary:Version}) +Description: network traffic analyzer - console version + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package provides the console version of wireshark, named + "tshark". + +Package: wireshark-dev +Architecture: any +Section: devel +Depends: ${misc:Depends}, + ${shlibs:Depends}, + omniidl, + libpcap0.8-dev, + libglib2.0-dev, + ${python3:Depends}, + python3-ply, + snacc, + libwireshark-dev, + libwiretap-dev +Description: network traffic analyzer - development tools + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package provides idl2wrs and other files necessary for developing + new packet dissectors. + +Package: wireshark-doc +Architecture: all +Multi-Arch: foreign +Section: doc +Depends: ${misc:Depends} +Description: network traffic analyzer - documentation + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package contains Wireshark User's guide, Wireshark Developer's Guide + and the Lua Reference. + +Package: libwireshark17 +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libwireshark-data (>= ${source:Version}), + libwsutil15 (>= ${source:Version}) +Suggests: wireshark-doc (>= ${source:Version}) +Pre-Depends: ${misc:Pre-Depends} +Description: network packet dissection library -- shared library + The libwireshark library provides the network packet dissection services + developed by the Wireshark project. + +Package: libwsutil15 +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Description: network packet dissection utilities library -- shared library + The libwsutil library provides utility functions for Wireshark and related + binaries and shared libraries. + +Package: libwsutil-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, + libwsutil15 (= ${binary:Version}) +Breaks: libwireshark-dev (<< 3.7.0~) +Replaces: libwireshark-dev (<< 3.7.0~) +Description: network packet dissection utilities library -- development files + The libwsutil library provides utility functions for Wireshark and related + binaries and shared libraries. + . + This package contains the static library and the C header files that are + needed for applications to use the libwsutil library. + +Package: libwireshark-data +Architecture: all +Multi-Arch: foreign +Section: libs +Depends: ${misc:Depends} +Suggests: geoipupdate, + geoip-database, + geoip-database-extra, + libjs-leaflet, + libjs-leaflet.markercluster, + snmp-mibs-downloader +Description: network packet dissection library -- data files + The libwireshark library provides the network packet dissection services + developed by the Wireshark project. + . + This package contains the platform independent files. + +Package: libwireshark-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, + libwsutil-dev, + libwiretap-dev, + libwireshark17 (= ${binary:Version}) +Description: network packet dissection library -- development files + The "libwireshark" library provides the network packet dissection services + developed by the Wireshark project. + . + This package contains the static library and the C header files that are + needed for applications to use libwireshark services. + +Package: libwiretap14 +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Description: network packet capture library -- shared library + Wiretap, part of the Wireshark project, is a library that allows one to + read and write several packet capture file formats. + . + Supported formats are: + * Libpcap + * Sniffer + * LANalyzer + * Network Monitor + * "snoop" + * "iptrace" + * Sniffer Basic (NetXRay)/Windows Sniffer Pro + * RADCOM WAN/LAN Analyzers + * Lucent/Ascend access products + * HP-UX nettl + * Toshiba ISDN Router + * ISDN4BSD "i4btrace" utility + * Cisco Secure Intrusion Detection System iplogging facility + * pppd logs (pppdump-format files) + * VMS TCPTRACE + * DBS Etherwatch (text format) + * Catapult DCT2000 (.out files) + . + Wiretap's shortcomings are: no filter capability and no support for packet + capture. + +Package: libwiretap-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, + libwiretap14 (= ${binary:Version}) +Description: network packet capture library -- development files + Wiretap, part of the Wireshark project, is a library that allows one to + read and write several packet capture file formats. + . + Supported formats are: + * Libpcap + * Sniffer + * LANalyzer + * Network Monitor + * "snoop" + * "iptrace" + * Sniffer Basic (NetXRay)/Windows Sniffer Pro + * RADCOM WAN/LAN Analyzers + * Lucent/Ascend access products + * HP-UX nettl + * Toshiba ISDN Router + * ISDN4BSD "i4btrace" utility + * Cisco Secure Intrusion Detection System iplogging facility + * pppd logs (pppdump-format files) + * VMS TCPTRACE + * DBS Etherwatch (text format) + * Catapult DCT2000 (.out files) + . + Wiretap's shortcomings are: no filter capability and no support for packet + capture. + . + This package contains the static library and the C header files. diff --git a/debian/control.t64.in b/debian/control.t64.in new file mode 100644 index 00000000..991c47b7 --- /dev/null +++ b/debian/control.t64.in @@ -0,0 +1,289 @@ +Source: wireshark +Maintainer: Balint Reczey <balint@balintreczey.hu> +Section: net +Priority: optional +Build-Depends: dpkg-dev (>= 1.22.5), + @QT_BUILD_DEPS@, + libpcap0.8-dev, + flex, + libz-dev, + debhelper (>= 12), + po-debconf, + python3, + python3-ply, + python3-pytest <!nocheck>, + python3-pytest-xdist <!nocheck>, + libc-ares-dev, + xsltproc, + dh-python, + docbook-xsl, + docbook-xml, + libxml2-utils, + libcap2-dev | libcap-dev, + lsb-release, + libparse-yapp-perl, + libglib2.0-dev, + libgnutls28-dev, + libgcrypt-dev, + libkrb5-dev, + liblua5.2-dev, + libsmi2-dev, + libmaxminddb-dev, + libopencore-amrnb-dev, + libopus-dev, + libsystemd-dev, + libnl-genl-3-dev [linux-any], + libnl-route-3-dev [linux-any], + asciidoctor, + cmake (>= 3.5), + libsbc-dev, + libnghttp2-dev, + libnghttp3-dev, + libssh-gcrypt-dev, + liblz4-dev, + libsnappy-dev, + libzstd-dev, + libspandsp-dev, + libxml2-dev, + libbrotli-dev, + libspeexdsp-dev, + libminizip-dev, + libbcg729-dev, + libxkbcommon-dev +Build-Conflicts: libsnmp4.2-dev, + libsnmp-dev +Standards-Version: 4.6.0.1 +Rules-Requires-Root: no +Vcs-Browser: https://salsa.debian.org/debian/wireshark +Vcs-Git: https://salsa.debian.org/debian/wireshark.git -b debian/master +Homepage: https://www.wireshark.org/ + +Package: wireshark-common +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libwireshark17t64 (>= ${binary:Version}), + libwiretap14t64 (>= ${binary:Version}), + debconf, + libcap2-bin [linux-any] +Recommends: wireshark (>= ${binary:Version}) | tshark (>= ${binary:Version}) +Breaks: wireshark (<< 2.0.0~), + wireshark-gtk (<< 3.0.0), + wireshark-qt (<< 2.0.0~rc3+g841d5e1) +Replaces: wireshark (<< 2.0.0~), + wireshark-qt (<< 2.0.0~rc3+g841d5e1) +Description: network traffic analyzer - common files + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package provides files common to both wireshark and tshark + (the console version). + +Package: wireshark +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + wireshark-common (= ${binary:Version}), + @QT_DEPS@ +Recommends: @QT_RECOMMENDS@ +Conflicts: wireshark-qt (<< 4.4~), + wireshark-gtk (<< 3.0.0~) +Replaces: wireshark-qt (<< 4.4~), + wireshark-gtk (<< 3.0.0~) +Description: network traffic analyzer - graphical interface + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + +Package: tshark +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + wireshark-common (= ${binary:Version}) +Description: network traffic analyzer - console version + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package provides the console version of wireshark, named + "tshark". + +Package: wireshark-dev +Architecture: any +Section: devel +Depends: ${misc:Depends}, + ${shlibs:Depends}, + omniidl, + libpcap0.8-dev, + libglib2.0-dev, + ${python3:Depends}, + python3-ply, + snacc, + libwireshark-dev, + libwiretap-dev +Description: network traffic analyzer - development tools + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package provides idl2wrs and other files necessary for developing + new packet dissectors. + +Package: wireshark-doc +Architecture: all +Multi-Arch: foreign +Section: doc +Depends: ${misc:Depends} +Description: network traffic analyzer - documentation + Wireshark is a network "sniffer" - a tool that captures and analyzes + packets off the wire. Wireshark can decode too many protocols to list + here. + . + This package contains Wireshark User's guide, Wireshark Developer's Guide + and the Lua Reference. + +Package: libwireshark17t64 +Provides: ${t64:Provides} +Replaces: libwireshark17 +Breaks: libwireshark17 (<< ${source:Version}) +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libwireshark-data (>= ${source:Version}), + libwsutil15t64 (>= ${source:Version}) +Suggests: wireshark-doc (>= ${source:Version}) +Pre-Depends: ${misc:Pre-Depends} +Description: network packet dissection library -- shared library + The libwireshark library provides the network packet dissection services + developed by the Wireshark project. + +Package: libwsutil15t64 +Provides: ${t64:Provides} +Replaces: libwsutil15 +Breaks: libwsutil15 (<< ${source:Version}) +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Description: network packet dissection utilities library -- shared library + The libwsutil library provides utility functions for Wireshark and related + binaries and shared libraries. + +Package: libwsutil-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, + libwsutil15t64 (= ${binary:Version}) +Breaks: libwireshark-dev (<< 3.7.0~) +Replaces: libwireshark-dev (<< 3.7.0~) +Description: network packet dissection utilities library -- development files + The libwsutil library provides utility functions for Wireshark and related + binaries and shared libraries. + . + This package contains the static library and the C header files that are + needed for applications to use the libwsutil library. + +Package: libwireshark-data +Architecture: all +Multi-Arch: foreign +Section: libs +Depends: ${misc:Depends} +Suggests: geoipupdate, + geoip-database, + geoip-database-extra, + libjs-leaflet, + libjs-leaflet.markercluster, + snmp-mibs-downloader +Description: network packet dissection library -- data files + The libwireshark library provides the network packet dissection services + developed by the Wireshark project. + . + This package contains the platform independent files. + +Package: libwireshark-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, + libwsutil-dev, + libwiretap-dev, + libwireshark17t64 (= ${binary:Version}) +Description: network packet dissection library -- development files + The "libwireshark" library provides the network packet dissection services + developed by the Wireshark project. + . + This package contains the static library and the C header files that are + needed for applications to use libwireshark services. + +Package: libwiretap14t64 +Provides: ${t64:Provides} +Replaces: libwiretap14 +Breaks: libwiretap14 (<< ${source:Version}) +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Description: network packet capture library -- shared library + Wiretap, part of the Wireshark project, is a library that allows one to + read and write several packet capture file formats. + . + Supported formats are: + * Libpcap + * Sniffer + * LANalyzer + * Network Monitor + * "snoop" + * "iptrace" + * Sniffer Basic (NetXRay)/Windows Sniffer Pro + * RADCOM WAN/LAN Analyzers + * Lucent/Ascend access products + * HP-UX nettl + * Toshiba ISDN Router + * ISDN4BSD "i4btrace" utility + * Cisco Secure Intrusion Detection System iplogging facility + * pppd logs (pppdump-format files) + * VMS TCPTRACE + * DBS Etherwatch (text format) + * Catapult DCT2000 (.out files) + . + Wiretap's shortcomings are: no filter capability and no support for packet + capture. + +Package: libwiretap-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends}, + libwiretap14t64 (= ${binary:Version}) +Description: network packet capture library -- development files + Wiretap, part of the Wireshark project, is a library that allows one to + read and write several packet capture file formats. + . + Supported formats are: + * Libpcap + * Sniffer + * LANalyzer + * Network Monitor + * "snoop" + * "iptrace" + * Sniffer Basic (NetXRay)/Windows Sniffer Pro + * RADCOM WAN/LAN Analyzers + * Lucent/Ascend access products + * HP-UX nettl + * Toshiba ISDN Router + * ISDN4BSD "i4btrace" utility + * Cisco Secure Intrusion Detection System iplogging facility + * pppd logs (pppdump-format files) + * VMS TCPTRACE + * DBS Etherwatch (text format) + * Catapult DCT2000 (.out files) + . + Wiretap's shortcomings are: no filter capability and no support for packet + capture. + . + This package contains the static library and the C header files. diff --git a/debian/headers-check.c b/debian/headers-check.c index 9ed391a1..0f123767 100644 --- a/debian/headers-check.c +++ b/debian/headers-check.c @@ -13,4 +13,4 @@ #include <epan/stats_tree.h> #include <epan/packet.h> #include <epan/prefs.h> - +#include <epan/dfilter/dfilter.h> diff --git a/debian/libwireshark17t64.symbols b/debian/libwireshark17t64.symbols index f01b0df3..968d6a11 100644 --- a/debian/libwireshark17t64.symbols +++ b/debian/libwireshark17t64.symbols @@ -278,6 +278,7 @@ libwireshark.so.17 libwireshark17t64 #MINVER# decode_zcl_time_in_100ms@Base 2.5.2 decode_zcl_time_in_minutes@Base 2.5.2 decode_zcl_time_in_seconds@Base 2.5.2 + decrement_dissection_depth@Base 4.2.4 delete_itu_tcap_subdissector@Base 1.9.1 deregister_depend_dissector@Base 2.1.0 destroy_print_stream@Base 1.12.0~rc1 @@ -997,6 +998,7 @@ libwireshark.so.17 libwireshark17t64 #MINVER# ieee802a_add_oui@Base 1.9.1 in_cksum@Base 1.9.1 in_cksum_ret_partial@Base 4.2.0 + increment_dissection_depth@Base 4.2.4 init_srt_table@Base 1.99.8 init_srt_table_row@Base 1.99.8 ip_checksum@Base 1.99.0 diff --git a/debian/patches/0001-wslua-Fix-support-for-Lua-5.1-and-5.2-on-32bit.patch b/debian/patches/0001-wslua-Fix-support-for-Lua-5.1-and-5.2-on-32bit.patch new file mode 100644 index 00000000..3bb35ff8 --- /dev/null +++ b/debian/patches/0001-wslua-Fix-support-for-Lua-5.1-and-5.2-on-32bit.patch @@ -0,0 +1,699 @@ +From f8fd960cb8f5378c8ab6b20b4bc7f0b73498d057 Mon Sep 17 00:00:00 2001 +From: Balint Reczey <balint@balintreczey.hu> +Date: Sat, 20 Apr 2024 18:57:17 +0200 +Subject: [PATCH] wslua: Fix support for Lua 5.1 and 5.2 on 32bit +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add macros to use lua_pushnumber for Lua 5.1/5.2 and lua_pushinteger for Lua 5.3/5.4 +based on change proposal by Stig Bjørlykke. + +Ping #10881 + +Follow up for commit 8cac5932f79b87deda26480769a266ff344036e6. + +Co-authored-by: Stig Bjørlykke <stig@bjorlykke.org> +--- + epan/wslua/init_wslua.c | 10 +++--- + epan/wslua/lrexlib/pcre2/lpcre2.c | 2 +- + epan/wslua/make-taps.py | 24 +++++++------- + epan/wslua/wslua.h | 7 +++++ + epan/wslua/wslua_byte_array.c | 12 +++---- + epan/wslua/wslua_dissector.c | 4 +-- + epan/wslua/wslua_field.c | 12 +++---- + epan/wslua/wslua_file.c | 6 ++-- + epan/wslua/wslua_file_handler.c | 8 ++--- + epan/wslua/wslua_frame_info.c | 8 ++--- + epan/wslua/wslua_pinfo.c | 2 +- + epan/wslua/wslua_pref.c | 4 +-- + epan/wslua/wslua_struct.c | 10 +++--- + epan/wslua/wslua_tree.c | 6 ++-- + epan/wslua/wslua_tvb.c | 52 +++++++++++++++---------------- + epan/wslua/wslua_wtap.c | 10 +++--- + 16 files changed, 92 insertions(+), 85 deletions(-) + +--- a/epan/wslua/init_wslua.c ++++ b/epan/wslua/init_wslua.c +@@ -969,7 +969,7 @@ + lua_getglobal(L, table); + /* Set symbol in table. */ + lua_pushstring(L, name); +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + lua_settable(L, -3); + /* Pop table from stack. */ + lua_pop(L, 1); +@@ -979,7 +979,7 @@ + add_global_symbol(const char *name, int value) + { + /* Set symbol in global environment. */ +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + lua_setglobal(L, name); + } + +@@ -988,7 +988,7 @@ + { + lua_getglobal(L, WSLUA_EXPERT_TABLE); + lua_getfield(L, -1, WSLUA_EXPERT_SEVERITY_TABLE); +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + lua_setfield(L, -2, name); + lua_pop(L, 2); + } +@@ -998,7 +998,7 @@ + { + lua_getglobal(L, WSLUA_EXPERT_TABLE); + lua_getfield(L, -1, WSLUA_EXPERT_GROUP_TABLE); +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + lua_setfield(L, -2, name); + lua_pop(L, 2); + } +@@ -1007,7 +1007,7 @@ + add_menu_group_symbol(const char *name, int value) + { + /* Set symbol in global environment. */ +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + char *str = g_strdup(name); + char *s = strstr(str, "_GROUP_"); + if (s == NULL) +--- a/epan/wslua/lrexlib/pcre2/lpcre2.c ++++ b/epan/wslua/lrexlib/pcre2/lpcre2.c +@@ -432,7 +432,7 @@ + #define SET_INFO_FIELD(L,ud,what,name,valtype) { \ + valtype val; \ + if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \ +- lua_pushinteger (L, val); \ ++ WSLUA_PUSHINTEGER (L, val); \ + lua_setfield (L, -2, name); \ + } \ + } +--- a/epan/wslua/make-taps.py ++++ b/epan/wslua/make-taps.py +@@ -34,18 +34,18 @@ + types = { + 'gchar[]': 'lua_pushstring(L,(const char*)v->STR);', + 'gchar*': 'lua_pushstring(L,(const char*)v->STR);', +- 'guint': 'lua_pushinteger(L,(lua_Integer)v->STR);', +- 'guint8': 'lua_pushinteger(L,(lua_Integer)v->STR);', +- 'guint16': 'lua_pushinteger(L,(lua_Integer)v->STR);', +- 'guint32': 'lua_pushinteger(L,(lua_Integer)v->STR);', +- 'gint': 'lua_pushinteger(L,(lua_Integer)v->STR);', +- 'gint8': 'lua_pushinteger(L,(lua_Integer)v->STR);', +- 'gint16': 'lua_pushinteger(L,(lua_Integer)v->STR);', +- 'gint32': 'lua_pushinteger(L,(lua_Integer)v->STR);', ++ 'guint': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', ++ 'guint8': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', ++ 'guint16': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', ++ 'guint32': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', ++ 'gint': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', ++ 'gint8': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', ++ 'gint16': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', ++ 'gint32': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', + 'gboolean': 'lua_pushboolean(L,(int)v->STR);', + 'address': '{ Address a = (Address)g_malloc(sizeof(address)); copy_address(a, &(v->STR)); pushAddress(L,a); }', + 'address*': '{ Address a = (Address)g_malloc(sizeof(address)); copy_address(a, v->STR); pushAddress(L,a); }', +- 'int': 'lua_pushinteger(L,(lua_Integer)v->STR);', ++ 'int': 'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR);', + 'nstime_t': 'lua_pushnumber(L,(lua_Number)nstime_to_sec(&(v->STR)));', + 'nstime_t*': 'lua_pushnumber(L,(lua_Number)nstime_to_sec(v->STR));', + } +@@ -79,7 +79,7 @@ + for enum in enum_types: + m = re.search(fr'typedef\s+enum[^{{]*{{([^}}]*)}}[\s\n]*{enum}[\s\n]*;', buf, flags=re.DOTALL) + if m: +- types[enum] = f'lua_pushinteger(L,(lua_Integer)v->STR); /* {enum} */' ++ types[enum] = f'WSLUA_PUSHINTEGER_WITH_CAST(L,v->STR); /* {enum} */' + econsts = m.group(1).splitlines() + econsts = [re.sub(r'\s+', '', item) for item in econsts] + econsts = [re.sub(',', '', item) for item in econsts] +@@ -183,9 +183,9 @@ + c_body += f'\n\t/*\n\t * {enum}\n\t */\n\tlua_newtable(L);\n' + for econst in enums[enum]: + c_body += f'''\ +- lua_pushinteger(L,(lua_Integer){econst}); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,{econst}); + lua_setglobal(L,"{econst}"); +- lua_pushinteger(L,(lua_Integer){econst}); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,{econst}); + lua_pushstring(L,"{econst}"); + lua_settable(L,-3); + ''' +--- a/epan/wslua/wslua.h ++++ b/epan/wslua/wslua.h +@@ -81,6 +81,13 @@ + #define wslua_optguint32(L,i,d) (guint32) ( luaL_optnumber(L,i,d) ) + #define wslua_optguint64(L,i,d) (guint64) ( luaL_optnumber(L,i,d) ) + ++#if LUA_VERSION_NUM < 503 ++#define WSLUA_PUSHINTEGER(L, i) lua_pushnumber(L, i) ++#define WSLUA_PUSHINTEGER_WITH_CAST(L, i) lua_pushnumber(L, (lua_Number)i) ++#else ++#define WSLUA_PUSHINTEGER(L, i) lua_pushinteger(L, i) ++#define WSLUA_PUSHINTEGER_WITH_CAST(L, i) lua_pushinteger(L, (lua_Integer)i) ++#endif + + struct _wslua_tvb { + tvbuff_t* ws_tvb; +--- a/epan/wslua/wslua_byte_array.c ++++ b/epan/wslua/wslua_byte_array.c +@@ -214,7 +214,7 @@ + luaL_argerror(L,2,"index out of range"); + return 0; + } +- lua_pushinteger(L,ba->data[idx]); ++ WSLUA_PUSHINTEGER(L,ba->data[idx]); + + WSLUA_RETURN(1); /* The value [0-255] of the byte. */ + } +@@ -255,7 +255,7 @@ + value |= (guint8)ba->data[offset + i]; + } + +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + + WSLUA_RETURN(1); /* The value of the little endian encoded signed integer beginning at given offset with given length. */ + } +@@ -337,7 +337,7 @@ + value |= (guint8)ba->data[offset + i]; + } + +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + + WSLUA_RETURN(1); /* The value of the little endian encoded unsigned integer beginning at given offset with given length. */ + } +@@ -419,7 +419,7 @@ + value |= (guint8)ba->data[offset + i]; + } + +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + + WSLUA_RETURN(1); /* The value of the big endian encoded 32 bit signed integer beginning at given offset with given length. */ + } +@@ -501,7 +501,7 @@ + value |= (guint8)ba->data[offset + i]; + } + +- lua_pushinteger(L, value); ++ WSLUA_PUSHINTEGER(L, value); + + WSLUA_RETURN(1); /* The value of the big endian encoded 32 bit unsigned integer beginning at given offset with given length. */ + } +@@ -551,7 +551,7 @@ + /* Obtain the length of a <<lua_class_ByteArray,`ByteArray`>>. */ + ByteArray ba = checkByteArray(L,1); + +- lua_pushinteger(L,(lua_Integer)ba->len); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,ba->len); + + WSLUA_RETURN(1); /* The length of the <<lua_class_ByteArray,`ByteArray`>>. */ + } +--- a/epan/wslua/wslua_dissector.c ++++ b/epan/wslua/wslua_dissector.c +@@ -107,7 +107,7 @@ + are normal conditions and possibly don't need the Lua traceback. */ + if (error) { WSLUA_ERROR(Dissector_call,error); } + +- lua_pushinteger(L,(lua_Integer)len); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,len); + WSLUA_RETURN(1); /* Number of bytes dissected. Note that some dissectors always return number of bytes in incoming buffer, so be aware. */ + } + +@@ -618,7 +618,7 @@ + + if (error) { WSLUA_ERROR(DissectorTable_try,error); } + +- lua_pushinteger(L,(lua_Integer)len); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,len); + WSLUA_RETURN(1); /* Number of bytes dissected. Note that some dissectors always return number of bytes in incoming buffer, so be aware. */ + } + +--- a/epan/wslua/wslua_field.c ++++ b/epan/wslua/wslua_field.c +@@ -50,7 +50,7 @@ + */ + FieldInfo fi = checkFieldInfo(L,1); + +- lua_pushinteger(L,fi->ws_fi->length); ++ WSLUA_PUSHINTEGER(L,fi->ws_fi->length); + return 1; + } + +@@ -61,7 +61,7 @@ + */ + FieldInfo fi = checkFieldInfo(L,1); + +- lua_pushinteger(L,fi->ws_fi->start); ++ WSLUA_PUSHINTEGER(L,fi->ws_fi->start); + return 1; + } + +@@ -91,13 +91,13 @@ + case FT_UINT24: + case FT_UINT32: + case FT_FRAMENUM: +- lua_pushinteger(L,(lua_Integer)(fvalue_get_uinteger(fi->ws_fi->value))); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,(fvalue_get_uinteger(fi->ws_fi->value))); + return 1; + case FT_INT8: + case FT_INT16: + case FT_INT24: + case FT_INT32: +- lua_pushinteger(L,(lua_Integer)(fvalue_get_sinteger(fi->ws_fi->value))); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,(fvalue_get_sinteger(fi->ws_fi->value))); + return 1; + case FT_FLOAT: + case FT_DOUBLE: +@@ -268,7 +268,7 @@ + FieldInfo fi = checkFieldInfo(L,1); + + if (fi->ws_fi->hfinfo) { +- lua_pushinteger(L, fi->ws_fi->hfinfo->type); ++ WSLUA_PUSHINTEGER(L, fi->ws_fi->hfinfo->type); + } + else { + lua_pushnil(L); +@@ -710,7 +710,7 @@ + Field f = checkField(L,1); + header_field_info* hfinfo = NULL; + +- GET_HFINFO_MEMBER(lua_pushinteger, type); ++ GET_HFINFO_MEMBER(WSLUA_PUSHINTEGER, type); + + return 1; + } +--- a/epan/wslua/wslua_file.c ++++ b/epan/wslua/wslua_file.c +@@ -152,7 +152,7 @@ + buff[buff_end] = '\0'; + + if (buff_end > 0 && num_digits > 0 && sscanf(buff, "%lf", &d) == 1) { +- lua_pushinteger(L, d); ++ WSLUA_PUSHINTEGER(L, d); + return 1; + } + else { +@@ -355,7 +355,7 @@ + return 2; + } + +- lua_pushinteger(L, (lua_Integer)(file_tell(f->file))); ++ lua_pushnumber(L, (lua_Number)(file_tell(f->file))); + } + else { + offset = wtap_dump_file_seek(f->wdh, offset, mode[op], &err); +@@ -374,7 +374,7 @@ + return 2; + } + +- lua_pushinteger(L, (lua_Integer)(offset)); ++ lua_pushnumber(L, (lua_Number)(offset)); + } + + WSLUA_RETURN(1); /* The current file cursor position as a number. */ +--- a/epan/wslua/wslua_file_handler.c ++++ b/epan/wslua/wslua_file_handler.c +@@ -326,7 +326,7 @@ + fp = push_File(L, wth->random_fh); + fc = push_CaptureInfo(L, wth, FALSE); + fi = push_FrameInfo(L, rec, buf); +- lua_pushinteger(L, (lua_Integer)seek_off); ++ lua_pushnumber(L, (lua_Number)seek_off); + + switch ( lua_pcall(L,4,1,1) ) { + case 0: +@@ -474,7 +474,7 @@ + + INIT_FILEHANDLER_ROUTINE(can_write_encap,WTAP_ERR_UNWRITABLE_ENCAP,NULL,NULL); + +- lua_pushinteger(L, encap); ++ WSLUA_PUSHINTEGER(L, encap); + + switch ( lua_pcall(L,1,1,1) ) { + case 0: +@@ -842,7 +842,7 @@ + fh->registered = TRUE; + registered_file_handlers = g_slist_prepend(registered_file_handlers, fh); + +- lua_pushinteger(L, fh->file_type); ++ WSLUA_PUSHINTEGER(L, fh->file_type); + + WSLUA_RETURN(1); /* the new type number for this file reader/write */ + } +@@ -1207,7 +1207,7 @@ + break;\ + } \ + } \ +- lua_pushinteger(L, (lua_Integer)supported_comment_types); \ ++ lua_pushnumber(L, (lua_Number)supported_comment_types); \ + }); + WSLUA_ATTRIBUTE_SET(FileHandler,supported_comment_types, { \ + guint supported_comment_types; \ +--- a/epan/wslua/wslua_frame_info.c ++++ b/epan/wslua/wslua_frame_info.c +@@ -89,7 +89,7 @@ + g_free(err_info); /* is this right? */ + } + else lua_pushnil(L); +- lua_pushinteger(L, err); ++ WSLUA_PUSHINTEGER(L, err); + return 3; + } + +@@ -120,7 +120,7 @@ + lua_createtable(L, n_comments, 0); + for (i = 0; i < n_comments; i++) { + comment = NULL; +- lua_pushinteger(L, i+1); ++ WSLUA_PUSHINTEGER(L, i+1); + if (WTAP_OPTTYPE_SUCCESS == + wtap_block_get_nth_string_option_value(block, OPT_COMMENT, i, &comment)) { + lua_pushstring(L, comment); +@@ -371,7 +371,7 @@ + if (!wtap_dump_file_write(fh->wdh, fi->pd, (size_t)(len), &err)) { + lua_pushboolean(L, FALSE); + lua_pushfstring(L, "FrameInfoConst write_data() error: %s", g_strerror(err)); +- lua_pushinteger(L, err); ++ WSLUA_PUSHINTEGER(L, err); + return 3; + } + +@@ -403,7 +403,7 @@ + lua_createtable(L, n_comments, 0); + for (i = 0; i < n_comments; i++) { + comment = NULL; +- lua_pushinteger(L, i+1); ++ WSLUA_PUSHINTEGER(L, i+1); + if (WTAP_OPTTYPE_SUCCESS == + wtap_block_get_nth_string_option_value(block, OPT_COMMENT, i, &comment)) { + lua_pushstring(L, comment); +--- a/epan/wslua/wslua_pinfo.c ++++ b/epan/wslua/wslua_pinfo.c +@@ -308,7 +308,7 @@ + if (pinfo->ws_pinfo->match_string) { + lua_pushstring(L,pinfo->ws_pinfo->match_string); + } else { +- lua_pushinteger(L,(lua_Integer)(pinfo->ws_pinfo->match_uint)); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,(pinfo->ws_pinfo->match_uint)); + } + + return 1; +--- a/epan/wslua/wslua_pref.c ++++ b/epan/wslua/wslua_pref.c +@@ -515,9 +515,9 @@ + if ( g_str_equal(prefs_p->name,name) ) { + switch (prefs_p->type) { + case PREF_BOOL: lua_pushboolean(L, prefs_p->value.b); break; +- case PREF_UINT: lua_pushinteger(L,(lua_Integer)prefs_p->value.u); break; ++ case PREF_UINT: WSLUA_PUSHINTEGER_WITH_CAST(L,prefs_p->value.u); break; + case PREF_STRING: lua_pushstring(L,prefs_p->value.s); break; +- case PREF_ENUM: lua_pushinteger(L,(lua_Integer)prefs_p->value.e); break; ++ case PREF_ENUM: WSLUA_PUSHINTEGER_WITH_CAST(L,prefs_p->value.e); break; + case PREF_RANGE: + { + char *push_str = range_convert_range(NULL, prefs_p->value.r); +--- a/epan/wslua/wslua_struct.c ++++ b/epan/wslua/wslua_struct.c +@@ -410,7 +410,7 @@ + * given endianness and size. If the integer type is signed, this makes + * the Lua number be +/- correctly as well. + */ +-static lua_Integer getinteger (const gchar *buff, int endian, ++static lua_Number getinteger (const gchar *buff, int endian, + int issigned, int size) { + Uinttype l = 0; + int i; +@@ -427,12 +427,12 @@ + } + } + if (!issigned) +- return (lua_Integer)l; ++ return (lua_Number)l; + else { /* signed format */ + Uinttype mask = (Uinttype)(~((Uinttype)0)) << (size*8 - 1); + if (l & mask) /* negative value? */ + l |= mask; /* signal extension */ +- return (lua_Integer)(Inttype)l; ++ return (lua_Number)(Inttype)l; + } + } + +@@ -470,8 +470,8 @@ + case 'b': case 'B': case 'h': case 'H': + case 'l': case 'L': case 'T': case 'i': case 'I': { /* integer types */ + int issigned = g_ascii_islower(opt); +- lua_Integer res = getinteger(data+pos, h.endian, issigned, (int)size); +- lua_pushinteger(L, res); ++ lua_Number res = getinteger(data+pos, h.endian, issigned, (int)size); ++ WSLUA_PUSHINTEGER(L, res); + break; + } + case 'e': { +--- a/epan/wslua/wslua_tree.c ++++ b/epan/wslua/wslua_tree.c +@@ -123,7 +123,7 @@ + item = proto_tree_add_item_ret_int(tree_item->tree, hfid, tvbr->tvb->ws_tvb, + tvbr->offset, tvbr->len, encoding, + &ret); +- lua_pushinteger(L, (lua_Integer)ret); ++ lua_pushnumber(L, (lua_Number)ret); + lua_pushinteger(L, tvbr->offset + tvbr->len); + } + break; +@@ -152,7 +152,7 @@ + item = proto_tree_add_item_ret_uint(tree_item-> tree, hfid, tvbr->tvb->ws_tvb, + tvbr->offset, tvbr->len, encoding, + &ret); +- lua_pushinteger(L, (lua_Integer)ret); ++ lua_pushnumber(L, (lua_Number)ret); + lua_pushinteger(L, tvbr->offset + tvbr->len); + } + break; +@@ -502,7 +502,7 @@ + switch(type) { + case FT_PROTOCOL: + item = proto_tree_add_item(tree_item->tree,hfid,tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len,ENC_NA); +- lua_pushinteger(L,0); ++ WSLUA_PUSHINTEGER(L,0); + lua_insert(L,1); + break; + case FT_BOOLEAN: +--- a/epan/wslua/wslua_tvb.c ++++ b/epan/wslua/wslua_tvb.c +@@ -135,7 +135,7 @@ + /* Obtain the reported length (length on the network) of a <<lua_class_Tvb,`Tvb`>>. */ + Tvb tvb = checkTvb(L,1); + +- lua_pushinteger(L,tvb_reported_length(tvb->ws_tvb)); ++ WSLUA_PUSHINTEGER(L,tvb_reported_length(tvb->ws_tvb)); + WSLUA_RETURN(1); /* The reported length of the <<lua_class_Tvb,`Tvb`>>. */ + } + +@@ -143,7 +143,7 @@ + /* Obtain the captured length (amount saved in the capture process) of a <<lua_class_Tvb,`Tvb`>>. */ + Tvb tvb = checkTvb(L,1); + +- lua_pushinteger(L,tvb_captured_length(tvb->ws_tvb)); ++ WSLUA_PUSHINTEGER(L,tvb_captured_length(tvb->ws_tvb)); + WSLUA_RETURN(1); /* The captured length of the <<lua_class_Tvb,`Tvb`>>. */ + } + +@@ -152,7 +152,7 @@ + Same as captured_len; kept only for backwards compatibility */ + Tvb tvb = checkTvb(L,1); + +- lua_pushinteger(L,tvb_captured_length(tvb->ws_tvb)); ++ WSLUA_PUSHINTEGER(L,tvb_captured_length(tvb->ws_tvb)); + WSLUA_RETURN(1); /* The captured length of the <<lua_class_Tvb,`Tvb`>>. */ + } + +@@ -163,7 +163,7 @@ + Tvb tvb = checkTvb(L,1); + int offset = (int) luaL_optinteger(L, Tvb_reported_length_remaining_OFFSET, 0); + +- lua_pushinteger(L,tvb_reported_length_remaining(tvb->ws_tvb, offset)); ++ WSLUA_PUSHINTEGER(L,tvb_reported_length_remaining(tvb->ws_tvb, offset)); + WSLUA_RETURN(1); /* The captured length of the <<lua_class_Tvb,`Tvb`>>. */ + } + +@@ -210,7 +210,7 @@ + /* Returns the raw offset (from the beginning of the source <<lua_class_Tvb,`Tvb`>>) of a sub <<lua_class_Tvb,`Tvb`>>. */ + Tvb tvb = checkTvb(L,1); + +- lua_pushinteger(L,tvb_raw_offset(tvb->ws_tvb)); ++ WSLUA_PUSHINTEGER(L,tvb_raw_offset(tvb->ws_tvb)); + WSLUA_RETURN(1); /* The raw offset of the <<lua_class_Tvb,`Tvb`>>. */ + } + +@@ -441,16 +441,16 @@ + + switch (tvbr->len) { + case 1: +- lua_pushinteger(L,tvb_get_guint8(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_guint8(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 2: +- lua_pushinteger(L,tvb_get_ntohs(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_ntohs(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 3: +- lua_pushinteger(L,tvb_get_ntoh24(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_ntoh24(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 4: +- lua_pushinteger(L,tvb_get_ntohl(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_ntohl(tvbr->tvb->ws_tvb,tvbr->offset)); + WSLUA_RETURN(1); /* The unsigned integer value. */ + default: + luaL_error(L,"TvbRange:uint() does not handle %d byte integers",tvbr->len); +@@ -474,16 +474,16 @@ + switch (tvbr->len) { + case 1: + /* XXX unsigned anyway */ +- lua_pushinteger(L,(lua_Integer)(guint)tvb_get_guint8(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,(guint)tvb_get_guint8(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 2: +- lua_pushinteger(L,tvb_get_letohs(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_letohs(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 3: +- lua_pushinteger(L,tvb_get_letoh24(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_letoh24(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 4: +- lua_pushinteger(L,tvb_get_letohl(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_letohl(tvbr->tvb->ws_tvb,tvbr->offset)); + WSLUA_RETURN(1); /* The unsigned integer value */ + default: + luaL_error(L,"TvbRange:le_uint() does not handle %d byte integers",tvbr->len); +@@ -594,16 +594,16 @@ + + switch (tvbr->len) { + case 1: +- lua_pushinteger(L,tvb_get_gint8(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_gint8(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 2: +- lua_pushinteger(L,tvb_get_ntohis(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_ntohis(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 3: +- lua_pushinteger(L,tvb_get_ntohi24(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_ntohi24(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 4: +- lua_pushinteger(L,tvb_get_ntohil(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_ntohil(tvbr->tvb->ws_tvb,tvbr->offset)); + WSLUA_RETURN(1); /* The signed integer value. */ + /* + * XXX: +@@ -633,16 +633,16 @@ + + switch (tvbr->len) { + case 1: +- lua_pushinteger(L,tvb_get_gint8(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_gint8(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 2: +- lua_pushinteger(L,tvb_get_letohis(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_letohis(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 3: +- lua_pushinteger(L,tvb_get_letohi24(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_letohi24(tvbr->tvb->ws_tvb,tvbr->offset)); + return 1; + case 4: +- lua_pushinteger(L,tvb_get_letohil(tvbr->tvb->ws_tvb,tvbr->offset)); ++ WSLUA_PUSHINTEGER(L,tvb_get_letohil(tvbr->tvb->ws_tvb,tvbr->offset)); + WSLUA_RETURN(1); /* The signed integer value. */ + default: + luaL_error(L,"TvbRange:le_int() does not handle %d byte integers",tvbr->len); +@@ -1237,13 +1237,13 @@ + } + + if (len <= 8) { +- lua_pushinteger(L,(lua_Integer)(guint)tvb_get_bits8(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len)); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,(guint)tvb_get_bits8(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len)); + return 1; + } else if (len <= 16) { +- lua_pushinteger(L,tvb_get_bits16(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len, FALSE)); ++ WSLUA_PUSHINTEGER(L,tvb_get_bits16(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len, FALSE)); + return 1; + } else if (len <= 32) { +- lua_pushinteger(L,tvb_get_bits32(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len, FALSE)); ++ WSLUA_PUSHINTEGER(L,tvb_get_bits32(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len, FALSE)); + return 1; + } else if (len <= 64) { + pushUInt64(L,tvb_get_bits64(tvbr->tvb->ws_tvb,tvbr->offset*8 + pos, len, FALSE)); +@@ -1334,7 +1334,7 @@ + luaL_error(L,"expired tvb"); + return 0; + } +- lua_pushinteger(L,(lua_Integer)tvbr->len); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,tvbr->len); + return 1; + } + +@@ -1347,7 +1347,7 @@ + luaL_error(L,"expired tvb"); + return 0; + } +- lua_pushinteger(L,(lua_Integer)tvbr->offset); ++ WSLUA_PUSHINTEGER_WITH_CAST(L,tvbr->offset); + return 1; + } + +--- a/epan/wslua/wslua_wtap.c ++++ b/epan/wslua/wslua_wtap.c +@@ -85,7 +85,7 @@ + if (filetype == -1) + lua_pushnil(LS); + else +- lua_pushinteger(LS,filetype); ++ WSLUA_PUSHINTEGER(LS,filetype); + WSLUA_RETURN(1); /* The filetype value for the file type with that name, or nil if there is no such file type. */ + } + +@@ -96,7 +96,7 @@ + @since 3.2.12, 3.4.4 + */ + lua_Number filetype = wtap_pcap_file_type_subtype(); +- lua_pushinteger(LS,filetype); ++ WSLUA_PUSHINTEGER(LS,filetype); + WSLUA_RETURN(1); /* The filetype value for pcap files. */ + } + +@@ -107,7 +107,7 @@ + @since 3.2.12, 3.4.4 + */ + lua_Number filetype = wtap_pcap_nsec_file_type_subtype(); +- lua_pushinteger(LS,filetype); ++ WSLUA_PUSHINTEGER(LS,filetype); + WSLUA_RETURN(1); /* The filetype value for nanosecond-resolution pcap files. */ + } + +@@ -118,7 +118,7 @@ + @since 3.2.12, 3.4.4 + */ + lua_Number filetype = wtap_pcapng_file_type_subtype(); +- lua_pushinteger(LS,filetype); ++ WSLUA_PUSHINTEGER(LS,filetype); + WSLUA_RETURN(1); /* The filetype value for pcapng files. */ + } + +@@ -148,7 +148,7 @@ + * it. + */ + lua_pushstring(LS, entry->name); +- lua_pushinteger(LS, entry->ft); ++ WSLUA_PUSHINTEGER(LS, entry->ft); + /* + * The -3 is the index, relative to the top of the stack, of + * the table; the two elements on top of it are the ft and diff --git a/debian/patches/series b/debian/patches/series index 162876e7..1a5dfc85 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +0001-wslua-Fix-support-for-Lua-5.1-and-5.2-on-32bit.patch 09_idl2wrs.patch 0004-Use-packaged-JS-and-CSS-resources-instead-of-pulling.patch diff --git a/debian/po/sv.po b/debian/po/sv.po index bf848a12..c4a6c65d 100644 --- a/debian/po/sv.po +++ b/debian/po/sv.po @@ -1,15 +1,16 @@ -# translation of wireshark_sv.po to Swedish -# Copyright (C) 2009 +# Translation of wireshark debconf template to Swedish +# Copyright (C) 2024 Martin Bagge <brother@persilja.net> # This file is distributed under the same license as the wireshark package. # # Martin Ågren <martin.agren@gmail.com>, 2009, 2010. +# Martin Bagge <brother@persilja.net>, 2024 msgid "" msgstr "" "Project-Id-Version: wireshark_sv\n" "Report-Msgid-Bugs-To: wireshark@packages.debian.org\n" -"POT-Creation-Date: 2017-08-07 00:07-0400\n" -"PO-Revision-Date: 2010-06-20 17:19+0200\n" -"Last-Translator: Martin Ågren <martin.agren@gmail.com>\n" +"POT-Creation-Date: 2019-09-13 00:04+0200\n" +"PO-Revision-Date: 2024-01-12 13:57+0100\n" +"Last-Translator: Martin Bagge <brother@persilja.net>\n" "Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n" "Language: sv\n" "MIME-Version: 1.0\n" @@ -43,9 +44,9 @@ msgstr "" #: ../templates:2001 msgid "" "For more detailed information please see /usr/share/doc/wireshark-common/" -"README.Debian." +"README.Debian.gz once the package is installed." msgstr "" -"Se /usr/share/doc/wireshark-common/README.Debian för mer detaljerad " +"Se /usr/share/doc/wireshark-common/README.Debian.gz för mer detaljerad " "information." #. Type: boolean @@ -62,7 +63,7 @@ msgstr "" #. Description #: ../templates:3001 msgid "Creating the wireshark system group failed" -msgstr "" +msgstr "Kunde inte skapa systemgruppen wireshark" #. Type: error #. Description @@ -71,6 +72,9 @@ msgid "" "The wireshark group does not exist, and creating it failed, so Wireshark " "cannot be configured to capture traffic as an unprivileged user." msgstr "" +"Gruppen wireshark finns inte och det gick inte att skapa den. Detta leder " +"till att Wireshark inte kan ställas in för att fånga trafik för vanliga " +"användare." #. Type: error #. Description @@ -79,12 +83,14 @@ msgid "" "Please create the wireshark system group and try configuring wireshark-" "common again." msgstr "" +"Skapa systemgruppen wireshark och försök göra inställningar för wireshark-" +"common igen." #. Type: error #. Description #: ../templates:4001 msgid "The wireshark group is a system group" -msgstr "" +msgstr "Gruppen wireshark är en systemgrupp" #. Type: error #. Description @@ -93,6 +99,8 @@ msgid "" "The wireshark group exists as a user group, but the preferred configuration " "is for it to be created as a system group." msgstr "" +"Gruppen wireshark finns redan men är en användargrupp. Att ha gruppen som en " +"systemgrupp är att föredra." #. Type: error #. Description @@ -101,12 +109,14 @@ msgid "" "As a result, purging wireshark-common will not remove the wireshark group, " "but everything else should work properly." msgstr "" +"Om wireshark-common raderas helt och hållet så kommer gruppen wireshark inte " +"tas bort, allt annat fungerar dock som vanligt." #. Type: error #. Description #: ../templates:5001 msgid "Setting capabilities for dumpcap failed" -msgstr "" +msgstr "Kunde inte aktivera rätt inställningar för dumpcap" #. Type: error #. Description @@ -115,12 +125,14 @@ msgid "" "The attempt to use Linux capabilities to grant packet-capturing privileges " "to the dumpcap binary failed. Instead, it has had the set-user-id bit set." msgstr "" +"Försökte aktivera Linux capabilities för att låta dumpcap-binären läsa " +"datapaket misslyckades. Istället har biten set-user-id aktiverats." #. Type: error #. Description #: ../templates:6001 msgid "Removal of the wireshark group failed" -msgstr "" +msgstr "Kunde inte radera wireshark-gruppen" #. Type: error #. Description @@ -130,6 +142,9 @@ msgid "" "capture packets the postinst script of wireshark-common creates the " "wireshark group as a system group." msgstr "" +"När paketet wireshark-common ställs in för att låta vanliga användare fånga " +"paket så kommer postinst-skriptet att skapa gruppen wireshark som en " +"systemgrupp." #. Type: error #. Description @@ -138,9 +153,11 @@ msgid "" "However, on this system the wireshark group is a user group instead of being " "a system group, so purging wireshark-common did not remove it." msgstr "" +"Men på detta system är wireshark-gruppen en användargrupp istället därför " +"har den vanliga upprensningen efter wireshark-common inte tagit bort gruppen." #. Type: error #. Description #: ../templates:6001 msgid "If the group is no longer needed, please remove it manually." -msgstr "" +msgstr "Om gruppen inte längre behövs måste den raderas manuellt." diff --git a/debian/rules b/debian/rules index 42262752..df44d00c 100755 --- a/debian/rules +++ b/debian/rules @@ -9,11 +9,24 @@ include /usr/share/dpkg/pkg-info.mk -distrelease := $(shell lsb_release -cs) -ifeq ($(distrelease),n/a) - distrelease := sid +QT6_BUILD_DEPS = qt6-5compat-dev, qt6-base-dev, qt6-base-dev-tools, qt6-multimedia-dev, qt6-tools-dev +QT6_DEPS = libqt6svg6 +QT6_RECOMMENDS = libqt6multimedia6 +QT5_BUILD_DEPS = qtbase5-dev, qtbase5-dev-tools, qtbase5-dev-tools, qtmultimedia5-dev, qttools5-dev +QT5_DEPS = libqt5svg5 +QT5_RECOMMENDS = libqt5multimedia5-plugins + +CONTROL_IN_SED_CMD = +ifneq ($(filter focal jammy,$(DEB_DISTRIBUTION)),) +CONTROL_IN_SED_CMD := $(CONTROL_IN_SED_CMD)s/@QT_BUILD_DEPS@/$(QT5_BUILD_DEPS)/;s/@QT_DEPS@/$(QT5_DEPS)/;s/@QT_RECOMMENDS@/$(QT5_RECOMMENDS)/;s/, qt/,\\n qt/g; +else +CONTROL_IN_SED_CMD := $(CONTROL_IN_SED_CMD)s/@QT_BUILD_DEPS@/$(QT6_BUILD_DEPS)/;s/@QT_DEPS@/$(QT6_DEPS)/;s/@QT_RECOMMENDS@/$(QT6_RECOMMENDS)/;s/, qt/,\\n qt/g; +endif +ifneq ($(filter focal,$(DEB_DISTRIBUTION)),) +CONTROL_IN_SED_CMD := $(CONTROL_IN_SED_CMD)s/^ *libbcg729-dev/\# libbcg729-dev/;s/^ *libnghttp3-dev/\# libnghttp3-dev/; endif + # This has to be exported to make some magic below work. export DH_OPTIONS @@ -25,7 +38,8 @@ export docdir = /usr/share/doc/wireshark-doc override_dh_auto_configure: dh_auto_configure -- -DBUILD_xxx2deb=ON -DBUILD_corbaidl2wrs=ON -DBUILD_falcodump=ON \ - -DVCSVERSION_OVERRIDE="Git v$(DEB_VERSION_UPSTREAM) packaged as $(DEB_VERSION)" + -DVCSVERSION_OVERRIDE="Git v$(DEB_VERSION_UPSTREAM) packaged as $(DEB_VERSION)" \ + -DUSE_qt6=$$(if grep -q qt6-base-dev debian/control; then echo ON; else echo OFF; fi) override_dh_auto_build-arch: # regenerate ASN.1 dissectors @@ -50,6 +64,8 @@ override_dh_dwz: override_dh_auto_install-arch: dh_auto_install -a $(MAKE) DESTDIR=$(CURDIR)/debian/tmp -C $(CURDIR)/obj-* install-headers + # fixes #1068410, can be dropped in wireshark 4.4 + cp epan/dfilter/dfilter-loc.h debian/tmp/usr/include/wireshark/epan/dfilter/ rm -f debian/*.shlibs mkdir -p $(CURDIR)/debian/tmp/etc/wireshark/ @@ -81,6 +97,18 @@ endif endif override_dh_clean: - dh_clean + dh_clean -- debian/control + # regenerate debian/control +ifneq ($(filter noble unstable testing trixie UNRELEASED,$(DEB_DISTRIBUTION)),) + sed "$(CONTROL_IN_SED_CMD)" debian/control.t64.in > debian/control +else + sed "$(CONTROL_IN_SED_CMD)" debian/control.in > debian/control + # also revert t64-related changes in backports + for f in debian/lib*t64*; do \ + [ -f $$f ] || continue; \ + sed -i 's/\([0-9]\)t64/\1/g' $$f; \ + echo $$f | sed 's/t64//' | xargs mv $$f; \ + done +endif # ignore #653916 @echo 'blhc: ignore-line-regexp: .*CMakeCXXCompilerABI.cpp .*' diff --git a/debian/watch b/debian/watch index 3feaa1c4..5852b9db 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,3 @@ version=4 - https://gitlab.com/wireshark/wireshark/-/tags?sort=updated_desc .*?(\d\.[02468]\.[\d.]*)\.tar\.gz +opts="searchmode=plain" \ + https://gitlab.com/wireshark/@PACKAGE@/tags?sort=updated_desc -/archive/v?\d\.[02468]\.[\d.]+/@PACKAGE@-@ANY_VERSION@@ARCHIVE_EXT@ |