Saltstack Official Apt-Cacher Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

apt-cacher.conf 12KB

11 lat temu
11 lat temu
11 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. # vim:sts=2 ts=2 sw=2 et ai
  2. {% from "apt-cacher/map.jinja" import apt_cacher with context %}
  3. # This file is managed by Salt, do not edit by hand!!
  4. #################################################################################
  5. # This is the config file for apt-cacher. On most Debian systems you can safely #
  6. # leave the defaults alone. #
  7. # #
  8. # Commented defaults or examples are given. They can be changed here, or #
  9. # overridden using a fragment placed in ./conf.d/ #
  10. #################################################################################
  11. ### GENERAL ###
  12. # The location of the local cache/working directory. This can become quite
  13. # large, so make sure it is somewhere with plenty of space.
  14. #
  15. #cache_dir = /var/cache/apt-cacher
  16. # The directory to use for apt-cacher access and error logs.
  17. # The access log records every request in the format:
  18. #
  19. # date-time|PID|client IP address|HIT/HEAD/MISS/EXPIRED/NOTMOD|object size|object name
  20. #
  21. # The error log is slightly more free-form, and is also used for debug messages
  22. # if debug mode is turned on.
  23. #
  24. #log_dir = /var/log/apt-cacher
  25. # The email address of the administrator is displayed in the info page and
  26. # traffic reports.
  27. #
  28. admin_email = {{ apt_cacher.get('admin_email', 'root@localhost') }}
  29. # Daemon port setting, only useful in stand-alone mode. You need to run the
  30. # daemon as root to use privileged ports (<1024).
  31. #
  32. # For standalone daemon auto startup settings please edit the file
  33. # /etc/default/apt-cacher.
  34. #
  35. #daemon_port = 3142
  36. # Optional settings, user and group to run the daemon as. Make sure they have
  37. # sufficient permissions within the cache and log directories. Comment the
  38. # settings to run apt-cacher as the invoking user.
  39. #
  40. group = {{ apt_cacher.get('group', 'www-data') }}
  41. user = {{ apt_cacher.get('user', 'www-data') }}
  42. # optional setting, binds the listening daemon to specified IP(s).
  43. #
  44. #daemon_addr = localhost
  45. # Apt-cacher can be used in offline mode which just uses files already cached,
  46. # but doesn't make any new outgoing connections by setting this to 1.
  47. #
  48. #offline_mode = 1
  49. # To enable data checksumming, install libberkeleydb-perl and set this option to
  50. # 1. Then wait until the Packages/Sources files have been refreshed once (and so
  51. # the database has been built up). You can also delete them from the cache to
  52. # trigger the database update.
  53. #
  54. #checksum = 1
  55. # Importing checksums from new index files into the checksum database can cause
  56. # high CPU usage on slower systems. This option sets a limit to the number of
  57. # index files that are imported simultaneously, thereby limiting CPU load
  58. # average, but, possibly, taking longer. Set to 0 for no limit.
  59. #
  60. #concurrent_import_limit = 1
  61. # CGI mode is deprecated.
  62. #
  63. # Send a 410 (Gone) HTTP message with the specified text when accessed via
  64. # CGI. Useful to tell users to adapt their sources.list files when the
  65. # apt-cacher server is being relocated (via apt-get's error messages while
  66. # running "update")
  67. #
  68. #cgi_advise_to_use = Please use http://cacheserver:3142/ as apt-cacher access URL
  69. #cgi_advise_to_use = Server relocated. To change sources.list, run
  70. # perl -pe "s,/apt-cacher??,:3142," -i /etc/apt/sources.list
  71. #
  72. # To further facilitate migration from CGI to daemon mode this setting will
  73. # automatically redirect incoming CGI requests to the specified daemon URL.
  74. #
  75. #cgi_redirect = http://localhost:3142/
  76. ### UPSTREAM PROXY ###
  77. # Apt-cacher can pass all its requests to an external HTTP proxy like Squid,
  78. # which could be very useful if you are using an ISP that blocks port 80 and
  79. # requires all web traffic to go through its proxy. The format is
  80. # 'hostname:port', eg: 'proxy.example.com:8080'.
  81. #
  82. #http_proxy = proxy.example.com:8080
  83. # External http proxy sometimes need authentication to get full access. The
  84. # format is 'username:password'.
  85. #
  86. #http_proxy_auth = proxyuser:proxypass
  87. # Use of the configured external proxy can be turned on or off with this flag.
  88. # Value should be either 0 (off) or 1 (on).
  89. #
  90. #use_proxy = 0
  91. # Use of external proxy authentication can be turned on or off with this flag.
  92. # Value should be either 0 (off) or 1 (on).
  93. #
  94. #use_proxy_auth = 0
  95. # This sets the interface to use for the upstream connection.
  96. # Specify an interface name, an IP address or a host name.
  97. # If unset, the default route is used.
  98. #
  99. {%- if apt_cacher.get('interface', 'False') != 'False' %}
  100. interface = {{ apt_cacher.get('interface', 'False') }}
  101. {%- endif %}
  102. #interface = eth0
  103. # Rate limiting sets the maximum bandwidth in bytes per second to use for
  104. # fetching packages. Use 0 value for no rate limiting.
  105. #
  106. #limit = 0
  107. ### ACCESS and SECURITY ###
  108. # Server mapping - this allows mapping virtual paths that appear in the access
  109. # URL to real server names. The syntax is the part of the beginning of the URL
  110. # to replace (the key), followed by a list of mirror URLs, all space
  111. # separated. Multiple mappings are separated by semicolons or commas, as
  112. # usual. Note that you need to specify all keys (or use the 'PATH_MAP'
  113. # shorthand) in the allowed_locations option, if you make use of it. Also note
  114. # that the paths should not overlap each other.
  115. #
  116. # The keys are also used to separate the caching of multiple distributions
  117. # within a single apt-cacher instance if distinct_namespaces is also set.
  118. #
  119. #path_map = debian ftp.uni-kl.de/pub/linux/debian ftp2.de.debian.org/debian ;
  120. # ubuntu archive.ubuntu.com/ubuntu ;
  121. # security security.debian.org/debian-security ftp2.de.debian.org/debian-security
  122. #
  123. # There are 2 default internal path_map settings for the Debian and Ubuntu
  124. # changelog servers which will be merged with this option.
  125. #
  126. # debian-changelogs packages.debian.org
  127. # ubuntu-changelogs changelogs.ubuntu.com
  128. #
  129. # These can be overridden by specifying an alternative mirror for that key, or
  130. # deleted by just specifying the key with no mirror.
  131. #
  132. #path_map = debian-changelogs
  133. # From version 1.7.0 there is support for caching multiple distibutions (eg
  134. # Debian and Ubuntu) within the same apt-cacher instance. Enable this by setting
  135. # distinct_namespaces to 1. Distribution package files are cached in separate
  136. # directories whose names are derived from the relevant path_map key. So
  137. # generally there will be a path_map key => server(s) setting for each
  138. # distribution that is cached. Having enabled distinct_namespaces, existing
  139. # packages can be imported into the correct directory by running (as root)
  140. #
  141. # /usr/share/apt-cacher/apt-cacher-import.pl -u {cache_dir}/packages
  142. #
  143. #distinct_namespaces = 0
  144. # If the apt-cacher machine is directly exposed to the Internet and you are
  145. # worried about unauthorised machines fetching packages through it, you can
  146. # specify a list of IP addresses which are allowed to use it and another list of
  147. # IP addresses which are prohibited.
  148. #
  149. # Localhost (127.0.0.1, ::1 and ::7f00:1) are always allowed. Other addresses
  150. # must be matched by allowed_hosts and not by denied_hosts to be permitted to
  151. # use the cache. Setting allowed_hosts to "*" means "allow all" (which was the
  152. # default before version 1.7.0). The default is now ''.
  153. #
  154. # The format is a comma-separated list containing addresses, optionally with
  155. # masks (like 10.0.0.0/24 or 10.0.0.0/255.255.255.0), or ranges of addresses
  156. # (two addresses separated by a hyphen with no masks, specifying a valid subnet,
  157. # like '192.168.0.0-63' or '192.168.0.0 - 192.168.0.63') or a DNS resolvable
  158. # hostname. The corresponding IPv6 options allowed_hosts_6 and denied_hosts_6
  159. # are deprecated (but will still be honoured, if set). IPv6 addresses can now be
  160. # added directly to allowed_hosts and denied_hosts along with IPv4 addresses.
  161. allowed_hosts = {{ apt_cacher.get('allowed_hosts', '*') }}
  162. denied_hosts = {{ apt_cacher.get('denied_hosts', '') }}
  163. # Only allow HTTPS/SSL proxy CONNECT to hosts or IPs which match an item in this
  164. # list.
  165. #
  166. #allowed_ssl_locations =
  167. # Only allow HTTPS/SSL proxy CONNECT to ports which match an item in this list.
  168. # Adding further items to this option can pose a significant security risk. DO
  169. # NOT do it unless you understand the full implications.
  170. #
  171. #allowed_ssl_ports = 443
  172. # Optional setting to limit access to upstream mirrors based on server names in
  173. # the URLs. This is matched before any path_map settings are expanded. If
  174. # 'PATH_MAP' in included in this option, it will be expanded to the keys of the
  175. # path_map setting. Note these items are strings, not regexps.
  176. #
  177. #allowed_locations = ftp.uni-kl.de, ftp.nerim.net, debian.tu-bs.de/debian
  178. #allowed_locations = ftp.debian.org, PATH_MAP
  179. #allowed_locations = PATH_MAP
  180. # List of Ubuntu release names used to expand UBUNTU_RELEASE_NAMES in
  181. # installer_files_regexp (see below). This is required to allow the Ubuntu
  182. # installer to fetch upgrade information. As the naming scheme is unpredictable,
  183. # new release names need to be added to this list.
  184. #
  185. #ubuntu_release_names = dapper, edgy, feisty, gutsy, hardy, intrepid, jaunty, karmic, lucid, maverick, natty, oneiric, precise
  186. ### HOUSEKEEPING ###
  187. # Apt-cacher can generate usage reports every 24 hours if you set this directive
  188. # to 1. You can view the reports in a web browser by pointing to your cache
  189. # machine with 'report' on the end, like this:
  190. #
  191. # http://yourcache.example.com:3142/report
  192. #
  193. # Generating reports is very fast even with many thousands of logfile lines, so
  194. # you can safely turn this on without creating much additional system load.
  195. #
  196. #generate_reports = 1
  197. # Apt-cacher can clean up its cache directory every 24 hours if you set this
  198. # directive to 1. Cleaning the cache can take some time to run (generally in the
  199. # order of a few minutes) and removes all package files that are not mentioned
  200. # in any existing 'Packages' lists. This has the effect of deleting packages
  201. # that have been superseded by an updated 'Packages' list.
  202. #
  203. #clean_cache = 1
  204. ### INTERNALS ###
  205. # Debug mode makes apt-cacher write a lot of extra debug information to the
  206. # error log (whose location is defined with the 'log_dir' directive). Leave
  207. # this off unless you need it, or your error log will get very big. Acceptable
  208. # values are 0 or an integer up to 7. See man apt-cacher (1) for further
  209. # details.
  210. #
  211. #debug = 0
  212. # You shouldn't need to change anything below here. If you do, ensure you
  213. # understand the full implications of doing so.
  214. # Permitted package files -- this is a perl regular expression which matches all
  215. # package-type files (files that are uniquely identified by their filename).
  216. #
  217. #package_files_regexp = (?:^[-+.a-z0-9]+_(?:\d:)?[-+.~a-zA-Z0-9]+(?:_[-a-z0-9]+\.(?:u|d)?deb|\.dsc|\.tar(?:\.gz|\.bz2|\.xz)|\.diff\.gz)|\.rpm|index\.db-.+\.gz|\.jigdo|\.template)$
  218. # Permitted APT pdiff files -- this is a perl regular expression which matches
  219. # APT pdiff files which are ed(1) scripts used to patch index files rather than
  220. # redownloading the whole file afresh.
  221. #
  222. #pdiff_files_regexp = ^2\d{3}-\d{2}-\d{2}-\d{4}\.\d{2}\.gz$
  223. # Permitted Index files -- this is the perl regular expression which matches all
  224. # index-type files (files that are uniquely identified by their full path and
  225. # need to be checked for freshness).
  226. #
  227. #index_files_regexp = ^(?:Index(?:\.bz2)?|Packages(?:\.gz|\.bz2)?|Release(?:\.gpg)?|InRelease|Sources(?:\.gz|\.bz2)?|Contents-(?:[a-z]+-)?[a-zA-Z0-9]+\.gz|(?:srclist|pkglist)\.[a-z-]+\.bz2|release(?:\.gz|\.bz2)?|Translation-[a-z]{2,3}(?:_[A-Z]{2})?(?:\.gz|\.bz2|\.xz)?)$
  228. # Permitted installer files -- this is the perl regular expression which matches
  229. # all installer-type files (files that are uniquely identified by their full
  230. # path but don’t need to be checked for freshness). These are typically files
  231. # used by Debian/Ubuntu Installer, Debian Live and apt. Within this option, the
  232. # shorthand 'UBUNTU_RELEASE_NAMES' will be expanded to the list configured in
  233. # ubuntu_release_names as regexp alternatives.
  234. #
  235. installer_files_regexp = ^(?:vmlinuz|linux|initrd\.gz|changelog|NEWS.Debian|[a-z]+\.tar\.gz(?:\.gpg)?|UBUNTU_RELEASE_NAMES\.tar\.gz(?:\.gpg)?|(?:Devel|EOL)?ReleaseAnnouncement(?:\.html)?|meta-release(?:-lts)?(?:-(?:development|proposed))?)$
  236. # Perl regular expression which matches Index files from which to read checksums
  237. # if checksum is enabled.
  238. #
  239. #checksum_files_regexp = ^(?:Packages(?:\.gz|\.bz2)?|Sources(?:\.gz|\.bz2)?|(?:In)?Release|Index(?:\.bz2)?)$
  240. # Perl regular expression which matches URLs to be permitted for Debian bugs
  241. # SOAP requests as made by apt-listbugs(1).
  242. #
  243. #soap_url_regexp = ^(?:http://)?bugs\.debian\.org(?::80)?/cgi-bin/soap.cgi$