Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2019-08-23 17:26:36
Size: 618
Editor: nodiscc
Comment: draft refactoring of https://wiki.debian.org/AptConf and other apt configuration pages
Revision 6 as of 2019-08-23 17:33:09
Size: 1499
Editor: nodiscc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
=== apt.conf.d === apt.conf.d ===
Line 18: Line 18:
 * {{{Dpkg::Pre-Install-Pkgs {"mycommand";};: executes {{{mycommand}}} before package installation/unpacking by Dpkg.  * {{{Dpkg::Pre-Install-Pkgs {"mycommand";};}}}: executes {{{mycommand}}} before package installation/unpacking by Dpkg.
 * {{{Dpkg::Pre-Invoke {"mycommand";};}}}: executes {{{mycommand}}} before apt calls dpkg
 * {{{Dpkg::Post-Invoke {"mycommand";};}}}: executes {{{mycommand}}} after apt calls dpkg
 * {{{Pre-Install-Pkgs}}}: ??? '''TODO''' /* package filename in /var/cache/apt/archives/ is passed as stdin */
 * {{{APT::Default-Release "testing";}}}: sets the default Debian release used by Apt ('''TODO''' use case?)
 * {{{APT::Cache-Limit 10000000;}}}: '''??? TODO'''
}}}: ??? '''TODO'''
 * {{{Acquire::http::Proxy "http://proxy:8080";}}}: sets the proxy for HTTP downloads
 * {{{Acquire::https::Proxy "https://proxy:8443";}}}: sets the proxy for HTTPS downloads


If you really have to use FTP, this sets the FTP proxy:

{{{
 Acquire::ftp
 {
   Proxy "ftp://proxy:2121/";
   ProxyLogin
   {
      "USER $(SITE_USER)@$(SITE)";
      "PASS $(SITE_PASS)";
   }
 }
}}}

WIP: refactoring of https://wiki.debian.org/AptConf and other apt configuration pages


Apt is configured by several resources, including:

apt.conf.d

Apt accepts configuratino files (without extension) in /etc/apt/apt.conf.d/. These are processed by Apt in numeric/alphabetical order. /etc/apt/apt.conf is also valid but deprecated.

These files can contain various directives:

  • Dpkg::Pre-Install-Pkgs {"mycommand";};: executes mycommand before package installation/unpacking by Dpkg.

  • Dpkg::Pre-Invoke {"mycommand";};: executes mycommand before apt calls dpkg

  • Dpkg::Post-Invoke {"mycommand";};: executes mycommand after apt calls dpkg

  • Pre-Install-Pkgs: ??? TODO

  • APT::Default-Release "testing";: sets the default Debian release used by Apt (TODO use case?)

  • APT::Cache-Limit 10000000;: ??? TODO

}}}: ??? TODO

  • Acquire::http::Proxy "http://proxy:8080";: sets the proxy for HTTP downloads

  • Acquire::https::Proxy "https://proxy:8443";: sets the proxy for HTTPS downloads

If you really have to use FTP, this sets the FTP proxy:

 Acquire::ftp
 {
   Proxy "ftp://proxy:2121/";
   ProxyLogin
   {
      "USER $(SITE_USER)@$(SITE)";
      "PASS $(SITE_PASS)";
   }
 }