2007-09-03 Albert Lee <
[email protected]>
* SFEmonodevelop.spec: Bump to 0.15, add patch2
* SFEmono.spec: Add patch3 for readdir_r crash
http://bugzilla.ximian.com/show_bug.cgi?id=82678
* patches/monodevelop-02-script.diff: Fix PATH in launch script
* patches/mono-03-readdir_r.diff: Patch for readdir_r corruption
--- a/ChangeLog Mon Sep 03 04:36:16 2007 +0000
+++ b/ChangeLog Mon Sep 03 22:28:16 2007 +0000
@@ -1,3 +1,11 @@
+2007-09-03 Albert Lee <[email protected]>
+
+ * SFEmonodevelop.spec: Bump to 0.15, add patch2
+ * SFEmono.spec: Add patch3 for readdir_r crash
+ http://bugzilla.ximian.com/show_bug.cgi?id=82678
+ * patches/monodevelop-02-script.diff: Fix PATH in launch script
+ * patches/mono-03-readdir_r.diff: Patch for readdir_r corruption
+
2007-09-03 Albert Lee <[email protected]>
* SFEgecko-sharp.spec: Update dependencies
--- a/SFEmono.spec Mon Sep 03 04:36:16 2007 +0000
+++ b/SFEmono.spec Mon Sep 03 22:28:16 2007 +0000
@@ -15,6 +15,7 @@
URL: http://www.mono-project.com/Main_Page
Patch1: mono-01-solaris.diff
Patch2: mono-02-seek-macros.diff
+Patch3: mono-03-readdir_r.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Docdir: %{_defaultdocdir}/doc
SUNW_BaseDir: %{_basedir}
@@ -39,6 +40,7 @@
%setup -q -n mono-%version
%patch1 -p1 -b .patch01
%patch2 -p1 -b .patch02
+%patch3 -p1 -b .patch03
%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
@@ -126,6 +128,8 @@
%{_libdir}/pkgconfig/*
%changelog
+* Mon Sep 03 2007 - [email protected]
+- Add patch for readdir_r stack corruption and bug
* Sun Sep 02 2007 - [email protected]
- Bump to 1.2.5
- Unbreak patches
--- a/SFEmonodevelop.spec Mon Sep 03 04:36:16 2007 +0000
+++ b/SFEmonodevelop.spec Mon Sep 03 22:28:16 2007 +0000
@@ -6,9 +6,11 @@
%include Solaris.inc
Name: SFEmonodevelop
-Version: 0.13.1
+Version: 0.15
Summary: IDE for C# and other .NET languages
-Source: http://go-mono.com/sources/monodevelop/monodevelop-%{version}.tar.gz
+Source: http://go-mono.com/sources/monodevelop/monodevelop-%{version}.tar.bz2
+Patch1: monodevelop-01-configure.diff
+Patch2: monodevelop-02-script.diff
URL: http://monodevelop.org/
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -17,11 +19,13 @@
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SFEmono-devel
BuildRequires: SFEgtk-sharp
+BuildRequires: SFEgecko-sharp
Requires: SUNWgnome-base-libs
Requires: SFEmono
Requires: SFEgtk-sharp
Requires: SFEgnome-sharp
Requires: SFEgtksourceview-sharp
+Requires: SFEgecko-sharp
Requires: SFEmonodoc
%if %build_l10n
@@ -34,6 +38,8 @@
%prep
%setup -q -n monodevelop-%{version}
+%patch1 -p1
+%patch2 -p1
%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
@@ -44,6 +50,7 @@
export PATH=/usr/mono/bin:$PATH
export CFLAGS="%optflags"
export LDFLAGS="%{_ldflags}"
+autoconf
./configure --prefix=%{_prefix} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
@@ -59,17 +66,37 @@
make DESTDIR=$RPM_BUILD_ROOT install
perl -pi -e 's/^#!\/bin\/sh/#!\/bin\/bash/' $RPM_BUILD_ROOT%{_bindir}/monodevelop
+perl -pi -e 's,MD_BIN_PATH=.*@,; export PATH=$MD_BIN_PATH:%{_prefix}/mono/bin:$PATH,' $RPM_BUILD_ROOT%{_bindir}/monodevelop
perl -pi -e 's/^#!\/bin\/sh/#!\/bin\/bash/' $RPM_BUILD_ROOT%{_bindir}/mdtool
-#FIXME: need postrun script that runs update-mime-database
-rm -r $RPM_BUILD_ROOT%{_datadir}/mime
-
%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_libdir}/locale
%endif
+%post
+( echo 'test -x /usr/bin/update-desktop-database || exit 0';
+ echo '/usr/bin/update-desktop-database'
+) | $BASEDIR/lib/postrun -b -u -c JDS_wait
+( echo 'test -x %{_bindir}/update-mime-database || exit 0';
+ echo '%{_bindir}/update-mime-database %{_datadir}/mime'
+) | $BASEDIR/lib/postrun -b -u -c JDS_wait
+( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
+ echo '/usr/bin/scrollkeeper-update'
+) | $BASEDIR/lib/postrun -b -u -c JDS
+
+%postun
+( echo 'test -x /usr/bin/update-desktop-database || exit 0';
+ echo '/usr/bin/update-desktop-database'
+) | $BASEDIR/lib/postrun -b -u -c JDS_wait
+( echo 'test -x %{_bindir}/update-mime-database || exit 0';
+ echo '%{_bindir}/update-mime-database %{_datadir}/mime'
+) | $BASEDIR/lib/postrun -b -u -c JDS_wait
+( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
+ echo '/usr/bin/scrollkeeper-update'
+) | $BASEDIR/lib/postrun -b -u -c JDS
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -95,5 +122,7 @@
%endif
%changelog
+* Mon Sep 03 2007 - [email protected]
+- Bump to 0.15, add patch2
* Sat Mar 17 2007 - [email protected]
- create!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/mono-03-readdir_r.diff Mon Sep 03 22:28:16 2007 +0000
@@ -0,0 +1,41 @@
+--- mono-1.2.5.orig/support/dirent.c 2007年 7月 24日 二 17:47:31
++++ mono-1.2.5/support/dirent.c 2007年 9月 3日 一 12:51:51
+@@ -11,11 +11,20 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <limits.h> /* for PATH_MAX */
+ #include <unistd.h>
+
+ #include "map.h"
+ #include "mph.h"
+
++#ifndef PATH_MAX
++#ifdef MAXPATHLEN
++#define PATH_MAX MAXPATHLEN
++#else
++#define PATH_MAX 2048
++#endif
++#endif
++
+ G_BEGIN_DECLS
+
+ gint32
+@@ -77,13 +86,13 @@
+ gint32
+ Mono_Posix_Syscall_readdir_r (void *dirp, struct Mono_Posix_Syscall__Dirent *entry, void **result)
+ {
+- struct dirent _entry;
++ char buf[sizeof(struct dirent) + PATH_MAX + 1];
+ int r;
+
+- r = readdir_r (dirp, &_entry, (struct dirent**) result);
++ r = readdir_r (dirp, (struct dirent *) &buf, (struct dirent**) result);
+
+- if (r == 0 && result != NULL) {
+- copy_dirent (entry, &_entry);
++ if (r == 0 && *result != NULL) {
++ copy_dirent (entry, (struct dirent*) *result);
+ }
+
+ return r;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/monodevelop-02-script.diff Mon Sep 03 22:28:16 2007 +0000
@@ -0,0 +1,10 @@
+--- monodevelop-0.15.orig/monodevelop.in 2007年 7月 31日 二 13:56:11
++++ monodevelop-0.15/monodevelop.in 2007年 9月 3日 一 18:16:05
+@@ -35,6 +35,7 @@
+ fi
+
+ MD_BIN_PATH=@prefix@/lib/monodevelop/bin
++export PATH=@prefix@/mono:$MD_BIN_PATH:$PATH
+
+ if [ -n $LD_LIBRARY_PATH ]; then
+ export LD_LIBRARY_PATH=$MOZILLA_HOME:$LD_LIBRARY_PATH