clonebox 1.1.16__py3-none-any.whl → 1.1.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of clonebox might be problematic. Click here for more details.
- clonebox/cloner.py +31 -23
- {clonebox-1.1.16.dist-info → clonebox-1.1.17.dist-info}/METADATA +1 -1
- {clonebox-1.1.16.dist-info → clonebox-1.1.17.dist-info}/RECORD +7 -7
- {clonebox-1.1.16.dist-info → clonebox-1.1.17.dist-info}/WHEEL +0 -0
- {clonebox-1.1.16.dist-info → clonebox-1.1.17.dist-info}/entry_points.txt +0 -0
- {clonebox-1.1.16.dist-info → clonebox-1.1.17.dist-info}/licenses/LICENSE +0 -0
- {clonebox-1.1.16.dist-info → clonebox-1.1.17.dist-info}/top_level.txt +0 -0
clonebox/cloner.py
CHANGED
|
@@ -1234,9 +1234,9 @@ check_mount() {{
|
|
|
1234
1234
|
log "[INFO] Mount point '$path' does not exist yet"
|
|
1235
1235
|
return 0
|
|
1236
1236
|
fi
|
|
1237
|
-
}
|
|
1237
|
+
}}
|
|
1238
1238
|
|
|
1239
|
-
check_copy_path() {
|
|
1239
|
+
check_copy_path() {{
|
|
1240
1240
|
local path="$1"
|
|
1241
1241
|
if [ -d "$path" ]; then
|
|
1242
1242
|
if [ "$(ls -A "$path" 2>/dev/null | wc -l)" -gt 0 ]; then
|
|
@@ -1403,7 +1403,7 @@ fi
|
|
|
1403
1403
|
(cloudinit_dir / "meta-data").write_text(meta_data)
|
|
1404
1404
|
|
|
1405
1405
|
# Generate mount commands and fstab entries for 9p filesystems
|
|
1406
|
-
|
|
1406
|
+
bind_mount_commands = []
|
|
1407
1407
|
fstab_entries = []
|
|
1408
1408
|
all_paths = dict(config.paths) if config.paths else {}
|
|
1409
1409
|
pre_chown_dirs: set[str] = set()
|
|
@@ -1421,8 +1421,8 @@ fi
|
|
|
1421
1421
|
d_str = str(current)
|
|
1422
1422
|
if d_str not in pre_chown_dirs:
|
|
1423
1423
|
pre_chown_dirs.add(d_str)
|
|
1424
|
-
|
|
1425
|
-
|
|
1424
|
+
bind_mount_commands.append(f" - mkdir -p {d_str}")
|
|
1425
|
+
bind_mount_commands.append(f" - chown 1000:1000 {d_str}")
|
|
1426
1426
|
except ValueError:
|
|
1427
1427
|
pass
|
|
1428
1428
|
|
|
@@ -1433,14 +1433,15 @@ fi
|
|
|
1433
1433
|
|
|
1434
1434
|
# Ensure target exists and is owned by user (if not already handled)
|
|
1435
1435
|
if str(guest_path) not in pre_chown_dirs:
|
|
1436
|
-
|
|
1437
|
-
|
|
1436
|
+
bind_mount_commands.append(f" - mkdir -p {guest_path}")
|
|
1437
|
+
bind_mount_commands.append(f" - chown 1000:1000 {guest_path}")
|
|
1438
1438
|
|
|
1439
|
-
|
|
1439
|
+
bind_mount_commands.append(f" - mount -t 9p -o {mount_opts} {tag} {guest_path} || true")
|
|
1440
1440
|
# Add fstab entry for persistence after reboot
|
|
1441
1441
|
fstab_entries.append(f"{tag} {guest_path} 9p {mount_opts},nofail 0 0")
|
|
1442
1442
|
|
|
1443
1443
|
# Handle copy_paths (import then copy)
|
|
1444
|
+
import_mount_commands = []
|
|
1444
1445
|
all_copy_paths = dict(config.copy_paths) if config.copy_paths else {}
|
|
1445
1446
|
existing_copy_paths = {h: g for h, g in all_copy_paths.items() if Path(h).exists()}
|
|
1446
1447
|
|
|
@@ -1451,29 +1452,29 @@ fi
|
|
|
1451
1452
|
mount_opts = "trans=virtio,version=9p2000.L,mmap,uid=1000,gid=1000"
|
|
1452
1453
|
|
|
1453
1454
|
# 1. Create temp mount point
|
|
1454
|
-
|
|
1455
|
+
import_mount_commands.append(f" - mkdir -p {temp_mount_point}")
|
|
1455
1456
|
|
|
1456
1457
|
# 2. Mount the 9p share
|
|
1457
|
-
|
|
1458
|
+
import_mount_commands.append(f" - mount -t 9p -o {mount_opts} {tag} {temp_mount_point} || true")
|
|
1458
1459
|
|
|
1459
1460
|
# 3. Ensure target directory exists and permissions are prepared
|
|
1460
1461
|
if str(guest_path).startswith("/home/ubuntu/"):
|
|
1461
|
-
|
|
1462
|
-
|
|
1462
|
+
import_mount_commands.append(f" - mkdir -p {guest_path}")
|
|
1463
|
+
import_mount_commands.append(f" - chown 1000:1000 {guest_path}")
|
|
1463
1464
|
else:
|
|
1464
|
-
|
|
1465
|
+
import_mount_commands.append(f" - mkdir -p {guest_path}")
|
|
1465
1466
|
|
|
1466
1467
|
# 4. Copy contents (cp -rT to copy contents of source to target)
|
|
1467
1468
|
# We use || true to ensure boot continues even if copy fails
|
|
1468
|
-
|
|
1469
|
-
|
|
1469
|
+
import_mount_commands.append(f" - echo 'Importing {host_path} to {guest_path}...'")
|
|
1470
|
+
import_mount_commands.append(f" - cp -rT {temp_mount_point} {guest_path} || true")
|
|
1470
1471
|
|
|
1471
1472
|
# 5. Fix ownership recursively
|
|
1472
|
-
|
|
1473
|
+
import_mount_commands.append(f" - chown -R 1000:1000 {guest_path}")
|
|
1473
1474
|
|
|
1474
1475
|
# 6. Unmount and cleanup
|
|
1475
|
-
|
|
1476
|
-
|
|
1476
|
+
import_mount_commands.append(f" - umount {temp_mount_point} || true")
|
|
1477
|
+
import_mount_commands.append(f" - rmdir {temp_mount_point} || true")
|
|
1477
1478
|
|
|
1478
1479
|
# User-data
|
|
1479
1480
|
# Add desktop environment if GUI is enabled
|
|
@@ -1532,14 +1533,21 @@ fi
|
|
|
1532
1533
|
runcmd_lines.append(" - echo ''")
|
|
1533
1534
|
|
|
1534
1535
|
# Phase 4: Filesystem mounts
|
|
1535
|
-
runcmd_lines.append(f" - echo '[4/9] 📁 Mounting shared directories ({len(
|
|
1536
|
+
runcmd_lines.append(f" - echo '[4/9] 📁 Mounting shared directories ({len(config.paths)} mounts)...'")
|
|
1537
|
+
if bind_mount_commands:
|
|
1538
|
+
for cmd in bind_mount_commands:
|
|
1539
|
+
if "mount -t 9p" in cmd:
|
|
1540
|
+
# Extract mount point for logging
|
|
1541
|
+
parts = cmd.split()
|
|
1542
|
+
mp = parts[-2] if len(parts) > 2 else "path"
|
|
1543
|
+
runcmd_lines.append(f" - echo ' → Mounting {mp}...'")
|
|
1544
|
+
runcmd_lines.append(cmd)
|
|
1545
|
+
|
|
1536
1546
|
if fstab_entries:
|
|
1537
1547
|
runcmd_lines.append(
|
|
1538
1548
|
" - grep -q '^# CloneBox 9p mounts' /etc/fstab || echo '# CloneBox 9p mounts' >> /etc/fstab"
|
|
1539
1549
|
)
|
|
1540
1550
|
for i, entry in enumerate(fstab_entries, 1):
|
|
1541
|
-
mount_point = entry.split()[1] if len(entry.split()) > 1 else entry
|
|
1542
|
-
runcmd_lines.append(f" - echo ' → [{i}/{len(fstab_entries)}] {mount_point}'")
|
|
1543
1551
|
runcmd_lines.append(
|
|
1544
1552
|
f" - grep -qF \"{entry}\" /etc/fstab || echo '{entry}' >> /etc/fstab"
|
|
1545
1553
|
)
|
|
@@ -1550,9 +1558,9 @@ fi
|
|
|
1550
1558
|
# Phase 5: Data Import (copied paths)
|
|
1551
1559
|
if existing_copy_paths:
|
|
1552
1560
|
runcmd_lines.append(f" - echo '[5/9] 📥 Importing data ({len(existing_copy_paths)} paths)...'")
|
|
1553
|
-
# Add
|
|
1561
|
+
# Add import commands with progress
|
|
1554
1562
|
import_count = 0
|
|
1555
|
-
for cmd in
|
|
1563
|
+
for cmd in import_mount_commands:
|
|
1556
1564
|
if "Importing" in cmd:
|
|
1557
1565
|
import_count += 1
|
|
1558
1566
|
runcmd_lines.append(cmd.replace("Importing", f" → [{import_count}/{len(existing_copy_paths)}] Importing"))
|
|
@@ -2,7 +2,7 @@ clonebox/__init__.py,sha256=CyfHVVq6KqBr4CNERBpXk_O6Q5B35q03YpdQbokVvvI,408
|
|
|
2
2
|
clonebox/__main__.py,sha256=Fcoyzwwyz5-eC_sBlQk5a5RbKx8uodQz5sKJ190U0NU,135
|
|
3
3
|
clonebox/audit.py,sha256=1W9vaIjB0A--_p7CgE3cIP5RNckJG1RxJrL-tOb-QmU,14298
|
|
4
4
|
clonebox/cli.py,sha256=k3q-JrzsiDcGPjhzHbm1jPKajxD2chYJxSGGftCbA20,178481
|
|
5
|
-
clonebox/cloner.py,sha256=
|
|
5
|
+
clonebox/cloner.py,sha256=HI6un0wukNwftO61m2jASbeJ8SiowCEpWMKMb5Qsd8c,107319
|
|
6
6
|
clonebox/container.py,sha256=tiYK1ZB-DhdD6A2FuMA0h_sRNkUI7KfYcJ0tFOcdyeM,6105
|
|
7
7
|
clonebox/dashboard.py,sha256=dMY6odvPq3j6FronhRRsX7aY3qdCwznB-aCWKEmHDNw,5768
|
|
8
8
|
clonebox/detector.py,sha256=vS65cvFNPmUBCX1Y_TMTnSRljw6r1Ae9dlVtACs5XFc,23075
|
|
@@ -40,9 +40,9 @@ clonebox/snapshots/manager.py,sha256=hGzM8V6ZJPXjTqj47c4Kr8idlE-c1Q3gPUvuw1HvS1A
|
|
|
40
40
|
clonebox/snapshots/models.py,sha256=sRnn3OZE8JG9FZJlRuA3ihO-JXoPCQ3nD3SQytflAao,6206
|
|
41
41
|
clonebox/templates/profiles/ml-dev.yaml,sha256=w07MToGh31xtxpjbeXTBk9BkpAN8A3gv8HeA3ESKG9M,461
|
|
42
42
|
clonebox/templates/profiles/web-stack.yaml,sha256=EBnnGMzML5vAjXmIUbCpbTCwmRaNJiuWd3EcL43DOK8,485
|
|
43
|
-
clonebox-1.1.
|
|
44
|
-
clonebox-1.1.
|
|
45
|
-
clonebox-1.1.
|
|
46
|
-
clonebox-1.1.
|
|
47
|
-
clonebox-1.1.
|
|
48
|
-
clonebox-1.1.
|
|
43
|
+
clonebox-1.1.17.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
44
|
+
clonebox-1.1.17.dist-info/METADATA,sha256=Ns1tp6tNWuGaJWdTEi0BE4MjR7XCmb2LU5n1OZYqeSw,49052
|
|
45
|
+
clonebox-1.1.17.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
46
|
+
clonebox-1.1.17.dist-info/entry_points.txt,sha256=FES95Vi3btfViLEEoHdb8nikNxTqzaooi9ehZw9ZfWI,47
|
|
47
|
+
clonebox-1.1.17.dist-info/top_level.txt,sha256=LdMo2cvCrEcRGH2M8JgQNVsCoszLV0xug6kx1JnaRjo,9
|
|
48
|
+
clonebox-1.1.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|