libreparse (2.10+2) unstable; urgency=low

* Added libreparse-plugin-path.patch:
    made plugin search path multi-arch aware
This commit is contained in:
Igor Pashev 2013-09-28 14:02:26 +04:00
parent 9dd51a9b8b
commit 01e54372a7
3 changed files with 100 additions and 0 deletions

View File

@ -1,3 +1,10 @@
libreparse (2.10+2) unstable; urgency=low
* Added libreparse-plugin-path.patch:
made plugin search path multi-arch aware
-- Igor Pashev <pashev.igor@gmail.com> Sat, 28 Sep 2013 13:58:47 +0400
libreparse (2.10+1) unstable; urgency=low
* Initial release.

View File

@ -0,0 +1,92 @@
Index: libreparse/usr/src/lib/libreparse/common/fs_reparse_lib.c
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/common/fs_reparse_lib.c 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/common/fs_reparse_lib.c 2013-09-28 13:54:06.059165347 +0400
@@ -42,7 +42,13 @@
#include <sys/fs_reparse.h>
#include "rp_plugin.h"
+#ifndef RP_LIB_DIR
+# define RP_LIB_DIR "/usr/lib/reparse"
+#endif
+
+#ifndef RP_NO_ISA
#define MAXISALEN 257 /* based on sysinfo(2) man page */
+#endif
static rp_proto_handle_t rp_proto_handle;
static rp_proto_plugin_t *rp_proto_list;
@@ -304,7 +310,7 @@
rp_plugin_init()
{
int err, ret = RP_OK;
- char isa[MAXISALEN], dirpath[MAXPATHLEN], path[MAXPATHLEN];
+ char path[MAXPATHLEN];
int num_protos = 0;
rp_proto_handle_t *rp_hdl;
rp_proto_plugin_t *proto, *tmp;
@@ -314,6 +320,8 @@
DIR *dir;
struct dirent *dent;
+#ifndef RP_NO_ISA
+ char isa[MAXISALEN], dirpath[MAXPATHLEN];
#if defined(_LP64)
if (sysinfo(SI_ARCHITECTURE_64, isa, MAXISALEN) == -1)
isa[0] = '\0';
@@ -323,6 +331,9 @@
(void) snprintf(dirpath, MAXPATHLEN,
"%s/%s", RP_LIB_DIR, isa);
+#else /* defined RP_NO_ISA */
+ const char *dirpath = RP_LIB_DIR;
+#endif /* ! RP_NO_ISA */
if ((dir = opendir(dirpath)) == NULL)
return (RP_NO_PLUGIN_DIR);
Index: libreparse/usr/src/lib/libreparse/common/rp_plugin.h
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/common/rp_plugin.h 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/common/rp_plugin.h 2013-09-28 13:44:17.605631838 +0400
@@ -33,7 +33,6 @@
#include <sys/types.h>
-#define RP_LIB_DIR "/usr/lib/reparse"
#define RP_PLUGIN_V1 1
/*
Index: libreparse/usr/src/lib/libreparse/Makefile.com
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/Makefile.com 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/Makefile.com 2013-09-28 13:54:44.064377538 +0400
@@ -41,6 +41,7 @@
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(COMDIR) -D_FILE_OFFSET_BITS=64
+CPPFLAGS += -DRP_NO_ISA
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
Index: libreparse/usr/src/lib/libreparse/amd64/Makefile
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/amd64/Makefile 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/amd64/Makefile 2013-09-28 13:56:26.869990779 +0400
@@ -26,4 +26,6 @@
include ../Makefile.com
include ../../Makefile.lib.64
+CPPFLAGS += -DRP_LIB_DIR=\"$(DEB_USRLIBDIR_64)/reparse\"
+
install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
Index: libreparse/usr/src/lib/libreparse/i386/Makefile
===================================================================
--- libreparse.orig/usr/src/lib/libreparse/i386/Makefile 2012-10-08 04:25:41.000000000 +0400
+++ libreparse/usr/src/lib/libreparse/i386/Makefile 2013-09-28 13:56:06.136791730 +0400
@@ -25,4 +25,6 @@
include ../Makefile.com
+CPPFLAGS += -DRP_LIB_DIR=\"$(DEB_USRLIBDIR_32)/reparse\"
+
install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)

View File

@ -0,0 +1 @@
libreparse-plugin-path.patch