Source: libqb Version: 0.17.2.real-4 Severity: normal Tags: patch Usertags: hurd User: debian-h...@lists.debian.org
Currently libqb FTBFS on hurd-i386 due to missing support for GNU/Hurd. The attached patch, hurd-support.patch adds the necessary entries. It is built on the patch in #803776. Additionally, since 4 out of 8 tests fails (investigation ongoing), dh_auto_test is set to ignore the test results, see, rules2.patch, same as for kfreebsd-*. Additionally, the symbols file for hurd-i386 is attached. Thanks!
--- a/rules.orig 2015-09-23 10:41:56.000000000 +0200 +++ b/debian/rules 2015-11-01 22:44:38.983596438 +0100 @@ -32,7 +36,8 @@ $(MAKE) doxygen rm docs/html/*.md5 -ifneq ($(filter $(DEB_BUILD_ARCH), kfreebsd-amd64 kfreebsd-i386),) +# don't make the testsuite fail the build on GNU/Hurd, 4 of 8 tests fail +ifneq ($(filter $(DEB_BUILD_ARCH), kfreebsd-amd64 kfreebsd-i386 hurd-i386),) override_dh_auto_test: -dh_auto_test endif
Index: libqb-0.17.2.real/configure.ac =================================================================== --- libqb-0.17.2.real.orig/configure.ac +++ libqb-0.17.2.real/configure.ac @@ -341,6 +341,11 @@ case "$host_os" in CP=rsync AC_MSG_RESULT([Solaris]) ;; + *gnu*) + AC_DEFINE_UNQUOTED([QB_GNU], [1], + [Compiling for GNU/Hurd platform]) + AC_MSG_RESULT([GNU]) + ;; *) AC_MSG_ERROR([Unsupported OS? hmmmm]) ;; Index: libqb-0.17.2.real/lib/log_thread.c =================================================================== --- libqb-0.17.2.real.orig/lib/log_thread.c +++ libqb-0.17.2.real/lib/log_thread.c @@ -164,7 +164,11 @@ qb_log_thread_start(void) if (logt_sched_param_queued) { res = qb_log_thread_priority_set(logt_sched_policy, +#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX) logt_sched_param.sched_priority); +#else + 0); +#endif if (res != 0) { goto cleanup_pthread; } Index: libqb-0.17.2.real/lib/ipc_socket.c =================================================================== --- libqb-0.17.2.real.orig/lib/ipc_socket.c +++ libqb-0.17.2.real/lib/ipc_socket.c @@ -50,7 +50,7 @@ set_sock_addr(struct sockaddr_un *addres address->sun_len = QB_SUN_LEN(address); #endif -#if defined(QB_LINUX) || defined(QB_CYGWIN) +#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU) snprintf(address->sun_path, sizeof(address->sun_path), "%s", socket_name); #else snprintf(address->sun_path, sizeof(address->sun_path), "%s/%s", SOCKETDIR, @@ -79,7 +79,7 @@ qb_ipc_dgram_sock_setup(const char *base } snprintf(sock_path, PATH_MAX, "%s-%s", base_name, service_name); set_sock_addr(&local_address, sock_path); -#if !(defined(QB_LINUX) || defined(QB_CYGWIN)) +#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)) res = unlink(local_address.sun_path); #endif /* Note: This makes the race go away even if res=-1 due to ENOENT */ @@ -289,7 +289,7 @@ _finish_connecting(struct qb_ipc_one_way static void qb_ipcc_us_disconnect(struct qb_ipcc_connection *c) { -#if !(defined(QB_LINUX) || defined(QB_CYGWIN)) +#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)) struct sockaddr_un un_addr; socklen_t un_addr_len = sizeof(struct sockaddr_un); char *base_name; @@ -300,7 +300,7 @@ qb_ipcc_us_disconnect(struct qb_ipcc_con munmap(c->request.u.us.shared_data, SHM_CONTROL_SIZE); unlink(c->request.u.us.shared_file_name); -#if !(defined(QB_LINUX) || defined(QB_CYGWIN)) +#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)) if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) { length = strlen(un_addr.sun_path); base_name = strndup(un_addr.sun_path,length-9); @@ -424,7 +424,7 @@ retry_peek: if (errno != EAGAIN) { final_rc = -errno; -#if !(defined(QB_LINUX) || defined(QB_CYGWIN)) +#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)) if (errno == ECONNRESET || errno == EPIPE) { final_rc = -ENOTCONN; } @@ -659,7 +659,7 @@ _sock_rm_from_mainloop(struct qb_ipcs_co static void qb_ipcs_us_disconnect(struct qb_ipcs_connection *c) { -#if !(defined(QB_LINUX) || defined(QB_CYGWIN)) +#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)) struct sockaddr_un un_addr; socklen_t un_addr_len = sizeof(struct sockaddr_un); char *base_name; @@ -672,7 +672,7 @@ qb_ipcs_us_disconnect(struct qb_ipcs_con c->state == QB_IPCS_CONNECTION_ACTIVE) { _sock_rm_from_mainloop(c); -#if !(defined(QB_LINUX) || defined(QB_CYGWIN)) +#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)) if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) { length = strlen(un_addr.sun_path); base_name = strndup(un_addr.sun_path,length-8); Index: libqb-0.17.2.real/lib/unix.c =================================================================== --- libqb-0.17.2.real.orig/lib/unix.c +++ libqb-0.17.2.real/lib/unix.c @@ -80,7 +80,7 @@ qb_sys_mmap_file_open(char *path, const if (is_absolute) { (void)strlcpy(path, file, PATH_MAX); } else { -#if defined(QB_LINUX) || defined(QB_CYGWIN) +#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU) snprintf(path, PATH_MAX, "/dev/shm/%s", file); #else snprintf(path, PATH_MAX, LOCALSTATEDIR "/run/%s", file); Index: libqb-0.17.2.real/lib/ipc_setup.c =================================================================== --- libqb-0.17.2.real.orig/lib/ipc_setup.c +++ libqb-0.17.2.real/lib/ipc_setup.c @@ -42,6 +42,8 @@ #include "util_int.h" #include "ipc_int.h" +#include <stdio.h> + struct ipc_auth_ugp { uid_t uid; gid_t gid; @@ -282,7 +284,7 @@ qb_ipcc_stream_sock_connect(const char * address.sun_len = QB_SUN_LEN(&address); #endif -#if defined(QB_LINUX) || defined(QB_CYGWIN) +#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU) snprintf(address.sun_path, sizeof(address.sun_path), "%s", socket_name); #else snprintf(address.sun_path, sizeof(address.sun_path), "%s/%s", SOCKETDIR, @@ -294,6 +296,9 @@ qb_ipcc_stream_sock_connect(const char * goto error_connect; } + fprintf (stderr, "ipc_setup.c: socket_name=%s\n", socket_name); + fprintf (stderr, "ipc_setup.c: address.sun_path=%s\n", address.sun_path); + fflush (stderr); *sock_pt = request_fd; return 0; @@ -394,7 +399,7 @@ qb_ipcs_us_publish(struct qb_ipcs_servic #endif qb_util_log(LOG_INFO, "server name: %s", s->name); -#if defined(QB_LINUX) || defined(QB_CYGWIN) +#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU) snprintf(un_addr.sun_path, sizeof(un_addr.sun_path), "%s", s->name); #else { @@ -415,6 +420,9 @@ qb_ipcs_us_publish(struct qb_ipcs_servic res = bind(s->server_sock, (struct sockaddr *)&un_addr, QB_SUN_LEN(&un_addr)); + fprintf (stderr, "ipc_setup.c: s->name=%s\n", s->name); + fprintf (stderr, "ipc_setup.c: un_addr.sun_path=%s\n", un_addr.sun_path); + fflush (stderr); if (res) { res = -errno; qb_util_perror(LOG_ERR, "Could not bind AF_UNIX (%s)", @@ -426,7 +434,7 @@ qb_ipcs_us_publish(struct qb_ipcs_servic * Allow everyone to write to the socket since the IPC layer handles * security automatically */ -#if !defined(QB_LINUX) && !defined(QB_CYGWIN) +#if !defined(QB_LINUX) && !defined(QB_CYGWIN) && !defined(QB_GNU) res = chmod(un_addr.sun_path, S_IRWXU | S_IRWXG | S_IRWXO); #endif #ifdef SO_PASSCRED
libqb.so.0 libqb0 #MINVER# * Build-Depends-Package: libqb-dev __start___verbose@Base 0.11.1 __stop___verbose@Base 0.11.1 facilitynames@Base 0.11.1 qb_array_create@Base 0.11.1 qb_array_create_2@Base 0.11.1 qb_array_elems_per_bin_get@Base 0.11.1 qb_array_free@Base 0.11.1 qb_array_grow@Base 0.11.1 qb_array_index@Base 0.11.1 qb_array_new_bin_cb_set@Base 0.14.3 qb_array_num_bins_get@Base 0.11.1 qb_atomic_init@Base 0.11.1 qb_atomic_int_add@Base 0.11.1 qb_atomic_int_compare_and_exchange@Base 0.11.1 qb_atomic_int_exchange_and_add@Base 0.11.1 qb_atomic_int_get@Base 0.11.1 qb_atomic_int_set@Base 0.11.1 qb_atomic_pointer_compare_and_exchange@Base 0.11.1 qb_atomic_pointer_get@Base 0.11.1 qb_atomic_pointer_set@Base 0.11.1 qb_hashtable_create@Base 0.11.1 qb_hdb_base_convert@Base 0.11.1 qb_hdb_create@Base 0.11.1 qb_hdb_destroy@Base 0.11.1 qb_hdb_handle_create@Base 0.11.1 qb_hdb_handle_destroy@Base 0.11.1 qb_hdb_handle_get@Base 0.11.1 qb_hdb_handle_get_always@Base 0.11.1 qb_hdb_handle_put@Base 0.11.1 qb_hdb_handle_refcount_get@Base 0.11.1 qb_hdb_iterator_next@Base 0.11.1 qb_hdb_iterator_reset@Base 0.11.1 qb_hdb_nocheck_convert@Base 0.11.1 qb_ipc_us_ready@Base 0.14.2 qb_ipc_us_recv@Base 0.11.1 qb_ipc_us_send@Base 0.11.1 qb_ipc_us_sock_error_is_disconnected@Base 0.14.2 qb_ipcc_connect@Base 0.11.1 qb_ipcc_context_get@Base 0.11.1 qb_ipcc_context_set@Base 0.11.1 qb_ipcc_disconnect@Base 0.11.1 qb_ipcc_event_recv@Base 0.11.1 qb_ipcc_fc_enable_max_set@Base 0.11.1 qb_ipcc_fd_get@Base 0.11.1 qb_ipcc_get_buffer_size@Base 0.17.0 qb_ipcc_is_connected@Base 0.14.2 qb_ipcc_recv@Base 0.11.1 qb_ipcc_send@Base 0.11.1 qb_ipcc_sendv@Base 0.11.1 qb_ipcc_sendv_recv@Base 0.11.1 qb_ipcc_shm_connect@Base 0.11.1 qb_ipcc_us_connect@Base 0.11.1 qb_ipcc_us_setup_connect@Base 0.11.1 qb_ipcc_us_sock_close@Base 0.11.1 qb_ipcc_verify_dgram_max_msg_size@Base 0.16.0 qb_ipcs_connection_alloc@Base 0.11.1 qb_ipcs_connection_auth_set@Base 0.14.2 qb_ipcs_connection_first_get@Base 0.11.1 qb_ipcs_connection_get_buffer_size@Base 0.17.0 qb_ipcs_connection_next_get@Base 0.11.1 qb_ipcs_connection_ref@Base 0.11.1 qb_ipcs_connection_service_context_get@Base 0.16.0 qb_ipcs_connection_stats_get@Base 0.11.1 qb_ipcs_connection_stats_get_2@Base 0.14.2 qb_ipcs_connection_unref@Base 0.11.1 qb_ipcs_context_get@Base 0.11.1 qb_ipcs_context_set@Base 0.11.1 qb_ipcs_create@Base 0.13.0 qb_ipcs_destroy@Base 0.11.1 qb_ipcs_disconnect@Base 0.11.1 qb_ipcs_dispatch_connection_request@Base 0.11.1 qb_ipcs_enforce_buffer_size@Base 0.17.0 qb_ipcs_event_send@Base 0.11.1 qb_ipcs_event_sendv@Base 0.11.1 qb_ipcs_poll_handlers_set@Base 0.11.1 qb_ipcs_ref@Base 0.11.1 qb_ipcs_request_rate_limit@Base 0.11.1 qb_ipcs_response_send@Base 0.11.1 qb_ipcs_response_sendv@Base 0.11.1 qb_ipcs_run@Base 0.11.1 qb_ipcs_service_context_get@Base 0.16.0 qb_ipcs_service_context_set@Base 0.16.0 qb_ipcs_service_id_get@Base 0.11.1 qb_ipcs_shm_init@Base 0.11.1 qb_ipcs_stats_get@Base 0.11.1 qb_ipcs_unref@Base 0.11.1 qb_ipcs_us_init@Base 0.11.1 qb_ipcs_us_publish@Base 0.11.1 qb_ipcs_us_withdraw@Base 0.11.1 qb_log_blackbox_open@Base 0.11.1 qb_log_blackbox_print_from_file@Base 0.11.1 qb_log_blackbox_write_to_file@Base 0.11.1 qb_log_callsite_get@Base 0.11.1 qb_log_callsites_dump@Base 0.11.1 qb_log_callsites_register@Base 0.11.1 qb_log_ctl@Base 0.14.0 qb_log_custom_close@Base 0.11.1 qb_log_custom_open@Base 0.11.1 qb_log_dcs_fini@Base 0.11.1 qb_log_dcs_get@Base 0.11.1 qb_log_dcs_init@Base 0.11.1 qb_log_facility2int@Base 0.11.1 qb_log_facility2str@Base 0.11.1 qb_log_file_close@Base 0.11.1 qb_log_file_open@Base 0.11.1 qb_log_filter_ctl2@Base 0.17.1 qb_log_filter_ctl@Base 0.17.1 qb_log_filter_fn_set@Base 0.11.1 qb_log_fini@Base 0.11.1 qb_log_format_fini@Base 0.14.4 qb_log_format_init@Base 0.14.4 qb_log_format_set@Base 0.11.1 qb_log_from_external_source@Base 0.11.1 qb_log_from_external_source_va@Base 0.11.1 qb_log_init@Base 0.11.1 qb_log_priority2str@Base 0.14.2 qb_log_real_@Base 0.11.1 qb_log_real_va_@Base 0.11.1 qb_log_stderr_open@Base 0.11.1 qb_log_syslog_open@Base 0.11.1 qb_log_tags_stringify_fn_set@Base 0.11.1 qb_log_target_alloc@Base 0.11.1 qb_log_target_format@Base 0.11.1 qb_log_target_format_static@Base 0.11.1 qb_log_target_free@Base 0.11.1 qb_log_target_get@Base 0.11.1 qb_log_target_user_data_get@Base 0.11.1 qb_log_target_user_data_set@Base 0.11.1 qb_log_thread_log_post@Base 0.11.1 qb_log_thread_log_write@Base 0.11.1 qb_log_thread_priority_set@Base 0.11.1 qb_log_thread_start@Base 0.11.1 qb_log_thread_stop@Base 0.11.1 qb_loop_create@Base 0.11.1 qb_loop_default_get@Base 0.11.1 qb_loop_destroy@Base 0.11.1 qb_loop_job_add@Base 0.11.1 qb_loop_job_del@Base 0.11.1 qb_loop_jobs_create@Base 0.11.1 qb_loop_jobs_destroy@Base 0.11.1 qb_loop_level_item_add@Base 0.11.1 qb_loop_level_item_del@Base 0.11.1 qb_loop_poll_add@Base 0.11.1 qb_loop_poll_create@Base 0.11.1 qb_loop_poll_del@Base 0.11.1 qb_loop_poll_destroy@Base 0.11.1 qb_loop_poll_low_fds_event_set@Base 0.11.1 qb_loop_poll_mod@Base 0.11.1 qb_loop_run@Base 0.11.1 qb_loop_signal_add@Base 0.11.1 qb_loop_signal_del@Base 0.11.1 qb_loop_signal_mod@Base 0.11.1 qb_loop_signals_create@Base 0.11.1 qb_loop_signals_destroy@Base 0.11.1 qb_loop_stop@Base 0.11.1 qb_loop_timer_add@Base 0.11.1 qb_loop_timer_create@Base 0.11.1 qb_loop_timer_del@Base 0.11.1 qb_loop_timer_destroy@Base 0.11.1 qb_loop_timer_expire_time_get@Base 0.11.1 qb_loop_timer_is_running@Base 0.11.1 qb_loop_timer_msec_duration_to_expire@Base 0.11.1 qb_map_count_get@Base 0.11.1 qb_map_destroy@Base 0.11.1 qb_map_foreach@Base 0.11.1 qb_map_get@Base 0.11.1 qb_map_iter_create@Base 0.11.1 qb_map_iter_free@Base 0.11.1 qb_map_iter_next@Base 0.11.1 qb_map_notify_add@Base 0.11.1 qb_map_notify_del@Base 0.11.1 qb_map_notify_del_2@Base 0.11.1 qb_map_pref_iter_create@Base 0.11.1 qb_map_put@Base 0.11.1 qb_map_rm@Base 0.11.1 qb_poll_fds_usage_check_@Base 0.14.2 qb_poll_init@Base 0.17.2.real-4.2 qb_rb_chmod@Base 0.14.2 qb_rb_chown@Base 0.11.1 qb_rb_chunk_alloc@Base 0.11.1 qb_rb_chunk_commit@Base 0.11.1 qb_rb_chunk_peek@Base 0.11.1 qb_rb_chunk_read@Base 0.11.1 qb_rb_chunk_reclaim@Base 0.11.1 qb_rb_chunk_write@Base 0.11.1 qb_rb_chunks_used@Base 0.11.1 qb_rb_close@Base 0.11.1 qb_rb_create_from_file@Base 0.11.1 qb_rb_force_close@Base 0.11.1 qb_rb_name_get@Base 0.11.1 qb_rb_open@Base 0.11.1 qb_rb_open_2@Base 0.16.0 qb_rb_refcount_get@Base 0.11.1 qb_rb_sem_create@Base 0.11.1 qb_rb_shared_user_data_get@Base 0.11.1 qb_rb_space_free@Base 0.11.1 qb_rb_space_used@Base 0.11.1 qb_rb_write_to_file@Base 0.11.1 qb_sigpipe_ctl@Base 0.16.0 qb_skiplist_create@Base 0.11.1 qb_socket_nosigpipe@Base 0.16.0 qb_strerror_r@Base 0.11.1 qb_sys_circular_mmap@Base 0.11.1 qb_sys_fd_nonblock_cloexec_set@Base 0.11.1 qb_sys_mmap_file_open@Base 0.11.1 qb_thread_lock@Base 0.11.1 qb_thread_lock_create@Base 0.11.1 qb_thread_lock_destroy@Base 0.11.1 qb_thread_trylock@Base 0.11.1 qb_thread_unlock@Base 0.11.1 qb_timespec_add_ms@Base 0.11.1 qb_trie_create@Base 0.11.1 qb_trie_dump@Base 0.11.1 qb_util_nano_current_get@Base 0.11.1 qb_util_nano_from_epoch_get@Base 0.11.1 qb_util_nano_monotonic_hz@Base 0.11.1 qb_util_set_log_function@Base 0.11.1 qb_util_stopwatch_create@Base 0.11.1 qb_util_stopwatch_free@Base 0.11.1 qb_util_stopwatch_sec_elapsed_get@Base 0.11.1 qb_util_stopwatch_split@Base 0.11.1 qb_util_stopwatch_split_ctl@Base 0.11.1 qb_util_stopwatch_split_last@Base 0.11.1 qb_util_stopwatch_start@Base 0.11.1 qb_util_stopwatch_stop@Base 0.11.1 qb_util_stopwatch_time_split_get@Base 0.11.1 qb_util_stopwatch_us_elapsed_get@Base 0.11.1 qb_util_timespec_from_epoch_get@Base 0.11.1 qb_vsnprintf_deserialize@Base 0.11.1 qb_vsnprintf_serialize@Base 0.14.2 strlcat@Base 0.11.1 strlcpy@Base 0.11.1