diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-02-19 22:28:43 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-02-19 22:28:43 +0000 |
commit | 6e0522736a436502ebb61fd5d178d0bdf8ed57b4 (patch) | |
tree | 6f8d32a178568dff5b22e2ca8bb8e6197788ba2a /syseventd/debian/patches | |
parent | 5a992ebc2286c7afdfab2553be94a03dcd4888ed (diff) | |
download | illumos-packaging-6e0522736a436502ebb61fd5d178d0bdf8ed57b4.tar.gz |
syseventd
Diffstat (limited to 'syseventd/debian/patches')
9 files changed, 283 insertions, 0 deletions
diff --git a/syseventd/debian/patches/series b/syseventd/debian/patches/series new file mode 100644 index 0000000..e23f8a9 --- /dev/null +++ b/syseventd/debian/patches/series @@ -0,0 +1,8 @@ +syseventd-pointers.patch +syseventconfd-pointers.patch +syseventd-gnu-ld.patch +syseventd-devfsadmd_mod.c-use-system-devfsadm.h.patch +syseventd-devfsadmd_mod-pointers.patch +syseventd-sysevent_conf_mod-pointers.patch +syseventd-sysevent_reg_mod-pointers.patch +syseventd-zfs_mod-avoid-libcmdutils.patch diff --git a/syseventd/debian/patches/syseventconfd-pointers.patch b/syseventd/debian/patches/syseventconfd-pointers.patch new file mode 100644 index 0000000..7e6b4b5 --- /dev/null +++ b/syseventd/debian/patches/syseventconfd-pointers.patch @@ -0,0 +1,13 @@ +Index: syseventd/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd.c +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd.c 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/daemons/syseventconfd/syseventconfd.c 2013-02-19 16:21:46.922235373 +0000 +@@ -183,7 +183,7 @@ + (void) thr_sigsetmask(SIG_BLOCK, &set, NULL); + + /* Create signal catching thread */ +- if (thr_create(NULL, NULL, (void *(*)(void *))sigwait_thr, ++ if (thr_create(NULL, 0, (void *(*)(void *))sigwait_thr, + (void *)NULL, 0, NULL) < 0) { + syserrmsg(INIT_THR_CREATE_ERR, strerror(errno)); + exit(2); diff --git a/syseventd/debian/patches/syseventd-devfsadmd_mod-pointers.patch b/syseventd/debian/patches/syseventd-devfsadmd_mod-pointers.patch new file mode 100644 index 0000000..89c550f --- /dev/null +++ b/syseventd/debian/patches/syseventd-devfsadmd_mod-pointers.patch @@ -0,0 +1,13 @@ +Index: syseventd/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c 2013-02-19 19:43:10.228800830 +0000 ++++ syseventd/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c 2013-02-19 19:44:04.445996225 +0000 +@@ -333,7 +333,7 @@ + (void) mutex_init(&evq_lock, USYNC_THREAD, NULL); + (void) cond_init(&evq_cv, USYNC_THREAD, NULL); + +- if (thr_create(NULL, NULL, (void *(*)(void *))devfsadmd_deliver_thr, ++ if (thr_create(NULL, 0, (void *(*)(void *))devfsadmd_deliver_thr, + NULL, THR_BOUND, &deliver_thr_id) != 0) { + (void) mutex_destroy(&evq_lock); + (void) cond_destroy(&evq_cv); diff --git a/syseventd/debian/patches/syseventd-devfsadmd_mod.c-use-system-devfsadm.h.patch b/syseventd/debian/patches/syseventd-devfsadmd_mod.c-use-system-devfsadm.h.patch new file mode 100644 index 0000000..7be2c09 --- /dev/null +++ b/syseventd/debian/patches/syseventd-devfsadmd_mod.c-use-system-devfsadm.h.patch @@ -0,0 +1,19 @@ +Index: syseventd/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c 2013-02-19 19:42:27.597624607 +0000 ++++ syseventd/usr/src/cmd/syseventd/modules/devfsadmd_mod/devfsadmd_mod.c 2013-02-19 19:43:10.228800830 +0000 +@@ -32,13 +32,13 @@ + #include <synch.h> + #include <syslog.h> + #include <libintl.h> ++#include <devfsadm.h> + #include <sys/stat.h> + #include <sys/sunddi.h> + + #include <libsysevent.h> + + #include "sysevent_signal.h" +-#include "../devfsadm/devfsadm.h" + + /* + * SLM for devfsadmd device configuration daemon diff --git a/syseventd/debian/patches/syseventd-gnu-ld.patch b/syseventd/debian/patches/syseventd-gnu-ld.patch new file mode 100644 index 0000000..55be60c --- /dev/null +++ b/syseventd/debian/patches/syseventd-gnu-ld.patch @@ -0,0 +1,24 @@ +Index: syseventd/usr/src/cmd/syseventd/modules/Makefile.com +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/modules/Makefile.com 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/modules/Makefile.com 2013-02-19 17:12:57.118877296 +0000 +@@ -37,7 +37,6 @@ + + SRCDIR = . + HSONAME = +-MAPFILES = $(SRC)/cmd/syseventd/modules/mapfile-extern + + # + # sysevent loadable modules require sysevent header files +Index: syseventd/usr/src/cmd/syseventd/daemons/syseventd/Makefile +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/daemons/syseventd/Makefile 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/daemons/syseventd/Makefile 2013-02-19 17:12:39.490491620 +0000 +@@ -30,6 +30,7 @@ + include ../Makefile.com + + CERRWARN += -_gcc=-Wno-uninitialized ++syseventd := LDFLAGS += -_gcc=-rdynamic + + .KEEP_STATE: + diff --git a/syseventd/debian/patches/syseventd-pointers.patch b/syseventd/debian/patches/syseventd-pointers.patch new file mode 100644 index 0000000..f965b63 --- /dev/null +++ b/syseventd/debian/patches/syseventd-pointers.patch @@ -0,0 +1,27 @@ +Index: syseventd/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/daemons/syseventd/syseventd.c 2013-02-19 16:20:32.797204099 +0000 +@@ -452,19 +452,19 @@ + syseventd_exit(2); + } + +- if (thr_create(NULL, NULL, (void *(*)(void *))dispatch_message, ++ if (thr_create(NULL, 0, (void *(*)(void *))dispatch_message, + (void *)0, 0, NULL) < 0) { + syseventd_err_print(INIT_THR_CREATE_ERR, strerror(errno)); + syseventd_exit(2); + } +- if (thr_create(NULL, NULL, ++ if (thr_create(NULL, 0, + (void *(*)(void *))event_completion_thr, NULL, + THR_BOUND, NULL) != 0) { + syseventd_err_print(INIT_THR_CREATE_ERR, strerror(errno)); + syseventd_exit(2); + } + /* Create signal catching thread */ +- if (thr_create(NULL, NULL, (void *(*)(void *))sigwait_thr, ++ if (thr_create(NULL, 0, (void *(*)(void *))sigwait_thr, + NULL, 0, NULL) < 0) { + syseventd_err_print(INIT_THR_CREATE_ERR, strerror(errno)); + syseventd_exit(2); diff --git a/syseventd/debian/patches/syseventd-sysevent_conf_mod-pointers.patch b/syseventd/debian/patches/syseventd-sysevent_conf_mod-pointers.patch new file mode 100644 index 0000000..08ee131 --- /dev/null +++ b/syseventd/debian/patches/syseventd-sysevent_conf_mod-pointers.patch @@ -0,0 +1,13 @@ +Index: syseventd/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/modules/sysevent_conf_mod/sysevent_conf_mod.c 2013-02-19 19:47:13.703285458 +0000 +@@ -2209,7 +2209,7 @@ + /* + * Create thread to flush cmd queue + */ +- if ((err = thr_create(NULL, NULL, (void *(*)(void*))queue_flush_thr, ++ if ((err = thr_create(NULL, 0, (void *(*)(void*))queue_flush_thr, + (void *)NULL, 0, &cmdq_thr_id)) != 0) { + syslog(LOG_ERR, THR_CREATE_ERR, strerror(err)); + sysevent_close_channel(confd_handle); diff --git a/syseventd/debian/patches/syseventd-sysevent_reg_mod-pointers.patch b/syseventd/debian/patches/syseventd-sysevent_reg_mod-pointers.patch new file mode 100644 index 0000000..cf7b5bf --- /dev/null +++ b/syseventd/debian/patches/syseventd-sysevent_reg_mod-pointers.patch @@ -0,0 +1,13 @@ +Index: syseventd/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/modules/sysevent_reg_mod/sysevent_reg_mod.c 2013-02-19 19:48:09.820553309 +0000 +@@ -232,7 +232,7 @@ + (void) mutex_init(&evq_lock, USYNC_THREAD, NULL); + (void) cond_init(&evq_cv, USYNC_THREAD, NULL); + +- if (thr_create(NULL, NULL, (void *(*)(void *))subscriber_deliver_thr, ++ if (thr_create(NULL, 0, (void *(*)(void *))subscriber_deliver_thr, + NULL, 0, &deliver_thr_id) != 0) { + syseventd_err_print(INIT_SUB_THR_CREATE_ERR, strerror(errno)); + return (NULL); diff --git a/syseventd/debian/patches/syseventd-zfs_mod-avoid-libcmdutils.patch b/syseventd/debian/patches/syseventd-zfs_mod-avoid-libcmdutils.patch new file mode 100644 index 0000000..926114d --- /dev/null +++ b/syseventd/debian/patches/syseventd-zfs_mod-avoid-libcmdutils.patch @@ -0,0 +1,153 @@ +Index: syseventd/usr/src/cmd/syseventd/modules/zfs_mod/Makefile +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/modules/zfs_mod/Makefile 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/modules/zfs_mod/Makefile 2013-02-19 21:35:38.708792660 +0000 +@@ -26,8 +26,7 @@ + + include ../Makefile.com + +-CPPFLAGS += -I../../../../lib/libc/inc +-LDLIBS += -lzfs -ldevid -lcmdutils -lnvpair ++LDLIBS += -lzfs -ldevid -lnvpair + + CERRWARN += -_gcc=-Wno-uninitialized + +Index: syseventd/usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c +=================================================================== +--- syseventd.orig/usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c 2012-10-08 00:25:34.000000000 +0000 ++++ syseventd/usr/src/cmd/syseventd/modules/zfs_mod/zfs_mod.c 2013-02-19 22:17:16.549156734 +0000 +@@ -70,7 +70,6 @@ + #include <stdlib.h> + #include <string.h> + #include <syslog.h> +-#include <sys/list.h> + #include <sys/sunddi.h> + #include <sys/sysevent/eventdefs.h> + #include <sys/sysevent/dev.h> +@@ -88,6 +87,126 @@ + #error Unknown architecture + #endif + ++/* To avoid conflicts with sys/list.h*/ ++ ++#define list_node __list_node ++#define list_node_t __list_node_t ++#define list __list ++#define list_t __list_t ++ ++#define list_create __list_create ++#define list_destroy __list_destroy ++#define list_head __list_head ++#define list_insert_tail __list_insert_tail ++#define list_next __list_next ++#define list_prev __list_prev ++#define list_remove __list_remove ++ ++ ++#ifdef list_d2l ++# undef list_d2l ++#endif ++#ifdef list_object ++# undef list_object ++#endif ++#ifdef list_empty ++# undef list_empty ++#endif ++#ifdef list_insert_before_node ++# undef list_insert_before_node ++#endif ++#ifdef list_remove_node ++# undef list_remove_node ++#endif ++ ++#define list_d2l(a, obj) ((list_node_t *)(((char *)obj) + (a)->list_offset)) ++#define list_empty(a) ((a)->list_head.list_next == &(a)->list_head) ++#define list_is_empty(a) list_empty(a) ++#define list_object(a, node) ((void *)(((char *)node) - (a)->list_offset)) ++ ++#define list_insert_before_node(list, node, object) { \ ++ list_node_t *lnew = list_d2l(list, object); \ ++ lnew->list_next = (node); \ ++ lnew->list_prev = (node)->list_prev; \ ++ (node)->list_prev->list_next = lnew; \ ++ (node)->list_prev = lnew; \ ++} ++ ++#define list_remove_node(node) \ ++ (node)->list_prev->list_next = (node)->list_next; \ ++ (node)->list_next->list_prev = (node)->list_prev; \ ++ (node)->list_next = (node)->list_prev = NULL ++ ++ ++struct list_node { ++ struct list_node *list_next; ++ struct list_node *list_prev; ++}; ++ ++struct list { ++ size_t list_size; ++ size_t list_offset; ++ struct list_node list_head; ++}; ++ ++typedef struct list_node list_node_t; ++typedef struct list list_t; ++ ++static void ++list_create(list_t *list, size_t size, size_t offset) ++{ ++ list->list_size = size; ++ list->list_offset = offset; ++ list->list_head.list_next = list->list_head.list_prev = ++ &list->list_head; ++} ++static void ++list_destroy(list_t *list) ++{ ++ list_node_t *node = &list->list_head; ++ node->list_next = node->list_prev = NULL; ++} ++static void * ++list_head(list_t *list) ++{ ++ if (list_empty(list)) ++ return (NULL); ++ return (list_object(list, list->list_head.list_next)); ++} ++static void ++list_insert_tail(list_t *list, void *object) ++{ ++ list_node_t *lold = &list->list_head; ++ list_insert_before_node(list, lold, object); ++} ++static void * ++list_next(list_t *list, void *object) ++{ ++ list_node_t *node = list_d2l(list, object); ++ ++ if (node->list_next != &list->list_head) ++ return (list_object(list, node->list_next)); ++ ++ return (NULL); ++} ++static void * ++list_prev(list_t *list, void *object) ++{ ++ list_node_t *node = list_d2l(list, object); ++ ++ if (node->list_prev != &list->list_head) ++ return (list_object(list, node->list_prev)); ++ ++ return (NULL); ++} ++static void ++list_remove(list_t *list, void *object) ++{ ++ list_node_t *lold = list_d2l(list, object); ++ list_remove_node(lold); ++} ++ ++ + typedef void (*zfs_process_func_t)(zpool_handle_t *, nvlist_t *, boolean_t); + + libzfs_handle_t *g_zfshdl; |