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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
|
%global _empty_manifest_terminate_build 0
Name: python-auditree-arboretum
Version: 0.17.0
Release: 1
Summary: The Auditree common fetchers, checks and harvest reports library
License: Apache License 2.0
URL: https://auditree.github.io/
Source0: https://mirrors.aliyun.com/pypi/web/packages/50/92/7446ec26c3bed0085cd985552eab8c4652eb347d75b1be3da6f197ee08b3/auditree-arboretum-0.17.0.tar.gz
BuildArch: noarch
Requires: python3-auditree-framework
Requires: python3-auditree-harvest
Requires: python3-pyyaml
Requires: python3-defusedxml
Requires: python3-parameterized
Requires: python3-pytest
Requires: python3-pytest-cov
Requires: python3-bandit
Requires: python3-pre-commit
Requires: python3-Sphinx
Requires: python3-setuptools
Requires: python3-wheel
Requires: python3-twine
%description
[![OS Compatibility][platform-badge]](#prerequisites)
[![Python Compatibility][python-badge]][python-dl]
[![pre-commit][pre-commit-badge]][pre-commit]
[][lint-test]
[][pypi-upload]
# auditree-arboretum
The Auditree common fetchers, checks and [harvest][] reports library.
## Introduction
Auditree Arboretum is a Python library of common compliance fetchers, checks & harvest
reports built upon the [Auditree compliance automation framework][auditree-framework].
## Repo content
### Functionality categorization
Arboretum fetchers, checks, and Harvest reports are organized into functional
grouping categories. The following categories have either been contributed to
or will be contributed to in the near future. We anticipate that this list will
grow as arboretum matures.
- [Ansible](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/ansible)
- [Auditree](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/auditree)
- [Chef](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/chef)
- [IBM Cloud](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/ibm_cloud)
- [Kubernetes](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/kubernetes)
- [Object Storage](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/object_storage)
- [Pager Duty](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/pager_duty)
- [Splunk](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/splunk)
### Fetchers
Please read the framework documentation for [fetcher design principles][] before
contributing a fetcher.
Fetchers must apply no logic to the data they retrieve. They must write unadulterated
(modulo sorting & de-duplication) into the `/raw` area of the locker via the
framework-provided decorators or context managers.
Fetchers must be atomic - retrieving and creating the data they are responsible
for. Fetcher execution order is not guaranteed and so you must not assume that
evidence already exists and is current in the locker. Use
[evidence dependency chaining][] if a fetcher depends on evidence gathered by another
fetcher in order to gather its intended evidence.
Fetchers should be as fast as the API call allows. If a call is long running it
should be separated into a dedicated evidence providing tool, which places data
where a fetcher can retrieve it easily & quickly.
### Checks
Please read the framework documentation for [check design principles][] before
contributing a check.
Checks should only use evidence from the evidence locker to perform check operations.
Also, checks **should not** write or change evidence from the evidence locker. That
is the job of a fetcher.
[Jinja][] is used to produce reports from checks. As such each check class must have
at least one associated report template in order to produce a check report. In keeping
with the "DevSecOps" theme, check reports are meant to provide details on violations
identified by checks. These violations are in the form of failures and warnings.
**They aren't meant to be used to format fetched raw evidence into a readable report.**
[Harvest][harvest] reports should be used to satisfy that need.
### Harvest Reports
Harvest reports are hosted with the fetchers/checks that collect the evidence for
the reports process. Within `auditree-arboretum` this means the harvest report code
lives in `reports` folders throughout this repository. For more details check out
[harvest report development][harvest-rpt-dev] in the [harvest][harvest] README.
## Usage
`arboretum` is available for download from [PyPI](https://pypi.org/project/auditree-arboretum/).
### Prerequisites
- Supported for execution on OSX and LINUX.
- Supported for execution with Python 3.6 and above.
### Integration
Follow these steps to integrate auditree-arboretum fetchers and checks into your project:
* Add this `auditree-arboretum` package as a dependency in your Python project.
* The following steps can be taken to import individual arboretum fetchers and checks.
* For a fetcher, add a `fetch_<category>_common.py` module, if one does not already
exist, in your project's `fetchers` path where the `<category>` is
the respective category folder within this repo of that fetcher. Having a separate
common "category" module guards against name collisions across categories.
* For a check, add a `test_<category>_common.py` module, if one does not already exist,
in your project's `checks` path where the `<category>` is the respective category folder
within this repo of that check. Having a separate common "category" module guards
against name collisions across providers and technologies.
* Import the desired fetcher or check class and the `auditree-framework` will handle
the rest.
For example to use the Abandoned Evidence fetcher from the `auditree` category, add
the following to your `fetch_auditree_common.py`:
```python
from arboretum.auditree.fetchers.fetch_abandoned_evidence import AbandonedEvidenceFetcher
```
* `auditree-arboretum` fetchers and checks are designed to execute as part of a downstream
Python project, so you may need to setup your project's configuration in order for the
fetchers and checks to execute as desired. Each category folder in this repository
includes a README.md that documents each fetcher's and check's configuration.
* In general `auditree-arboretum` fetchers and checks expect an `org` field with content
that captures each fetcher's and check's configuration settings.
For example:
```json
{
"org": {
"auditree": {
"abandoned_evidence": {
"threshold": 1234567,
"exceptions": {
"raw/path/to-evidence.json": "This is a good reason",
"raw/path/to-evidence-2.json": "This is also a good reason"
}
}
}
}
```
* Finally, for a check, be sure to add the appropriate entry into your project's
``controls.json`` file. Doing this allows you to group checks together as a control
set which is useful for organizing check notifications and targeted check execution.
For example to use the Abandoned Evidence check, add something similar to the
following to your project's `controls.json`:
```json
{
"arboretum.auditree.checks.test_abandoned_evidence.AbandonedEvidenceCheck": {
"auditree_evidence": {
"auditree_control": ["arboretum.auditree"]
}
}
}
```
[platform-badge]: https://img.shields.io/badge/platform-osx%20|%20linux-orange.svg
[pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
[python-badge]: https://img.shields.io/badge/python-v3.6+-blue.svg
[pre-commit]: https://github.com/pre-commit/pre-commit
[python-dl]: https://www.python.org/downloads/
[lint-test]: https://github.com/ComplianceAsCode/auditree-arboretum/actions?query=workflow%3A%22format+%7C+lint+%7C+test%22
[pypi-upload]: https://github.com/ComplianceAsCode/auditree-arboretum/actions?query=workflow%3A%22PyPI+upload%22
[auditree-framework]: https://github.com/ComplianceAsCode/auditree-framework
[harvest]: https://github.com/ComplianceAsCode/auditree-harvest
[fetcher design principles]: https://complianceascode.github.io/auditree-framework/design-principles.html#compliance-fetchers
[evidence dependency chaining]: https://complianceascode.github.io/auditree-framework/design-principles.html#evidence-dependency-chaining
[check design principles]: https://complianceascode.github.io/auditree-framework/design-principles.html#compliance-checks
[Jinja]: https://palletsprojects.com/p/jinja/
[harvest-rpt-dev]: https://github.com/ComplianceAsCode/auditree-harvest#report-development
%package -n python3-auditree-arboretum
Summary: The Auditree common fetchers, checks and harvest reports library
Provides: python-auditree-arboretum
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-auditree-arboretum
[![OS Compatibility][platform-badge]](#prerequisites)
[![Python Compatibility][python-badge]][python-dl]
[![pre-commit][pre-commit-badge]][pre-commit]
[][lint-test]
[][pypi-upload]
# auditree-arboretum
The Auditree common fetchers, checks and [harvest][] reports library.
## Introduction
Auditree Arboretum is a Python library of common compliance fetchers, checks & harvest
reports built upon the [Auditree compliance automation framework][auditree-framework].
## Repo content
### Functionality categorization
Arboretum fetchers, checks, and Harvest reports are organized into functional
grouping categories. The following categories have either been contributed to
or will be contributed to in the near future. We anticipate that this list will
grow as arboretum matures.
- [Ansible](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/ansible)
- [Auditree](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/auditree)
- [Chef](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/chef)
- [IBM Cloud](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/ibm_cloud)
- [Kubernetes](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/kubernetes)
- [Object Storage](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/object_storage)
- [Pager Duty](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/pager_duty)
- [Splunk](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/splunk)
### Fetchers
Please read the framework documentation for [fetcher design principles][] before
contributing a fetcher.
Fetchers must apply no logic to the data they retrieve. They must write unadulterated
(modulo sorting & de-duplication) into the `/raw` area of the locker via the
framework-provided decorators or context managers.
Fetchers must be atomic - retrieving and creating the data they are responsible
for. Fetcher execution order is not guaranteed and so you must not assume that
evidence already exists and is current in the locker. Use
[evidence dependency chaining][] if a fetcher depends on evidence gathered by another
fetcher in order to gather its intended evidence.
Fetchers should be as fast as the API call allows. If a call is long running it
should be separated into a dedicated evidence providing tool, which places data
where a fetcher can retrieve it easily & quickly.
### Checks
Please read the framework documentation for [check design principles][] before
contributing a check.
Checks should only use evidence from the evidence locker to perform check operations.
Also, checks **should not** write or change evidence from the evidence locker. That
is the job of a fetcher.
[Jinja][] is used to produce reports from checks. As such each check class must have
at least one associated report template in order to produce a check report. In keeping
with the "DevSecOps" theme, check reports are meant to provide details on violations
identified by checks. These violations are in the form of failures and warnings.
**They aren't meant to be used to format fetched raw evidence into a readable report.**
[Harvest][harvest] reports should be used to satisfy that need.
### Harvest Reports
Harvest reports are hosted with the fetchers/checks that collect the evidence for
the reports process. Within `auditree-arboretum` this means the harvest report code
lives in `reports` folders throughout this repository. For more details check out
[harvest report development][harvest-rpt-dev] in the [harvest][harvest] README.
## Usage
`arboretum` is available for download from [PyPI](https://pypi.org/project/auditree-arboretum/).
### Prerequisites
- Supported for execution on OSX and LINUX.
- Supported for execution with Python 3.6 and above.
### Integration
Follow these steps to integrate auditree-arboretum fetchers and checks into your project:
* Add this `auditree-arboretum` package as a dependency in your Python project.
* The following steps can be taken to import individual arboretum fetchers and checks.
* For a fetcher, add a `fetch_<category>_common.py` module, if one does not already
exist, in your project's `fetchers` path where the `<category>` is
the respective category folder within this repo of that fetcher. Having a separate
common "category" module guards against name collisions across categories.
* For a check, add a `test_<category>_common.py` module, if one does not already exist,
in your project's `checks` path where the `<category>` is the respective category folder
within this repo of that check. Having a separate common "category" module guards
against name collisions across providers and technologies.
* Import the desired fetcher or check class and the `auditree-framework` will handle
the rest.
For example to use the Abandoned Evidence fetcher from the `auditree` category, add
the following to your `fetch_auditree_common.py`:
```python
from arboretum.auditree.fetchers.fetch_abandoned_evidence import AbandonedEvidenceFetcher
```
* `auditree-arboretum` fetchers and checks are designed to execute as part of a downstream
Python project, so you may need to setup your project's configuration in order for the
fetchers and checks to execute as desired. Each category folder in this repository
includes a README.md that documents each fetcher's and check's configuration.
* In general `auditree-arboretum` fetchers and checks expect an `org` field with content
that captures each fetcher's and check's configuration settings.
For example:
```json
{
"org": {
"auditree": {
"abandoned_evidence": {
"threshold": 1234567,
"exceptions": {
"raw/path/to-evidence.json": "This is a good reason",
"raw/path/to-evidence-2.json": "This is also a good reason"
}
}
}
}
```
* Finally, for a check, be sure to add the appropriate entry into your project's
``controls.json`` file. Doing this allows you to group checks together as a control
set which is useful for organizing check notifications and targeted check execution.
For example to use the Abandoned Evidence check, add something similar to the
following to your project's `controls.json`:
```json
{
"arboretum.auditree.checks.test_abandoned_evidence.AbandonedEvidenceCheck": {
"auditree_evidence": {
"auditree_control": ["arboretum.auditree"]
}
}
}
```
[platform-badge]: https://img.shields.io/badge/platform-osx%20|%20linux-orange.svg
[pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
[python-badge]: https://img.shields.io/badge/python-v3.6+-blue.svg
[pre-commit]: https://github.com/pre-commit/pre-commit
[python-dl]: https://www.python.org/downloads/
[lint-test]: https://github.com/ComplianceAsCode/auditree-arboretum/actions?query=workflow%3A%22format+%7C+lint+%7C+test%22
[pypi-upload]: https://github.com/ComplianceAsCode/auditree-arboretum/actions?query=workflow%3A%22PyPI+upload%22
[auditree-framework]: https://github.com/ComplianceAsCode/auditree-framework
[harvest]: https://github.com/ComplianceAsCode/auditree-harvest
[fetcher design principles]: https://complianceascode.github.io/auditree-framework/design-principles.html#compliance-fetchers
[evidence dependency chaining]: https://complianceascode.github.io/auditree-framework/design-principles.html#evidence-dependency-chaining
[check design principles]: https://complianceascode.github.io/auditree-framework/design-principles.html#compliance-checks
[Jinja]: https://palletsprojects.com/p/jinja/
[harvest-rpt-dev]: https://github.com/ComplianceAsCode/auditree-harvest#report-development
%package help
Summary: Development documents and examples for auditree-arboretum
Provides: python3-auditree-arboretum-doc
%description help
[![OS Compatibility][platform-badge]](#prerequisites)
[![Python Compatibility][python-badge]][python-dl]
[![pre-commit][pre-commit-badge]][pre-commit]
[][lint-test]
[][pypi-upload]
# auditree-arboretum
The Auditree common fetchers, checks and [harvest][] reports library.
## Introduction
Auditree Arboretum is a Python library of common compliance fetchers, checks & harvest
reports built upon the [Auditree compliance automation framework][auditree-framework].
## Repo content
### Functionality categorization
Arboretum fetchers, checks, and Harvest reports are organized into functional
grouping categories. The following categories have either been contributed to
or will be contributed to in the near future. We anticipate that this list will
grow as arboretum matures.
- [Ansible](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/ansible)
- [Auditree](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/auditree)
- [Chef](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/chef)
- [IBM Cloud](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/ibm_cloud)
- [Kubernetes](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/kubernetes)
- [Object Storage](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/object_storage)
- [Pager Duty](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/pager_duty)
- [Splunk](https://github.com/ComplianceAsCode/auditree-arboretum/tree/main/arboretum/splunk)
### Fetchers
Please read the framework documentation for [fetcher design principles][] before
contributing a fetcher.
Fetchers must apply no logic to the data they retrieve. They must write unadulterated
(modulo sorting & de-duplication) into the `/raw` area of the locker via the
framework-provided decorators or context managers.
Fetchers must be atomic - retrieving and creating the data they are responsible
for. Fetcher execution order is not guaranteed and so you must not assume that
evidence already exists and is current in the locker. Use
[evidence dependency chaining][] if a fetcher depends on evidence gathered by another
fetcher in order to gather its intended evidence.
Fetchers should be as fast as the API call allows. If a call is long running it
should be separated into a dedicated evidence providing tool, which places data
where a fetcher can retrieve it easily & quickly.
### Checks
Please read the framework documentation for [check design principles][] before
contributing a check.
Checks should only use evidence from the evidence locker to perform check operations.
Also, checks **should not** write or change evidence from the evidence locker. That
is the job of a fetcher.
[Jinja][] is used to produce reports from checks. As such each check class must have
at least one associated report template in order to produce a check report. In keeping
with the "DevSecOps" theme, check reports are meant to provide details on violations
identified by checks. These violations are in the form of failures and warnings.
**They aren't meant to be used to format fetched raw evidence into a readable report.**
[Harvest][harvest] reports should be used to satisfy that need.
### Harvest Reports
Harvest reports are hosted with the fetchers/checks that collect the evidence for
the reports process. Within `auditree-arboretum` this means the harvest report code
lives in `reports` folders throughout this repository. For more details check out
[harvest report development][harvest-rpt-dev] in the [harvest][harvest] README.
## Usage
`arboretum` is available for download from [PyPI](https://pypi.org/project/auditree-arboretum/).
### Prerequisites
- Supported for execution on OSX and LINUX.
- Supported for execution with Python 3.6 and above.
### Integration
Follow these steps to integrate auditree-arboretum fetchers and checks into your project:
* Add this `auditree-arboretum` package as a dependency in your Python project.
* The following steps can be taken to import individual arboretum fetchers and checks.
* For a fetcher, add a `fetch_<category>_common.py` module, if one does not already
exist, in your project's `fetchers` path where the `<category>` is
the respective category folder within this repo of that fetcher. Having a separate
common "category" module guards against name collisions across categories.
* For a check, add a `test_<category>_common.py` module, if one does not already exist,
in your project's `checks` path where the `<category>` is the respective category folder
within this repo of that check. Having a separate common "category" module guards
against name collisions across providers and technologies.
* Import the desired fetcher or check class and the `auditree-framework` will handle
the rest.
For example to use the Abandoned Evidence fetcher from the `auditree` category, add
the following to your `fetch_auditree_common.py`:
```python
from arboretum.auditree.fetchers.fetch_abandoned_evidence import AbandonedEvidenceFetcher
```
* `auditree-arboretum` fetchers and checks are designed to execute as part of a downstream
Python project, so you may need to setup your project's configuration in order for the
fetchers and checks to execute as desired. Each category folder in this repository
includes a README.md that documents each fetcher's and check's configuration.
* In general `auditree-arboretum` fetchers and checks expect an `org` field with content
that captures each fetcher's and check's configuration settings.
For example:
```json
{
"org": {
"auditree": {
"abandoned_evidence": {
"threshold": 1234567,
"exceptions": {
"raw/path/to-evidence.json": "This is a good reason",
"raw/path/to-evidence-2.json": "This is also a good reason"
}
}
}
}
```
* Finally, for a check, be sure to add the appropriate entry into your project's
``controls.json`` file. Doing this allows you to group checks together as a control
set which is useful for organizing check notifications and targeted check execution.
For example to use the Abandoned Evidence check, add something similar to the
following to your project's `controls.json`:
```json
{
"arboretum.auditree.checks.test_abandoned_evidence.AbandonedEvidenceCheck": {
"auditree_evidence": {
"auditree_control": ["arboretum.auditree"]
}
}
}
```
[platform-badge]: https://img.shields.io/badge/platform-osx%20|%20linux-orange.svg
[pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
[python-badge]: https://img.shields.io/badge/python-v3.6+-blue.svg
[pre-commit]: https://github.com/pre-commit/pre-commit
[python-dl]: https://www.python.org/downloads/
[lint-test]: https://github.com/ComplianceAsCode/auditree-arboretum/actions?query=workflow%3A%22format+%7C+lint+%7C+test%22
[pypi-upload]: https://github.com/ComplianceAsCode/auditree-arboretum/actions?query=workflow%3A%22PyPI+upload%22
[auditree-framework]: https://github.com/ComplianceAsCode/auditree-framework
[harvest]: https://github.com/ComplianceAsCode/auditree-harvest
[fetcher design principles]: https://complianceascode.github.io/auditree-framework/design-principles.html#compliance-fetchers
[evidence dependency chaining]: https://complianceascode.github.io/auditree-framework/design-principles.html#evidence-dependency-chaining
[check design principles]: https://complianceascode.github.io/auditree-framework/design-principles.html#compliance-checks
[Jinja]: https://palletsprojects.com/p/jinja/
[harvest-rpt-dev]: https://github.com/ComplianceAsCode/auditree-harvest#report-development
%prep
%autosetup -n auditree-arboretum-0.17.0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-auditree-arboretum -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.17.0-1
- Package Spec generated
|