From patchwork Wed Mar 11 10:54:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Vanbever X-Patchwork-Id: 1252784 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=essensium.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=essensium.com header.i=@essensium.com header.a=rsa-sha256 header.s=google header.b=FAu17I9G; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48cpmJ5yyLz9sPg for ; Wed, 11 Mar 2020 21:56:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E409988042; Wed, 11 Mar 2020 10:56:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DOa+HCHyFiLN; Wed, 11 Mar 2020 10:56:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2D0F688281; Wed, 11 Mar 2020 10:56:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 25A4E1BF9AD for ; Wed, 11 Mar 2020 10:56:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 221D48727B for ; Wed, 11 Mar 2020 10:56:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7zsILGNwBPl3 for ; Wed, 11 Mar 2020 10:56:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E5AAC873A5 for ; Wed, 11 Mar 2020 10:56:06 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id a5so1561028wmb.0 for ; Wed, 11 Mar 2020 03:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=essensium.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ypfx4o4hH3akD98n2XmQwMNCHVryZ2aG3oS1eXGIdUo=; b=FAu17I9GbOwQhFQJ5mP7WYCys9NZKjEXQCOoF85E2E+HdZdHjJzHQzfV5J4/0fxWrZ +6CeC/tucy0qhAQ9Rn2RSAbmy1bYfW47+rEwv85hhoQPpj2eDehdV/EKzZxUS5pV+b8P mhwJvhb1viaYqy0suJNvQEGg7EeCCSk/YuEu8ZN5gI/KQlAtozdJFYzmsUMUTl+CooA9 9k4RnQO6VNhOXlMLBLcQGREXz0TyMUAVRuyUQTYp8HSm5BmpT5W+tATnv8k5/kljVYti i5wKRagQflSzEYniW+VUfMuizAh5abP2k3IBnnwIkanL/s/MHQbTi0dM1Rl4AKLBrlHX 2O1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ypfx4o4hH3akD98n2XmQwMNCHVryZ2aG3oS1eXGIdUo=; b=dzCkq7DwKXQAgHste8TRaFGewK4YPX7SkTgfup5fPIPUVRn9Y1X83TWvukalZabT8G hMuZPl+o1HdeICnOSgEXznxcdlWAej1ncDfjupv9kU6o5xk/Zzc5iaT8LFMpy5u/zhmA DacUOan3B4gRsK7hkQ4u4y50DvaGNiRGZ8QS6rGFO/1yQn6pxLIGUWyjK+tqErunUGQZ 5N48Nl3It6L22eJBG8kCfLOwbI7u5tfSxXdIzVcn7taKlRWnEFF9cud0H4tvshPt2Cb5 92jRTc3GRqb0PRXHP7QbNnbYcN+prun7ANBF/AIA6v6urwNIUVSu1LmAaXYdVCWn6KYd Yrqw== X-Gm-Message-State: ANhLgQ1H5blSk/sLHe/doUDtrS0jeSO6r7d3OxgtJam4BJvlgwK95Vwl hUcprByTKyMMX6N3k4E0+8lgMSp0pJg= X-Google-Smtp-Source: ADFU+vtvi1lZU+aXrU5nLIzkoHE30o1HcY/di8KDguiPn/b/VQAuZGb3owZKAkSEsB5zgaJRN55UHA== X-Received: by 2002:a7b:c194:: with SMTP id y20mr3293941wmi.129.1583924164070; Wed, 11 Mar 2020 03:56:04 -0700 (PDT) Received: from localhost.localdomain (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id i9sm8072485wmd.37.2020.03.11.03.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 03:56:03 -0700 (PDT) From: Frank Vanbever To: buildroot@buildroot.org Date: Wed, 11 Mar 2020 11:54:47 +0100 Message-Id: <20200311105447.23808-4-frank.vanbever@essensium.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200311105447.23808-1-frank.vanbever@essensium.com> References: <20200228163917.10596-1-frank.vanbever@essensium.com> <20200311105447.23808-1-frank.vanbever@essensium.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 4/4] package/python-iptables: account for platform tag in extensions X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber , Frank Vanbever , Asaf Kahlon Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" EXT_SUFFIX in Python versions > 3.5 contains a platform tag which only applies to cpython extensions. Given that ctypes.util.find_library does not work on the target due to the absence of the underlying tools '.so' needs to be added as a possible suffix for libraries to enable python-iptables to find the iptables shared libraries. Signed-off-by: Frank Vanbever --- v2 -> v3: - Add additional patch to fix python-iptables for python > 3.5 --- ...o-as-additional-shared-object-suffix.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/python-iptables/0002-Add-.so-as-additional-shared-object-suffix.patch diff --git a/package/python-iptables/0002-Add-.so-as-additional-shared-object-suffix.patch b/package/python-iptables/0002-Add-.so-as-additional-shared-object-suffix.patch new file mode 100644 index 0000000000..41d49fc1e6 --- /dev/null +++ b/package/python-iptables/0002-Add-.so-as-additional-shared-object-suffix.patch @@ -0,0 +1,57 @@ +From 899d25c511c6ce779b7153e9ae2e41055b30b9c5 Mon Sep 17 00:00:00 2001 +From: Frank Vanbever +Date: Mon, 9 Mar 2020 12:36:47 +0100 +Subject: [PATCH] Add '.so' as additional shared object suffix + +EXT_SUFFIX includes a platform information tag starting from Python 3.5 [0] +For example: + + >>> sysconfig.get_config_var("EXT_SUFFIX") + '.cpython-38-aarch64-linux-gnu.so' + +This suffix only applies to cpython extensions i.e. not to the iptables shared +objects. + +Adding '.so' as an additional suffix for shared objects fixes the issue. + +Fixes: Issue #301 + +Signed-off-by: Frank Vanbever + +Backported from: 899d25c511c6ce779b7153e9ae2e41055b30b9c5 + +[0]: https://docs.python.org/3/whatsnew/3.5.html#build-and-c-api-changes +--- + iptc/util.py | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/iptc/util.py b/iptc/util.py +index e6b1649..04fe905 100644 +--- a/iptc/util.py ++++ b/iptc/util.py +@@ -80,12 +80,19 @@ def _do_find_library(name): + + + def _find_library(*names): ++ exts = [] + if version_info >= (3, 3): +- ext = get_config_var("EXT_SUFFIX") ++ exts.append(get_config_var("EXT_SUFFIX")) + else: +- ext = get_config_var('SO') ++ exts.append(get_config_var('SO')) ++ ++ if version_info >= (3, 5): ++ exts.append('.so') ++ + for name in names: +- libnames = [name, "lib" + name, name + ext, "lib" + name + ext] ++ libnames = [name, "lib" + name] ++ for ext in exts: ++ libnames += [name + ext, "lib" + name + ext] + libdir = os.environ.get('IPTABLES_LIBDIR', None) + if libdir is not None: + libdirs = libdir.split(':') +-- +2.20.1 +