You are not logged in.

#1 2007-09-14 19:22:42

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Source url problem

Hi all,
I'm trying to update a package but I have some problem to download it:
the source url is:

http://git.fedoraproject.org/?p=hosted/nodoka;a=blob_plain;f=branches/0.6/gtk-nodoka-engine-0.6.tar.gz;hb=HEAD

with a browser the file is downloaded correctly, but with wget the name of the file is something like

index.html?p=hosted%2Fnodoka;a=blob_plain;f=branches%2F0.6%2Fgtk-nodoka-engine-0.6.tar.gz;hb=HEAD

Someone know some hacks for this problem?
Thanks

Luca

Last edited by luca (2007-09-14 19:33:59)

Offline

#2 2007-09-14 20:02:23

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Source url problem

Maybe Example_GIT_PKGBUILD from the wiki will help.

Last edited by Lone_Wolf (2007-09-14 20:02:41)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2007-09-14 20:16:13

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Source url problem

Lone_Wolf wrote:

Maybe Example_GIT_PKGBUILD from the wiki will help.

I think that would only help for using the last git code, not the stable released tarball, but I could be wrong.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#4 2007-09-15 06:27:15

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Source url problem

Yes Shining has right, I want to download the stable code
Thank you for your help

Offline

#5 2007-09-15 09:08:24

rixxon
Member
Registered: 2007-03-09
Posts: 16

Re: Source url problem

This shouldn't be a problem. Makepkg uses file -biz to determine file type, so it should extract it even if the file name is awkward.

Offline

#6 2007-09-15 09:38:41

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Source url problem

Hi rixxon,
the problem is the name of the file; it must be enclosed in " or ' because I obtain this error:

cp: impossibile fare stat di `gtk-nodoka-engine-0.6.tar.gz;hb=HEAD': No such file or directory

while the complete name of the file downloaded is

index.html?p=hosted%2Fnodoka;a=blob_plain;f=branches%2F0.6%2Fgtk-nodoka-engine-0.6.tar.gz;hb=HEAD

Last edited by luca (2007-09-15 09:39:03)

Offline

#7 2007-09-15 09:40:03

rixxon
Member
Registered: 2007-03-09
Posts: 16

Re: Source url problem

Ok I see what you mean. This is because makepkg expects the resulting download to be the basename of the source url. Use noextract=() and extract manually in build():

source=('http://git.fedoraproject.org/?p=hosted/nodoka;a=blob_plain;f=branches/0.6/gtk-nodoka-engine-0.6.tar.gz;hb=HEAD')
noextract=('gtk-nodoka-engine-0.6.tar.gz;hb=HEAD')

build() {
  cd $startdir/src
  tar -xzf 'index.html?p=hosted%2Fnodoka;a=blob_plain;f=branches%2F0.6%2Fgtk-nodoka-engine-0.6.tar.gz;hb=HEAD'
  cd $pkgname-$pkgver
  ...
}

something like that.

Last edited by rixxon (2007-09-15 09:41:49)

Offline

#8 2007-09-15 09:57:14

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Source url problem

Apparently makepkg fails before the extracting part. when trying to move the file to src/.
So noextract doesn't work around it.

I hoped there would be a way to use that archive, but it looks more difficult than I expected.
You could maybe :
1) Ask these guys to fix the link so that it works correctly with wget
2) use git as suggested above by Lone_Wolf , but trying to get the stable branch with it.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#9 2007-09-15 10:13:05

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Source url problem

Thank you rixxon,
but it seems that noextract doesn't work , this is my PKGBUILD:

pkgname=gtk-engine-nodoka
pkgver=0.6
pkgrel=1
pkgdesc="Default gtk engine provided by Fedora8"
url="https://hosted.fedoraproject.org/projects/nodoka/wiki"
license=('GPL')
depends=('gtk2')
makedepends=('pkgconfig')
arch=(i686)
source=("http://git.fedoraproject.org/?p=hosted/nodoka;a=blob_plain;f=branches/0.6/gtk-nodoka-engine-0.6.tar.gz;hb=HEAD" \
        "http://git.fedoraproject.org/?p=hosted/nodoka;a=blob_plain;f=branches/0.3/nodoka-theme-gnome-0.3.2.tar.gz;hb=HEAD")
noextract=("gtk-nodoka-engine-0.6.tar.gz;hb=HEAD" "nodoka-theme-gnome-0.3.2.tar.gz;hb=HEAD")
md5sums=('82124020169af64931c059c606e3c7d8' '6bd4a54194d9c981c4894fc77b254943')
options=(!libtool)

build() {
  cd $startdir/src
  tar -xzvf 'index.html?p=hosted%2Fnodoka;a=blob_plain;f=branches%2F0.6%2Fgtk-nodoka-engine-0.6.tar.gz;hb=HEAD'
  tar -xzvf 'index.html?p=hosted%2Fnodoka;a=blob_plain;f=branches%2F0.3%2Fnodoka-theme-gnome-0.3.2.tar.gz;hb=HEAD'
  cd $startdir/src/gtk-nodoka-engine-$pkgver
  sed -i 's|/usr/bin/install|/bin/install|g' $startdir/src/gtk-nodoka-engine-$pkgver/src/Makefile.in
  ./configure --prefix=/usr --enable-animation
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  mkdir -p $startdir/pkg/usr/share/themes
  cd $startdir/src/nodoka-theme-gnome
  cp -r Nodoka $startdir/pkg/usr/share/themes
}

Offline

#10 2007-09-15 10:17:43

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Source url problem

A dirty solution is to tell wget to save the file with a different name:

FTPAGENT="$FTPAGENT -O gtk-nodoka-engine-0.6.tar.gz;hb=HEAD"

but it doesn't work with curl for example

Offline

#11 2007-09-15 11:32:11

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Source url problem

If the file is saved as 'index.html?p=hosted%2Fnodoka;a=blob_plain;f=branches%2F0.6%2Fgtk-nodoka-engine-0.6.tar.gz;hb=HEAD' isn't that what you should put in noextract as well?


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#12 2007-09-15 11:48:04

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Source url problem

No vEX, the problem persits. As Shining said the error is before the extracting part

Offline

#13 2007-09-15 20:52:12

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

Re: Source url problem

The PKGBUILD you posted workes here on x86_64 after adding  x86_64 to the arch field.  The only problem is that it can't do the md5sums check so I had to comment out the md5sums.

Offline

#14 2007-09-15 22:10:41

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Source url problem

Oops, my bad. What I said only applies to makepkg 3.1 .
It works fine with makepkg 3.0 indeed, except the md5sum part. Also it fails to copy the files from $startdir/src to $SRCDEST (which defaults to $startdir), but it isn't critical.

makepkg 3.1 however first download the files to $SRCDEST (which still defaults to $startdir), and then try to link them to $startdir/src, where it fails. And it stops there.

I am not sure if I should report a bug for this, since it's apparently not possible to support these broken url...

Otherwise, after thinking a bit on this problem, rather than using this dirty hack previously mentioned : FTPAGENT="$FTPAGENT -O gtk-nodoka-engine-0.6.tar.gz;hb=HEAD"
or using git manually and trying to checkout the stable release with it,
why not just combining these 2 ways?
That is, downloading the files manually with wget (so not using the sources array, just like git/svn/cvs PKGBUILDs), and extracting them manually.
This works nicely with both makepkg versions.

pkgname=gtk-engine-nodoka
pkgver=0.6
pkgrel=1
pkgdesc="Default gtk engine provided by Fedora8"
url="https://hosted.fedoraproject.org/projects/nodoka/wiki"
license=('GPL')
depends=('gtk2')
makedepends=('pkgconfig')
arch=(i686)
options=(!libtool)

build() {
  cd $startdir/src
  wget -O gtk-nodoka-engine-0.6.tar.gz "http://git.fedoraproject.org/?p=hosted/nodoka;a=blob_plain;f=branches/0.6/gtk-nodoka-engine-0.6.tar.gz;hb=HEAD"
  wget -O nodoka-theme-gnome-0.3.2.tar.gz "http://git.fedoraproject.org/?p=hosted/nodoka;a=blob_plain;f=branches/0.3/nodoka-theme-gnome-0.3.2.tar.gz;hb=HEAD"

  tar -xzvf gtk-nodoka-engine-0.6.tar.gz
  tar -xzvf nodoka-theme-gnome-0.3.2.tar.gz
  cd $startdir/src/gtk-nodoka-engine-$pkgver
  sed -i 's|/usr/bin/install|/bin/install|g' $startdir/src/gtk-nodoka-engine-$pkgver/src/Makefile.in
  ./configure --prefix=/usr --enable-animation
  make || return 1
  make DESTDIR=$startdir/pkg install || return 1
  mkdir -p $startdir/pkg/usr/share/themes
  cd $startdir/src/nodoka-theme-gnome
  cp -r Nodoka $startdir/pkg/usr/share/themes
}

Of course, that's still rather awkward, we have to do manually what makepkg is supposed to do, but well, I am afraid there isn't any real solutions.

I still think the best one is to contact these guys, and ask them if they can do something about it smile


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#15 2007-09-16 05:50:45

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Source url problem

Thanks to Snowman and all other people that help me,
I removed the md5sum= and the package compiles well.

Last edited by luca (2007-09-16 05:51:07)

Offline

Board footer

Powered by FluxBB