All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH] py: load the SONAME-versioned shared object
@ 2019-12-10 11:00 Arturo Borrero Gonzalez
  2019-12-10 11:21 ` Phil Sutter
  0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2019-12-10 11:00 UTC (permalink / raw)
  To: netfilter-devel; +Cc: biebl, phil, eric

Instruct the python module to load the SONAME versioned shared object.

Normal end-user systems may only have available libnftables.so.1.0.0 and not
libnftables.so which is usually only present in developer systems.

In Debian systems, for example:

 % dpkg -L libnftables1 | grep so.1
 /usr/lib/x86_64-linux-gnu/libnftables.so.1.0.0
 /usr/lib/x86_64-linux-gnu/libnftables.so.1

 % dpkg -L libnftables-dev | grep so
 /usr/lib/x86_64-linux-gnu/libnftables.so

The "1" is not a magic number, is the SONAME of libnftables in the current
version, as stated in Make_global.am.

Reported-by: Michael Biebl <biebl@debian.org>
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
---
 py/nftables.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/py/nftables.py b/py/nftables.py
index 48eb54fe..2a0a1e89 100644
--- a/py/nftables.py
+++ b/py/nftables.py
@@ -64,7 +64,7 @@ class Nftables:
 
     validator = None
 
-    def __init__(self, sofile="libnftables.so"):
+    def __init__(self, sofile="libnftables.so.1"):
         """Instantiate a new Nftables class object.
 
         Accepts a shared object file to open, by default standard search path


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [nft PATCH] py: load the SONAME-versioned shared object
  2019-12-10 11:00 [nft PATCH] py: load the SONAME-versioned shared object Arturo Borrero Gonzalez
@ 2019-12-10 11:21 ` Phil Sutter
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Sutter @ 2019-12-10 11:21 UTC (permalink / raw)
  To: Arturo Borrero Gonzalez; +Cc: netfilter-devel, biebl, eric

Hi,

On Tue, Dec 10, 2019 at 12:00:45PM +0100, Arturo Borrero Gonzalez wrote:
> Instruct the python module to load the SONAME versioned shared object.
> 
> Normal end-user systems may only have available libnftables.so.1.0.0 and not
> libnftables.so which is usually only present in developer systems.
> 
> In Debian systems, for example:
> 
>  % dpkg -L libnftables1 | grep so.1
>  /usr/lib/x86_64-linux-gnu/libnftables.so.1.0.0
>  /usr/lib/x86_64-linux-gnu/libnftables.so.1
> 
>  % dpkg -L libnftables-dev | grep so
>  /usr/lib/x86_64-linux-gnu/libnftables.so
> 
> The "1" is not a magic number, is the SONAME of libnftables in the current
> version, as stated in Make_global.am.

My intention was to avoid the SONAME dependency, but you're right - it
causes more trouble than good. Who knows, maybe nftables.py does at some
point depend on a specific libntables version.

> Reported-by: Michael Biebl <biebl@debian.org>
> Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>

Acked-by: Phil Sutter <phil@nwl.cc>

Feel free to push this out, Arturo.

Thanks, Phil

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-10 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-10 11:00 [nft PATCH] py: load the SONAME-versioned shared object Arturo Borrero Gonzalez
2019-12-10 11:21 ` Phil Sutter

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.