image-info: don't use rpm --verify with --root
RPM uses the host's passwd instead of that in the target to get uid and gid mappings. Run it in a chroot to work around this bug.
This commit is contained in:
parent
cefea2d387
commit
2854b2938e
1 changed files with 4 additions and 1 deletions
|
|
@ -98,7 +98,10 @@ def read_boot_entries(boot_dir):
|
|||
|
||||
|
||||
def rpm_verify(tree):
|
||||
rpm = subprocess.Popen(["rpm", "--root", tree, "--verify", "--all"],
|
||||
# cannot use `rpm --root` here, because rpm uses passwd from the host to
|
||||
# verify user and group ownership:
|
||||
# https://github.com/rpm-software-management/rpm/issues/882
|
||||
rpm = subprocess.Popen(["chroot", tree, "rpm", "--verify", "--all"],
|
||||
stdout=subprocess.PIPE, encoding="utf-8")
|
||||
|
||||
changed = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue