mixer-tools icon indicating copy to clipboard operation
mixer-tools copied to clipboard

Cleaning the environment in distro-factory fails due to root permission requirement

Open ashleshaAtrey opened this issue 4 years ago • 2 comments

If we create LOCAL_REPO_DIR if LOCAL_RPM_DIR is empty, repodata is created with root permissions. To clean the environment for the next build, devops requires root permissions which causes an issue.

ashleshaAtrey avatar Mar 09 '20 21:03 ashleshaAtrey

Currently due to new dnf requirements, every repo enabled in .yum-mix.conf needs to be a dnf repo dir. If its just an dir without dnf repodata, dnf will error out. To fix this issue, Compatibility with latest DNF #731 fix was added in mixer.

The fix creates a repodata for the local repo listed in builder.conf if repodata doesn't exists. This repodata is created during mixer build stage which are executed under root. Hence the repodata ends up being created with root permissions. Even if repo listed is empty, we end up creating a repodata for that repo.

ashleshaAtrey avatar Mar 09 '20 23:03 ashleshaAtrey

Solutions can be

  1. Dont create local-repo by default. Need to investigate what can break due to this change
  2. Add repo commands to enable and disable a repo

ashleshaAtrey avatar Mar 09 '20 23:03 ashleshaAtrey