[wso2-wsf-cpp/private-rawhide] - Remove exit(0) calls from shared libs - Add FORTIFY_SOURCE flag
Peter MacKinnon
pmackinn at fedoraproject.org
Tue Jul 10 18:07:24 UTC 2012
commit 0293af98ddf563db173ac527c9fcb835ef916162
Author: Peter MacKinnon <pmackinn at redhat.com>
Date: Tue Jul 10 14:00:43 2012 -0400
- Remove exit(0) calls from shared libs
- Add FORTIFY_SOURCE flag
remove_exit0_calls_for_rpmlint.patch | 34 ++++++++++++++++++++++++++++++++++
wso2-wsf-cpp.spec | 11 +++++++++--
2 files changed, 43 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 44a3383..0f435c7 100644
--- a/wso2-wsf-cpp.spec
+++ b/wso2-wsf-cpp.spec
@@ -24,7 +24,7 @@
Name: %{pkg_name}
Summary: WSO2 Web Services Framework for C++
Version: %{pkg_ver}
-Release: 7%{?dist}
+Release: 8%{?dist}
Group: Development/Tools
License: ASL 2.0
URL: http://wso2.org/library/wsf/cpp
@@ -52,6 +52,9 @@ Patch3: generic_streams_for_ssl.patch
# Fix free of static buffer
# https://wso2.org/jira/browse/WSFCPP-138
Patch4: prevent_free_of_static_chars.patch
+# Remove exit(0) calls in Environment.cpp for rpmlint
+# https://bugzilla.redhat.com/show_bug.cgi?id=741306
+Patch5: remove_exit0_calls_for_rpmlint.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: openssl-devel
BuildRequires: httpd-devel
@@ -494,7 +497,7 @@ wsclient="--enable-wsclient"
wsclient="--disable-wsclient"
%endif
-export CFLAGS="-O2"
+export CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
./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
@@ -618,6 +621,10 @@ mv -f %{buildroot}/%{_includedir}/*.h %{buildroot}/%{_includedir}/%{pkg_name}
rm -rf %{buildroot}
%changelog
+* Tue Jul 10 2012 Pete MacKinnon <pmackinn at redhat> - 2.1.0-8
+- Added FORTIFY_SOURCE flag
+- Added patch to remove exit(0) calls in wsf shared libs
+
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.0-7
- Rebuilt for c++ ABI breakage
More information about the scm-commits
mailing list