Ubuntu Pastebin

Paste from al at Mon, 22 Aug 2016 20:06:12 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
My config.yaml

#config:
#  packageproxy:
#    repos: [[ubuntu,http://archive.ubuntu.com/ubuntu],[partner,http://archive.canonical.com/ubuntu]]
#    interval: 60
#    max_rate: unlimited
#    max_redirects: 5
#    pdiffs: false
#    offline: false
#    max_wait: 10
#    verbose: false
#    debug: false
#    port: 9999



# fetch Packages direct from the servers.
wget http://archive.ubuntu.com/ubuntu/dists/devel/main/binary-amd64/Packages.gz -O Packages-archive
wget http://archive.canonical.com/ubuntu/dists/devel/partner/binary-amd64/Packages.gz -O Packages-partner

# fetch from approx directly, as if we had modified sources.list

# first the main archive, no problem:
wget http://localhost:9999/ubuntu/dists/devel/main/binary-amd64/Packages.gz -O Packages-archive-cache-direct

# now the partner repo:
wget http://localhost:9999/ubuntu/dists/devel/partner/binary-amd64/Packages.gz -O Packages-partner-cache-direct

# oops, that 404'd. We need to change the URL like this:
wget http://localhost:9999/partner/dists/devel/partner/binary-amd64/Packages.gz -O Packages-partner-cache-direct


# Now here is the problem. Approx makes the following claim:

# "Approx also simplifies the administration of client machines: repository locations need only be changed in approx's configuration file, not in every client's /etc/apt/sources.list file."

# "Approx can be used as a replacement for apt-proxy, with no need to modify clients' /etc/apt/sources.list files"

# apr-proxy works by setting a http_proxy for apt so let's try it:

# this works
http_proxy=http://localhost:9999 wget http://archive.ubuntu.com/ubuntu/dists/devel/main/binary-amd64/Packages.gz -O Packages-archive-cache-indirect

# this fails with 404.
http_proxy=http://localhost:9999 wget http://archive.canonical.com/ubuntu/dists/devel/partner/binary-amd64/Packages.gz -O Packages-partner-cache-indirect
Download as text