Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 21 Feb 2015 15:47:22 -0500
From: Jeffrey Johnson <n3npq@....com>
To: owl-dev@...ts.openwall.com
Subject: Re: removing /var/lib/rpm/__db.00? on rpm upgrade (was: recent updates)

Hi --
(aside)
I've just joined owl-dev@ mailing list and
will be trying to install 3.1-stable and current
in the next few days

> BTW, we (you?) should probably introduce a trigger into rpm.spec, so
> that /var/lib/rpm/__db.00? are automatically removed on upgrades from
> our older versions of rpm known to have these in incompatible format.

> Otherwise our end-users would run into the same problem when upgrading
> e.g. from Owl 3.1-stable to Owl-current, even with binaries.

> We already have:

> %triggerpostun -- %name < 4.2-owl22
> # Remove __db.00? files that look like they're pre-NPTL.  We may be removing
> # files that are opened and/or memory-mapped by us (by the rpm process that
> # installs the new rpm package), but that's OK.  The next invocation of rpm
> # will recreate the files.  4.2-owl22 is when we added this trigger, and we
> # were already using NPTL at the time, so there is no need to perform the
> # size check and possibly remove the files when upgrading from newer versions.
> RPMDBDIR=/var/lib/rpm
> if [ -f $RPMDBDIR/__db.001 -a "`wc -c < $RPMDBDIR/__db.001`" -le 8192 ]; then
> 	rm -f $RPMDBDIR/__db.00?
> fi

You shouldn't simply remove __db.00? files even if that "works".
At a minimum, run
	db53_recover -h /var/lib/rpm
in %posttrans where /var/lib/rpm is quiescent.
> We probably need a similar section for the recent rpm update as well.
> Would both sections fire when upgrading from even older rpm, though
> (prior to 4.2-owl22)?  Would that be OK?  I guess so, but perhaps the
> old section above will become redundant, and thus we need to replace it
> rather than add another?  This needs some thinking and testing.
Let me catch up with Owl packaging and I'll try to send along a patch.

hth

73 de Jeff
[ CONTENT OF TYPE text/html SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ