You are not logged in.

#1 2007-09-02 17:26:06

mykhal
Member
Registered: 2007-04-03
Posts: 35

AUR web frontend sources URL problem

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

#2 2007-09-02 17:42:02

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: AUR web frontend sources URL problem

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

#3 2007-09-02 17:44:48

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

thanks, this is so simple and obvious solution, so that it even didn't come to my mind.. :]

Offline

#4 2007-09-02 18:10:25

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

However, this fix follows KISS principle, but not DRY, because the alternate package name also has to be used in build() again.

Offline

#5 2007-09-02 18:32:56

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: AUR web frontend sources URL problem

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

#6 2007-09-02 18:51:31

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

cactus wrote:

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

#7 2007-09-02 19:07:10

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: AUR web frontend sources URL problem

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

#8 2007-09-02 19:54:43

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

OK, the bug, or maybe the fly, is reported. It's #7941, for reference.

Offline

#9 2007-09-02 20:54:09

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

.. 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

#10 2007-09-02 21:26:29

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: AUR web frontend sources URL problem

mykhal wrote:

.. 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

#11 2007-09-02 22:04:04

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: AUR web frontend sources URL problem

Dusty wrote:

They can be an unstable bunch.

We should get somebody to flag them 'safe'.
wink


"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

#12 2007-09-02 22:36:16

nesl247
Member
Registered: 2006-05-30
Posts: 191
Website

Re: AUR web frontend sources URL problem

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

#13 2007-09-03 05:05:51

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: AUR web frontend sources URL problem

nesl247 wrote:

Hey I resent that

See what I mean? Unstable. cool

*nods wisely*

:-D

Dusty

Offline

#14 2007-09-03 05:08:00

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: AUR web frontend sources URL problem

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

#15 2007-09-03 05:25:09

nesl247
Member
Registered: 2006-05-30
Posts: 191
Website

Re: AUR web frontend sources URL problem

I will! I will! said nesl247 as he jumped up and down.

Offline

#16 2007-09-03 14:35:58

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

Strange that there are so many volunteers, and my packages are still black instead of being green..

Offline

#17 2007-09-03 15:29:03

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: AUR web frontend sources URL problem

maybe its not safe. :-D

Offline

#18 2007-09-03 15:46:54

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: AUR web frontend sources URL problem

well how about linking us to your packages, don't make us do all the work =]

Offline

#19 2007-09-03 17:42:34

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

thanks for an interest.. smile 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

#20 2007-09-03 18:13:06

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: AUR web frontend sources URL problem

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

#21 2007-09-03 19:08:57

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

tardo wrote:

...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.. smile

Offline

#22 2007-09-03 19:16:54

mykhal
Member
Registered: 2007-04-03
Posts: 35

Re: AUR web frontend sources URL problem

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

#23 2007-09-03 20:23:15

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: AUR web frontend sources URL problem

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

Board footer

Powered by FluxBB