Closed vasiliy-ul closed 1 year ago
@Vogtinator FYI.
ping @mlschroe
The issue also affects RPM builds, or at least did in the past. I had to add a workaround to obs-service-kde
for that.
I guess we would need to copy or link .rpmmacros
so it's present in both /
and /root
. Otherwise, it will break the existing workarounds with HOME=/root rpm --eval ...
. Maybe smth like below would be enough?
diff --git a/build-recipe b/build-recipe
index 753faa4..d68b456 100644
--- a/build-recipe
+++ b/build-recipe
@@ -235,6 +235,7 @@ recipe_setup_macros() {
EOF
fi
test $BUILD_USER = abuild && cp -p $BUILD_ROOT/root/$rawcfgmacros $BUILD_ROOT/home/abuild/$rawcfgmacros
+ cp -p $BUILD_ROOT/root/$rawcfgmacros $BUILD_ROOT/$rawcfgmacros
}
# generate a .build-changelog file from a .changes file
No, obs-build just needs to make sure that $HOME
is set properly.
Yes, that will work either.... ofc, if nobody made assumptions about HOME=/ in their specs.
When building a
Dockerfile
container image with--vm-type=kvm
, the.rpmmacros
file gets written to/root
while theHOME
env var is set to/
. This leads to unexpected results when trying to evaluate RPM macros which are supposed to come fromprjconf
(e.g. by executingrpm --eval ...
in the build environment via a build-time service).