1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
Name: UNT
Version: 1.0
Release: 26
Summary: UDF native tool
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/UNT.git
Source0: %{name}-v%{version}.tar.gz
Source1: maven.tgz.part.aa
Source2: maven.tgz.part.ab
BuildRequires: maven
BuildArch: noarch
%{!?maven_mirror_url: %global maven_mirror_url https://mirrors.huaweicloud.com/repository/maven/}
%description
UDF native tool can convert java code to native code,
and then compile native code to native binary.
%prep
%setup -q -n %{name}
cat %{SOURCE1} %{SOURCE2} > %{_builddir}/maven-repo.tgz
mkdir -p %{_builddir}/.m2/repository
tar -zxf %{_builddir}/maven-repo.tgz -C %{_builddir}/.m2/repository
%build
cat > %{_builddir}/settings.xml << EOF
<settings>
<localRepository>%{_builddir}/.m2/repository</localRepository>
<activeProfiles>
<activeProfile>custom-repo</activeProfile>
</activeProfiles>
</settings>
EOF
mvn -s %{_builddir}/settings.xml package -DskipTests
%install
mkdir -p %{buildroot}/opt/udf-trans-opt/
mkdir -p %{buildroot}/usr/bin
tar -zxf %_builddir/%{name}/unt-translator/target/unt-translator-1.0-bin.tar.gz -C %{buildroot}/opt/udf-trans-opt/
install -m 0640 %_builddir/%{name}/unt-scanner/target/unt-scanner-1.0-bin.jar %{buildroot}/opt/udf-trans-opt/
install -m 0550 %_builddir/%{name}/script/native_udf.py %{buildroot}/usr/bin
%clean
rm -rf %{buildroot}
%postun
rm -rf /opt/udf-trans-opt/udf-translator
rm -rf /opt/udf-trans-opt/unt-scanner-1.0-bin.jar
rm -rf /usr/bin/native_udf.py
%files
%defattr(-,root,root)
%attr(0640,root,root) /opt/udf-trans-opt/udf-translator/*
%attr(0640,root,root) /opt/udf-trans-opt/unt-scanner-1.0-bin.jar
%attr(0550,root,root) /usr/bin/native_udf.py
%changelog
* Mon Nov 24 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-26
- fix: slightly relax constraints
* Mon Nov 24 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-25
- revert: all checker
* Mon Nov 24 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-24
- fix: annotation support
* Fri Nov 21 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-23
- fix: try-catch clause
* Fri Nov 21 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-22
- fix: try-finally clause
* Fri Nov 21 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-21
- fix: cdra, npe
* Fri Nov 21 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-20
- fix: gc, npe
* Thu Nov 20 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-19
- fix: String.split translator module
* Thu Nov 20 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-18
- feat: add String.split check switch
* Thu Nov 20 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-17
- fix: String.split regex support
* Wed Nov 19 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-16
- fix: String.split checker support
* Wed Nov 19 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-15
- support: catch clause & cyclic type check
* Wed Nov 12 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-14
- support: String.split, garbage collection (simple) check
* Wed Nov 5 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-13
- fix split op
* Mon Oct 13 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-12
- fix array index op
* Fri Sep 19 2025 Cutie Deng <dengzhiren2@huawei.com> - 1.0-11
- add offline maven repo
* Tue Sep 9 2025 liuchang <liuchang291@h-partners.com> - 1.0-10
- fix dynamic invoke handle's process for caller and params
* Wed Aug 27 2025 yuyufeng <yuyufeng1@huawei.com> - 1.0-9
- add kaccjson macro for annotation and config json serialize
* Wed Aug 20 2025 yuyufeng <yuyufeng1@huawei.com> - 1.0-8
- limited support for field reflection and dynamic invoke
* Mon Jun 16 2025 liuchang <liuchang291@h-partners.com> - 1.0-7
- fix array to enhance performance and ut of array init to current version
* Thu Jun 12 2025 yuyufeng <yuyufeng1@huawei.com> - 1.0-6
- fix native_udf.py bug, add support for primitive type Array and add ut
* Sat May 31 2025 yuyufeng <yuyufeng1@huawei.com> - 1.0-5
- add exception throw when translator fail and fix ignoreMethod expection bug
* Wed May 28 2025 yuyufeng <yuyufeng1@huawei.com> - 1.0-4
- clean code and improve string interface
* Thu May 22 2025 yuyufeng <yuyufeng1@huawei.com> - 1.0-3
- improve %postun files remove
* Thu May 22 2025 yuyufeng <yuyufeng1@huawei.com> - 1.0-2
- add test and change log path
* Tue May 20 2025 hejingxian <hejingxian@huawei.com> - 1.0-1
- package init
|