Thursday, November 20, 2008

apt-listchanges chokes on its DB (bsddb.db.DBRunRecoveryError)

in case of:
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 229, in ?
main()
File "/usr/bin/apt-listchanges", line 150, in main
seen.close()
File "bsddb/__init__.py", line 237, in close
bsddb.db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: fatal region error detected; run recovery')
(similarly to the post below) something along the lines of:
cd /var/lib/apt
db4.6_dump listchanges.db | db4.3_load temp.db
mv temp.db listchanges.db
helps.

Saturday, November 15, 2008

spamassassin (or spamd) fails while accessing bayes databases - R/O: tie failed: Transport endpoint is not connected

just found lines like these in the spamd.log (i.e. spamassassin was not able to use the bayes databases any more...)
warn: bayes: cannot open bayes databases /.../.spamassassin/bayes_* R/O: tie failed: No such file or directory
...
warn: bayes: cannot open bayes databases /.../.spamassassin/bayes_* R/O: tie failed:
warn: bayes: cannot open bayes databases /.../.spamassassin/bayes_* R/O: tie failed: Transport endpoint is not connected
the problem seemed to have been a mismatch in used versions of the BereklyDB files (don't know how exactly they got mixed up...)
anyways, the following commands helped:
for i in auto-whitelist bayes_*; do db4.6_dump ${i} | db4.3_load ${i}.db; chown Debian-exim:Debian-exim ${i}.db; chmod g-rwx ${i}.db; done;
mmv '*.db' '#1'
after that one may check/sync/rebuild the databases along the lines of:
sudo -u Debian-exim sa-learn -u USERNAME --rebuild --dbpath /.../.spamassassin/ -D
some inspiration cam from this thread: http://lists.debian.or.jp/debian-users/200601/msg00113.html

Friday, November 14, 2008

tweking perl dependencies in debian

wanted to install dkimproxy on a debian server and was happy to find that the package existed. however, installing this package would have altered quite a lot of the perl installation - including many removes (due to dependency errors...); after some manual tweaking of aptitude, apt-get, and dpkg i finally, realized that this won't work...

but then i found: http://www.debian-administration.org/articles/78 - and started with:
dh-make-perl Mail-DKIM-0.32/
...but found that more modules were needed:
dh-make-perl --cpan Crypt::OpenSSL::Random --build
dh-make-perl --cpan Crypt::OpenSSL::RSA --build
dh-make-perl --cpan Crypt::OpenSSL::Bignum --build
installation is done via regular dpkg -i. and afterwards:
sudo aptitude install --without-recommends dkimproxy/testing
worked.


References:
  1. http://dkimproxy.sourceforge.net/
  2. http://www.cpan.org/modules/01modules.index.html
  3. https://help.ubuntu.com/community/GnuPrivacyGuardHowto (in case something like 'running debsign failed' comes up...)