You are not logged in.
Sometimes the $pkgname is different from source package tarball filename, so it is necessary to use a different variables.. For an imaginary foo package, with sources available at http://foo.org/foo-linux-1.2.tar.gz , the PKGBUILD fragment may look like
...
pkgname=foo
pkgname0=foo-linux
pkgver=1.2
source=('http://foo.org/$pkgname0-$pkgver.tar.gz')
...
unfortunaly, in such case, the AUR web page points to a wrong sources URL: http://foo.org/foo0-1.2.tar.gz . It looks like the frontend thinks that the source URL must contain $pkgname, and is doing simple string substitution, not interpreting the PKGBUILD as a shell script.
Is there already a working way how to form the PKGBUILD, to avoid this sort of problem ?
Last edited by mykhal (2007-09-02 17:28:50)
Offline
use source=('http://foo.org/$pkgname-linux-$pkgver.tar.gz')
or source=('http://foo.org/foo-linux-$pkgver.tar.gz')
or any other way that'll make the pkgbuild download the sources is acceptable
There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums. That is why we avoid it. -- ewaller (arch linux forum moderator)
Offline
thanks, this is so simple and obvious solution, so that it even didn't come to my mind.. :]
Offline
However, this fix follows KISS principle, but not DRY, because the alternate package name also has to be used in build() again.
Offline
some people use $_altname and things like that.
I don't know how I feel about it though.
DRY is only really valid in cases where you are duplicating OFTEN or EXCESSIVELY.
Two or three instances of manually typing the name is, in my opinion, not repetitive enough to violate KISS.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
some people use $_altname and things like that.
I don't know how I feel about it though. ...
It does not matter if one uses $pkgname0, $pkgname_ or $_pkgname, the URL is always wrong, see e.g. http://aur.archlinux.org/packages.php?d … 1&ID=11270
I think it should be fixed in AUR web frontend, because it cripples sources URL in many cases.
Offline
I agree that this is an AUR bug. The workaround dolby suggested is certainly fine for the interim, so its not a high-priority bug. I would suggest reporting it to the bug tracker, but apparently its "down for maintenance".
Dusty
Offline
OK, the bug, or maybe the fly, is reported. It's #7941, for reference.
Offline
.. by the way, what can someone do, if he wants to have his AUR PKGBUILDs reviewed and flagged as Safe, if he both is not and does not know any TUR ?
Offline
.. by the way, what can someone do, if he wants to have his AUR PKGBUILDs reviewed and flagged as Safe, if he both is not and does not know any TUR ?
Usually TUs get to them eventually, but I don't think they'd be offended if you e-mailed the tur-users list. They might be though, you never know with TUs. They can be an unstable bunch. :-D
Dusty
Offline
They can be an unstable bunch.
We should get somebody to flag them 'safe'.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Hey I resent that, I'm not unstable! I can't speak for anyone else, but if you email the tur-users ml, I *might* take a look at the pkgbuild, try it, and mark it safe.
Offline
Hey I resent that
See what I mean? Unstable.
*nods wisely*
:-D
Dusty
Offline
Actually, I'd be careful. If you mailed it on the ML, all 28 of us TUs might look at it and then fight over who's going to mark it safe...
Offline
I will! I will! said nesl247 as he jumped up and down.
Offline
Strange that there are so many volunteers, and my packages are still black instead of being green..
Offline
maybe its not safe. :-D
Offline
well how about linking us to your packages, don't make us do all the work =]
Offline
thanks for an interest.. http://aur.archlinux.org/packages.php?SeB=m&K=mykhal
(Edit: oops, K has to be upper case)
Last edited by mykhal (2007-09-03 17:44:12)
Offline
Done. Check your pkgbuild pages for comments. MIT licenses require the license to be installed into /usr/share/licenses/$pkgname. custom variables always begin with a _.
I don't think I'll ever flag the openssh pkg as safe because you're implementing completely new functions not found in the official package. Other than that, fix the others and you're good to go =/
Offline
...I don't think I'll ever flag the openssh pkg as safe because you're implementing completely new functions not found in the official package. Other than that, fix the others and you're good to go =/
thanks for the review.
If you look more carefully at the openssh patch, it is not implementing anything new, openssh has an infrastructure for using hardware engines (engines.h), but is not used by default somehow, the patch is just enabling it. Anyway, I'm not creator of the patch, is it taken from Michal Ludvig's site (http://www.logix.cz/michal/devel/padlock/) , some of his patches have also been accepted in linux kernel.
But I understand, this is very sensitive package..
Offline
By the way, it's strange that it's required to append '|| return 1' after 'make install', but not after 'python setup.py' .. only 4 of 59 packages in the ABS tree have it.
Offline
I think there was a discussion about it some time ago. I prefer to have it because I've seen quite a few packages that continue to build even after install fails. It's more of a personal thing for me since PKGBUILD standards are very lax. Perhaps another TU might mark it safe instead, I for one, won't.
edit: I should probably add, the pkgbuild itself is "safe", but I just prefer compliant pkgbuilds =]
Last edited by tardo (2007-09-03 20:23:59)
Offline