aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 35fda8bb6d459cbc4b90171ff6a800896e40b02f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Automate APT pinning for Debian distributions

## Description

In Debian systems, it is possible to do
[APT pinning](https://wiki.debian.org/AptPreferences), what allows the
installation of certain packages from one distribution (testing, unstable,
experimental) without the necessity of upgrading the entire system.

The Makefile contained in this project automates the creation of the APT
configuration files for doing APT pinning with the four main Debian
distibutions (stable, testing, unstable, and experimental).

## Usage

Just type `sudo make` (or `make` as root) and you will be prompted for the
name of the Debian mirror and the order of priority of the distributions.
In order to accept the default values, just type enter.

```console
$ sudo make
Debian mirror [ftp.us.debian.org]: ftp.fr.debian.org
Priority order [stable testing unstable experimental]: testing unstable stable experimental
Installing preferences file...
Installing source files...
aptitude update
[...]
```

This will create the following files:

```
/etc/apt/preferences.d/debian-releases
/etc/apt/sources.list.d/debian-testing.list
/etc/apt/sources.list.d/debian-unstable.list
/etc/apt/sources.list.d/debian-stable.list
/etc/apt/sources.list.d/debian-experimental.list
```

There is a rudimentary way of uninstalling the files, by using the command
shown below.  Note that this is only guaranteed to work if `make uninstall`
immediately follows `make install`, otherwise some files may be left in the
file system.

```console
$ sudo make uninstall
```

Finally, the command shown below will display this very file using the
commands `markdown_py` and `w3m`, if they are installed in the system.
Otherwise it will just use `cat`.

```console
$ make doc
```

## Author

Copyright (C) 2015  Rafael Laboissière (<rafael@laboissiere.net>)

Released under the GNU Public License, version 3 or later.  No warranties.