[mdk] Fixes rhbz #1048604 and #1037194 plus spec cleanup

Filipe Rosset filiperosset at fedoraproject.org
Wed May 21 02:18:19 UTC 2014


commit 0e7c8d50a46f6d8a4472b95515572220a79591e5
Author: Filipe Rosset <rosset.filipe at gmail.com>
Date:   Tue May 20 23:18:10 2014 -0300

    Fixes rhbz #1048604 and #1037194 plus spec cleanup

 mdk-format-security.patch |   46 +++++++++++++++++++++++++++++++++++++++++++++
 mdk.spec                  |   22 +++++++++-----------
 2 files changed, 56 insertions(+), 12 deletions(-)
---
diff --git a/mdk-format-security.patch b/mdk-format-security.patch
new file mode 100644
index 0000000..1074e92
--- /dev/null
+++ b/mdk-format-security.patch
@@ -0,0 +1,46 @@
+--- mixlib/mix.c-orig	2014-05-20 22:46:01.409557282 -0300
++++ mixlib/mix.c	2014-05-20 22:46:30.069171811 -0300
+@@ -62,7 +62,7 @@
+ mix_print_license (const gchar *program)
+ {
+   fprintf (stderr, _("%s (GNU MDK %s)\n\n"), program, VERSION);
+-  fprintf (stderr, MIX_GPL_LICENSE);
++  fprintf (stderr, "%s", MIX_GPL_LICENSE);
+ }
+ 
+ /* check dir, and create it if it doesn't exist */
+--- mixlib/mix_ins.c-orig	2014-05-20 22:50:51.553774632 -0300
++++ mixlib/mix_ins.c	2014-05-20 22:51:07.271111187 -0300
+@@ -261,7 +261,7 @@
+ mix_ins_print (const mix_ins_t *ins)
+ {
+   g_return_if_fail (ins != NULL);
+-  g_print (mix_get_string_from_id (mix_ins_id_from_ins (*ins)));
++  g_print ("%s", mix_get_string_from_id (mix_ins_id_from_ins (*ins)));
+   g_print (" %s%d,%d(%d:%d)", mix_short_is_negative (ins->address) ? "-" : "+",
+            mix_short_magnitude (ins->address), ins->index,
+            mix_fspec_left (ins->fspec), mix_fspec_right (ins->fspec));
+--- mixlib/xmix_vm_handlers.c-orig	2014-05-20 22:54:00.112796141 -0300
++++ mixlib/xmix_vm_handlers.c	2014-05-20 22:54:38.979621998 -0300
+@@ -1360,8 +1360,8 @@
+ cmd_pprog_ (mix_vm_cmd_dispatcher_t *dis, const gchar *arg)
+ {
+   const gchar *path = mix_vm_cmd_dispatcher_get_program_path (dis);
+-  fprintf (dis->out, path? path : _("No program currently loaded"));
+-  fprintf (dis->out, "\n");
++  fprintf ("%s", dis->out, path? path : _("No program currently loaded"));
++  fprintf ("%s", dis->out, "\n");
+   return (path != NULL);
+ }
+ 
+@@ -1369,8 +1369,8 @@
+ cmd_psrc_ (mix_vm_cmd_dispatcher_t *dis, const gchar *arg)
+ {
+   const gchar *path = mix_vm_cmd_dispatcher_get_src_file_path (dis);
+-  fprintf (dis->out, path? path : _("No program currently loaded\n"));
+-  fprintf (dis->out, "\n");
++  fprintf ("%s", dis->out, path? path : _("No program currently loaded\n"));
++  fprintf ("%s", dis->out, "\n");
+   return (path != NULL);
+ }
+ 
diff --git a/mdk.spec b/mdk.spec
index 21ebf8c..2bc54a9 100644
--- a/mdk.spec
+++ b/mdk.spec
@@ -1,14 +1,15 @@
 Name:		mdk
 Version:	1.2.7
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	GNU MIX Development Kit
 
 Group:		Applications/Emulators
 License:	GPLv3+ and GFDL
 URL:		http://www.gnu.org/software/mdk/
-Source0:	http://ftp.gnu.org/gnu/mdk/v1.2.5/%{name}-%{version}.tar.gz
+Source0:	http://ftp.gnu.org/gnu/mdk/v%{version}/%{name}-%{version}.tar.gz
 Source1:	mdk.desktop
 Patch0:		glib-deprecated.patch
+Patch1:		mdk-format-security.patch
 Requires(post):	/sbin/install-info
 Requires(preun): /sbin/install-info
 BuildRequires:	guile-devel
@@ -18,10 +19,10 @@ BuildRequires:	desktop-file-utils
 BuildRequires:	readline-devel
 BuildRequires:	ncurses-devel
 BuildRequires:	intltool
-BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %package	doc
 Summary:	GNU MIX Development Kit Documentation and Samples
+BuildArch:	noarch
 
 %description
 MDK stands for MIX Development Kit, and provides tools for developing
@@ -48,15 +49,14 @@ Samples and documentation for the MDK package.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p0
 autoconf
 
 %build
 %configure
-# This package doesn't suppot parallel make
-make
+make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
 desktop-file-install \
@@ -65,9 +65,6 @@ desktop-file-install \
 
 %find_lang %{name}
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %post
 /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
 
@@ -77,7 +74,6 @@ if [ $1 -eq 0 ] ; then
 fi
 
 %files -f %{name}.lang
-%defattr(-,root,root,-)
 %doc AUTHORS COPYING README THANKS
 %{_bindir}/mixasm
 %{_bindir}/mixvm
@@ -88,10 +84,12 @@ fi
 %{_datadir}/applications/mdk.desktop
 
 %files doc
-%defattr(-,root,root,-)
 %doc samples doc
 
 %changelog
+* Wed May 21 2014 Filipe Rosset <rosset.filipe at gmail.com> - 1.2.7-3
+- Fixes rhbz #1048604 and #1037194 plus spec cleanup
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.7-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
@@ -127,5 +125,5 @@ fi
 - Documentation and samples are now in separate package
 - Removed unnecessary build requires
 
-* Sun Dec 29 2008 Stjepan Gros <stjepan.gros at gmail.com> - 1.2.4-1
+* Mon Dec 29 2008 Stjepan Gros <stjepan.gros at gmail.com> - 1.2.4-1
 - Initial package


More information about the scm-commits mailing list