Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
FS#2280 - Too picky about lines in PKGBUILD
Attached to Project:
AUR web interface
Opened by Simo Leone (neotuli) - Friday, 25 February 2005, 00:35 GMT
Last edited by Paul Mattal (paul) - Monday, 07 March 2005, 04:12 GMT
Opened by Simo Leone (neotuli) - Friday, 25 February 2005, 00:35 GMT
Last edited by Paul Mattal (paul) - Monday, 07 March 2005, 04:12 GMT
|
DetailsThe system rejects PKGBUILDs that have the md5sums variable AFTER build(), claiming it doesn't exist. This is problematic in some ways because many people like to do makepkg -g >>PKGBUILD , which plops it at the very end.
|
This task depends upon
Ideally, we could pass things off directly to bash to parse, but that would be horribly insecure. There may be some other options:
http://archlinux.spider007.net/PHPacman/
and
http://search.cpan.org/~saper/Shell-Parser-0.02/lib/Shell/Parser.pm
I'm going to set this for v2.0 because it's likely to be a lot of work to fix this properly. We might be able to special case the md5sums because of makepkg -g>>PKGBUILD.
For now, those that like to use makepkg -g >> PKGBUILD can continue to do so, so long as they add "md5sums=()" somewhere before their build() function. This works because the later md5sums overwrites the empty one, but the empty one is enough to fool the [fairly dumb] parser.
Actually, looking at the parser...it's uhm...rudimentary, I'm going to research possible better ways to do this, and I suggest we find a way to secure it, this is a hole, and a big one at that.