Fix Debian packaging and remove stale references to "init.lua"

This commit is contained in:
João Valverde 2023-08-24 18:21:45 +01:00
parent 4e3e55f9f1
commit cd4bf3b477
12 changed files with 19 additions and 28 deletions

1
.gitignore vendored
View File

@ -28,7 +28,6 @@
*scanner.c
*_dict.c
*_lex.h
init.lua
epan/dissectors/dcerpc/idl2wrs
epan/dissectors/dcerpc/*/packet-dcerpc-*.[hc]
epan/dissectors/mesa

View File

@ -17,8 +17,9 @@ and writers.
If Lua is enabled, Wireshark will first try to load a file named `init.lua`
from the global link:{wireshark-users-guide-url}ChPluginFolders.html[_plugins directory_].
and then from the users
link:{wireshark-users-guide-url}ChAppFilesConfigurationSection.html[_personal plugins directory_]. Then all files ending with _.lua_ are loaded from the global plugins
directory. Then Then all files ending with _.lua_ in the personal Lua plugin's
link:{wireshark-users-guide-url}ChAppFilesConfigurationSection.html[_personal plugins directory_].
Then all files ending with _.lua_ are loaded from the global plugins
directory. Then all files ending with _.lua_ in the personal Lua plugin's
directory.
Whether or not Lua scripts are enabled can be controlled via the

View File

@ -84,7 +84,7 @@ static int CaptureInfo__gc(lua_State* L) {
/* WSLUA_ATTRIBUTE CaptureInfo_encap RW The packet encapsulation type for the whole file.
See `wtap_encaps` in `init.lua` for available types. Set to `wtap_encaps.PER_PACKET` if packets can
See `wtap_encaps` for available types. Set to `wtap_encaps.PER_PACKET` if packets can
have different types, then later set `FrameInfo.encap` for each packet during `read()`/`seek_read()`.
*/
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(CaptureInfo,encap,wth->file_encap);
@ -92,7 +92,7 @@ WSLUA_ATTRIBUTE_NAMED_NUMBER_SETTER(CaptureInfo,encap,wth->file_encap,int);
/* WSLUA_ATTRIBUTE CaptureInfo_time_precision RW The precision of the packet timestamps in the file.
See `wtap_file_tsprec` in `init.lua` for available precisions.
See `wtap_file_tsprec` for available precisions.
*/
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(CaptureInfo,time_precision,wth->file_tsprec);
WSLUA_ATTRIBUTE_NAMED_NUMBER_SETTER(CaptureInfo,time_precision,wth->file_tsprec,int);
@ -353,7 +353,7 @@ WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(CaptureInfoConst,snapshot_length,wdh->snaple
/* WSLUA_ATTRIBUTE CaptureInfoConst_encap RO The packet encapsulation type for the whole file.
See `wtap_encaps` in init.lua for available types. It is set to `wtap_encaps.PER_PACKET` if packets can
See `wtap_encaps` for available types. It is set to `wtap_encaps.PER_PACKET` if packets can
have different types, in which case each Frame identifies its type, in `FrameInfo.packet_encap`. */
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(CaptureInfoConst,encap,wdh->file_encap);

View File

@ -23,7 +23,7 @@
make Wireshark save a capture file to disk. `Dumper` represents Wireshark's built-in
file format writers (see the `wtap_name_to_file_type_subtype` function).
(The `wtap_filetypes` table in `init.lua` is deprecated, and should
(The `wtap_filetypes` table is deprecated, and should
only be used in code that must run on Wireshark 3.4.3 and earlier 3.4
releases or in Wireshark 3.2.11 and earlier 3.2.x releases.)
@ -203,12 +203,12 @@ WSLUA_CONSTRUCTOR Dumper_new(lua_State* L) {
*/
#define WSLUA_ARG_Dumper_new_FILENAME 1 /* The name of the capture file to be created. */
#define WSLUA_OPTARG_Dumper_new_FILETYPE 2 /* The type of the file to be created - a number returned by `wtap_name_to_file_type_subtype()`.
(The `wtap_filetypes` table in `init.lua`
(The `wtap_filetypes` table
is deprecated, and should only be used
in code that must run on Wireshark 3.4.3 and earlier 3.4 releases
or in Wireshark 3.2.11 and earlier
3.2.x releases.) */
#define WSLUA_OPTARG_Dumper_new_ENCAP 3 /* The encapsulation to be used in the file to be created - a number entry from the `wtap_encaps` table in `init.lua`. */
#define WSLUA_OPTARG_Dumper_new_ENCAP 3 /* The encapsulation to be used in the file to be created - a number entry from the `wtap_encaps` table. */
Dumper d;
const char* fname = luaL_checkstring(L,WSLUA_ARG_Dumper_new_FILENAME);
int filetype = (int)luaL_optinteger(L,WSLUA_OPTARG_Dumper_new_FILETYPE,wtap_pcap_file_type_subtype());

View File

@ -260,7 +260,7 @@ static int FieldInfo_get_display(lua_State* L) {
}
/* WSLUA_ATTRIBUTE FieldInfo_type RO The internal field type, a number which
matches one of the `ftype` values in `init.lua`.
matches one of the `ftype` values.
@since 1.99.8
*/

View File

@ -470,7 +470,7 @@ static int File__gc(lua_State* L) {
/* WSLUA_ATTRIBUTE File_compressed RO Whether the File is compressed or not.
See `wtap_encaps` in init.lua for available types. Set to `wtap_encaps.PER_PACKET` if packets can
See `wtap_encaps` for available types. Set to `wtap_encaps.PER_PACKET` if packets can
have different types, then later set `FrameInfo.encap` for each packet during read()/seek_read(). */
static int File_get_compressed(lua_State* L) {
File f = checkFile(L,1);

View File

@ -259,13 +259,13 @@ static int FrameInfo_get_data (lua_State* L) {
/* WSLUA_ATTRIBUTE FrameInfo_rec_type RW The record type of the packet frame
See `wtap_rec_types` in `init.lua` for values. */
See `wtap_rec_types` for values. */
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfo,rec_type,rec->rec_type);
WSLUA_ATTRIBUTE_NAMED_NUMBER_SETTER(FrameInfo,rec_type,rec->rec_type,guint);
/* WSLUA_ATTRIBUTE FrameInfo_flags RW The presence flags of the packet frame.
See `wtap_presence_flags` in `init.lua` for bit values. */
See `wtap_presence_flags` for bit values. */
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfo,flags,rec->presence_flags);
WSLUA_ATTRIBUTE_NAMED_NUMBER_SETTER(FrameInfo,flags,rec->presence_flags,guint32);
@ -280,7 +280,7 @@ WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfo,original_length,rec->rec_header.pa
WSLUA_ATTRIBUTE_NAMED_NUMBER_SETTER(FrameInfo,original_length,rec->rec_header.packet_header.len,guint32);
/* WSLUA_ATTRIBUTE FrameInfo_encap RW The packet encapsulation type for the frame/packet,
if the file supports per-packet types. See `wtap_encaps` in `init.lua` for possible
if the file supports per-packet types. See `wtap_encaps` for possible
packet encapsulation types to use as the value for this field. */
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfo,encap,rec->rec_header.packet_header.pkt_encap);
WSLUA_ATTRIBUTE_NAMED_NUMBER_SETTER(FrameInfo,encap,rec->rec_header.packet_header.pkt_encap,int);
@ -443,10 +443,10 @@ static int FrameInfoConst_get_data (lua_State* L) {
return 1;
}
/* WSLUA_ATTRIBUTE FrameInfoConst_rec_type RO The record type of the packet frame - see `wtap_presence_flags` in `init.lua` for values. */
/* WSLUA_ATTRIBUTE FrameInfoConst_rec_type RO The record type of the packet frame - see `wtap_presence_flags` for values. */
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfoConst,rec_type,rec->rec_type);
/* WSLUA_ATTRIBUTE FrameInfoConst_flags RO The presence flags of the packet frame - see `wtap_presence_flags` in `init.lua` for bits. */
/* WSLUA_ATTRIBUTE FrameInfoConst_flags RO The presence flags of the packet frame - see `wtap_presence_flags` for bits. */
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfoConst,flags,rec->presence_flags);
/* WSLUA_ATTRIBUTE FrameInfoConst_captured_length RO The captured packet length, and thus the length of the buffer in the FrameInfoConst.data field. */
@ -457,7 +457,7 @@ WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfoConst,original_length,rec->rec_head
/* WSLUA_ATTRIBUTE FrameInfoConst_encap RO The packet encapsulation type, if the file supports per-packet types.
See `wtap_encaps` in `init.lua` for possible packet encapsulation types to use as the value for this field. */
See `wtap_encaps` for possible packet encapsulation types to use as the value for this field. */
WSLUA_ATTRIBUTE_NAMED_NUMBER_GETTER(FrameInfoConst,encap,rec->rec_header.packet_header.pkt_encap);
WSLUA_ATTRIBUTES FrameInfoConst_attributes[] = {

View File

@ -107,7 +107,7 @@ WSLUA_FUNCTION wslua_register_menu(lua_State* L) { /* Register a menu item in o
register_stat_group_t group = (register_stat_group_t)wslua_optguint(L,WSLUA_OPTARG_register_menu_GROUP,REGISTER_STAT_GROUP_GENERIC);
if ( group > REGISTER_TOOLS_GROUP_UNSORTED) {
WSLUA_OPTARG_ERROR(register_menu,GROUP,"Must be a defined MENU_* (see init.lua)");
WSLUA_OPTARG_ERROR(register_menu,GROUP,"Must be a defined MENU_*");
return 0;
}

View File

@ -324,7 +324,7 @@ WSLUA_METHOD TreeItem_add_packet_field(lua_State *L) {
the number `123`, both in the tree as well as for the second return value of
this function. To do so, you must set the `encoding` argument of this function
to the appropriate string `ENC_*` value, bitwise-or'd with the `ENC_STRING`
value (see `init.lua`). `ENC_STRING` is guaranteed to be a unique bit flag, and
value. `ENC_STRING` is guaranteed to be a unique bit flag, and
thus it can added instead of bitwise-or'ed as well. Only single-byte ASCII digit
string encoding types can be used for this, such as `ENC_ASCII` and `ENC_UTF_8`.

View File

@ -1,4 +1,3 @@
usr/share/wireshark/*
usr/share/doc/wireshark/*
etc/wireshark/init.lua
packaging/debian/maxmind_db_paths /usr/share/wireshark

View File

@ -62,11 +62,6 @@ else
endif
rm -f debian/*.shlibs
rm -rf $(CURDIR)/debian/tmp/usr/share/wireshark/COPYING
mkdir -p $(CURDIR)/debian/tmp/etc/wireshark/
mv $(CURDIR)/debian/tmp/usr/share/wireshark/init.lua \
$(CURDIR)/debian/tmp/etc/wireshark/
ln -s /etc/wireshark/init.lua \
$(CURDIR)/debian/tmp/usr/share/wireshark/init.lua
override_dh_install:
dh_install

View File

@ -1502,9 +1502,6 @@ Delete "$INSTDIR\cfilters"
Delete "$INSTDIR\colorfilters"
Delete "$INSTDIR\dfilters"
Delete "$INSTDIR\enterprises.tsv"
Delete "$INSTDIR\init.lua"
Delete "$INSTDIR\console.lua"
Delete "$INSTDIR\dtd_gen.lua"
Delete "$INSTDIR\smi_modules"
RMDir "$INSTDIR"
SectionEnd