You are not logged in.

#1 2009-09-24 22:54:03

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Rewrote fetch_patches.sh for Vim package

Hello smile

Because I noted that the fetch_patches.sh Bash script used in the packaging of Vim doesn't use the gzipped 100-packs of patches, making it extremely slow, I rewrote it with this feature and also redid some other stuff.
Here's the bug report, with the redone script attached: http://bugs.archlinux.org/task/16165

I posted this because I'd appreciate any bug discovery, cleanup suggestions, etc.  I'm still quite new to using Bash for more than very small functions, and I'm sure there's a lot of weirdness in what I wrote (to a more experienced 'Basher').  Thanks smile

Offline

#2 2009-09-25 14:15:19

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Rewrote fetch_patches.sh for Vim package

I am as old as CVS, and people still don't get the point of Version Control System ? smile

Why don't we just use vim-cvs / vim-svn / vim-git / whatever instead of manually fetching all these patches ?


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2009-09-25 19:17:33

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: Rewrote fetch_patches.sh for Vim package

I would think because that would get the latest development version, instead of the latest stable.  Unless they have a VCS branch or whatever you want to call it for exactly what Vim 7.2 + patches gives you.  They do appear to have a branch that looks like that, but some commits say "Patch 7.2.xxx" and some others say stuff about merging from development, so I dunno.

That would be much nicer though, yes.

Offline

#4 2009-09-25 19:26:45

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Rewrote fetch_patches.sh for Vim package

Now we are having the conversation on both sides. I am not sure how to handle it smile

Anyway, from http://www.vim.org/subversion.php :

Note: The SVN repository is updated regularly, but not immediately. Vim's SVN repository may be a few days behind the head of development. For information on patching Vim with the most up-to-date patches, consult the information on patches

I found this quite funny and ironical that the svn would lag behind... But it let me think that it should give the same patches in the end.

And also this :

Unstable versions
There are other versions available in the SVN reposository. Currently there is no unstable version. If there was you would get this with:

          svn co https://vim.svn.sourceforge.net/svnroot … hes/vim7.x

To find out what other versions are available, use a browser to view https://vim.svn.sourceforge.net/svnroot/vim/branches/.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2009-09-25 20:38:47

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: Rewrote fetch_patches.sh for Vim package

Ranguvar wrote:

I would think because that would get the latest development version, instead of the latest stable.  Unless they have a VCS branch or whatever you want to call it for exactly what Vim 7.2 + patches gives you.  They do appear to have a branch that looks like that, but some commits say "Patch 7.2.xxx" and some others say stuff about merging from development, so I dunno.

That would be much nicer though, yes.

Am I the only one who thinks their svn looks messy?

Take a look at

svn log https://vim.svn.sourceforge.net/svnroot/vim/branches/vim7.2/ | less

I think that's what we are looking for.

shining wrote:

I found this quite funny and ironical that the svn would lag behind... But it let me think that it should give the same patches in the end.

Arch jumped nearly 200 patches with the last vim update so it really shouldn't matter.  Unless you want the latest patches RIGHT NOW! Well, they seem to be in sync atm so that argument is mute as well.

Offline

#6 2009-09-26 01:00:20

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Rewrote fetch_patches.sh for Vim package

Garns wrote:

Am I the only one who thinks their svn looks messy?

Take a look at

svn log https://vim.svn.sourceforge.net/svnroot/vim/branches/vim7.2/ | less

I think that's what we are looking for.

Hm, why is that messy ? That looks good smile But I very rarely look at svn log, and don't even remember what the last time was..

shining wrote:

I found this quite funny and ironical that the svn would lag behind... But it let me think that it should give the same patches in the end.

Arch jumped nearly 200 patches with the last vim update so it really shouldn't matter.  Unless you want the latest patches RIGHT NOW! Well, they seem to be in sync atm so that argument is mute as well.

Yeah, good point.

By the way the bug report is there : http://bugs.archlinux.org/task/16165


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2009-09-26 13:55:41

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Rewrote fetch_patches.sh for Vim package

Rebuilding the vim package was indeed awful. Downloading all these patches is ugly and takes ages.
At least Ranguvar script makes this nicer by using the bundle (I just tried it once and it worked).
But I am still not happy with that complexity.
And note that we have a similar thing for the runtime :
http://repos.archlinux.org/viewvc.cgi/v … iew=markup
Fortunately the runtime can also be updated with rsync : http://www.vim.org/runtime.php

So here is a much simpler pkgbuild :

# $Id: PKGBUILD 49631 2009-08-14 06:17:04Z tobias $
# Maintainer: tobias [ tobias at archlinux org ]

pkgname=vim-cvs
pkgver=20090926
pkgrel=1
pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor'
arch=(i686 x86_64)
license=('custom:vim')
url="http://www.vim.org"
depends=('gpm' 'coreutils' 'python')
makedepends=('wget' 'sed' 'grep' 'gettext' 'perl' 'cvs' 'rsync')
optdepends=('perl:    the runtime provides a view useful perl scripts')
conflicts=(vi vim)
provides=(vi vim)
backup=(etc/vimrc)
source=(vimrc)
md5sums=('f0ae352446cf00c1e33fa2e74e5836eb')

_cvsroot=":pserver:anonymous@vim.cvs.sf.net:/cvsroot/vim"
_cvsmod="vim7"

fetch() {
  # update source
  cd "$srcdir"
  msg "Connecting to $_cvsmod CVS server...."
  if [ -d $_cvsmod/CVS ]; then
    cd $_cvsmod
    cvs -z3 update -d
  else
    cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod
    cd $_cvsmod
  fi
  msg "CVS checkout done or server timeout"
  rm -rf "$srcdir/$_cvsmod-build"
  cp -r "$srcdir/$_cvsmod" "$srcdir/$_cvsmod-build"
  # update runtime
  cd "$srcdir/$_cvsmod-build/runtime"
  rsync -avzcP --delete --exclude="dos" --exclude="spell" ftp.nluug.nl::Vim/runtime/
}

build()
{
  fetch

  cd "$srcdir/$_cvsmod-build"

  sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
  sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' src/feature.h
  # build party
  ./configure --prefix=/usr --localstatedir=/var/lib/vim --mandir=/usr/share/man \
  --with-compiledby=ArchLinux --with-features=big \
  --enable-gpm --enable-acl --with-x=no --disable-gui \
  --enable-multibyte --enable-cscope \
  --enable-perlinterp --enable-pythoninterp
  make || return 1
}

package() {
  cd "$srcdir/$_cvsmod-build"
  make VIMRCLOC=/etc DESTDIR=${pkgdir} install

  install -Dm644 ${srcdir}/vimrc  ${pkgdir}/etc/vimrc
  install -dm755 ${pkgdir}/usr/share/licenses/vim
  cd ${pkgdir}/usr/share/licenses/vim
  ln -s ../../vim/vim72/doc/uganda.txt license.txt
}

# vim:set ts=2 sw=2 et:

I made other changes which are debatable :
1) I didn't care about the fileconflicts with vi, I don't want vi
2) I don't want to install gvim for python support so I enabled it here
3) I removed the archlinux vimrc changes, I just use this one instead : runtime! vimrc_example.vim

I still didn't figure out which config changes I really need from vimrc_example.vim but there are some I need, for example to restore the cursor position from last time.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#8 2009-09-26 15:16:31

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: Rewrote fetch_patches.sh for Vim package

shining wrote:
Garns wrote:

Am I the only one who thinks their svn looks messy?

Take a look at

svn log https://vim.svn.sourceforge.net/svnroot/vim/branches/vim7.2/ | less

I think that's what we are looking for.

Hm, why is that messy ? That looks good smile But I very rarely look at svn log, and don't even remember what the last time was..

Finding it was the problem, but that could just be my lack of SVN experience.

Offline

#9 2009-10-01 21:51:58

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: Rewrote fetch_patches.sh for Vim package

Shining, I like your approach much better, I should have looked into it before doing my script smile

I thought main Vim development was done via Subversion though, not CVS?  Wouldn't using their SVN be preferable?

Offline

#10 2009-10-01 22:04:54

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Rewrote fetch_patches.sh for Vim package

Ranguvar wrote:

I thought main Vim development was done via Subversion though, not CVS?  Wouldn't using their SVN be preferable?

I mentioned this in #4.
Both cvs and svn are stated to be regularly, but not immediately updated.
http://www.vim.org/cvs.php
http://www.vim.org/subversion.php

And my comment #2 was referring to that too. It seems the real developement is made without any vcs...


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB