Debian
From AdminWiki
m (dpkg -S) |
m (file integrity) |
||
Line 4: | Line 4: | ||
= Tips and tricks = | = Tips and tricks = | ||
+ | |||
+ | == How can I verify the integrity of an installation? == | ||
+ | |||
+ | If you're in doubt of the file integrity of an installation, this oneliner can give you a rough estimate of the damage done to the files managed by debian. | ||
+ | |||
+ | cd /; md5sum -c /var/lib/dpkg/info/*.md5sums | grep -v "OK$" | ||
== apt/dpkg == | == apt/dpkg == |
Revision as of 18:41, 14 June 2006
Contents |
Evaluation
Pro-contra
Tips and tricks
How can I verify the integrity of an installation?
If you're in doubt of the file integrity of an installation, this oneliner can give you a rough estimate of the damage done to the files managed by debian.
cd /; md5sum -c /var/lib/dpkg/info/*.md5sums | grep -v "OK$"
apt/dpkg
How do I check what version package $x gets upgraded to?
apt-cache policy <package>
How can I check by which package a file is owned?
dpkg -S <file>
How can I install packages from unstable in testing? Apt-Pinning
apt-pinning is the answer.
You have to edit or create those configuration files
- /etc/apt/sources
- /etc/apt/apt.conf
- /etc/apt/preferences
In /etc/apt/sources/ add the other distributions you want to use. For example if you are in testing, add the same entries with unstable or higher.
# testing deb http://ftp.debian.org/debian/ testing main contrib deb-src http://ftp.debian.org/debian/ testing main contrib # unstable deb http://ftp.debian.org/debian/ unstable main contrib deb-src http://ftp.debian.org/debian/ unstable main contrib # experimental deb http://ftp.debian.org/debian/ experimental main contrib deb-src http://ftp.debian.org/debian/ experimental main contrib
In /etc/apt/apt.conf set a higher cache limit for apt-get so it doesn't run out of memory during updates
APT::Cache-Limit "141942904";
In /etc/apt/preferences add the higher trees with a lower Priority so they do not overwrite your basic packages from your main tree.
# testing Package: * Pin: release a=testing Pin-Priority: 650 # unstable Package: * Pin: release a=unstable Pin-Priority: 600 # experimental Package: * Pin: release b=experimental Pin-Priority: 550
In case you want to have a certain package from eg unstable overrule the testing package, add a new entry like this
Package: mutt Pin: release a=unstable Pin-Priority: 700
To install packages there are two ways. One is to try to install just the package, and the other way is to install all the packages and also the ones needed to satisfy its dependencies. The second choice is of course more dangerous because it can overwrite important libraries and make your system unstable.
to install just the package:
apt-get install <package>/<tree>
to install the package and all needed dependencies:
apt-get -t <tree> install <package>
<tree> stands for the release, eg testing, unstable, ...
more information:
http://jaqque.sbih.org/kplug/apt-pinning.html
Install missing keys for apt-get
you have to had gpg run at least one time before, or it will not work.
to get the gpg key
gpg --recv-keys <key>
and then import them into the apt-key system
gpg --export --armor | apt-key add -
you can also directly download and install the key
wget http://host.domain.com/keyname.asc -O - | apt-key add -