From: Frank Vanbever <frank.vanbever@essensium.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] package/python-iptables: use installed iptables by default
Date: Thu, 27 Feb 2020 15:56:34 +0100 [thread overview]
Message-ID: <1831645.BBFHC3lhqW@wintermute> (raw)
In-Reply-To: <20200226163322.675b66f5@windsurf>
Hi Thomas,
Thank you for the comments.
> But overall, is there a better way ? Like some official way to pass
> these values at build time as setup.py options, with the environment
> variable taking precedence if available ? That would make this
> hopefully acceptable by upstream. Perhaps the setup.py logic could even
> check the xtables-version.h by itself ?
For installations from source this would work. [1] However Python also has the
option of distributing Wheel binary packages, where this logic would not be
executed. [2] This would mean that we put the burden of handling the difference
between installations on the upstream.
I took a second look and actually I think I can propose a workaround to the
upstream. There's 2 problems that need to be tackled.
The first one is loading libxtables.so. iptables installs a libxtables.so
symlink without any version. CDLL has no issues with this so it can just try
and load that if all the other attempts fail.
The second problem is the location of the XTABLES_LIBDIR. Right now it tries
all paths that are mentioned in the output of ldconfig -N -v. I guess it
wouldn't be that much of a stretch to test some sensible locations (/usr/
local/lib/xtables, /usr/lib/xtables etc) if that should fail, in the same vein
as the libc solution. It's not clean but it gets the job done.
I'll see if I can whip something up and submit it upstream.
Best regards,
Frank
[1] https://stackoverflow.com/questions/20288711/post-install-script-with-python-setuptools
[2] https://github.com/pypa/setuptools/issues/1782
next prev parent reply other threads:[~2020-02-27 14:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 14:26 [Buildroot] [PATCH 1/3] package/python-iptables: add explicit dependency on dynamic libs Frank Vanbever
2020-02-26 14:26 ` [Buildroot] [PATCH 2/3] package/python-iptables: try known libc instead of find_library() Frank Vanbever
2020-02-26 15:30 ` Thomas Petazzoni
2020-02-26 14:26 ` [Buildroot] [PATCH 3/3] package/python-iptables: use installed iptables by default Frank Vanbever
2020-02-26 15:33 ` Thomas Petazzoni
2020-02-27 14:56 ` Frank Vanbever [this message]
2020-02-28 16:17 ` Frank Vanbever
2020-02-26 15:27 ` [Buildroot] [PATCH 1/3] package/python-iptables: add explicit dependency on dynamic libs Thomas Petazzoni
2020-02-28 16:39 ` [Buildroot] [PATCH v2 " Frank Vanbever
2020-02-28 16:39 ` [Buildroot] [PATCH v2 2/3] package/python-iptables: try known libc instead of find_library() Frank Vanbever
2020-02-28 16:39 ` [Buildroot] [PATCH v2 3/3] package/python-iptables: use installed iptables by default Frank Vanbever
2020-03-11 10:54 ` [Buildroot] [PATCH v3 1/4] package/python-iptables: add explicit dependency on dynamic libs Frank Vanbever
2020-03-11 10:54 ` [Buildroot] [PATCH v3 2/4] package/python-iptables: try known libc instead of find_library() Frank Vanbever
2020-03-11 10:54 ` [Buildroot] [PATCH v3 3/4] package/python-iptables: use installed iptables by default Frank Vanbever
2022-01-06 21:08 ` Arnout Vandecappelle
2020-03-11 10:54 ` [Buildroot] [PATCH v3 4/4] package/python-iptables: account for platform tag in extensions Frank Vanbever
2020-04-15 20:30 ` [Buildroot] [PATCH v3 1/4] package/python-iptables: add explicit dependency on dynamic libs Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1831645.BBFHC3lhqW@wintermute \
--to=frank.vanbever@essensium.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox