Gentoo Archives: gentoo-user

From: Alexander Skwar <listen@×××××××××××××××.name>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Using Amazon S3 as a PORTAGE_BINHOST
Date: Wed, 31 Oct 2007 14:19:29
Message-Id: 2759734.WETaqBNkju@kn.gn.rtr.message-center.info
1 Hello.
2
3 I'd like to use one of my public "buckets" at Amazon S3 to store the
4 package files. To do so, I uploaded the packages to s3. They are
5 available at <http://public-files.askwar.gentoo-packages.s3.amazonaws.com/>,
6 all stored under the prefix GentooUSB/packages, eg. at
7 <http://public-files.askwar.gentoo-packages.s3.amazonaws.com/GentooUSB/packages/All/python-updater-0.3.tbz2>.
8 To make portage use this binhost, I set in make.conf:
9
10 PORTAGE_BINHOST="http://public-files.askwar.gentoo-packages.s3.amazonaws.com/GentooUSB/packages/"
11
12 But when I now try to use a package from there, eg.
13 =app-admin/python-updater-0.3, I get an error message:
14
15 winnb000488 / # emerge -vp --getbinpkgonly =app-admin/python-updater-0.3
16
17 These are the packages that would be merged, in order:
18
19 Calculating dependencies \Fetching binary packages info...
20 x-amz-request-id: 1C961B660CF71C9F
21 x-amz-id-2: qH6bzWMvFg+tG1iI0JFTefqCoxJBg3lrL2jdRVw1LrSc2djm0s+oEYiSGlHw1rgE
22 Content-Type: application/xml
23 Transfer-Encoding: chunked
24 Date: Wed, 31 Oct 2007 14:10:52 GMT
25 Server: AmazonS3
26
27 <?xml version="1.0" encoding="UTF-8"?>
28 <Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>GentooUSB/packages/</Key><RequestId>1C961B660CF71C9F</RequestId><HostId>qH6bzWMvFg+tG1iI0JFTefqCoxJBg3lrL2jdRVw1LrSc2djm0s+oEYiSGlHw1rgE</HostId></Error>
29 address: /GentooUSB/packages/
30 Traceback (most recent call last):
31 File "/usr/bin/emerge", line 5481, in ?
32 retval = emerge_main()
33 File "/usr/bin/emerge", line 5476, in emerge_main
34 myopts, myaction, myfiles, spinner)
35 File "/usr/bin/emerge", line 4802, in action_build
36 mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
37 File "/usr/bin/emerge", line 991, in __init__
38 "--getbinpkgonly" in self.myopts)
39 File "/usr/lib/portage/pym/portage.py", line 6598, in populate
40 self.remotepkgs = getbinpkg.dir_get_metadata(
41 File "/usr/lib/portage/pym/getbinpkg.py", line 448, in dir_get_metadata
42 filelist = dir_get_list(baseurl, conn)
43 File "/usr/lib/portage/pym/getbinpkg.py", line 294, in dir_get_list
44 raise Exception, "Unable to get listing: %s %s" % (rc,msg)
45 Exception: Unable to get listing: 404 Server did not respond successfully (404: Not Found)
46
47 I suppose that's so, because there's no /GentooUSB/packages "directory"
48 on the server? If you go to <http://public-files.askwar.gentoo-packages.s3.amazonaws.com/GentooUSB/packages/>,
49 you only get a 404 error. But the "file" <http://public-files.askwar.gentoo-packages.s3.amazonaws.com/GentooUSB/packages/All/python-updater-0.3.tbz2>
50 exists just fine.
51
52 Does anyone know, if it's somehow possible to use S3 with Portage as a
53 host for PORTAGE_BINHOST?
54
55 Thanks,
56
57 Alexander
58
59 --
60 gentoo-user@g.o mailing list