Ubuntu apt: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
m (Lollypop verschob Seite Ubuntu apt with proxy nach Ubuntu apt: More general)
No edit summary
Line 1: Line 1:
[[Kategorie:Ubuntu|apt]]
[[Kategorie:Ubuntu|apt]]
== Get all non LTS packages ==
<source lang=awk>
# dpkg --list | awk '/^ii/ {print $2}' | xargs apt-cache show | awk '
BEGIN{
  support="none";
}
/^Package:/,/^$/{
  if(/^Package:/){ pkg=$2; }
  if(/^Supported:/){ support=$2; }
  if(/^$/ && support != "5y"){ printf "%s:\t%s\n", pkg, support; }
}
/^$/ {
  support="none";
}'
</source>
== Configuring a proxy for apt ==
== Configuring a proxy for apt ==
Put this into your /etc/apt/apt.conf.d/00proxy :
Put this into your /etc/apt/apt.conf.d/00proxy :

Revision as of 16:44, 23 March 2017

apt

Get all non LTS packages

# dpkg --list | awk '/^ii/ {print $2}' | xargs apt-cache show | awk '
BEGIN{
  support="none";
}
/^Package:/,/^$/{
  if(/^Package:/){ pkg=$2; }
  if(/^Supported:/){ support=$2; }
  if(/^$/ && support != "5y"){ printf "%s:\t%s\n", pkg, support; }
}
/^$/ {
  support="none";
}'

Configuring a proxy for apt

Put this into your /etc/apt/apt.conf.d/00proxy :

// Options for the downloading routines
Acquire
{
  Queue-Mode "host";       // host|access
  Retries "0";
  Source-Symlinks "true";

  // HTTP method configuration
  http
  {
    //Proxy::http.us.debian.org "DIRECT";  // Specific per-host setting
    Proxy "http://<user>:<password>@<proxy-host>:<proxy-port>";
    Timeout "120";
    Pipeline-Depth "5";

    // Cache Control. Note these do not work with Squid 2.0.2
    No-Cache "false";
    Max-Age "86400";     // 1 Day age on index files
    No-Store "false";    // Prevent the cache from storing archives
  };

  ftp
  {
    Proxy "http://<user>:<password>@<proxy-host>:<proxy-port>";
    //Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting

    Timeout "120";

    /* Passive mode control, proxy, non-proxy and per-host. Pasv mode
       is prefered if possible */
    Passive "true";
    Proxy::Passive "true";
    Passive::http.us.debian.org "true"; // Specific per-host setting
  };

  cdrom
  {
    mount "/cdrom";

    // You need the trailing slash!
    "/cdrom"
    {
       Mount "sleep 1000";
       UMount "sleep 500";
    }
  };
};