FS#12440 - [vim] PKGBUILD doesn't build - _patchlevel almost always wrong

Attached to Project: Arch Linux
Opened by Isaac G (IsaacG) - Sunday, 14 December 2008, 03:00 GMT
Last edited by Tobias Kieslich (tobias) - Sunday, 13 September 2009, 22:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Kieslich (tobias)
Architecture All
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:

vim PKGBUILD file defines a _patchlevel and the fetch_patches.sh buildscript requires the _patchlevel to be equal to the number of patches found on vim.org[1] which is rarely ever true since vim.org[1] is constantly adding patches.

Suggestion: set _patchlevel based on the patch file from vim.org

[1] ftp://ftp.vim.org/pub/vim/patches/MD5SUMS

This task depends upon

Closed by  Tobias Kieslich (tobias)
Sunday, 13 September 2009, 22:40 GMT
Reason for closing:  Implemented
Additional comments about closing:  It will always build what you ask for, but it will warn you and stall for 10 seconds if you actually build an older version than what is available online.
Comment by Isaac G (IsaacG) - Sunday, 14 December 2008, 03:17 GMT
Note: Changing the _patchlevel variable changes the pkgver variable[1] which in turn changes the dependency (on vi)[1] to point to a non-existing package. To make the PKGBUILD work in its current state, _patchlevel and pkgver need to be modified.

[1] pkgver=${_srcver}.${_patchlevel}
[2] depends=("vi>=${pkgver}" 'perl' 'python' 'acl')
Comment by Tobias Kieslich (tobias) - Monday, 15 December 2008, 06:43 GMT
Archlinux is mainly a binary distribution and our PKGBUILDs cater toward that. In vim's case that catch is in there, that when the package gets build we do build the latest version. Also on top of that, if someone rebuilds vim I can foresee more reasons to build the latest version then I can see to rebuild th version we have in the repositories anyway. So all a rebuilder has to do is to replace patch number and s/he should be fine. Yes that means you should rebuild vim and gvim too, but that makes sense anyway because all three are so strongly interdependent.
Comment by Jan de Groot (JGC) - Monday, 15 December 2008, 10:34 GMT
I would prefer to get the patchlevel defined in the PKGBUILD and just building that, instead of bailing out when upstream has more patches.
If upstream adds a patch in the time you're building gvim and vim, you'll have to redo the whole package. This is also true when someone else needs to do an architecture rebuild for x86_64 for example.
Comment by Greg (dolby) - Friday, 19 December 2008, 13:22 GMT
I very much like the current approach. Although in the past when i tried to build vi and family it seemed confusing.I think too much work was put up to get this working the way it does and i will be a waste if this changes. There is no perfect way to deal with this and part of it is upstreams fault. -1
Comment by Isaac G (IsaacG) - Friday, 19 December 2008, 17:02 GMT
There ought to be an official ABS philosophy that describes what the goal of the ABS is.
Is ABS supposed to provide a simple, always working, mechanism for compiling packages on your own?
Or is the aim of the ABS to allow people to build the latest package, without as much emphasis on it always being straightforward and always working?
Comment by Greg (dolby) - Friday, 19 December 2008, 17:08 GMT Comment by Jan de Groot (JGC) - Friday, 19 December 2008, 21:26 GMT
The philosophy behind ABS is that what is in ABS matches the binary packages available in the repositories. At this moment we're breaking that rule with vim.
Comment by Aaron Griffin (phrakture) - Monday, 05 January 2009, 15:45 GMT
I agree with Jan here. The fetch_patches script should probably just download patches *up to* the _patchlevel variable.

The PKGBUILD should be able to build the same package as one sees in the repos.
Comment by Baho Utot (baho-utot) - Tuesday, 27 January 2009, 23:08 GMT
Theres is more trouble ahead

ftp://ftp.vim.org/pub/vim/patches/MD5SUMS
provides:
An error occurred while loading ftp://ftp.vim.org/pub/vim/patches/MD5SUMS:
Could not connect to host ftp.vim.org.

which leads to :

http://ftp.vim.org giving:

ftp.vim.org has been registered for future usage.

Couldn't find a mirror that worked
Comment by Aaron Griffin (phrakture) - Tuesday, 27 January 2009, 23:34 GMT
Ping tobias
Comment by Tobias Kieslich (tobias) - Tuesday, 27 January 2009, 23:43 GMT
hm when vim dows not provide the patches anymore we are screwed anyway. because they are located in the same directory where the MD5SUMS file is located.
My guess their ftp server is down. Nothing wrong with our PKGBUILD files on that part.
Comment by Isaac G (IsaacG) - Tuesday, 27 January 2009, 23:49 GMT
I imagine that that is an upstream issue that ought to resolve itself.
I visited #vim on FreeNode and it seems it might be a DNS record or something.
Try 192.87.102.43 and 192.87.102.42
Comment by Aaron Griffin (phrakture) - Wednesday, 28 January 2009, 00:00 GMT
@tobias: What about the previous points that Jan and I mentioned, regarding being able to rebuild the exact same package via the PKGBUILD in abs
Comment by Tobias Kieslich (tobias) - Wednesday, 28 January 2009, 00:37 GMT
Aaron,

the wole build thing is madness and extremely hackish in order to force vim's source structure into our PKGBUILD way. I have this check in there to make sure that we always build the absolutely latest version of vim. in Theory there shall never be a reason to build older versions, because any new version is pretty much a bug fix. I agree with Jan that in theory it breaks ABS, yet for me it was always the most practical way as it allows me to make sure I'm uptodate and I can find out the most recent version number just from the scripts output. If it makes people happy I can remove it, it's just a tad more work for me to build it then. Either way I'm not religious about it.
Comment by Aaron Griffin (phrakture) - Wednesday, 28 January 2009, 01:11 GMT
What if you have it just output a warning saying "Building version X, current version is Y"?
Comment by Isaac G (IsaacG) - Wednesday, 28 January 2009, 01:15 GMT
Building the latest wouldn't be so bad if the buildscript actually computed the patchlevel based on the number of patches rather than dieing when the hardcoded patchlevel didn't match the dynamic number of patches available. Though if the philosophy of ABS is to provide the ability to build what is in the repository, Aaron's approach sounds nice.
Comment by Tobias Kieslich (tobias) - Wednesday, 28 January 2009, 02:42 GMT
that would be an approach that the svn packages are doing, that should be possible. Thoughts? I'm fine with Aarons solution as well
Comment by Baho Utot (baho-utot) - Saturday, 07 February 2009, 15:28 GMT
This breaks fetch_patches.sh

ba91b19374cee90f71b8f4ab1d92dc0f 7.2.001-100.gz

looks like they added a compressed patch to the list and fetch_patches can not process it

adding this
sed -i '/7.2.001-100.gz/d' MD5SUMS
to fetch_patches.sh will let it build but you will miss that patch

Comment by Tobias Kieslich (tobias) - Saturday, 07 February 2009, 22:55 GMT
great, they did it again and broke the scheme of the patch naming. It's kind of a pain in the neck ...
Comment by Aaron Griffin (phrakture) - Monday, 09 February 2009, 17:41 GMT
Actually, vim has don't that since the 6.X releases - when the patch level hits 100, it becomes one giant patch. It's a little annoying for automation
Comment by Xavier (shining) - Monday, 09 February 2009, 19:38 GMT
Why don't you save the MD5SUMS file locally and include it in the PKGBUILD sources?
That way the PKGBUILD always stays consistent with the package. And it is very easy to update, just get the new MD5SUMS file.
Maybe the patchlevel variable could then be dropped.

As for that .gz patch, it should be easy to support. It might be even possible to do something funny like this :
(zcat $patch 2>/dev/null || cat $patch) | patch -p1 :)
Comment by Florian Pritz (bluewind) - Sunday, 15 February 2009, 18:39 GMT
Little patch that fixes the script and should work http://flo.server-speed.net/stuff/private/fetch_patches.sh.diff
You can now build the package with any patchlevel you want to.
Comment by Bjoern Hiller (Zaphod) - Sunday, 15 February 2009, 19:18 GMT
Another little patch for fetch_patches.sh.

This one uses patch collections mentioned in MD5SUMS as .gz to speed up download of the patches.
Comment by Tobias Kieslich (tobias) - Thursday, 25 June 2009, 16:29 GMT
The issue is taken care of in testing an d hopefully will be deployed to extra soon

Loading...