You are not logged in.

#1 2004-12-30 01:41:00

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

multiple server download options in PKGBUILD?

While updating my "gift-gnutella" package, apparently the download server specified in the PKGBUILD is being hit hard since "makepkg" times out while trying to connect:

--19:27:42--  http://umn.dl.sourceforge.net/sourcefor … .2.tar.bz2
  (try: 3) => `gift-gnutella-0.0.9.2.tar.bz2'
Connecting to umn.dl.sourceforge.net[128.101.80.130]:80... failed: Connection timed out.
Giving up.

* Is there any way (or correct way) to specify mutliple download server options in a PKGBUILD, if that package has multiple supported mirrors (so as to avoid this potential error and add some flexibility)?  I changed the server name from the Arch PKGBUILD to another supported mirror in my PKGBUILD and all is well, but a mutliple download section would be a nice feature.

Offline

#2 2004-12-30 01:47:09

LavaPunk
Member
Registered: 2004-03-05
Posts: 129

Re: multiple server download options in PKGBUILD?

Offline

#3 2004-12-30 06:21:11

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: multiple server download options in PKGBUILD?

The wiki is misleading in one way though.  using that alias has ALWAYS been an option and has been used on arch for some time now. Not all PKGBUILDs have been converted over but in time they will. CRUX has been using the alias for about two years now.


AKA uknowme

I am not your friend

Offline

#4 2004-12-31 23:21:46

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: multiple server download options in PKGBUILD?

Hmmm...I guess I had my beer goggles on before making this post.  In this same forum, not more than 6 posts down, "dp" already started a thread which addresses the same feature I was looking for in a PKGBUILD.

DP outlines the feature request I would like to see, but I was referring to sources on the net which have multiple non-sourceforge mirrors.

I was thinking more along the lines of allowing multiple "source=()" entries, analogous to how pacman searches mutliple download mirrors.

Offline

#5 2004-12-31 23:37:51

contrasutra
Member
From: New Jersey
Registered: 2003-07-26
Posts: 507

Re: multiple server download options in PKGBUILD?

*cough* Namcap warns you about sourceforge URLs if you run it on the PKGBUILD. You should always run namcap on your packages/PKGBUILDs.


As for the "multiple source" thing, the problem is that you can already have multiple entries in the sources() array. Each one is a separate file that needs to be grabbed. This system would have to be changed and would add complexity to makepkg (along with possibly breaking compatibility). Would you have to do an array inside of an array or something crappy like that?

PKGBUILDs could have any number of errors, and it's the duty of the maintainer to update them. PKGBUILDs aren't expected to have serious error correction. What if the build system changes? What if the dependencies change? Or the maintainer?


"Contrary to popular belief, penguins are not the salvation of modern technology.  Neither do they throw parties for the urban proletariat."

Offline

#6 2005-01-01 01:49:23

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: multiple server download options in PKGBUILD?

contrasutra wrote:

*cough* Namcap warns you about sourceforge URLs if you run it on the PKGBUILD. You should always run namcap on your packages/PKGBUILDs.

cough? Maybe you should have a doctor look into that.  I'm not quite sure what you mean by using namcap.  How does namcap insure that one perfectly good mirror will be up and running today or tommorrow?  I'd like to see that AI prediction algorithm.  We'll write a paper, submit it, and make a fortune.  I think you missed my point.  I'm talking about multiple non-sourceforge mirrors, completely unrelated to the soureceforge alias mentioned earlier, if that's what you were referring to.

contrasutra wrote:

As for the "multiple source" thing, the problem is that you can already have multiple entries in the sources() array.

I agree.  In addtion, you would have to have mutliple MD5 sums for each multiple mirror source.  However, even still, I've always wondered why "makepkg" requires an extra step to generate those sums.  Why can't "makepkg" automate that process before it starts the build?  It would compare source versions, inserting MD5 sums when necessary, erroring out when applicable, etc.  If that were done, I really don't see how that implementation would need to differ from the flexibility of mutliple pacman mirror downloads.  Instead of having a separate "source=()" line, rip it out completely and have makepkg check an external associated source file, much like in "pacman.conf".

EXAMPLE:

"./foo.source"
----------------

file=$pkgname-$pkgver.tar.gz
source=http://fooville.com/downloads
*source=http://foofooville.org/source
...

file=mypatch.patch
*source=./

...

You would not need mutliple MD5 sums (for each provided mirror) in this scenario either.  The "*" would indicate a trusted/reliable server from the mutliple mirror listings provided by "source" array.  "makepkg" would first try and use that mirror.  If it fails within a specified time, it tries the next, updates the next mirror with the "*" (or other wildcard), makes the MD5 sum, and updates the PKGBUILD accordingly.

Furthermore, you could rip out the MD5 sums from the PKGBUILD and generate them in an external file:

"./md5sums"
---------------

file=$pkgname-$pkgver.tar.gz
sum=a348b3449fc818d767b8c8570ea07eb5
file=mypatch.patch
sum=2a719c76a6174316995a4b679cec0a18
...

Of course, this would break existing implementations.  If it's not a big concern of package maintainers, then it really doesn't matter.  I just think it would make PKGBUILDS a lot more flexibile and maintainable in the long run, since one step (the sums) are automated for you now, and there is no need to manually change an unreliable mirorr.

Offline

#7 2005-01-01 02:19:20

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,363
Website

Re: multiple server download options in PKGBUILD?

alternatively sources? sounds interesting but is not really essential. the working of PKGBUILD's should be made sure by the package maintainers ... and if a URI does not work, (at least for my pkgs) please let the PM know that there is a better URI around.

i don't want to add any comment to the sourceforge sources discussion in this thread, as it is held here:
http://bbs.archlinux.org/viewtopic.php?t=1133
and a possible solution is here:
http://wiki2.archlinux.org/index.php/SourceForge%20URLs

back to the subject:
if there are alternative URI's, i have in all my pkgs these URI's in the PKGBUILD but commented out ... for example see here:
http://cvs.archlinux.org/cgi-bin/viewcv … cvs-markup
this alternative sources are in most cases kept only as a help to find a working URI, as some projects have from time to time webhosting problems or change the path to the tarballs and keeping alternatives in the PKGBUILD helps to find it faster (if e.g. broken)

the altsource=() may help for this pkgs, yes, you are right ... but from experience i know that pkgs with problems with source=() are not many, so the effort implementing altsource=() in makepkg.sh is not really worth the time (my personal opinion), because the package maintainer fixes the URI by hand very easy in such cases


The impossible missions are the only ones which succeed.

Offline

#8 2005-01-02 15:25:20

Olli
Member
Registered: 2004-04-01
Posts: 57

Re: multiple server download options in PKGBUILD?

It would be cool to have an alias for sourceforge in PKGBUILD... something like $sf.

Since a lot of software comes from there anyway, it makes things alot easier smile

Maybe we can put it standard in the makepkg.conf like:

export sf="http://dl.sourceforge.net"

Maybe just a silly idea... slightly offtopic I suppose.. sorry smile


DIY: Doom-It-Yourself

Offline

#9 2005-01-02 16:25:11

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: multiple server download options in PKGBUILD?

Try dl.sf.net...

Offline

#10 2005-03-21 22:31:45

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: multiple server download options in PKGBUILD?

Could someboby fix the WIKI to reflect the correct way to do this. I am not 100% sure on what to do after reading this discussion.

That wiki link found many times above is blank and this page isn't complete.[/code]

Offline

#11 2005-03-21 23:10:49

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: multiple server download options in PKGBUILD?

Offline

#12 2005-03-21 23:30:39

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: multiple server download options in PKGBUILD?

I added that to the WIKI. Feel free to modify it if needed.

Offline

#13 2005-03-22 04:59:31

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: multiple server download options in PKGBUILD?

Snowman wrote:

I added that to the WIKI. Feel free to modify it if needed.

Thanks

Offline

#14 2013-08-28 14:50:44

grufo
Member
Registered: 2012-08-09
Posts: 64

Re: multiple server download options in PKGBUILD?

Offline

#15 2013-08-28 14:55:07

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: multiple server download options in PKGBUILD?

This is the second ancient thread you've necrobumped. Might be a good idea to take another look at the Forum Etiquette (section of interest: linked).

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#16 2013-08-28 16:39:06

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,633
Website

Re: multiple server download options in PKGBUILD?

@grufo
Stop doing this. Consider yourself warned.

Closing...

Offline

Board footer

Powered by FluxBB