summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Horelick <jdhore@gentoo.org>2014-08-28 03:54:55 +0000
committerJeff Horelick <jdhore@gentoo.org>2014-08-28 03:54:55 +0000
commitfee377389a3286bb62139ccef05249715a03bb47 (patch)
tree318f3e1ba1aeb75259da870551a4f8a0e55f48be /sys-apps/paludis
parentVersion bump. (diff)
downloadgentoo-2-fee377389a3286bb62139ccef05249715a03bb47.tar.gz
gentoo-2-fee377389a3286bb62139ccef05249715a03bb47.tar.bz2
gentoo-2-fee377389a3286bb62139ccef05249715a03bb47.zip
Fix building with -Werror=format-security. Fixes bug #521326
Patch from upstream: http://git.exherbo.org/paludis/paludis.git/commit/?id=f777dadef601434550aa3fb411eebab04ad07103 (Portage version: 2.2.12/cvs/Linux i686, unsigned Manifest commit)
Diffstat (limited to 'sys-apps/paludis')
-rw-r--r--sys-apps/paludis/ChangeLog8
-rw-r--r--sys-apps/paludis/files/paludis-2.0.0-fix-format-security.patch66
-rw-r--r--sys-apps/paludis/paludis-2.0.0.ebuild3
3 files changed, 75 insertions, 2 deletions
diff --git a/sys-apps/paludis/ChangeLog b/sys-apps/paludis/ChangeLog
index aa07793d27a8..f2fdcb59897d 100644
--- a/sys-apps/paludis/ChangeLog
+++ b/sys-apps/paludis/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/paludis
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/paludis/ChangeLog,v 1.244 2014/08/26 04:28:34 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/paludis/ChangeLog,v 1.245 2014/08/28 03:54:55 jdhore Exp $
+
+ 28 Aug 2014; Jeff Horelick <jdhore@gentoo.org>
+ +files/paludis-2.0.0-fix-format-security.patch, paludis-2.0.0.ebuild:
+ Fix building with -Werror=format-security. Fixes bug #521326 Patch from
+ upstream: http://git.exherbo.org/paludis/paludis.git/commit/?id=f777dadef60143
+ 4550aa3fb411eebab04ad07103
26 Aug 2014; Jeff Horelick <jdhore@gentoo.org> paludis-2.0.0.ebuild:
marked x86 wrt bug #520874
diff --git a/sys-apps/paludis/files/paludis-2.0.0-fix-format-security.patch b/sys-apps/paludis/files/paludis-2.0.0-fix-format-security.patch
new file mode 100644
index 000000000000..40d2f3ad4953
--- /dev/null
+++ b/sys-apps/paludis/files/paludis-2.0.0-fix-format-security.patch
@@ -0,0 +1,66 @@
+commit f777dadef601434550aa3fb411eebab04ad07103
+Author: David Leverton <levertond@googlemail.com>
+Date: Wed Aug 27 21:10:59 2014 +0100
+
+ Fix build with -Werror=format-security
+
+ Fixes: Gentoo#521326
+
+diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
+index 587601c..d58a8d0 100644
+--- a/ruby/paludis_ruby.cc
++++ b/ruby/paludis_ruby.cc
+@@ -173,19 +173,19 @@ void paludis::ruby::exception_to_ruby_exception(const std::exception & ee)
+ rb_raise(rb_eRuntimeError, "Unexpected paludis::InternalError: %s (%s)",
+ dynamic_cast<const paludis::InternalError *>(&ee)->message().c_str(), ee.what());
+ else if (0 != dynamic_cast<const paludis::GotASetNotAPackageDepSpec *>(&ee))
+- rb_raise(c_got_a_set_not_a_package_dep_spec, dynamic_cast<const paludis::GotASetNotAPackageDepSpec *>(&ee)->message().c_str());
++ rb_raise(c_got_a_set_not_a_package_dep_spec, "%s", dynamic_cast<const paludis::GotASetNotAPackageDepSpec *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::BadVersionSpecError *>(&ee))
+- rb_raise(c_bad_version_spec_error, dynamic_cast<const paludis::BadVersionSpecError *>(&ee)->message().c_str());
++ rb_raise(c_bad_version_spec_error, "%s", dynamic_cast<const paludis::BadVersionSpecError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::SetNameError *>(&ee))
+- rb_raise(c_set_name_error, dynamic_cast<const paludis::SetNameError *>(&ee)->message().c_str());
++ rb_raise(c_set_name_error, "%s", dynamic_cast<const paludis::SetNameError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::PackageNamePartError *>(&ee))
+- rb_raise(c_package_name_part_error, dynamic_cast<const paludis::PackageNamePartError *>(&ee)->message().c_str());
++ rb_raise(c_package_name_part_error, "%s", dynamic_cast<const paludis::PackageNamePartError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::CategoryNamePartError *>(&ee))
+- rb_raise(c_category_name_part_error, dynamic_cast<const paludis::CategoryNamePartError *>(&ee)->message().c_str());
++ rb_raise(c_category_name_part_error, "%s", dynamic_cast<const paludis::CategoryNamePartError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::NameError *>(&ee))
+- rb_raise(c_name_error, dynamic_cast<const paludis::NameError *>(&ee)->message().c_str());
++ rb_raise(c_name_error, "%s", dynamic_cast<const paludis::NameError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::PackageDepSpecError *>(&ee))
+- rb_raise(c_package_dep_spec_error, dynamic_cast<const paludis::PackageDepSpecError *>(&ee)->message().c_str());
++ rb_raise(c_package_dep_spec_error, "%s", dynamic_cast<const paludis::PackageDepSpecError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::AmbiguousPackageNameError *>(&ee))
+ {
+ VALUE ex_args[2];
+@@ -198,19 +198,19 @@ void paludis::ruby::exception_to_ruby_exception(const std::exception & ee)
+ rb_exc_raise(rb_class_new_instance(2, ex_args, c_ambiguous_package_name_error));
+ }
+ else if (0 != dynamic_cast<const paludis::NoSuchPackageError *>(&ee))
+- rb_raise(c_no_such_package_error, dynamic_cast<const paludis::NoSuchPackageError *>(&ee)->message().c_str());
++ rb_raise(c_no_such_package_error, "%s", dynamic_cast<const paludis::NoSuchPackageError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::NoSuchRepositoryError *>(&ee))
+- rb_raise(c_no_such_repository_error, dynamic_cast<const paludis::NoSuchRepositoryError *>(&ee)->message().c_str());
++ rb_raise(c_no_such_repository_error, "%s", dynamic_cast<const paludis::NoSuchRepositoryError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::ConfigFileError *>(&ee))
+- rb_raise(c_config_file_error, dynamic_cast<const paludis::ConfigFileError *>(&ee)->message().c_str());
++ rb_raise(c_config_file_error, "%s", dynamic_cast<const paludis::ConfigFileError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::ConfigurationError *>(&ee))
+- rb_raise(c_configuration_error, dynamic_cast<const paludis::ConfigurationError *>(&ee)->message().c_str());
++ rb_raise(c_configuration_error, "%s", dynamic_cast<const paludis::ConfigurationError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::ActionFailedError *>(&ee))
+- rb_raise(c_action_failed_error, dynamic_cast<const paludis::ActionFailedError *>(&ee)->message().c_str());
++ rb_raise(c_action_failed_error, "%s", dynamic_cast<const paludis::ActionFailedError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::ActionAbortedError *>(&ee))
+- rb_raise(c_action_aborted_error, dynamic_cast<const paludis::ActionAbortedError *>(&ee)->message().c_str());
++ rb_raise(c_action_aborted_error, "%s", dynamic_cast<const paludis::ActionAbortedError *>(&ee)->message().c_str());
+ else if (0 != dynamic_cast<const paludis::BadVersionOperatorError *>(&ee))
+- rb_raise(c_bad_version_operator_error, dynamic_cast<const paludis::BadVersionOperatorError *>(&ee)->message().c_str());
++ rb_raise(c_bad_version_operator_error, "%s", dynamic_cast<const paludis::BadVersionOperatorError *>(&ee)->message().c_str());
+
+ else if (0 != dynamic_cast<const paludis::Exception *>(&ee))
+ rb_raise(rb_eRuntimeError, "Caught paludis::Exception: %s (%s)",
diff --git a/sys-apps/paludis/paludis-2.0.0.ebuild b/sys-apps/paludis/paludis-2.0.0.ebuild
index 926ff23307ea..feec3426cc0d 100644
--- a/sys-apps/paludis/paludis-2.0.0.ebuild
+++ b/sys-apps/paludis/paludis-2.0.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/paludis/paludis-2.0.0.ebuild,v 1.3 2014/08/26 04:28:34 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/paludis/paludis-2.0.0.ebuild,v 1.4 2014/08/28 03:54:55 jdhore Exp $
EAPI=4
@@ -87,6 +87,7 @@ src_prepare() {
# The package explicitly wants ruby1.9, so fix the script on it.
# https://bugs.gentoo.org/show_bug.cgi?id=439372#c2
sed -i -e '1s/ruby/&19/' ruby/demos/*.rb || die
+ epatch "${FILESDIR}/${P}-fix-format-security.patch"
epatch_user
}