1 Commits

Author SHA256 Message Date
1f5267f3d7 Sync changes to SLFO-1.2 branch 2025-08-20 09:55:39 +02:00
10 changed files with 136 additions and 272 deletions

View File

@@ -1,8 +1,8 @@
Index: nmap-7.94/Makefile.in
Index: Makefile.in
===================================================================
--- nmap-7.94.orig/Makefile.in
+++ nmap-7.94/Makefile.in
@@ -316,9 +316,6 @@ distclean-%: clean-%
--- Makefile.in.orig 2012-09-13 01:17:42.000000000 +0100
+++ Makefile.in 2012-12-02 11:47:22.000000000 +0000
@@ -253,9 +253,6 @@ my_distclean:
install-nmap: $(TARGET)
$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(nmapdatadir)
$(INSTALL) -c -m 755 nmap $(DESTDIR)$(bindir)/nmap

BIN
nmap-7.92.tar.bz2 LFS Normal file

Binary file not shown.

6
nmap-7.92.tar.bz2.asc Normal file
View File

@@ -0,0 +1,6 @@
-----BEGIN PGP SIGNATURE-----
iF0EABECAB0WIQRDbWarmnmEJf2g4/gBr58Da5NV0AUCYQ8ebgAKCRABr58Da5NV
0CueAJ4qDsTIi6sJ521jJutUvrAsqoaSaACfX8sECeGHSnV3VPsTzvj7QxoqiAA=
=TLt7
-----END PGP SIGNATURE-----

Binary file not shown.

View File

@@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEABECAAYFAmYm5TgACgkQAa+fA2uTVdCtxwCfXFskzqO6NDzibYA6YM7pG+1d
qkMAoKDtFwDLLrOgKeib9n71tYTzlUna
=zWnm
-----END PGP SIGNATURE-----

View File

@@ -0,0 +1,54 @@
Index: b/nse_nsock.cc
===================================================================
--- a/nse_nsock.cc
+++ b/nse_nsock.cc
@@ -33,7 +33,7 @@
enum {
NSOCK_POOL = lua_upvalueindex(1),
NSOCK_SOCKET = lua_upvalueindex(2), /* nsock socket metatable */
- PCAP_SOCKET = lua_upvalueindex(3), /* pcap socket metatable */
+ PCAP_SOCKET_NMAP = lua_upvalueindex(3), /* pcap socket metatable */
THREAD_SOCKETS = lua_upvalueindex(4), /* <Thread, Table of Sockets (keys)> */
CONNECT_WAITING = lua_upvalueindex(5), /* Threads waiting to lock */
KEY_PCAP = lua_upvalueindex(6) /* Keys to pcap sockets */
@@ -969,7 +969,7 @@ static int nsock_gc (lua_State *L)
}
-/****************** PCAP_SOCKET ***********************************************/
+/****************** PCAP_SOCKET_NMAP ***********************************************/
static void dnet_to_pcap_device_name (lua_State *L, const char *device)
{
@@ -1036,7 +1036,7 @@ static int l_pcap_open (lua_State *L)
nsock_iod_delete(*nsiod, NSOCK_PENDING_ERROR);
luaL_error(L, "can't open pcap reader on %s", device);
}
- lua_pushvalue(L, PCAP_SOCKET);
+ lua_pushvalue(L, PCAP_SOCKET_NMAP);
lua_setmetatable(L, -2);
lua_pushvalue(L, 7); /* the pcap socket key */
lua_pushvalue(L, -2); /* the pcap socket nsiod */
@@ -1144,7 +1144,7 @@ LUALIB_API int luaopen_nsock (lua_State
/* library upvalues */
nsock_pool nsp = new_pool(L); /* NSOCK_POOL */
lua_newtable(L); /* NSOCK_SOCKET */
- lua_newtable(L); /* PCAP_SOCKET */
+ lua_newtable(L); /* PCAP_SOCKET_NMAP */
nseU_weaktable(L, 0, MAX_PARALLELISM, "k"); /* THREAD_SOCKETS */
nseU_weaktable(L, 0, 1000, "k"); /* CONNECT_WAITING */
nseU_weaktable(L, 0, 0, "v"); /* KEY_PCAP */
@@ -1164,11 +1164,11 @@ LUALIB_API int luaopen_nsock (lua_State
lua_pop(L, 1); /* NSOCK_SOCKET */
/* Create the nsock pcap metatable */
- lua_pushvalue(L, top+3); /* PCAP_SOCKET */
+ lua_pushvalue(L, top+3); /* PCAP_SOCKET_NMAP */
for (i = top+1; i <= top+nupvals; i++) lua_pushvalue(L, i);
lua_pushcclosure(L, pcap_gc, nupvals);
lua_setfield(L, top+3, "__gc");
- lua_pop(L, 1); /* PCAP_SOCKET */
+ lua_pop(L, 1); /* PCAP_SOCKET_NMAP */
#if HAVE_OPENSSL
/* Set up the SSL certificate userdata code in nse_ssl_cert.cc. */

View File

@@ -1,146 +1,10 @@
-------------------------------------------------------------------
Tue Jan 21 11:25:05 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
Fri Feb 28 15:04:53 UTC 2025 - Antonio Teixeira <antonio.teixeira@suse.com>
- Fix dependencies (this is a python 3 app, based on
gobject-introspection):
+ Add gobject-introspection BuildRequires: let the build add the
relevant typelib() dependencies.
+ Drop python-gtk Requires: python2 bindings for GTK.
+ Replace python-gobject2 Requires with python3-gobject-Gdk:
bring this to python3 and gi-bindings.
- Drop gtk2-devel: not needed, as the bindings are GTK3 based.
- Replace pcre-devel with pcre2-devel: this used to be pulled in by
gtk2-devel, masking the fact that pcre-devel is not actually
used.
-------------------------------------------------------------------
Thu Aug 1 15:29:35 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- fix python-gobject2 dependency of zenmap - boo#1228750
-------------------------------------------------------------------
Wed Jul 17 16:26:10 UTC 2024 - Antonio Teixeira <antonio.teixeira@suse.com>
- Update to 7.95:
* Integrated over 4,000 of your IPv4 OS fingerprints. Added 336 signatures,
bringing the new total to 6,036. Additions include iOS 15 & 16, macOS
Ventura & Monterey, Linux 6.1, OpenBSD 7.1, and lwIP 2.2
* Integrated over 2,500 service/version detection fingerprints. The signature
count went up 1.4% to 12,089, including 9 new softmatches. We now detect
1,246 protocols, including new additions of grpc, mysqlx, essnet,
remotemouse, and tuya.
* Added four new scripts from the DINA community for querying industrial
control systems
* Improvements to OS detection fingerprint matching, including a syntax
change for nmap-os-db that allows ranges within the TCP Options
string. This leads to more concise and maintainable fingerprints. [Daniel
Miller]
* Improved the OS detection engine by using a new source port for each retry.
Scans from systems such as Windows that do not send RST for unsolicited
SYN|ACK responses were previously unable to get a response in subsequent
tries. [Daniel Miller]
* Several profile-guided optimizations of the port scan engine. [Daniel Miller]
* Upgraded included libraries: Lua 5.4.6, libpcre2 10.43, zlib 1.3.1, libssh2
1.11.0, liblinear 2.47
* Zenmap and Ndiff now use setuptools, not distutils
for packaging.
* Fixed Ncat UDP server mode to not quit after EOF on
stdin.
* ssh-auth-methods will now print the pre-authentication banner text
when available. Requires libssh2 1.11.0 or later. [Daniel Miller]
* Fix a crash in Zenmap when changing a host comment.
* Fix TLS 1.2 signature algorithms for EdDSA. [Daniel Roethlisberger]
* Fix an out-of-bounds read which led to out-of-memory errors when
duplicate addresses were used with --exclude
* Fixed a memory leak in Nsock: compiled pcap filters were not freed.
* Fixed a crash when using service name wildcards with -p, as in -p "http*"
* Fixed DNS TXT record parsing bug which caused asn-query to fail in
Nmap 7.80 and later. [David Fifield, Mike Pattrick]
* Fixed packet size testing in KNX scripts [f0rw4rd]
- Remove nmap-7.94-handle-unknown-service-name-in-p.patch
- Add zenmap-fix-locale-install.patch
* Fix locale files installation for zenmap
- Use %pyproject macros for building and installing zenmap
-------------------------------------------------------------------
Thu Mar 14 18:39:17 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- fix segfault with -p (boo#1221403)
add nmap-7.94-handle-unknown-service-name-in-p.patch
-------------------------------------------------------------------
Thu Jan 25 06:49:07 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Update License to 'SUSE-NonFree" until determined otherwise
to please checks in openSUSE:Factory:NonFree (boo#1211571)
-------------------------------------------------------------------
Sun May 28 14:20:08 UTC 2023 - ecsos <ecsos@opensuse.org>
- Fix build error and wrong requires. Lua version 5.4.4 is required.
But something in opensuse lua package is broken. Set it disable for
Leap too and not only for Tumbleweed.
-------------------------------------------------------------------
Mon May 22 08:15:30 UTC 2023 - Robert Frohl <rfrohl@suse.com>
- Update to 7.94:
* Zenmap and Ndiff now use Python 3
* Nmap now prints vendor names based on MAC address for MA-S (24-bit),
MA-M (28-bit), and MA-L (36-bit) registrations instead of the fixed
3-byte MAC prefix used previously for lookups.
* Lots of profile-guided memory and processing improvements for Nmap,
including OS fingerprint matching, probe matching and retransmission
lookups for large hostgroups, and service name lookups.
* Integrated many of the most-submitted IPv4 OS fingerprints for recent
versions of Windows, iOS, macOS, Linux, and BSD.
* Added the tftp-version script which requests a nonexistent file from a
TFTP server and matches the error message to a database of known software.
* Ncat can now accept "connections" from multiple UDP hosts in listen mode
with the --keep-open option. This also enables --broker and --chat via UDP.
* Upgrade included libraries: zlib 1.2.13, Lua 5.4.4, libpcap 1.10.4
* UDP port scan (-sU) and version scan (-sV) now both use the same data source,
nmap-service-probes, for data payloads. Previously, the nmap-payloads file
was used for port scan.
* Nmap's service scan (-sV) can now probe the UDP service behind a DTLS tunnel,
the same as it already does for TCP services with SSL/TLS encryption.
* Ncat in listen mode with --udp --ssl will use DTLS to secure incoming connections.
* Handle Internationalized Domain Names (IDN) like Яндекс.рф on platforms
where getaddrinfo supports the AI_IDN flag. [Daniel Miller]
* Improved DNS domain name parsing to avoid recursion and enforce name length
limits, avoiding a theoretical stack overflow issue with certain crafted
DNS server responses.
- Update License to 'LicenseRef-NPSL-0.95'
-------------------------------------------------------------------
Sun May 21 12:56:55 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
- The package is licenced under the ""Nmap Public Source License",
which is not OSI approved. Specify as "LicenseRef-NPSL-0.93".
(boo#1211571)
-------------------------------------------------------------------
Mon Sep 5 08:53:23 UTC 2022 - Robert Frohl <rfrohl@suse.com>
- Update to 7.93:
* This release commemorates Nmap's 25th anniversary! It all started with this September 1, 1997 Phrack article by Fyodor: https://nmap.org/p51-11.html.
* Ensure Nmap builds with OpenSSL 3.0 using no deprecated API functions. Binaries for this release include OpenSSL 3.0.5.
* Upgrade included libraries: libssh2 1.10.0, zlib 1.2.12, Lua 5.3.6, libpcap 1.10.1
* Fix a bug that prevented Nmap from discovering interfaces on Linux when no IPv4 addresses were configured.
* NSE "exception handling" with nmap.new_try() will no longer result in a stack traceback in debug output
* Update the Nmap output DTD to match actual output since the `<hosthint>` element was added in Nmap 7.90.
* Fix newtargets support: since Nmap 7.92, scripts could not add targets in script pre-scanning phase.
* Scripts dhcp-discover and broadcast-dhcp-discover now support setting a client identifier.
* Script oracle-tns-version was not reporting the version correctly for Oracle 19c or newer
* Script redis-info was crashing or producing inaccurate information about client connections and/or cluster nodes.
* Script ipidseq was broken due to calling an unreachable library function.
* Support for EC crypto was not properly enabled if Nmap was compiled with OpenSSL in a custom location.
* Improvements to event handling and pcap socket garbage collection, fixing potential hangs and crashes.
* Fix TDS7 password encoding for mssql.lua, which had been assuming ASCII input even though other parts of the library had been passing it Unicode.
* Replace deprecated CPEs for IIS with their updated identifier, cpe:/a:microsoft:internet_information_services
* Fix script-terminating error when unknown BSON data types are encountered. Added parsers for most standard data types.
* Fix hostname/certificate comparison and matching to handle ASN.1 strings without null terminators, a similar bug to OpenSSL's CVE-2021-3712.
* Added support for SOCKS5 proxies that return bind addresses as hostnames, instead of IPv4/IPv6 addresses.
- Add nmap-fix-build-libpcap-1.10.5.patch
* libpcap 1.10.5 defines PCAP_SOCKET. Avoid redefinition in nmap by
renaming it. Fixes builds with libpcap >= 1.10.5.
- Replace deprecated %patchN macros
-------------------------------------------------------------------
Mon Oct 4 17:06:13 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>

119
nmap.spec
View File

@@ -1,8 +1,7 @@
#
# spec file for package nmap
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,21 +19,19 @@
%define _buildshell /bin/bash
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
# Something in Lua from openSUSE is broken
%if 0%{?suse_version}
%define with_system_lua 0
%define with_system_lua 0%{?suse_version} >= 1330
# don't build python2 subpackages (zenmap, ndiff) because of the python2 deprecation
# in Tumbleweed and in SLE15-SP4
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
%define with_python2 0
%else
%define with_system_lua 1
%define with_python2 1
%endif
%define pythons python3
Name: nmap
Version: 7.95
Version: 7.92
Release: 0
Summary: Network exploration tool and security scanner
# nmap 7.94 is licensed under Nmap Public Source License Version 0.95
# https://nmap.org/npsl/
# https://bugzilla.opensuse.org/show_bug.cgi?id=1211571
License: NonFree
License: GPL-2.0-or-later
Group: Productivity/Networking/Diagnostic
URL: https://nmap.org/
Source: https://nmap.org/dist/nmap-%{version}.tar.bz2
@@ -44,25 +41,28 @@ Patch1: nmap-7.40-desktop_files.patch
Patch2: nmap-4.75-nostrip.patch
Patch3: su-to-zenmap.patch
Patch4: nmap-ncat-skip-network-tests.patch
Patch5: zenmap-fix-locale-install.patch
# PATCH-FIX-SUSE nmap-fix-build-libpcap-1.10.5.patch antonio.teixeira@suse.com -- libpcap 1.10.5 defines PCAP_SOCKET. Avoid redefinition in nmap by renaming it.
Patch5: nmap-fix-build-libpcap-1.10.5.patch
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gobject-introspection
BuildRequires: libopenssl-3-devel
BuildRequires: gtk2-devel
BuildRequires: libpcap-devel
BuildRequires: libssh2-devel
BuildRequires: pcre2-devel
BuildRequires: python3-base
BuildRequires: update-desktop-files
BuildRequires: openssl-devel
BuildRequires: pcre-devel
BuildRequires: zlib-devel
%if %{with_system_lua}
BuildRequires: pkgconfig(lua) >= 5.4.4
%if %{with_python2}
BuildRequires: python-devel
%endif
BuildRequires: update-desktop-files
%if %{with_system_lua}
%if 0%{?suse_version} > 1320
BuildRequires: Lua(devel) = 5.3
%else
BuildRequires: pkgconfig(lua) >= 5.3
%endif
%endif
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module build}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
%description
Nmap ("Network Mapper") is a utility for network exploration or
@@ -79,7 +79,7 @@ and works fine against single hosts.
Summary: A graphical front-end for Nmap
Group: Productivity/Networking/Diagnostic
Requires: %{name} = %{version}
Requires: python3-gobject-Gdk
Requires: python-gtk
Obsoletes: %{name}-gtk < %{version}
Provides: %{name}-gtk = %{version}-%{release}
@@ -119,11 +119,28 @@ generator for network stack stress tests, ARP poisoning, Denial of
Service attacks, route tracing, etc.
%prep
%autosetup -p1
%setup -q
%if %{with_python2}
%patch -P 1 -p1
%endif
%patch -P 2
%if %{with_python2}
%patch -P 3
%endif
%patch -P 4 -p1
%patch -P 5 -p1
# use system provided libraries
rm -rf libpcap libpcre macosx mswin32
%if %{with_python2}
#fix locale dir
mv zenmap/share/zenmap/locale zenmap/share
sed -i -e "s|^locale_dir =.*$|locale_dir = os.path.join('share','locale')|" \
-e 's|join(self.install_data, data_dir)|join(self.install_data, "share")|' zenmap/setup.py
sed -i 's|^LOCALE_DIR = .*|LOCALE_DIR = join(prefix, "share", "locale")|' zenmap/zenmapCore/Paths.py
%endif
#fix pt_PT/pt zh/zh_CN locale
sed -i '/ALL_LINGUAS =/s/pt_PT/pt/' Makefile.in
sed -i '/ALL_LINGUAS =/s/zh/zh_CN/' Makefile.in
@@ -142,37 +159,27 @@ export CXXFLAGS="%{optflags} -DOPENSSL_LOAD_CONF"
--with-liblua=included \
%endif
--with-libpcre=%{_prefix} \
%if %{with_python2} < 1
--without-zenmap \
--without-ndiff \
%endif
STRIP=/bin/true
%make_build
pushd zenmap
%pyproject_wheel
popd
%install
make DESTDIR=%{buildroot} deskdir="%{_datadir}/gnome/apps/Utilities/" install
install -d "%{buildroot}%{_datadir}/pixmaps/"
install -d "%{buildroot}%{_datadir}/applications/"
%if %{with_python2}
rm "%{buildroot}%{_bindir}/uninstall_zenmap"
rm "%{buildroot}%{_bindir}/uninstall_ndiff"
pushd zenmap
%pyproject_install
install -m 644 ../docs/zenmap.1 %{buildroot}%{_mandir}/man1/
install -m 644 install_scripts/unix/*.desktop %{buildroot}%{_datadir}/applications/
install -m 755 install_scripts/unix/su-to-zenmap.sh %{buildroot}%{_bindir}/su-to-zenmap.sh
ln -s %{python_sitelib}/zenmapCore/data/pixmaps/zenmap.png %{buildroot}%{_datadir}/pixmaps/zenmap.png
ln -sf zenmap %{buildroot}%{_bindir}/nmapfe
ln -sf zenmap %{buildroot}%{_bindir}/xnmap
popd
%find_lang zenmap
ln -s ../zenmap/pixmaps/zenmap.png "%{buildroot}%{_datadir}/pixmaps/zenmap.png"
%suse_update_desktop_file zenmap System Network
%suse_update_desktop_file zenmap-root System Network
%find_lang zenmap
touch -r %{buildroot}/%{python_sitelib}/zenmapCore/Paths.py %{buildroot}/%{python_sitelib}/zenmapCore/Paths.pyc
%endif
dos2unix %{buildroot}%{_datadir}/%{name}/nselib/data/oracle-sids
%fdupes -s %{buildroot}
@@ -191,7 +198,7 @@ popd
compiled_with=$("%{buildroot}%{_bindir}/nmap" -V | grep "Compiled with:" )
# for the following tests, the leading space is relevant
# check features built with system libraries
[[ $compiled_with == *\ libpcre2-* ]]
[[ $compiled_with == *\ libpcre-* ]]
[[ $compiled_with == *\ libpcap-* ]]
[[ $compiled_with == *\ openssl-* ]]
# check features built with included sources
@@ -200,8 +207,8 @@ compiled_with=$("%{buildroot}%{_bindir}/nmap" -V | grep "Compiled with:" )
%if %{with_system_lua}
[[ $compiled_with == *\ liblua-5.3* ]]
%else
# lua in nmap tarball identifies itself as "liblua-5.4.4"
[[ $compiled_with == *\ nmap-liblua-5.4.* ]]
# lua in nmap tarball identifies itself as "liblua-5.3.3"
[[ $compiled_with == *\ nmap-liblua-5.3.* ]]
%endif
#
@@ -219,34 +226,26 @@ compiled_with=$("%{buildroot}%{_bindir}/nmap" -V | grep "Compiled with:" )
%{_bindir}/nmap
%{_datadir}/nmap
%if %{with_python2}
%files -n zenmap -f zenmap.lang
%{_bindir}/xnmap
%{_bindir}/zenmap
%{_bindir}/nmapfe
%{_bindir}/su-to-zenmap.sh
%dir %{python_sitelib}/zenmapCore
%{python_sitelib}/zenmapCore/*.py{c,}
%{python_sitelib}/zenmapCore/__pycache__
%dir %{python_sitelib}/zenmapCore/data
%{python_sitelib}/zenmapCore/data/{config,docs,misc,pixmaps}
%dir %{python_sitelib}/zenmapCore/data/locale
%dir %{python_sitelib}/zenmapCore/data/locale/*
%dir %{python_sitelib}/zenmapCore/data/locale/*/LC_MESSAGES
%{python_sitelib}/zenmapCore/data/locale/xgettext-profile_editor.py
%{python_sitelib}/zenmapCore/data/locale/__pycache__/*
%{python_sitelib}/zenmap-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/zenmapCore
%{python_sitelib}/zenmapGUI
%{python_sitelib}/radialnet
%{_datadir}/applications/zenmap-root.desktop
%{_datadir}/applications/zenmap.desktop
%{python_sitelib}/zenmap-%{version}.dist-info
%{_datadir}/pixmaps/zenmap.png
%{_datadir}/zenmap
%{_mandir}/man1/zenmap.1%{?ext_man}
%files -n ndiff
%{_bindir}/ndiff
%{_mandir}/man1/ndiff.1%{?ext_man}
%{python_sitelib}/ndiff.*
%pycache_only %{python_sitelib}/__pycache__/ndiff.*
%endif
%files -n ncat
%{_bindir}/ncat

View File

@@ -1,8 +1,8 @@
Index: nmap-7.94/zenmap/install_scripts/unix/su-to-zenmap.sh
Index: zenmap/install_scripts/unix/su-to-zenmap.sh
===================================================================
--- nmap-7.94.orig/zenmap/install_scripts/unix/su-to-zenmap.sh
+++ nmap-7.94/zenmap/install_scripts/unix/su-to-zenmap.sh
@@ -19,8 +19,8 @@ if test "$euid" = "$privid"; then
--- zenmap/install_scripts/unix/su-to-zenmap.sh.orig 2012-08-19 21:11:06.000000000 +0100
+++ zenmap/install_scripts/unix/su-to-zenmap.sh 2012-12-02 11:48:38.000000000 +0000
@@ -13,8 +13,8 @@ if test "$euid" = "$privid"; then
$COMMAND
else
if test -z "$SU_TO_ROOT_X"; then
@@ -13,7 +13,7 @@ Index: nmap-7.94/zenmap/install_scripts/unix/su-to-zenmap.sh
if test "X$KDE_FULL_SESSION" = "Xtrue" ; then
if which kdesu >/dev/null 2>&1 ; then
SU_TO_ROOT_X=kdesu
@@ -45,7 +45,7 @@ else
@@ -39,7 +39,7 @@ else
fi
fi
case $SU_TO_ROOT_X in

View File

@@ -1,52 +0,0 @@
From d217ab017e667d536b7d43b8920b8d5700753465 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul@city-fan.org>
Date: Tue, 23 Apr 2024 14:31:18 +0100
Subject: [PATCH] Fix failure to find zenmap translations
Installation of translations hasn't worked since the conversion to
Python 3 (#2088), and was broken in a different way in the migration
from setup.py to pyproject.toml since package data files are not found
deep down in directory hierarachies.
This should address that (fixes #2718).
---
zenmap/MANIFEST.in | 1 +
zenmap/pyproject.toml | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
create mode 100644 zenmap/MANIFEST.in
diff --git a/zenmap/MANIFEST.in b/zenmap/MANIFEST.in
new file mode 100644
index 0000000000..3fc6b0d2ef
--- /dev/null
+++ b/zenmap/MANIFEST.in
@@ -0,0 +1 @@
+include zenmapCore/data/locale/*/LC_MESSAGES/*.mo
diff --git a/zenmap/pyproject.toml b/zenmap/pyproject.toml
index 0a2e3f5d78..842f314a5a 100644
--- a/zenmap/pyproject.toml
+++ b/zenmap/pyproject.toml
@@ -23,12 +23,13 @@ Changelog = "https://nmap.org/changelog"
[project.gui-scripts]
zenmap = "zenmapGUI.App:run"
-[tool.setuptools]
-packages = [
+[tool.setuptools.packages.find]
+include = [
"zenmapCore",
"zenmapCore.data.config",
"zenmapCore.data.docs",
"zenmapCore.data.locale",
+"zenmapCore.data.locale.*.LC_MESSAGES",
"zenmapCore.data.misc",
"zenmapCore.data.pixmaps",
"zenmapCore.data.pixmaps.radialnet",
@@ -47,7 +48,6 @@ version = {attr = "zenmapCore.Version.VERSION"}
[tool.setuptools.package-data]
"zenmapCore.data.pixmaps" = ["*.gif", "*.png"]
"zenmapCore.data.pixmaps.radialnet" = ["*.png"]
-"zenmapCore.data.locale" = ["*.mo"]
"zenmapCore.data.config" = ["zenmap.conf", "scan_profile.usp", "zenmap_version"]
"zenmapCore.data.docs" = ["*.html"]
"zenmapCore.data.misc" = ["*.xml"]