[wso2-wsf-cpp] - Added FORTIFY_SOURCE flag - Added patch to remove exit(0) calls in wsf shared libs

Peter MacKinnon pmackinn at fedoraproject.org
Thu Jul 12 22:58:48 UTC 2012


commit 6ba98fce19a922ffe491487fdb0b465199e38ce1
Author: Peter MacKinnon <pmackinn at redhat.com>
Date:   Thu Jul 12 18:58:04 2012 -0400

    - Added FORTIFY_SOURCE flag
    - Added patch to remove exit(0) calls in wsf shared libs

 remove_exit0_calls_for_rpmlint.patch |   34 ++++++++++++++++++++++++++++++++++
 wso2-wsf-cpp.spec                    |   12 ++++++++++--
 2 files changed, 44 insertions(+), 2 deletions(-)
---
diff --git a/remove_exit0_calls_for_rpmlint.patch b/remove_exit0_calls_for_rpmlint.patch
new file mode 100644
index 0000000..6530976
--- /dev/null
+++ b/remove_exit0_calls_for_rpmlint.patch
@@ -0,0 +1,34 @@
+diff --git a/src/main/Environment.cpp b/src/main/Environment.cpp
+index bc9f852..cd7a431 100644
+--- a/src/main/Environment.cpp
++++ b/src/main/Environment.cpp
+@@ -65,7 +65,6 @@ const axutil_env_t* WSF_CALL Environment::getEnv()
+ 		}else
+ 		{
+ 			printf("Environment creation failed");
+-			exit(0);
+ 		}
+ 	}		
+ 	return env;
+@@ -120,8 +119,6 @@ void WSF_CALL Environment::initialize(std::string logFileName, axutil_log_levels
+ 	axutil_env_t *env = axutil_env_create_all(logFileName.c_str(), logLevel);
+ 	if(env){
+ 		setEnv(env);
+-	}else{
+-		exit(0);
+ 	}
+ }
+ 
+diff --git a/wsf_c/axis2c/util/src/dir_handler.c b/wsf_c/axis2c/util/src/dir_handler.c
+index 4a5e51e..d75b2e4 100644
+--- a/wsf_c/axis2c/util/src/dir_handler.c
++++ b/wsf_c/axis2c/util/src/dir_handler.c
+@@ -200,7 +200,7 @@ axutil_dir_handler_list_service_or_module_dirs(
+     AXIS2_ENV_CHECK(env, NULL);
+     file_list = axutil_array_list_create(env, 0);
+     if(!AXIS2_GETCWD(cwd, 500))
+-        exit(1);
++        return NULL;
+ 
+     /* pathname is path of services directory or modules directory. */
+     chdir_result = AXIS2_CHDIR(pathname);
diff --git a/wso2-wsf-cpp.spec b/wso2-wsf-cpp.spec
index 7fd7999..cecf244 100644
--- a/wso2-wsf-cpp.spec
+++ b/wso2-wsf-cpp.spec
@@ -25,7 +25,7 @@
 Name: %{pkg_name}
 Summary: WSO2 Web Services Framework for C++
 Version: %{pkg_ver}
-Release: 10%{?dist}
+Release: 11%{?dist}
 Group: Development/Tools
 License: ASL 2.0
 URL: http://wso2.org/library/wsf/cpp
@@ -56,6 +56,8 @@ Patch4: prevent_free_of_static_chars.patch
 # 2.4 client_ip API change
 # https://bugzilla.redhat.com/show_bug.cgi?id=833173
 Patch5: 2.4_client_ip_API_change.patch
+# Remove exit(0) calls in Environment.cpp for rpmlint
+Patch6: remove_exit0_calls_for_rpmlint.patch
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: openssl-devel
 BuildRequires: httpd-devel
@@ -480,6 +482,7 @@ chmod a-x wsf_c/wsclient/LICENSE
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 %if %{build_sandesha2}
@@ -500,7 +503,8 @@ wsclient="--enable-wsclient"
 wsclient="--disable-wsclient"
 %endif
 
-export CFLAGS="-O2"
+export CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
+export CXXFLAGS=$CFLAGS
 ./configure --enable-multi-thread=no --with-axis2=`pwd`/wsf_c/axis2c/include --with-apache2=%{_includedir}/httpd --with-apr=%{_includedir}/apr-1 --with-sqlite=%{_includedir} --without-archive --enable-openssl --enable-libxml2 --disable-static --disable-rpath --bindir=%{_bindir} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir} --includedir=%{_includedir} --datarootdir=%{_datadir}/%{pkg_name}-%{pkg_ver} --docdir=%{_datadir}/doc/%{pkg_name}-%{pkg_ver} --prefix=%{_prefix} $sandesha2 $savan $wsclient $rampart
 
 # Remove rpath
@@ -624,6 +628,10 @@ mv -f %{buildroot}/%{_includedir}/*.h %{buildroot}/%{_includedir}/%{pkg_name}
 rm -rf %{buildroot}
 
 %changelog
+* Thu Jul 12 2012  Peter MacKinnon <pmackinn at redhat.com> - 2.1.0-11
+- Added FORTIFY_SOURCE flag
+- Added patch to remove exit(0) calls in wsf shared libs
+
 * Thu Jul 12 2012  Peter MacKinnon <pmackinn at redhat.com> - 2.1.0-10
 - Fixed typo in patch file
 


More information about the scm-commits mailing list