You are not logged in.

#1 2012-08-03 23:02:30

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

[WORK AROUND] Cannot fetch source for dmg2img with makepkg

Generally speaking, makepkg works fine. That is, I can update, download and build other packages from AUR with aurget and makepkg just fine.

Also, the source code for dmg2img is just where the PKGBUILD claims it should be and wget has no trouble downloading it. Ditto firefox. (Source is  http://vu1tur.eu.org/tools/dmg2img-1.6.4.tar.gz.)

However, I cannot get makepkg to download dmg2img:

$ makepkg
==> Making package: dmg2img 1.6.4-1 (Fri  3 Aug 23:57:35 BST 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
  -> Downloading dmg2img-1.6.4.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 406 Not Acceptable
==> ERROR: Failure while downloading dmg2img-1.6.4.tar.gz
    Aborting...

Here's the PKGBUILD:

# Maintainer: honzor

pkgname=dmg2img
pkgver=1.6.4
pkgrel=1
pkgdesc="A CLI tool to uncompress Apple's compressed DMG files to the HFS+ IMG format"
arch=('i686' 'x86_64')
url="http://vu1tur.eu.org/tools/"
license=('GPL2')

depends=('openssl')

source=(${url}${pkgname}-${pkgver}.tar.gz)
md5sums=('3861da66bf0d2f7407aeeec93f9cfc5e')

build() {
cd "${pkgname}-${pkgver}"
make CFLAGS="${CFLAGS}" || return 1
make DESTDIR=${pkgdir} install || return 1
}

I have an older version of this package installed (1.6.2-1) and have been trying to update it for some time. Initially I thought the site was down or the url must be mistyped in the PKGBUILD or something and largely ignored it. But I sat down this evening and had a look and was surprised to find that the source is just where it should be. I don't know much about PKGBUILD files and nothing looks obviously wrong with this one to me, but I'm not sure I'm aware of all the requirements or that I'm not doing something else incorrectly.

Any pointers would be much appreciated.

Last edited by cfr (2012-08-19 14:47:58)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2012-08-03 23:28:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

My first thought was that perhaps there was a problem with the variable expansion.  So I rewrote the source line with the correct full url without variables.  This did not work.  I also tried quoting the url in double then single quotes, still no luck.

Not helpful, I know - but I can replicate the problem.  It's piqued my curiosity.

edit: wget works, but curl returns a 406 error the same as makepkg.  I suspect makepkg uses curl and gets this error.

edit2: if you'd prefer you can change the DLAGENT in /etc/makepkg.conf to use wget instead of curl.

Last edited by Trilby (2012-08-03 23:32:07)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-08-04 06:23:37

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

Yes, makepkg uses curl. see /etc/makepkg.conf.

Maybe you should also report this on the bugtracker.

Offline

#4 2012-08-19 14:47:25

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

All I did in the end was to download the package manually. At least, I have left myself a note to that effect.

When you suggest reporting this on the bugtracker, what should it be reported against? makepkg? Isn't it really a bug in the site hosting the source i.e. it shouldn't be rejecting the headers?

Note that https://aur.archlinux.org/packages.php?ID=24402 gives workarounds, too.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2012-08-19 17:56:21

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

Well report it against makepkg or curl, and see what the maintainer has to say. At least it should be brought to the notice of the developers.

Offline

#6 2012-08-19 18:09:17

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

I just don't see how it is a bug in curl or makepkg. Unless you think that makepkg should use wget by default but I don't know that that wouldn't come with its own set of issues. The only other option is for makepkg to lie by default - i.e. to claim to be using something other than curl. But again, I don't see why that should be seen as a requirement - more a possible work around to deal with buggy sites.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2012-08-19 18:26:16

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

sorry, I ignored the headers bit. Well, if the site is actively working against curl (which it shouldn't be), then you can't do much about it, other than the already mentioned methods.

I have seen similar behaviour with wget and interfacelift. spoofing the headers works.

Offline

#8 2017-09-21 16:40:03

timofonic
Member
Registered: 2007-05-15
Posts: 47

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

Sorry for the old topic. What happened to this? How to avoid it? Maybe cURL should evolve a bit in the user agent aspect and be able to provide a list of them in url or file form....

Offline

#9 2017-09-21 17:20:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

Not only is this over 5 years old, the problem in question no longer exists, so why are you asking what happened to this?  What happened: it was fixed.

As for curl, it can specify a user agent, read the man pages.  Perhaps users should evolve a bit.

Last edited by Trilby (2017-09-21 17:21:40)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2017-09-21 17:25:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: [WORK AROUND] Cannot fetch source for dmg2img with makepkg

Closing


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB