Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
FS#12645 - eval source don't work in AUR
Attached to Project:
AUR web interface
Opened by DM Joel (webjdm) - Friday, 02 January 2009, 19:56 GMT
Last edited by Loui Chang (louipc) - Monday, 02 February 2009, 01:15 GMT
Opened by DM Joel (webjdm) - Friday, 02 January 2009, 19:56 GMT
Last edited by Loui Chang (louipc) - Monday, 02 February 2009, 01:15 GMT
|
DetailsHi,
PKGBUILD with the "eval source" line cannot be uploaded in AUR. For exemple: _package=acl-2.2.47-1,atl2-2.0.5-2,attr-2.4.41-1,autoconf-2.63-1,automake-1.10.2-1 eval source=(ftp://ftp.free.fr/mirrors/ftp.archlinux.org/core/os/x86_64/{${_package}}-x86_64.pkg.tar.gz) |
This task depends upon
It is way easier to understand, and I don't thking a few copy-paste should be a problem when you make a PKGBUILD...
see firefox-i18n PKGBUILD for exemple.
So: the "eval source=..." relies on how the PKGBUILD parsing is implemented in makepkg - basically your PKGBUILD is a bash script in itself, and makepkg just loads all the variables and the build() function to execute. E.g. the extra/firefox-i18n can only work because this is the current mechanism.
There is a discussion going on that for more security and flexibility the PKGBUILD parsing will be rewritten in a way that wouldn't rely on this bash "trick". Then, for example that package will stop to work - since it does not conform to the Arch Packaging Standards as it is a requirement on AUR (just check the front page).
In my opinion it is unfortunate that this package, in the extra repo, does not conform to the standards. And the reason is I think laziness, since how much efficient you want to be when your script is already just a few lines? Efficient in what respect? Space? Amount of work it needs to be done? If you can do it with eval, than it is not more than a few lines of copy-paste. How many times you write a PKGBUILD like that that it would _seriously_ save any time? If you do it to be easier to check whether whether things are alright - you should check it anyway.
As I said, that's just my feeling.
err, what, where?
> Then, for example that package will stop to work - since it does not conform to the Arch Packaging Standards as it is a requirement on AUR (just check the front page).
Can you point me directly to the section of the Arch Packaging Standards that explicitly prevents this usage?
Last time I couldn't see any code in the aur web/html/pkgsubmit.php that would make it possible (checked on http://projects.archlinux.org/?p=aur.git;a=summary )... It is properly maintained, CVS type package, so might be an exception then a rule...
I personally would go in these kind of things the conservative way: whatever is allowed, do that. If you want to do the things that are not explicitly prevented, but not listed either (maybe because people the time of writing weren't thinking of that particular "trick") then be prepared that it won't always work. Any PKGBUILD parser (like the one on AUR) can only follow what is listed in a documentation. If you want something else just go ahead, implement it, send in the patch. That's how everybody else is doing it too, I think.
Sure, there may be situations where such scripting makes sense, but that seems
to be delegated to separate scripts and not dumped in the PKGBUILD itself.
See the build scripts for vi for an example.