Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow explicitly picking the xtables version #226

Merged
merged 1 commit into from
Feb 1, 2018

Conversation

benjaminp
Copy link
Contributor

@benjaminp benjaminp commented Jan 31, 2018

If I have multiple libxtable versions, I might want python-iptables to use a
version that doesn't come from the libxtables.so symlink. Add a
PYTHON_IPTABLES_XTABLES_VERSION that facilitates this.

For example,
$ IPTABLES_LIBDIR=/usr/lib/x86_64-linux-gnu/ PYTHON_IPTABLES_XTABLES_VERSION=11 somecommand.py
uses version 11 of xtables.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 59.397% when pulling 52247b9 on benjaminp:xtables-version-by-env into 583f939 on ldx:master.

@coveralls
Copy link

coveralls commented Jan 31, 2018

Coverage Status

Coverage increased (+0.002%) to 59.386% when pulling d4537ea on benjaminp:xtables-version-by-env into a2abf9d on ldx:master.

iptc/xtables.py Outdated
_searchlib = "libxtables.so.%s" % (xtables_version,)
else:
_searchlib = "xtables"
print(_searchlib)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this print statement? I assume it's only there for debugging purposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, indeed. Fixed now.

If I have multiple libxtable v 80ersions, I might want python-iptables to use a
version that doesn't come from the libxtables.so symlink. Add a
PYTHON_IPTABLES_XTABLES_VERSION that facilitates this.

For example,
$ IPTABLES_LIBDIR=/usr/lib/x86_64-linux-gnu/ PYTHON_IPTABLES_XTABLES_VERSION=11 somecommand.py
uses version 11 of xtables.
@ldx ldx merged commit baf3509 into ldx:master Feb 1, 2018
@ldx
Copy link
Owner

ldx commented Feb 1, 2018

Thanks!

@benjaminp benjaminp deleted the xtables-version-by-env branch February 1, 2018 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants