Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve file permissions in zap_download.py #30835

Merged

Conversation

ksperling-apple
Copy link
Contributor

This is a workaround for this very old Python bug: python/cpython#59999

Without this fix, zap-cli (and zap) don't end up executable after unpacking.

@ksperling-apple
Copy link
Contributor Author

Actually the zap app on Mac is still borked even with this fix because symlinks aren't extracted correctly either... But at least zap-cli works.

Copy link

github-actions bot commented Dec 6, 2023

PR #30835: Size comparison from 94ba5c6 to 1bc6a68

Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 94ba5c6 1bc6a68 change % change
bl602 lighting-app bl602 (read/write) 1413674 1413674 0 0.0
.bss 85352 85352 0 0.0
.data 9416 9416 0 0.0
.rodata 156912 156912 0 0.0
.text 1081346 1081346 0 0.0
bl602+mfd (read/write) 1428138 1428138 0 0.0
.bss 85520 85520 0 0.0
.data 9384 9384 0 0.0
.rodata 155872 155872 0 0.0
.text 1096710 1096710 0 0.0
bl602+rpc (read/write) 1461194 1461194 0 0.0
.bss 93384 93384 0 0.0
.data 9784 9784 0 0.0
.rodata 164528 164528 0 0.0
.text 1112834 1112834 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1178359 1178359 0 0.0
.bss 11197 11197 0 0.0
.data 3584 3584 0 0.0
.rodata 106284 106284 0 0.0
.text 950726 950726 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1189235 1189235 0 0.0
.bss 11373 11373 0 0.0
.data 3568 3568 0 0.0
.rodata 105224 105224 0 0.0
.text 962534 962534 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1270115 1270115 0 0.0
.bss 19677 19677 0 0.0
.data 4144 4144 0 0.0
.rodata 121704 121704 0 0.0
.text 1025532 1025532 0 0.0
bl706-eth (read/write) 998301 998301 0 0.0
.bss 23772 23772 0 0.0
.data 3160 3160 0 0.0
.rodata 99616 99616 0 0.0
.text 743938 743938 0 0.0
bl706-wifi (read/write) 1234714 1234714 0 0.0
.bss 10641 10641 0 0.0
.data 3600 3600 0 0.0
.rodata 120596 120596 0 0.0
.text 969510 969510 0 0.0
bl702l lighting-app bl702l (read only) 512 512 0 0.0
(read/write) 1148064 1148064 0 0.0
.bss 16392 16392 0 0.0
.data 4952 4952 0 0.0
.rodata 100288 100288 0 0.0
.text 943852 943852 0 0.0
bl702l+mfd (read only) 512 512 0 0.0
(read/write) 1159260 1159260 0 0.0
.bss 16568 16568 0 0.0
.data 4928 4928 0 0.0
.rodata 99228 99228 0 0.0
.text 955972 955972 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 742308 742308 0 0.0
(read/write) 167284 167284 0 0.0
.bss 89700 89700 0 0.0
.data 3420 3420 0 0.0
.rodata 84680 84680 0 0.0
.text 657236 657236 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 759492 759492 0 0.0
(read/write) 177512 177512 0 0.0
.bss 99876 99876 0 0.0
.data 3448 3448 0 0.0
.rodata 79744 79744 0 0.0
.text 679356 679356 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 746484 746484 0 0.0
(read/write) 171968 171968 0 0.0
.bss 94332 94332 0 0.0
.data 3448 3448 0 0.0
.rodata 105528 105528 0 0.0
.text 640568 640568 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 699972 699972 0 0.0
(read/write) 166288 166288 0 0.0
.bss 88480 88480 0 0.0
.data 3408 3408 0 0.0
.rodata 80456 80456 0 0.0
.text 619124 619124 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 685476 685476 0 0.0
(read/write) 166460 166460 0 0.0
.bss 88656 88656 0 0.0
.data 3404 3404 0 0.0
.rodata 76296 76296 0 0.0
.text 608788 608788 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 566762 566762 0 0.0
(read/write) 208052 208052 0 0.0
.bss 201516 201516 0 0.0
.data 1412 1412 0 0.0
.rodata 83938 83938 0 0.0
.text 480700 480700 0 0.0
lock CC3235SF_LAUNCHXL (read only) 620074 620074 0 0.0
(read/write) 208448 208448 0 0.0
.bss 201880 201880 0 0.0
.data 1448 1448 0 0.0
.rodata 105810 105810 0 0.0
.text 512140 512140 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 560887 560887 0 0.0
.app_xip_area 451009 451009 0 0.0
.bss 64792 64792 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 542991 542991 0 0.0
.app_xip_area 428377 428377 0 0.0
.bss 69488 69488 0 0.0
.data 700 700 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 561807 561807 0 0.0
.app_xip_area 453385 453385 0 0.0
.bss 63408 63408 0 0.0
.data 588 588 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 557055 557055 0 0.0
.app_xip_area 445409 445409 0 0.0
.bss 66528 66528 0 0.0
.data 696 696 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 1016180 1016180 0 0.0
.bss 172736 172736 0 0.0
.data 2688 2688 0 0.0
.text 840736 840736 0 0.0
BRD4187C (read/write) 1100588 1100588 0 0.0
.bss 196340 196340 0 0.0
.data 3296 3296 0 0.0
.text 900932 900932 0 0.0
lock-app BRD4161A+wf200 (read/write) 1114040 1114040 0 0.0
.bss 188872 188872 0 0.0
.data 2712 2712 0 0.0
.text 922436 922436 0 0.0
window-app BRD4187C (read/write) 1134800 1134800 0 0.0
.bss 168372 168372 0 0.0
.data 3168 3168 0 0.0
.text 963240 963240 0 0.0
esp32 all-clusters-app c3devkit (read only) 1135752 1135752 0 0.0
(read/write) 1670732 1670732 0 0.0
.dram0.bss 72704 72704 0 0.0
.dram0.data 12988 12988 0 0.0
.flash.rodata 241176 241176 0 0.0
.flash.text 1135752 1135752 0 0.0
.iram0.text 75694 75694 0 0.0
m5stack (read only) 1180867 1180867 0 0.0
(read/write) 519928 519928 0 0.0
.dram0.bss 79360 79360 0 0.0
.dram0.data 34004 34004 0 0.0
.flash.rodata 272200 272200 0 0.0
.flash.text 1175483 1175483 0 0.0
.iram0.text 123907 123907 0 0.0
k32w contact k32w0+release (read only) 594520 594520 0 0.0
(read/write) 88296 88296 0 0.0
.bss 71544 71544 0 0.0
.data 2128 2128 0 0.0
.text 593984 593984 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 690376 690376 0 0.0
.bss 67752 67752 0 0.0
.data 2716 2716 0 0.0
.text 576432 576432 0 0.0
light k32w0+release (read only) 594240 594240 0 0.0
(read/write) 87972 87972 0 0.0
.bss 71232 71232 0 0.0
.data 2116 2116 0 0.0
.text 593704 593704 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 782196 782196 0 0.0
.bss 77420 77420 0 0.0
.data 1928 1928 0 0.0
.text 659392 659392 0 0.0
lock k32w0+release (read only) 566008 566008 0 0.0
(read/write) 85768 85768 0 0.0
.bss 69088 69088 0 0.0
.data 2056 2056 0 0.0
.text 565472 565472 0 0.0
linux air-purifier-app debug (read only) 2524421 2524421 0 0.0
(read/write) 127240 127240 0 0.0
.bss 46944 46944 0 0.0
.data 1472 1472 0 0.0
.data.rel.ro 72840 72840 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 800 800 0 0.0
.rodata 179240 179240 0 0.0
.text 2169749 2169749 0 0.0
all-clusters-app debug (read only) 5361529 5361529 0 0.0
(read/write) 447680 447680 0 0.0
.bss 130064 130064 0 0.0
.data 3840 3840 0 0.0
.data.rel.ro 306552 306552 0 0.0
.dynamic 624 624 0 0.0
.got 5352 5352 0 0.0
.init 27 27 0 0.0
.init_array 1224 1224 0 0.0
.rodata 307964 307964 0 0.0
.text 4650131 4650131 0 0.0
all-clusters-minimal-app debug (read only) 4946649 4946649 0 0.0
(read/write) 234720 234720 0 0.0
.bss 127856 127856 0 0.0
.data 3776 3776 0 0.0
.data.rel.ro 95960 95960 0 0.0
.dynamic 624 624 0 0.0
.got 5312 5312 0 0.0
.init 27 27 0 0.0
.init_array 1160 1160 0 0.0
.rodata 272781 272781 0 0.0
.text 4441395 4441395 0 0.0
bridge-app debug (read only) 4414201 4414201 0 0.0
(read/write) 215960 215960 0 0.0
.bss 119224 119224 0 0.0
.data 4704 4704 0 0.0
.data.rel.ro 85296 85296 0 0.0
.dynamic 624 624 0 0.0
.got 5280 5280 0 0.0
.init 27 27 0 0.0
.init_array 824 824 0 0.0
.rodata 219125 219125 0 0.0
.text 3976451 3976451 0 0.0
chip-tool debug (read only) 11352361 11352361 0 0.0
(read/write) 492968 492968 0 0.0
.bss 94072 94072 0 0.0
.data 4994 4994 0 0.0
.data.rel.ro 386672 386672 0 0.0
.dynamic 624 624 0 0.0
.got 5784 5784 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 417353 417353 0 0.0
.text 10266915 10266915 0 0.0
chip-tool-ipv6only arm64 (read only) 11087896 11087896 0 0.0
(read/write) 558680 558680 0 0.0
.bss 103352 103352 0 0.0
.data 4280 4280 0 0.0
.data.rel.ro 425336 425336 0 0.0
.dynamic 512 512 0 0.0
.got 19560 19560 0 0.0
.init 24 24 0 0.0
.init_array 248 248 0 0.0
.rodata 340032 340032 0 0.0
.text 9902664 9902664 0 0.0
lighting-app debug+rpc+ui (read only) 5300225 5300225 0 0.0
(read/write) 225032 225032 0 0.0
.bss 119360 119360 0 0.0
.data 4416 4416 0 0.0
.data.rel.ro 93696 93696 0 0.0
.dynamic 672 672 0 0.0
.got 5896 5896 0 0.0
.init 27 27 0 0.0
.init_array 960 960 0 0.0
.rodata 340212 340212 0 0.0
.text 4715171 4715171 0 0.0
lock-app debug (read only) 4499849 4499849 0 0.0
(read/write) 203680 203680 0 0.0
.bss 113760 113760 0 0.0
.data 3648 3648 0 0.0
.data.rel.ro 79528 79528 0 0.0
.dynamic 624 624 0 0.0
.got 5232 5232 0 0.0
.init 27 27 0 0.0
.init_array 856 856 0 0.0
.rodata 247029 247029 0 0.0
.text 4042755 4042755 0 0.0
ota-provider-app debug (read only) 4163473 4163473 0 0.0
(read/write) 192760 192760 0 0.0
.bss 113632 113632 0 0.0
.data 3904 3904 0 0.0
.data.rel.ro 69312 69312 0 0.0
.dynamic 624 624 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 201301 201301 0 0.0
.text 3770243 3770243 0 0.0
ota-requestor-app debug (read only) 4249873 4249873 0 0.0
(read/write) 197008 197008 0 0.0
.bss 114656 114656 0 0.0
.data 4176 4176 0 0.0
.data.rel.ro 72272 72272 0 0.0
.dynamic 624 624 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 776 776 0 0.0
.rodata 205109 205109 0 0.0
.text 3848531 3848531 0 0.0
shell debug (read only) 2776625 2776625 0 0.0
(read/write) 149856 149856 0 0.0
.bss 60616 60616 0 0.0
.data 768 768 0 0.0
.data.rel.ro 82672 82672 0 0.0
.dynamic 592 592 0 0.0
.got 4104 4104 0 0.0
.init 27 27 0 0.0
.init_array 1072 1072 0 0.0
.rodata 180992 180992 0 0.0
.text 2424850 2424850 0 0.0
thermostat-no-ble arm64 (read only) 4401152 4401152 0 0.0
(read/write) 245264 245264 0 0.0
.bss 122232 122232 0 0.0
.data 2784 2784 0 0.0
.data.rel.ro 102368 102368 0 0.0
.dynamic 512 512 0 0.0
.got 12024 12024 0 0.0
.init 24 24 0 0.0
.init_array 424 424 0 0.0
.rodata 162332 162332 0 0.0
.text 3898360 3898360 0 0.0
tv-app debug (read only) 5361105 5361105 0 0.0
(read/write) 348544 348544 0 0.0
.bss 244192 244192 0 0.0
.data 4992 4992 0 0.0
.data.rel.ro 92056 92056 0 0.0
.dynamic 624 624 0 0.0
.got 5520 5520 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 272341 272341 0 0.0
.text 4851459 4851459 0 0.0
tv-casting-app debug (read only) 9285297 9285297 0 0.0
(read/write) 332632 332632 0 0.0
.bss 156192 156192 0 0.0
.data 2464 2464 0 0.0
.data.rel.ro 167128 167128 0 0.0
.dynamic 624 624 0 0.0
.got 5064 5064 0 0.0
.init 27 27 0 0.0
.init_array 1136 1136 0 0.0
.rodata 359976 359976 0 0.0
.text 8476515 8476515 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2525640 2525640 0 0.0
.bss 220616 220616 0 0.0
.data 5144 5144 0 0.0
.text 1488324 1488324 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1060724 1060724 0 0.0
bss 129197 129197 0 0.0
rodata 104196 104196 0 0.0
text 779700 779700 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1187284 1187284 0 0.0
bss 121407 121407 0 0.0
rodata 138320 138320 0 0.0
text 777240 777240 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1046316 1046316 0 0.0
bss 129484 129484 0 0.0
rodata 99452 99452 0 0.0
text 769752 769752 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 835792 835792 0 0.0
(read/write) 1741588 1741588 0 0.0
.bss 195076 195076 0 0.0
.data 2472 2472 0 0.0
.text 1535652 1535652 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 837512 837512 0 0.0
(read/write) 1705892 1705892 0 0.0
.bss 193356 193356 0 0.0
.data 2472 2472 0 0.0
.text 1501676 1501676 0 0.0
light cy8ckit_062s2_43012 (read only) 844200 844200 0 0.0
(read/write) 1630996 1630996 0 0.0
.bss 186780 186780 0 0.0
.data 2360 2360 0 0.0
.text 1433468 1433468 0 0.0
lock cy8ckit_062s2_43012 (read only) 817080 817080 0 0.0
(read/write) 1657940 1657940 0 0.0
.bss 213876 213876 0 0.0
.data 2384 2384 0 0.0
.text 1433292 1433292 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1116132 1116132 0 0.0
.bss 101368 101368 0 0.0
.data 740 740 0 0.0
.text 628508 628508 0 0.0
lock-app qpg6105+debug (read/write) 1079772 1079772 0 0.0
.bss 97584 97584 0 0.0
.data 784 784 0 0.0
.text 592152 592152 0 0.0
telink air-quality-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 820354 820354 0 0.0
bss 55152 55152 0 0.0
text 612776 612776 0 0.0
all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1077768 1077768 0 0.0
bss 100240 100240 0 0.0
text 760296 760296 0 0.0
all-clusters-minimal-app tlsr9528a (read only) 4 4 0 0.0
(read/write) 1083004 1083004 0 0.0
bss 109932 109932 0 0.0
text 752306 752306 0 0.0
bridge-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 934088 934088 0 0.0
bss 94440 94440 0 0.0
text 646160 646160 0 0.0
contact-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 820530 820530 0 0.0
bss 55196 55196 0 0.0
text 613070 613070 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a (read only) 4 4 0 0.0
(read/write) 977144 977144 0 0.0
bss 79180 79180 0 0.0
text 692694 692694 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1092056 1092056 0 0.0
bss 100004 100004 0 0.0
text 768696 768696 0 0.0
lock-app-dfu tlsr9528a (read only) 4 4 0 0.0
(read/write) 963844 963844 0 0.0
bss 97444 97444 0 0.0
text 646818 646818 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 947376 947376 0 0.0
bss 92548 92548 0 0.0
text 661902 661902 0 0.0
pump-app tlsr9528a (read only) 4 4 0 0.0
(read/write) 879268 879268 0 0.0
bss 69172 69172 0 0.0
text 621030 621030 0 0.0
pump-controller-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 819872 819872 0 0.0
bss 57408 57408 0 0.0
text 587906 587906 0 0.0
shell tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 705672 705672 0 0.0
bss 73724 73724 0 0.0
text 462004 462004 0 0.0
smoke_co_alarm-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 822230 822230 0 0.0
bss 55332 55332 0 0.0
text 615782 615782 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 876657 876657 0 0.0
bss 60884 60884 0 0.0
text 629334 629334 0 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 844084 844084 0 0.0
bss 57704 57704 0 0.0
text 606232 606232 0 0.0
window-covering tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 838576 838576 0 0.0
bss 58056 58056 0 0.0
text 600448 600448 0 0.0

@ksperling-apple ksperling-apple merged commit 28e2a43 into project-chip:master Dec 6, 2023
57 checks passed
@ksperling-apple ksperling-apple deleted the zap-download-chmod branch December 6, 2023 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants