Closed BrainLyh closed 1 month ago
Hi @BrainLyh
this is not related at all with the tools.system.package_manager
, that is for the system_requirements()
method calling some system package manager like apt
or yum
, so those confs
will not help.
Here what is failing is the regular build()
method calling ./configure
autotools script. In theory, it is possible to do things like chmod
if necessary in recipes, but ConanCenter recipe is already expected to work, this shouldn't be necessary in most cases, but if you manage to do some changes in the conan-center-index
recipe and conan create
it, that would be very useful information, and could be contributed back to the recipe in that case.
It seems to be failing due to permissions, it is likely that running as root
in /root/.conan2
is the cause. Not sure if running Conan under sudo
would fix it, but that doesn't sound like a good approach. I think I would try with other user, or checking some general permissions in the docker.
Hi @memsharded
i trying to change the floder premission during build. It works,but not sure is a good approach.
@@ +142 @@ /conan_src/conans/client/installer.py
import subprocess
...
with chdir(base_build):
conanfile.output.info('Building your package in %s' % base_build)
conanfile.output.info("Chmoding generated folders")
cmd_list = ['chmod','-R','755',base_build]
subprocess.run(cmd_list, check=True)
No, patching Conan source code and modifying /conan_src/conans/client/installer.py
should be a very extreme exception, and should be avoided as much as possible, and it would be very discouraged for something like this, as changing all permissions for all files in all built packages can have unintended consequences and produce other problems in other packages.
If anything, I'd recommend forking the ffmpeg recipe only, and creating a package from the modified recipe, or if it makes sense, fixing the recipe upstream in the conan-center-index
repo.
Still, it is possible that there might be other solution elsewhere, if it is only failing for you and not other Conan users so far, it must be something in the setup/docker/system or something like that.
Hi @memsharded, I have the same issue with the icu package, I guess this issue can be reproduced with any recipe using the configure
script in the target repo, which is a lot of recipe from conan center.
I managed find the original issue in python and reproduced it with conan: https://github.com/python/cpython/issues/108254. Obviously we don't want to change the owner of the files so that's too bad it prevent us from having the correct execution rights on the extracted files, but it seems that there is no way to avoid the chown using tarfile.extract
.
What do you think is the correct way of fixing this?
Hi @memsharded, I have the same issue with the icu package, I guess this issue can be reproduced with any recipe using the configure script in the target repo, which is a lot of recipe from conan center.
No, not really we are both building these recipes in ConanCenter without issues as well as many thousands of users, so this doesn't seem to be a mainstream problem easy to reproduce.
The best would be to provide fully reproducible case, including the docker image to reproduce. I'd suggest using conanio
images, but most likely they will not fail, so I guess it would be using other docker configuration?
Closing as stale. If you have any fully reproducible case, like with the above recommended docker images, please re-open or create a new ticket to check them. Thanks for the feedback!
What is your question?
Hi,Can i control the permission about the file in /root/.conan2/... when i run
conan create conanfile.py --version=1.0.1 --build=missing
?This is the error output:
I not sure whether i'm right if changed
global.conf
:but set
tools.system.package_manager:sudo = True
,will meet error in my docker env.Have you read the CONTRIBUTING guide?