From f17997c0dee8db01c2258de4ddc794b492395382 Mon Sep 17 00:00:00 2001 From: stevetraylen Date: Jun 12 2010 22:55:35 +0000 Subject: rhbz#602594 and rhbz#603157. --- diff --git a/blocked-signals-with-pthr.patch b/blocked-signals-with-pthr.patch new file mode 100644 index 0000000..63e81dd --- /dev/null +++ b/blocked-signals-with-pthr.patch @@ -0,0 +1,67 @@ +Update of /cvsroot/cilogon/myproxy +In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22471 + +Modified Files: + VERSION myproxy_server.c +Log Message: +work-around for Globus libraries blocking signals (SIGTERM, +SIGCHLD, SIGHUP, etc.) when building myproxy-server with pthr +flavor (http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=7048) + + +Index: myproxy_server.c +=================================================================== +RCS file: /cvsroot/cilogon/myproxy/myproxy_server.c,v +retrieving revision 1.203 +retrieving revision 1.204 +diff -C2 -d -r1.203 -r1.204 +*** myproxy_server.c 5 Mar 2010 18:04:32 -0000 1.203 +--- myproxy_server.c 10 Jun 2010 22:31:46 -0000 1.204 +*************** +*** 177,180 **** +--- 177,181 ---- + struct sockaddr_in client_addr; + socklen_t client_addr_len = sizeof(client_addr); ++ sigset_t mysigset; + + myproxy_socket_attrs_t *socket_attrs; +*************** +*** 195,198 **** +--- 196,201 ---- + memset(server_context, 0, sizeof(*server_context)); + ++ sigemptyset(&mysigset); ++ + /* Set context defaults */ + server_context->run_as_daemon = 1; +*************** +*** 242,246 **** +--- 245,251 ---- + /* If process is killed or Ctrl-C */ + my_signal(SIGTERM, sig_exit); ++ sigaddset(&mysigset, SIGTERM); + my_signal(SIGINT, sig_exit); ++ sigaddset(&mysigset, SIGINT); + + /* Read my configuration */ +*************** +*** 288,297 **** +--- 293,308 ---- + /* Set up signal handling to deal with zombie processes left over */ + my_signal(SIGCHLD, sig_chld); ++ sigaddset(&mysigset, SIGCHLD); + + /* Re-read configuration file on SIGHUP */ + my_signal(SIGHUP, sig_hup); ++ sigaddset(&mysigset, SIGHUP); + + /* Set up concurrent server */ + while (1) { ++ ++ /* make sure Globus hasn't blocked signals we care about */ ++ sigprocmask(SIG_UNBLOCK, &mysigset, NULL); ++ + socket_attrs->socket_fd = accept(listenfd, + (struct sockaddr *) &client_addr, + + diff --git a/myproxy-globus-usage-location.patch b/myproxy-globus-usage-location.patch deleted file mode 100644 index 27b5843..0000000 --- a/myproxy-globus-usage-location.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -uNr myproxy-5.0.ORIG/configure.in myproxy-5.0/configure.in ---- myproxy-5.0.ORIG/configure.in 2009-12-04 21:50:19.000000000 +0100 -+++ myproxy-5.0/configure.in 2009-12-04 22:06:55.000000000 +0100 -@@ -88,16 +88,13 @@ - dnl - dnl Check for globus_usage_stats_send_array - dnl --AC_CHECK_LIB(globus_usage_$GLOBUS_FLAVOR_NAME, -- globus_usage_stats_send_array, --[ LIBS="$LIBS -lglobus_usage_$GLOBUS_FLAVOR_NAME -lglobus_xio_$GLOBUS_FLAVOR_NAME"], -- AC_DEFINE(NO_GLOBUS_USAGE)) -+AC_SEARCH_LIBS(globus_usage_stats_send_array,globus_usage globus_usage_$GLOBUS_FLAVOR_NAME, , -+ AC_DEFINE(NO_GLOBUS_USAGE)) - dnl - dnl Check for globus_gsi_proxy_handle_set_extensions - dnl --AC_CHECK_LIB(globus_gsi_proxy_core_$GLOBUS_FLAVOR_NAME, -- globus_gsi_proxy_handle_set_extensions, -- AC_DEFINE(HAVE_GLOBUS_GSI_PROXY_HANDLE_SET_EXTENSIONS)) -+AC_SEARCH_LIBS(globus_gsi_proxy_handle_set_extensions, globus_gsi_proxy_core globus_gsi_proxy_core_$GLOBUS_FLAVOR_NAME, -+ AC_DEFINE(HAVE_GLOBUS_GSI_PROXY_HANDLE_SET_EXTENSIONS)) - dnl - dnl Check for OCSP - dnl diff --git a/myproxy.init b/myproxy.init index b026fae..ebac8df 100644 --- a/myproxy.init +++ b/myproxy.init @@ -40,6 +40,7 @@ lockfile=/var/lock/subsys/$prog start() { + status $prog > /dev/null && echo -n $"$prog already running: " && success && echo && exit 0 echo -n $"Starting $prog: " daemon --user $MYPROXY_USER X509_USER_CERT=$X509_USER_CERT X509_USER_KEY=$X509_USER_KEY $exec $MYPROXY_OPTIONS retval=$? diff --git a/myproxy.spec b/myproxy.spec index c63596d..d8cb3cd 100644 --- a/myproxy.spec +++ b/myproxy.spec @@ -8,7 +8,7 @@ Name: myproxy Version: 5.1 -Release: 2%{?dist} +Release: 2%{?dist}.1 Summary: Manage X.509 Public Key Infrastructure (PKI) security credentials Group: System Environment/Daemons @@ -19,6 +19,10 @@ Source1: myproxy.init Source2: myproxy.sysconfig Source3: README.Fedora +# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=602594 +# Upstream bug: http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=7048 +Patch0: blocked-signals-with-pthr.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: globus-gss-assist-devel > 3 @@ -153,6 +157,7 @@ Package %{name}-doc contains the MyProxy documentation. %prep %setup -q +%patch0 cp -p %{SOURCE1} . cp -p %{SOURCE2} . cp -p %{SOURCE3} . @@ -393,6 +398,9 @@ fi %{_libdir}/pkgconfig/myproxy.pc %changelog +* Sat Jun 12 2010 Steve Traylen - 5.1-2 1 +- Add blocked-signals-with-pthr.patch patch, rhbz#602594 +- Updated init.d script rhbz#603157 * Tue Mar 16 2010 Steve Traylen - 5.1-2 - Add globus-usage-devel as requires to myproxy-devel, rhbz#574116 * Tue Mar 9 2010 Steve Traylen - 5.1-1