All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] package/python-iptables: use installed iptables by default
Date: Wed, 26 Feb 2020 16:33:22 +0100	[thread overview]
Message-ID: <20200226163322.675b66f5@windsurf> (raw)
In-Reply-To: <20200226142617.4170-3-frank.vanbever@essensium.com>

Hello Frank,

On Wed, 26 Feb 2020 15:26:17 +0100
Frank Vanbever <frank.vanbever@essensium.com> wrote:

> diff --git a/package/python-iptables/python-iptables.mk b/package/python-iptables/python-iptables.mk
> index 66e478a89a..086d5b2457 100644
> --- a/package/python-iptables/python-iptables.mk
> +++ b/package/python-iptables/python-iptables.mk
> @@ -9,5 +9,14 @@ PYTHON_IPTABLES_SITE = https://files.pythonhosted.org/packages/08/5e/16a5ca35c42
>  PYTHON_IPTABLES_SETUP_TYPE = setuptools
>  PYTHON_IPTABLES_LICENSE = Apache-2.0
>  PYTHON_IPTABLES_LICENSE_FILES = NOTICE
> +PYTHON_IPTABLES_DEPENDENCIES = iptables
> +
> +define PYTHON_IPTABLES_SET_XTABLES_ENV_VARS
> +	XTABLES_VERSION=`awk '/XTABLES_VERSION_CODE/ {print $$NF}' $(STAGING_DIR)/usr/include/xtables-version.h`; \
> +	sed -i "s/os.getenv(\"PYTHON_IPTABLES_XTABLES_VERSION\")/$$XTABLES_VERSION/" $(@D)/iptc/xtables.py; \
> +	sed -i "s/os.getenv(\"XTABLES_LIBDIR\")/\"\/usr\/lib\/xtables\"/" $(@D)/iptc/xtables.py

This last line is not using the XTABLES_VERSION variable, so it does
not need to be a continuation line from the previous commands.

Also, use % as a sed separator instead of / so that you don't have to
escape all the slashes.

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 ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-02-26 15:33 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 [this message]
2020-02-27 14:56     ` Frank Vanbever
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=20200226163322.675b66f5@windsurf \
    --to=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.