etc-update for Slackware
I have started developing something like etc-update (from Gentoo) for Slackware. The purpose of the script is to look for ".new" configuration files and to find out whether they are identical with the old version or not.
If you are interested in contributing ideas, feel free to download the script from here. I'd appreciate your feedback and ideas. |
You know that the Slackware packages only leave .new files when they are different from the originals? The install script deletes any .new files if they are identical to the file that is found already installed on the computer.
Eric |
No, I did not know that. Does this include checks of file modes, gid, uid in addition to contents?
When I did the upgrade from 10.1 to 10.2, I sure found some identical files if I am not mistaken. |
Quote:
|
Code:
root@slackw:/sbin$ grep -i md5sum * |
Quote:
For example, this is an extract from the udev package script: Code:
config() { |
OK, so it's not standard upgradepkg behaviour, but up to the post-install script. Thanks for the info.
Anyway, the case might happen for whatever reason so I want to be able to manage it. |
Off topic slightly, but does anyone know the probability that two different files will have the same MD5 checksum?
|
OK, I'll assume that the "obvious" answer is the correct one: 1 in 2^128 (since MD5 generates a 128-bit checksum).
|
Nobber, I don't know. What I know is that I don't trust md5. When I wrote a program to find duplicate files, I compared the files bytewise. All other programs I know of use hashed like md5 or sha1. In both, collisions exist.
Back to etc-update. As having completely identical files is obviously the exception, I added an 'act' mode. In act mode, you can compare and modify the config files. I guess it looks more like the Gentoo tool now. Feedback is welcome. Have a look at the documentation for more explanation. And use with care. The link is still the same |
Quote:
|
Quote:
|
Even a byte-by-byte comparison can give the wrong answer if there are hardware failures. ;)
|
Getting back to the subject, I have released a new version that now uses vimdiff, i.e. vim, to visually manage the differences in the configuration files. I have also added a transcript of an interactive session to the doc and hence to the homepage.
I think that the script is now getting close to usable. I'll stop advertising it here, but I do appreciate all feedback, positive or negative, provided that "grep -i md5" and "grep -i alien" are empty. |
All times are GMT -5. The time now is 03:11 PM. |