dpkg-changes v1.2
dpkg-changes is a simple script which will report on any packages which have been installed, or removed, from a Debian GNU/Linux system since the script was last run.
It does this by building up a list of all the packages installed upon your system the first time it is run, then comparing that list against the current state system reports whenever it is subsequently run.
The intention is that it can be placed in a crontab file for a user and be run on a daily/weekly basis to give a good idea of what has changed upon the machine.
This is particularly handy when a server is maintained by multiple people, as it allows all admins to be informed when a new package is installed.
Requirements
This script only requires a working perl installation.
Installation
Run 'make install' to install the script to /usr/sbin, and the documentation to /usr/local/share.
After that create a crontab entry either in your personal file, or under the system wide /etc/cron.{daily weekly} directory:
0 0 * * * /usr/sbin/dpkg-changes
This will cause the script to be run daily, or weekly.
By default the cache file will be created in /var/cache/dpkg-changes, which will mean that non-root users will be unable to run the script usefully. If you wish a non-root user to run the script simple give it a different cache directory, as follows:
/usr/sbin/dpkg-changes --cache /home/user/dpkg-cache/
Please note that the first time you run the script nothing will appear. (The cache file will be built up and the script will terminate silently, unless you run with --verbose).
Feedback
Any feedback would be greatfully received.
Revision History
1.0 - Initial release
1.1 - Cope with plurals properly in the reports.
- More tracing when running with '--verbose'
- Added the '--simple' output option.
- Added new option '--uncache' to not update the cache.
- Added the ability to show the date upon which packages were added.
- Added GPL statement within the script.
- Added a manpage.
- Prepared a Debian package.
1.2 - Updated code to contain manpage.
- Fixed manpage to describe '--no-cache' as '--uncache'.
- Removed prototypes.
Steve
