Samstag, 28. Februar 2009


The rpmdevtools are in Fedora for quite a while now and really helpful in a lot of situations. So are the tools in the yum-utils. But the tools in those two packages don't completely satisfy all my needs, hence I (ages ago) wrote a few small scripts that do some additional magic:
  • run "rpm -V" on all the packages and look out for packages where files are (a) missing or (b) corrupted; the script as a bonus (c) can even print out config files that have been modified (which likely should be part of a separate script, as that might be handy for backup purposes); if likely (d) should offer to reinstall packages that have missing or corrupted files
  • run something like "find /bin/ /boot/ /etc/ /lib/ /opt/ /sbin/ /usr/ /var/" with "-type f" and/or "-type d" and let rpm check if the list of files and/or directories that find outputs are owned by a package -- complain if not; that's quite a lot of work for the system and takes a while to complete, but often turns up a whole lot of old and obsolete cruft that is lying in some hidden corner of the hard disk just waiting to get erased (just checked a random machine; 3241 files sum up to 380 MByte...)
  • run something like "find /boot/ /etc/ /opt/ /usr/ /var/" with "-name '*.rpmnew'" "-name '*.rpmsave'"; go through the list of files find outputs, show a "diff -u" and offer the user to either

    • run tools like meld or kdiff3 to merge the files(¹) and remove the .rpm{new,save}-file afterwards
    • replace the file with its .rpm{new,save}-pendant (or do it semi-automatically if sha1sums are identical)
    • delete the .rpm{new,save}-file
    • do nothing

  • a script that calls all the above tests as well as "package-cleanup" sequentially with the options "--problems", "--orphans", and "--dupes" to generate a report of "unusual" things
All my scripts are quite rough and not really ready for general consumption. But I wonder if it would be worth to collect scripts like these (a lot of users likely have similar scripts), pick the best ones, clean them up in a fedorahosted project and ship them in a package "rpmusrtools" within the fedora repositories.

Dear reader: Would you find such a package useful? Or are there already such scripts/tools somewhere in the big Fedora package collection and I'm just not aware of them?

(¹) that works quite well for a lot of config files, but breaks horrible for those that have lots of comments in them that try to explain each and every option and/or variable :-(( it get even worse if those comments change every few months.

So this goes to the authors of dovecot, postfix, squid, and other software that has lots of comments in their default config files: "Config files are for configuration and should not contain lots of comments that get adjusted every few months, as those make it really hard to merge older (modified) config files with new one; in the future please consider to explain all option in a proper document like a man-page instead please and remove the comments from the config files! Thanks in advance! Yours truly, Thorsten Leemhuis"

Montag, 16. Februar 2009

I really wish we could get rid of ".fcXY" as disttag in rawhide

I really wish we would get rid of using ".fcXY" as disttag in rawhide because it confuses way to many people when they find packages with tags like "fc7" on their fresh rawhide install... Simply using ".1" as disttag imho would be the best solution.
$ rpmdev-vercmp 1.2-3.1 1.2-3-fc10
0:1.2-3.1 is newer
Then packages that (for good reasons) don't get rebuild during one or two devel cycles don't have disttags from older fedora releases in their package names. But people didn't like it back when I proposed it some years ago. :-/ Hopefully someone sooner or later comes up with a better idea. ".fcn" for "Fedora Collections newest" maybe?
$ rpmdev-vercmp 1.2-3.fcn 1.2-3-fc10
0:1.2-3.fcn is newer

Freitag, 13. Februar 2009 is not dead is unreachable -- but that are just temporary DNS problems, so the rumors of livna's death are greatly exaggerated. will stay as a add-on to the repositories from RPM Fusion for the foreseeable future.

The mirrors still work and yum will automatically use one of them. You can find the release-rpm on mirrors like the one on in case you need it for a fresh Fedora install.

Update: The DNS for will likely be unavailable for at least a few days, likely a week or more. So spread the news to make sure everyone is aware of the fact that is still alive and remains usable thanks to the mirrors.

Update2: Use this command to enable livna on a fresh install:
su -c 'rpm -Uvh'
After that adjust the repo file to let it retrieve the mirrorlist from one of the mirrors:
su -c "sed -i 's|||' /etc/yum.repos.d/livna.repo"
The latter command should be used as workaround on exiting Fedora install as well if yum is unable to retrieve the mirrorlist!