From 9568de031c169f8b8fa2db51b922cad4d91b40d0 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:02:59 +0200 Subject: [PATCH 01/34] Rebuilt for Python 3.10 --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 8b3b0cd..e337729 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 11 +%global baserelease 12 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Fri Jun 04 2021 Python Maint - 0.7.0-12 +- Rebuilt for Python 3.10 + * Tue Jan 26 2021 Fedora Release Engineering - 0.7.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 3e36036e4d12155d04b69d4c20846986faf0b832 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 20:48:55 +0000 Subject: [PATCH 02/34] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index e337729..a8d8657 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 12 +%global baserelease 13 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 0.7.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 04 2021 Python Maint - 0.7.0-12 - Rebuilt for Python 3.10 From 8bb50b99e347d46b1b663c93ad09ff8820039d05 Mon Sep 17 00:00:00 2001 From: Sahana Prasad Date: Tue, 14 Sep 2021 19:00:27 +0200 Subject: [PATCH 03/34] Rebuilt with OpenSSL 3.0.0 --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index a8d8657..3877d37 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 13 +%global baserelease 14 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Tue Sep 14 2021 Sahana Prasad - 0.7.0-14 +- Rebuilt with OpenSSL 3.0.0 + * Wed Jul 21 2021 Fedora Release Engineering - 0.7.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 43c812e2042a1c8cdba030c09f099f080ebea6a4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 00:41:58 +0000 Subject: [PATCH 04/34] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 3877d37..f98114b 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 14 +%global baserelease 15 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 0.7.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Tue Sep 14 2021 Sahana Prasad - 0.7.0-14 - Rebuilt with OpenSSL 3.0.0 From 74a5b8e20149789ea2b412fbed53a9f49044e66f Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 18:18:56 +0200 Subject: [PATCH 05/34] Rebuilt for Python 3.11 --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index f98114b..7eb9154 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 15 +%global baserelease 16 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Mon Jun 13 2022 Python Maint - 0.7.0-16 +- Rebuilt for Python 3.11 + * Thu Jan 20 2022 Fedora Release Engineering - 0.7.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 0bb61d4d647c0ec44b33e4e5d512f1bfc739cb19 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 00:29:43 +0000 Subject: [PATCH 06/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 7eb9154..4446cbf 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 16 +%global baserelease 17 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 0.7.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 0.7.0-16 - Rebuilt for Python 3.11 From 1628a7b497fe3ecf476e2d95aeb69756808fb069 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 01:26:04 +0000 Subject: [PATCH 07/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 4446cbf..965be49 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 17 +%global baserelease 18 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 0.7.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 0.7.0-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 4acbea77363f7ade75ce246bb877d9affc214852 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 14 Jun 2023 06:13:56 +0200 Subject: [PATCH 08/34] Rebuilt for Python 3.12 --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 965be49..d98bd0b 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 18 +%global baserelease 19 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Wed Jun 14 2023 Python Maint - 0.7.0-19 +- Rebuilt for Python 3.12 + * Thu Jan 19 2023 Fedora Release Engineering - 0.7.0-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 997e00acca60f4ff4f056bce5297799be7b540cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 17:29:48 +0000 Subject: [PATCH 09/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index d98bd0b..f742768 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 19 +%global baserelease 20 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 0.7.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jun 14 2023 Python Maint - 0.7.0-19 - Rebuilt for Python 3.12 From 1bc85d9f660481d3de6224e61a163bfff187e891 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sun, 23 Jul 2023 18:50:51 +0200 Subject: [PATCH 10/34] Rebuilt for Python 3.12 --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index f742768..6847539 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 20 +%global baserelease 21 %if 0%{?rhel} # Group needed for EPEL @@ -493,6 +493,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Sun Jul 23 2023 Python Maint - 0.7.0-21 +- Rebuilt for Python 3.12 + * Wed Jul 19 2023 Fedora Release Engineering - 0.7.0-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 2dfdea19fe0e64b8c86efb098af30fcccdb8125a Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 5 Oct 2023 01:05:28 +0200 Subject: [PATCH 11/34] patch to include version in the python binding --- dionaea.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 6847539..710c67e 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 21 +%global baserelease 22 %if 0%{?rhel} # Group needed for EPEL @@ -124,6 +124,9 @@ Patch9: dionaea-09_setgroups_before_setresuid.patch # Merged upstream in 0.7.0 # Patch11: dionaea-11_obsolete_m4.patch +# Patch to explicitly state the python module version to the setup.py +Patch12: dionaea-12_py_module_version.patch + BuildRequires: autoconf BuildRequires: automake @@ -332,6 +335,7 @@ git commit -a -m "finished prep" %build autoreconf -vif # --disable-werror because of https://github.com/DinoTools/dionaea/issues/225 +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %configure --enable-python --with-python=`which python3` --with-glib=glib --with-nl-include=/usr/include/libnl3 --disable-werror make %{?_smp_mflags} CFLAGS="%{optflags} -Wno-error -D_GNU_SOURCE -std=c99" cd doc From 04510b04765705112b7f97e99f68d75fd444b28f Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 5 Oct 2023 01:08:06 +0200 Subject: [PATCH 12/34] missing comment --- dionaea.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dionaea.spec b/dionaea.spec index 710c67e..99ed611 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -497,6 +497,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Thu Oct 05 2023 Michal Ambroz 0.7.0-22 +- add version metadata to the python module to fix FTBFS + * Sun Jul 23 2023 Python Maint - 0.7.0-21 - Rebuilt for Python 3.12 From 861010635ab612e52257b4c421d74220383326fb Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 5 Oct 2023 01:13:28 +0200 Subject: [PATCH 13/34] add the patch for adding version metadata to the setup --- dionaea-12_py_module_version.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 dionaea-12_py_module_version.patch diff --git a/dionaea-12_py_module_version.patch b/dionaea-12_py_module_version.patch new file mode 100644 index 0000000..8fa0411 --- /dev/null +++ b/dionaea-12_py_module_version.patch @@ -0,0 +1,11 @@ +diff -ru dionaea-0.7.0/modules/python/setup.py.in dionaea-0.7.0.new/modules/python/setup.py.in +--- dionaea-0.7.0/modules/python/setup.py.in 2023-10-05 00:42:27.965474398 +0200 ++++ dionaea-0.7.0.new/modules/python/setup.py.in 2023-10-05 01:00:14.217496327 +0200 +@@ -100,6 +100,7 @@ + + setup( + name = 'dionaea', ++ version = '@VERSION@', + cmdclass = {'build_ext': build_ext}, + ext_modules = ext_modules, + ) From 20f62effece21fa94f6795242c4ff74c69c8f6c4 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 5 Oct 2023 04:09:57 +0200 Subject: [PATCH 14/34] fix yara load failing, use safe_load instead --- dionaea-14_safe_load.patch | 14 ++++++++++++++ dionaea.spec | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 dionaea-14_safe_load.patch diff --git a/dionaea-14_safe_load.patch b/dionaea-14_safe_load.patch new file mode 100644 index 0000000..956ed26 --- /dev/null +++ b/dionaea-14_safe_load.patch @@ -0,0 +1,14 @@ +diff -ru dionaea-0.7.0/modules/python/dionaea/__init__.py dionaea-0.7.0.new/modules/python/dionaea/__init__.py +--- dionaea-0.7.0/modules/python/dionaea/__init__.py 2018-05-01 22:22:13.000000000 +0200 ++++ dionaea-0.7.0.new/modules/python/dionaea/__init__.py 2023-10-05 04:01:50.852135935 +0200 +@@ -70,7 +70,7 @@ + for filename_pattern in filename_patterns: + for filename in glob.glob(filename_pattern): + fp = open(filename) +- file_configs = yaml.load(fp) ++ file_configs = yaml.safe_load(fp) + if isinstance(file_configs, (tuple, list)): + configs += file_configs +- return configs +\ No newline at end of file ++ return configs diff --git a/dionaea.spec b/dionaea.spec index 99ed611..4799c0d 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 22 +%global baserelease 23 %if 0%{?rhel} # Group needed for EPEL @@ -127,6 +127,11 @@ Patch9: dionaea-09_setgroups_before_setresuid.patch # Patch to explicitly state the python module version to the setup.py Patch12: dionaea-12_py_module_version.patch +# Replace deprecated PyUnicode_GetSize with PyUnicode_GetLength +Patch13: dionaea-13_GetSize_deprecated.patch + +# Trying to identify the mole +Patch14: dionaea-14_safe_load.patch BuildRequires: autoconf BuildRequires: automake From 725afc3ded51e525a150ce6c625337dbb1ce3975 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 5 Oct 2023 09:32:26 +0200 Subject: [PATCH 15/34] adding the missing patch to git --- dionaea-13_GetSize_deprecated.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 dionaea-13_GetSize_deprecated.patch diff --git a/dionaea-13_GetSize_deprecated.patch b/dionaea-13_GetSize_deprecated.patch new file mode 100644 index 0000000..3ca01c5 --- /dev/null +++ b/dionaea-13_GetSize_deprecated.patch @@ -0,0 +1,12 @@ +diff -ru dionaea-0.7.0/modules/python/module.c dionaea-0.7.0.new/modules/python/module.c +--- dionaea-0.7.0/modules/python/module.c 2023-10-05 02:34:45.932378106 +0200 ++++ dionaea-0.7.0.new/modules/python/module.c 2023-10-05 02:36:19.072753468 +0200 +@@ -985,7 +985,7 @@ + } else + return g_strdup(""); + +- Py_ssize_t pysize = PyUnicode_GetSize(pyobjectstr); ++ Py_ssize_t pysize = PyUnicode_GetLength(pyobjectstr); + wchar_t * str = (wchar_t *) malloc((pysize + 1) * sizeof(wchar_t)); + PyUnicode_AsWideChar(pyobjectstr, str, pysize); + str[pysize] = '\0'; From 8315a298b8c8e56bf53ab35eb2e9e4b7eb5ab069 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 17:11:45 +0000 Subject: [PATCH 16/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 4799c0d..53e67d7 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 23 +%global baserelease 24 %if 0%{?rhel} # Group needed for EPEL @@ -502,6 +502,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 0.7.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Oct 05 2023 Michal Ambroz 0.7.0-22 - add version metadata to the python module to fix FTBFS From 519bc99f0f054b7053d3318cc59f16264f7097c1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 09:28:30 +0000 Subject: [PATCH 17/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 53e67d7..40a627b 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 24 +%global baserelease 25 %if 0%{?rhel} # Group needed for EPEL @@ -502,6 +502,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 0.7.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 0.7.0-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 8d1fc138b1e83f13a3bb636497ee16d50cb0b8b3 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 19 Mar 2024 17:43:54 +0100 Subject: [PATCH 18/34] Depend on SQLAlchemy < 2 Signed-off-by: Nils Philippsen --- dionaea.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dionaea.spec b/dionaea.spec index 40a627b..82b83f5 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 25 +%global baserelease 26 %if 0%{?rhel} # Group needed for EPEL @@ -226,7 +226,7 @@ Requires: python%{python3_pkgversion}-pyev Requires: python%{python3_pkgversion}-bson Requires: python%{python3_pkgversion}-PyYAML Requires: python%{python3_pkgversion}-scapy -Requires: python%{python3_pkgversion}-sqlalchemy +Requires: python%{python3_pkgversion}-sqlalchemy < 2 %description -n python%{python3_pkgversion}-%{gitname} This is a Python3 library that gives access to dionaea honeypot functionality. @@ -502,6 +502,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Tue Mar 19 2024 Nils Philippsen - 0.7.0-26 +- Depend on SQLAlchemy < 2 + * Wed Jan 24 2024 Fedora Release Engineering - 0.7.0-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 2c1f256a538201cc36c90b5be1b4a0e52ce6e82e Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 19 Mar 2024 18:04:21 +0100 Subject: [PATCH 19/34] Add dependency on setuptools Python package Signed-off-by: Nils Philippsen --- dionaea.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 82b83f5..bbfb66a 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 26 +%global baserelease 27 %if 0%{?rhel} # Group needed for EPEL @@ -155,6 +155,7 @@ BuildRequires: sqlite BuildRequires: openssl-devel BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-Cython %if 0%{?with_systemd} @@ -502,6 +503,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Tue Mar 19 2024 Nils Philippsen - 0.7.0-27 +- Add dependency on setuptools Python package + * Tue Mar 19 2024 Nils Philippsen - 0.7.0-26 - Depend on SQLAlchemy < 2 From 0e7397e2add494f5b777f4026fe5d4a5652f97b3 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Mon, 25 Mar 2024 13:18:22 +0100 Subject: [PATCH 20/34] Revert constraining SQLAlchemy version Signed-off-by: Nils Philippsen --- dionaea.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dionaea.spec b/dionaea.spec index bbfb66a..2b0b8cd 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 27 +%global baserelease 28 %if 0%{?rhel} # Group needed for EPEL @@ -227,7 +227,7 @@ Requires: python%{python3_pkgversion}-pyev Requires: python%{python3_pkgversion}-bson Requires: python%{python3_pkgversion}-PyYAML Requires: python%{python3_pkgversion}-scapy -Requires: python%{python3_pkgversion}-sqlalchemy < 2 +Requires: python%{python3_pkgversion}-sqlalchemy %description -n python%{python3_pkgversion}-%{gitname} This is a Python3 library that gives access to dionaea honeypot functionality. @@ -503,6 +503,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Mon Mar 25 2024 Nils Philippsen - 0.7.0-28 +- Revert constraining SQLAlchemy version + * Tue Mar 19 2024 Nils Philippsen - 0.7.0-27 - Add dependency on setuptools Python package From e1c5d7fbcdbe2ac3f0cc15afe3bf86595215c193 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Wed, 22 May 2024 13:33:27 +0200 Subject: [PATCH 21/34] enable restart of dionaea if it crashes --- dionaea.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dionaea.service b/dionaea.service index 0cb4009..238a653 100644 --- a/dionaea.service +++ b/dionaea.service @@ -5,6 +5,8 @@ After=multi-user.target [Service] Type=forking +Restart=on-abort +RestartSec=1s PIDFile=/var/run/dionaea.pid EnvironmentFile=-/etc/sysconfig/dionaea ExecStart=/usr/sbin/dionaea -D $DUSER $DGROUP $DWORKDIR $LOGLEVELS $LOGDOMAINS $PIDFILE $MISC From ec50800e55789ff3bc87e97097299c37cb85577a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 14:08:36 +0200 Subject: [PATCH 22/34] Rebuilt for Python 3.13 --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 2b0b8cd..eb8239a 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 28 +%global baserelease 29 %if 0%{?rhel} # Group needed for EPEL @@ -503,6 +503,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Fri Jun 07 2024 Python Maint - 0.7.0-29 +- Rebuilt for Python 3.13 + * Mon Mar 25 2024 Nils Philippsen - 0.7.0-28 - Revert constraining SQLAlchemy version From aa889ce119b5eea3b33ad941827cd5eda5578fe7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 21:00:38 +0000 Subject: [PATCH 23/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index eb8239a..e958951 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.7.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 29 +%global baserelease 30 %if 0%{?rhel} # Group needed for EPEL @@ -503,6 +503,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 0.7.0-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 0.7.0-29 - Rebuilt for Python 3.13 From ba7fa2f82472a12a5c64efdc53fce85a4f36390f Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 1 Aug 2024 16:11:03 +0200 Subject: [PATCH 24/34] dionaea bump to 0.11.0 --- .gitignore | 3 +- README.md | 23 +- dionaea-03_in6_pktinfo.patch | 2 +- dionaea-15_pyeval_callobject.patch | 76 +++++++ dionaea-16_cmake_append_flags.patch | 13 ++ dionaea-17_cmake_dirs.patch | 183 ++++++++++++++++ dionaea-18_python_regex.patch | 323 ++++++++++++++++++++++++++++ dionaea-19_setuptools.patch | 132 ++++++++++++ dionaea.logrotate | 5 +- dionaea.spec | 257 +++++++++------------- sources | 2 +- 11 files changed, 850 insertions(+), 169 deletions(-) create mode 100644 dionaea-15_pyeval_callobject.patch create mode 100644 dionaea-16_cmake_append_flags.patch create mode 100644 dionaea-17_cmake_dirs.patch create mode 100644 dionaea-18_python_regex.patch create mode 100644 dionaea-19_setuptools.patch diff --git a/.gitignore b/.gitignore index 5649717..c3367d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/dionaea-0.6.0-1748f3b.tar.gz -/dionaea-0.7.0.tar.gz +/dionaea-*.tar.gz diff --git a/README.md b/README.md index b25f2aa..a90c42e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,24 @@ # dionaea -Dionaea honeypot is meant to be a nepenthes successor, embedding python +Dionaea honeypot is low interaction honeypot, embedding python as scripting language, using libemu to detect shell-codes, supporting -ipv6 and TLS. \ No newline at end of file +ipv6 and TLS. + +## Dependencies +- libidn https://src.fedoraproject.org/rpms/libidn +- loudmouth https://src.fedoraproject.org/rpms/loudmouth +- udns https://src.fedoraproject.org/rpms/udns +- libev https://src.fedoraproject.org/rpms/libev +- python3-bson https://src.fedoraproject.org/rpms/python-pymongo +- libdasm https://src.fedoraproject.org/rpms/libdasm +- libemu https://src.fedoraproject.org/rpms/libemu + +## Packages +- dionaea +- python3-dionaea +- dionaea-doc + +## Known issues +- p0f - the p0f API used in upstream dionaea code is currently (2024) referring to version 2.* of p0f, + while we have version 3.* in Fedora. Configuring p0f interface to dionaea in /etc/dionaea/services-enabled/p0f.yaml currently results in severe segfaults especially when blackhole module is used for handling a port. + diff --git a/dionaea-03_in6_pktinfo.patch b/dionaea-03_in6_pktinfo.patch index 7ffdc01..07f6ffe 100644 --- a/dionaea-03_in6_pktinfo.patch +++ b/dionaea-03_in6_pktinfo.patch @@ -1,4 +1,4 @@ -ipv6 structures in are used by the +ipv6 structures in are used by the so it should be included first ipv6 structures needs explicit CFLAGS " -D_GNU_SOURCE" to compile on linux diff -ru dionaea-793accd84432a77309fa8b81e1f5e9b5bd9ee7a3.orig/include/connection.h dionaea-793accd84432a77309fa8b81e1f5e9b5bd9ee7a3.new/include/connection.h --- dionaea-793accd84432a77309fa8b81e1f5e9b5bd9ee7a3.orig/include/connection.h 2018-03-21 04:21:30.193354693 +0100 diff --git a/dionaea-15_pyeval_callobject.patch b/dionaea-15_pyeval_callobject.patch new file mode 100644 index 0000000..ed2cc6a --- /dev/null +++ b/dionaea-15_pyeval_callobject.patch @@ -0,0 +1,76 @@ +The PyEval_CallObject API is obsolete in python 3.12, use PyObject_CallObject instead +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/module.c dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/module.c +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/module.c 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/module.c 2024-07-04 15:38:00.956643590 +0200 +@@ -138,7 +138,7 @@ + Py_DECREF(module); + PyObject *func = PyObject_GetAttrString(module, "remoteshell"); + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + Py_DECREF(arglist); + g_debug("r %p", r); + struct head +@@ -181,7 +181,7 @@ + PyObject *func = PyObject_GetAttrString(i->module, "stop"); + if ( func != NULL ) { + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + traceback(); + // PyErr_Print(); + Py_DECREF(arglist); +@@ -203,7 +203,7 @@ + func = PyObject_GetAttrString(module, "new"); + if( func != NULL ) { + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + traceback(); + Py_DECREF(arglist); + Py_XDECREF(r); +@@ -214,7 +214,7 @@ + func = PyObject_GetAttrString(module, "start"); + if( func != NULL ) { + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + traceback(); + Py_DECREF(arglist); + Py_XDECREF(r); +@@ -239,7 +239,7 @@ + PyObject *func = PyObject_GetAttrString(module, "new"); + if( func != NULL ) { + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + Py_DECREF(arglist); + Py_XDECREF(r); + Py_DECREF(func); +@@ -273,7 +273,7 @@ + if( func != NULL ) + { + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + Py_DECREF(arglist); + Py_XDECREF(r); + Py_DECREF(func); +@@ -306,7 +306,7 @@ + if( func != NULL ) + { + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + Py_DECREF(arglist); + Py_XDECREF(r); + Py_DECREF(func); +@@ -389,7 +389,7 @@ + PyObject *func = PyObject_GetAttrString(module, "new"); + if( func != NULL ) { + PyObject *arglist = Py_BuildValue("()"); +- PyObject *r = PyEval_CallObject(func, arglist); ++ PyObject *r = PyObject_CallObject(func, arglist); + Py_DECREF(arglist); + Py_XDECREF(r); + Py_DECREF(func); diff --git a/dionaea-16_cmake_append_flags.patch b/dionaea-16_cmake_append_flags.patch new file mode 100644 index 0000000..752b96c --- /dev/null +++ b/dionaea-16_cmake_append_flags.patch @@ -0,0 +1,13 @@ +APPEND adds unwanted ";" character if there are already some CMAKE_C_FLAGS defined +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/CMakeLists.txt 2024-07-04 21:10:43.604959260 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/CMakeLists.txt 2024-07-04 21:10:14.986830427 +0200 +@@ -31,7 +31,7 @@ + set(CMAKE_C_STANDARD 11) + set(CMAKE_C_STANDARD_REQUIRED ON) + # ToDo: move to source file? +-list(APPEND CMAKE_C_FLAGS "-D_GNU_SOURCE") ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE") + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) + diff --git a/dionaea-17_cmake_dirs.patch b/dionaea-17_cmake_dirs.patch new file mode 100644 index 0000000..014b45e --- /dev/null +++ b/dionaea-17_cmake_dirs.patch @@ -0,0 +1,183 @@ +Change handling of dirs to be able to configure/install to base system having +configuration in /etc/, +data files in /var +and rest in /usr, +while keeping the possibility to install to /opt/dionaea by default +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/cmake/InstallConfig.cmake dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/cmake/InstallConfig.cmake +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/cmake/InstallConfig.cmake 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/cmake/InstallConfig.cmake 2024-07-07 16:40:50.457869174 +0200 +@@ -12,17 +12,17 @@ + get_filename_component(src_name "${src}" NAME) + get_filename_component(basename_dest "${src}" NAME) + install(CODE " +- if(\${CMAKE_INSTALL_FULL_PREFIX} MATCHES .*/_CPack_Packages/.* OR NOT EXISTS \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${dest}/${src_name}\") +- message(STATUS \"Installing: \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${dest}/${src_name}\") ++ if(\${CMAKE_INSTALL_FULL_PREFIX} MATCHES .*/_CPack_Packages/.* OR NOT EXISTS \"\$ENV{DESTDIR}/${dest}/${src_name}\") ++ message(STATUS \"Installing: \$ENV{DESTDIR}/${dest}/${src_name}\") + execute_process(COMMAND \${CMAKE_COMMAND} -E copy \"${src}\" +- \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${dest}/${src_name}\" ++ \"\$ENV{DESTDIR}/${dest}/${src_name}\" + RESULT_VARIABLE copy_result + ERROR_VARIABLE error_output) + if(copy_result) + message(FATAL_ERROR \${error_output}) + endif() + else() +- message(STATUS \"Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${dest}/${src_name}\") ++ message(STATUS \"Skipping : \$ENV{DESTDIR}/${dest}/${src_name}\") + endif() + ") + endfunction() +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/cmake/InstallPythonConfig.cmake dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/cmake/InstallPythonConfig.cmake +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/cmake/InstallPythonConfig.cmake 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/cmake/InstallPythonConfig.cmake 2024-07-07 13:16:38.947125822 +0200 +@@ -43,13 +43,13 @@ + if(NOT EXISTS "${_conf_dst}") + install(DIRECTORY DESTINATION "${_conf_dst}") + foreach(filename ${MY_FUNC_FILES}) +- install(CODE "message(STATUS \"Enabling Service: ${filename} in \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_conf_dst}\")") ++ install(CODE "message(STATUS \"Enabling Service: ${filename} in \$ENV{DESTDIR}/${_conf_dst}\")") + install(CODE " + EXECUTE_PROCESS( + COMMAND \"${CMAKE_COMMAND}\" -E create_symlink + ${MY_FUNC_SOURCE_REL_DIR}/${filename} + ${filename} +- WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_conf_dst}\" ++ WORKING_DIRECTORY \"\$ENV{DESTDIR}/${_conf_dst}\" + ) + ") + endforeach() +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/curl/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/curl/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/curl/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/curl/CMakeLists.txt 2024-07-07 21:51:47.636592554 +0200 +@@ -40,5 +40,5 @@ + + install( + TARGETS module_curl +- LIBRARY DESTINATION lib/dionaea ++ LIBRARY DESTINATION ${DIONAEA_MODDIR} + ) +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/emu/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/emu/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/emu/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/emu/CMakeLists.txt 2024-07-07 21:52:01.819707360 +0200 +@@ -41,5 +41,5 @@ + + install( + TARGETS module_emu +- LIBRARY DESTINATION lib/dionaea ++ LIBRARY DESTINATION ${DIONAEA_MODDIR} + ) +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/nfq/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/nfq/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/nfq/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/nfq/CMakeLists.txt 2024-07-07 21:52:50.925104849 +0200 +@@ -41,5 +41,5 @@ + + install( + TARGETS module_nfq +- LIBRARY DESTINATION lib/dionaea ++ LIBRARY DESTINATION ${DIONAEA_MODDIR} + ) +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/nl/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/nl/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/nl/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/nl/CMakeLists.txt 2024-07-07 21:52:58.748168174 +0200 +@@ -42,5 +42,5 @@ + + install( + TARGETS module_nl +- LIBRARY DESTINATION lib/dionaea ++ LIBRARY DESTINATION ${DIONAEA_MODDIR} + ) +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/pcap/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/pcap/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/pcap/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/pcap/CMakeLists.txt 2024-07-07 21:53:08.484246984 +0200 +@@ -39,5 +39,5 @@ + + install( + TARGETS module_pcap +- LIBRARY DESTINATION lib/dionaea ++ LIBRARY DESTINATION ${DIONAEA_MODDIR} + ) +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/xmatch/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/xmatch/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/xmatch/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/xmatch/CMakeLists.txt 2024-07-07 21:54:00.053664426 +0200 +@@ -27,5 +27,5 @@ + + install( + TARGETS xmatch +- LIBRARY DESTINATION lib ++ LIBRARY DESTINATION ${DIONAEA_MODDIR} + ) +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/src/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/src/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/src/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/src/CMakeLists.txt 2024-07-07 23:02:13.808986562 +0200 +@@ -59,7 +59,7 @@ + + install ( + TARGETS dionaea +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} + ) + + configure_file( +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/CMakeLists.txt 2024-07-07 16:39:03.665446438 +0200 +@@ -31,7 +31,7 @@ + ) + + #install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --prefix=${CMAKE_INSTALL_PREFIX})") +- install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --install-lib=\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${DIONAEA_PYTHON_SITELIBDIR})") ++ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --install-lib=\$ENV{DESTDIR}/${DIONAEA_PYTHON_SITELIBDIR})") + endif() + + add_library( +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/CMakeLists.txt dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/CMakeLists.txt +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/CMakeLists.txt 2021-02-08 06:48:52.000000000 +0100 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/CMakeLists.txt 2024-07-08 04:14:55.578867606 +0200 +@@ -66,7 +66,27 @@ + + option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF) + ++# Default install prefix for Dionaea ++if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) ++ message(STATUS "INFO: Setting the CMAKE_INSTALL_PREFIX to default - /opt/dionaea") ++ set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "/opt/dionaea") ++endif() ++ ++message(STATUS "Before GNUInstallDirs: CMAKE_INSTALL_FULL_LOCALSTATEDIR = ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}") + include(GNUInstallDirs) ++message(STATUS "After GNUInstallDirs: CMAKE_INSTALL_FULL_LOCALSTATEDIR = ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}") ++ ++### Dionaea non-FHS compliant defaults /opt/dionaea ++# Dionaea defaults are different from FHS as used in GNUInstallDirs ++# for example the default when prefix is set to /opt/dionaea, the configuration ++# is expected in /opt/dionaea/etc and not in /etc/opt/dionaea, same for the state dirs ++# expected to be in /opt/dionaea/var/lib and not in /var/opt/dionaea/lib ++if(CMAKE_INSTALL_PREFIX STREQUAL "/opt/dionaea") ++ set(CMAKE_INSTALL_FULL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "Configuration") ++ set(CMAKE_INSTALL_FULL_LOCALSTATEDIR "${CMAKE_INSTALL_PREFIX}/var" CACHE PATH "Modifiable single-machine data (var)" FORCE) ++ set(CMAKE_INSTALL_FULL_RUNSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run" CACHE PATH "Run-time variable data (LOCALSTATEDIR/run)") ++endif() ++ + include(InstallConfig) + include(Packaging) + +@@ -90,12 +110,12 @@ + + set(DIONAEA_USER "dionaea" CACHE STRING "Dionaea user") + set(DIONAEA_GROUP "dionaea" CACHE STRING "Dionaea group") +-set(DIONAEA_MODDIR ${CMAKE_INSTALL_LIBDIR}/dionaea) +-set(DIONAEA_CONFDIR ${CMAKE_INSTALL_SYSCONFDIR}/dionaea) +-set(DIONAEA_RUNDIR "${CMAKE_INSTALL_LOCALSTATEDIR}/run" CACHE STRING "/run directory") +-set(DIONAEA_STATEDIR ${CMAKE_INSTALL_LOCALSTATEDIR}/lib/dionaea) +-set(DIONAEA_LOGDIR ${CMAKE_INSTALL_LOCALSTATEDIR}/log/dionaea) +-set(DIONAEA_PYTHON_SITELIBDIR ${CMAKE_INSTALL_LIBDIR}/dionaea/python) ++set(DIONAEA_MODDIR ${CMAKE_INSTALL_FULL_LIBDIR}/dionaea CACHE PATH "Dionaea directory for plugin modules") ++set(DIONAEA_CONFDIR ${CMAKE_INSTALL_FULL_SYSCONFDIR}/dionaea CACHE PATH "Dionaea configuration directory") ++set(DIONAEA_RUNDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run" CACHE PATH "Dionaea /run directory") ++set(DIONAEA_STATEDIR ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/dionaea CACHE PATH "Dionaea directory for storing the status") ++set(DIONAEA_LOGDIR ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/dionaea CACHE PATH "Dionaea log directory") ++set(DIONAEA_PYTHON_SITELIBDIR ${CMAKE_INSTALL_FULL_LIBDIR}/dionaea/python CACHE PATH "Dionaea location of python modules") + + ########### requirements ############### + diff --git a/dionaea-18_python_regex.patch b/dionaea-18_python_regex.patch new file mode 100644 index 0000000..98ea610 --- /dev/null +++ b/dionaea-18_python_regex.patch @@ -0,0 +1,323 @@ +new versions of python 3.9+ new regex patterns defined as raw strings, otherwise report syntax error for unknown stirng escape sequence like \s +Only in dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig: 1.orig +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/doc/source/conf.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/doc/source/conf.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/doc/source/conf.py 2024-07-16 02:09:42.459377247 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/doc/source/conf.py 2024-07-16 02:08:40.881028357 +0200 +@@ -62,7 +62,7 @@ + # The short X.Y version. + version = "undefined" + regex_version = re.compile( +- "^project\s*\([^)]+?\s+VERSION\s+(?P[0-9]+\.[0-9]+\.[0-9]+)$", ++ r"^project\s*\([^)]+?\s+VERSION\s+(?P[0-9]+\.[0-9]+\.[0-9]+)$", + re.MULTILINE|re.DOTALL + ) + data = open("../../CMakeLists.txt", "r").read() +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/cmd.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/cmd.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/cmd.py 2024-07-16 02:09:42.462377264 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/cmd.py 2024-07-16 02:08:40.918028567 +0200 +@@ -29,7 +29,7 @@ + else: + self.send = self.void + self.files = {} +- self.cwd = 'C:\WINDOWS\System32' ++ self.cwd = 'C:\\WINDOWS\\System32' + + + def handle_io_in(self, data): +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/emu_scripts/handler.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/emu_scripts/handler.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/emu_scripts/handler.py 2024-07-16 02:09:42.464377275 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/emu_scripts/handler.py 2024-07-16 02:11:23.762951218 +0200 +@@ -22,7 +22,7 @@ + self._regex_detect = [] + + self._regex_url = re.compile( +- b"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" ++ r"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" + ) + + def run(self, data): +@@ -52,7 +52,7 @@ + self._config = config + + self._regex_url = re.compile( +- b"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" ++ r"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" + ) + + def run(self, data): +@@ -70,13 +70,13 @@ + + self.min_match_count = 2 + self._regex_detect = [ +- re.compile(b"New-Object\s+System\.Net\.WebClient"), +- re.compile(b"DownloadFile([^,]+?,[^,]+?)"), +- re.compile(b"Invoke-Expression([^)]+?)") ++ re.compile(r"New-Object\s+System\.Net\.WebClient"), ++ re.compile(r"DownloadFile([^,]+?,[^,]+?)"), ++ re.compile(r"Invoke-Expression([^)]+?)") + ] + + self._regex_url = re.compile( +- b"\w+\s*=\s*\"\s*(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)\s*\"" ++ r"\w+\s*=\s*\"\s*(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)\s*\"" + ) + + +@@ -88,9 +88,9 @@ + + self.min_match_count = 1 + self._regex_detect = [ +- re.compile(b"Set\s+\w+\s+=\s+CreateObject\(.*?(Msxml2.XMLHTTP|Wscript.Shell).*?\)") ++ re.compile(r"Set\s+\w+\s+=\s+CreateObject\(.*?(Msxml2.XMLHTTP|Wscript.Shell).*?\)") + ] + + self._regex_url = re.compile( +- b"\.Open\s+\"GET\"\s*,\s*\"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)\"" ++ r"\.Open\s+\"GET\"\s*,\s*\"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)\"" + ) +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/memcache/command.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/memcache/command.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/memcache/command.py 2024-07-16 02:09:42.466377287 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/memcache/command.py 2024-07-16 02:08:40.902028476 +0200 +@@ -18,7 +18,7 @@ + + class Decrement(Command): + name = "decr" +- regex_cmd = re.compile(b"^decr (?P\w+) (?P\d+)( (?Pnoreply))?$") ++ regex_cmd = re.compile(r"^decr (?P\w+) (?P\d+)( (?Pnoreply))?$") + + def __init__(self, key=None, value=0, no_reply=False): + self.key = key +@@ -37,7 +37,7 @@ + + class Delete(Command): + name = "delete" +- regex_cmd = re.compile(b"^(?P\w+) (?P\w+)( (?Pnoreply))?$") ++ regex_cmd = re.compile(r"^(?P\w+) (?P\w+)( (?Pnoreply))?$") + + def __init__(self, key=None, no_reply=None): + self.key = key +@@ -73,7 +73,7 @@ + + class Increment(Command): + name = "incr" +- regex_cmd = re.compile(b"^incr (?P\w+) (?P\d+)( (?Pnoreply))?$") ++ regex_cmd = re.compile(r"^incr (?P\w+) (?P\d+)( (?Pnoreply))?$") + + def __init__(self, key=None, value=0, no_reply=False): + self.key = key +@@ -91,7 +91,7 @@ + + + class StorageCommand(Command): +- regex_cmd = re.compile(b"^(?P\w+) (?P\w+) (?P\d+) (?P\d+) (?P\d+)( (?Pnoreply))?") ++ regex_cmd = re.compile(r"^(?P\w+) (?P\w+) (?P\d+) (?P\d+) (?P\d+)( (?Pnoreply))?") + + def __init__(self, key=None, flags=None, exptime=None, byte_count=None, noreply=None): + self.key = key +@@ -171,7 +171,7 @@ + + class Touch(Command): + name = "touch" +- regex_cmd = re.compile(b"^touch (?P\w+) (?P\d+)( (?Pnoreply))?$") ++ regex_cmd = re.compile(r"^touch (?P\w+) (?P\d+)( (?Pnoreply))?$") + + def __init__(self, key=None, exptime=None, no_reply=None): + self.key = key +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/mysql/mysql.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/mysql/mysql.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/mysql/mysql.py 2024-07-16 02:09:42.468377298 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/mysql/mysql.py 2024-07-16 02:13:32.901682889 +0200 +@@ -19,12 +19,12 @@ + logger = logging.getLogger('mysqld') + + re_show_var = re.compile( +- b"show\s+((?Pglobal)\s+)?variables(\s+like\s+(?P\"|')(?P.*?)(?P=sep))?", ++ r"show\s+((?Pglobal)\s+)?variables(\s+like\s+(?P\"|')(?P.*?)(?P=sep))?", + re.I + ) + + re_select_var = re.compile( +- b"select\s+(?P@(?P@)?(?P\w+))(\s+limit\s+\d+)?", ++ r"select\s+(?P@(?P@)?(?P\w+))(\s+limit\s+\d+)?", + re.I + ) + +@@ -42,7 +42,7 @@ + self.config = None + self.state = "" + self.regex_statement = re.compile( +- b"""([A-Za-z0-9_.]+\(.*?\)+|\(.*?\)+|"(?:[^"]|\"|"")*"+|'[^'](?:|\'|'')*'+|`(?:[^`]|``)*`+|[^ ,]+|,)""" ++ r"""([A-Za-z0-9_.]+\(.*?\)+|\(.*?\)+|"(?:[^"]|\"|"")*"+|'[^'](?:|\'|'')*'+|`(?:[^`]|``)*`+|[^ ,]+|,)""" + ) + self.download_dir = None + self.download_suffix = ".tmp" +@@ -146,7 +146,7 @@ + if re.match(b'set ', p.Query, re.I): + r = MySQL_Result_OK(Message="#2") + +- elif re.match(b'select\s+database\s*\(\s*\)$', p.Query, re.I): ++ elif re.match(r'select\s+database\s*\(\s*\)$', p.Query, re.I): + r = [ + MySQL_Result_Header(FieldCount=1), + MySQL_Result_Field( +@@ -167,7 +167,7 @@ + MySQL_Result_EOF(ServerStatus=0x002) + ] + +- elif re.match(b"show\s+databases$", p.Query, re.I): ++ elif re.match(r"show\s+databases$", p.Query, re.I): + r = [ + MySQL_Result_Header(FieldCount=1), + MySQL_Result_Field( +@@ -192,7 +192,7 @@ + # r.append(MySQL_Result_Row_Data(ColumnValues=['information_schema'])) + r.append(MySQL_Result_EOF(ServerStatus=0x002)) + +- elif re.match(b'show\s+tables$', p.Query, re.I): ++ elif re.match(r'show\s+tables$', p.Query, re.I): + r = [ + MySQL_Result_Header(FieldCount=1), + MySQL_Result_Field( +@@ -273,8 +273,8 @@ + if len(query) == 0: + return False + +- regex_function = re.compile(b"(?P[A-Za-z0-9_.]+)\((?P.*?)\)+") +- regex_url = re.compile(b"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)") ++ regex_function = re.compile(r"(?P[A-Za-z0-9_.]+)\((?P.*?)\)+") ++ regex_url = re.compile(r"(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)") + + m = re_select_var.match(p.Query) + if m: +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/sip/extras.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/sip/extras.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/sip/extras.py 2024-07-16 02:09:42.471377315 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/sip/extras.py 2024-07-16 02:08:40.911028527 +0200 +@@ -261,7 +261,7 @@ + sdp = data[0] + for n,v in media_ports.items(): + if v is None: +- sdp = re.sub("\[" + n +"\].*\[\/" + n + "\]", "", sdp, 0, re.DOTALL) ++ sdp = re.sub("\\[" + n +"\\].*\\[\\/" + n + "\\]", "", sdp, 0, re.DOTALL) + else: + params[n] = v + +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/sip/rfc2396.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/sip/rfc2396.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/sip/rfc2396.py 2024-07-16 02:09:42.473377327 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/sip/rfc2396.py 2024-07-16 02:08:40.911028527 +0200 +@@ -28,9 +28,9 @@ + b'"John Doe" ' + """ + _syntax = [ +- re.compile(b'^(?P[a-zA-Z0-9\-\.\_\+\~\ \t]*)<(?P[^>]+)>( *; *(?P.*))?'), +- re.compile(b'^(?:"(?P[a-zA-Z0-9\-\.\_\+\~\ \t]+)")[\ \t]*<(?P[^>]+)>( *; *(?P.*))?'), +- re.compile(b'^[\ \t]*(?P)(?P[^;]+)( *; *(?P.*))?') ++ re.compile(r'^(?P[a-zA-Z0-9\-\.\_\+\~\ \t]*)<(?P[^>]+)>( *; *(?P.*))?'), ++ re.compile(r'^(?:"(?P[a-zA-Z0-9\-\.\_\+\~\ \t]+)")[\ \t]*<(?P[^>]+)>( *; *(?P.*))?'), ++ re.compile(r'^[\ \t]*(?P)(?P[^;]+)( *; *(?P.*))?') + ] + + def __init__(self, display_name = None, uri = None, must_quote = None, params = None): +@@ -128,12 +128,12 @@ + True + """ + +- _syntax = re.compile(b"^(?P[a-zA-Z][a-zA-Z0-9\+\-\.]*):" # scheme +- + b"(?:(?:(?P[a-zA-Z0-9\-\_\.\!\~\*\'\(\)&=\+\$,;\?\/\%]+)" # user +- + b"(?::(?P[^:@;\?]+))?)@)?" # password +- + b"(?:(?:(?P[^;\?:]*)(?::(?P[\d]+))?))" # host, port +- + b"(?:;(?P[^\?]*))?" # parameters +- + b"(?:\?(?P.*))?$" # headers ++ _syntax = re.compile(r"^(?P[a-zA-Z][a-zA-Z0-9\+\-\.]*):" # scheme ++ + r"(?:(?:(?P[a-zA-Z0-9\-\_\.\!\~\*\'\(\)&=\+\$,;\?\/\%]+)" # user ++ + r"(?::(?P[^:@;\?]+))?)@)?" # password ++ + r"(?:(?:(?P[^;\?:]*)(?::(?P[\d]+))?))" # host, port ++ + r"(?:;(?P[^\?]*))?" # parameters ++ + r"(?:\?(?P.*))?$" # headers + ) + + def __init__(self, scheme = None, user = None, password = None, host = None, port = None, params = None, headers = None): +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/sip/rfc3261.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/sip/rfc3261.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/sip/rfc3261.py 2024-07-16 02:09:42.475377338 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/sip/rfc3261.py 2024-07-16 02:08:40.911028527 +0200 +@@ -678,7 +678,7 @@ + b'z9hG4bK77asjd' b'192.0.2.207' + """ + +- _syntax = re.compile(b"SIP */ *2\.0 */ *(?P[a-zA-Z]+) *(?P
[^ :;]*) *(:(?P[0-9]+))?( *; *(?P.*))?") ++ _syntax = re.compile(r"SIP */ *2\.0 */ *(?P[a-zA-Z]+) *(?P
[^ :;]*) *(:(?P[0-9]+))?( *; *(?P.*))?") + + def __init__(self, protocol = None, address = None, port = None, params = None): + if params is None: +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/smb/include/asn1/mib.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/smb/include/asn1/mib.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/smb/include/asn1/mib.py 2024-07-16 02:09:42.478377355 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/smb/include/asn1/mib.py 2024-07-16 02:08:40.913028539 +0200 +@@ -19,12 +19,12 @@ + ## MIB parsing ## + ################# + +-_mib_re_integer = re.compile("^[0-9]+$") +-_mib_re_both = re.compile("^([a-zA-Z_][a-zA-Z0-9_-]*)\(([0-9]+)\)$") ++_mib_re_integer = re.compile(r"^[0-9]+$") ++_mib_re_both = re.compile(r"^([a-zA-Z_][a-zA-Z0-9_-]*)\(([0-9]+)\)$") + _mib_re_oiddecl = re.compile( +- "$\s*([a-zA-Z0-9_-]+)\s+OBJECT([^:\{\}]|\{[^:]+\})+::=\s*\{([^\}]+)\}",re.M) +-_mib_re_strings = re.compile('"[^"]*"') +-_mib_re_comments = re.compile('--.*(\r|\n)') ++ r"$\s*([a-zA-Z0-9_-]+)\s+OBJECT([^:\{\}]|\{[^:]+\})+::=\s*\{([^\}]+)\}",re.M) ++_mib_re_strings = re.compile(r'"[^"]*"') ++_mib_re_comments = re.compile(r'--.*(\r|\n)') + + class MIBDict(DADict): + def _findroot(self, x): +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/smb/include/fieldtypes.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/smb/include/fieldtypes.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/smb/include/fieldtypes.py 2024-07-16 02:09:42.480377366 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/smb/include/fieldtypes.py 2024-07-16 02:08:40.915028550 +0200 +@@ -188,7 +188,7 @@ + def m2i(self, pkt, x): + return str2mac(x) + def any2i(self, pkt, x): +- if type(x) is str and len(x) is 6: ++ if type(x) is str and len(x) == 6: + x = self.m2i(pkt, x) + return x + def i2repr(self, pkt, x): +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/smb/rpcservices.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/smb/rpcservices.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/smb/rpcservices.py 2024-07-16 02:09:42.484377389 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/smb/rpcservices.py 2024-07-16 02:08:40.916028556 +0200 +@@ -2802,7 +2802,7 @@ + + rpclog.debug("docname {} outputfile {}".format(DocName, OutputFile)) + +- if OutputFile.startswith('\\') and OutputFile.endswith('\PIPE\ATSVC'): ++ if OutputFile.startswith('\\\\') and OutputFile.endswith('\\PIPE\\ATSVC'): + # FIXME PIPE ATSVC COMMAND + pass + else: +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/util.py dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/util.py +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/dionaea/util.py 2024-07-16 02:09:42.489377417 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/dionaea/util.py 2024-07-16 02:08:40.918028567 +0200 +@@ -74,14 +74,14 @@ + :return: List of urls or None + """ + from dionaea.core import incident +- regex = re.compile(b"\(\)\s*\t*\{.*;\s*\}\s*;") ++ regex = re.compile(r"\(\)\s*\t*\{.*;\s*\}\s*;") + if not regex.search(data): + return None + logger.debug("Shellshock attack found") + + urls = [] + regex = re.compile( +- b"(wget|curl).+(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" ++ r"(wget|curl).+(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" + ) + for m in regex.finditer(data): + logger.debug("Found download command with url %s", m.group("url")) +@@ -107,7 +107,7 @@ + from dionaea.core import incident + urls = [] + regex = re.compile( +- b"(wget|curl).+(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" ++ r"(wget|curl).+(?P(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)" + ) + for m in regex.finditer(data): + logger.debug("Found download command with url %s", m.group("url")) diff --git a/dionaea-19_setuptools.patch b/dionaea-19_setuptools.patch new file mode 100644 index 0000000..31fc139 --- /dev/null +++ b/dionaea-19_setuptools.patch @@ -0,0 +1,132 @@ +Migrate setup.py from deprecated distutils to setuptools. +Handle the building by cmake from setup.py template processed in cmake build directory. +Newer versions of setuptools complain about using absolute paths in setup. +diff -ru dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/setup.py.in2 dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/setup.py.in2 +--- dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.orig/modules/python/setup.py.in2 2024-07-17 16:08:59.696655429 +0200 ++++ dionaea-4e459f1b672a5b4c1e8335c0bff1b93738019215.new/modules/python/setup.py.in2 2024-07-30 11:32:39.198027455 +0200 +@@ -5,33 +5,46 @@ + # + # SPDX-License-Identifier: GPL-2.0-or-later + +-from distutils.core import setup +-from distutils.extension import Extension +-from distutils.util import convert_path ++from setuptools import setup, find_packages, Extension ++from setuptools.command.install import install as _install ++from setuptools.command.build_ext import build_ext as _build_ext ++ + import os +-from Cython.Distutils import build_ext ++# from Cython.Distutils import build_ext ++ ++# Helper function to get absolute path relative to this file ++def get_abs_path(rel_path): ++ return os.path.abspath(os.path.join(os.path.dirname(__file__), rel_path)) ++ ++def get_rel_path(abs_path): ++ return os.path.relpath(os.path.join(os.path.dirname(__file__), abs_path)) ++ ++# Function to process CMake-style paths ++def process_cmake_path(path): ++ if path.startswith('${CMAKE_CURRENT_SOURCE_DIR}'): ++ return get_rel_path(get_abs_path(path)) ++ return path + ++class CustomBuildExt(_build_ext): ++ def build_extensions(self): ++ if '-Wstrict-prototypes' in self.compiler.compiler_so: ++ self.compiler.compiler_so.remove('-Wstrict-prototypes') ++ super().build_extensions() + +-def find_packages(base_path): +- base_path = convert_path(base_path) +- found = [] +- for root, dirs, files in os.walk(base_path, followlinks=True): +- dirs[:] = [d for d in dirs if d[0] != '.' and d not in ('ez_setup', '__pycache__')] +- relpath = os.path.relpath(root, base_path) +- parent = relpath.replace(os.sep, '.').lstrip('.') +- if relpath != '.' and parent not in found: +- continue +- for dir in dirs: +- if os.path.isfile(os.path.join(root, dir, '__init__.py')): +- package = '.'.join((parent, dir)) if parent else dir +- found.append(package) +- return found ++class CustomInstall(_install): ++ def run(self): ++ _install.run(self) + +-core_cflags = '${GLIB2_CFLAGS};' # glib +-core_cflags += '${GMODULE2_CFLAGS}' # gmodule + +-core_ldflags = '${GLIB2_LDFLAGS};' # glib +-core_ldflags += '${GMODULE2_LDFLAGS}' # gmodule ++print("=== DEBUG: CMAKE_CURRENT_SOURCE_DIR " + "${CMAKE_CURRENT_SOURCE_DIR}") ++ ++# glib ++core_cflags = '${GLIB2_CFLAGS};' ++core_ldflags = '${GLIB2_LDFLAGS};' ++ ++# gmodule ++core_cflags += '${GMODULE2_CFLAGS}' ++core_ldflags += '${GMODULE2_LDFLAGS}' + + core_include_dirs = set() + core_extra_compile_flags = set() +@@ -39,7 +52,7 @@ + if i == '': + continue + elif i.startswith('-I'): +- core_include_dirs.add(i[2:]) ++ core_include_dirs.add(process_cmake_path(i[2:])) + else: + core_extra_compile_flags.add(i) + +@@ -53,15 +66,18 @@ + elif i.startswith('-l'): + core_libraries.add(i[2:]) + elif i.startswith('-L'): +- core_library_dirs.add(i[2:]) ++ core_library_dirs.add(process_cmake_path(i[2:])) + else: + core_library_other_flags.add(i) + +-ext_modules=[ ++ext_modules = [ + Extension("dionaea.core", + ['${CMAKE_CURRENT_SOURCE_DIR}/binding.pyx'], + language="c", +- include_dirs=['${CMAKE_CURRENT_SOURCE_DIR}/../../include', '${CMAKE_CURRENT_SOURCE_DIR}/../../'] + list(core_include_dirs), ++ include_dirs=[ ++ process_cmake_path('${CMAKE_CURRENT_SOURCE_DIR}/../../include'), ++ process_cmake_path('${CMAKE_CURRENT_SOURCE_DIR}/../../') ++ ] + list(core_include_dirs), + extra_compile_args=list(core_extra_compile_flags), + libraries=list(core_libraries), + library_dirs=list(core_library_dirs), +@@ -71,11 +87,20 @@ + ), + ] + ++d_packages = find_packages(process_cmake_path('${CMAKE_CURRENT_SOURCE_DIR}')) ++print("=== DEBUG: d_packages " + str(d_packages)) ++ ++d_dir = {'': process_cmake_path('${CMAKE_CURRENT_SOURCE_DIR}')} ++print("=== DEBUG: d_dir " + str(d_dir)) ++ + setup( +- name = 'dionaea', ++ name='dionaea', + version="${DIONAEA_VERSION}", +- cmdclass = {'build_ext': build_ext}, +- ext_modules = ext_modules, +- packages=find_packages(base_path='${CMAKE_CURRENT_SOURCE_DIR}'), +- package_dir={'': '${CMAKE_CURRENT_SOURCE_DIR}'} ++ cmdclass={ ++ 'build_ext': CustomBuildExt, ++ 'install': CustomInstall, ++ }, ++ ext_modules=ext_modules, ++ packages=d_packages, ++ package_dir=d_dir + ) diff --git a/dionaea.logrotate b/dionaea.logrotate index 6c09b4c..73a40b5 100644 --- a/dionaea.logrotate +++ b/dionaea.logrotate @@ -2,10 +2,9 @@ # in this case -p /opt/dionaea/var/run/dionaea.pid # adjust the path to your needs /var/log/dionaea/dionaea.log /var/log/dionaea/dionaea-errors.log { - notifempty - missingok - rotate 31 daily + rotate 365 + missingok compress delaycompress su dionaea dionaea diff --git a/dionaea.spec b/dionaea.spec index e958951..a5bf2f7 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -1,8 +1,8 @@ Name: dionaea -Version: 0.7.0 +Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 30 +%global baserelease 1 %if 0%{?rhel} # Group needed for EPEL @@ -15,7 +15,7 @@ Group: Applications/System License: GPLv2 with exceptions URL: https://dionaea.readthedocs.io/ # Current source: -# https://github.com/DinoTools/dionaea +VCS: https://github.com/DinoTools/dionaea # Original site (dissappeared in 2013, but still available from archives): # https://dionaea.carnivore.it -> https://web.archive.org/web/20150820080019/https://dionaea.carnivore.it # Another forks: @@ -34,8 +34,8 @@ URL: https://dionaea.readthedocs.io/ # Specification of the used GIT commit %global gituser DinoTools %global gitname dionaea -%global commit 079d014f47a71cc85a86bd836a9a4533e98d7385 -%global gitdate 20180501 +%global commit 4e459f1b672a5b4c1e8335c0bff1b93738019215 +%global gitdate 20210228 %global shortcommit %(c=%{commit}; echo ${c:0:7}) @@ -48,7 +48,7 @@ URL: https://dionaea.readthedocs.io/ # By default build from official release # leave option here to build from git snapshot instead -%bcond_with snapshot +%bcond_without snapshot %if 0%{?with_snapshot} @@ -67,74 +67,60 @@ Source4: %{name}.logrotate -# Use the glib CFLAGS and LDFLAGS during build where necessary -# https://github.com/DinoTools/dionaea/issues/161 -# https://github.com/DinoTools/dionaea/pull/160 -# Merged in in https://github.com/DinoTools/dionaea/commit/1748f3b3936aa1da2d92500251ae8010fe181dfc -# Patch1: dionaea-01_glib.patch - -# Get rid of the warning about not used return value from chdir. -# https://github.com/DinoTools/dionaea/issues/162 -# https://github.com/DinoTools/dionaea/pull/163 -# Merged in in https://github.com/DinoTools/dionaea/commit/ea5d54060af53250abfe3dde9f36af399fa30524 -# Patch2: dionaea-02_warnerror.patch - # ipv6 structures in are used by the # ipv6 structures needs explicit CFLAGS " -D_GNU_SOURCE" to compile on linux -# just cosmetics - not reported yet to upstream +# just cosmetics +# Reported https://github.com/DinoTools/dionaea/pull/343 Patch3: dionaea-03_in6_pktinfo.patch -# Unbundle the pyev library and use the system one -# https://github.com/DinoTools/dionaea/issues/166 -Patch4: dionaea-04_pyev.patch - -# Have a dedicated variable for the python sitelib, so it can be easily changed externally when building the system package. -# https://github.com/DinoTools/dionaea/issues/164 -# https://github.com/DinoTools/dionaea/pull/165 -# Merged in in https://github.com/DinoTools/dionaea/commit/890ae5e85f55130be928b03b751b5f7cd1032f21 -# Patch5: dionaea-05_sitelib.patch - -# Fix warnings during the generation of documentation -# https://github.com/DinoTools/dionaea/issues/170 -# https://github.com/DinoTools/dionaea/pull/179 -Patch6: dionaea-06_docswarn.patch - -# Fix configure not finding the cython on RHEL7/Centos7 -# https://github.com/DinoTools/dionaea/pull/180 -# Merged to upstream with 0.7.0 -# Patch7: dionaea-07_cython_el7.patch # Fix hardcoded lib dir # https://github.com/DinoTools/dionaea/pull/181 -Patch8: dionaea-08_modules_libdir.patch +# https://github.com/DinoTools/dionaea/pull/209 +# Patch8: dionaea-08_modules_libdir.patch -# Call setgroups before setresuid -# https://github.com/DinoTools/dionaea/issues/177 -# https://github.com/DinoTools/dionaea/pull/178 -Patch9: dionaea-09_setgroups_before_setresuid.patch - -# Call chdir before chroot -# https://github.com/DinoTools/dionaea/issues/176 -# https://github.com/DinoTools/dionaea/pull/175 -# Merged upstream in 0.7.0 -# Patch10: dionaea-10_chdir_before_chroot.patch - -# Not use obsolete m4 macros -# https://github.com/DinoTools/dionaea/pull/182 -# Merged upstream in 0.7.0 -# Patch11: dionaea-11_obsolete_m4.patch # Patch to explicitly state the python module version to the setup.py -Patch12: dionaea-12_py_module_version.patch +# Patch12: dionaea-12_py_module_version.patch # Replace deprecated PyUnicode_GetSize with PyUnicode_GetLength -Patch13: dionaea-13_GetSize_deprecated.patch +# Patch13: dionaea-13_GetSize_deprecated.patch # Trying to identify the mole -Patch14: dionaea-14_safe_load.patch +# Patch14: dionaea-14_safe_load.patch -BuildRequires: autoconf -BuildRequires: automake +# Python 3.13 compatibility +# Change PyEval_CallObject to PyObject_CallObject +# Reported https://github.com/DinoTools/dionaea/pull/343 +Patch15: dionaea-15_pyeval_callobject.patch + +# Cmake list APPEND operation is adding unwanted semicolon to CFLAGS +# Reported https://github.com/DinoTools/dionaea/pull/343 +Patch16: dionaea-16_cmake_append_flags.patch + +# Cmake dirs +# Reported https://github.com/DinoTools/dionaea/pull/343 +Patch17: dionaea-17_cmake_dirs.patch + +# A lot of regexes in dionaea project is not declared as raw strings +# python3 tries to resolve the escape sequences +# Reported https://github.com/DinoTools/dionaea/pull/343 +Patch18: dionaea-18_python_regex.patch + +# Switch from distutils to setuptools +# do not install to egg directory +# Reported https://github.com/DinoTools/dionaea/pull/343 +Patch19: dionaea-19_setuptools.patch + + +%if 0%{?fedora} || 0%{?rhel} >= 8 +BuildRequires: cmake +BuildRequires: cmake-rpm-macros +%else +BuildRequires: cmake3 +%endif + +BuildRequires: make BuildRequires: libtool BuildRequires: flex BuildRequires: bison @@ -197,10 +183,9 @@ Requires(postun): initscripts Requires(pre): shadow-utils %description -Dionaea honeypot is meant to be a nepenthes successor, embedding python -as scripting language, using libemu to detect shell-codes, supporting -ipv6 and TLS. - +Dionaea is low interaction honeypot. It is meant to be a nepenthes successor, +embedding python as scripting language, using libemu to detect shell-codes, +supporting ipv6 and TLS. # ============= documentation package ========================================== @@ -211,9 +196,9 @@ BuildArch: noarch %description doc This is documentation for the dionaea honeypot package. -Dionaea honeypot is meant to be a nepenthes successor, embedding python -as scripting language, using libemu to detect shell-codes, supporting -ipv6 and TLS. +Dionaea is low interaction honeypot. It is meant to be a nepenthes successor, +embedding python as scripting language, using libemu to detect shell-codes, +supporting ipv6 and TLS. @@ -223,7 +208,6 @@ Summary: Python3 binding for the dionaea honeypot %{?python_provide:%python_provide python%{python3_pkgversion}-%{gitname}} # Runtime dependencies -Requires: python%{python3_pkgversion}-pyev Requires: python%{python3_pkgversion}-bson Requires: python%{python3_pkgversion}-PyYAML Requires: python%{python3_pkgversion}-scapy @@ -244,106 +228,62 @@ This is a Python3 library that gives access to dionaea honeypot functionality. %autosetup -p 1 -n %{gitname}-%{version} -N %endif -# Re-initialize the git repo, to track changes even on files ignored by the upstream -rm -rf .git -# Remove the .gitignore to prevent ignoring changes in some files -rm -f .gitignore -git init -q -git config user.email "rpmbuild" -git config user.name "rpmbuild" -git add . -git commit -a -m "base" - %autopatch -p 1 # Unbundle the pyev library and use the system one # https://github.com/DinoTools/dionaea/issues/169 rm -rf modules/python/pyev - -# Fix paths - remove the hardcoded prefix /opt/dionaea +# Fix paths: +# - remove the hardcoded prefix /opt/dionaea +# - move /var/dionaea to /var/lib/dionaea according to Linux FHS # https://github.com/DinoTools/dionaea/issues/168 -sed -i -e "s|/opt/dionaea[/]*|/|g;" \ - modules/python/util/readlogsqltree.py \ - modules/python/util/logsql2postgres.py \ +# https://github.com/DinoTools/dionaea/issues/256 +sed -i -e "s|/opt/dionaea[/]*|/|g; s|/var/dionaea|/var/lib/dionaea|g;" \ modules/python/util/gnuplotsql.py \ - modules/python/util/updateccs.py \ - src/dionaea.c \ - vagrant/build.sh - - -# replace in documentation the prefix/destdir /opt/dionaea with variable ${DESTDIR} -# https://github.com/DinoTools/dionaea/issues/168 -sed -i -e "s|/opt/dionaea/var/dionaea|${DESTDIR}/var/lib/dionaea|g;" \ - doc/html/index.html \ - doc/source/tips_and_tricks.rst \ - doc/source/old/configuration.rst \ - doc/source/old/utils.rst \ - modules/python/util/readlogsqltree.py - - -# move /var/dionaea to /var/lib/dionaea according to Linux FHS -# Fedora specific - not reported upstream -sed -i -e "s|/var/dionaea|/var/lib/dionaea|g;" \ modules/python/util/readlogsqltree.py \ - modules/python/util/gnuplotsql.py + doc/source/tips_and_tricks.rst \ + doc/html/index.html \ + doc/source/old/configuration.rst \ + doc/source/old/seagfaults.rst \ + doc/source/old/utils.rst \ + doc/source/run.rst \ + doc/source/tips_and_tricks.rst + # Change var/dionaea to var/lib/dionaea for the location of sip user database sed -i -e "s|var/dionaea|var/lib/dionaea|g;" \ modules/python/dionaea/sip/extras.py -# move /var/dionaea to /var/lib/dionaea according to Linux FHS + +# Scripts should run with /usr/bin/python3 shabang and not /usr/bin/env python3 or /bin/python3 # Fedora specific - not reported upstream -sed -i -e 's|\$(localstatedir)/dionaea/|\$(localstatedir)/lib/dionaea/|g;' \ - Makefile.am - -# move /var/dionaea to /var/lib/dionaea according to Linux FHS -# Fedora specific - not reported upstream -sed -i -e 's|@LOCALESTATEDIR@/dionaea/|@LOCALESTATEDIR@/lib/dionaea/|g;' \ - conf/dionaea.cfg.in \ - conf/ihandlers/fail2ban.yaml.in \ - conf/ihandlers/log_db_sql.yaml.in \ - conf/ihandlers/log_incident.yaml.in \ - conf/ihandlers/log_json.yaml.in \ - conf/ihandlers/log_sqlite.yaml.in \ - conf/ihandlers/virustotal.yaml.in \ - conf/services/sip.yaml.in \ - conf/services/http.yaml.in \ - conf/services/ftp.yaml.in \ - conf/services/tftp.yaml.in \ - conf/services/upnp.yaml.in - -# move the logs from /var/lib/dionaea to /var/log/dionaea -sed -i -e 's|@LOCALESTATEDIR@/lib/dionaea/dionaea.log|@LOCALESTATEDIR@/log/dionaea/dionaea.log|g; - s|@LOCALESTATEDIR@/lib/dionaea/dionaea-errors.log|@LOCALESTATEDIR@/log/dionaea/dionaea-errors.log|g; -' conf/dionaea.cfg.in - -# Change the hardoced minor python3.2 version especially in shabang to python3 -# https://github.com/DinoTools/dionaea/issues/169 -sed -i -e 's|python3.2|python3|g;' \ - m4/az_python.m4 \ - doc/html/index.html \ - modules/python/util/readlogsqltree.py - -# Scripts should run with /usr/bin/python3 shabang and not /bin/python3 -sed -i -e 's|#!/bin/python3|#!/usr/bin/python3|;' \ +sed -i -e 's|#!/bin/python3|#!/usr/bin/python3|g; s|#!/usr/bin/env python3|#!/usr/bin/python3|g;' \ modules/python/util/readlogsqltree.py \ modules/python/util/logsql2postgres.py \ modules/python/util/gnuplotsql.py \ modules/python/util/updateccs.py -git commit -a -m "finished prep" # ============= Build ========================================================== %build -autoreconf -vif -# --disable-werror because of https://github.com/DinoTools/dionaea/issues/225 export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} -%configure --enable-python --with-python=`which python3` --with-glib=glib --with-nl-include=/usr/include/libnl3 --disable-werror -make %{?_smp_mflags} CFLAGS="%{optflags} -Wno-error -D_GNU_SOURCE -std=c99" +# %%configure --enable-python --with-python=`which python3` --with-glib=glib --with-nl-include=/usr/include/libnl3 --disable-werror +# %%make_build CFLAGS="%%{optflags} -Wno-error -D_GNU_SOURCE -std=c99" + +# cmake build with higher parralelism ends up with errors for Fedora +%cmake3 \ + -L \ + -DCMAKE_INSTALL_FULL_SYSCONFDIR:PATH=%{_sysconfdir} \ + -DCMAKE_INSTALL_FULL_LIBDIR:PATH=%{_libdir} \ + -DCMAKE_INSTALL_FULL_LOCALSTATEDIR:PATH=%{_localstatedir} \ + -DDIONAEA_PYTHON_SITELIBDIR:PATH=%{python3_sitearch} + +%cmake3_build -j1 --verbose --verbose + cd doc make html make man @@ -354,22 +294,15 @@ cd .. # ============= Install ======================================================== %install +%cmake3_install + # Use only the sitearch directory, otherwise python will be confused # by not having native and python modules in the same directory -%make_install PYTHON_SITELIB=%{python3_sitearch} PYTHON_SITEARCH=%{python3_sitearch} +# %%make_install PYTHON_SITELIB=%%{python3_sitearch} PYTHON_SITEARCH=%%{python3_sitearch} # *.a *.la files not allowed for fedora find %{buildroot} '(' -name '*.a' -o -name '*.la' ')' -delete -# Fix permissions -chmod -x \ - %{buildroot}%{_sharedstatedir}/%{name}/share/python/http/template/nginx/autoindex.html.j2 \ - %{buildroot}%{_sharedstatedir}/%{name}/share/python/http/template/nginx/error.html.j2 - -# Move dionaea to sbin dir -# TODO - report upstream -mkdir -p %{buildroot}%{_sbindir} -mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name} # Install the manpage # TODO - report upstream @@ -413,6 +346,10 @@ touch %{buildroot}%{_sharedstatedir}/%{name}/dionaea.sqlite touch %{buildroot}%{_sharedstatedir}/%{name}/dionaea_incident.sqlite touch %{buildroot}%{_sharedstatedir}/%{name}/sipaccounts.sqlite +# leave this for the %%license tag +rm -f %{buildroot}/usr/share/doc/dionaea/LICENSE \ + %{buildroot}/usr/share/doc/dionaea/LICENSE.openssl + # ============= Scriptlets ========================================================== @@ -454,15 +391,13 @@ getent passwd dionaea >/dev/null || \ # ============= package files ================================================== %files -%license LICENSE -%doc README.md +%license LICENSE src/LICENSE.openssl +%doc README.md CHANGELOG.rst CONTRIBUTING.rst %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/* %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{_sbindir}/%{name} -%{_bindir}/gnuplotsql -%{_bindir}/readlogsqltree %{_libdir}/%{name}/ %exclude %{_libdir}/%{name}/python.so %{_mandir}/man1/%{name}.1.* @@ -471,11 +406,14 @@ getent passwd dionaea >/dev/null || \ %attr(0750,dionaea,dionaea) %dir %{_sharedstatedir}/%{name}/binaries %attr(0750,dionaea,dionaea) %dir %{_sharedstatedir}/%{name}/bistreams %attr(-,dionaea,dionaea) %{_sharedstatedir}/%{name}/roots/ -%attr(-,dionaea,dionaea) %{_sharedstatedir}/%{name}/share/ %attr(-,dionaea,dionaea) %{_sharedstatedir}/%{name}/dionaea.sqlite %attr(-,dionaea,dionaea) %{_sharedstatedir}/%{name}/dionaea_incident.sqlite %attr(-,dionaea,dionaea) %{_sharedstatedir}/%{name}/sipaccounts.sqlite +%{_sharedstatedir}/%{name}/http +# TODO python utils currently not packed +# %%{_bindir}/gnuplotsql +# %%{_bindir}/readlogsqltree @@ -496,15 +434,14 @@ getent passwd dionaea >/dev/null || \ %files -n python%{python3_pkgversion}-%{gitname} %license LICENSE %doc README.md -%dir %{python3_sitearch}/%{name} %{_libdir}/%{name}/python.so -%{python3_sitearch}/%{name}/* -%{python3_sitearch}/%{name}-*egg-info +%{python3_sitearch}/%{name}* +# %%{python3_sitearch}/%%{name}-*egg-info %changelog -* Wed Jul 17 2024 Fedora Release Engineering - 0.7.0-30 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild +* Thu Jul 04 2024 Michal Ambroz 0.11.0-1 +- bump to 0.11.0 * Fri Jun 07 2024 Python Maint - 0.7.0-29 - Rebuilt for Python 3.13 diff --git a/sources b/sources index 49b9e61..90fe3da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dionaea-0.7.0.tar.gz) = fec39d97ff48f3f72d3e1406c4e6889567d31fe7bf15d7934b23d6fa81d74a7051d3a865019ff5f308f69dbfc29d21d0a98abccdd502261368220ee73a570cf8 +SHA512 (dionaea-0.11.0-4e459f1.tar.gz) = d9f26b2b88d86ff5d94c80f4b0b7a22dcff062ced3cba64b295a1927e39d010d8c8dfc4e6771a1c8ed925955ea9490c50fc8f16d34e6884df24b77f9fc36326b From 8e99a7a9c567f47998c164698d0d8bf2d7a95acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 28 Aug 2024 09:01:08 +0200 Subject: [PATCH 25/34] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- dionaea.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dionaea.spec b/dionaea.spec index a5bf2f7..6ac5791 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 1 +%global baserelease 2 %if 0%{?rhel} # Group needed for EPEL @@ -12,7 +12,8 @@ Group: Applications/System # Dionaea package is licensed with GPLv2 # On top of that it is granting one exception extra - it is permitted by the license # to link modified binary files in the src/ directory against the openssl libraries. -License: GPLv2 with exceptions +# Automatically converted from old format: GPLv2 with exceptions - review is highly recommended. +License: LicenseRef-Callaway-GPLv2-with-exceptions URL: https://dionaea.readthedocs.io/ # Current source: VCS: https://github.com/DinoTools/dionaea @@ -440,6 +441,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Wed Aug 28 2024 Miroslav Suchý - 0.11.0-2.20210228git4e459f1 +- convert license to SPDX + * Thu Jul 04 2024 Michal Ambroz 0.11.0-1 - bump to 0.11.0 From fafe5ac3bdbc0d814718b73a5e6fd54d5247e1f8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 15:47:43 +0000 Subject: [PATCH 26/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 6ac5791..0ca98a0 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 2 +%global baserelease 3 %if 0%{?rhel} # Group needed for EPEL @@ -441,6 +441,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 0.11.0-3.20210228git4e459f1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Aug 28 2024 Miroslav Suchý - 0.11.0-2.20210228git4e459f1 - convert license to SPDX From 4e9bcd791b84686bcf812b61b25a17a8c474e0b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Feb 2025 14:36:24 +0100 Subject: [PATCH 27/34] Add sysusers.d config file to allow rpm to create users/groups automatically See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers. --- dionaea.spec | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/dionaea.spec b/dionaea.spec index 0ca98a0..ba67c70 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 3 +%global baserelease 4 %if 0%{?rhel} # Group needed for EPEL @@ -181,7 +181,6 @@ Requires(preun): initscripts Requires(postun): initscripts %endif -Requires(pre): shadow-utils %description Dionaea is low interaction honeypot. It is meant to be a nepenthes successor, @@ -266,6 +265,11 @@ sed -i -e 's|#!/bin/python3|#!/usr/bin/python3|g; s|#!/usr/bin/env python3|#!/us modules/python/util/gnuplotsql.py \ modules/python/util/updateccs.py +# Create a sysusers.d config file +cat >dionaea.sysusers.conf </dev/null || groupadd -r dionaea || : -getent passwd dionaea >/dev/null || \ - useradd -r -g dionaea -d /home/dionaea -s /sbin/nologin \ - -c "Dionaea honeypot" dionaea || : @@ -423,6 +424,7 @@ getent passwd dionaea >/dev/null || \ %else %{_initrddir}/* %endif +%{_sysusersdir}/dionaea.conf @@ -441,6 +443,9 @@ getent passwd dionaea >/dev/null || \ %changelog +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 0.11.0-4.20210228git4e459f1 +- Add sysusers.d config file to allow rpm to create users/groups automatically + * Thu Jan 16 2025 Fedora Release Engineering - 0.11.0-3.20210228git4e459f1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From d6f4d98fee69c61c0a6d4e3f3f4105537babe6b7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 11:01:08 +0200 Subject: [PATCH 28/34] Rebuilt for Python 3.14 --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index ba67c70..d73008f 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 4 +%global baserelease 5 %if 0%{?rhel} # Group needed for EPEL @@ -443,6 +443,9 @@ install -m0644 -D dionaea.sysusers.conf %{buildroot}%{_sysusersdir}/dionaea.conf %changelog +* Tue Jun 03 2025 Python Maint - 0.11.0-5.20210228git4e459f1 +- Rebuilt for Python 3.14 + * Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 0.11.0-4.20210228git4e459f1 - Add sysusers.d config file to allow rpm to create users/groups automatically From 5d0394e01b81eeac73269899f1d1e0d23743503d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 19:18:06 +0000 Subject: [PATCH 29/34] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index d73008f..d06ee50 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 5 +%global baserelease 6 %if 0%{?rhel} # Group needed for EPEL @@ -443,6 +443,9 @@ install -m0644 -D dionaea.sysusers.conf %{buildroot}%{_sysusersdir}/dionaea.conf %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 0.11.0-6.20210228git4e459f1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue Jun 03 2025 Python Maint - 0.11.0-5.20210228git4e459f1 - Rebuilt for Python 3.14 From c31beedee9aa0a33f013c6fcd164500533292ec8 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Tue, 5 Aug 2025 16:13:01 +0200 Subject: [PATCH 30/34] Fix compatibility with Cython >= 3.1 Fixes: rhbz#2377036 --- dionaea-20_fix_cython3.1_build.patch | 34 ++++++++++++++++++++++++++++ dionaea.spec | 9 +++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 dionaea-20_fix_cython3.1_build.patch diff --git a/dionaea-20_fix_cython3.1_build.patch b/dionaea-20_fix_cython3.1_build.patch new file mode 100644 index 0000000..680cd7a --- /dev/null +++ b/dionaea-20_fix_cython3.1_build.patch @@ -0,0 +1,34 @@ +From f5973bc298b6420456b762b1506f87c2aa524d8b Mon Sep 17 00:00:00 2001 +From: Charalampos Stratakis +Date: Tue, 5 Aug 2025 16:00:47 +0200 +Subject: [PATCH] Replace __pyx_empty_tuple with PyTuple_New(0) + +__pyx_empty_tuple wasn't part of Cython's public API and +the underlying mechanism for generating an empty tuple changed +with Cython 3.1. + +This change ensures that the proper macro is used and makes +dionaea compile with Cython >= 3.1. + +See also: https://github.com/cython/cython/pull/6351 +--- + modules/python/module.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules/python/module.h b/modules/python/module.h +index 726a7892..9b842df9 100644 +--- a/modules/python/module.h ++++ b/modules/python/module.h +@@ -9,9 +9,9 @@ + #include + #include "connection.h" + +-#define PY_CLONE(T) (T)->ob_type->tp_new((T)->ob_type, __pyx_empty_tuple, NULL) +-#define PY_NEW(T) (((PyTypeObject*)(T))->tp_new( (PyTypeObject*)(T), __pyx_empty_tuple, NULL)) +-#define PY_INIT(P, O) (P)->ob_type->tp_init((O), __pyx_empty_tuple, NULL) ++#define PY_CLONE(T) (T)->ob_type->tp_new((T)->ob_type, PyTuple_New(0), NULL) ++#define PY_NEW(T) (((PyTypeObject*)(T))->tp_new( (PyTypeObject*)(T), PyTuple_New(0), NULL)) ++#define PY_INIT(P, O) (P)->ob_type->tp_init((O), PyTuple_New(0), NULL) + #define REFCOUNT(T) printf("obj refcount %i\n", (int)(T)->ob_refcnt) + + #define REMOTE(C) (C)->remote diff --git a/dionaea.spec b/dionaea.spec index d06ee50..d8bcc03 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 6 +%global baserelease 7 %if 0%{?rhel} # Group needed for EPEL @@ -113,6 +113,9 @@ Patch18: dionaea-18_python_regex.patch # Reported https://github.com/DinoTools/dionaea/pull/343 Patch19: dionaea-19_setuptools.patch +# Fix compatibility with Cython >= 3.1 +# Reported https://github.com/DinoTools/dionaea/pull/345 +Patch20: dionaea-20_fix_cython3.1_build.patch %if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: cmake @@ -443,6 +446,10 @@ install -m0644 -D dionaea.sysusers.conf %{buildroot}%{_sysusersdir}/dionaea.conf %changelog +* Tue Aug 05 2025 Charalampos Stratakis - 0.11.0-7.20210228git4e459f1 +- Fix compatibility with Cython >= 3.1 +- Fixes: rhbz#2377036 + * Wed Jul 23 2025 Fedora Release Engineering - 0.11.0-6.20210228git4e459f1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 694c651cecb358ddbad9f33b52eda2ebbc49f15b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:44:17 +0200 Subject: [PATCH 31/34] Rebuilt for Python 3.14.0rc2 bytecode --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index d8bcc03..41edaf5 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 7 +%global baserelease 8 %if 0%{?rhel} # Group needed for EPEL @@ -446,6 +446,9 @@ install -m0644 -D dionaea.sysusers.conf %{buildroot}%{_sysusersdir}/dionaea.conf %changelog +* Fri Aug 15 2025 Python Maint - 0.11.0-8.20210228git4e459f1 +- Rebuilt for Python 3.14.0rc2 bytecode + * Tue Aug 05 2025 Charalampos Stratakis - 0.11.0-7.20210228git4e459f1 - Fix compatibility with Cython >= 3.1 - Fixes: rhbz#2377036 From af5f7085790d980ea8a3c5b3168bed1b4a908fa8 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:13:45 +0200 Subject: [PATCH 32/34] Rebuilt for Python 3.14.0rc3 bytecode --- dionaea.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dionaea.spec b/dionaea.spec index 41edaf5..e1e2a91 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -2,7 +2,7 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot # Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 8 +%global baserelease 9 %if 0%{?rhel} # Group needed for EPEL @@ -446,6 +446,9 @@ install -m0644 -D dionaea.sysusers.conf %{buildroot}%{_sysusersdir}/dionaea.conf %changelog +* Fri Sep 19 2025 Python Maint - 0.11.0-9.20210228git4e459f1 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 0.11.0-8.20210228git4e459f1 - Rebuilt for Python 3.14.0rc2 bytecode From 06e0ec06b24dc589576e1d3db7315acde3819adf Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Wed, 19 Nov 2025 14:07:54 +0100 Subject: [PATCH 33/34] adding changelog --- changelog | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..e1c6d04 --- /dev/null +++ b/changelog @@ -0,0 +1,163 @@ +* Fri Sep 19 2025 Python Maint - 0.11.0-9.20210228git4e459f1 +- Rebuilt for Python 3.14.0rc3 bytecode + +* Fri Aug 15 2025 Python Maint - 0.11.0-8.20210228git4e459f1 +- Rebuilt for Python 3.14.0rc2 bytecode + +* Tue Aug 05 2025 Charalampos Stratakis - 0.11.0-7.20210228git4e459f1 +- Fix compatibility with Cython >= 3.1 +- Fixes: rhbz#2377036 + +* Wed Jul 23 2025 Fedora Release Engineering - 0.11.0-6.20210228git4e459f1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Jun 03 2025 Python Maint - 0.11.0-5.20210228git4e459f1 +- Rebuilt for Python 3.14 + +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 0.11.0-4.20210228git4e459f1 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Thu Jan 16 2025 Fedora Release Engineering - 0.11.0-3.20210228git4e459f1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Aug 28 2024 Miroslav Suchý - 0.11.0-2.20210228git4e459f1 +- convert license to SPDX + +* Thu Jul 04 2024 Michal Ambroz 0.11.0-1 +- bump to 0.11.0 + +* Fri Jun 07 2024 Python Maint - 0.7.0-29 +- Rebuilt for Python 3.13 + +* Mon Mar 25 2024 Nils Philippsen - 0.7.0-28 +- Revert constraining SQLAlchemy version + +* Tue Mar 19 2024 Nils Philippsen - 0.7.0-27 +- Add dependency on setuptools Python package + +* Tue Mar 19 2024 Nils Philippsen - 0.7.0-26 +- Depend on SQLAlchemy < 2 + +* Wed Jan 24 2024 Fedora Release Engineering - 0.7.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 0.7.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Oct 05 2023 Michal Ambroz 0.7.0-22 +- add version metadata to the python module to fix FTBFS + +* Sun Jul 23 2023 Python Maint - 0.7.0-21 +- Rebuilt for Python 3.12 + +* Wed Jul 19 2023 Fedora Release Engineering - 0.7.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 0.7.0-19 +- Rebuilt for Python 3.12 + +* Thu Jan 19 2023 Fedora Release Engineering - 0.7.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 0.7.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.7.0-16 +- Rebuilt for Python 3.11 + +* Thu Jan 20 2022 Fedora Release Engineering - 0.7.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Sep 14 2021 Sahana Prasad - 0.7.0-14 +- Rebuilt with OpenSSL 3.0.0 + +* Wed Jul 21 2021 Fedora Release Engineering - 0.7.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.7.0-12 +- Rebuilt for Python 3.10 + +* Tue Jan 26 2021 Fedora Release Engineering - 0.7.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 0.7.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.7.0-9 +- Rebuilt for Python 3.9 + +* Tue Jan 28 2020 Fedora Release Engineering - 0.7.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 24 2019 Michal Ambroz 0.7.0-7 +- switch to glib2 based on #1766678 to modernize and prepare for epel8 + +* Thu Oct 24 2019 Michal Ambroz 0.7.0-6 +- rebuilt rawhide after ressurection of libdasm/libemu + +* Mon Aug 19 2019 Miro Hrončok - 0.7.0-5.3 +- Rebuilt for Python 3.8 + +* Wed Jul 24 2019 Fedora Release Engineering - 0.7.0-5.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 0.7.0-5.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jul 30 2018 Adam Williamson - 0.7.0-5 +- Disable -Werror to fix build (see upstream #225) + +* Thu Jul 12 2018 Fedora Release Engineering - 0.7.0-4.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 0.7.0-4.1 +- Rebuilt for Python 3.7 + +* Mon Jun 18 2018 Michal Ambroz 0.7.0-4 +- anothe improvement of logrotate script +- add the empty files for dionaea.sqlite dionaea_incident.sqlite sipaccounts.sqlite + +* Mon Jun 04 2018 Michal Ambroz 0.7.0-3 +- fix logrotate script +- use the current version of openssl (needs to be same as curllib is using) + +* Thu May 10 2018 Michal Ambroz 0.7.0-1 +- bump to release 0.7.0 + +* Mon May 07 2018 Michal Ambroz 0.6.0-10.20180326git1748f3b +- cosmetics, changing description in the systemd service + +* Mon Apr 30 2018 Michal Ambroz 0.6.0-9.20180326git1748f3b +- add runtime python dependencies +- fix location of sip user database + +* Mon Apr 30 2018 Iryna Shcherbina - 0.6.0-8.20180326git1748f3b +- Fix condition for python-sphinx on Fedora + +* Fri Apr 20 2018 Michal Ambroz 0.6.0-7.20180326git1748f3b +- fix the link creation to python core library + +* Mon Apr 09 2018 Michal Ambroz 0.6.0-6.20180326git1748f3b +- fix log rotation, move the logs to /var/log/dionaea +- create user dionaea:dionaea +- grant shared stare dir/files to the dionaea user account + +* Mon Apr 09 2018 Michal Ambroz 0.6.0-5.20180326git1748f3b +- clean-up based on review in #1564716 + +* Fri Apr 06 2018 Michal Ambroz 0.6.0-4.20180326git1748f3b +- update to current git snapshot, add logrotate and service files + +* Wed Mar 21 2018 Michal Ambroz 0.6.0-3.20180313gitd2efb76 +- fix openssl dependency for EPEL7 build + +* Wed Mar 21 2018 Michal Ambroz 0.6.0-2.20180313gitd2efb76 +- bump to commit d2efb768e753a7f1ddca6dbf402548d741f33574 +- unbundle pyev and refer to system-installed pyev +- remove the hardcoded default prefix /opt/dionaea +- move from /var/dionaea to /var/lib/dionaea +- fix the doc generation warnings + +* Thu Dec 28 2017 Michal Ambroz 0.6.0-1 +- initial package + From bc734d6c6dab3bcbf60a593b552859d8fecb9752 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Wed, 19 Nov 2025 14:13:00 +0100 Subject: [PATCH 34/34] switch to autorelease autochangelog --- dionaea.spec | 172 ++------------------------------------------------- 1 file changed, 4 insertions(+), 168 deletions(-) diff --git a/dionaea.spec b/dionaea.spec index e1e2a91..99687ff 100644 --- a/dionaea.spec +++ b/dionaea.spec @@ -1,8 +1,6 @@ Name: dionaea Version: 0.11.0 Summary: Low interaction honeypot -# Show as the RPM release number (keep same number line for tarball and git builds) -%global baserelease 9 %if 0%{?rhel} # Group needed for EPEL @@ -16,7 +14,7 @@ Group: Applications/System License: LicenseRef-Callaway-GPLv2-with-exceptions URL: https://dionaea.readthedocs.io/ # Current source: -VCS: https://github.com/DinoTools/dionaea +VCS: git:https://github.com/DinoTools/dionaea # Original site (dissappeared in 2013, but still available from archives): # https://dionaea.carnivore.it -> https://web.archive.org/web/20150820080019/https://dionaea.carnivore.it # Another forks: @@ -54,10 +52,10 @@ VCS: https://github.com/DinoTools/dionaea %if 0%{?with_snapshot} # not using 0. on the beginning of release as this git snapshot is past the 0.7.0 release -Release: %{baserelease}.%{gitdate}git%{shortcommit}%{?dist} +Release: %autorelease -s %{gitdate}git%{shortcommit} Source0: https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz %else -Release: %{baserelease}%{?dist} +Release: %autorelease Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz %endif @@ -446,166 +444,4 @@ install -m0644 -D dionaea.sysusers.conf %{buildroot}%{_sysusersdir}/dionaea.conf %changelog -* Fri Sep 19 2025 Python Maint - 0.11.0-9.20210228git4e459f1 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Fri Aug 15 2025 Python Maint - 0.11.0-8.20210228git4e459f1 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Tue Aug 05 2025 Charalampos Stratakis - 0.11.0-7.20210228git4e459f1 -- Fix compatibility with Cython >= 3.1 -- Fixes: rhbz#2377036 - -* Wed Jul 23 2025 Fedora Release Engineering - 0.11.0-6.20210228git4e459f1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Tue Jun 03 2025 Python Maint - 0.11.0-5.20210228git4e459f1 -- Rebuilt for Python 3.14 - -* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 0.11.0-4.20210228git4e459f1 -- Add sysusers.d config file to allow rpm to create users/groups automatically - -* Thu Jan 16 2025 Fedora Release Engineering - 0.11.0-3.20210228git4e459f1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Aug 28 2024 Miroslav Suchý - 0.11.0-2.20210228git4e459f1 -- convert license to SPDX - -* Thu Jul 04 2024 Michal Ambroz 0.11.0-1 -- bump to 0.11.0 - -* Fri Jun 07 2024 Python Maint - 0.7.0-29 -- Rebuilt for Python 3.13 - -* Mon Mar 25 2024 Nils Philippsen - 0.7.0-28 -- Revert constraining SQLAlchemy version - -* Tue Mar 19 2024 Nils Philippsen - 0.7.0-27 -- Add dependency on setuptools Python package - -* Tue Mar 19 2024 Nils Philippsen - 0.7.0-26 -- Depend on SQLAlchemy < 2 - -* Wed Jan 24 2024 Fedora Release Engineering - 0.7.0-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 0.7.0-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Oct 05 2023 Michal Ambroz 0.7.0-22 -- add version metadata to the python module to fix FTBFS - -* Sun Jul 23 2023 Python Maint - 0.7.0-21 -- Rebuilt for Python 3.12 - -* Wed Jul 19 2023 Fedora Release Engineering - 0.7.0-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jun 14 2023 Python Maint - 0.7.0-19 -- Rebuilt for Python 3.12 - -* Thu Jan 19 2023 Fedora Release Engineering - 0.7.0-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Thu Jul 21 2022 Fedora Release Engineering - 0.7.0-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 0.7.0-16 -- Rebuilt for Python 3.11 - -* Thu Jan 20 2022 Fedora Release Engineering - 0.7.0-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Sep 14 2021 Sahana Prasad - 0.7.0-14 -- Rebuilt with OpenSSL 3.0.0 - -* Wed Jul 21 2021 Fedora Release Engineering - 0.7.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.7.0-12 -- Rebuilt for Python 3.10 - -* Tue Jan 26 2021 Fedora Release Engineering - 0.7.0-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 0.7.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 0.7.0-9 -- Rebuilt for Python 3.9 - -* Tue Jan 28 2020 Fedora Release Engineering - 0.7.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Oct 24 2019 Michal Ambroz 0.7.0-7 -- switch to glib2 based on #1766678 to modernize and prepare for epel8 - -* Thu Oct 24 2019 Michal Ambroz 0.7.0-6 -- rebuilt rawhide after ressurection of libdasm/libemu - -* Mon Aug 19 2019 Miro Hrončok - 0.7.0-5.3 -- Rebuilt for Python 3.8 - -* Wed Jul 24 2019 Fedora Release Engineering - 0.7.0-5.2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu Jan 31 2019 Fedora Release Engineering - 0.7.0-5.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jul 30 2018 Adam Williamson - 0.7.0-5 -- Disable -Werror to fix build (see upstream #225) - -* Thu Jul 12 2018 Fedora Release Engineering - 0.7.0-4.2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 19 2018 Miro Hrončok - 0.7.0-4.1 -- Rebuilt for Python 3.7 - -* Mon Jun 18 2018 Michal Ambroz 0.7.0-4 -- anothe improvement of logrotate script -- add the empty files for dionaea.sqlite dionaea_incident.sqlite sipaccounts.sqlite - -* Mon Jun 04 2018 Michal Ambroz 0.7.0-3 -- fix logrotate script -- use the current version of openssl (needs to be same as curllib is using) - -* Thu May 10 2018 Michal Ambroz 0.7.0-1 -- bump to release 0.7.0 - -* Mon May 07 2018 Michal Ambroz 0.6.0-10.20180326git1748f3b -- cosmetics, changing description in the systemd service - -* Mon Apr 30 2018 Michal Ambroz 0.6.0-9.20180326git1748f3b -- add runtime python dependencies -- fix location of sip user database - -* Mon Apr 30 2018 Iryna Shcherbina - 0.6.0-8.20180326git1748f3b -- Fix condition for python-sphinx on Fedora - -* Fri Apr 20 2018 Michal Ambroz 0.6.0-7.20180326git1748f3b -- fix the link creation to python core library - -* Mon Apr 09 2018 Michal Ambroz 0.6.0-6.20180326git1748f3b -- fix log rotation, move the logs to /var/log/dionaea -- create user dionaea:dionaea -- grant shared stare dir/files to the dionaea user account - -* Mon Apr 09 2018 Michal Ambroz 0.6.0-5.20180326git1748f3b -- clean-up based on review in #1564716 - -* Fri Apr 06 2018 Michal Ambroz 0.6.0-4.20180326git1748f3b -- update to current git snapshot, add logrotate and service files - -* Wed Mar 21 2018 Michal Ambroz 0.6.0-3.20180313gitd2efb76 -- fix openssl dependency for EPEL7 build - -* Wed Mar 21 2018 Michal Ambroz 0.6.0-2.20180313gitd2efb76 -- bump to commit d2efb768e753a7f1ddca6dbf402548d741f33574 -- unbundle pyev and refer to system-installed pyev -- remove the hardcoded default prefix /opt/dionaea -- move from /var/dionaea to /var/lib/dionaea -- fix the doc generation warnings - -* Thu Dec 28 2017 Michal Ambroz 0.6.0-1 -- initial package - +%autochangelog