Revision: 6576
http://ipcop.svn.sourceforge.net/ipcop/?rev=6576&view=rev
Author: gespinasse
Date: 2012-04-26 12:00:10 +0000 (Thu, 26 Apr 2012)
Log Message:
-----------
Disable nls on configure( translation are not installed)
Patch flex-2.5.35 with Fedora patches
The hardening patch remove some "ignoring return value of 'fwrite'" warning in
bc-1.06, iproute2-3.3.0, libnl-3.2.7, libpcap-1.2.1, pcmciautils-018,
squidGuard-1.5-beta
It doesn't look to change produced binary or to be more exact, does not add
more files to the changed files list after full build.
Build with -Wall -Wextra. Not perfect but quiet right.
Refresh the rootfile as that was from 2.5.31 and translation are removed
On rebuild, force rebuilding the packages that depend on flex.
Modified Paths:
--------------
ipcop/trunk/config/rootfiles/common/flex
ipcop/trunk/lfs/flex
Added Paths:
-----------
ipcop/trunk/src/patches/flex-2.5.35-hardening.patch
ipcop/trunk/src/patches/flex-2.5.35-missing-prototypes.patch
ipcop/trunk/src/patches/flex-2.5.35-sign.patch
Modified: ipcop/trunk/config/rootfiles/common/flex
===================================================================
--- ipcop/trunk/config/rootfiles/common/flex 2012-04-25 19:43:33 UTC (rev
6575)
+++ ipcop/trunk/config/rootfiles/common/flex 2012-04-26 12:00:10 UTC (rev
6576)
@@ -1,27 +1,10 @@
-## flex-2.5.31
-##
#usr/bin/flex
#usr/bin/lex
#usr/include/FlexLexer.h
#usr/lib/libfl.a
+#usr/lib/libfl_pic.a
#usr/lib/libl.a
#usr/share/info/flex.info
#usr/share/info/flex.info-1
#usr/share/info/flex.info-2
-#usr/share/info/flex.info-3
-#usr/share/info/flex.info-4
-#usr/share/info/flex.info-5
-#usr/share/info/flex.info-6
-#usr/share/info/flex.info-7
-#usr/share/locale/ca/LC_MESSAGES/flex.mo
-#usr/share/locale/da/LC_MESSAGES/flex.mo
-#usr/share/locale/de/LC_MESSAGES/flex.mo
-#usr/share/locale/es/LC_MESSAGES/flex.mo
-#usr/share/locale/fr/LC_MESSAGES/flex.mo
-#usr/share/locale/ko/LC_MESSAGES/flex.mo
-#usr/share/locale/pt_BR/LC_MESSAGES/flex.mo
-#usr/share/locale/ru/LC_MESSAGES/flex.mo
-#usr/share/locale/sv/LC_MESSAGES/flex.mo
-#usr/share/locale/tr/LC_MESSAGES/flex.mo
-#usr/share/locale/zh_CN/LC_MESSAGES/flex.mo
#usr/share/man/man1/flex.1
Modified: ipcop/trunk/lfs/flex
===================================================================
--- ipcop/trunk/lfs/flex 2012-04-25 19:43:33 UTC (rev 6575)
+++ ipcop/trunk/lfs/flex 2012-04-26 12:00:10 UTC (rev 6576)
@@ -43,20 +43,25 @@
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
-PATCH1 = $(THISAPP)-gcc44-1.patch
+PATCH1 := $(THISAPP)-sign.patch
+PATCH2 := $(THISAPP)-hardening.patch
+PATCH3 := $(THISAPP)-gcc44-1.patch
+PATCH4 := $(THISAPP)-missing-prototypes.patch
+CFLAGS += -Wall -Wextra
+
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE) \
- $(PATCH1)
+ $(PATCH3)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(PATCH1) = $(URL_LFS)/$(PKG_NAME)/$(PATCH1)
+$(PATCH3) = $(URL_LFS)/$(PKG_NAME)/$(PATCH3)
$(DL_FILE)_MD5 = 10714e50cea54dc7a227e3eddcd44d57
-$(PATCH1)_MD5 = ad9109820534278c6dd0898178c0788f
+$(PATCH3)_MD5 = ad9109820534278c6dd0898178c0788f
install : $(TARGET)
@@ -86,9 +91,12 @@
$(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(PATCH1)
+ cd $(DIR_APP) && patch -p1 -i $(DIR_PATCHES)/$(PATCH1)
+ cd $(DIR_APP) && patch -p1 -i $(DIR_PATCHES)/$(PATCH2)
+ cd $(DIR_APP) && patch -p1 -i $(DIR_DL)/$(PATCH3)
+ cd $(DIR_APP) && patch -p1 -i $(DIR_PATCHES)/$(PATCH4)
- cd $(DIR_APP) && ./configure --prefix=/usr
+ cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make -j $(PARALLELISM)
ifeq "$(RUNNING_TEST)" "yes"
# no test should fail
@@ -100,5 +108,7 @@
/usr/bin/lex
chmod -v 755 /usr/bin/lex
+ # Only a static lib is provided. Those package link to -lfl or run flex
+ rm -f
$(DIR_INFO)/*/{bc,conntrack-tools,iproute2,kbd,krb5,libnl,libpcap,linux-atm,pcmciautils,squidGuard,wget}-*
@rm -rf $(DIR_APP)
@$(POSTBUILD)
Added: ipcop/trunk/src/patches/flex-2.5.35-hardening.patch
===================================================================
--- ipcop/trunk/src/patches/flex-2.5.35-hardening.patch
(rev 0)
+++ ipcop/trunk/src/patches/flex-2.5.35-hardening.patch 2012-04-26 12:00:10 UTC
(rev 6576)
@@ -0,0 +1,37 @@
+Fedora borrowed http://pkgs.fedoraproject.org/gitweb/?p=flex.git
+diff -u flex-2.5.35/scan.c flex-2.5.35/scan.c
+--- flex-2.5.35/scan.c
++++ flex-2.5.35/scan.c
+@@ -2096,7 +2096,7 @@
+ /* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+-#define ECHO fwrite( yytext, yyleng, 1, yyout )
++#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+ #endif
+
+ /* Gets input and stuffs it into "buf". number of characters read, or
YY_NULL,
+diff -u flex-2.5.35/flex.skl flex-2.5.35/flex.skl
+--- flex-2.5.35/flex.skl
++++ flex-2.5.35/flex.skl
+@@ -1075,7 +1075,7 @@
+ /* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+-#define ECHO fwrite( yytext, yyleng, 1, yyout )
++#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+ %endif
+ %if-c++-only C++ definition
+ #define ECHO LexerOutput( yytext, yyleng )
+diff -u flex-2.5.35/skel.c flex-2.5.35/skel.c
+--- flex-2.5.35/skel.c
++++ flex-2.5.35/skel.c
+@@ -1142,7 +1142,7 @@
+ "/* This used to be an fputs(), but since the string might contain NUL's,",
+ " * we now use fwrite().",
+ " */",
+- "#define ECHO fwrite( yytext, yyleng, 1, yyout )",
++ "#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)",
+ "%endif",
+ "%if-c++-only C++ definition",
+ "#define ECHO LexerOutput( yytext, yyleng )",
Added: ipcop/trunk/src/patches/flex-2.5.35-missing-prototypes.patch
===================================================================
--- ipcop/trunk/src/patches/flex-2.5.35-missing-prototypes.patch
(rev 0)
+++ ipcop/trunk/src/patches/flex-2.5.35-missing-prototypes.patch
2012-04-26 12:00:10 UTC (rev 6576)
@@ -0,0 +1,54 @@
+Fedora borrowed http://pkgs.fedoraproject.org/gitweb/?p=flex.git
+diff -up flex-2.5.35/flex.skl\~ flex-2.5.35/flex.skl
+--- flex-2.5.35/flex.skl~ 2010-07-13 17:18:43.000000000 +0200
++++ flex-2.5.35/flex.skl 2010-07-13 17:23:49.000000000 +0200
+@@ -960,6 +960,22 @@ m4_ifdef( [[M4_YY_NO_SET_LINENO]],,
+ void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );
+ ]])
+
++m4_ifdef( [[M4_YY_REENTRANT]],
++[[
++m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,
++[[
++int yyget_column M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
++]])
++]])
++
++m4_ifdef( [[M4_YY_REENTRANT]],
++[[
++m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,
++[[
++void yyset_column M4_YY_PARAMS( int column_no M4_YY_PROTO_LAST_ARG );
++]])
++]])
++
+ %if-bison-bridge
+ m4_ifdef( [[M4_YY_NO_GET_LVAL]],,
+ [[
+
+Diff finished. Tue Jul 13 17:27:50 2010
+--- flex-2.5.35/skel.c~ 2010-07-14 13:15:42.000000000 +0200
++++ flex-2.5.35/skel.c 2010-07-14 13:16:05.000000000 +0200
+@@ -1027,6 +1027,22 @@
+ "void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );",
+ "]])",
+ "",
++ "m4_ifdef( [[M4_YY_REENTRANT]],",
++ "[[",
++ "m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,",
++ "[[",
++ "int yyget_column M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
++ "]])",
++ "]])",
++ "",
++ "m4_ifdef( [[M4_YY_REENTRANT]],",
++ "[[",
++ "m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,",
++ "[[",
++ "void yyset_column M4_YY_PARAMS( int column_no M4_YY_PROTO_LAST_ARG );",
++ "]])",
++ "]])",
++ "",
+ "%if-bison-bridge",
+ "m4_ifdef( [[M4_YY_NO_GET_LVAL]],,",
+ "[[",
Added: ipcop/trunk/src/patches/flex-2.5.35-sign.patch
===================================================================
--- ipcop/trunk/src/patches/flex-2.5.35-sign.patch
(rev 0)
+++ ipcop/trunk/src/patches/flex-2.5.35-sign.patch 2012-04-26 12:00:10 UTC
(rev 6576)
@@ -0,0 +1,11 @@
+--- flex-2.5.35/gen.c-orig 2008-04-30 22:51:08.000000000 +0200
++++ flex-2.5.35/gen.c 2008-04-30 22:51:14.000000000 +0200
+@@ -1890,7 +1890,7 @@
+ outn ("\tif (
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
+ outn ("\t\t{ \\");
+ outn ("\t\tint c = '*'; \\");
+- outn ("\t\tint n; \\");
++ outn ("\t\tunsigned n; \\");
+ outn ("\t\tfor ( n = 0; n < max_size && \\");
+ outn ("\t\t\t (c = getc( yyin )) != EOF && c !=
'\\n'; ++n ) \\");
+ outn ("\t\t\tbuf[n] = (char) c; \\");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
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/
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn