natives 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +8 -8
  2. data/Gemfile +2 -3
  3. data/Gemfile.lock +12 -53
  4. data/README.md +126 -29
  5. data/Rakefile +4 -5
  6. data/VERSION +1 -1
  7. data/bin/natives +1 -0
  8. data/catalogs/rubygems.yaml +50 -0
  9. data/lib/natives/apps/detect.rb +21 -0
  10. data/lib/natives/apps/list.rb +39 -0
  11. data/lib/natives/apps.rb +2 -0
  12. data/lib/natives/catalog/loader.rb +30 -0
  13. data/lib/natives/catalog/merger.rb +26 -0
  14. data/lib/natives/catalog/selector.rb +79 -0
  15. data/lib/natives/catalog/validator.rb +18 -0
  16. data/lib/natives/catalog.rb +56 -0
  17. data/lib/natives/cli.rb +27 -42
  18. data/lib/natives/gemfile_viewer.rb +19 -16
  19. data/lib/natives/host_detection/package_provider.rb +83 -0
  20. data/lib/natives/host_detection/platform.rb +34 -0
  21. data/lib/natives/host_detection.rb +25 -0
  22. data/lib/natives.rb +1 -0
  23. data/spec/fixtures/dir_with_matching_files/invalid1.yml +9 -0
  24. data/spec/fixtures/dir_with_matching_files/not_matching.json +0 -0
  25. data/spec/fixtures/dir_with_matching_files/valid1.yaml +21 -0
  26. data/spec/fixtures/dir_with_matching_files/valid2.yml +9 -0
  27. data/spec/fixtures/dir_without_matching_file/not_matching.json +0 -0
  28. data/spec/natives/apps/detect_spec.rb +26 -0
  29. data/spec/natives/apps/list_spec.rb +58 -0
  30. data/spec/natives/catalog/loader_spec.rb +101 -0
  31. data/spec/natives/catalog/merger_spec.rb +60 -0
  32. data/spec/natives/catalog/selector_spec.rb +124 -0
  33. data/spec/natives/catalog/validator_spec.rb +44 -0
  34. data/spec/natives/catalog_spec.rb +133 -0
  35. data/spec/natives/gemfile_viewer_spec.rb +3 -3
  36. data/spec/natives/host_detection/package_provider_spec.rb +33 -0
  37. data/spec/natives/host_detection/platform_spec.rb +21 -0
  38. data/spec/natives/host_detection_spec.rb +45 -0
  39. data/spec/spec_helper.rb +17 -2
  40. metadata +44 -66
  41. data/chef/.kitchen.yml +0 -27
  42. data/chef/Berksfile +0 -4
  43. data/chef/Berksfile.lock +0 -10
  44. data/chef/cookbooks/natives/Berksfile +0 -3
  45. data/chef/cookbooks/natives/Gemfile +0 -5
  46. data/chef/cookbooks/natives/LICENSE +0 -3
  47. data/chef/cookbooks/natives/README.md +0 -13
  48. data/chef/cookbooks/natives/chefignore +0 -96
  49. data/chef/cookbooks/natives/libraries/natives_recipe_helper.rb +0 -37
  50. data/chef/cookbooks/natives/metadata.rb +0 -9
  51. data/chef/cookbooks/natives/recipes/default.rb +0 -31
  52. data/chef/solo.rb +0 -17
  53. data/chef/vendored-cookbooks/apt/CHANGELOG.md +0 -144
  54. data/chef/vendored-cookbooks/apt/README.md +0 -247
  55. data/chef/vendored-cookbooks/apt/attributes/default.rb +0 -27
  56. data/chef/vendored-cookbooks/apt/files/default/apt-proxy-v2.conf +0 -50
  57. data/chef/vendored-cookbooks/apt/libraries/helpers.rb +0 -47
  58. data/chef/vendored-cookbooks/apt/libraries/network.rb +0 -33
  59. data/chef/vendored-cookbooks/apt/metadata.json +0 -54
  60. data/chef/vendored-cookbooks/apt/metadata.rb +0 -34
  61. data/chef/vendored-cookbooks/apt/providers/preference.rb +0 -61
  62. data/chef/vendored-cookbooks/apt/providers/repository.rb +0 -141
  63. data/chef/vendored-cookbooks/apt/recipes/cacher-client.rb +0 -81
  64. data/chef/vendored-cookbooks/apt/recipes/cacher-ng.rb +0 -43
  65. data/chef/vendored-cookbooks/apt/recipes/default.rb +0 -83
  66. data/chef/vendored-cookbooks/apt/resources/preference.rb +0 -30
  67. data/chef/vendored-cookbooks/apt/resources/repository.rb +0 -41
  68. data/chef/vendored-cookbooks/apt/templates/debian-6.0/acng.conf.erb +0 -173
  69. data/chef/vendored-cookbooks/apt/templates/default/01proxy.erb +0 -5
  70. data/chef/vendored-cookbooks/apt/templates/default/acng.conf.erb +0 -275
  71. data/chef/vendored-cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +0 -269
  72. data/chef/vendored-cookbooks/homebrew/CHANGELOG.md +0 -36
  73. data/chef/vendored-cookbooks/homebrew/README.md +0 -110
  74. data/chef/vendored-cookbooks/homebrew/attributes/default.rb +0 -22
  75. data/chef/vendored-cookbooks/homebrew/libraries/homebrew_mixin.rb +0 -53
  76. data/chef/vendored-cookbooks/homebrew/libraries/homebrew_package.rb +0 -104
  77. data/chef/vendored-cookbooks/homebrew/metadata.json +0 -32
  78. data/chef/vendored-cookbooks/homebrew/metadata.rb +0 -10
  79. data/chef/vendored-cookbooks/homebrew/providers/tap.rb +0 -48
  80. data/chef/vendored-cookbooks/homebrew/recipes/default.rb +0 -46
  81. data/chef/vendored-cookbooks/homebrew/resources/tap.rb +0 -35
  82. data/lib/natives/app.rb +0 -71
  83. data/natives.gemspec +0 -125
  84. data/spec/natives/app_spec.rb +0 -153
@@ -1,41 +0,0 @@
1
- #
2
- # Cookbook Name:: apt
3
- # Resource:: repository
4
- #
5
- # Copyright 2010-2013, Opscode, Inc.
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
-
20
- actions :add, :remove
21
-
22
- def initialize(*args)
23
- super
24
- @action = :add
25
- end
26
-
27
- #name of the repo, used for source.list filename
28
- attribute :repo_name, :kind_of => String, :name_attribute => true
29
- attribute :uri, :kind_of => String
30
- attribute :distribution, :kind_of => String
31
- attribute :components, :kind_of => Array, :default => []
32
- attribute :arch, :kind_of => String, :default => nil
33
- attribute :trusted, :kind_of => [ TrueClass, FalseClass ], :default => false
34
- #whether or not to add the repository as a source repo as well
35
- attribute :deb_src, :default => false
36
- attribute :keyserver, :kind_of => String, :default => nil
37
- attribute :key, :kind_of => String, :default => nil
38
- attribute :cookbook, :kind_of => String, :default => nil
39
- #trigger cache rebuild
40
- #If not you can trigger in the recipe itself after checking the status of resource.updated{_by_last_action}?
41
- attribute :cache_rebuild, :kind_of => [TrueClass, FalseClass], :default => true
@@ -1,173 +0,0 @@
1
- # Letter case in directive names does not matter. Must be separated with colons.
2
- # Valid boolean values are a zero number for false, non-zero numbers for true.
3
-
4
- CacheDir: <%= node['apt']['cacher_dir'] %>
5
-
6
- # set empty to disable logging
7
- LogDir: /var/log/apt-cacher-ng
8
-
9
- # TCP (http) port
10
- # Set to 9999 to emulate apt-proxy
11
- Port:<%= node['apt']['cacher_port'] %>
12
-
13
- # Addresses or hostnames to listen on. Multiple addresses must be separated by
14
- # spaces. Each entry must be associated with a local interface. DNS resolution
15
- # is performed using getaddrinfo(3) for all available protocols (i.e. IPv4 and
16
- # IPv6 if available).
17
- #
18
- # Default: not set, will listen on all interfaces.
19
- #
20
- # BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
21
-
22
- #Proxy: http://www-proxy.example.net:80
23
- #proxy: http://username:proxypassword@proxy.example.net:3128
24
-
25
- # Repository remapping. See manual for details.
26
- # In this example, backends file is generated during package installation.
27
- Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
28
- Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
29
- Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
30
- Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file
31
-
32
- # Virtual page accessible in a web browser to see statistics and status
33
- # information, i.e. under http://localhost:3142/acng-report.html
34
- ReportPage: acng-report.html
35
-
36
- # Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
37
- # used with inetd bridge or cron client.
38
- # SocketPath:/var/run/apt-cacher-ng/socket
39
-
40
- # Forces log file to be written to disk after every line when set to 1. Default
41
- # is 0, buffer flush happens after client disconnects.
42
- #
43
- # (technically, this is an alias to the Debug option provided for convenience)
44
- #
45
- # UnbufferLogs: 0
46
-
47
- # Set to 0 to store only type, time and transfer sizes.
48
- # 1 -> client IP and relative local path are logged too
49
- # VerboseLog: 1
50
-
51
- # Don't detach from the console
52
- # ForeGround: 0
53
-
54
- # Store the pid of the daemon process therein
55
- # PidFile: /var/run/apt-cacher-ng/pid
56
-
57
- # Forbid outgoing connections, work around them or respond with 503 error
58
- # offlinemode:0
59
-
60
- # Forbid all downloads that don't run through preconfigured backends (.where)
61
- #ForceManaged: 0
62
-
63
- # Days before considering an unreferenced file expired (to be deleted).
64
- # Warning: if the value is set too low and particular index files are not
65
- # available for some days (mirror downtime) there is a risk of deletion of
66
- # still usefull package files.
67
- ExTreshold: 4
68
-
69
- # Stop expiration when a critical problem appeared. Currently only failed
70
- # refresh of an index file is considered as critical.
71
- #
72
- # WARNING: don't touch this option or set to a non-zero number.
73
- # Anything else is DANGEROUS and may cause data loss.
74
- #
75
- # ExAbortOnProblems: 1
76
-
77
- # Replace some Windows/DOS-FS incompatible chars when storing
78
- # StupidFs: 0
79
-
80
- # Experimental feature for apt-listbugs: pass-through SOAP requests and
81
- # responses to/from bugs.debian.org. If not set, default is true if
82
- # ForceManaged is enabled and false otherwise.
83
- # ForwardBtsSoap: 1
84
-
85
- # The daemon has a small cache for DNS data, to speed up resolution. The
86
- # expiration time of the DNS entries can be configured in seconds.
87
- # DnsCacheSeconds: 3600
88
-
89
- # Don't touch the following values without good consideration!
90
- #
91
- # Max. count of connection threads kept ready (for faster response in the
92
- # future). Should be a sane value between 0 and average number of connections,
93
- # and depend on the amount of spare RAM.
94
- # MaxStandbyConThreads: 8
95
- #
96
- # Hard limit of active thread count for incomming connections, i.e. operation
97
- # is refused when this value is reached (below zero = unlimited).
98
- # MaxConThreads: -1
99
- #
100
- #VfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$
101
- #PfilePattern = .*(\.deb|\.rpm|\.dsc|\.tar\.gz\.gpg|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.jigdo|\.template|changelog|copyright|\.udeb|\.diff/.*\.gz|vmlinuz|initrd\.gz|(Devel)?ReleaseAnnouncement(\\?.*)?)$
102
- # Whitelist for expiration, file types not to be removed even when being
103
- # unreferenced. Default: same as VfilePattern which is a safe bed. When and
104
- # only when the only used mirrors are official repositories (with working
105
- # Release files) then it might be set to something more restrictive, like
106
- # (^|.*?/)(Release|Release\.gpg|release|meta-release|Translation[^/]*\.bz2)$
107
- #WfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$
108
-
109
- # Higher modes only working with the debug version
110
- # Warning, writes a lot into apt-cacher.err logfile
111
- # Value overwrites UnbufferLogs setting (aliased)
112
- # Debug:3
113
-
114
- # Usually, general purpose proxies like Squid expose the IP adress of the
115
- # client user to the remote server using the X-Forwarded-For HTTP header. This
116
- # behaviour can be optionally turned on with the Expose-Origin option.
117
- # ExposeOrigin: 0
118
-
119
- # When logging the originating IP address, trust the information supplied by
120
- # the client in the X-Forwarded-For header.
121
- # LogSubmittedOrigin: 0
122
-
123
- # The version string reported to the peer, to be displayed as HTTP client (and
124
- # version) in the logs of the mirror.
125
- # WARNING: some archives use this header to detect/guess capabilities of the
126
- # client (i.e. redirection support) and change the behaviour accordingly, while
127
- # ACNG might not support the expected features. Expect side effects.
128
- #
129
- # UserAgent: Yet Another HTTP Client/1.2.3p4
130
-
131
- # In some cases the Import and Expiration tasks might create fresh volatile
132
- # data for internal use by reconstructing them using patch files. This
133
- # by-product might be recompressed with bzip2 and with some luck the resulting
134
- # file becomes identical to the *.bz2 file on the server, usable for APT
135
- # clients trying to fetch the full .bz2 compressed version. Injection of the
136
- # generated files into the cache has however a disadvantage on underpowered
137
- # servers: bzip2 compession can create high load on the server system and the
138
- # visible download of the busy .bz2 files also becomes slower.
139
- #
140
- # RecompBz2: 0
141
-
142
- # Network timeout for outgoing connections.
143
- # NetworkTimeout: 60
144
-
145
- # Sometimes it makes sense to not store the data in cache and just return the
146
- # package data to client as it comes in. DontCache parameters can enable this
147
- # behaviour for certain URL types. The tokens are extended regular expressions
148
- # that URLs are matched against.
149
- #
150
- # DontCacheRequested is applied to the URL as it comes in from the client.
151
- # Example: exclude packages built with kernel-package for x86
152
- # DontCacheRequested: linux-.*_10\...\.Custo._i386
153
- # Example usecase: exclude popular private IP ranges from caching
154
- # DontCacheRequested: 192.168.0 ^10\..* 172.30
155
- #
156
- # DontCacheResolved is applied to URLs after mapping to the target server. If
157
- # multiple backend servers are specified then it's only matched against the
158
- # download link for the FIRST possible source (due to implementation limits).
159
- # Example usecase: all Ubuntu stuff comes from a local mirror (specified as
160
- # backend), don't cache it again:
161
- # DontCacheResolved: ubuntumirror.local.net
162
- #
163
- # DontCache directive sets (overrides) both, DontCacheResolved and
164
- # DontCacheRequested. Provided for convenience, see those directives for
165
- # details.
166
- #
167
- # Default permission set of freshly created files and directories, as octal
168
- # numbers (see chmod(1) for details).
169
- # Can by limited by the umask value (see umask(2) for details) if it's set in
170
- # the environment of the starting shell, e.g. in apt-cacher-ng init script or
171
- # in its configuration file.
172
- # DirPerms: 00755
173
- # FilePerms: 00664
@@ -1,5 +0,0 @@
1
- Acquire::http::Proxy "http://<%= @proxy %>:<%= @port %>";
2
- Acquire::https::Proxy "DIRECT";
3
- <% @bypass.each do |bypass, type| %>
4
- Acquire::<%= type %>::Proxy::<%= bypass %> "DIRECT";
5
- <% end %>
@@ -1,275 +0,0 @@
1
- # Letter case in directive names does not matter. Must be separated with colons.
2
- # Valid boolean values are a zero number for false, non-zero numbers for true.
3
-
4
- CacheDir: <%= node['apt']['cacher_dir'] %>
5
-
6
- # set empty to disable logging
7
- LogDir: /var/log/apt-cacher-ng
8
-
9
- # place to look for additional configuration and resource files if they are not
10
- # found in the configuration directory
11
- # SupportDir: /usr/lib/apt-cacher-ng
12
-
13
- # TCP (http) port
14
- # Set to 9999 to emulate apt-proxy
15
- Port:<%= node['apt']['cacher_port'] %>
16
-
17
- # Addresses or hostnames to listen on. Multiple addresses must be separated by
18
- # spaces. Each entry must be an exact local address which is associated with a
19
- # local interface. DNS resolution is performed using getaddrinfo(3) for all
20
- # available protocols (IPv4, IPv6, ...). Using a protocol specific format will
21
- # create binding(s) only on protocol specific socket(s) (e.g. 0.0.0.0 will listen
22
- # only to IPv4).
23
- #
24
- # Default: not set, will listen on all interfaces and protocols
25
- #
26
- # BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
27
-
28
- # The specification of another proxy which shall be used for downloads.
29
- # Username and password are, and see manual for limitations.
30
- #
31
- #Proxy: http://www-proxy.example.net:80
32
- #proxy: username:proxypassword@proxy.example.net:3128
33
-
34
- # Repository remapping. See manual for details.
35
- # In this example, some backends files might be generated during package
36
- # installation using information collected on the system.
37
- Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
38
- Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
39
- Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol # Debian Volatile Archives
40
- Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
41
- Remap-sfnet: file:sfnet_mirrors # ; file:backends_sfnet # incomplete, please create this file or specify preferred mirrors here
42
- Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux
43
- Remap-fedora: file:fedora_mirrors # Fedora Linux
44
- Remap-epel: file:epel_mirrors # Fedora EPEL
45
- Remap-slrep: file:sl_mirrors # Scientific Linux
46
-
47
- # This is usually not needed for security.debian.org because it's always the
48
- # same DNS hostname. However, it might be enabled in order to use hooks,
49
- # ForceManaged mode or special flags in this context.
50
- # Remap-secdeb: security.debian.org
51
-
52
- # Virtual page accessible in a web browser to see statistics and status
53
- # information, i.e. under http://localhost:3142/acng-report.html
54
- ReportPage: acng-report.html
55
-
56
- # Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
57
- # used with inetd bridge or cron client.
58
- # SocketPath:/var/run/apt-cacher-ng/socket
59
-
60
- # Forces log file to be written to disk after every line when set to 1. Default
61
- # is 0, buffers are flushed when the client disconnects.
62
- #
63
- # (technically, alias to the Debug option, see its documentation for details)
64
- #
65
- # UnbufferLogs: 0
66
-
67
- # Set to 0 to store only type, time and transfer sizes.
68
- # 1 -> client IP and relative local path are logged too
69
- # VerboseLog: 1
70
-
71
- # Don't detach from the console
72
- # ForeGround: 0
73
-
74
- # Store the pid of the daemon process therein
75
- # PidFile: /var/run/apt-cacher-ng/pid
76
-
77
- # Forbid outgoing connections, work around them or respond with 503 error
78
- # offlinemode:0
79
-
80
- # Forbid all downloads that don't run through preconfigured backends (.where)
81
- #ForceManaged: 0
82
-
83
- # Days before considering an unreferenced file expired (to be deleted).
84
- # Warning: if the value is set too low and particular index files are not
85
- # available for some days (mirror downtime) there is a risk of deletion of
86
- # still useful package files.
87
- ExTreshold: 4
88
-
89
- # Stop expiration when a critical problem appeared. Currently only failed
90
- # refresh of an index file is considered as critical.
91
- #
92
- # WARNING: don't touch this option or set to zero.
93
- # Anything else is DANGEROUS and may cause data loss.
94
- #
95
- # ExAbortOnProblems: 1
96
-
97
- # Replace some Windows/DOS-FS incompatible chars when storing
98
- # StupidFs: 0
99
-
100
- # Experimental feature for apt-listbugs: pass-through SOAP requests and
101
- # responses to/from bugs.debian.org. If not set, default is true if
102
- # ForceManaged is enabled and false otherwise.
103
- # ForwardBtsSoap: 1
104
-
105
- # The daemon has a small cache for DNS data, to speed up resolution. The
106
- # expiration time of the DNS entries can be configured in seconds.
107
- # DnsCacheSeconds: 3600
108
-
109
- # Don't touch the following values without good consideration!
110
- #
111
- # Max. count of connection threads kept ready (for faster response in the
112
- # future). Should be a sane value between 0 and average number of connections,
113
- # and depend on the amount of spare RAM.
114
- # MaxStandbyConThreads: 8
115
- #
116
- # Hard limit of active thread count for incoming connections, i.e. operation
117
- # is refused when this value is reached (below zero = unlimited).
118
- # MaxConThreads: -1
119
- #
120
- # Pigeonholing files with regular expressions (static/volatile). Can be
121
- # overriden here but not should not be done permanently because future update
122
- # of default settings would not be applied later.
123
- # VfilePattern = (^|.*?/)(Index|Packages(\.gz|\.bz2|\.lzma|\.xz)?|InRelease|Release|Release\.gpg|Sources(\.gz|\.bz2|\.lzma|\.xz)?|release|index\.db-.*\.gz|Contents-[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|((setup|setup-legacy)(\.ini|\.bz2|\.hint)(\.sig)?)|mirrors\.lst|repo(index|md)\.xml(\.asc|\.key)?|directory\.yast|products|content(\.asc|\.key)?|media|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz|info\.txt|license\.tar\.gz|license\.zip|.*\.db(\.tar\.gz)?|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|metalink\?repo|.*prestodelta\.xml\.gz)$|/dists/.*/installer-[^/]+/[^0-9][^/]+/images/.*
124
- # PfilePattern = .*(\.d?deb|\.rpm|\.dsc|\.tar(\.gz|\.bz2|\.lzma|\.xz)(\.gpg)?|\.diff(\.gz|\.bz2|\.lzma|\.xz)|\.jigdo|\.template|changelog|copyright|\.udeb|\.debdelta|\.diff/.*\.gz|(Devel)?ReleaseAnnouncement(\?.*)?|[a-f0-9]+-(susedata|updateinfo|primary|deltainfo).xml.gz|fonts/(final/)?[a-z]+32.exe(\?download.*)?|/dists/.*/installer-[^/]+/[0-9][^/]+/images/.*)$
125
- # Whitelist for expiration, file types not to be removed even when being
126
- # unreferenced. Default: many parts from VfilePattern where no parent index
127
- # exists or might be unknown.
128
- # WfilePattern = (^|.*?/)(Release|InRelease|Release\.gpg|(Packages|Sources)(\.gz|\.bz2|\.lzma|\.xz)?|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|.*\.xml|.*\.db\.tar\.gz|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|[a-z]+32.exe)$|/dists/.*/installer-.*/images/.*
129
-
130
- # Higher modes only working with the debug version
131
- # Warning, writes a lot into apt-cacher.err logfile
132
- # Value overwrites UnbufferLogs setting (aliased)
133
- # Debug:3
134
-
135
- # Usually, general purpose proxies like Squid expose the IP address of the
136
- # client user to the remote server using the X-Forwarded-For HTTP header. This
137
- # behaviour can be optionally turned on with the Expose-Origin option.
138
- # ExposeOrigin: 0
139
-
140
- # When logging the originating IP address, trust the information supplied by
141
- # the client in the X-Forwarded-For header.
142
- # LogSubmittedOrigin: 0
143
-
144
- # The version string reported to the peer, to be displayed as HTTP client (and
145
- # version) in the logs of the mirror.
146
- # WARNING: some archives use this header to detect/guess capabilities of the
147
- # client (i.e. redirection support) and change the behaviour accordingly, while
148
- # ACNG might not support the expected features. Expect side effects.
149
- #
150
- # UserAgent: Yet Another HTTP Client/1.2.3p4
151
-
152
- # In some cases the Import and Expiration tasks might create fresh volatile
153
- # data for internal use by reconstructing them using patch files. This
154
- # by-product might be recompressed with bzip2 and with some luck the resulting
155
- # file becomes identical to the *.bz2 file on the server, usable for APT
156
- # clients trying to fetch the full .bz2 compressed version. Injection of the
157
- # generated files into the cache has however a disadvantage on underpowered
158
- # servers: bzip2 compression can create high load on the server system and the
159
- # visible download of the busy .bz2 files also becomes slower.
160
- #
161
- # RecompBz2: 0
162
-
163
- # Network timeout for outgoing connections.
164
- # NetworkTimeout: 60
165
-
166
- # Sometimes it makes sense to not store the data in cache and just return the
167
- # package data to client as it comes in. DontCache parameters can enable this
168
- # behaviour for certain URL types. The tokens are extended regular expressions
169
- # that URLs are matched against.
170
- #
171
- # DontCacheRequested is applied to the URL as it comes in from the client.
172
- # Example: exclude packages built with kernel-package for x86
173
- # DontCacheRequested: linux-.*_10\...\.Custo._i386
174
- # Example usecase: exclude popular private IP ranges from caching
175
- # DontCacheRequested: 192.168.0 ^10\..* 172.30
176
- #
177
- # DontCacheResolved is applied to URLs after mapping to the target server. If
178
- # multiple backend servers are specified then it's only matched against the
179
- # download link for the FIRST possible source (due to implementation limits).
180
- # Example usecase: all Ubuntu stuff comes from a local mirror (specified as
181
- # backend), don't cache it again:
182
- # DontCacheResolved: ubuntumirror.local.net
183
- #
184
- # DontCache directive sets (overrides) both, DontCacheResolved and
185
- # DontCacheRequested. Provided for convenience, see those directives for
186
- # details.
187
- #
188
- # Default permission set of freshly created files and directories, as octal
189
- # numbers (see chmod(1) for details).
190
- # Can by limited by the umask value (see umask(2) for details) if it's set in
191
- # the environment of the starting shell, e.g. in apt-cacher-ng init script or
192
- # in its configuration file.
193
- # DirPerms: 00755
194
- # FilePerms: 00664
195
- #
196
- #
197
- # It's possible to use use apt-cacher-ng as a regular web server with limited
198
- # feature set, i.e.
199
- # including directory browsing and download of any file;
200
- # excluding sorting, mime types/encodings, CGI execution, index page
201
- # redirection and other funny things.
202
- # To get this behavior, mappings between virtual directories and real
203
- # directories on the server must be defined with the LocalDirs directive.
204
- # Virtual and real dirs are separated by spaces, multiple pairs are separated
205
- # by semi-colons. Real directories must be absolute paths.
206
- # NOTE: Since the names of that key directories share the same namespace as
207
- # repository names (see Remap-...) it's administrators job to avoid such
208
- # collisions on them (unless created deliberately).
209
- #
210
- # LocalDirs: woo /data/debarchive/woody ; hamm /data/debarchive/hamm
211
-
212
- # Precache a set of files referenced by specified index files. This can be used
213
- # to create a partial mirror usable for offline work. There are certain limits
214
- # and restrictions on the path specification, see manual for details. A list of
215
- # (maybe) relevant index files could be retrieved via
216
- # "apt-get --print-uris update" on a client machine.
217
- #
218
- # PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages*
219
-
220
- # Arbitrary set of data to append to request headers sent over the wire. Should
221
- # be a well formated HTTP headers part including newlines (DOS style) which
222
- # can be entered as escape sequences (\r\n).
223
- # RequestAppendix: X-Tracking-Choice: do-not-track\r\n
224
-
225
- # Specifies the IP protocol families to use for remote connections. Order does
226
- # matter, first specified are considered first. Possible combinations:
227
- # v6 v4
228
- # v4 v6
229
- # v6
230
- # v4
231
- # (empty or not set: use system default)
232
- #
233
- # ConnectProto: v6 v4
234
-
235
- # Regular expiration algorithm finds package files which are no longer listed
236
- # in any index file and removes them of them after a safety period.
237
- # This option allows to keep more versions of a package in the cache after
238
- # safety period is over.
239
- # KeepExtraVersions: 1
240
-
241
- # Optionally uses TCP access control provided by libwrap, see hosts_access(5)
242
- # for details. Daemon name is apt-cacher-ng. Default if not set: decided on
243
- # startup by looking for explicit mentioning of apt-cacher-ng in
244
- # /etc/hosts.allow or /etc/hosts.deny files.
245
- # UseWrap: 0
246
-
247
- # If many machines from the same local network attempt to update index files
248
- # (apt-get update) at nearly the same time, the known state of these index file
249
- # is temporarily frozen and multiple requests receive the cached response
250
- # without contacting the server. This parameter (in seconds) specifies the
251
- # length of this period before the files are considered outdated.
252
- # Setting it too low transfers more data and increases remote server load,
253
- # setting it too high (more than a couple of minutes) increases the risk of
254
- # delivering inconsistent responses to the clients.
255
- # FreshIndexMaxAge: 27
256
-
257
- # Usually the users are not allowed to specify custom TCP ports of remote
258
- # mirrors in the requests, only the default HTTP port can be used (instead,
259
- # proxy administrator can create Remap- rules with custom ports). This
260
- # restriction can be disabled by specifying a list of allowed ports or 0 for
261
- # any port.
262
- #
263
- # AllowUserPorts: 80
264
-
265
- # Normally the HTTP redirection responses are forwarded to the original caller
266
- # (i.e. APT) which starts a new download attempt from the new URL. This
267
- # solution is ok for client configurations with proxy mode but doesn't work
268
- # well with configurations using URL prefixes. To work around this the server
269
- # can restart its own download with another URL. However, this might be used to
270
- # circumvent download source policies by malicious users.
271
- # The RedirMax option specifies how many such redirects the server should
272
- # follow per request, 0 disables the internal redirection. If not set,
273
- # default value is 0 if ForceManaged is used and 5 otherwise.
274
- #
275
- # RedirMax: 5