|
1 .. -*- coding: utf-8; -*- |
|
2 |
|
3 ====== |
|
4 Apt. |
|
5 ====== |
|
6 |
|
7 Conf files. |
|
8 =========== |
|
9 |
|
10 See man sources.list(5), apt.conf(5):: |
|
11 |
|
12 /etc/apt/sources.list |
|
13 /etc/apt/apt.conf |
|
14 |
|
15 Setup backport. |
|
16 =============== |
|
17 |
|
18 Main backports archive you can find on www.backports.org. |
|
19 |
|
20 To get packeges gpg sign key:: |
|
21 |
|
22 $ su |
|
23 ... |
|
24 $ wget -O - http://backports.org/debian/archive.key | apt-key add - |
|
25 $ ^D |
|
26 |
|
27 Write where packeges places:: |
|
28 |
|
29 $ cat /etc/apt/sources.list |
|
30 deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official amd64 DVD Binary-2 20070407-12:15]/ etch contrib main |
|
31 deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official amd64 DVD Binary-1 20070407-12:15]/ etch contrib main |
|
32 |
|
33 deb http://www.backports.org/debian/ etch-backports main contrib non-free |
|
34 |
|
35 Getting new keys for packages. |
|
36 ============================== |
|
37 :: |
|
38 |
|
39 $ sudo apt-get update |
|
40 ... |
|
41 W: There is no public key available for the following key IDs: |
|
42 9AA38DCD55BE302B |
|
43 W: GPG error: http://http.us.debian.org etch Release: The following signatures |
|
44 couldn't be verified because the public key is not available: NO_PUBKEY |
|
45 9AA38DCD55BE302B |
|
46 ... |
|
47 |
|
48 $ gpg --keyserver pgp.mit.edu --recv-key 9AA38DCD55BE302B \ |
|
49 --keyserver-options http-proxy=http://user:pass@192.168.1.1:3128 |
|
50 gpg: requesting key 55BE302B from hkp server pgp.mit.edu |
|
51 gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key (5.0/lenny) <ftpmaster@debian.org>" imported |
|
52 gpg: no ultimately trusted keys found |
|
53 gpg: Total number processed: 1 |
|
54 gpg: imported: 1 (RSA: 1) |
|
55 |
|
56 $ gpg --export 9AA38DCD55BE302B | sudo apt-key add - |
|
57 OK |
|
58 |
|
59 Install build dependency for package. |
|
60 ===================================== |
|
61 :: |
|
62 |
|
63 $ apt-get install build-essential # install dev LIBC and GCC C/C++ |
|
64 $ sudo apt-get build-dep $package |
|
65 |
|
66 If all you want is checking what packages are needed to build a given package:: |
|
67 |
|
68 $ apt-cache showsrc $package |
|
69 |
|
70 or check 'Build-Depends' attribute in:: |
|
71 |
|
72 $ apt-cache show $package |
|
73 |
|
74 Delete config file for removed packages. |
|
75 ======================================== |
|
76 |
|
77 To get list of such packages use one of:: |
|
78 |
|
79 $ aptitude search ~c |
|
80 $ grep-status -n -sPackage -FStatus config-files |
|
81 |
|
82 To remove them:: |
|
83 |
|
84 $ aptitude purge ~c |
|
85 |
|
86 Delete obsolete packages. |
|
87 ========================= |
|
88 |
|
89 To get list of such packages use:: |
|
90 |
|
91 $ aptitude search ~o |
|
92 |
|
93 To remove them:: |
|
94 |
|
95 $ aptitude purge ~o |
|
96 |
|
97 Check package files for modification. |
|
98 ===================================== |
|
99 :: |
|
100 |
|
101 $ sudo debsums --changed |
|
102 |