Update of /cvsroot/fink/dists/10.7/stable/main/finkinfo/editors In directory vz-cvs-3.sog:/tmp/cvs-serv3240
Modified Files: nano-cur.info nano-cur.patch Log Message: Hardening build flags Add --disable-wrapping-as-root Update to latest svn version Index: nano-cur.info =================================================================== RCS file: /cvsroot/fink/dists/10.7/stable/main/finkinfo/editors/nano-cur.info,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- nano-cur.info 4 Sep 2011 20:02:32 -0000 1.1 +++ nano-cur.info 6 Jul 2012 23:53:11 -0000 1.2 @@ -1,6 +1,6 @@ Package: nano-cur Version: 2.3.1 -Revision: 4546 +Revision: 4547 Description: Free Pico clone with some new features (dev) License: GPL Maintainer: Andreas Gockel <fink-n...@unixforge.de> @@ -15,16 +15,13 @@ Conflicts: nano-unstable, nano-small, nano-noutf8, nano Source: http://www.nano-editor.org/dist/v2.3/nano-%v.tar.gz Source-MD5: af09f8828744b0ea0808d6c19a2b4bfd -#PatchFile: %n.patch -#PatchFile-MD5: 0f5a4d49c9530d18332a5b769b093aaf -#PatchScript: patch -p2 <%{PatchFile} -SetCPPFLAGS: -I%p/include/ncursesw -ConfigureParams: --disable-dependency-tracking --enable-utf8 -### -# Debugging: -#SetCFLAGS: -Wall -Wextra -std=gnu99 -pedantic -#ConfigureParams: --enable-dependency-tracking --enable-utf8 --enable-debug -### +PatchFile: %n.patch +PatchFile-MD5: c134a8b792eeaf9c57e09964d7a5d455 +SetCFLAGS: -g -O2 -fstack-protector -Wformat -Werror=format-security +SetCPPFLAGS: -D_FORTIFY_SOURCE=2 -I%p/include/ncursesw +SetCXXFLAGS: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security +SetLDFLAGS: -Wl,-read_only_stubs +ConfigureParams: --disable-dependency-tracking --disable-wrapping-as-root --enable-utf8 InstallScript: << /usr/bin/make install prefix=%i /usr/bin/install -d -m 755 %i/{etc,share/doc/%n/man-html/fr} @@ -58,7 +55,7 @@ << DescPort: << This version of nano includes all changes from svn since 2.2.6 release. - Current svn version is: r4546 + Current svn version is: r4547 . Create patchfile: cd into svn checkout Index: nano-cur.patch =================================================================== RCS file: /cvsroot/fink/dists/10.7/stable/main/finkinfo/editors/nano-cur.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- nano-cur.patch 4 Sep 2011 20:02:32 -0000 1.1 +++ nano-cur.patch 6 Jul 2012 23:53:11 -0000 1.2 @@ -0,0 +1,120 @@ +diff --unidirectional-new-file -U 0 -rx .svn nano_2_3_1/ChangeLog nano/ChangeLog +--- nano_2_3_1/ChangeLog 2011-12-18 22:20:12.000000000 +0100 ++++ nano/ChangeLog 2012-07-07 01:41:55.000000000 +0200 +@@ -0,0 +1,9 @@ ++2012-02-05 Chris Allegretta <chr...@asty.org> ++ * src/*: Fix overlapping strings highlighting each other. new variables in edit_draw ++ (slmatcharray, pbegin, paintok), new logic (with repeated setting od values in the ++ array but its BFI after all). FIXME: Need to create a new 'overlap' ++ * src/*: Fix a silly issue with the argument to nregcomp, as it's confusing to the caller ++ * src/nano.h: Change the color types to a compiler macro (COLORWIDTH), may not actually ++ even be worth doing, but someday who knows how wide a color curses implementation might ++ be, and maybe we'll even start checking for it in autoconf! ++ +diff --unidirectional-new-file -U 0 -rx .svn nano_2_3_1/src/nano.h nano/src/nano.h +--- nano_2_3_1/src/nano.h 2011-12-18 22:20:10.000000000 +0100 ++++ nano/src/nano.h 2012-07-07 01:41:55.000000000 +0200 +@@ -192,0 +193 @@ ++#define COLORWIDTH short +@@ -194 +195 @@ +- short fg; ++ COLORWIDTH fg; +@@ -196 +197 @@ +- short bg; ++ COLORWIDTH bg; +@@ -215 +216,3 @@ +- int id; ++ bool overlap; ++ /* Is it acceptable for other regexes to overlap this one? */ ++ int id; +diff --unidirectional-new-file -U 0 -rx .svn nano_2_3_1/src/proto.h nano/src/proto.h +--- nano_2_3_1/src/proto.h 2011-12-18 22:20:10.000000000 +0100 ++++ nano/src/proto.h 2012-07-07 01:41:55.000000000 +0200 +@@ -554 +554 @@ +-bool nregcomp(const char *regex, int eflags); ++bool nregcomp(const char *regex, int cflags); +diff --unidirectional-new-file -U 0 -rx .svn nano_2_3_1/src/rcfile.c nano/src/rcfile.c +--- nano_2_3_1/src/rcfile.c 2011-12-18 22:20:10.000000000 +0100 ++++ nano/src/rcfile.c 2012-07-07 01:41:55.000000000 +0200 +@@ -228 +228 @@ +-bool nregcomp(const char *regex, int eflags) ++bool nregcomp(const char *regex, int cflags) +@@ -232 +232 @@ +- int rc = regcomp(&preg, r, REG_EXTENDED | eflags); ++ int rc = regcomp(&preg, r, REG_EXTENDED | cflags); +@@ -669 +669 @@ +-short color_to_short(const char *colorname, bool *bright) ++COLORWIDTH color_to_short(const char *colorname, bool *bright) +@@ -671 +671 @@ +- short mcolor = -1; ++ COLORWIDTH mcolor = -1; +@@ -711 +711 @@ +- short fg, bg; ++ COLORWIDTH fg, bg; +@@ -861 +861 @@ +- newcolor->id = endsyntax->nmultis; ++ newcolor->id = endsyntax->nmultis; +diff --unidirectional-new-file -U 0 -rx .svn nano_2_3_1/src/winio.c nano/src/winio.c +--- nano_2_3_1/src/winio.c 2011-12-18 22:20:10.000000000 +0100 ++++ nano/src/winio.c 2012-07-07 01:41:55.000000000 +0200 +@@ -2492,0 +2493,15 @@ ++ int i, coloruid = 0; /* We need a unique color ID now */ ++ static filestruct *lastptr = NULL; ++ static COLORWIDTH *slmatcharray = NULL; ++ /* Array to track how much we've painted of the line for single line matches */ ++ ++ if (lastptr != fileptr || start == 0) { ++ if (slmatcharray != NULL) ++ free(slmatcharray); ++ slmatcharray = (COLORWIDTH *)nmalloc(strlenpt(fileptr->data) * sizeof(COLORWIDTH)); ++ ++ /* Init slmatcharray */ ++ for (i = 0; i < strlenpt(fileptr->data); i++) ++ slmatcharray[i] = -1; ++ } ++ +@@ -2497 +2511,0 @@ +- int i; +@@ -2499 +2513 @@ +- for (i = 0; i < openfile->syntax->nmultis; i++) ++ for (i = 0; i < openfile->syntax->nmultis; i++) +@@ -2500,0 +2515 @@ ++ +@@ -2514,0 +2530 @@ ++ coloruid++; +@@ -2522 +2538 @@ +- /* First case, tmpcolor is a single-line expression. */ ++ /* First case,tmpcolor is a single-line expression. */ +@@ -2530,0 +2547,2 @@ ++ bool paintok = TRUE; ++ +@@ -2539,0 +2558,2 @@ ++ ++ +@@ -2549,0 +2570,2 @@ ++ size_t pbegin = strnlenpt(fileptr->data, startmatch.rm_so); ++ +@@ -2562 +2584,9 @@ +- mvwaddnstr(edit, line, x_start, converted + ++ /* Check that the match is not preceeded by another previous ++ (single line) match before proceeding to paint it */ ++ if (slmatcharray[pbegin] != -1 && slmatcharray[pbegin] != coloruid) ++ paintok = FALSE; ++ ++ if (paintok == TRUE) { ++ int p; ++ ++ mvwaddnstr(edit, line, x_start, converted + +@@ -2563,0 +2594,4 @@ ++ for (p = pbegin; p < pbegin + (startmatch.rm_eo - startmatch.rm_so); p++) { ++ slmatcharray[p] = coloruid; /* Add to our match array for the proper length */ ++ } ++ } +@@ -2565 +2599,4 @@ +- k = startmatch.rm_eo; ++ if (paintok) ++ k = startmatch.rm_eo; ++ else ++ k = startmatch.rm_so + 1; +@@ -2751,0 +2789 @@ ++ lastptr = fileptr; ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs