scylladb / scylla-jmx

Scylla JMX proxy
GNU Affero General Public License v3.0
28 stars 51 forks source link

Can not build relocatable dist package via toolchain dbuild #225

Open datnguyenzzz opened 8 months ago

datnguyenzzz commented 8 months ago

Got an issue too many symlinks when building dist via frozen toolchain - dbuild script

Traceback (most recent call last):
  File "/Users/dat.ngthanh/Documents/My_code/scylladb/tools/jmx/./dist/debian/debian_files_gen.py", line 52, in <module>
    shutil.copytree('dist/debian/debian', 'build/debian/debian')
  File "/usr/lib64/python3.11/shutil.py", line 561, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/shutil.py", line 515, in _copytree
    raise Error(errors)
shutil.Error: [('dist/debian/debian/scylla-jmx.service', 'build/debian/debian/scylla-jmx.service', "[Errno 40] Too many levels of symbolic links: 'dist/debian/debian/scylla-jmx.service'")]

When I tried to list down all symlinks of dist/debian/debian/scylla-jmx.service, here is what I got

find ./tools/jmx/dist -type l -ls
335518889        0 lrwxr-xr-x    1 dat.ngthanh      staff                  39 Nov 11 10:52 ./tools/jmx/dist/debian/debian/scylla-jmx.service -> ../../common/systemd/scylla-jmx.service

Submodule version: Submodule path 'tools/jmx': checked out '05bb7b685b8a847459f5d641fbd7c7a537c14908'

avikivity commented 8 months ago

What OS are you building on? what filesystem?

datnguyenzzz commented 8 months ago

What OS are you building on? what filesystem?

I'm building on MacOS by using the frozen toolchain - dbuild script.

Here is my docker info output:

Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false

 Kernel Version: 6.1.55-0-virt
 Operating System: Alpine Linux v3.18
 OSType: linux
 Architecture: aarch64
 CPUs: 2
 Total Memory: 1.924GiB
 Name: colima

And there're filesystem (APFS) on my local mac

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:             Apple_APFS_ISC Container disk1         524.3 MB   disk0s1
   2:                 Apple_APFS Container disk3         494.4 GB   disk0s2
   3:        Apple_APFS_Recovery Container disk2         5.4 GB     disk0s3

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +494.4 GB   disk3
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            9.2 GB     disk3s1
   2:              APFS Snapshot com.apple.os.update-... 9.2 GB     disk3s1s1
   3:                APFS Volume Preboot                 5.3 GB     disk3s2
   4:                APFS Volume Recovery                801.4 MB   disk3s3
   5:                APFS Volume Data                    219.6 GB   disk3s5
   6:                APFS Volume VM                      9.7 GB     disk3s6