On 03/12/2009, at 8:41 AM, Dan McGee wrote:
On Wed, Dec 2, 2009 at 2:47 PM, Ciprian Dorin, Craciun <ciprian.craciun@gmail.com> wrote:
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...
As a side note, it doesn't exist on all UNIX-y systems, for example on Mac OS X- there is a /sbin/md5, but not an md5sum command.
-Dan
From what I recall, the `md5` utility on Mac OS X uses openssl (libcrypto) anyway. It does occur to me that hashing should be re- factored into a separate function, as it does occur at least twice. On 03/12/2009, at 5:30 AM, Ciprian Dorin, Craciun wrote:
For the moment, I think that my best option is to write my own makepkg.
Of course I'll write it in any other programming language than Bash... :) For example I think I'll try rc (Plan9 shell), because it seems the most sane shell I've ever seen...
That's a little drastic. Why not just make the changes you wanted to makepkg? You could also send the patches to the ML. They might not get accepted, but if you're willing to go as rewriting makepkg from scratch, what do you care? Bash isn't the greatest language to write a large (for bash) utility like makepkg, but I doubt RC will be much better. Why can't you just install bsdtar and openssl? Sure they're separate packages, but ones that makepkg depends on.