Bug#350191: pfqueue
Stefano Rivoir wrote:
> If anything is needed in the upstream to "speed" adoption, just ask me
> and it will be done.
Thanks that you asked, I would have come to you with the following two
issues in the next few days anyway:
1. pfqueue uses wrong soname for its libraries
it looks up for libpfqueue.so instead of libpfqueue.so.0.0.0, so it is
not possible to use pfqueue if libpfqueue-dev is not installed. I made a
ugly patch to skit it, you will certainly have a better one:
---snipp---
+diff -Naur pfqueue-0.5.1+debian.orig/libpfq/pfqlib.c
pfqueue-0.5.1+debian/libpfq/pfqlib.c
+--- pfqueue-0.5.1+debian.orig/libpfq/pfqlib.c 2006-01-11
11:39:25.000000000 +0000
++++ pfqueue-0.5.1+debian/libpfq/pfqlib.c 2006-01-28 08:49:34.698482192
+0000
+@@ -20,6 +20,7 @@
+ #include "../pfqmessage.h"
+ #include "../backends/pfq_backend.h"
+
++#define SONAME "0.0.0"
+ #define LOGLEVEL LOG_USER | LOG_ERR
+
+ void *beptr;
+@@ -435,9 +436,9 @@
+ char buf[BUF_SIZE];
+
+ if ( strlen(pfql_conf.backends_path) )
+- sprintf ( buf, "%s/libpfq_%s.so", pfql_conf.backends_path, be );
++ sprintf ( buf, "%s/libpfq_%s.so.%s", pfql_conf.backends_path, be,
SONAME );
+ else
+- sprintf ( buf, "%s/libpfq_%s.so", PFBEDIR, be );
++ sprintf ( buf, "%s/libpfq_%s.so.%s", PFBEDIR, be, SONAME );
+
+ beptr = dlopen ( buf, RTLD_LAZY );
+ if ( !beptr ) {
+@@ -445,9 +446,9 @@
+
+ // Try 'pfqueue' subdir
+ if ( strlen(pfql_conf.backends_path) )
+- sprintf ( buf, "%s/pfqueue/libpfq_%s.so", pfql_conf.backends_path,
be );
++ sprintf ( buf, "%s/pfqueue/libpfq_%s.so.%s",
pfql_conf.backends_path, be, SONAME );
+ else
+- sprintf ( buf, "pfqueue/libpfq_%s.so", be );
++ sprintf ( buf, "pfqueue/libpfq_%s.so.%s", be, SONAME );
+ beptr = dlopen ( buf, RTLD_LAZY );
+ }
+ if ( !beptr ) {
---snapp---
2. pfqueue tries to load the library, without root permission, it
outputs a warning that the library could not be loaded instead of that
it requires root permissions.
Can you fix both issues?
Sample package is available at:
http://archive.daniel-baumann.ch/debian/packages/pfqueue/
Regards,
Daniel
--
Address: Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email: daniel.baumann@panthera-systems.net
Internet: http://people.panthera-systems.net/~daniel-baumann/
Reply to: