[magic] Fix FTBFS with -Werror=format-security (#1037190, #1106151)
Yaakov Selkowitz
yselkowitz at fedoraproject.org
Tue Jul 8 00:24:38 UTC 2014
commit be44fd2a5de7e20a2a27be984993317fff0813ac
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Wed Jun 18 17:48:52 2014 -0500
Fix FTBFS with -Werror=format-security (#1037190, #1106151)
magic-8.0.60-format-security.patch | 20 ++++++++++++++++++++
magic.spec | 19 ++++++++++---------
2 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/magic-8.0.60-format-security.patch b/magic-8.0.60-format-security.patch
new file mode 100644
index 0000000..b6e5c88
--- /dev/null
+++ b/magic-8.0.60-format-security.patch
@@ -0,0 +1,20 @@
+--- a/ext2spice/ext2spice.c
++++ b/ext2spice/ext2spice.c
+@@ -2066,7 +2066,7 @@ FILE *outf;
+ /* Canonical name */
+ nn = (EFNodeName *) HashGetValue(he);
+ if (outf)
+- fprintf(outf, nodeSpiceName(nn->efnn_node->efnode_name->efnn_hier));
++ fprintf(outf, "%s", nodeSpiceName(nn->efnn_node->efnode_name->efnn_hier));
+ return nn->efnn_node;
+ }
+ }
+@@ -2540,7 +2540,7 @@ int nodeHspiceName(s)
+ for (p = s + l; (p > s) && *p != '/'; p--);
+ if (p == s)
+ {
+- sprintf(map, s);
++ sprintf(map, "%s", s);
+ goto topLevel;
+ }
+
diff --git a/magic.spec b/magic.spec
index 465bbf4..2891e6b 100644
--- a/magic.spec
+++ b/magic.spec
@@ -1,6 +1,6 @@
Name: magic
Version: 8.0.60
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: A very capable VLSI layout tool
License: GPLv2
@@ -12,6 +12,7 @@ Source1: %{name}.desktop
Source2: %{name}.png
Patch0: %{name}-verbose.patch
Patch1: %{name}-7.4.35-64bit.patch
+Patch2: %{name}-8.0.60-format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -55,10 +56,12 @@ sed -i "s|package require -exact|package require|" tcltk/tkcon.tcl
%patch0 -p0 -b .verbose
-%ifarch x86_64 sparc64 ppc64 amd64
+%ifarch x86_64 sparc64 ppc64 amd64 aarch64
%patch1 -p0 -b .64bit
%endif
+%patch2 -p1 -b .formatsec
+
%build
export WISH=%{_bindir}/wish
@@ -74,8 +77,6 @@ cd %{name}-%{version}
%{__make} %{?_smp_mflags}
%install
-%{__rm} -rf %{buildroot}
-
cd %{name}-%{version}
%{__make} install \
DESTDIR=%{buildroot} \
@@ -110,12 +111,8 @@ touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
update-desktop-database &> /dev/null || :
-%clean
-%{__rm} -rf %{buildroot}
-
%files
-%defattr(-,root,root,-)
%doc README* TODO VERSION
%{_bindir}/%{name}
%{_bindir}/spice2sim
@@ -127,11 +124,15 @@ update-desktop-database &> /dev/null || :
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%files doc
-%defattr(-,root,root,-)
%doc doc/ tutorial/ scmos/
%changelog
+* Wed Jun 18 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 8.0.60-9
+- Fix FTBFS with -Werror=format-security (#1037190, #1106151)
+- Apply 64bit patch on aarch64
+- Cleanup spec
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 8.0.60-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list