commit 3675ad2d8154069d3cf75c8adae43b567f050130 Author: Elan Ruusamäe <g...@pld-linux.org> Date: Mon Jul 3 20:11:06 2017 +0300
drop yylex to static force fixes build with current pld; feel free to fix this better way pam.spec | 2 ++ pam_console-lex-static.patch | 72 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) --- diff --git a/pam.spec b/pam.spec index e0a32f9..8a4638b 100644 --- a/pam.spec +++ b/pam.spec @@ -39,6 +39,7 @@ Source8: config-util.5 Source9: %{name}.tmpfiles Source10: postlogin.pamd Patch0: %{name}-pld-modules.patch +Patch1: %{name}_console-lex-static.patch Patch2: %{name}-tally-fail-close.patch Patch3: %{name}-mkhomedir-notfound.patch Patch4: %{name}-db-gdbm.patch @@ -245,6 +246,7 @@ pam_userdb - PAM module to authenticate against a Berkeley DB database %prep %setup -q -a2 -n Linux-PAM-%{version} %patch0 -p1 +%patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 diff --git a/pam_console-lex-static.patch b/pam_console-lex-static.patch new file mode 100644 index 0000000..38d37b7 --- /dev/null +++ b/pam_console-lex-static.patch @@ -0,0 +1,72 @@ +undos this "static" cast because current flex fails to compile result: + +flex-2.6.4-1.x86_64 + +../pam_console.save/configfile.lex.c 2017-07-03 19:58:38.318088677 +0300 +../pam_console/configfile.lex.c 2017-07-03 20:03:36.986144030 +0300 +@@ -1089,7 +1089,7 @@ + + extern int yylex (void); + +-#define YY_DECL STATIC int yylex (void) ++#define YY_DECL int yylex (void) + #endif /* !YY_DECL */ + +build log included: + +bison -y -d -o configfile.tab.c -p _pc_yy configfile.y +configfile.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] +sh ./sed-static configfile.tab.c +flex -Cr -oconfigfile.lex.c -P_pc_yy configfile.l +sh ./sed-static configfile.lex.c +/usr/lib64/ccache/x86_64-pld-linux-gcc -DHAVE_CONFIG_H -D_GNU_SOURCE -I. -I../.. -I../../libpam/include -I../../libpamc/include -DLOCKDIR=\"/var/run/console\" -O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wwrite-strings -Winline -Wshadow -MT pam_console_apply-configfile.o -MD -MP -MF .deps/pam_console_apply-configfile.Tpo -c -o pam_console_apply-configfile.o `test -f 'configfile.c' || echo './'`configfile.c +In file included from configfile.c:56:0: +configfile.lex.c:23:15: error: static declaration of '_pc_yylex' follows non-static declaration + #define yyleng _pc_yyleng + ^ +configfile.lex.c:1091:28: note: in expansion of macro 'yylex' + + ^ +configfile.lex.c:1111:1: note: in expansion of macro 'YY_DECL' + */ + ^~~ +configfile.lex.c:23:15: note: previous declaration of '_pc_yylex' was here + #define yyleng _pc_yyleng + ^ +configfile.lex.c:1089:12: note: in expansion of macro 'yylex' + + ^ +In file included from configfile.c:57:0: +configfile.y:325:1: warning: 'do_yyerror' defined but not used [-Wunused-function] + do_yyerror(const char *format, ...) { + ^~~~~~~~~~ +In file included from configfile.c:56:0: +configfile.lex.c:11:24: warning: '_pc_yy_scan_string' defined but not used [-Wunused-function] + #define yy_scan_buffer _pc_yy_scan_buffer + ^ +configfile.lex.c:2000:24: note: in expansion of macro 'yy_scan_string' + */ + ^ +In file included from configfile.c:56:0: +configfile.lex.c:1624:16: warning: 'input' defined but not used [-Wunused-function] + #else + ^ +configfile.lex.c:1581:17: warning: 'yyunput' defined but not used [-Wunused-function] + + ^ +make[3]: *** [Makefile:698: pam_console_apply-configfile.o] Error 1 +make[3]: Leaving directory '/home/users/glen/rpm/BUILD/x86_64-linux/Linux-PAM-1.3.0/modules/pam_console' + + + /* Code executed at the beginning of each rule, after yytext and yyleng +--- Linux-PAM-1.3.0/modules/pam_console/sed-static~ 2005-12-15 14:16:13.000000000 +0200 ++++ Linux-PAM-1.3.0/modules/pam_console/sed-static 2017-07-03 20:03:11.824903776 +0300 +@@ -13,7 +13,7 @@ + /^YY_BUFFER_STATE yy_scan_buffer/s/^/STATIC / + /^YY_BUFFER_STATE yy_scan_string/s/^/STATIC / + /^void yy_switch_to_buffer/s/^/STATIC / +-/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC / ++#/define YY_DECL int yylex/s/YY_DECL /YY_DECL STATIC / + /^int yyparse/s/^/STATIC / + /^void yyrestart/s/^/STATIC / + ' < $1 > sedtmp.$$ && mv sedtmp.$$ $1 ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/pam.git/commitdiff/3675ad2d8154069d3cf75c8adae43b567f050130 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit