Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257251 - app-portage/portage-utils: Ability to specify vdb path
Summary: app-portage/portage-utils: Ability to specify vdb path
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-01 17:21 UTC by Allen Brooker (AllenJB)
Modified: 2009-03-15 10:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allen Brooker (AllenJB) 2009-02-01 17:21:55 UTC
It would be nice to be able to specify an alternate vdb path to read data from. This way a backup could be used (mounted from an external disk, for example) with the qcheck and qfile (orphans) utilities if tampering is suspected.

If this feature were added, these utilities could be used in a similar manner to integrit - I realise it's not exactly a total replacement for integrit, but it does provide a more useful reference point as to why changes might have (legitimately) occurred and it would obviously be useful if you could use a backup which you're certain hasn't been tampered with, without replacing your live systems vdb.
Comment 1 solar (RETIRED) gentoo-dev 2009-02-02 19:20:13 UTC
This already exists pretty much but is controlled the same way portage is, which is via the ROOT= variable.

Example:

ROOT=/usr/armv4tl-softfloat-linux-gnueabi/ qlist -LS 
Comment 2 Allen Brooker (AllenJB) 2009-02-02 23:56:05 UTC
Using ROOT= with qcheck doesn't appear to work.

Every file is reported as AFK
eg: AFK: /backup//usr/src/linux-2.6.28-tuxonice-r1/drivers/infiniband/hw/ipath/ipath_sd7220.c


Test case:
mkdir -p /backup/var/{lib,cache}
cp -ar /var/db /backup/var/
cp -ar /var/lib/portage /backup/var/lib
cp -ar /var/cache/edb /backup/var/cache/
ROOT=/backup/ qcheck -av

(Small note, when I try it without the trailing slash on ROOT=, qcheck silently exits - strace shows it isn't adding the slash itself and is not finding files. Should this be considered a bug?)

When I specify ROOT=/backup, qcheck is trying to check files under /backup instead of under / (I want it to source the information from /backup, and use it to check the files under /)
Comment 3 SpanKY gentoo-dev 2009-03-15 10:03:53 UTC
you can set it via Q_VDB env var now

http://sources.gentoo.org/gentoo-projects/portage-utils/main.c?r1=1.159&r2=1.160