Posts Tagged by Apt

apt-cache policy

It’s years since I’ve dealt with apt-pinning, so all my knowledge on it has paged-out. But I want to use it again because I’ve backgraded to Ubuntu Gutsy to get my Palm Treo syncing, but I want a few new packages from Hardy or Intrepid. (It seems that Palm syncing using the visor module and JPilot still isn’t working, due to an unfixed regression in the kernel. Or maybe I just didn’t look hard enough. Bah – I dislike Hardy and Intrepid anyway).

Anyway, on my (ongoing) apt-pinning travels, I came across a good post on Simple Pinning, and somewhere else read about a neat command I never knew about – apt-cache policy – it shows what apt thinks the current pinning levels are:

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://au.archive.ubuntu.com gutsy-backports/universe Packages
     release v=7.10,o=Ubuntu,a=gutsy-backports,l=Ubuntu,c=universe
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy-backports/multiverse Packages
     release v=7.10,o=Ubuntu,a=gutsy-backports,l=Ubuntu,c=multiverse
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy-backports/main Packages
     release v=7.10,o=Ubuntu,a=gutsy-backports,l=Ubuntu,c=main
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy-backports/restricted Packages
     release v=7.10,o=Ubuntu,a=gutsy-backports,l=Ubuntu,c=restricted
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy-updates/universe Packages
     release v=7.10,o=Ubuntu,a=gutsy-updates,l=Ubuntu,c=universe
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy-updates/restricted Packages
     release v=7.10,o=Ubuntu,a=gutsy-updates,l=Ubuntu,c=restricted
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy-updates/main Packages
     release v=7.10,o=Ubuntu,a=gutsy-updates,l=Ubuntu,c=main
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy/universe Packages
     release v=7.10,o=Ubuntu,a=gutsy,l=Ubuntu,c=universe
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy/restricted Packages
     release v=7.10,o=Ubuntu,a=gutsy,l=Ubuntu,c=restricted
     origin au.archive.ubuntu.com
 500 http://au.archive.ubuntu.com gutsy/main Packages
     release v=7.10,o=Ubuntu,a=gutsy,l=Ubuntu,c=main
     origin au.archive.ubuntu.com
Pinned packages:
     vinagre -> (not found)

Nice! Now, armed with this command I’ll start tinkering with /etc/apt/preferences to get Hardy and Intrepid in with proper preferences. TODO: RTFM man apt_preferences :-)

dpkg-reconfigure debconf

Note to brain (because I keep forgetting it and having to look it up) – to reconfigure level and style of questions asked by dpkg (and hence apt):

dpkg-reconfigure debconf

Ssh SOCKS proxying, DNS proxying, Tunnelling

Mary Gardiner answered one of Voytek Eymont’s questions on the SLUG list by referring to the ssh socks proxying post on Ubuntu Blog. I was already familiar with ssh socks proxying, but that page has a good set of comments and links. A summary of that post, plus some other notes:

  • setup via $ssh -D 9999 username@ip-address-of-ssh-server, configure web browser socks 5 host (not http proxy) to localhost:9999 (On Firefox: Preferences, Advanced, Network, Settings, Manual, SOCKS Host. FoxyProxy really helps with this – you can setup wildcards to send certain URLs via certain proxies eg for when connecting via a VPN to work)
  • http proxying can be setup at the command line (for use by wget, apt, etc) with the http_proxy environment variable. For example export http_proxy=’http://user:password@1.2.3.4:3128/’; cmd1; cmd2; export http_proxy=”
  • configure apt to use a proxy via /etc/apt/apt.conf by using Acquire::http::Proxy “http://username:password@proxyserver:port/”; See Using apt-get behind a proxy.
  • there’s also corkscrew (preferred), connect.c, and proxychains to secure other traffic or setup tunnels automagically in ~/.ssh/config. For example:
% sudo aptitude install corkscrew

% cat ~/.ssh/config
Host foo.bar.com
    User me
    Port 443
    ProxyCommand corkscrew 1.2.3.4 8080 %h %p ~/.ssh/proxyauth

% cat ~/.ssh/proxyauth
username:password

Jan/2011:

export http_proxy='http://219.93.2.113:3128/'

using kpkg to build kernels

Using kpkg to Build Kernels

See also How To Compile A Kernel – The Ubuntu Way

Preparation

  • make backup floppy
 mkboot /boot/kernel...
  • add myself to src group (logout & login) (more…)