Added support for dnf5 (backport from 3007) and update to its new command syntax changes since 2023