[pacman-dev] makepkg in a constrained environment

Ciprian Dorin, Craciun ciprian.craciun at gmail.com
Wed Dec 2 15:47:31 EST 2009


On Wed, Dec 2, 2009 at 3:43 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> On Wed, Dec 2, 2009 at 5:01 AM, Ciprian Dorin, Craciun
> <ciprian.craciun at gmail.com> wrote:
>> [... snip ...]
>>    * if one has declared of using only MD5 sums (most of the packages
>> do this), it insists on using `openssl dgst` to create them;
> See commit b8a66d68593d1f267c3bb8cd8943724711626903 as Allan pointed
> out, which was to fix FS#10530. You'd be reverting that which is not
> really what we want.


    Looking closer at what the mentioned patch introduced:
~~~~
- local sum="$(${integ}sum "$file" | cut -d ' ' -f 1)"
+ local sum="$(openssl dgst -${integ} "$file" | awk '{print $NF}')"
~~~~
    I'm proposing not to get back to what it has been (which assumed
that there was a md5sum sha128sum, <something-else>sum), but I'm
proposing that for md5 we should use md5sum, which I'm sure it exists
on any UNIX. Or better even, try to see if openssl exists, if not
falling back to md5sum, at least for md5sums...

    This doesn't break anything, and it allows makepkg to work without openssl.


>>    * it insists on using file tool to identify the file type;
> Allan got this one. (FS#6246)

    I understand that `file` tool was introduced to enhance makepkg,
and I'm not proposing to drop it, but instead if `file` does not
exist, to fall-back to file-extension handling.


>> [... snip ...]
> -Dan

    Please see that I'm saying everywhere:

    If <something> tool does not exist, switch back, that is fallback,
to some more primitive way of solving things.

    Ciprian.


More information about the pacman-dev mailing list