Automatic security updates.
A friend asked me by twitter for a software for automatic security updates in Debian.
Honestly I don’t trust in automatic stuff, but this software appears interesting.
I searched in the cache: apt-cache search automatic update and I found cron-apt.
How to use (at least in Debian)
I.- Yes Mr. Obviously, install it.
# apt-get install cron-apt
II.- Configure.
The main config file is in /etc/cron-apt/config
They are a lot of options, but the important is uncomment:
OPTIONS="-o quiet=1 -o Dir::Etc::SourceList=/etc/apt/security.sources.list"
And create the file:
# echo "deb http://security.debian.org/ squeeze/updates main contrib non-free" > /etc/apt/security.sources.list
Now we need edit /etc/cron-apt/action.d/3-download, by default is:
root@skynet:~# cat /etc/cron-apt/action.d/3-download
autoclean -y
dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
root@skynet:~#
Change by this:
root@skynet:~# cat /etc/cron-apt/action.d/3-download
autoclean -y
upgrade -u -y
root@skynet:~#
And … all done dears nerds!
HINT: Put your email in /etc/cron-apt/config at the var “MAILTO” and change the var “MAILON” by upgrade to receive and email in every upgrade.
Happy upgrade!
mental note: quilt without (much) pain
This is not a Quilt’s tutorial, is a quick reference (to me :)).
Honest I miss dpatch, now in Debian quilt is the “official” patch system then: you like it or you like it (that sound better in Spanish) :)
Let’s play!
quilt store the patches into: debian/patches (like as usual) and use a file called: series to containing the list of all the patches.
Apply the patches:
quilt push [-a]
Remove the patches:
quilt pop [-a]
Update a patch:
quilt refresh
Create a patch:
quilt new $PatchName
Example
quilt push -a
quilt new mynew.patch
quilt add filetomodify
Edit filetomodify
quilt refresh
quilt pop -a
Now your new patch is in debian/patches don’t forget to add in series.
Edit a patch:
To edit a existing patch, this must be on the top of the stack.
quilt pop -a
quit push $PatchName [-f]
quilt edit filetomodify
Make your changes
(at this point you can add new files)
quilt refresh
You can save you settings at ~/.quiltrc, this is mine:
QUILT_DIFF_ARGS="--no-timestamps --no-index --strip 0 -pab"
QUILT_REFRESH_ARGS="--no-timestamps --no-index --strip 0 -pab"
QUILT_NO_DIFF_INDEX=true
QUILT_DIFF_ARGS="--color=auto -p ab"
QUILT_REFRESH_ARGS="-p ab"
QUILT_PATCHES="debian/patches"
Obviously there are a more lot of options: man quilt
Easy right?
Debian post-install “devel” version
I already read many post about “Debian post-installation” most of them focused on packages for multimedia, games, video, eye candy, desktop etc.
Personally after to install any desktop environment I install devel packages for obviously reasons, my “Debian post-installation recipe”:
apt-get install linux-headers-`uname -r`
apt-get install vim dpkg-dev git file gcc libc6-dev make patch perl autoconf automake dh-make debhelper devscripts fakeroot lintian debian-policy developers-reference quilt rpm dpatch gmanedit pbuilder dput
Who knows? maybe it will be useful.
apt-spy
I used SID since I started using Debian, but today I wanted to try testing, the logic tells you that the easiest way is to replace “unstable” to “testing” in your sources.list.
However we can do better, look for the more fastest “mirrors” and even filter by country.
#apt-get install apt-spy
#apt-spy update
#apt-spy -d testing -a North-America -e 5 -o /etc/apt/sources.list
Basically what I did was, install the software, update the mirrors, and run the program, where:
-d testing (distribution, you can use: stable, unstable or testing)
-a North-America (area, benchmarking only servers on the specify area: Asia, North-America, South-America etc.)
-e 5 (stop benchmarking after the number of servers in this option)
-o /etc/apt/sources.list (output file)
And that’s all, we have a new source.list with the fresh and fastest mirrors.
Don’t forget read: man apt-spy