Skip to content

Commit d6fbba6

Browse files
committed
Merge branch 'rightlib' into merge-libs-250408-0050
2 parents d39b14f + 624c103 commit d6fbba6

File tree

88 files changed

+1656
-443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1656
-443
lines changed

build/conf/java.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@ macro WITH_JDK() {
19281928
_OK=no
19291929
}
19301930
otherwise {
1931-
_PACK_JDK= && ${YMAKE_PYTHON3} ${input:"build/scripts/tar_directory.py"} --exclude "resource_info.json" --exclude "INSTALLED" --exclude "lnk" ${tared;output:"jdk.tar"} $WITH_JDK_RESOURCE $WITH_JDK_RESOURCE
1931+
_PACK_JDK= && ${YMAKE_PYTHON3} ${input:"build/scripts/tar_directory.py"} --tar-by-py --exclude "resource_info.json" --exclude "INSTALLED" --exclude "lnk" ${tared;output:"jdk.tar"} $WITH_JDK_RESOURCE $WITH_JDK_RESOURCE
19321932
WITH_JDK_VALUE=yes
19331933
}
19341934
ASSERT(_OK [[alt1]]jdk[[rst]] name is prohibited for [[imp]]JAVA_PROGRAM[[rst]] module when [[imp]]WITH_JDK[[rst]] is used, [[imp]]WITH_JDK[[rst]] will be ignored.)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"by_platform": {
33
"darwin": {
4-
"uri": "sbr:8188215274"
4+
"uri": "sbr:8457945767"
55
},
66
"darwin-arm64": {
7-
"uri": "sbr:8188212965"
7+
"uri": "sbr:8457944672"
88
},
99
"linux": {
10-
"uri": "sbr:8188211019"
10+
"uri": "sbr:8457943496"
1111
}
1212
}
1313
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"by_platform": {
33
"darwin": {
4-
"uri": "sbr:8188103297"
4+
"uri": "sbr:8457924152"
55
},
66
"darwin-arm64": {
7-
"uri": "sbr:8188100853"
7+
"uri": "sbr:8457922548"
88
},
99
"linux": {
10-
"uri": "sbr:8188098624"
10+
"uri": "sbr:8457919782"
1111
}
1212
}
1313
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"by_platform": {
33
"darwin": {
4-
"uri": "sbr:8383217030"
4+
"uri": "sbr:8440741812"
55
},
66
"darwin-arm64": {
7-
"uri": "sbr:8383215700"
7+
"uri": "sbr:8440740655"
88
},
99
"linux": {
10-
"uri": "sbr:8383219483"
10+
"uri": "sbr:8440743682"
1111
},
1212
"linux-aarch64": {
13-
"uri": "sbr:8383214378"
13+
"uri": "sbr:8440739614"
1414
},
1515
"win32": {
16-
"uri": "sbr:8383218300"
16+
"uri": "sbr:8440742993"
1717
}
1818
}
1919
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"by_platform": {
33
"darwin": {
4-
"uri": "sbr:8383201449"
4+
"uri": "sbr:8440734224"
55
},
66
"darwin-arm64": {
7-
"uri": "sbr:8383200356"
7+
"uri": "sbr:8440732809"
88
},
99
"linux": {
10-
"uri": "sbr:8383203472"
10+
"uri": "sbr:8440735823"
1111
},
1212
"linux-aarch64": {
13-
"uri": "sbr:8383199084"
13+
"uri": "sbr:8440731709"
1414
},
1515
"win32": {
16-
"uri": "sbr:8383202531"
16+
"uri": "sbr:8440735216"
1717
}
1818
}
1919
}

build/mapping.conf.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@
530530
"8307046461": "{registry_endpoint}/8307046461",
531531
"8317487990": "{registry_endpoint}/8317487990",
532532
"8330113388": "{registry_endpoint}/8330113388",
533+
"8444524403": "{registry_endpoint}/8444524403",
533534
"5486731632": "{registry_endpoint}/5486731632",
534535
"5514350352": "{registry_endpoint}/5514350352",
535536
"5514360398": "{registry_endpoint}/5514360398",
@@ -604,6 +605,8 @@
604605
"7588492076": "{registry_endpoint}/7588492076",
605606
"7688576117": "{registry_endpoint}/7688576117",
606607
"8188215274": "{registry_endpoint}/8188215274",
608+
"8450186648": "{registry_endpoint}/8450186648",
609+
"8457945767": "{registry_endpoint}/8457945767",
607610
"5811823398": "{registry_endpoint}/5811823398",
608611
"5840611310": "{registry_endpoint}/5840611310",
609612
"5860185593": "{registry_endpoint}/5860185593",
@@ -631,6 +634,8 @@
631634
"7588489645": "{registry_endpoint}/7588489645",
632635
"7688574511": "{registry_endpoint}/7688574511",
633636
"8188212965": "{registry_endpoint}/8188212965",
637+
"8450185847": "{registry_endpoint}/8450185847",
638+
"8457944672": "{registry_endpoint}/8457944672",
634639
"5811822876": "{registry_endpoint}/5811822876",
635640
"5840610640": "{registry_endpoint}/5840610640",
636641
"5860184285": "{registry_endpoint}/5860184285",
@@ -658,6 +663,8 @@
658663
"7588486683": "{registry_endpoint}/7588486683",
659664
"7688572842": "{registry_endpoint}/7688572842",
660665
"8188211019": "{registry_endpoint}/8188211019",
666+
"8450184998": "{registry_endpoint}/8450184998",
667+
"8457943496": "{registry_endpoint}/8457943496",
661668
"5766172292": "{registry_endpoint}/5766172292",
662669
"5805431504": "{registry_endpoint}/5805431504",
663670
"5829027626": "{registry_endpoint}/5829027626",
@@ -733,6 +740,7 @@
733740
"8326169329": "{registry_endpoint}/8326169329",
734741
"8350151492": "{registry_endpoint}/8350151492",
735742
"8383217030": "{registry_endpoint}/8383217030",
743+
"8440741812": "{registry_endpoint}/8440741812",
736744
"5766171800": "{registry_endpoint}/5766171800",
737745
"5805430761": "{registry_endpoint}/5805430761",
738746
"5829025456": "{registry_endpoint}/5829025456",
@@ -808,6 +816,7 @@
808816
"8326167937": "{registry_endpoint}/8326167937",
809817
"8350149418": "{registry_endpoint}/8350149418",
810818
"8383215700": "{registry_endpoint}/8383215700",
819+
"8440740655": "{registry_endpoint}/8440740655",
811820
"5766173070": "{registry_endpoint}/5766173070",
812821
"5805432830": "{registry_endpoint}/5805432830",
813822
"5829031598": "{registry_endpoint}/5829031598",
@@ -883,6 +892,7 @@
883892
"8326171209": "{registry_endpoint}/8326171209",
884893
"8350156616": "{registry_endpoint}/8350156616",
885894
"8383219483": "{registry_endpoint}/8383219483",
895+
"8440743682": "{registry_endpoint}/8440743682",
886896
"5766171341": "{registry_endpoint}/5766171341",
887897
"5805430188": "{registry_endpoint}/5805430188",
888898
"5829023352": "{registry_endpoint}/5829023352",
@@ -958,11 +968,13 @@
958968
"8326166988": "{registry_endpoint}/8326166988",
959969
"8350147184": "{registry_endpoint}/8350147184",
960970
"8383214378": "{registry_endpoint}/8383214378",
971+
"8440739614": "{registry_endpoint}/8440739614",
961972
"8270821739": "{registry_endpoint}/8270821739",
962973
"8295446553": "{registry_endpoint}/8295446553",
963974
"8326170338": "{registry_endpoint}/8326170338",
964975
"8350153953": "{registry_endpoint}/8350153953",
965976
"8383218300": "{registry_endpoint}/8383218300",
977+
"8440742993": "{registry_endpoint}/8440742993",
966978
"5766172695": "{registry_endpoint}/5766172695",
967979
"5805432230": "{registry_endpoint}/5805432230",
968980
"5829029743": "{registry_endpoint}/5829029743",
@@ -1328,6 +1340,7 @@
13281340
"7879860842": "{registry_endpoint}/7879860842",
13291341
"8367004015": "{registry_endpoint}/8367004015",
13301342
"8418036683": "{registry_endpoint}/8418036683",
1343+
"8435535653": "{registry_endpoint}/8435535653",
13311344
"2980468199": "{registry_endpoint}/2980468199",
13321345
"5562224408": "{registry_endpoint}/5562224408",
13331346
"7663495611": "{registry_endpoint}/7663495611"
@@ -1859,6 +1872,7 @@
18591872
"8307046461": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
18601873
"8317487990": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
18611874
"8330113388": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
1875+
"8444524403": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
18621876
"5486731632": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
18631877
"5514350352": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
18641878
"5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
@@ -1933,6 +1947,8 @@
19331947
"7588492076": "devtools/yexport/bin/yexport for darwin",
19341948
"7688576117": "devtools/yexport/bin/yexport for darwin",
19351949
"8188215274": "devtools/yexport/bin/yexport for darwin",
1950+
"8450186648": "devtools/yexport/bin/yexport for darwin",
1951+
"8457945767": "devtools/yexport/bin/yexport for darwin",
19361952
"5811823398": "devtools/yexport/bin/yexport for darwin-arm64",
19371953
"5840611310": "devtools/yexport/bin/yexport for darwin-arm64",
19381954
"5860185593": "devtools/yexport/bin/yexport for darwin-arm64",
@@ -1960,6 +1976,8 @@
19601976
"7588489645": "devtools/yexport/bin/yexport for darwin-arm64",
19611977
"7688574511": "devtools/yexport/bin/yexport for darwin-arm64",
19621978
"8188212965": "devtools/yexport/bin/yexport for darwin-arm64",
1979+
"8450185847": "devtools/yexport/bin/yexport for darwin-arm64",
1980+
"8457944672": "devtools/yexport/bin/yexport for darwin-arm64",
19631981
"5811822876": "devtools/yexport/bin/yexport for linux",
19641982
"5840610640": "devtools/yexport/bin/yexport for linux",
19651983
"5860184285": "devtools/yexport/bin/yexport for linux",
@@ -1987,6 +2005,8 @@
19872005
"7588486683": "devtools/yexport/bin/yexport for linux",
19882006
"7688572842": "devtools/yexport/bin/yexport for linux",
19892007
"8188211019": "devtools/yexport/bin/yexport for linux",
2008+
"8450184998": "devtools/yexport/bin/yexport for linux",
2009+
"8457943496": "devtools/yexport/bin/yexport for linux",
19902010
"5766172292": "devtools/ymake/bin/ymake for darwin",
19912011
"5805431504": "devtools/ymake/bin/ymake for darwin",
19922012
"5829027626": "devtools/ymake/bin/ymake for darwin",
@@ -2062,6 +2082,7 @@
20622082
"8326169329": "devtools/ymake/bin/ymake for darwin",
20632083
"8350151492": "devtools/ymake/bin/ymake for darwin",
20642084
"8383217030": "devtools/ymake/bin/ymake for darwin",
2085+
"8440741812": "devtools/ymake/bin/ymake for darwin",
20652086
"5766171800": "devtools/ymake/bin/ymake for darwin-arm64",
20662087
"5805430761": "devtools/ymake/bin/ymake for darwin-arm64",
20672088
"5829025456": "devtools/ymake/bin/ymake for darwin-arm64",
@@ -2137,6 +2158,7 @@
21372158
"8326167937": "devtools/ymake/bin/ymake for darwin-arm64",
21382159
"8350149418": "devtools/ymake/bin/ymake for darwin-arm64",
21392160
"8383215700": "devtools/ymake/bin/ymake for darwin-arm64",
2161+
"8440740655": "devtools/ymake/bin/ymake for darwin-arm64",
21402162
"5766173070": "devtools/ymake/bin/ymake for linux",
21412163
"5805432830": "devtools/ymake/bin/ymake for linux",
21422164
"5829031598": "devtools/ymake/bin/ymake for linux",
@@ -2212,6 +2234,7 @@
22122234
"8326171209": "devtools/ymake/bin/ymake for linux",
22132235
"8350156616": "devtools/ymake/bin/ymake for linux",
22142236
"8383219483": "devtools/ymake/bin/ymake for linux",
2237+
"8440743682": "devtools/ymake/bin/ymake for linux",
22152238
"5766171341": "devtools/ymake/bin/ymake for linux-aarch64",
22162239
"5805430188": "devtools/ymake/bin/ymake for linux-aarch64",
22172240
"5829023352": "devtools/ymake/bin/ymake for linux-aarch64",
@@ -2287,11 +2310,13 @@
22872310
"8326166988": "devtools/ymake/bin/ymake for linux-aarch64",
22882311
"8350147184": "devtools/ymake/bin/ymake for linux-aarch64",
22892312
"8383214378": "devtools/ymake/bin/ymake for linux-aarch64",
2313+
"8440739614": "devtools/ymake/bin/ymake for linux-aarch64",
22902314
"8270821739": "devtools/ymake/bin/ymake for win32",
22912315
"8295446553": "devtools/ymake/bin/ymake for win32",
22922316
"8326170338": "devtools/ymake/bin/ymake for win32",
22932317
"8350153953": "devtools/ymake/bin/ymake for win32",
22942318
"8383218300": "devtools/ymake/bin/ymake for win32",
2319+
"8440742993": "devtools/ymake/bin/ymake for win32",
22952320
"5766172695": "devtools/ymake/bin/ymake for win32-clang-cl",
22962321
"5805432230": "devtools/ymake/bin/ymake for win32-clang-cl",
22972322
"5829029743": "devtools/ymake/bin/ymake for win32-clang-cl",
@@ -2657,6 +2682,7 @@
26572682
"7879860842": "yt/go/ytrecipe/cmd/ytexec for linux",
26582683
"8367004015": "yt/go/ytrecipe/cmd/ytexec for linux",
26592684
"8418036683": "yt/go/ytrecipe/cmd/ytexec for linux",
2685+
"8435535653": "yt/go/ytrecipe/cmd/ytexec for linux",
26602686
"2980468199": "ytexec for linux",
26612687
"5562224408": "ytexec for linux",
26622688
"7663495611": "ytexec for linux"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
2-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330137579)
2+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444533975)
33
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
4-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330136361)
4+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444533039)
55
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
6-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330139159)
6+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444535565)
77
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
8-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330135427)
8+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444532385)
99
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
10-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330138204)
10+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444534653)
1111

1212
ENDIF()
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
2-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330112159)
2+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444523542)
33
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
4-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330111405)
4+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444522906)
55
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
6-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330113388)
6+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444524403)
77
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
8-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330110605)
8+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444522360)
99
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
10-
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8330112806)
10+
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:8444524083)
1111

1212
ENDIF()

build/scripts/tar_directory.py

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@
22
import argparse
33
import tarfile
44
import subprocess
5+
import stat
56

67

7-
def is_exe(fpath):
8+
def is_exe(fpath: str) -> bool:
89
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
910

1011

1112
def _usage() -> str:
1213
return "\n".join(
1314
[
1415
"Usage:",
15-
f"`tar_directory.py archive.tar directory [skip prefix] [--exclude fileOrDir0 ... --exclude fileOrDirN]`",
16+
f"`tar_directory.py [--tar-by-py] [--exclude fileOrDir0 ... --exclude fileOrDirN] archive.tar directory [skip prefix]`",
1617
"or",
17-
f"`tar_directory.py archive.tar output_directory --extract`",
18+
f"`tar_directory.py [--tar-by-py] --extract archive.tar output_directory`",
1819
]
1920
)
2021

2122

2223
def main():
2324
parser = argparse.ArgumentParser(description='Make or extract tar archive')
2425
parser.add_argument('--extract', action="store_true", default=False, help="Extract archive")
26+
parser.add_argument('--tar-by-py', action="store_true", default=False, help="Force use taring by python")
2527
parser.add_argument(
2628
'--exclude', type=str, action='append', default=[], help="Exclude for create archive (can use multiply times)"
2729
)
@@ -42,14 +44,16 @@ def main():
4244
directory = args.directory
4345
prefix = args.prefix
4446

45-
for tar_exe in ('/usr/bin/tar', '/bin/tar'):
47+
if args.extract:
48+
dest = os.path.abspath(directory)
49+
if not os.path.exists(dest):
50+
os.makedirs(dest)
51+
52+
for tar_exe in ('/usr/bin/tar', '/bin/tar') if not args.tar_by_py else []:
4653
if not is_exe(tar_exe):
4754
continue
4855
if args.extract:
49-
dest = os.path.abspath(directory)
50-
if not os.path.exists(dest):
51-
os.makedirs(dest)
52-
os.execv(tar_exe, [tar_exe, '-xf', tar, '-C', dest])
56+
command = [tar_exe, '-xf', tar, '-C', dest]
5357
else:
5458
source = os.path.relpath(directory, prefix) if prefix else directory
5559
command = (
@@ -59,29 +63,39 @@ def main():
5963
+ (['-C', prefix] if prefix else [])
6064
+ [source]
6165
)
62-
subprocess.run(command, check=True)
66+
subprocess.run(command, check=True)
6367
break
6468
else:
6569
if args.extract:
66-
dest = os.path.abspath(directory)
67-
if not os.path.exists(dest):
68-
os.makedirs(dest)
6970
with tarfile.open(tar, 'r') as tar_file:
7071
tar_file.extractall(dest)
7172
else:
7273
source = directory
7374
with tarfile.open(tar, 'w') as out:
7475

75-
def filter(tarinfo):
76-
for exclude in args.exclude:
77-
if tarinfo.name.endswith(exclude):
78-
return None
76+
def filter(tarinfo: tarfile.TarInfo):
77+
if args.exclude:
78+
for exclude in args.exclude:
79+
if tarinfo.name.endswith(exclude):
80+
return None
81+
tarinfo.mode = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH if tarinfo.mode | stat.S_IXUSR else 0
82+
tarinfo.mode = (
83+
tarinfo.mode | stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IROTH
84+
)
85+
# Set mtime to 1970-01-01 00:00:01, else if mtime == 0
86+
# it not used here https://a.yandex-team.ru/arcadia/contrib/python/python-libarchive/py3/libarchive/__init__.py#L355
87+
# But mtime != 0 also ignored by libarchive too :((
88+
tarinfo.mtime = 1
89+
tarinfo.uid = 0
90+
tarinfo.gid = 0
91+
tarinfo.uname = 'dummy'
92+
tarinfo.gname = 'dummy'
7993
return tarinfo
8094

8195
out.add(
8296
os.path.abspath(source),
8397
arcname=os.path.relpath(source, prefix) if prefix else source,
84-
filter=filter if args.exclude else None,
98+
filter=filter,
8599
)
86100

87101

0 commit comments

Comments
 (0)