aircrack-ng: Upgrade to 1.7

Upgrade to the latest release, 1.7, and rework recipe so that it
actually builds again.  Note that the extra scripts are no longer
installed by default as they seem somewhat stale and likely further
work is required to have any of them work.  A PACKAGECONFIG option,
"ext-scripts" has been added to enable installing them if they are
required for some reason.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
This commit is contained in:
Scott Murray
2026-04-26 03:31:23 +03:00
parent cd05fe6992
commit 1792ae2762
3 changed files with 133 additions and 36 deletions
@@ -0,0 +1,79 @@
From 3101dcd56c19112c6b6e4378886cdfdae7001304 Mon Sep 17 00:00:00 2001
From: Scott Murray <scott.murray@konsulko.com>
Date: Sun, 26 Apr 2026 02:10:06 +0300
Subject: [PATCH] Remove build directory reference
Remove logic in crypto engine loader code that tries to detect
running inside a build tree to remove the resulting reference
to the absolute build directoy path in the binary.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
lib/libac/support/crypto_engine_loader.c | 40 +++++-------------------
1 file changed, 7 insertions(+), 33 deletions(-)
diff --git a/lib/libac/support/crypto_engine_loader.c b/lib/libac/support/crypto_engine_loader.c
index 0ec02e7..f9f9cfd 100644
--- a/lib/libac/support/crypto_engine_loader.c
+++ b/lib/libac/support/crypto_engine_loader.c
@@ -251,26 +251,13 @@ EXPORT int ac_crypto_engine_loader_get_available(void)
#endif
REQUIRE(working_directory != NULL);
- if (strncmp(working_directory, ABS_TOP_BUILDDIR, strlen(ABS_TOP_BUILDDIR))
- == 0)
- {
- // use development paths
- snprintf(library_path,
- sizeof(library_path) - 1,
- "%s%s",
- LIBAIRCRACK_CE_WPA_PATH,
- LT_OBJDIR);
- }
- else
- {
#if defined(WIN32_PORTABLE)
- // use the current directory
- snprintf(library_path, sizeof(library_path) - 1, working_directory);
+ // use the current directory
+ snprintf(library_path, sizeof(library_path) - 1, working_directory);
#else
- // use installation paths
- snprintf(library_path, sizeof(library_path) - 1, "%s", LIBDIR);
+ // use installation paths
+ snprintf(library_path, sizeof(library_path) - 1, "%s", LIBDIR);
#endif
- }
free(working_directory);
// enumerate all DSOs in folder, opening, searching symbols, and testing
@@ -353,22 +340,9 @@ EXPORT char * ac_crypto_engine_loader_best_library_for(int simd_features)
= get_current_working_directory(); // or the binary's path?
REQUIRE(working_directory != NULL);
- if (strncmp(
- working_directory, ABS_TOP_BUILDDIR, sizeof(ABS_TOP_BUILDDIR) - 1)
- == 0)
- {
- // use development paths
- snprintf(library_path,
- sizeof(library_path) - 1,
- "%s%s",
- LIBAIRCRACK_CE_WPA_PATH,
- LT_OBJDIR);
- }
- else
- {
- // use installation paths
- snprintf(library_path, sizeof(library_path) - 1, "%s", LIBDIR);
- }
+ // use installation paths
+ snprintf(library_path, sizeof(library_path) - 1, "%s", LIBDIR);
+
free(working_directory);
#if defined(WIN32_PORTABLE)
--
2.47.3
@@ -1,36 +0,0 @@
SUMMARY = "Aircrack-ng is a set of tools for auditing wireless networks"
DESCRIPTION = "Aircrack-ng is an 802.11 WEP and WPA-PSK keys cracking program that can recover keys once enough data packets have been captured. It implements the standard FMS attack along with some optimizations like KoreK attacks, as well as the PTW attack, thus making the attack much faster compared to other WEP cracking tools."
SECTION = "security"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=1fbd81241fe252ec0f5658a521ab7dd8"
DEPENDS = "libnl openssl sqlite3 libpcre libpcap"
SRC_URI = "http://download.aircrack-ng.org/${BP}.tar.gz"
SRC_URI[md5sum] = "22ddc85549b51ed0da0931d01ef215e5"
SRC_URI[sha256sum] = "4f0bfd486efc6ea7229f7fbc54340ff8b2094a0d73e9f617e0a39f878999a247"
inherit autotools-brokensep pkgconfig
PACKAGECONFIG ?= ""
CFLAGS += " -I${S}/src/include"
OEMAKE_EXTRA = "sqlite=true experimental=true pcre=true \
prefix=${prefix} \
"
do_compile () {
make ${OEMAKE_EXTRA} TOOL_PREFIX=${TARGET_SYS}-
}
do_install () {
make DESTDIR=${D} ${OEMAKE_EXTRA} ext_scripts=true install
}
FILES:${PN} += "${libdir}/*.so"
FILES_SOLIBSDEV = ""
INSANE_SKIP:${PN} += "dev-so"
RDEPENDS:${PN} = "libpcap"
@@ -0,0 +1,54 @@
SUMMARY = "Aircrack-ng is a set of tools for auditing wireless networks"
DESCRIPTION = "Aircrack-ng is an 802.11 WEP and WPA-PSK keys cracking program that can recover keys once enough data packets have been captured. It implements the standard FMS attack along with some optimizations like KoreK attacks, as well as the PTW attack, thus making the attack much faster compared to other WEP cracking tools."
SECTION = "security"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;beginline=1;endline=2;md5=1fbd81241fe252ec0f5658a521ab7dd8"
DEPENDS = "libnl openssl libpcap"
SRC_URI = "http://download.aircrack-ng.org/${BP}.tar.gz \
file://0001-Remove-build-directory-reference.patch \
"
SRC_URI[sha256sum] = "05a704e3c8f7792a17315080a21214a4448fd2452c1b0dd5226a3a55f90b58c3"
inherit autotools-brokensep pkgconfig python3targetconfig
PACKAGECONFIG ??= "pcre sqlite3 experimental"
PACKAGECONFIG[pcre] = ",,libpcre"
PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--with-sqlite3=no,sqlite3"
PACKAGECONFIG[experimental] = "--with-experimental=yes,--with-experimental=no"
PACKAGECONFIG[ext-scripts] = "--with-ext-scripts=yes,--with-ext-scripts=no,python3-setuptools-native,ethtool python3 python3-requests"
# pcap is theoretically optional, but is not unless the configure script is modified
EXTRA_OECONF = " \
--with-libpcap-include=${STAGING_INCDIR}/pcap \
ac_cv_prog_ETHTOOL=${bindir}/ethtool \
"
EXTRA_OEMAKE = "pkgpythondir=${PYTHON_SITEPACKAGES_DIR}"
do_install:append() {
# Remove to avoid TMPDIR leakage
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/airdrop-ng-install_files.txt
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/airgraph-ng-install_files.txt
rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/airdrop/__pycache__/
rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/airgraphviz/__pycache__/
# Fix up Python paths for target
for f in airdrop-ng airgraph-ng airodump-join; do
if [ -f "${D}${bindir}/$f" ]; then
sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/$f
fi
done
}
FILES:${PN} += " \
${libdir}/*.so \
${datadir}/airgraph-ng/ \
${PYTHON_SITEPACKAGES_DIR} \
"
FILES_SOLIBSDEV = ""
INSANE_SKIP:${PN} += "dev-so"