[pacman-dev] [patch] makepkg: update checksums (was: add checksums and resume)

Ray Rashif schivmeister at gmail.com
Thu Oct 15 03:34:18 EDT 2009


2009/10/15 Allan McRae <allan at archlinux.org>

> Xavier wrote:
>
>> On Thu, Oct 15, 2009 at 7:12 AM, Dan McGee <dpmcgee at gmail.com> wrote:
>>
>>
>>> On Wed, Oct 14, 2009 at 10:51 PM, Allan McRae <allan at archlinux.org>
>>> wrote:
>>>
>>>
>>>> Dan McGee wrote:
>>>>
>>>>
>>>>> On Mon, Oct 12, 2009 at 12:01 AM, Ray Rashif <schivmeister at gmail.com>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Fixed no-vimset bail, reverted plain "", fixed bail on no sums by
>>>>>> default;
>>>>>> source makepkg.
>>>>>>
>>>>>>
>>>>>>
>>>>> Allan, I know you are busy these days, so I can take a hack at
>>>>> reviewing this but I'd also like to hear what other people think of
>>>>> the idea in general. I know we just closed a feature request asking
>>>>> for this: http://bugs.archlinux.org/task/15809
>>>>>
>>>>>
>>>>>
>>>> There is a discussion going on in http://bugs.archlinux.org/task/15051.
>>>>  Xavier has had a good look at this and posted an updated patch there.
>>>>  The
>>>> remaining issue is PKGBUILDs with architecture specific checksums.
>>>>
>>>>
>>> /me lets the discussion continue without him :P
>>>
>>>
>>>
>>
>> Well the discussion was already almost over if you look at the comments :)
>>
>> The problem is that this requires some sed/awk skills and I have none
>> at all. The sed commands proposed until now either did not work or
>> failed in bad ways on some pkgbuilds, deleting parts of it.
>>
>> The awk way seemed more reliable than the sed ones :
>> { rm PKGBUILD; awk '$0 ~ /^md5sums/ {i = 1; system("makepkg -g
>> 2>/dev/null")}; !i {print}; $0 ~ /\)/ {i = 0}' > PKGBUILD; } <
>> PKGBUILD
>>
>> But does it makes sense to incorporate this in makepkg ? To have
>> makepkg call himself ?
>>
>>
>
> makepkg already does call itself :P
>
> I obviously need to read the bug report....  but does the awk way get
> around the acrhitecture specific checksum issue?


Indeed, the awk one doesn't do anything funny. But still, no solution to
arch-specific sums. Unless of course you find a nice way to redirect and
present it nicely in the PKGBUILD. And is why I thought it shouldn't be
supported, albeit in a not-so-foolproof way. Mainly because it appeared to
me that there weren't that many packages which would fail given that kind of
treatment (we can of course back up PKGBUILD to /tmp or something):

grep -r "&& md5sums=(" /var/abs | grep "/PKGBUILD:" | sed 's/:.*//' gives:

/var/abs/community/jdk/PKGBUILD
/var/abs/community/jdk/PKGBUILD
/var/abs/community/jre/PKGBUILD
/var/abs/community/jre/PKGBUILD
/var/abs/community/libvdpau/PKGBUILD
/var/abs/community/tuxguitar/PKGBUILD
/var/abs/extra/nvidia-96xx-utils/PKGBUILD
/var/abs/extra/nvidia-96xx/PKGBUILD
/var/abs/extra/nvidia-173xx/PKGBUILD
/var/abs/extra/nvidia/PKGBUILD
/var/abs/extra/nxclient/PKGBUILD
/var/abs/extra/nvidia-utils/PKGBUILD
/var/abs/extra/nvidia-173xx-utils/PKGBUILD

Total pkgs affected: 13 out of 4000+ (provided all PKGBUILDs are "standard",
i.e "&&" is on the same line as ${integ}sums in this case integ=md5)

Interestingly, it appears there are no multi-arch sums for the rest of the
hash types, as far as poor grep'ing is concerned =/


More information about the pacman-dev mailing list