[Debian-ha-commits] [libqb] 01/03: Support hurd-i386, patch by Svante Signell, thanks! Closes: #803777.

Christoph Berg myon at debian.org
Fri Feb 19 10:21:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

myon pushed a commit to branch master
in repository libqb.

commit a996549f34c212d895cc2654c794d7f5315a2fe9
Author: Christoph Berg <myon at debian.org>
Date:   Fri Feb 19 11:12:33 2016 +0100

    Support hurd-i386, patch by Svante Signell, thanks! Closes: #803777.
---
 debian/changelog                  |   7 ++
 debian/libqb0.symbols.hurd-i386   | 241 ++++++++++++++++++++++++++++++++++++++
 debian/patches/hurd-support.patch | 143 ++++++++++++++++++++++
 debian/patches/series             |   1 +
 debian/rules                      |   3 +-
 5 files changed, 394 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 3fbe425..aa01dfa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libqb (0.17.2.real-5) UNRELEASED; urgency=medium
+
+  * Support hurd-i386, patch by Svante Signell, thanks!
+    Closes: #803777.
+
+ -- Christoph Berg <myon at debian.org>  Fri, 19 Feb 2016 10:35:47 +0100
+
 libqb (0.17.2.real-4) unstable; urgency=medium
 
   * Add debian/libqb0.symbols.ppc64 symlink.
diff --git a/debian/libqb0.symbols.hurd-i386 b/debian/libqb0.symbols.hurd-i386
new file mode 100644
index 0000000..52a7acc
--- /dev/null
+++ b/debian/libqb0.symbols.hurd-i386
@@ -0,0 +1,241 @@
+libqb.so.0 libqb0 #MINVER#
+* Build-Depends-Package: libqb-dev
+ __start___verbose at Base 0.11.1
+ __stop___verbose at Base 0.11.1
+ facilitynames at Base 0.11.1
+ qb_array_create at Base 0.11.1
+ qb_array_create_2 at Base 0.11.1
+ qb_array_elems_per_bin_get at Base 0.11.1
+ qb_array_free at Base 0.11.1
+ qb_array_grow at Base 0.11.1
+ qb_array_index at Base 0.11.1
+ qb_array_new_bin_cb_set at Base 0.14.3
+ qb_array_num_bins_get at Base 0.11.1
+ qb_atomic_init at Base 0.11.1
+ qb_atomic_int_add at Base 0.11.1
+ qb_atomic_int_compare_and_exchange at Base 0.11.1
+ qb_atomic_int_exchange_and_add at Base 0.11.1
+ qb_atomic_int_get at Base 0.11.1
+ qb_atomic_int_set at Base 0.11.1
+ qb_atomic_pointer_compare_and_exchange at Base 0.11.1
+ qb_atomic_pointer_get at Base 0.11.1
+ qb_atomic_pointer_set at Base 0.11.1
+ qb_hashtable_create at Base 0.11.1
+ qb_hdb_base_convert at Base 0.11.1
+ qb_hdb_create at Base 0.11.1
+ qb_hdb_destroy at Base 0.11.1
+ qb_hdb_handle_create at Base 0.11.1
+ qb_hdb_handle_destroy at Base 0.11.1
+ qb_hdb_handle_get at Base 0.11.1
+ qb_hdb_handle_get_always at Base 0.11.1
+ qb_hdb_handle_put at Base 0.11.1
+ qb_hdb_handle_refcount_get at Base 0.11.1
+ qb_hdb_iterator_next at Base 0.11.1
+ qb_hdb_iterator_reset at Base 0.11.1
+ qb_hdb_nocheck_convert at Base 0.11.1
+ qb_ipc_us_ready at Base 0.14.2
+ qb_ipc_us_recv at Base 0.11.1
+ qb_ipc_us_send at Base 0.11.1
+ qb_ipc_us_sock_error_is_disconnected at Base 0.14.2
+ qb_ipcc_connect at Base 0.11.1
+ qb_ipcc_context_get at Base 0.11.1
+ qb_ipcc_context_set at Base 0.11.1
+ qb_ipcc_disconnect at Base 0.11.1
+ qb_ipcc_event_recv at Base 0.11.1
+ qb_ipcc_fc_enable_max_set at Base 0.11.1
+ qb_ipcc_fd_get at Base 0.11.1
+ qb_ipcc_get_buffer_size at Base 0.17.0
+ qb_ipcc_is_connected at Base 0.14.2
+ qb_ipcc_recv at Base 0.11.1
+ qb_ipcc_send at Base 0.11.1
+ qb_ipcc_sendv at Base 0.11.1
+ qb_ipcc_sendv_recv at Base 0.11.1
+ qb_ipcc_shm_connect at Base 0.11.1
+ qb_ipcc_us_connect at Base 0.11.1
+ qb_ipcc_us_setup_connect at Base 0.11.1
+ qb_ipcc_us_sock_close at Base 0.11.1
+ qb_ipcc_verify_dgram_max_msg_size at Base 0.16.0
+ qb_ipcs_connection_alloc at Base 0.11.1
+ qb_ipcs_connection_auth_set at Base 0.14.2
+ qb_ipcs_connection_first_get at Base 0.11.1
+ qb_ipcs_connection_get_buffer_size at Base 0.17.0
+ qb_ipcs_connection_next_get at Base 0.11.1
+ qb_ipcs_connection_ref at Base 0.11.1
+ qb_ipcs_connection_service_context_get at Base 0.16.0
+ qb_ipcs_connection_stats_get at Base 0.11.1
+ qb_ipcs_connection_stats_get_2 at Base 0.14.2
+ qb_ipcs_connection_unref at Base 0.11.1
+ qb_ipcs_context_get at Base 0.11.1
+ qb_ipcs_context_set at Base 0.11.1
+ qb_ipcs_create at Base 0.13.0
+ qb_ipcs_destroy at Base 0.11.1
+ qb_ipcs_disconnect at Base 0.11.1
+ qb_ipcs_dispatch_connection_request at Base 0.11.1
+ qb_ipcs_enforce_buffer_size at Base 0.17.0
+ qb_ipcs_event_send at Base 0.11.1
+ qb_ipcs_event_sendv at Base 0.11.1
+ qb_ipcs_poll_handlers_set at Base 0.11.1
+ qb_ipcs_ref at Base 0.11.1
+ qb_ipcs_request_rate_limit at Base 0.11.1
+ qb_ipcs_response_send at Base 0.11.1
+ qb_ipcs_response_sendv at Base 0.11.1
+ qb_ipcs_run at Base 0.11.1
+ qb_ipcs_service_context_get at Base 0.16.0
+ qb_ipcs_service_context_set at Base 0.16.0
+ qb_ipcs_service_id_get at Base 0.11.1
+ qb_ipcs_shm_init at Base 0.11.1
+ qb_ipcs_stats_get at Base 0.11.1
+ qb_ipcs_unref at Base 0.11.1
+ qb_ipcs_us_init at Base 0.11.1
+ qb_ipcs_us_publish at Base 0.11.1
+ qb_ipcs_us_withdraw at Base 0.11.1
+ qb_log_blackbox_open at Base 0.11.1
+ qb_log_blackbox_print_from_file at Base 0.11.1
+ qb_log_blackbox_write_to_file at Base 0.11.1
+ qb_log_callsite_get at Base 0.11.1
+ qb_log_callsites_dump at Base 0.11.1
+ qb_log_callsites_register at Base 0.11.1
+ qb_log_ctl at Base 0.14.0
+ qb_log_custom_close at Base 0.11.1
+ qb_log_custom_open at Base 0.11.1
+ qb_log_dcs_fini at Base 0.11.1
+ qb_log_dcs_get at Base 0.11.1
+ qb_log_dcs_init at Base 0.11.1
+ qb_log_facility2int at Base 0.11.1
+ qb_log_facility2str at Base 0.11.1
+ qb_log_file_close at Base 0.11.1
+ qb_log_file_open at Base 0.11.1
+ qb_log_filter_ctl2 at Base 0.17.1
+ qb_log_filter_ctl at Base 0.17.1
+ qb_log_filter_fn_set at Base 0.11.1
+ qb_log_fini at Base 0.11.1
+ qb_log_format_fini at Base 0.14.4
+ qb_log_format_init at Base 0.14.4
+ qb_log_format_set at Base 0.11.1
+ qb_log_from_external_source at Base 0.11.1
+ qb_log_from_external_source_va at Base 0.11.1
+ qb_log_init at Base 0.11.1
+ qb_log_priority2str at Base 0.14.2
+ qb_log_real_ at Base 0.11.1
+ qb_log_real_va_ at Base 0.11.1
+ qb_log_stderr_open at Base 0.11.1
+ qb_log_syslog_open at Base 0.11.1
+ qb_log_tags_stringify_fn_set at Base 0.11.1
+ qb_log_target_alloc at Base 0.11.1
+ qb_log_target_format at Base 0.11.1
+ qb_log_target_format_static at Base 0.11.1
+ qb_log_target_free at Base 0.11.1
+ qb_log_target_get at Base 0.11.1
+ qb_log_target_user_data_get at Base 0.11.1
+ qb_log_target_user_data_set at Base 0.11.1
+ qb_log_thread_log_post at Base 0.11.1
+ qb_log_thread_log_write at Base 0.11.1
+ qb_log_thread_priority_set at Base 0.11.1
+ qb_log_thread_start at Base 0.11.1
+ qb_log_thread_stop at Base 0.11.1
+ qb_loop_create at Base 0.11.1
+ qb_loop_default_get at Base 0.11.1
+ qb_loop_destroy at Base 0.11.1
+ qb_loop_job_add at Base 0.11.1
+ qb_loop_job_del at Base 0.11.1
+ qb_loop_jobs_create at Base 0.11.1
+ qb_loop_jobs_destroy at Base 0.11.1
+ qb_loop_level_item_add at Base 0.11.1
+ qb_loop_level_item_del at Base 0.11.1
+ qb_loop_poll_add at Base 0.11.1
+ qb_loop_poll_create at Base 0.11.1
+ qb_loop_poll_del at Base 0.11.1
+ qb_loop_poll_destroy at Base 0.11.1
+ qb_loop_poll_low_fds_event_set at Base 0.11.1
+ qb_loop_poll_mod at Base 0.11.1
+ qb_loop_run at Base 0.11.1
+ qb_loop_signal_add at Base 0.11.1
+ qb_loop_signal_del at Base 0.11.1
+ qb_loop_signal_mod at Base 0.11.1
+ qb_loop_signals_create at Base 0.11.1
+ qb_loop_signals_destroy at Base 0.11.1
+ qb_loop_stop at Base 0.11.1
+ qb_loop_timer_add at Base 0.11.1
+ qb_loop_timer_create at Base 0.11.1
+ qb_loop_timer_del at Base 0.11.1
+ qb_loop_timer_destroy at Base 0.11.1
+ qb_loop_timer_expire_time_get at Base 0.11.1
+ qb_loop_timer_is_running at Base 0.11.1
+ qb_loop_timer_msec_duration_to_expire at Base 0.11.1
+ qb_map_count_get at Base 0.11.1
+ qb_map_destroy at Base 0.11.1
+ qb_map_foreach at Base 0.11.1
+ qb_map_get at Base 0.11.1
+ qb_map_iter_create at Base 0.11.1
+ qb_map_iter_free at Base 0.11.1
+ qb_map_iter_next at Base 0.11.1
+ qb_map_notify_add at Base 0.11.1
+ qb_map_notify_del at Base 0.11.1
+ qb_map_notify_del_2 at Base 0.11.1
+ qb_map_pref_iter_create at Base 0.11.1
+ qb_map_put at Base 0.11.1
+ qb_map_rm at Base 0.11.1
+ qb_poll_fds_usage_check_ at Base 0.14.2
+ qb_poll_init at Base 0.17.2
+ qb_rb_chmod at Base 0.14.2
+ qb_rb_chown at Base 0.11.1
+ qb_rb_chunk_alloc at Base 0.11.1
+ qb_rb_chunk_commit at Base 0.11.1
+ qb_rb_chunk_peek at Base 0.11.1
+ qb_rb_chunk_read at Base 0.11.1
+ qb_rb_chunk_reclaim at Base 0.11.1
+ qb_rb_chunk_write at Base 0.11.1
+ qb_rb_chunks_used at Base 0.11.1
+ qb_rb_close at Base 0.11.1
+ qb_rb_create_from_file at Base 0.11.1
+ qb_rb_force_close at Base 0.11.1
+ qb_rb_name_get at Base 0.11.1
+ qb_rb_open at Base 0.11.1
+ qb_rb_open_2 at Base 0.16.0
+ qb_rb_refcount_get at Base 0.11.1
+ qb_rb_sem_create at Base 0.11.1
+ qb_rb_shared_user_data_get at Base 0.11.1
+ qb_rb_space_free at Base 0.11.1
+ qb_rb_space_used at Base 0.11.1
+ qb_rb_write_to_file at Base 0.11.1
+ qb_sigpipe_ctl at Base 0.16.0
+ qb_skiplist_create at Base 0.11.1
+ qb_socket_nosigpipe at Base 0.16.0
+ qb_strerror_r at Base 0.11.1
+ qb_sys_circular_mmap at Base 0.11.1
+ qb_sys_fd_nonblock_cloexec_set at Base 0.11.1
+ qb_sys_mmap_file_open at Base 0.11.1
+ qb_thread_lock at Base 0.11.1
+ qb_thread_lock_create at Base 0.11.1
+ qb_thread_lock_destroy at Base 0.11.1
+ qb_thread_trylock at Base 0.11.1
+ qb_thread_unlock at Base 0.11.1
+ qb_timespec_add_ms at Base 0.11.1
+ qb_trie_create at Base 0.11.1
+ qb_trie_dump at Base 0.11.1
+ qb_util_nano_current_get at Base 0.11.1
+ qb_util_nano_from_epoch_get at Base 0.11.1
+ qb_util_nano_monotonic_hz at Base 0.11.1
+ qb_util_set_log_function at Base 0.11.1
+ qb_util_stopwatch_create at Base 0.11.1
+ qb_util_stopwatch_free at Base 0.11.1
+ qb_util_stopwatch_sec_elapsed_get at Base 0.11.1
+ qb_util_stopwatch_split at Base 0.11.1
+ qb_util_stopwatch_split_ctl at Base 0.11.1
+ qb_util_stopwatch_split_last at Base 0.11.1
+ qb_util_stopwatch_start at Base 0.11.1
+ qb_util_stopwatch_stop at Base 0.11.1
+ qb_util_stopwatch_time_split_get at Base 0.11.1
+ qb_util_stopwatch_us_elapsed_get at Base 0.11.1
+ qb_util_timespec_from_epoch_get at Base 0.11.1
+ qb_vsnprintf_deserialize at Base 0.11.1
+ qb_vsnprintf_serialize at Base 0.14.2
+ rpl_sem_destroy at Base 0.17.2
+ rpl_sem_getvalue at Base 0.17.2
+ rpl_sem_init at Base 0.17.2
+ rpl_sem_post at Base 0.17.2
+ rpl_sem_timedwait at Base 0.17.2
+ rpl_sem_trywait at Base 0.17.2
+ rpl_sem_wait at Base 0.17.2
+ strlcat at Base 0.11.1
+ strlcpy at Base 0.11.1
diff --git a/debian/patches/hurd-support.patch b/debian/patches/hurd-support.patch
new file mode 100644
index 0000000..ee6c31f
--- /dev/null
+++ b/debian/patches/hurd-support.patch
@@ -0,0 +1,143 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -202,10 +202,26 @@ AC_CHECK_FUNCS([alarm clock_gettime ftru
+ 		pthread_spin_lock pthread_setschedparam \
+                 pthread_mutexattr_setpshared \
+                 pthread_condattr_setpshared \
+-		sem_timedwait semtimedop \
++		semtimedop \
+ 		sched_get_priority_max sched_setscheduler \
+ 		getpeerucred getpeereid])
+ 
++		AC_MSG_CHECKING(for a working sem_timedwait)
++		LDFLAGS=-lpthread
++		AC_RUN_IFELSE([AC_LANG_PROGRAM(
++[[#include <semaphore.h>]],
++[[sem_t sem;
++struct timespec ts;
++if (sem_init(&sem, 0, 0) == -1) return -1;
++if(sem_timedwait(&sem, &ts)==-1) return -1;]])],
++			  [
++			    AC_MSG_RESULT([yes])
++			    AC_DEFINE_UNQUOTED([HAVE_SEM_TIMEDWAIT], [1], [Define to 1 if sem_timedwait works])
++			  ],
++			  [
++			    AC_MSG_RESULT([no])
++			  ])
++
+ AM_CONDITIONAL(HAVE_SEM_TIMEDWAIT,
+ 	       [test "x$ac_cv_func_sem_timedwait" = xyes])
+ AM_CONDITIONAL(HAVE_EPOLL,
+@@ -341,6 +357,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])
+ 	;;
+--- a/lib/log_thread.c
++++ b/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;
+ 		}
+--- a/lib/ipc_socket.c
++++ b/lib/ipc_socket.c
+@@ -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
+ 	res = bind(request_fd, (struct sockaddr *)&local_address,
+@@ -287,7 +287,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;
+@@ -298,7 +298,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);
+@@ -422,7 +422,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;
+ 			}
+@@ -657,7 +657,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;
+@@ -670,7 +670,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);
+--- a/lib/unix.c
++++ b/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);
+--- a/lib/ipc_setup.c
++++ b/lib/ipc_setup.c
+@@ -394,7 +394,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 + 1, UNIX_PATH_MAX - 1, "%s", s->name);
+ #else
+ 	{
+@@ -426,7 +426,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
diff --git a/debian/patches/series b/debian/patches/series
index 0dafc9e..2e66677 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Fix-check_ipc-tests-so-they-exit-correctly.patch
 1908e6c15b6e3acbf083189117b314c0791f016d.patch
 testsuite-fix-timeout
+hurd-support.patch
diff --git a/debian/rules b/debian/rules
index fefb194..2f168ab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,7 +32,8 @@ override_dh_auto_build:
 	$(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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/libqb.git



More information about the Debian-HA-Commits mailing list