The Debian-Updates repositories provides fresher versions of packages available in mainstream Debian, one of which is the well-known ClamAV. This howto describe an automated process to enable these repositories in Apt.
This howto is tested on:
- Debian 6.0 Squeeze
- Debian 7.0 Wheezy
- Debian 10.0 Buster
Installation
Detect if sudo is available (“command” is used if not):
cmdProxy='command'
command type -f 'sudo' &>'/dev/null' && cmdProxy='sudo'
Install the required software:
${cmdProxy} apt-get install 'lsb-release'
Detect the distribution version name:
debianVersion="$(command lsb_release -cs)"
Detect the currently used download mirror:
mirror="$(awk "/^deb[ \t].*[ \t]${debianVersion}[ \t].*main[\t ].*/ { print \$2; exit }" '/etc/apt/sources.list')"
Add the Debian-Updates repositories to Apt configuration:
${cmdProxy} tee "/etc/apt/sources.list.d/debian-updates.list" \
<<< "# ${debianVersion}-updates, previously known as 'volatile'
deb ${mirror} ${debianVersion}-updates main contrib non-free
deb-src ${mirror} ${debianVersion}-updates main contrib non-free"
Update the list of available packages:
${cmdProxy} apt update
0 Comments