Merge pull request #22280 from dynasticorpheus/irssi-1.4.5
authorAlexandru Ardelean <alex@shruggie.ro>
Tue, 3 Oct 2023 17:20:09 +0000 (20:20 +0300)
committerGitHub <noreply@github.com>
Tue, 3 Oct 2023 17:20:09 +0000 (20:20 +0300)
irssi: update to 1.4.5

23 files changed:
lang/python/python-cffi/Makefile
lang/python/python-cffi/patches/001-unpin-setuptools.patch [new file with mode: 0644]
lang/python/python-cffi/test.sh [new file with mode: 0644]
lang/python/python-charset-normalizer/Makefile
lang/python/python-charset-normalizer/test.sh [new file with mode: 0644]
net/adblock-fast/Makefile
net/adblock-fast/files/etc/init.d/adblock-fast
net/aircrack-ng/Makefile
net/aircrack-ng/patches/100-01-autotools-add-PCRE2-detection.patch [new file with mode: 0644]
net/aircrack-ng/patches/100-02-airodump-ng-add-PCRE2-support.patch [new file with mode: 0644]
net/aircrack-ng/patches/100-03-besside-ng-add-PCRE2-support.patch [new file with mode: 0644]
net/aircrack-ng/patches/100-04-makefile-add-PCRE2-to-linker-flags.patch [new file with mode: 0644]
net/aircrack-ng/patches/100-05-airodump-ng-dump_write-remove-unused-PCRE-include.patch [new file with mode: 0644]
net/aircrack-ng/patches/100-07-compat-pcre-add-compat-type-PCRE-header.patch [new file with mode: 0644]
net/aircrack-ng/patches/100-08-airodump-ng-utilize-compat-pcre.patch [new file with mode: 0644]
net/aircrack-ng/patches/100-09-besside-ng-utilize-compat-pcre.patch [new file with mode: 0644]
net/aircrack-ng/patches/101-02-src-makefile-add-PCRE2_CFLAGS-to-airodump-and-bessid.patch [new file with mode: 0644]
net/aircrack-ng/patches/101-03-lib-makefile-add-PCRE2-to-libaccrypto-and-libaircrac.patch [new file with mode: 0644]
net/aircrack-ng/patches/102-autotools-indicate-if-PCRE-or-PCRE2-is-being-used.patch [new file with mode: 0644]
net/aircrack-ng/patches/103-autotools-reset-PCRE-CFLAGS-LIBS-with-both-PCRE-and-.patch [new file with mode: 0644]
net/atftp/Makefile
utils/prometheus-node-exporter-lua/Makefile
utils/yq/Makefile

index b14ef8099e94b79911ce05fbb1d79a1cc3cc4e1c..74020d159cda1c869348bcb2ae68ebe1a022f864 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cffi
-PKG_VERSION:=1.15.1
+PKG_VERSION:=1.16.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=cffi
-PKG_HASH:=d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9
+PKG_HASH:=bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
@@ -40,6 +40,7 @@ define Package/python3-cffi
   DEPENDS:= \
       +libffi \
       +python3-light \
+      +python3-ctypes \
       +python3-pycparser
 endef
 
diff --git a/lang/python/python-cffi/patches/001-unpin-setuptools.patch b/lang/python/python-cffi/patches/001-unpin-setuptools.patch
new file mode 100644 (file)
index 0000000..bf2774f
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -2,6 +2,6 @@
+ requires = [
+     # first version that supports Python 3.12; older versions may work
+     # with previous Python versions, but are not tested
+-    "setuptools >= 66.1"
++    "setuptools"
+ ]
+ build-backend = "setuptools.build_meta"
diff --git a/lang/python/python-cffi/test.sh b/lang/python/python-cffi/test.sh
new file mode 100644 (file)
index 0000000..48ea3ad
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+[ "$1" = python3-cffi ] || exit 0
+
+python3 - << EOF
+from cffi import FFI
+ffibuilder = FFI()
+EOF
index 7a2e4ee076b874b826ffbb6f8e91284ac5b2329c..6e88357d22a0b9b16a2548116f39a3f82e5558a1 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-charset-normalizer
-PKG_VERSION:=3.2.0
+PKG_VERSION:=3.3.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=charset-normalizer
-PKG_HASH:=3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace
+PKG_HASH:=63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
diff --git a/lang/python/python-charset-normalizer/test.sh b/lang/python/python-charset-normalizer/test.sh
new file mode 100644 (file)
index 0000000..b1b2f79
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ "$1" = python3-charset-normalizer ] || exit 0
+
+python3 - << EOF
+import sys
+from charset_normalizer import from_bytes
+s = 'Bсеки човек има право на образование.'
+byte_str = s.encode('cp1251')
+result = from_bytes(byte_str).best()
+sys.exit(0 if str(result) == s else 1)
+EOF
index 23ec3acad3e34eef9c415114fc95d0a7c7e097fd..bd7ad9845b6b0c8b4fa736ca65c693160311ba68 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock-fast
 PKG_VERSION:=1.0.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
 PKG_LICENSE:=GPL-3.0-or-later
 
index b0ce905033312eabcc415279afa5a328cd40e32f..f885bd105214491e3d852983e7eefc9ef446a924 100755 (executable)
@@ -64,8 +64,9 @@ readonly sharedMemoryError="/dev/shm/$packageName-error"
 readonly hostsFilter='/localhost/d;/^#/d;/^[^0-9]/d;s/^0\.0\.0\.0.//;s/^127\.0\.0\.1.//;s/[[:space:]]*#.*$//;s/[[:cntrl:]]$//;s/[[:space:]]//g;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
 readonly domainsFilter='/^#/d;s/[[:space:]]*#.*$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
 readonly adBlockPlusFilter='/^#/d;/^!/d;s/[[:space:]]*#.*$//;s/^||//;s/\^$//;s/[[:space:]]*$//;s/[[:cntrl:]]$//;/[[:space:]]/d;/[`~!@#\$%\^&\*()=+;:"'\'',<>?/\|[{}]/d;/]/d;/\./!d;/^$/d;/[^[:alnum:]_.-]/d;'
-readonly dnsmasqFileFilter='\|^server=/[[:alnum:]_.-].*/|!d'
-readonly dnsmasq2FileFilter='\|^local=/[[:alnum:]_.-].*/|!d'
+readonly dnsmasqFileFilter='\|^server=/[[:alnum:]_.-].*/|!d;s|server=/||;s|/.*$||'
+readonly dnsmasq2FileFilter='\|^local=/[[:alnum:]_.-].*/|!d;s|local=/||;s|/.*$||'
+readonly dnsmasq3FileFilter='\|^address=/[[:alnum:]_.-].*/|!d;s|address=/||;s|/.*$||'
 readonly _OK_='\033[0;32m\xe2\x9c\x93\033[0m'
 readonly _FAIL_='\033[0;31m\xe2\x9c\x97\033[0m'
 readonly __OK__='\033[0;32m[\xe2\x9c\x93]\033[0m'
@@ -279,6 +280,8 @@ append_url() {
                echo 'dnsmasq'
        elif grep -q '^local=' "$file"; then
                echo 'dnsmasq2'
+       elif grep -q '^address=' "$file"; then
+               echo 'dnsmasq3'
        elif grep -q '^0.0.0.0' "$file" || grep -q '^127.0.0.1' "$file"; then
                echo 'hosts'
        elif [ -n "$(sed "$domainsFilter" "$file" | head -1)" ]; then
@@ -868,6 +871,7 @@ process_file_url() {
                        adblockplus) filter="$adBlockPlusFilter";;
                        dnsmasq) filter="$dnsmasqFileFilter";;
                        dnsmasq2) filter="$dnsmasq2FileFilter";;
+                       dnsmasq3) filter="$dnsmasq3FileFilter";;
                        domains) filter="$domainsFilter";;
                        hosts) filter="$hostsFilter";;
                        *)
@@ -878,7 +882,9 @@ process_file_url() {
                                return 0
                        ;;
                esac
-               sed -i "$filter" "$R_TMP"
+               if [ -n "$filter" ] && [ "$action" != 'file' ]; then
+                       sed -i "$filter" "$R_TMP"
+               fi
                if [ ! -s "$R_TMP" ]; then
                        output 1 "$_FAIL_"
                        output 2 "[DL] $type $label ($format) $__FAIL__\\n"
@@ -1038,15 +1044,16 @@ $(cat $A_TMP)"
                mv "$A_TMP" "$B_TMP"
        fi
 
-       output 2 'Allowing domains '
-       json set message "$(get_text "statusProcessing"): allowing domains"
-       if sed -i -E "$allow_filter" "$B_TMP"; then
-               output_ok
-       else
-               output_failn
-               json add error "errorAllowListProcessing"
+       if [ -n "$allow_filter" ]; then
+               output 2 'Allowing domains '
+               json set message "$(get_text "statusProcessing"): allowing domains"
+               if sed -i -E "$allow_filter" "$B_TMP"; then
+                       output_ok
+               else
+                       output_failn
+                       json add error "errorAllowListProcessing"
+               fi
        fi
-
        output 2 'Formatting merged file '
        json set message "$(get_text "statusProcessing"): formatting merged file"
        if [ -z "$outputFilterIPv6" ]; then
index 1323a0e6b86e03d0cf0d8d5a7bf6fe6633ad170a..70a13a0d4633f4bcfad3a01d2aa6fbb11f784254 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=aircrack-ng
-PKG_VERSION:=1.6
-PKG_RELEASE:=3
+PKG_VERSION:=1.7
+PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:aircrack-ng:aircrack-ng
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.aircrack-ng.org/
-PKG_HASH:=4f0bfd486efc6ea7229f7fbc54340ff8b2094a0d73e9f617e0a39f878999a247
+PKG_HASH:=05a704e3c8f7792a17315080a21214a4448fd2452c1b0dd5226a3a55f90b58c3
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -40,7 +40,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/aircrack-ng
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread +libstdcpp
+  DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre2 +libpthread +libstdcpp
   DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
   DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
   DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
diff --git a/net/aircrack-ng/patches/100-01-autotools-add-PCRE2-detection.patch b/net/aircrack-ng/patches/100-01-autotools-add-PCRE2-detection.patch
new file mode 100644 (file)
index 0000000..95079ef
--- /dev/null
@@ -0,0 +1,94 @@
+From 6b05dc10cdcf45d50bc8f9dd74667a3ff399a059 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:52:12 +0100
+Subject: [PATCH 1/9] autotools: add PCRE2 detection
+
+---
+ build/m4/aircrack_ng_pcre2.m4 | 61 +++++++++++++++++++++++++++++++++++
+ configure.ac                  |  2 ++
+ 2 files changed, 63 insertions(+)
+ create mode 100644 build/m4/aircrack_ng_pcre2.m4
+
+--- /dev/null
++++ b/build/m4/aircrack_ng_pcre2.m4
+@@ -0,0 +1,61 @@
++dnl Aircrack-ng
++dnl
++dnl Copyright (C) 2023 Andras Gemes <andrasgemes@outlook.com>
++dnl
++dnl Autotool support was written by: Joseph Benden <joe@benden.us>
++dnl
++dnl This program is free software; you can redistribute it and/or modify
++dnl it under the terms of the GNU General Public License as published by
++dnl the Free Software Foundation; either version 2 of the License, or
++dnl (at your option) any later version.
++dnl
++dnl This program is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++dnl GNU General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU General Public License
++dnl along with this program; if not, write to the Free Software
++dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
++dnl
++dnl In addition, as a special exception, the copyright holders give
++dnl permission to link the code of portions of this program with the
++dnl OpenSSL library under certain conditions as described in each
++dnl individual source file, and distribute linked combinations
++dnl including the two.
++dnl
++dnl You must obey the GNU General Public License in all respects
++dnl for all of the code used other than OpenSSL.
++dnl
++dnl If you modify file(s) with this exception, you may extend this
++dnl exception to your dnl version of the file(s), but you are not obligated
++dnl to do so.
++dnl
++dnl If you dnl do not wish to do so, delete this exception statement from your
++dnl version.
++dnl
++dnl If you delete this exception statement from all source files in the
++dnl program, then also delete it here.
++
++AC_DEFUN([AIRCRACK_NG_PCRE2], [
++AC_ARG_ENABLE(static-pcre2,
++    AS_HELP_STRING([--enable-static-pcre2],
++              [Enable statically linked PCRE2 libpcre2-8.]),
++    [static_pcre2=$enableval], [static_pcre2=no])
++
++if test "x$static_pcre2" != "xno"; then
++      AC_REQUIRE([AX_EXT_HAVE_STATIC_LIB_DETECT])
++      AX_EXT_HAVE_STATIC_LIB(PCRE2, ${DEFAULT_STATIC_LIB_SEARCH_PATHS}, pcre2 libpcre2-8, pcre2_version)
++      if test "x$PCRE2_FOUND" = xyes; then
++              HAVE_PCRE2=yes
++      else
++              HAVE_PCRE2=no
++      fi
++else
++      PKG_CHECK_MODULES(PCRE2, libpcre2-8, HAVE_PCRE2=yes, HAVE_PCRE2=no)
++fi
++
++AS_IF([test "x$HAVE_PCRE2" = "xyes"], [
++    AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
++])
++])
+\ No newline at end of file
+--- a/configure.ac
++++ b/configure.ac
+@@ -144,6 +144,7 @@ AIRCRACK_NG_EXT_SCRIPTS
+ AIRCRACK_NG_HWLOC
+ AIRCRACK_NG_PCAP
+ AIRCRACK_NG_PCRE
++AIRCRACK_NG_PCRE2
+ AIRCRACK_NG_RFKILL
+ AIRCRACK_NG_SQLITE
+ AIRCRACK_NG_ZLIB
+@@ -320,6 +321,7 @@ ${PACKAGE} ${VERSION}
+     Jemalloc:                    ${JEMALLOC}
+     Pcap:                        ${PCAP_FOUND}
+     Pcre:                        ${HAVE_PCRE}
++    Pcre2:                       ${HAVE_PCRE2}
+     Sqlite:                      ${HAVE_SQLITE3}
+     Tcmalloc:                    ${TCMALLOC}
+     Zlib:                        ${HAVE_ZLIB}
diff --git a/net/aircrack-ng/patches/100-02-airodump-ng-add-PCRE2-support.patch b/net/aircrack-ng/patches/100-02-airodump-ng-add-PCRE2-support.patch
new file mode 100644 (file)
index 0000000..63210b6
--- /dev/null
@@ -0,0 +1,142 @@
+From 37bc38a1749f61f3e54dbebca7b33df844b6de82 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:53:59 +0100
+Subject: [PATCH 2/9] airodump-ng: add PCRE2 support
+
+---
+ src/airodump-ng/airodump-ng.c | 75 +++++++++++++++++++++++++++++++----
+ 1 file changed, 67 insertions(+), 8 deletions(-)
+
+--- a/src/airodump-ng/airodump-ng.c
++++ b/src/airodump-ng/airodump-ng.c
+@@ -68,7 +68,10 @@
+ #include <sys/wait.h>
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
++#elif defined HAVE_PCRE
+ #include <pcre.h>
+ #endif
+@@ -150,7 +153,10 @@ static struct local_options
+       unsigned char prev_bssid[6];
+       char ** f_essid;
+       int f_essid_count;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      pcre2_code * f_essid_regex;
++      pcre2_match_data * f_essid_match_data;
++#elif defined HAVE_PCRE
+       pcre * f_essid_regex;
+ #endif
+       char * dump_prefix;
+@@ -784,7 +790,7 @@ static const char usage[] =
+       "      --netmask <netmask>   : Filter APs by mask\n"
+       "      --bssid     <bssid>   : Filter APs by BSSID\n"
+       "      --essid     <essid>   : Filter APs by ESSID\n"
+-#ifdef HAVE_PCRE
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+       "      --essid-regex <regex> : Filter APs by ESSID using a regular\n"
+       "                              expression\n"
+ #endif
+@@ -857,7 +863,22 @@ int is_filtered_essid(const uint8_t * es
+               ret = 1;
+       }
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      if (lopt.f_essid_regex)
++      {
++              lopt.f_essid_match_data
++                      = pcre2_match_data_create_from_pattern(lopt.f_essid_regex, NULL);
++
++              return pcre2_match(lopt.f_essid_regex,
++                                                 (PCRE2_SPTR) essid,
++                                                 (int) strnlen((char *) essid, ESSID_LENGTH),
++                                                 0,
++                                                 0,
++                                                 lopt.f_essid_match_data,
++                                                 0)
++                         < 0;
++      }
++#elif defined HAVE_PCRE
+       if (lopt.f_essid_regex)
+       {
+               return pcre_exec(lopt.f_essid_regex,
+@@ -5782,7 +5803,10 @@ int main(int argc, char * argv[])
+       int wi_read_failed = 0;
+       int n = 0;
+       int output_format_first_time = 1;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      int pcreerror;
++      PCRE2_SIZE pcreerroffset;
++#elif defined HAVE_PCRE
+       const char * pcreerror;
+       int pcreerroffset;
+ #endif
+@@ -5938,7 +5962,9 @@ int main(int argc, char * argv[])
+ #ifdef CONFIG_LIBNL
+       lopt.htval = CHANNEL_NO_HT;
+ #endif
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      lopt.f_essid_regex = NULL;
++#elif defined HAVE_PCRE
+       lopt.f_essid_regex = NULL;
+ #endif
+@@ -6359,7 +6385,34 @@ int main(int argc, char * argv[])
+                       case 'R':
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++                              if (lopt.f_essid_regex != NULL)
++                              {
++                                      printf("Error: ESSID regular expression already given. "
++                                                 "Aborting\n");
++                                      exit(EXIT_FAILURE);
++                              }
++
++                              lopt.f_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
++                                                                                                 PCRE2_ZERO_TERMINATED,
++                                                                                                 0,
++                                                                                                 &pcreerror,
++                                                                                                 &pcreerroffset,
++                                                                                                 NULL);
++
++                              if (lopt.f_essid_regex == NULL)
++                              {
++                                      PCRE2_UCHAR pcreerrbuffer[256];
++                                      pcre2_get_error_message(
++                                              pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
++
++                                      printf("Error: regular expression compilation failed at "
++                                                 "offset %lu: %s; aborting\n",
++                                                 pcreerroffset,
++                                                 pcreerrbuffer);
++                                      exit(EXIT_FAILURE);
++                              }
++#elif defined HAVE_PCRE
+                               if (lopt.f_essid_regex != NULL)
+                               {
+                                       printf("Error: ESSID regular expression already given. "
+@@ -7297,7 +7350,13 @@ int main(int argc, char * argv[])
+       if (lopt.keyout) free(lopt.keyout);
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      if (lopt.f_essid_regex)
++      {
++              pcre2_match_data_free(lopt.f_essid_match_data);
++              pcre2_code_free(lopt.f_essid_regex);
++      }
++#elif defined HAVE_PCRE
+       if (lopt.f_essid_regex) pcre_free(lopt.f_essid_regex);
+ #endif
diff --git a/net/aircrack-ng/patches/100-03-besside-ng-add-PCRE2-support.patch b/net/aircrack-ng/patches/100-03-besside-ng-add-PCRE2-support.patch
new file mode 100644 (file)
index 0000000..810007e
--- /dev/null
@@ -0,0 +1,146 @@
+From dbc80d96cfba2dab959ab20bf76f8dd4f517bd29 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:55:18 +0100
+Subject: [PATCH 3/9] besside-ng: add PCRE2 support
+
+---
+ src/besside-ng/besside-ng.c | 86 ++++++++++++++++++++++++++++++++++---
+ 1 file changed, 79 insertions(+), 7 deletions(-)
+
+--- a/src/besside-ng/besside-ng.c
++++ b/src/besside-ng/besside-ng.c
+@@ -57,7 +57,10 @@
+ #include <unistd.h>
+ #include <limits.h>
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
++#elif defined HAVE_PCRE
+ #include <pcre.h>
+ #endif
+@@ -155,7 +158,10 @@ static struct conf
+       int cf_do_wep;
+       int cf_do_wpa;
+       char * cf_wpa_server;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      pcre2_code * cf_essid_regex;
++      pcre2_match_data * cf_essid_match_data;
++#elif defined HAVE_PCRE
+       pcre * cf_essid_regex;
+ #endif
+ } _conf;
+@@ -1116,7 +1122,31 @@ static void attack_ping(void * a)
+       timer_in(100 * 1000, attack_ping, n);
+ }
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++static int is_filtered_essid(char * essid)
++{
++      REQUIRE(essid != NULL);
++
++      int ret = 0;
++
++      if (_conf.cf_essid_regex)
++      {
++              _conf.cf_essid_match_data
++                      = pcre2_match_data_create_from_pattern(_conf.cf_essid_regex, NULL);
++
++              return pcre2_match(_conf.cf_essid_regex,
++                                                 (PCRE2_SPTR) essid,
++                                                 (int) strnlen((char *) essid, MAX_IE_ELEMENT_SIZE),
++                                                 0,
++                                                 0,
++                                                 _conf.cf_essid_match_data,
++                                                 0)
++                         < 0;
++      }
++
++      return (ret);
++}
++#elif defined HAVE_PCRE
+ static int is_filtered_essid(char * essid)
+ {
+       REQUIRE(essid != NULL);
+@@ -1148,7 +1178,12 @@ static int should_attack(struct network
+       if (_conf.cf_bssid && memcmp(_conf.cf_bssid, n->n_bssid, 6) != 0)
+               return (0);
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      if (is_filtered_essid(n->n_ssid))
++      {
++              return (0);
++      }
++#elif defined HAVE_PCRE
+       if (is_filtered_essid(n->n_ssid))
+       {
+               return (0);
+@@ -3007,7 +3042,13 @@ static void cleanup(int UNUSED(x))
+       print_work();
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      if (_conf.cf_essid_regex)
++      {
++              pcre2_match_data_free(_conf.cf_essid_match_data);
++              pcre2_code_free(_conf.cf_essid_regex);
++      }
++#elif defined HAVE_PCRE
+       if (_conf.cf_essid_regex) pcre_free(_conf.cf_essid_regex);
+ #endif
+@@ -3295,7 +3336,10 @@ static void usage(char * prog)
+ int main(int argc, char * argv[])
+ {
+       int ch, temp;
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++      int pcreerror;
++      PCRE2_SIZE pcreerroffset;
++#elif defined HAVE_PCRE
+       const char * pcreerror;
+       int pcreerroffset;
+ #endif
+@@ -3349,7 +3393,35 @@ int main(int argc, char * argv[])
+                               break;
+                       case 'R':
+-#ifdef HAVE_PCRE
++#ifdef HAVE_PCRE2
++                              if (_conf.cf_essid_regex != NULL)
++                              {
++                                      printf("Error: ESSID regular expression already given. "
++                                                 "Aborting\n");
++                                      exit(EXIT_FAILURE);
++                              }
++
++                              _conf.cf_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
++                                                                                                       PCRE2_ZERO_TERMINATED,
++                                                                                                       0,
++                                                                                                       &pcreerror,
++                                                                                                       &pcreerroffset,
++                                                                                                       NULL);
++
++                              if (_conf.cf_essid_regex == NULL)
++                              {
++                                      PCRE2_UCHAR pcreerrbuffer[256];
++                                      pcre2_get_error_message(
++                                              pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
++
++                                      printf("Error: regular expression compilation failed at "
++                                                 "offset %lu: %s; aborting\n",
++                                                 pcreerroffset,
++                                                 pcreerrbuffer);
++                                      exit(EXIT_FAILURE);
++                              }
++                              break;
++#elif defined HAVE_PCRE
+                               if (_conf.cf_essid_regex != NULL)
+                               {
+                                       printf("Error: ESSID regular expression already given. "
diff --git a/net/aircrack-ng/patches/100-04-makefile-add-PCRE2-to-linker-flags.patch b/net/aircrack-ng/patches/100-04-makefile-add-PCRE2-to-linker-flags.patch
new file mode 100644 (file)
index 0000000..be5b886
--- /dev/null
@@ -0,0 +1,29 @@
+From ca05a44c449be3c433ea67c04f11d544ab62395f Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:57:16 +0100
+Subject: [PATCH 4/9] makefile: add PCRE2 to linker flags
+
+---
+ src/Makefile.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/Makefile.inc
++++ b/src/Makefile.inc
+@@ -130,7 +130,7 @@ aireplay_ng_LDADD          = $(COMMON_LDADD) $(L
+ airodump_ng_SOURCES           = $(SRC_ADU) $(SRC_DWRITE)
+ airodump_ng_CFLAGS            = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
+ airodump_ng_CPPFLAGS  = $(AM_CPPFLAGS) -I$(abs_srcdir)/src/airodump-ng
+-airodump_ng_LDADD                     = $(COMMON_LDADD) $(PCRE_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_CE_WEP_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
++airodump_ng_LDADD                     = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_CE_WEP_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+ airserv_ng_SOURCES    = $(SRC_AS)
+ airserv_ng_CFLAGS             = $(COMMON_CFLAGS) $(LIBNL_CFLAGS)
+@@ -164,7 +164,7 @@ buddy_ng_LDADD             = $(COMMON_LDADD) $(LIBA
+ besside_ng_SOURCES    = $(SRC_BS)
+ besside_ng_CFLAGS             = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
+-besside_ng_LDADD              = $(COMMON_LDADD) $(PCRE_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBPTW_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
++besside_ng_LDADD              = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBPTW_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+ besside_ng_crawler_SOURCES    = $(SRC_BC)
+ besside_ng_crawler_CFLAGS             = $(COMMON_CFLAGS) $(PCAP_CFLAGS)
diff --git a/net/aircrack-ng/patches/100-05-airodump-ng-dump_write-remove-unused-PCRE-include.patch b/net/aircrack-ng/patches/100-05-airodump-ng-dump_write-remove-unused-PCRE-include.patch
new file mode 100644 (file)
index 0000000..6b64fb6
--- /dev/null
@@ -0,0 +1,21 @@
+From fa532b05d48e856c774837b83a3323dafcc8c33e Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Fri, 20 Jan 2023 14:58:35 +0100
+Subject: [PATCH 5/9] airodump-ng/dump_write: remove unused PCRE include
+
+---
+ src/airodump-ng/dump_write.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/src/airodump-ng/dump_write.c
++++ b/src/airodump-ng/dump_write.c
+@@ -45,9 +45,6 @@
+ #include <unistd.h> // ftruncate
+ #include <sys/types.h> // ftruncate
+ #include <sys/time.h>
+-#ifdef HAVE_PCRE
+-#include <pcre.h>
+-#endif
+ #include "aircrack-ng/defs.h"
+ #include "airodump-ng.h"
diff --git a/net/aircrack-ng/patches/100-07-compat-pcre-add-compat-type-PCRE-header.patch b/net/aircrack-ng/patches/100-07-compat-pcre-add-compat-type-PCRE-header.patch
new file mode 100644 (file)
index 0000000..51df8ea
--- /dev/null
@@ -0,0 +1,114 @@
+From bac9b5fed2bb29e13326c90d7c12a6936fe9f04b Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Sat, 21 Jan 2023 19:29:58 +0100
+Subject: [PATCH 7/9] compat-pcre: add compat-type PCRE header
+
+---
+ include/Makefile.inc                   |  1 +
+ include/aircrack-ng/pcre/compat-pcre.h | 90 ++++++++++++++++++++++++++
+ 2 files changed, 91 insertions(+)
+ create mode 100644 include/aircrack-ng/pcre/compat-pcre.h
+
+--- a/include/Makefile.inc
++++ b/include/Makefile.inc
+@@ -71,6 +71,7 @@ nobase_aircrack_HEADERS =    %D%/aircrack-
+                             %D%/aircrack-ng/osdep/network.h \
+                             %D%/aircrack-ng/osdep/osdep.h \
+                             %D%/aircrack-ng/osdep/packed.h \
++                            %D%/aircrack-ng/pcre/compat-pcre.h \
+                             %D%/aircrack-ng/ptw/aircrack-ptw-lib.h \
+                             %D%/aircrack-ng/support/common.h \
+                             %D%/aircrack-ng/support/communications.h \
+--- /dev/null
++++ b/include/aircrack-ng/pcre/compat-pcre.h
+@@ -0,0 +1,90 @@
++/*
++*  Copyright (C) 2023 Andras Gemes <andrasgemes@outlook.com>
++*
++*  This program is free software; you can redistribute it and/or modify
++*  it under the terms of the GNU General Public License as published by
++*  the Free Software Foundation; either version 2 of the License, or
++*  (at your option) any later version.
++*
++*  This program is distributed in the hope that it will be useful,
++*  but WITHOUT ANY WARRANTY; without even the implied warranty of
++*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++*  GNU General Public License for more details.
++*
++*  You should have received a copy of the GNU General Public License
++*  along with this program; if not, write to the Free Software
++*  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
++*
++*
++*  In addition, as a special exception, the copyright holders give
++*  permission to link the code of portions of this program with the
++*  OpenSSL library under certain conditions as described in each
++*  individual source file, and distribute linked combinations
++*  including the two.
++*  You must obey the GNU General Public License in all respects
++*  for all of the code used other than OpenSSL. *  If you modify
++*  file(s) with this exception, you may extend this exception to your
++*  version of the file(s), but you are not obligated to do so. *  If you
++*  do not wish to do so, delete this exception statement from your
++*  version. *  If you delete this exception statement from all source
++*  files in the program, then also delete it here.
++*/
++
++#ifndef AIRCRACK_NG_COMPAT_PCRE_H
++#define AIRCRACK_NG_COMPAT_PCRE_H
++
++#ifdef HAVE_PCRE2
++#define PCRE2_CODE_UNIT_WIDTH 8
++#include <pcre2.h>
++#elif defined HAVE_PCRE
++#include <pcre.h>
++#endif
++
++#ifdef HAVE_PCRE2
++#define COMPAT_PCRE_COMPILE(pattern, pcreerror, pcreerroffset)                 \
++      pcre2_compile((PCRE2_SPTR) (pattern),                                      \
++                                PCRE2_ZERO_TERMINATED,                                       \
++                                0,                                                           \
++                                (pcreerror),                                                 \
++                                (pcreerroffset),                                             \
++                                NULL)
++#elif defined HAVE_PCRE
++#define COMPAT_PCRE_COMPILE(pattern, pcreerror, pcreerroffset)                 \
++      pcre_compile((pattern), 0, (pcreerror), (pcreerroffset), NULL)
++#endif
++
++#ifdef HAVE_PCRE2
++#define COMPAT_PCRE_MATCH(regex, essid, length, match_data)                    \
++      pcre2_match((regex),                                                       \
++                              (PCRE2_SPTR) (essid),                                          \
++                              (int) strnlen((char *) (essid), (length)),                     \
++                              0,                                                             \
++                              0,                                                             \
++                              (match_data),                                                  \
++                              0)
++#elif defined HAVE_PCRE
++#define COMPAT_PCRE_MATCH(regex, essid, length, match_data)                    \
++      pcre_exec((regex),                                                         \
++                        NULL,                                                            \
++                        (char *) (essid),                                                \
++                        strnlen((char *) (essid), (length)),                             \
++                        0,                                                               \
++                        0,                                                               \
++                        NULL,                                                            \
++                        0)
++#endif
++
++#ifdef HAVE_PCRE2
++#define COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerr)                        \
++      printf("Error: regular expression compilation failed at "                  \
++                 "offset %zu: %s; aborting\n",                                       \
++                 (pcreerroffset),                                                    \
++                 (pcreerr))
++#elif defined HAVE_PCRE
++#define COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerrorbuf)                   \
++      printf("Error: regular expression compilation failed at "                  \
++                 "offset %d: %s; aborting\n",                                        \
++                 (pcreerroffset),                                                    \
++                 (pcreerrorbuf))
++#endif
++#endif //AIRCRACK_NG_COMPAT_PCRE_H
diff --git a/net/aircrack-ng/patches/100-08-airodump-ng-utilize-compat-pcre.patch b/net/aircrack-ng/patches/100-08-airodump-ng-utilize-compat-pcre.patch
new file mode 100644 (file)
index 0000000..732c6a1
--- /dev/null
@@ -0,0 +1,146 @@
+From e7ace80dbcfd2feecbbc6263ce59ce20acdafca0 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Sat, 21 Jan 2023 19:31:07 +0100
+Subject: [PATCH 8/9] airodump-ng: utilize compat-pcre
+
+---
+ src/airodump-ng/airodump-ng.c | 80 +++++++++--------------------------
+ 1 file changed, 19 insertions(+), 61 deletions(-)
+
+--- a/src/airodump-ng/airodump-ng.c
++++ b/src/airodump-ng/airodump-ng.c
+@@ -68,13 +68,7 @@
+ #include <sys/wait.h>
+-#ifdef HAVE_PCRE2
+-#define PCRE2_CODE_UNIT_WIDTH 8
+-#include <pcre2.h>
+-#elif defined HAVE_PCRE
+-#include <pcre.h>
+-#endif
+-
++#include "aircrack-ng/pcre/compat-pcre.h"
+ #include "aircrack-ng/defs.h"
+ #include "aircrack-ng/version.h"
+ #include "aircrack-ng/support/pcap_local.h"
+@@ -863,33 +857,22 @@ int is_filtered_essid(const uint8_t * es
+               ret = 1;
+       }
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+       if (lopt.f_essid_regex)
+       {
++#ifdef HAVE_PCRE2
+               lopt.f_essid_match_data
+                       = pcre2_match_data_create_from_pattern(lopt.f_essid_regex, NULL);
+-              return pcre2_match(lopt.f_essid_regex,
+-                                                 (PCRE2_SPTR) essid,
+-                                                 (int) strnlen((char *) essid, ESSID_LENGTH),
+-                                                 0,
+-                                                 0,
+-                                                 lopt.f_essid_match_data,
+-                                                 0)
++              return COMPAT_PCRE_MATCH(lopt.f_essid_regex,
++                                                               essid,
++                                                               ESSID_LENGTH,
++                                                               lopt.f_essid_match_data)
+                          < 0;
+-      }
+ #elif defined HAVE_PCRE
+-      if (lopt.f_essid_regex)
+-      {
+-              return pcre_exec(lopt.f_essid_regex,
+-                                               NULL,
+-                                               (char *) essid,
+-                                               (int) strnlen((char *) essid, ESSID_LENGTH),
+-                                               0,
+-                                               0,
+-                                               NULL,
+-                                               0)
++              return COMPAT_PCRE_MATCH(lopt.f_essid_regex, essid, ESSID_LENGTH, NULL)
+                          < 0;
++#endif
+       }
+ #endif
+@@ -5805,6 +5788,7 @@ int main(int argc, char * argv[])
+       int output_format_first_time = 1;
+ #ifdef HAVE_PCRE2
+       int pcreerror;
++      PCRE2_UCHAR pcreerrorbuf[256];
+       PCRE2_SIZE pcreerroffset;
+ #elif defined HAVE_PCRE
+       const char * pcreerror;
+@@ -5962,9 +5946,7 @@ int main(int argc, char * argv[])
+ #ifdef CONFIG_LIBNL
+       lopt.htval = CHANNEL_NO_HT;
+ #endif
+-#ifdef HAVE_PCRE2
+-      lopt.f_essid_regex = NULL;
+-#elif defined HAVE_PCRE
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+       lopt.f_essid_regex = NULL;
+ #endif
+@@ -6385,7 +6367,7 @@ int main(int argc, char * argv[])
+                       case 'R':
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+                               if (lopt.f_essid_regex != NULL)
+                               {
+                                       printf("Error: ESSID regular expression already given. "
+@@ -6393,42 +6375,18 @@ int main(int argc, char * argv[])
+                                       exit(EXIT_FAILURE);
+                               }
+-                              lopt.f_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
+-                                                                                                 PCRE2_ZERO_TERMINATED,
+-                                                                                                 0,
+-                                                                                                 &pcreerror,
+-                                                                                                 &pcreerroffset,
+-                                                                                                 NULL);
++                              lopt.f_essid_regex
++                                      = COMPAT_PCRE_COMPILE(optarg, &pcreerror, &pcreerroffset);
+                               if (lopt.f_essid_regex == NULL)
+                               {
+-                                      PCRE2_UCHAR pcreerrbuffer[256];
++#ifdef HAVE_PCRE2
+                                       pcre2_get_error_message(
+-                                              pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
+-
+-                                      printf("Error: regular expression compilation failed at "
+-                                                 "offset %lu: %s; aborting\n",
+-                                                 pcreerroffset,
+-                                                 pcreerrbuffer);
+-                                      exit(EXIT_FAILURE);
+-                              }
++                                              pcreerror, pcreerrorbuf, sizeof(pcreerrorbuf));
++                                      COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerrorbuf);
+ #elif defined HAVE_PCRE
+-                              if (lopt.f_essid_regex != NULL)
+-                              {
+-                                      printf("Error: ESSID regular expression already given. "
+-                                                 "Aborting\n");
+-                                      exit(EXIT_FAILURE);
+-                              }
+-
+-                              lopt.f_essid_regex
+-                                      = pcre_compile(optarg, 0, &pcreerror, &pcreerroffset, NULL);
+-
+-                              if (lopt.f_essid_regex == NULL)
+-                              {
+-                                      printf("Error: regular expression compilation failed at "
+-                                                 "offset %d: %s; aborting\n",
+-                                                 pcreerroffset,
+-                                                 pcreerror);
++                                      COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerror);
++#endif
+                                       exit(EXIT_FAILURE);
+                               }
+ #else
diff --git a/net/aircrack-ng/patches/100-09-besside-ng-utilize-compat-pcre.patch b/net/aircrack-ng/patches/100-09-besside-ng-utilize-compat-pcre.patch
new file mode 100644 (file)
index 0000000..532521e
--- /dev/null
@@ -0,0 +1,165 @@
+From d7eb251f945524b419e8c90dd54c640d9922e5d5 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Sat, 21 Jan 2023 19:31:31 +0100
+Subject: [PATCH 9/9] besside-ng: utilize compat-pcre
+
+---
+ src/besside-ng/besside-ng.c | 94 ++++++++-----------------------------
+ 1 file changed, 20 insertions(+), 74 deletions(-)
+
+--- a/src/besside-ng/besside-ng.c
++++ b/src/besside-ng/besside-ng.c
+@@ -57,13 +57,7 @@
+ #include <unistd.h>
+ #include <limits.h>
+-#ifdef HAVE_PCRE2
+-#define PCRE2_CODE_UNIT_WIDTH 8
+-#include <pcre2.h>
+-#elif defined HAVE_PCRE
+-#include <pcre.h>
+-#endif
+-
++#include "aircrack-ng/pcre/compat-pcre.h"
+ #include "aircrack-ng/defs.h"
+ #include "aircrack-ng/aircrack-ng.h"
+ #include "aircrack-ng/version.h"
+@@ -1122,7 +1116,7 @@ static void attack_ping(void * a)
+       timer_in(100 * 1000, attack_ping, n);
+ }
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+ static int is_filtered_essid(char * essid)
+ {
+       REQUIRE(essid != NULL);
+@@ -1131,39 +1125,20 @@ static int is_filtered_essid(char * essi
+       if (_conf.cf_essid_regex)
+       {
++#ifdef HAVE_PCRE2
+               _conf.cf_essid_match_data
+                       = pcre2_match_data_create_from_pattern(_conf.cf_essid_regex, NULL);
+-              return pcre2_match(_conf.cf_essid_regex,
+-                                                 (PCRE2_SPTR) essid,
+-                                                 (int) strnlen((char *) essid, MAX_IE_ELEMENT_SIZE),
+-                                                 0,
+-                                                 0,
+-                                                 _conf.cf_essid_match_data,
+-                                                 0)
++              return COMPAT_PCRE_MATCH(_conf.cf_essid_regex,
++                                                               essid,
++                                                               MAX_IE_ELEMENT_SIZE,
++                                                               _conf.cf_essid_match_data)
+                          < 0;
+-      }
+-
+-      return (ret);
+-}
+ #elif defined HAVE_PCRE
+-static int is_filtered_essid(char * essid)
+-{
+-      REQUIRE(essid != NULL);
+-
+-      int ret = 0;
+-
+-      if (_conf.cf_essid_regex)
+-      {
+-              return pcre_exec(_conf.cf_essid_regex,
+-                                               NULL,
+-                                               (char *) essid,
+-                                               strnlen((char *) essid, MAX_IE_ELEMENT_SIZE),
+-                                               0,
+-                                               0,
+-                                               NULL,
+-                                               0)
++              return COMPAT_PCRE_MATCH(
++                                 _conf.cf_essid_regex, essid, MAX_IE_ELEMENT_SIZE, NULL)
+                          < 0;
++#endif
+       }
+       return (ret);
+@@ -1178,12 +1153,7 @@ static int should_attack(struct network
+       if (_conf.cf_bssid && memcmp(_conf.cf_bssid, n->n_bssid, 6) != 0)
+               return (0);
+-#ifdef HAVE_PCRE2
+-      if (is_filtered_essid(n->n_ssid))
+-      {
+-              return (0);
+-      }
+-#elif defined HAVE_PCRE
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+       if (is_filtered_essid(n->n_ssid))
+       {
+               return (0);
+@@ -3338,6 +3308,7 @@ int main(int argc, char * argv[])
+       int ch, temp;
+ #ifdef HAVE_PCRE2
+       int pcreerror;
++      PCRE2_UCHAR pcreerrorbuf[256];
+       PCRE2_SIZE pcreerroffset;
+ #elif defined HAVE_PCRE
+       const char * pcreerror;
+@@ -3393,7 +3364,7 @@ int main(int argc, char * argv[])
+                               break;
+                       case 'R':
+-#ifdef HAVE_PCRE2
++#if defined HAVE_PCRE2 || defined HAVE_PCRE
+                               if (_conf.cf_essid_regex != NULL)
+                               {
+                                       printf("Error: ESSID regular expression already given. "
+@@ -3401,43 +3372,18 @@ int main(int argc, char * argv[])
+                                       exit(EXIT_FAILURE);
+                               }
+-                              _conf.cf_essid_regex = pcre2_compile((PCRE2_SPTR) optarg,
+-                                                                                                       PCRE2_ZERO_TERMINATED,
+-                                                                                                       0,
+-                                                                                                       &pcreerror,
+-                                                                                                       &pcreerroffset,
+-                                                                                                       NULL);
++                              _conf.cf_essid_regex
++                                      = COMPAT_PCRE_COMPILE(optarg, &pcreerror, &pcreerroffset);
+                               if (_conf.cf_essid_regex == NULL)
+                               {
+-                                      PCRE2_UCHAR pcreerrbuffer[256];
++#ifdef HAVE_PCRE2
+                                       pcre2_get_error_message(
+-                                              pcreerror, pcreerrbuffer, sizeof(pcreerrbuffer));
+-
+-                                      printf("Error: regular expression compilation failed at "
+-                                                 "offset %lu: %s; aborting\n",
+-                                                 pcreerroffset,
+-                                                 pcreerrbuffer);
+-                                      exit(EXIT_FAILURE);
+-                              }
+-                              break;
++                                              pcreerror, pcreerrorbuf, sizeof(pcreerrorbuf));
++                                      COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerrorbuf);
+ #elif defined HAVE_PCRE
+-                              if (_conf.cf_essid_regex != NULL)
+-                              {
+-                                      printf("Error: ESSID regular expression already given. "
+-                                                 "Aborting\n");
+-                                      exit(EXIT_FAILURE);
+-                              }
+-
+-                              _conf.cf_essid_regex
+-                                      = pcre_compile(optarg, 0, &pcreerror, &pcreerroffset, NULL);
+-
+-                              if (_conf.cf_essid_regex == NULL)
+-                              {
+-                                      printf("Error: regular expression compilation failed at "
+-                                                 "offset %d: %s; aborting\n",
+-                                                 pcreerroffset,
+-                                                 pcreerror);
++                                      COMPAT_PCRE_PRINT_ERROR(pcreerroffset, pcreerror);
++#endif
+                                       exit(EXIT_FAILURE);
+                               }
+                               break;
diff --git a/net/aircrack-ng/patches/101-02-src-makefile-add-PCRE2_CFLAGS-to-airodump-and-bessid.patch b/net/aircrack-ng/patches/101-02-src-makefile-add-PCRE2_CFLAGS-to-airodump-and-bessid.patch
new file mode 100644 (file)
index 0000000..c6338f5
--- /dev/null
@@ -0,0 +1,29 @@
+From 8c6a4f171b7d97a294590fab9dc2069b149b9b36 Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Mon, 23 Jan 2023 10:42:39 +0100
+Subject: [PATCH 2/6] src/makefile: add PCRE2_CFLAGS to airodump and besside
+
+---
+ src/Makefile.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/Makefile.inc
++++ b/src/Makefile.inc
+@@ -128,7 +128,7 @@ aireplay_ng_CFLAGS = $(COMMON_CFLAGS) $(
+ aireplay_ng_LDADD             = $(COMMON_LDADD) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+ airodump_ng_SOURCES           = $(SRC_ADU) $(SRC_DWRITE)
+-airodump_ng_CFLAGS            = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
++airodump_ng_CFLAGS            = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS) $(LIBNL_CFLAGS)
+ airodump_ng_CPPFLAGS  = $(AM_CPPFLAGS) -I$(abs_srcdir)/src/airodump-ng
+ airodump_ng_LDADD                     = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBAIRCRACK_CE_WEP_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+@@ -163,7 +163,7 @@ buddy_ng_CPPFLAGS  = $(AM_CPPFLAGS) -I$(a
+ buddy_ng_LDADD                = $(COMMON_LDADD) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+ besside_ng_SOURCES    = $(SRC_BS)
+-besside_ng_CFLAGS             = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(LIBNL_CFLAGS)
++besside_ng_CFLAGS             = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS) $(LIBNL_CFLAGS)
+ besside_ng_LDADD              = $(COMMON_LDADD) $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(LIBACCRYPTO_LIBS) $(LIBPTW_LIBS) $(AIRPCAP_LIBS) $(LIBAIRCRACK_LIBS) $(CRYPTO_LIBS)
+ besside_ng_crawler_SOURCES    = $(SRC_BC)
diff --git a/net/aircrack-ng/patches/101-03-lib-makefile-add-PCRE2-to-libaccrypto-and-libaircrac.patch b/net/aircrack-ng/patches/101-03-lib-makefile-add-PCRE2-to-libaccrypto-and-libaircrac.patch
new file mode 100644 (file)
index 0000000..803b188
--- /dev/null
@@ -0,0 +1,37 @@
+From 0be8f0d7d8e4a09ea5687bcec6690876b4161a0e Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Mon, 23 Jan 2023 10:46:26 +0100
+Subject: [PATCH 3/6] lib/makefile: add PCRE2 to libaccrypto and libaircrack
+
+---
+ lib/Makefile.inc | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/lib/Makefile.inc
++++ b/lib/Makefile.inc
+@@ -65,8 +65,8 @@ SRC_CRYPTO   +=      %D%/crypto/sha1-git.c
+ endif
+ libaccrypto_la_SOURCES        = $(SRC_CRYPTO)
+-libaccrypto_la_CFLAGS         = $(COMMON_CFLAGS) $(PCRE_CFLAGS)
+-libaccrypto_la_LIBADD         = $(PCRE_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
++libaccrypto_la_CFLAGS         = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS)
++libaccrypto_la_LIBADD         = $(PCRE_LIBS) $(PCRE2_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
+ libcowpatty_la_SOURCES = $(SRC_COW)
+ libcowpatty_la_CFLAGS = $(COMMON_CFLAGS) $(LIBCOW_CFLAGS)
+@@ -121,12 +121,12 @@ SRC_LIBAC += %D%/libac/support/strlcpy.c
+ endif
+ libaircrack_la_SOURCES        = $(SRC_LIBAC) $(TRAMPOLINE) $(CPUSET)
+-libaircrack_la_CFLAGS         = $(COMMON_CFLAGS) $(PCRE_CFLAGS) \
++libaircrack_la_CFLAGS         = $(COMMON_CFLAGS) $(PCRE_CFLAGS) $(PCRE2_CFLAGS) \
+                                                                                                       "-DLIBAIRCRACK_CE_WPA_PATH=\"$(LIBAIRCRACK_CE_WPA_PATH)\"" \
+                                                                                                       "-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"" \
+                                                                                                       "-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"" \
+                                                                                                       "-DLIBDIR=\"$(libdir)\""
+-libaircrack_la_LIBADD         = $(COMMON_LDADD) $(LIBAIRCRACK_OSDEP_LIBS) $(PCRE_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
++libaircrack_la_LIBADD         = $(COMMON_LDADD) $(LIBAIRCRACK_OSDEP_LIBS) $(PCRE_LIBS) $(PCRE2_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS)
+ if CYGWIN
+ libaircrack_la_LIBADD += -lshlwapi
diff --git a/net/aircrack-ng/patches/102-autotools-indicate-if-PCRE-or-PCRE2-is-being-used.patch b/net/aircrack-ng/patches/102-autotools-indicate-if-PCRE-or-PCRE2-is-being-used.patch
new file mode 100644 (file)
index 0000000..8dc2ce4
--- /dev/null
@@ -0,0 +1,132 @@
+From b381ef3f6b6cc83a4aa016f4c0aebb58fcffcf3f Mon Sep 17 00:00:00 2001
+From: Andras Gemes <andrasgemes@outlook.com>
+Date: Mon, 23 Jan 2023 16:58:38 +0100
+Subject: [PATCH] autotools: indicate if PCRE or PCRE2 is being used
+
+---
+ build/m4/aircrack_ng_pcre.m4  | 28 ++++++++++++++--
+ build/m4/aircrack_ng_pcre2.m4 | 61 -----------------------------------
+ configure.ac                  |  3 +-
+ 3 files changed, 26 insertions(+), 66 deletions(-)
+ delete mode 100644 build/m4/aircrack_ng_pcre2.m4
+
+--- a/build/m4/aircrack_ng_pcre.m4
++++ b/build/m4/aircrack_ng_pcre.m4
+@@ -55,7 +55,29 @@ else
+       PKG_CHECK_MODULES(PCRE, libpcre, HAVE_PCRE=yes, HAVE_PCRE=no)
+ fi
+-AS_IF([test "x$HAVE_PCRE" = "xyes"], [
++AC_ARG_ENABLE(static-pcre2,
++    AS_HELP_STRING([--enable-static-pcre2],
++              [Enable statically linked PCRE2 libpcre2-8.]),
++    [static_pcre2=$enableval], [static_pcre2=no])
++
++if test "x$static_pcre2" != "xno"; then
++      AC_REQUIRE([AX_EXT_HAVE_STATIC_LIB_DETECT])
++      AX_EXT_HAVE_STATIC_LIB(PCRE2, ${DEFAULT_STATIC_LIB_SEARCH_PATHS}, pcre2 libpcre2-8, pcre2_version)
++      if test "x$PCRE2_FOUND" = xyes; then
++              HAVE_PCRE2=yes
++      else
++              HAVE_PCRE2=no
++      fi
++else
++      PKG_CHECK_MODULES(PCRE2, libpcre2-8, HAVE_PCRE2=yes, HAVE_PCRE2=no)
++fi
++
++if test "x$HAVE_PCRE" = "xyes" && test "x$HAVE_PCRE2" = "xyes"; then
++    AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
++    PCRE2_NOTE="(Pcre and Pcre2 found, using Pcre2)"
++elif test "x$HAVE_PCRE" = "xyes"; then
+     AC_DEFINE([HAVE_PCRE], [1], [Define this if you have libpcre on your system])
+-])
+-])
++elif test "x$HAVE_PCRE2" = "xyes"; then
++    AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
++fi
++])
+\ No newline at end of file
+--- a/build/m4/aircrack_ng_pcre2.m4
++++ /dev/null
+@@ -1,61 +0,0 @@
+-dnl Aircrack-ng
+-dnl
+-dnl Copyright (C) 2023 Andras Gemes <andrasgemes@outlook.com>
+-dnl
+-dnl Autotool support was written by: Joseph Benden <joe@benden.us>
+-dnl
+-dnl This program is free software; you can redistribute it and/or modify
+-dnl it under the terms of the GNU General Public License as published by
+-dnl the Free Software Foundation; either version 2 of the License, or
+-dnl (at your option) any later version.
+-dnl
+-dnl This program is distributed in the hope that it will be useful,
+-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-dnl GNU General Public License for more details.
+-dnl
+-dnl You should have received a copy of the GNU General Public License
+-dnl along with this program; if not, write to the Free Software
+-dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+-dnl
+-dnl In addition, as a special exception, the copyright holders give
+-dnl permission to link the code of portions of this program with the
+-dnl OpenSSL library under certain conditions as described in each
+-dnl individual source file, and distribute linked combinations
+-dnl including the two.
+-dnl
+-dnl You must obey the GNU General Public License in all respects
+-dnl for all of the code used other than OpenSSL.
+-dnl
+-dnl If you modify file(s) with this exception, you may extend this
+-dnl exception to your dnl version of the file(s), but you are not obligated
+-dnl to do so.
+-dnl
+-dnl If you dnl do not wish to do so, delete this exception statement from your
+-dnl version.
+-dnl
+-dnl If you delete this exception statement from all source files in the
+-dnl program, then also delete it here.
+-
+-AC_DEFUN([AIRCRACK_NG_PCRE2], [
+-AC_ARG_ENABLE(static-pcre2,
+-    AS_HELP_STRING([--enable-static-pcre2],
+-              [Enable statically linked PCRE2 libpcre2-8.]),
+-    [static_pcre2=$enableval], [static_pcre2=no])
+-
+-if test "x$static_pcre2" != "xno"; then
+-      AC_REQUIRE([AX_EXT_HAVE_STATIC_LIB_DETECT])
+-      AX_EXT_HAVE_STATIC_LIB(PCRE2, ${DEFAULT_STATIC_LIB_SEARCH_PATHS}, pcre2 libpcre2-8, pcre2_version)
+-      if test "x$PCRE2_FOUND" = xyes; then
+-              HAVE_PCRE2=yes
+-      else
+-              HAVE_PCRE2=no
+-      fi
+-else
+-      PKG_CHECK_MODULES(PCRE2, libpcre2-8, HAVE_PCRE2=yes, HAVE_PCRE2=no)
+-fi
+-
+-AS_IF([test "x$HAVE_PCRE2" = "xyes"], [
+-    AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
+-])
+-])
+\ No newline at end of file
+--- a/configure.ac
++++ b/configure.ac
+@@ -144,7 +144,6 @@ AIRCRACK_NG_EXT_SCRIPTS
+ AIRCRACK_NG_HWLOC
+ AIRCRACK_NG_PCAP
+ AIRCRACK_NG_PCRE
+-AIRCRACK_NG_PCRE2
+ AIRCRACK_NG_RFKILL
+ AIRCRACK_NG_SQLITE
+ AIRCRACK_NG_ZLIB
+@@ -321,7 +320,7 @@ ${PACKAGE} ${VERSION}
+     Jemalloc:                    ${JEMALLOC}
+     Pcap:                        ${PCAP_FOUND}
+     Pcre:                        ${HAVE_PCRE}
+-    Pcre2:                       ${HAVE_PCRE2}
++    Pcre2:                       ${HAVE_PCRE2} ${PCRE2_NOTE}
+     Sqlite:                      ${HAVE_SQLITE3}
+     Tcmalloc:                    ${TCMALLOC}
+     Zlib:                        ${HAVE_ZLIB}
diff --git a/net/aircrack-ng/patches/103-autotools-reset-PCRE-CFLAGS-LIBS-with-both-PCRE-and-.patch b/net/aircrack-ng/patches/103-autotools-reset-PCRE-CFLAGS-LIBS-with-both-PCRE-and-.patch
new file mode 100644 (file)
index 0000000..677cb32
--- /dev/null
@@ -0,0 +1,39 @@
+From b8d0b8cb6caa6940443b3e6ca32efc78d0c9d00e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth@gmail.com>
+Date: Sun, 1 Oct 2023 00:32:16 +0200
+Subject: [PATCH] autotools: reset PCRE CFLAGS/LIBS with both PCRE and PCRE2
+ present
+
+Commit b381ef3f6b6c ("autotools: indicate if PCRE or PCRE2 is being
+used") fixed a case where both pcre and pcre2 library are detected and
+put a preference on using pcre2.
+
+Although the commit fix this corner case, there is still a latent
+problem with trying to link/include both library. This is caused by the
+fact that in the Makefile.inc for src and lib, we include both
+PCRE_CFLAGS and PCRE2_CFLAGS and PCRE_LIBS and PCRE2_LIBS for each
+tool/lib.
+
+To handle this and not bloat the Makefile with additional condition,
+simply reset the PCRE_CFLAGS and PCRE_LIBS in case where we detect both
+library and we prefer to use pcre2.
+
+Fixes: b381ef3f6b6c ("autotools: indicate if PCRE or PCRE2 is being used")
+Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+---
+ build/m4/aircrack_ng_pcre.m4 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/build/m4/aircrack_ng_pcre.m4
++++ b/build/m4/aircrack_ng_pcre.m4
+@@ -75,6 +75,10 @@ fi
+ if test "x$HAVE_PCRE" = "xyes" && test "x$HAVE_PCRE2" = "xyes"; then
+     AC_DEFINE([HAVE_PCRE2], [1], [Define this if you have libpcre2-8 on your system])
+     PCRE2_NOTE="(Pcre and Pcre2 found, using Pcre2)"
++    # Reset PCRE cflags and libs variables as we include both PCRE and PCRE2 in Makefile.inc
++    # and would result in trying to link/include both library.
++    PCRE_CFLAGS=""
++    PCRE_LIBS=""
+ elif test "x$HAVE_PCRE" = "xyes"; then
+     AC_DEFINE([HAVE_PCRE], [1], [Define this if you have libpcre on your system])
+ elif test "x$HAVE_PCRE2" = "xyes"; then
index 9478f06975b62c0f69ded4caa055c1f9b4c86acc..cabdd3efd3e204a376fb335286d994b7a050a49b 100644 (file)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=atftp
-PKG_VERSION:=0.7.5
+PKG_VERSION:=0.8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=93c87a4fb18218414e008e01c995dadd231ba4c752d0f894b34416d1e6d3038a
+PKG_HASH:=df2aa089c7670f9eab40e5598e5d2cb6a582dc5182926ea50b4d690e4e37f316
 
 PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
 PKG_LICENSE:=GPL-2.0-or-later
@@ -21,6 +21,8 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
+PKG_FIXUP:=autoreconf
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/atftp/Default
@@ -38,7 +40,7 @@ endef
 
 define Package/atftpd
   $(call Package/atftp/Default)
-  DEPENDS:=+libpcre +libpthread
+  DEPENDS:=+libpcre2 +libpthread
   TITLE+= server
 endef
 
index 29a313bdbf28c61832cafca0bcf23c91e2a70b25..a69f5320d604ca6a3ca6d43f7d97a43d0eed9f50 100644 (file)
@@ -59,17 +59,6 @@ endef
 
 # Additional optional exporters:
 
-define Package/prometheus-node-exporter-lua-bmx6
-  $(call Package/prometheus-node-exporter-lua/Default)
-  TITLE+= (bmx6 links collector)
-  DEPENDS:=prometheus-node-exporter-lua bmx6 +lua-cjson +bmx6-json
-endef
-
-define Package/prometheus-node-exporter-lua-bmx6/install
-       $(INSTALL_DIR) $(1)/usr/lib/lua/prometheus-collectors
-       $(INSTALL_BIN) ./files/usr/lib/lua/prometheus-collectors/bmx6.lua $(1)/usr/lib/lua/prometheus-collectors/
-endef
-
 define Package/prometheus-node-exporter-lua-bmx7
   $(call Package/prometheus-node-exporter-lua/Default)
   TITLE+= (bmx7 links collector)
@@ -236,7 +225,6 @@ define Package/prometheus-node-exporter-lua-realtek-poe/install
 endef
 
 $(eval $(call BuildPackage,prometheus-node-exporter-lua))
-$(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx6))
 $(eval $(call BuildPackage,prometheus-node-exporter-lua-bmx7))
 $(eval $(call BuildPackage,prometheus-node-exporter-lua-dawn))
 $(eval $(call BuildPackage,prometheus-node-exporter-lua-hostapd_stations))
index 6005810505404bada9ccb8347c7f9c6c35107023..6400b4807a1de13834272ca1b3357fcc3db787cc 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yq
-PKG_VERSION:=4.35.1
+PKG_VERSION:=4.35.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mikefarah/yq/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b3e079169529ec6b42925d0802c22d86f1ef6e1458dce67eae5a1d6db56cb8c3
+PKG_HASH:=8b17d710c56f764e9beff06d7a7b1c77d87c4ba4219ce4ce67e7ee29670f4f13
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=MIT