rpms/nedit/devel nedit-5.4-makefiles.patch, NONE, 1.1 nedit-5.4-security.patch, NONE, 1.1 nedit-5.5-motif223.patch, NONE, 1.1 nedit-5.5-utf8.patch, NONE, 1.1 nedit-5.5-varfix.patch, NONE, 1.1 nedit-icon.png, NONE, 1.1 nedit.desktop, NONE, 1.1 nedit.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Jindrich Novy (jnovy) fedora-extras-commits at redhat.com
Wed Jul 27 08:46:31 UTC 2005


Author: jnovy

Update of /cvs/extras/rpms/nedit/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16055/devel

Modified Files:
	.cvsignore sources 
Added Files:
	nedit-5.4-makefiles.patch nedit-5.4-security.patch 
	nedit-5.5-motif223.patch nedit-5.5-utf8.patch 
	nedit-5.5-varfix.patch nedit-icon.png nedit.desktop nedit.spec 
Log Message:
auto-import nedit-5.5-3 on branch devel from nedit-5.5-3.src.rpm
initial nedit Fedora Extras import

nedit-5.4-makefiles.patch:

--- NEW FILE nedit-5.4-makefiles.patch ---
--- nedit-5.4/makefiles/Makefile.linux.makefiles	2003-05-20 02:27:56.000000000 +0200
+++ nedit-5.4/makefiles/Makefile.linux	2004-03-17 15:28:40.000000000 +0100
@@ -1,5 +1,5 @@
 # $Id: Makefile.linux,v 1.11 2003/05/20 00:27:56 n8gray Exp $
-CC=cc
+CC=gcc
 AR=ar
 
 # For editres, add -DEDITRES to CFLAGS and -lXmu to LIBS
@@ -17,11 +17,11 @@
 # To test if the Motif library exports the runtime version
 # add -DHAVE__XMVERSIONSTRING to CFLAGS
 #
-CFLAGS=-O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD
+CFLAGS=$(RPM_OPT_FLAGS) -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD
 
 ARFLAGS=-urs
 
-LIBS= -L/usr/X11R6/lib -Wl,-Bstatic -lXm -Wl,-Bdynamic -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm
+LIBS= -L/usr/X11R6/$(LIB) -lXm -Xmu -lXp -lXpm -lXext -lXt -lSM -lICE -lX11 -lm
 
 include Makefile.common
 

nedit-5.4-security.patch:

--- NEW FILE nedit-5.4-security.patch ---
--- nedit-5.4/source/file.c.security	2003-09-28 16:18:12.000000000 +0200
+++ nedit-5.4/source/file.c	2004-03-17 15:25:31.000000000 +0100
@@ -1218,7 +1218,7 @@
 */
 void PrintString(const char *string, int length, Widget parent, const char *jobName)
 {
-    char tmpFileName[L_tmpnam];    /* L_tmpnam defined in stdio.h */
+    char *tmpFileName=strdup("/tmp/neditXXXXXX");
     FILE *fp;
     int fd;
 
@@ -1229,14 +1229,10 @@
 	    1. Create a filename
 	    2. Open the file with the O_CREAT|O_EXCL flags
 	So all an attacker can do is a DoS on the print function. */
-    tmpnam(tmpFileName);
+    fd = mkstemp(tmpFileName);
 
     /* open the temporary file */
-#ifdef VMS
-    if ((fp = fopen(tmpFileName, "w", "rfm = stmlf")) == NULL)
-#else
-    if ((fd = open(tmpFileName, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR | S_IWUSR)) < 0 || (fp = fdopen(fd, "w")) == NULL)
-#endif /* VMS */
+    if ((fp = fdopen(fd, "w")) == NULL)
     {
         DialogF(DF_WARN, parent, 1, "Error while Printing",
                 "Unable to write file for printing:\n%s", "Dismiss",
@@ -1250,7 +1246,7 @@
     
     /* write to the file */
 #ifdef IBM_FWRITE_BUG
-    write(fileno(fp), string, length);
+    write(fd, string, length);
 #else
     fwrite(string, sizeof(char), length, fp);
 #endif
@@ -1260,6 +1256,7 @@
                 "%s not printed:\n%s", "Dismiss", jobName, errorString());
         fclose(fp); /* should call close(fd) in turn! */
         remove(tmpFileName);
+	free(tmpFileName);
         return;
     }
     
@@ -1270,6 +1267,7 @@
                 "Error closing temp. print file:\n%s", "Dismiss",
                 errorString());
         remove(tmpFileName);
+	free(tmpFileName);
         return;
     }
 
@@ -1281,6 +1279,7 @@
     PrintFile(parent, tmpFileName, jobName);
     remove(tmpFileName);
 #endif /*VMS*/
+    free(tmpFileName);
     return;
 }
 

nedit-5.5-motif223.patch:

--- NEW FILE nedit-5.5-motif223.patch ---
--- nedit-5.5/util/check_lin_tif.c.motif223	2004-07-21 13:32:07.000000000 +0200
+++ nedit-5.5/util/check_lin_tif.c	2004-12-27 10:06:36.378060568 +0100
@@ -255,6 +255,11 @@ int main() {
             exit(0);
         }
 
+        /* Check for Open Motif 2.2.3 and up */
+        if (!force_bad && XmVERSION == 2 && XmREVISION == 2 && XmUPDATE_LEVEL > 2) {
+            exit(0);
+        }
+
         /* Check for the dreaded Open Motif 2.2.2 (some variants of which
            claim to be 2.2.3, but the version string gives them away). */
         if (force_bad || 

nedit-5.5-utf8.patch:

--- NEW FILE nedit-5.5-utf8.patch ---
--- nedit-5.5/source/nedit.c.utf8	2004-09-02 10:49:56.000000000 +0200
+++ nedit-5.5/source/nedit.c	2004-12-27 09:59:40.997208056 +0100
@@ -90,6 +90,7 @@ static int checkDoMacroArg(const char *m
 static String neditLanguageProc(Display *dpy, String xnl, XtPointer closure);
 static void maskArgvKeywords(int argc, char **argv, const char **maskArgs);
 static void unmaskArgvKeywords(int argc, char **argv, const char **maskArgs);
+static void changeLocaleIfUTF8(void);
 static void patchResourcesForVisual(void);
 static void patchResourcesForKDEbug(void);
 static void patchLocaleForMotif(void);
@@ -392,6 +393,8 @@ int main(int argc, char **argv)
     /* Save the command which was used to invoke nedit for restart command */
     ArgV0 = argv[0];
 
+    changeLocaleIfUTF8();
+
     /* Set locale for C library, X, and Motif input functions. 
        Reverts to "C" if requested locale not available. */
     XtSetLanguageProc(NULL, neditLanguageProc, NULL);
@@ -1035,6 +1038,32 @@ static String neditLanguageProc(Display 
     return setlocale(LC_ALL, NULL); /* re-query in case overwritten */
 }
 
+static void changeLocaleIfUTF8(void)
+{
+    char *locale;
+
+    locale = getenv("LANG");
+    if (!locale) {
+        locale = setlocale(LC_ALL, NULL);
+    }
+
+    if (locale) {
+        char *ptr;
+
+        ptr = strstr(locale, ".UTF-8");
+        if (ptr) {
+            fprintf(stderr, "nedit: the current locale is utf8 (%s)\n", locale);
+
+            ptr[0] = '\0';
+
+            setenv("LC_ALL", locale, 1);
+            locale = setlocale(LC_ALL, locale);
+
+            fprintf(stderr, "nedit: changed locale to non-utf8 (%s)\n", locale);
+        }
+    }
+}
+
 static int sortAlphabetical(const void* k1, const void* k2)
 {
     const char* key1 = *(const char**)k1;

nedit-5.5-varfix.patch:

--- NEW FILE nedit-5.5-varfix.patch ---
--- nedit-5.5/source/server.c.varfix	2004-07-21 13:32:05.000000000 +0200
+++ nedit-5.5/source/server.c	2005-01-12 11:12:08.989922248 +0100
@@ -340,7 +340,7 @@ static void processServerCommandString(c
     char *fullname, filename[MAXPATHLEN], pathname[MAXPATHLEN];
     char *doCommand, *geometry, *langMode, *inPtr;
     int editFlags, stringLen = strlen(string);
-    int lineNum, createFlag, readFlag, iconicFlag, lastIconic = 0, tabbed;
+    int lineNum, createFlag, readFlag, iconicFlag, lastIconic = 0, tabbed = 0;
     int fileLen, doLen, lmLen, geomLen, charsRead, itemsRead;
     WindowInfo *window, *lastFile = NULL;
     long currentDesktop = QueryCurrentDesktop(TheDisplay, 


--- NEW FILE nedit.desktop ---
[Desktop Entry]
Encoding=UTF-8
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Comment=Text Editor
Comment[bg]=Nedit Ðåäàêòîð
Comment[ca]=Editor Nedit
Comment[cs]=Editor Nedit
Comment[eo]=redaktilo Nedit
Comment[et]=Tekstiredaktor Nedit
Comment[fi]=Nedit-editori
Comment[fr]=Éditeur Nedit
Comment[hu]=Nedit szövegszerkesztő
Comment[is]=Nedit-ritill
Comment[mk]=Nedit - лесен и моќен уредувач
Comment[pt]=Editor Nedit
Comment[ro]=Editorul Nedit
Comment[ru]=Редактор Nedit
Comment[sk]=Editor Nedit
Comment[sl]=Urejevalnik Nedit
Comment[uk]=Редактор Nedit
Name=Nedit
Name[et]=Tekstiredaktor Nedit
Name[ru]=NEdit
Exec=nedit %f
Icon=nedit-icon.png
Path=
Type=Application
Terminal=false


--- NEW FILE nedit.spec ---
%define desktop_file 1
%if %{desktop_file}
%define desktop_file_utils_version 0.2.93
%endif
Summary: A GUI text editor for systems with X and Motif.
Name: nedit
Version: 5.5
Release: 3
Source: http://nedit.org/ftp/v5_5/nedit-%{version}-src.tar.bz2
Source1: nedit.desktop
Source2: nedit-icon.png
Patch0: nedit-5.4-security.patch
Patch1: nedit-5.4-makefiles.patch
Patch2: nedit-5.5-utf8.patch
Patch3: nedit-5.5-motif223.patch
Patch4: nedit-5.5-varfix.patch
URL: http://nedit.org
License: distributable
Group: Applications/Editors
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: openmotif-devel >= 2.2.3
%if %{desktop_file}
BuildPrereq: desktop-file-utils >= %{desktop_file_utils_version}
%endif

%description
NEdit is a GUI text editor for the X Window System and Motif. NEdit is
very easy to use, especially if you are familiar with the
Macintosh(TM) or Microsoft(TM) Windows(TM) style of interface.

%prep
%setup -q
%patch0 -p1 -b .security
%patch1 -p1 -b .makefiles
%patch2 -p1 -b .utf8
%patch3 -p1 -b .motif223
%patch4 -p1 -b .varfix

%build
make linux LIB=%{_lib}

%install
rm -rf $RPM_BUILD_ROOT

install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man1
install -s -m 755 source/nedit source/nc $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
install -m 644 doc/nedit.man $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man1/nedit.1x
install -m 644 doc/nc.man $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man1/nc.1x

mkdir -p $RPM_BUILD_ROOT/etc/X11/applnk/Applications
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/applnk/Applications
%if %{desktop_file}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/applications
desktop-file-install --vendor fedora --delete-original \
        --dir $RPM_BUILD_ROOT%{_prefix}/share/applications \
        --add-category "Application;Development;X-Fedora" \
        $RPM_BUILD_ROOT/etc/X11/applnk/Applications/nedit.desktop
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc doc/nedit.doc README ReleaseNotes
%{_prefix}/X11R6/man/*/*
%{_prefix}/X11R6/bin/*
%if %{desktop_file}
%{_prefix}/share/applications/*
%{_datadir}/pixmaps/nedit-icon.png
%else
%config /etc/X11/applnk/Applications/nedit.desktop
%endif

%changelog
* Mon Jan 20 2005 Jindrich Novy <jnovy at redhat.com> 5.5-3
- prepare the spec and desktop file for Extras inclusion

* Wed Jan 12 2005 Jindrich Novy <jnovy at redhat.com> 5.5-2
- fix usage of uninitialized variable (#144790)

* Mon Dec 27 2004 Jindrich Novy <jnovy at redhat.com> 5.5-1
- new version 5.5

* Mon Sep 20 2004 Jindrich Novy <jnovy at redhat.com>
- added nedit icon to be present in menus #131601
- updated spec to put it to the right place
- icon made by Joor Loohuis (joor at users.sourceforge.net)
- the icon processed by Peter Vrabec (pvrabec at usu.cz)

* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Wed Mar 17 2004 Thomas Woerner <twoerner at redhat.com> 5.4-1
- new version 5.4

* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Fri Dec  5 2003 Tim Waugh <twaugh at redhat.com>
- Don't explicitly require openmotif, since rpm does library dependencies
  automatically.
- Binary package doesn't require desktop-file-install.

* Fri Dec  5 2003 Tim Waugh <twaugh at redhat.com> 5.3-6
- Add ugly hack to work around openmotif's lack of UTF-8 support (bug #75189).
- Back-port 5.4RC2 fix for uninitialized variable (bug #110898).

* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
- rebuilt

* Fri Nov  8 2002 Tim Waugh <twaugh at redhat.com> 5.3-3
- Handle X11 libdir issue.

* Tue Oct 22 2002 Tim Waugh <twaugh at redhat.com> 5.3-2
- Remove original desktop file when installing.
- Fix desktop file icon (bug #61677).

* Wed Jul 24 2002 Karsten Hopp <karsten at redhat.de>
- 5.3
- use desktop-file-utils (#69461)
- redo all patches

* Fri Jun 21 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Fri Mar 22 2002 Tim Powers <timp at redhat.com>
- rebuilt against openmotif-2.2.2

* Fri Mar  1 2002 Than Ngo <than at redhat.com> 1.2-1
- update to 1.2
- cleanup patch files

* Thu Jan 17 2002 Than Ngo <than at redhat.com> 5.1.1-13
- rebuild against openmotif

* Wed Jan 09 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Thu Oct 25 2001 Bill Nottingham <notting at redhat.com>
- 0 != NULL. lather, rinse, repeat. (#54943)

* Mon Aug 20 2001 Bernhard Rosenkraenzer <bero at redhat.com>
- Fix crash while printing (#45149)
  I still think removing the package would be the better fix, though.

* Sun Jun 10 2001 Than Ngo <than at redhat.com>
- requires lesstif-devel

* Tue May 22 2001 Tim Powers <timp at redhat.com>
- patched to use lesstif

* Fri Apr 27 2001 Bernhard Rosenkraenzer <bero at redhat.com>
- Fix security bug, use mkstemp()

* Fri Oct 13 2000 Preston Brown <pbrown at redhat.com>
- .desktop file added

* Mon Jul 24 2000 Prospector <prospector at redhat.com>
- rebuilt

* Mon Jul 10 2000 Tim Powers <timp at redhat.com>
- rebuilt

* Sat Jun 17 2000 Than Ngo <than at redhat.de>
- rebuilt against openmotif-2.1.30
- use PRM macros

* Tue May 16 2000 Tim Powers <timp at redhat.com>
- updated to 5.1.1
- updated URL and source location

* Wed Aug 18 1999 Tim Powers <timp at redhat.com>
- excludearch alpha

* Mon Jul 19 1999 Tim Powers <timp at redhat.com>
- rebuilt for 6.1

* Thu Apr 15 1999 Michael Maher <mike at redhat.com>
- built package for 6.0

* Wed Oct 14 1998 Michael Maher <mike at redhat.com>
- built package for 5.2

* Thu May 21 1998 Cristian Gafton <gafton at redhat.com>
- upgraded to 5.0.2

* Thu Nov 20 1997 Otto Hammersmith <otto at redhat.com>
- added wmconfig

* Mon Nov 17 1997 Otto Hammersmith <otto at redhat.com>
- added changelog
- fixed src url
- added URL tag


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/nedit/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	27 Jul 2005 08:43:12 -0000	1.1
+++ .cvsignore	27 Jul 2005 08:46:29 -0000	1.2
@@ -0,0 +1 @@
+nedit-5.5-src.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/nedit/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	27 Jul 2005 08:43:12 -0000	1.1
+++ sources	27 Jul 2005 08:46:29 -0000	1.2
@@ -0,0 +1 @@
+48cb3dce52d44988f3a4d7c6f47b6bbe  nedit-5.5-src.tar.bz2




More information about the fedora-extras-commits mailing list