Skip to content

dracut-install falls over if sysroot argument end with / #2666

@kubiko

Description

@kubiko

Describe the bug
when --sysrootdir argument is used, internal buffer handling gets confused

Distribution used
Ubuntu 24.04

Dracut version
2, but also present when compiled from master

Init system
Ubuntu 24.04

To Reproduce
Simpliest is to pass `--sysrootdir /'
e.g.

mkdir /tmp/test.dracut
/usr/lib/dracut/dracut-install --debug -D /tmp/test.dracut --ldd -r / /usr/bin/true

as result, marformed lib symbolic link is created, lib -> /sr/lib

Expected behavior
install completes without error with correct directory structure in the destination directory created

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugOur bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions