diff options
author | ken5a4 <ken5a4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-06-01 02:09:34 +0000 |
---|---|---|
committer | ken5a4 <ken5a4@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-06-01 02:09:34 +0000 |
commit | 6495ab64470c38909417ed4f50e9e2222c6ef19b (patch) | |
tree | 98585ffa89d59c97c336435a592eb95614ae9f3f | |
parent | 1048c33c3aebd4c52832d1c4458206b65cda1882 (diff) | |
download | ATCD-6495ab64470c38909417ed4f50e9e2222c6ef19b.tar.gz |
Added ace-tao-orbsvcs-daemon.patch to workaround
daemonization problems in rpm installed services.
Fixed tao-cosconcurrency command line arguments.
-rw-r--r-- | ACE/ChangeLog | 9 | ||||
-rw-r--r-- | ACE/rpmbuild/ace-tao-etc.tar.gz | bin | 2169 -> 2174 bytes | |||
-rw-r--r-- | ACE/rpmbuild/ace-tao-orbsvcs-daemon.patch | 422 | ||||
-rw-r--r-- | ACE/rpmbuild/ace-tao.spec | 9 |
4 files changed, 439 insertions, 1 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 7d7c32ae1c0..b02090b6d05 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,12 @@ +Sun Jun 1 02:01:38 UTC 2008 Ken Sedgwick <ken+5a4@bonsai.com> + + * rpmbuild/ace-tao.spec: + * rpmbuild/ace-tao-etc.tar.gz: + * rpmbuild/ace-tao-orbsvcs-daemon.patch: + Added ace-tao-orbsvcs-daemon.patch to workaround + daemonization problems in rpm installed services. + Fixed tao-cosconcurrency command line arguments. + Fri May 30 13:57:06 UTC 2008 Vladimir Zykov <vzykov@prismtech.com> * ace/config-vxworks6.2.h: diff --git a/ACE/rpmbuild/ace-tao-etc.tar.gz b/ACE/rpmbuild/ace-tao-etc.tar.gz Binary files differindex 9731f5b34c5..add6e3f8f42 100644 --- a/ACE/rpmbuild/ace-tao-etc.tar.gz +++ b/ACE/rpmbuild/ace-tao-etc.tar.gz diff --git a/ACE/rpmbuild/ace-tao-orbsvcs-daemon.patch b/ACE/rpmbuild/ace-tao-orbsvcs-daemon.patch new file mode 100644 index 00000000000..2adca897492 --- /dev/null +++ b/ACE/rpmbuild/ace-tao-orbsvcs-daemon.patch @@ -0,0 +1,422 @@ +--- ACE_wrappers/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp~ 2008-03-28 07:36:30.000000000 -0700 ++++ ACE_wrappers/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp 2008-05-31 16:30:08.000000000 -0700 +@@ -276,6 +276,7 @@ + ACE_TEXT ("-m <1=enable multicast, 0=disable multicast(default) ") + ACE_TEXT ("%s") + ACE_TEXT ("-z <relative round trip timeout> ") ++ ACE_TEXT ("--daemon [run in background as daemon] ") + ACE_TEXT ("\n"), + argv [0], reqNonMinCorba), + -1); +--- ACE_wrappers/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Event_Loader.cpp~ 2007-02-11 23:54:49.000000000 -0800 ++++ ACE_wrappers/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Event_Loader.cpp 2008-05-31 16:30:39.000000000 -0700 +@@ -164,6 +164,7 @@ + ACE_TEXT ("-b [send callBacks on disconnect] ") + ACE_TEXT ("-t [enable typed event channel]") + ACE_TEXT ("-d [destroy typed event channelon shutdown] ") ++ ACE_TEXT ("--daemon [run in background as daemon] ") + ACE_TEXT ("\n"), + argv[0])); + #else +@@ -175,6 +176,7 @@ + ACE_TEXT ("-x [disable naming service bind] ") + ACE_TEXT ("-r [rebind, no AlreadyBound failures] ") + ACE_TEXT ("-b [send callBacks on disconnect] ") ++ ACE_TEXT ("--daemon [run in background as daemon] ") + ACE_TEXT ("\n"), + argv[0])); + #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */ +--- ACE_wrappers/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp~ 2007-02-11 23:54:49.000000000 -0800 ++++ ACE_wrappers/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp 2008-05-31 16:17:36.000000000 -0700 +@@ -20,6 +20,7 @@ + #include "tao/default_ports.h" + #include "tao/IORTable/IORTable.h" + ++#include "ace/Get_Opt.h" + #include "ace/Dynamic_Service.h" + #include "ace/Arg_Shifter.h" + #include "ace/Argv_Type_Converter.h" +@@ -28,6 +28,43 @@ + + ACE_RCSID (Trader, Trading_Loader, "$Id$") + ++// Check for "--daemon" option and daemonize if present. ++namespace ++{ ++ void check_for_daemon (int &argc, ACE_TCHAR* argv[]) ++ { ++ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("-")); ++ get_opts.long_option("daemon"); ++ int c; ++ ++ while ((c = get_opts ()) != -1) ++ { ++ switch (c) ++ { ++ case 0: ++ { ++ // Daemonize, parent exits, child returns here. ++ ACE::daemonize(); ++ ++ // Remove the option from argv [] ++ // to avoid any confusion that might result. ++ for (int i = get_opts.opt_ind (); i != argc; ++i) ++ argv [i-1 ] = argv [i]; ++ ++ // Decrement the value of argc to reflect the removal ++ // of the option. ++ argc = argc - 1; ++ break; ++ } ++ case '?': ++ default: ++ // Don't do anything ... much more parsing elsewhere. ++ break; ++ } ++ } ++ } ++} ++ + TAO_Trading_Loader::TAO_Trading_Loader (void) + : federate_ (0), + ior_output_file_ (0), +@@ -85,6 +122,12 @@ + // Copy command line parameter. + ACE_Argv_Type_Converter command_line(argc, argv); + ++ // Instead of using -ORBDaemon we check for a "--daemon" flag ++ // explicitly. This allows us to daemonize early, before ++ // calling ORB_init. ++ check_for_daemon (command_line.get_argc(), ++ command_line.get_TCHAR_argv()); ++ + // Initialize the ORB Manager + this->orb_manager_.init (command_line.get_argc(), + command_line.get_ASCII_argv()); +--- ACE_wrappers/TAO/orbsvcs/Event_Service/Event_Service.cpp~ 2007-04-17 05:03:07.000000000 -0700 ++++ ACE_wrappers/TAO/orbsvcs/Event_Service/Event_Service.cpp 2008-05-31 16:37:24.000000000 -0700 +@@ -22,6 +22,43 @@ + Event_Service, + "$Id$") + ++// Check for "--daemon" option and daemonize if present. ++namespace ++{ ++ void check_for_daemon (int &argc, ACE_TCHAR* argv[]) ++ { ++ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("-")); ++ get_opts.long_option("daemon"); ++ int c; ++ ++ while ((c = get_opts ()) != -1) ++ { ++ switch (c) ++ { ++ case 0: ++ { ++ // Daemonize, parent exits, child returns here. ++ ACE::daemonize(); ++ ++ // Remove the option from argv [] ++ // to avoid any confusion that might result. ++ for (int i = get_opts.opt_ind (); i != argc; ++i) ++ argv [i-1 ] = argv [i]; ++ ++ // Decrement the value of argc to reflect the removal ++ // of the option. ++ argc = argc - 1; ++ break; ++ } ++ case '?': ++ default: ++ // Don't do anything ... much more parsing elsewhere. ++ break; ++ } ++ } ++ } ++} ++ + int ACE_TMAIN (int argc, ACE_TCHAR* argv[]) + { + bool use_thread_per_consumer = false; +@@ -69,6 +106,12 @@ + // Make a copy of command line parameter. + ACE_Argv_Type_Converter command(argc, argv); + ++ // Instead of using -ORBDaemon we check for a "--daemon" flag ++ // explicitly. This allows us to daemonize early, before ++ // calling ORB_init. ++ check_for_daemon (command.get_argc(), ++ command.get_TCHAR_argv()); ++ + // Initialize ORB. + this->orb_ = + CORBA::ORB_init (command.get_argc(), command.get_ASCII_argv(), ""); +@@ -392,6 +435,7 @@ + ACE_TEXT("-q ec_object_id ") + ACE_TEXT("-x [disable naming service bind] ") + ACE_TEXT("-b [use bidir giop] ") ++ ACE_TEXT("--daemon [run in background as daemon] ") + ACE_TEXT("\n"), + argv[0])); + return -1; +--- ACE_wrappers/TAO/orbsvcs/Naming_Service/Naming_Service.cpp~ 2008-03-31 01:41:47.000000000 -0700 ++++ ACE_wrappers/TAO/orbsvcs/Naming_Service/Naming_Service.cpp 2008-05-31 16:05:29.000000000 -0700 +@@ -7,6 +7,43 @@ + + ACE_RCSID(Naming_Service, Naming_Service, "$Id$") + ++// Check for "--daemon" option and daemonize if present. ++namespace ++{ ++ void check_for_daemon (int &argc, ACE_TCHAR* argv[]) ++ { ++ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("-")); ++ get_opts.long_option("daemon"); ++ int c; ++ ++ while ((c = get_opts ()) != -1) ++ { ++ switch (c) ++ { ++ case 0: ++ { ++ // Daemonize, parent exits, child returns here. ++ ACE::daemonize(); ++ ++ // Remove the option from argv [] ++ // to avoid any confusion that might result. ++ for (int i = get_opts.opt_ind (); i != argc; ++i) ++ argv [i-1 ] = argv [i]; ++ ++ // Decrement the value of argc to reflect the removal ++ // of the option. ++ argc = argc - 1; ++ break; ++ } ++ case '?': ++ default: ++ // Don't do anything ... much more parsing elsewhere. ++ break; ++ } ++ } ++ } ++} ++ + // Default Constructor. + + TAO_Naming_Service::TAO_Naming_Service (void) +@@ -33,6 +70,12 @@ + // Copy command line parameter. + ACE_Argv_Type_Converter command_line(argc, argv); + ++ // Instead of using -ORBDaemon we check for a "--daemon" flag ++ // explicitly. This allows us to daemonize early, before ++ // calling ORB_init. ++ check_for_daemon (command_line.get_argc(), ++ command_line.get_TCHAR_argv()); ++ + // Initialize the ORB + this->orb_ = + CORBA::ORB_init (command_line.get_argc(), command_line.get_ASCII_argv(), 0); +--- ACE_wrappers/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp~ 2007-01-25 10:04:11.000000000 -0800 ++++ ACE_wrappers/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp 2008-05-31 16:07:37.000000000 -0700 +@@ -12,6 +12,43 @@ + CosEvent_Service, + "$Id$") + ++// Check for "--daemon" option and daemonize if present. ++namespace ++{ ++ void check_for_daemon (int &argc, ACE_TCHAR* argv[]) ++ { ++ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("-")); ++ get_opts.long_option("daemon"); ++ int c; ++ ++ while ((c = get_opts ()) != -1) ++ { ++ switch (c) ++ { ++ case 0: ++ { ++ // Daemonize, parent exits, child returns here. ++ ACE::daemonize(); ++ ++ // Remove the option from argv [] ++ // to avoid any confusion that might result. ++ for (int i = get_opts.opt_ind (); i != argc; ++i) ++ argv [i-1 ] = argv [i]; ++ ++ // Decrement the value of argc to reflect the removal ++ // of the option. ++ argc = argc - 1; ++ break; ++ } ++ case '?': ++ default: ++ // Don't do anything ... much more parsing elsewhere. ++ break; ++ } ++ } ++ } ++} ++ + int + ACE_TMAIN (int argc, ACE_TCHAR* argv[]) + { +@@ -22,6 +59,12 @@ + // Copy command line parameter. + ACE_Argv_Type_Converter command_line(argc, argv); + ++ // Instead of using -ORBDaemon we check for a "--daemon" flag ++ // explicitly. This allows us to daemonize early, before ++ // calling ORB_init. ++ check_for_daemon (command_line.get_argc(), ++ command_line.get_TCHAR_argv()); ++ + // Intialize the ORB + CORBA::ORB_var orb = + CORBA::ORB_init (command_line.get_argc(), command_line.get_ASCII_argv(), 0); +--- ACE_wrappers/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.cpp~ 2007-01-25 10:04:11.000000000 -0800 ++++ ACE_wrappers/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.cpp 2008-05-31 16:39:05.000000000 -0700 +@@ -15,6 +15,7 @@ + + #include "Concurrency_Service.h" + ++#include "ace/Get_Opt.h" + #include "ace/Argv_Type_Converter.h" + #include "tao/debug.h" + #include "ace/OS_main.h" +@@ -25,6 +25,43 @@ + Concurrency_Service, + "$Id$") + ++// Check for "--daemon" option and daemonize if present. ++namespace ++{ ++ void check_for_daemon (int &argc, ACE_TCHAR* argv[]) ++ { ++ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("-")); ++ get_opts.long_option("daemon"); ++ int c; ++ ++ while ((c = get_opts ()) != -1) ++ { ++ switch (c) ++ { ++ case 0: ++ { ++ // Daemonize, parent exits, child returns here. ++ ACE::daemonize(); ++ ++ // Remove the option from argv [] ++ // to avoid any confusion that might result. ++ for (int i = get_opts.opt_ind (); i != argc; ++i) ++ argv [i-1 ] = argv [i]; ++ ++ // Decrement the value of argc to reflect the removal ++ // of the option. ++ argc = argc - 1; ++ break; ++ } ++ case '?': ++ default: ++ // Don't do anything ... much more parsing elsewhere. ++ break; ++ } ++ } ++ } ++} ++ + // Default Constructor. + + Concurrency_Service::Concurrency_Service (void) +@@ -75,6 +112,7 @@ + ACE_TEXT("usage: %s") + ACE_TEXT(" [-d]") + ACE_TEXT(" [-o] <ior_output_file>") ++ ACE_TEXT(" [--daemon]") + ACE_TEXT("\n"), + argv[0]), + 1); +@@ -95,6 +133,12 @@ + // Copy command line parameter. + ACE_Argv_Type_Converter command_line(argc, argv); + ++ // Instead of using -ORBDaemon we check for a "--daemon" flag ++ // explicitly. This allows us to daemonize early, before ++ // calling ORB_init. ++ check_for_daemon (command_line.get_argc(), ++ command_line.get_TCHAR_argv()); ++ + if (this->orb_manager_.init_child_poa (command_line.get_argc(), + command_line.get_ASCII_argv(), + "child_poa") == -1) +--- ACE_wrappers/TAO/orbsvcs/Notify_Service/Notify_Service.cpp~ 2008-04-24 12:24:02.000000000 -0700 ++++ ACE_wrappers/TAO/orbsvcs/Notify_Service/Notify_Service.cpp 2008-05-31 16:33:35.000000000 -0700 +@@ -14,6 +14,43 @@ + #include "ace/Synch.h" + #include "ace/Argv_Type_Converter.h" + ++// Check for "--daemon" option and daemonize if present. ++namespace ++{ ++ void check_for_daemon (int &argc, ACE_TCHAR* argv[]) ++ { ++ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("-")); ++ get_opts.long_option("daemon"); ++ int c; ++ ++ while ((c = get_opts ()) != -1) ++ { ++ switch (c) ++ { ++ case 0: ++ { ++ // Daemonize, parent exits, child returns here. ++ ACE::daemonize(); ++ ++ // Remove the option from argv [] ++ // to avoid any confusion that might result. ++ for (int i = get_opts.opt_ind (); i != argc; ++i) ++ argv [i-1 ] = argv [i]; ++ ++ // Decrement the value of argc to reflect the removal ++ // of the option. ++ argc = argc - 1; ++ break; ++ } ++ case '?': ++ default: ++ // Don't do anything ... much more parsing elsewhere. ++ break; ++ } ++ } ++ } ++} ++ + TAO_Notify_Service_Driver::TAO_Notify_Service_Driver (void) + : notify_service_ (0) + , bootstrap_ (false) +@@ -40,6 +77,12 @@ + // Copy command line parameter. + ACE_Argv_Type_Converter command_line(argc, argv); + ++ // Instead of using -ORBDaemon we check for a "--daemon" flag ++ // explicitly. This allows us to daemonize early, before ++ // calling ORB_init. ++ check_for_daemon (command_line.get_argc(), ++ command_line.get_TCHAR_argv()); ++ + this->orb_ = CORBA::ORB_init (command_line.get_argc(), + command_line.get_ASCII_argv()); + +@@ -408,6 +451,7 @@ + "-Boot -[No]NameSvc " + "-IORoutput file_name " + "-Channel -ChannelName channel_name " ++ "--daemon " + "-ORBRunThreads threads\n" + "default: %s -Factory NotifyEventChannelFactory " + "-NameSvc -Channel NotifyEventChannel -ORBRunThreads 1\n", diff --git a/ACE/rpmbuild/ace-tao.spec b/ACE/rpmbuild/ace-tao.spec index 12665574c25..6ce9f78c905 100644 --- a/ACE/rpmbuild/ace-tao.spec +++ b/ACE/rpmbuild/ace-tao.spec @@ -37,7 +37,7 @@ Summary: The ADAPTIVE Communication Environment (ACE) and The ACE ORB (TAO) Name: ace-tao Version: %{ACEVER} -Release: 3%{?OPTTAG}%{?dist} +Release: 4%{?OPTTAG}%{?dist} Group: Development/Libraries URL: http://www.cs.wustl.edu/~schmidt/ACE.html License: DOC License @@ -46,6 +46,7 @@ Source0: http://download.dre.vanderbilt.edu/previous_versions/ACE+TAO+CIAO-%{ACE ## Source2: ace-tao-macros.patch ## Patch0: ace-tao-config.patch ## Patch4: ace-tao-gperf-info.patch +## Patch5: ace-tao-orbsvcs-daemon.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/install-info, /sbin/install-info @@ -615,6 +616,8 @@ export CIAO_ROOT=$TAO_ROOT/CIAO #patch4 -p 1 cat ${ACE_ROOT}/rpmbuild/ace-tao-gperf-info.patch | patch -p 1 +#patch5 -p 1 +cat ${ACE_ROOT}/rpmbuild/ace-tao-orbsvcs-daemon.patch | patch -p 1 # don't use patch8 until we verify wether needed @@ -2169,6 +2172,10 @@ fi # ================================================================ %changelog +* Wed May 28 2008 Ken Sedgwick <ken+5a4@bonsai.com> - 5.6.5-4 +- Added ace-tao-orbsvcs-daemon.patch. +- Fixed tao-cosconcurrency command line arguments. + * Sat May 24 2008 Ken Sedgwick <ken+5a4@bonsai.com> - 5.6.5-3 - Removed obstack patch, no longer needed. - Converted ace-tao-config-ipv6.patch into conditional rpm script. |