summaryrefslogtreecommitdiff
path: root/openEuler-rpm-config.spec
blob: 938d5eb3ff445b702e161b7dca8a5ec7324118b3 (plain)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
%global vendor %{?_vendor:%{_vendor}}%{!?_vendor:openEuler}
%global rpmvdir /usr/lib/rpm/%{vendor}

Name:		%{vendor}-rpm-config
Version:	30
Release:	59
License:	GPL+
Summary:	specific rpm configuration files
URL:		https://gitee.com/openeuler/openEuler-rpm-config

Source0:        https://gitee.com/openeuler/openEuler-rpm-config/repository/archive/%{version}.tar.gz

Patch0:         fix-error-message-for-kmodtool.patch
Patch1:         0001-1-Add-riscv64-to-golang_arches.patch
Patch2:         Fix-a-typo-in-brp-digest-list.patch
Patch3:         change-the-vendor-to-generic-for-common-use.patch
Patch4:         remove-fexceptions.patch
Patch5:         exclude-kernel-source-and-EFI-files-in-digest-list-building.patch
Patch6:         add-brp-scripts-to-delete-rpath.patch
Patch7:         add-common-script.patch
Patch8:         Fix-python3_version-macros-for-Python-3.10.patch
Patch9:         Give-a-warning-when-using-kabi-outside-our-stablelis.patch
Patch10:        fixed-a-bug-that-missing_-p-in-macros.kmp.patch
Patch11:        update-config.guess-and-config.sub-for-loongarch64.patch
Patch12:        add-loongarch64-to-generic_arches.patch
Patch13:	add-loongarch64-support-for-config.guess-and-config.sub.patch
Patch14:        backport-kmp-feature.patch
Patch15:	0001-add-loongarch64-for-golang_arches.patch
Patch16:	fix-config-error-for-loongarch64.patch
Patch17:	Feature-support-EBS-sign-for-IMA-digest-list.patch
Patch18:        fix-brp-ldconfig-riscv-default-library-directory.patch
Patch19:        add-pyproject-macros.patch
Patch20:        add-pytest-and-tox-macros.patch
Patch21:        check-if-the-file-is-a-symbolic-link-in-brp-digest-list.patch
Patch22:	fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch
Patch23:	add-powerpc64le-and-ppc64le-support.patch
Patch24:	Delete-the-commented-code.patch
Patch25:	Add-support-for-selecting-clang-as-a-toolchain.patch
Patch26:	Call-set_build_flags-cc-before-build-check-and-insta.patch
Patch27:	openEuler-rpm-config-add-optflags-for-loongarch64-and-sw_64.patch
Patch28:	add-riscv64-to-some-arches-macro.patch
Patch29:	backport-Enable-as-needed-by-default.patch
Patch30:	0001-Enable-LTO-By-Default.patch

Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: python3-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: python-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: fpc-srpm-macros = 1.1-6
Provides: ghc-srpm-macros = 1.4.2-8
Provides: gnat-srpm-macros = 4-6
Provides: nim-srpm-macros = 1-3
Provides: ocaml-srpm-macros = 5-4
Provides: openblas-srpm-macros = 2-4
Provides: perl-srpm-macros = 1-28
Provides: rust-srpm-macros = 10-1
Provides: go-srpm-macros = 2-18
Provides: perl-macros = 4:5.32.0-1
Obsoletes: perl-macros <= 4:5.32.0-1
Obsoletes: python-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: python2-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: python3-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: python-srpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: fpc-srpm-macros <= 1.1-6
Obsoletes: ghc-srpm-macros <= 1.4.2-8
Obsoletes: gnat-srpm-macros <= 4-6
Obsoletes: nim-srpm-macros <= 1-3
Obsoletes: ocaml-srpm-macros <= 5-4
Obsoletes: openblas-srpm-macros <= 2-4
Obsoletes: perl-srpm-macros <= 1-28
Obsoletes: rust-srpm-macros <= 10-1
Obsoletes: go-srpm-macros <= 2-18

%if "%{vendor}" != "openEuler"
Provides: openEuler-rpm-config = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: openEuler-rpm-config <= %{?epoch:%{epoch}:}%{version}-%{release}
%endif

Requires: efi-srpm-macros
Requires: qt5-srpm-macros

Requires: rpm >= 4.11.0
Requires: zip
Requires: curl
#Requires: (annobin if gcc)

# for brp-mangle-shebangs
Requires: %{_bindir}/find
Requires: %{_bindir}/file
Requires: %{_bindir}/grep
Requires: %{_bindir}/sed
Requires: %{_bindir}/xargs

%if "%{_arch}" == "riscv64"
Requires: coreutils
%endif

# -fstack-clash-protection and -fcf-protection require GCC 8.
Conflicts: gcc < 7

Provides: system-rpm-config = %{version}-%{release}

%description
specific rpm configuration files for %{vendor}.

%package -n kernel-rpm-macros
Summary: Macros and scripts for building kernel module packages

%description -n kernel-rpm-macros
Macros and scripts for building kernel module packages.

%prep
%autosetup -n openEuler-rpm-config -p1

%install
mkdir -p %{buildroot}%{rpmvdir}
install -p -m 644 -t %{buildroot}%{rpmvdir} macros rpmrc lto_white_list
install -p -m 755 -t %{buildroot}%{rpmvdir} lto_flag
install -p -m 755 -t %{buildroot}%{rpmvdir} config.*
install -p -m 755 -t %{buildroot}%{_rpmconfigdir} brp-*
install -p -m 644 -t %{buildroot}%{_rpmconfigdir} generic-*
install -p -m 755 -t %{buildroot}%{rpmvdir} kmodtool
install -p -m 755 -t %{buildroot}%{rpmvdir} find-requires*

mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d/ macros.perl macros.python macros.go macros.forge macros.kmp

mkdir -p %{buildroot}%{_fileattrsdir}

mkdir -p %{buildroot}%{_rpmluadir}/%{_vendor}/{rpm,srpm}
install -p -m 644 -t %{buildroot}%{_rpmluadir}/%{_vendor} common.lua

# Adaptive according to vendor
sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir}`

%files
%dir %{rpmvdir}
%{rpmvdir}/macros
%{rpmvdir}/rpmrc
%{rpmvdir}/lto_flag
%{rpmvdir}/lto_white_list
%{_rpmconfigdir}/brp-*
%{rpmvdir}/config.*
%{_rpmconfigdir}/generic-*
%{_fileattrsdir}/
%{_rpmconfigdir}/macros.d/
%{_rpmluadir}/%{_vendor}/*.lua
%exclude %{_rpmconfigdir}/macros.d/macros.kmp

%files -n kernel-rpm-macros
%exclude %{_prefix}/lib/rpm/*/__pycache__/*
%{rpmvdir}/kmodtool
%{_rpmconfigdir}/macros.d/macros.kmp
%{rpmvdir}/find-requires
%{rpmvdir}/find-requires.ksyms

%changelog
* Wed Aug 21 2024 wangchunyang <wangchunyang15@huawei.com> - 30-59
- Enable LTO By Default

* Tue Aug 6 2024 liyunfei <liyunfei33@huawei.com> - 30-58
- Fix for "%undefine _auto_set_build_XX" usage

* Wed Jul 10 2024 xujing <xujing125@huawei.com> - 30-57
- enable --as-needed by default

* Mon Apr 29 2024 xujing <xujing125@huawei.com> - 30-56
- don't delete the commented code in macros

* Sun Apr 28 2024 laokz <zhangkai@iscas.ac.cn> - 30-55
- add riscv64 to some arches macro

* Sun Apr 7 2024 zhangguangzhi <zhangguangzhi3@huawei.com> - 30-54
- ima digest list ebs sign ret 2 when errmsg is SIGN_PERMISSION_DENIED

* Fri Mar 29 2024 zhangguangzhi <zhangguangzhi3@huawei.com> - 30-53
- ima digest list ebs sign use file path and check errmsg

* Fri Mar 22 2024 zhangguangzhi <zhangguangzhi3@huawei.com> - 30-52
- ima digest list ebs sign support modsig

* Fri Mar 15 2024 yueyuankun <yueyuankun@kylinos.cn> - 30-51
- Add optflags for loongarch64 and sw_64

* Tue Mar 12 2024 liyunfei <liyunfei33@huawei.com> - 30-50
- Add clang toolchain support

* Tue Mar 5 2024 hongjinghao <hongjinghao@huawei.com> - 30-49
- Delete the commented code

* Tue Feb 20 2024 peng.zou <peng.zou@shingroup.cn> - 30-48
- add powerpc64le to generic_arches

* Mon Dec 11 2023 jiahua.yu <jiahua.yu@shingroup.cn> - 30-47
- Init support for arch ppc64le

* Wed Nov 22 2023 xujing <xujing125@huawei.com> - 30-46
- add the scanning path of the rpath
  fix the ELF file cannot be found due to escape of '\'
  excute brp_chrpath before arch_install_post

* Fri Nov 03 2023 fuanan <fuanan3@h-partners.com> - 30-45
- check if the file is a symbolic link in brp-digest-list

* Thu Nov 2 2023 Yang Yanchao <yangyanchao6@huawei.com> - 30-44
- kmodtool: use tmp.$$ instand of tmp.txt

* Mon Aug 28 2023 liyunfei <liyunfei33@huawei.com> - 30-43
- Revert backport toolchain selecting and %%auto_set_build_flags patches

* Thu Aug 17 2023 liyunfei <liyunfei33@huawei.com> - 30-42
- Backport Call %%set_build_flags before %%build, %%check, and %%install stages

* Thu Aug 17 2023 liyunfei <liyunfei33@huawei.com> - 30-41
- Backport Add support for selecting a clang as a tool

* Mon Jul 24 2023 Dongxing Wang <dxwangk@isoftstone.com> - 30-40
- add pytest and tox macros

* Thu May 11 2023 caodongxia <caodongxia@h-partners.com> - 30-39
- improve pyproject_install macro

* Thu Apr 20 2023 caodongxia <caodongxia@h-partners.com> - 30-38
- support pyproject compilation

* Fri Mar 24 2023 laokz <zhangkai@iscas.ac.cn> - 30-37
- fix riscv64 default library directory of brp-ldconfig

* Fri Mar 17 2023 Xinliang Liu <xinliang.liu@linaro.org> - 30-36
- Fix kmod rpm install failed.

* Sat Jan 14 2023 luhuaxin <luhuaxin1@huawei.com> - 30-35
- support EBS sign

* Wed Dec 14 2022 huajingyun <huajingyun@loongson.cn> - 30-34
- fix config error for loongarch64

* Tue Dec 13 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 30-33
- add loongarch64 for golang_arches

* Wed Dec 7 2022 yangmingtai <yangmingtai@huawei.com> - 30-32
- fix latest_kernel macro

* Wed Dec 7 2022 Yang Yanchao <yangyanchao6@huawei.com> - 30-31
- backport kmp feature

* Wed Nov 30 2022 yangmingtai <yangmingtai@huawei.com> - 30-30
- support Adaptive according to vendor

* Mon Nov 21 2022 huajingyun <huajingyun@loongson.cn> - 30-29
- add loongarch64 support

* Wed Oct 12 2022 yangmingtai <yangmingtai@huawei.com> - 30-28
- macro.kmp support -p preamble

* Thu Sep  8 2022 yangmingtai <yangmingtai@huawei.com> - 30-27
- add find-requires and find-requires.ksyms

* Mon Jun 13 2022 yangmingtai <yangmingtai@huawei.com> - 30-26
- fix build failed, bare words are no longer supported

* Mon Dec 13 2021 Liu Zixian <liuzixian4@huawei.com> - 30-25
- fix python macros

* Fri Nov 26 2021 shixuantong <shixuantong@huawei.com> - 30-24
- update the definition of python3_version

* Wed Oct 13 2021 wangkerong <wangkerong@huawei.com> - 30-23
- add common lua scripts resolve "%fontpkg" macro translation failure 

* Sat Sep 4 2021 yangmingtai <yangmingtai@huawei.com> - 30-22
- add brp scripts to delete rpath

* Thu Apr 8 2021 Anakin Zhang <benjamin93@163.com> - 30-21
- exclude kernel source and EFI files in digest list building

* Mon Mar 29 2021 shenyangyang <shenyangyang4@huawei.com> - 30-20
- Patched missing patch that remove fexceptions

* Thu Mar 25 2021 shenyangyang <shenyangyang4@huawei.com> - 30-19
- Modify support for change vendor with better method

* Thu Mar 18 2021 shenyangyang <shenyangyang4@huawei.com> - 30-18
- Change the name of spec to openEuler-rpm-spec and fix few bugs

* Thu Mar 11 2021 shenyangyang <shenyangyang4@huawei.com> - 30-17
- Add for support for change vendor

* Tue Dec 1 2020 whoisxxx <zhangxuzhou4@huawei.com> - 30-16
- Add riscv64 in macros.go

* Wed Sep 30 2020 shenyangyang <shenyangyang4@huawei.com> - 30-15
- Change the source code to tar

* Fri Aug 21 2020 Wang Shuo <wangshuo_1994@foxmail.com> - 30-14
- fix error message for kmodtool

* Thu Aug 13 2020 shenyangyang <shenyangyang4@huawei.com> - 30-13
- Add provides of perl-macros

* Thu Aug 6 2020 tianwei <tianwei12@huawei.com> - 30-12
- delete strip-file-prefix

* Mon Aug 3 2020 Anakin Zhang <benjamin93@163.com> - 30-12
- add brp-digest-list

* Fri Jun 19 2020 zhangliuyan <zhangliuyan@huawei.com> - 30-11
- add kmodtool.py macros.kmp

* Wed May 6 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-10
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: disable buildid link macro

* Tue Feb 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-9
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:modify python_provide macro from python2 to python3

* Sun Jan 19 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-8
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:revise vendor in macro

* Sun Jan 19 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-7
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:revise macro file

* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-6
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update macros file

* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:add macros to macros.python

* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update macros.python

* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-3
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:change type of files

* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:add source10 to package

* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 30-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:rebuild

* Thu Dec 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 29-20
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:delete unneeded provides

* Wed Nov 27 2019 fanghuiyu<fanghuiyu@huwei.com> - 29-19
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:change to generic-rpm-config

* Fri Nov 15 2019 jiangchuangang<jiangchuangang@huwei.com> - 29-18
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: remove fcf-protection for x86_64 from rpmrc

* Wed Oct 30 2019 hexiaowen <hexiaowen@huawei.com> - 29-17
- add custom macros

* Wed Sep 25 2019 hexiaowen <hexiaowen@huawei.com> - 29-16
- add rust-srpm-macros and go-srpm-macros

* Fri Sep 20 2019 hexiaowen <hexiaowen@huawei.com> - 29-15
- add version-release for python-rpm-macros

* Fri Sep 20 2019 hexiaowen <hexiaowen@huawei.com> - 29-14
- add python-rpm-macros fpc-srpm-macros ghc-srpm-macros gnat-srpm-macros
- nim-srpm-macros ocaml-srpm-macros openblas-srpm-macros perl-srpm-macros

* Thu Aug 29 2019 hexiaowen <hexiaowen@huawei.com> - 29-13
- fix typo

* Tue Aug 27 2019 hexiaowen <hexiaowen@huawei.com> - 29-2
- delete annobin

* Wed Jul 18 2018 openEuler Buildteam <buildteam@openeuler.org> - 29-1
- Package init