SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.03k stars 124 forks source link

Docker compose build tar error #192

Closed Marker689 closed 1 year ago

Marker689 commented 1 year ago

Trying to "docker compose build", but got Tar error. Running docker in LXC Ubuntu-22.04.

#0 32.11 /src/monero/contrib/depends/work/download/native_protobuf-3.6.1/protobuf-cpp-3.6.1.tar.gz.temp: OK
#0 32.13 Extracting native_protobuf...
#0 32.15 /src/monero/contrib/depends/sources/protobuf-cpp-3.6.1.tar.gz: OK
....
#0 32.27 tar: compile: Cannot change ownership to uid 231664, gid 89939: Invalid argument
#0 32.27 tar: Exiting with failure status due to previous errors
#0 32.27 make[1]: *** [funcs.mk:266: /src/monero/contrib/depends/work/build/x86_64-pc-linux-gnu/native_protobuf/3.6.1-f6fde401269/.stamp_extracted] Error 2
#0 32.27 make[1]: Leaving directory '/src/monero/contrib/depends'
#0 32.27 make: *** [Makefile:50: depends] Error 2
------
failed to solve: executor failed running [/bin/sh -c git clone --recursive https://github.com/monero-project/monero &&     cd monero &&     if [ "x$MONERO_GIT_TAG" = "xlatest" ]; then MONERO_GIT_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)); fi &&     git checkout $MONERO_GIT_TAG &&     git submodule sync && git submodule update --init --force --recursive &&     make -j$(nproc) depends target=$(contrib/depends/config.guess)]: exit code: 2
Marker689 commented 1 year ago

Okay, actually it's only trouble of building monerod container, but maybe someone still can help?

SChernykh commented 1 year ago

@bladedoyle maybe you can help?

bladedoyle commented 1 year ago

this seems to describe the issue: https://superuser.com/questions/1435437/how-to-get-around-this-error-when-untarring-an-archive-tar-cannot-change-owner

Maybe there are lxc settings to work around this, or maybe it would be possible to alias the tar command to patch in the "--no-same-owner" flag. I'll need to do a little testing. I dont have much lxc experience but will see if I can reproduce and find a solution.

bladedoyle commented 1 year ago

@Marker689 Can you please share your lxc container settings so I can try to reproduce the error?

I created a privileged lxc container with the following settings and did not see any issue: root@foobox:/etc/lxc# more default.conf

lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
lxc.apparmor.profile = unconfined
lxc.apparmor.allow_nesting = 1
lxc.seccomp.allow_nesting = 1
lxc.mount.auto=proc:rw sys:rw cgroup:rw
lxc.cgroup.devices.allow=a
lxc.cap.drop=
SChernykh commented 1 year ago

@Marker689 did you try default.conf from @bladedoyle ? If you don't have the problem anymore, I'll close this issue.