diff --git a/vim-7.0-highlight_fstab.patch b/vim-7.0-highlight_fstab.patch index 8e56704..6c4e8f4 100644 --- a/vim-7.0-highlight_fstab.patch +++ b/vim-7.0-highlight_fstab.patch @@ -16,7 +16,16 @@ Index: vim72/runtime/syntax/fstab.vim syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown syn match fsTypeUnknown /\s\+\zs\w\+/ contained -syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 fdesc ffs filecore fuse hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs -+syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs debugfs devfs devpts e2compr efs ext2 ext2fs ext3 ext4 ext4dev fdesc ffs filecore fuse hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs ++syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs binfmt_misc cd9660 cfs cifs coda cramfs debugfs devfs devpts e2compr efs ext2 ext2fs ext3 ext4 ext4dev fdesc ffs filecore fuse hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs rpc_pipefs shm smbfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs " Options " ------- +@@ -58,7 +58,7 @@ syn match fsOptionsString /[a-zA-Z0-9_-] + syn keyword fsOptionsYesNo yes no + syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck + syn keyword fsOptionsSize 512 1024 2048 +-syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user users xx ++syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner pamconsole rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user[s] xx + syn match fsOptionsGeneral /_netdev/ + + " Options: adfs diff --git a/vim-7.1.314-CVE-2009-0316-debian.patch b/vim-7.1.314-CVE-2009-0316-debian.patch new file mode 100644 index 0000000..19530a0 --- /dev/null +++ b/vim-7.1.314-CVE-2009-0316-debian.patch @@ -0,0 +1,52 @@ +diff -p -up ./src/if_python.c.tv ./src/if_python.c +--- ./src/if_python.c.tv 2009-02-25 09:58:07.000000000 +0100 ++++ ./src/if_python.c 2009-02-25 09:58:11.000000000 +0100 +@@ -394,6 +394,7 @@ static PyInt RangeEnd; + static void PythonIO_Flush(void); + static int PythonIO_Init(void); + static int PythonMod_Init(void); ++static void Python_FixPath(void); + + /* Utility functions for the vim/python interface + * ---------------------------------------------- +@@ -537,6 +538,11 @@ Python_Init(void) + * the current directory in sys.path. */ + PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)"); + ++ /* Remove empty elements from sys.path since that causes the PWD to be ++ * used for imports, possibly masking system libraries and/or running ++ * arbitrary code. */ ++ Python_FixPath(); ++ + /* the first python thread is vim's, release the lock */ + Python_SaveThread(); + +@@ -2390,6 +2396,28 @@ PythonMod_Init(void) + return 0; + } + ++ static void ++Python_FixPath(void) ++{ ++ PyObject *sys = PyImport_ImportModule("sys"); ++ PyObject *sysdict = PyModule_GetDict(sys); ++ PyObject *path = PyDict_GetItemString(sysdict, "path"); ++ PyObject *newpath = PyList_New(0); ++ if (newpath != NULL) { ++ Py_INCREF(newpath); ++ PyInt n = PyList_Size(path); ++ PyInt i; ++ for (i = 0; i < n; i++) { ++ PyObject *item = PyList_GetItem(path, i); ++ if (strlen(PyString_AsString(item)) != 0) { ++ PyList_Append(newpath, PyList_GetItem(path, i)); ++ } ++ } ++ PyDict_SetItemString(sysdict, "path", newpath); ++ Py_DECREF(newpath); ++ } ++} ++ + /************************************************************************* + * 4. Utility functions for handling the interface between Vim and Python. + */ diff --git a/vim-7.2-lib64.patch b/vim-7.2-lib64.patch new file mode 100644 index 0000000..e9bb8f1 --- /dev/null +++ b/vim-7.2-lib64.patch @@ -0,0 +1,22 @@ +--- src/configure.in ++++ src/configure.in 2009-02-25 16:42:39.840201362 +0100 +@@ -659,7 +659,7 @@ if test "$enable_pythoninterp" = "yes"; + [ + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +- for subdir in lib share; do ++ for subdir in lib64 lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" +--- src/auto/configure ++++ src/auto/configure 2009-02-25 16:42:24.320701679 +0100 +@@ -5091,7 +5091,7 @@ else + + vi_cv_path_python_conf= + for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do +- for subdir in lib share; do ++ for subdir in lib64 lib share; do + d="${path}/${subdir}/python${vi_cv_var_python_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python_conf="$d" diff --git a/vim-7.2-lzma-support.patch b/vim-7.2-lzma-support.patch new file mode 100644 index 0000000..20f7b97 --- /dev/null +++ b/vim-7.2-lzma-support.patch @@ -0,0 +1,102 @@ +--- runtime/plugin/gzip.vim ++++ runtime/plugin/gzip.vim 2007-07-10 14:32:54.000000000 +0200 +@@ -20,17 +20,21 @@ augroup gzip + " + " Set binary mode before reading the file. + " Use "gzip -d", gunzip isn't always available. +- autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z setlocal bin ++ autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma setlocal bin + autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn") + autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d") + autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress") ++ autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d") + autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip") + autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2") + autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f") ++ autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma") + autocmd FileAppendPre *.gz call gzip#appre("gzip -dn") + autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d") + autocmd FileAppendPre *.Z call gzip#appre("uncompress") ++ autocmd FileAppendPre *.lzma call gzip#appre("lzma -d") + autocmd FileAppendPost *.gz call gzip#write("gzip") + autocmd FileAppendPost *.bz2 call gzip#write("bzip2") + autocmd FileAppendPost *.Z call gzip#write("compress -f") ++ autocmd FileAppendPost *.lzma call gzip#write("lzma") + augroup END +--- runtime/autoload/tar.vim ++++ runtime/autoload/tar.vim 2008-08-27 14:53:48.000000000 +0200 +@@ -371,6 +371,14 @@ fun! tar#Write(fname) + let tarfile = substitute(tarfile,'\.bz2','','e') + let compress= "bzip2 -- ".s:Escape(tarfile,0) + " call Decho("compress<".compress.">") ++ elseif tarfile =~# '\.lzma' ++ call system("lzma -d ".tarfile) ++ let tarfile = substitute(tarfile,'\.lzma','','e') ++ let compress= "lzma '".tarfile."'" ++ elseif tarfile =~# '\.tlz' ++ call system("lzma -d ".tarfile) ++ let tarfile = substitute(tarfile,'\.tlz','tar','e') ++ let compress= "lzma '".tarfile."'" + endif + " call Decho("tarfile<".tarfile.">") + +--- runtime/autoload/getscript.vim ++++ runtime/autoload/getscript.vim 2008-08-27 14:54:40.000000000 +0200 +@@ -542,6 +542,11 @@ fun! s:GetOneScript(...) + exe "silent !gunzip ".s:Escape(sname) + let sname= substitute(sname,'\.gz$','','') + " call Decho("decompress: new sname<".sname."> after gunzip") ++ elseif sname =~ '\.lzma$' ++" call Decho("decompress: attempt to gunzip ".sname) ++ exe "silent !unlzma ".sname ++ let sname= substitute(sname,'\.lzma$','','') ++" call Decho("decompress: new sname<".sname."> after unlzma") + endif + + " distribute archive(.zip, .tar, .vba) contents +--- runtime/filetype.vim ++++ runtime/filetype.vim 2007-07-11 11:35:26.000000000 +0200 +@@ -34,7 +34,7 @@ au BufNewFile,BufRead ?\+.in + " Pattern used to match file names which should not be inspected. + " Currently finds compressed files. + if !exists("g:ft_ignore_pat") +- let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$' ++ let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\|lzma\|tlz\)$' + endif + + " Function used for patterns that end in a star: don't set the filetype if the +--- runtime/autoload/netrw.vim ++++ runtime/autoload/netrw.vim 2008-08-27 14:49:59.000000000 +0200 +@@ -1362,6 +1362,9 @@ fun! s:NetrwGetFile(readcmd, tfile, meth + elseif rfile =~ '\.tar\.bz2' + " call Decho("handling remote bz2-compressed tar file") + call tar#Browse(tfile) ++ elseif rfile =~ '\.tar\.lzma' ++" call Decho("handling remote lzma-compressed tar file") ++ call tar#Browse(tfile) + else + " call Decho("edit temporary file") + e! +@@ -7237,7 +7240,7 @@ fun! s:GetTempfile(fname) + if a:fname != "" + if a:fname =~ '\.[^./]\+$' + " call Decho("using fname<".a:fname.">'s suffix") +- if a:fname =~ '.tar.gz' || a:fname =~ '.tar.bz2' ++ if a:fname =~ '.tar.gz' || a:fname =~ '.tar.bz2' || a:fname =~ '.tar.lzma' + let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') + else + let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') +--- runtime/autoload/vimball.vim ++++ runtime/autoload/vimball.vim 2008-08-27 14:55:40.000000000 +0200 +@@ -516,6 +516,11 @@ fun! vimball#Decompress(fname) + exe "e ".escape(fname,' \') + call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") + ++ elseif expand("%") =~ '.*\.lzma' && executable("unlzma") ++ exe "!unlzma ".a:fname ++ let fname= substitute(a:fname,'\.lzma$','','') ++ exe "e ".escape(fname,' \') ++ call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") + elseif expand("%") =~ '.*\.zip' && executable("unzip") + " handle *.zip with unzip + silent exe "!unzip ".s:Escape(a:fname) diff --git a/vim-7.2-patches.bz2 b/vim-7.2-patches.bz2 index 1de6fd5..cd678a7 100644 --- a/vim-7.2-patches.bz2 +++ b/vim-7.2-patches.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12ac83f555808b9b80c8b62ba41f52f4423b605de76c852996c997078349e721 -size 97528 +oid sha256:cddca138dfc10dae0ba69cd1ae99ac975e5ad8f50e4a7812cc000c5cc74ef485 +size 109150 diff --git a/vim-7.2-php.patch b/vim-7.2-php.patch new file mode 100644 index 0000000..21f52b8 --- /dev/null +++ b/vim-7.2-php.patch @@ -0,0 +1,92 @@ +--- runtime/indent/php.vim ++++ runtime/indent/php.vim 2009-02-25 16:18:00.411965000 +0100 +@@ -2,9 +2,9 @@ + " Language: PHP + " Author: John Wellesz + " URL: http://www.2072productions.com/vim/indent/php.vim +-" Last Change: 2008 June 7th ++" Last Change: 2008 November 22nd + " Newsletter: http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php +-" Version: 1.28 ++" Version: 1.30 + " + " If you find a bug, please e-mail me at John.wellesz (AT) teaser (DOT) fr + " with an example of code that breaks the algorithm. +@@ -24,7 +24,7 @@ + " NOTE: This script must be used with PHP syntax ON and with the php syntax + " script by Lutz Eymers (http://www.isp.de/data/php.vim ) or with the + " script by Peter Hodge (http://www.vim.org/scripts/script.php?script_id=1571 ) +-" the later is bunbdled by default with vim 7. ++" the later is bunbdled by default with Vim 7. + " + " + " In the case you have syntax errors in your script such as HereDoc end +@@ -75,7 +75,7 @@ + " some optimizations won't be available. + " + " Options: PHP_vintage_case_default_indent = 1 (defaults to 0) to add a meaningless indent +-" befaore 'case:' and 'default":' statement in switch block ++" befaore 'case:' and 'default":' statement in switch blocks. + " + + if exists("b:did_indent") +@@ -145,6 +145,7 @@ if &fileformat == "unix" && exists("PHP_ + endif + + if exists("*GetPhpIndent") ++ call ResetPhpOptions() + finish " XXX + endif + +@@ -317,14 +318,13 @@ endfunction " }}} + let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|else\)' + let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\)' + +-let s:autorestoptions = 0 +-if ! s:autorestoptions +- au BufWinEnter,Syntax *.php,*.php3,*.php4,*.php5 call ResetOptions() +- let s:autorestoptions = 1 ++let s:autoresetoptions = 0 ++if ! s:autoresetoptions ++ let s:autoresetoptions = 1 + endif + +-function! ResetOptions() +- if ! b:optionsset ++function! ResetPhpOptions() ++ if ! b:optionsset && &filetype == "php" + if b:PHP_autoformatcomment + + setlocal comments=s1:/*,mb:*,ex:*/,://,:# +@@ -341,6 +341,8 @@ function! ResetOptions() + endif + endfunc + ++call ResetPhpOptions() ++ + function! GetPhpIndent() + + let b:GetLastRealCodeLNum_ADD = 0 +@@ -360,7 +362,7 @@ function! GetPhpIndent() + if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast + if b:PHP_indentbeforelast + let b:PHP_indentinghuge = 1 +- echom 'Large indenting detected, speed optimizations engaged (v1.28)' ++ echom 'Large indenting detected, speed optimizations engaged (v1.30 BETA 1)' + endif + let b:PHP_indentbeforelast = b:PHP_lastindented + endif +@@ -715,11 +717,11 @@ function! GetPhpIndent() + elseif last_line =~ '^\s*'.s:blockstart + let ind = ind + &sw + +- elseif last_line =~# defaultORcase ++ elseif last_line =~# defaultORcase && cline !~# defaultORcase + let ind = ind + &sw + + +- elseif pline =~ '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . defaultORcase ++ elseif pline =~ '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . defaultORcase && cline !~# defaultORcase + + let ind = ind + &sw + endif diff --git a/vim.changes b/vim.changes index 26c6898..c4881bf 100644 --- a/vim.changes +++ b/vim.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Feb 25 16:55:54 CET 2009 - werner@suse.de + +- Upto version 7.2.127 +- Be sure that lib64 is found by configure +- Add patch for CVE-2009-0316 from debian +- lzma support +- Add some missed fstab keywords + ------------------------------------------------------------------- Mon Feb 16 17:15:16 CET 2009 - werner@suse.de diff --git a/vim.spec b/vim.spec index b1ba449..746b99d 100644 --- a/vim.spec +++ b/vim.spec @@ -20,7 +20,7 @@ Name: vim Version: 7.2 -Release: 9 +Release: 10 # License: Other uncritical OpenSource License; http://vimdoc.sourceforge.net/htmldoc/uganda.html#license Group: Productivity/Editors/Vi @@ -29,7 +29,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: db-devel fdupes gettext-devel gpm gtk2-devel libacl-devel ncurses-devel perl python-devel ruby-devel tcl-devel update-alternatives update-desktop-files # %define pkg_version 7.2 -%define official_ptchlvl 108 +%define official_ptchlvl 127 %define VIM_SUBDIR vim72 %define site_runtimepath /usr/share/vim/site # @@ -93,6 +93,10 @@ Patch18: vim-7.1-filetype_spec.patch Patch19: vim-7.2-diff_check.patch Patch21: vim-7.1-filetype_changes.patch Patch22: vim-7.1-remove-terrible-hack.patch +Patch23: vim-7.2-php.patch +Patch24: vim-7.2-lib64.patch +Patch25: vim-7.2-lzma-support.patch +Patch100: vim-7.1.314-CVE-2009-0316-debian.patch # tbd??? %name-6.3-ga-utf8.diff # tbd??? %name-6.3-initvals.diff # tbd??? vim64-svn-crash.patch @@ -306,6 +310,10 @@ unset p %patch19 -p1 %patch21 -p1 %patch22 +%patch23 +%patch24 +%patch25 +%patch100 -p1 cp %{S:3} %{S:4} %{S:5} %{S:6} %{S:8} %{S:9} %{S:10} . rename no nb $RPM_BUILD_DIR/vim*/src/po/no.* rename menu_no menu_nb $RPM_BUILD_DIR/vim*/runtime/lang/menu_no* @@ -688,6 +696,12 @@ fi %endif %changelog +* Wed Feb 25 2009 werner@suse.de +- Upto version 7.2.127 +- Be sure that lib64 is found by configure +- Add patch for CVE-2009-0316 from debian +- lzma support +- Add some missed fstab keywords * Mon Feb 16 2009 werner@suse.de - Update to patchlevel 108 ... fixes bnc#470100, bnc#465255, bnc#439148, bnc#436755, bnc#457098, and bnc#470100