From 6435ff19cadcce5a23202ac4e4f99cfd07177319 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Jan 09 2023 10:41:49 +0000 Subject: FTBFS with new FORTIFY_SOURCE=3 - remove it since Vim wants level 1 --- diff --git a/vim-fortify-source.patch b/vim-fortify-source.patch new file mode 100644 index 0000000..8c7c458 --- /dev/null +++ b/vim-fortify-source.patch @@ -0,0 +1,30 @@ +diff --git a/src/auto/configure b/src/auto/configure +index 7821451..6901da5 100755 +--- a/src/auto/configure ++++ b/src/auto/configure +@@ -15041,8 +15041,8 @@ $as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5 + $as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; } + if test "$gccmajor" -gt "3"; then +- CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` +- CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'` ++ CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` ++ CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + else +diff --git a/src/configure.ac b/src/configure.ac +index 38ace2a..c05e30e 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -4618,8 +4618,8 @@ if test "$GCC" = yes; then + dnl And undefine it first to avoid a warning. + AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1) + if test "$gccmajor" -gt "3"; then +- CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` +- CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'` ++ CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` ++ CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g'` + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) diff --git a/vim.spec b/vim.spec index a52ac2d..0730765 100644 --- a/vim.spec +++ b/vim.spec @@ -50,7 +50,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 License: Vim and MIT Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 @@ -91,6 +91,7 @@ Patch3004: vim-python3-tests.patch Patch3005: vim-crypto-warning.patch # don't ever set mouse (Fedora downstream patch) Patch3006: vim-8.0-copy-paste.patch +Patch3007: vim-fortify-source.patch # uses autoconf in spec file @@ -390,6 +391,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3004 -p1 -b .python-tests %patch3005 -p1 -b .fips-warning %patch3006 -p1 -b .copypaste +%patch3007 -p1 -b .fortify %build cd src @@ -431,8 +433,6 @@ perl -pi -e "s/vimrc/virc/" os_unix.h --disable-canberra \ --disable-libsodium -echo $CFLAGS - %make_build cp vim minimal-vim make clean @@ -998,6 +998,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %endif %changelog +* Mon Jan 09 2023 Zdenek Dohnal - 2:9.0.1054-2 +- FTBFS with new FORTIFY_SOURCE=3 - remove it since Vim wants level 1 + * Wed Dec 14 2022 Zdenek Dohnal - 2:9.0.1054-1 - patchlevel 1054