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
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
|
%global _empty_manifest_terminate_build 0
Name: python-redstone
Version: 0.5.1
Release: 1
Summary: A Pythonic IBM Cloud SDK
License: Apache Software License
URL: https://github.com/IBM/redstone
Source0: https://mirrors.aliyun.com/pypi/web/packages/15/9b/dee7af125dcf12ec9e744e93e3928555d3a17fd32c88bd58bc0f1dd50179/redstone-0.5.1.tar.gz
BuildArch: noarch
Requires: python3-requests[security]
Requires: python3-cryptography
Requires: python3-sphinx
Requires: python3-sphinx-rtd-theme
%description
# redstone - A Pythonic IBM Cloud SDK
[](https://pypi.org/project/redstone)
[](https://pepy.tech/project/redstone)
[](https://opensource.org/licenses/Apache-2.0)
[](https://travis-ci.com/IBM/redstone)
[](https://redstone-py.readthedocs.io/en/latest/?badge=latest)
Redstone is a Python library for interacting with IBM Cloud services.
It currently includes support for IBM KeyProtect, IBM Kubernetes Service (IKS), and some
platform services like ResourceController and IAM.
Contributions in the form of feedback, patches, or bugs are appreciated.
* [Installation](#installation)
* [Usage](#usage)
* [rs-crypto](#encrypting-data-using-redstonecrypto-with-keyprotect)
* [rs-keyprotect](#using-the-rs-keyprotect-cli)
# Installation
You can install `redstone` with:
```sh
$ pip3 install redstone
# alternatively, you can do a user install if you are not an admin on your box
$ pip3 install --user redstone
```
# Usage
A default session is created for you on first access, which can be used to access service interfaces scoped to that account.
Default sessions will read an API key from the conventional `IBMCLOUD_API_KEY` environment variable.
Using the default session to get a CIS (Cloud Internet Services) client:
```python
>>> import redstone
>>> import os
>>> cis = redstone.service("CIS", service_instance_id=os.environ.get("CIS_CRN"))
>>> cis
<redstone.client.CIS object at 0x...>
>>> sorted(map(lambda x: x.get("name"), cis.pools()))
['au-syd', 'eu-de', 'eu-de-ams', 'eu-de-fra', 'eu-de-private', 'eu-gb', 'eu-gb-private', 'eu-syd-private', 'jp-tok', 'jp-tok-02', 'jp-tok-04', 'preprod', 'private-jp-tok', 'private-us-south', 'us-east', 'us-east-private', 'us-south']
>>>
```
Build your own session for interacting with multiple regions and/or accounts within the same Python context:
```python
>>> production = redstone.Session(
... region="us-south",
... iam_api_key=os.environ.get("IBMCLOUD_API_KEY")
... )
>>> production
<redstone.Session object at 0x...>
>>> rc = production.service("ResourceController")
>>> rc
<redstone.client.ResourceController object at 0x...>
>>> instance_id, instance_crn = rc.create_instance(name="mykpinstance")
>>> instance_crn
'crn:v1:bluemix:public:kms:us-south:a/...::'
>>> kp = production.service("KeyProtect", service_instance_id=instance_id)
>>> key = kp.create(name="mykey")
>>> key.get("name")
'mykey'
>>> kp.delete(key.get("id"))
>>> rc.delete_instance(instance_crn)
>>>
```
# Encrypting data using redstone.crypto with KeyProtect
Redstone includes support for directly encrypting and decrypting files or other data using IBM KeyProtect as a key provider.
There are two ways to use the crypto functionality, a CLI tool and the python module.
## rs-crypto CLI tool
Upon installing the redstone module with pip, it will also install a command-line script under `rs-crypto` that can
be used to encrypt and decrypt.
The script will read the API key used to interact with KeyProtect from the `IBMCLOUD_API_KEY` environment variable.
Encrypting a file is straight forward with the `encrypt` commmand. The encrypted data will be printed to stdout, and
can be redirected to a file.
```sh
IBMCLOUD_API_KEY=... rs-crypto encrypt --key-crns "crn:v1... crn:v1..." my-super-secret-file.txt > my-encrypted-file
```
Decrypting is similar. Note that the tool will print raw bytes to stdout, so you will probably want
to redirect to a file if the original data was binary.
```sh
IBMCLOUD_API_KEY=... rs-crypto decrypt my-encrypted-file > my-decrypted-file
```
The output of encrypt can be fed directly back to decrypt.
```sh
# you can also pipe directly to stdin by specifying the file as '-'
echo "some-secret-data" | rs-crypto encrypt --key-crns "crn:v1... crn:v1..." - | rs-crypto decrypt -
```
## using redstone.crypto
The python module is designed to be easy to use, even for those not familiar with python.
```python
import os
import sys
from redstone import crypto
# NOTE: here we demonstrate how we can use several keys that come from different instances and even different regions
# only one of the keys needs to be available for the decrypt operation to succeed
crns = [
"crn:v1:bluemix:public:kms:us-south:a/...:415ba6f3-43f9-4996-0000-123456789:key:94e2639b-af2f-4f4f-a415-bb63820cf976",
"crn:v1:bluemix:public:kms:us-east:a/...:077a4670-c2f2-415c-0000-123456789:key:1f5ead7e-a1f4-4d15-9641-80e9aa5c7e12",
]
if not os.getenv("IBMCLOUD_API_KEY"):
print("Remember to set 'IBMCLOUD_API_KEY' as the internal client uses that for authentication", file=sys.stderr)
sys.exit(1)
# read bytes from stdin and encrypt
message, meta = crypto.encrypt(sys.stdin.buffer.read(), key_crns=crns)
print("Encrypted value: %r" % message)
message, meta = crypto.decrypt(message)
print("%r" % message)
print("%r" % meta)
```
## Finding Key CRNs
KeyProtect CRKs to be used for encryption are specified via `--key-crns` as a space separated list, or the `RSCRYPTO_KEY_CRNS` environment variable.
Key CRNs can be found via the IBM Cloud Console (KeyProtect UI) or the IBM Cloud CLI. (You will need the kp plugin.)
```sh
# Using the ic kp plugin to find a CRN
ic kp get -o json -i $instance_uuid $key_uuid
{
"id": "94e2639b-af2f-4f4f-a415-bb63820cf976",
"name": "the-one-key",
"type": "application/vnd.ibm.kms.key+json",
"extractable": false,
"state": 1,
"crn": "crn:v1:bluemix:public:kms:us-south:a/....:415ba6f3-43f9-4996-abcd-1234346:key:94e2639b-af2f-4f4f-a415-bb63820cf976"
}
```
# Using the rs-keyprotect CLI
rs-keyprotect is a quick stand-alone CLI utility for interacting with KeyProtect via terminal or shell scripts.
```sh
# set an API for the account you wish to interact with
export IBMCLOUD_API_KEY=...
# list KeyProtect instances in the account
rs-keyprotect list-instances
ID NAME REGION
07096bd5-6e6f-4b75-9978-9cbb18ce9a16 keyptest1 us-south
143ac075-31ad-4bcc-bc9f-c352ea6bd213 Key Protect-y6 us-south
# list the keys of an instance
rs-keyprotect -i fb680ac4-e2d7-40c3-8b64-be59b13236cd list
ID NAME EXTRACTABLE
52c3eea1-6db7-4dd8-8540-5d95af8c621b kpregress_at_pass_key False
e5931fa2-5830-4f12-9cfa-3d0099f79929 kpregress_at_pass_key False
```
For more usage, run `rs-keyprotect -h` and `rs-keyprotect <command> -h`
%package -n python3-redstone
Summary: A Pythonic IBM Cloud SDK
Provides: python-redstone
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-redstone
# redstone - A Pythonic IBM Cloud SDK
[](https://pypi.org/project/redstone)
[](https://pepy.tech/project/redstone)
[](https://opensource.org/licenses/Apache-2.0)
[](https://travis-ci.com/IBM/redstone)
[](https://redstone-py.readthedocs.io/en/latest/?badge=latest)
Redstone is a Python library for interacting with IBM Cloud services.
It currently includes support for IBM KeyProtect, IBM Kubernetes Service (IKS), and some
platform services like ResourceController and IAM.
Contributions in the form of feedback, patches, or bugs are appreciated.
* [Installation](#installation)
* [Usage](#usage)
* [rs-crypto](#encrypting-data-using-redstonecrypto-with-keyprotect)
* [rs-keyprotect](#using-the-rs-keyprotect-cli)
# Installation
You can install `redstone` with:
```sh
$ pip3 install redstone
# alternatively, you can do a user install if you are not an admin on your box
$ pip3 install --user redstone
```
# Usage
A default session is created for you on first access, which can be used to access service interfaces scoped to that account.
Default sessions will read an API key from the conventional `IBMCLOUD_API_KEY` environment variable.
Using the default session to get a CIS (Cloud Internet Services) client:
```python
>>> import redstone
>>> import os
>>> cis = redstone.service("CIS", service_instance_id=os.environ.get("CIS_CRN"))
>>> cis
<redstone.client.CIS object at 0x...>
>>> sorted(map(lambda x: x.get("name"), cis.pools()))
['au-syd', 'eu-de', 'eu-de-ams', 'eu-de-fra', 'eu-de-private', 'eu-gb', 'eu-gb-private', 'eu-syd-private', 'jp-tok', 'jp-tok-02', 'jp-tok-04', 'preprod', 'private-jp-tok', 'private-us-south', 'us-east', 'us-east-private', 'us-south']
>>>
```
Build your own session for interacting with multiple regions and/or accounts within the same Python context:
```python
>>> production = redstone.Session(
... region="us-south",
... iam_api_key=os.environ.get("IBMCLOUD_API_KEY")
... )
>>> production
<redstone.Session object at 0x...>
>>> rc = production.service("ResourceController")
>>> rc
<redstone.client.ResourceController object at 0x...>
>>> instance_id, instance_crn = rc.create_instance(name="mykpinstance")
>>> instance_crn
'crn:v1:bluemix:public:kms:us-south:a/...::'
>>> kp = production.service("KeyProtect", service_instance_id=instance_id)
>>> key = kp.create(name="mykey")
>>> key.get("name")
'mykey'
>>> kp.delete(key.get("id"))
>>> rc.delete_instance(instance_crn)
>>>
```
# Encrypting data using redstone.crypto with KeyProtect
Redstone includes support for directly encrypting and decrypting files or other data using IBM KeyProtect as a key provider.
There are two ways to use the crypto functionality, a CLI tool and the python module.
## rs-crypto CLI tool
Upon installing the redstone module with pip, it will also install a command-line script under `rs-crypto` that can
be used to encrypt and decrypt.
The script will read the API key used to interact with KeyProtect from the `IBMCLOUD_API_KEY` environment variable.
Encrypting a file is straight forward with the `encrypt` commmand. The encrypted data will be printed to stdout, and
can be redirected to a file.
```sh
IBMCLOUD_API_KEY=... rs-crypto encrypt --key-crns "crn:v1... crn:v1..." my-super-secret-file.txt > my-encrypted-file
```
Decrypting is similar. Note that the tool will print raw bytes to stdout, so you will probably want
to redirect to a file if the original data was binary.
```sh
IBMCLOUD_API_KEY=... rs-crypto decrypt my-encrypted-file > my-decrypted-file
```
The output of encrypt can be fed directly back to decrypt.
```sh
# you can also pipe directly to stdin by specifying the file as '-'
echo "some-secret-data" | rs-crypto encrypt --key-crns "crn:v1... crn:v1..." - | rs-crypto decrypt -
```
## using redstone.crypto
The python module is designed to be easy to use, even for those not familiar with python.
```python
import os
import sys
from redstone import crypto
# NOTE: here we demonstrate how we can use several keys that come from different instances and even different regions
# only one of the keys needs to be available for the decrypt operation to succeed
crns = [
"crn:v1:bluemix:public:kms:us-south:a/...:415ba6f3-43f9-4996-0000-123456789:key:94e2639b-af2f-4f4f-a415-bb63820cf976",
"crn:v1:bluemix:public:kms:us-east:a/...:077a4670-c2f2-415c-0000-123456789:key:1f5ead7e-a1f4-4d15-9641-80e9aa5c7e12",
]
if not os.getenv("IBMCLOUD_API_KEY"):
print("Remember to set 'IBMCLOUD_API_KEY' as the internal client uses that for authentication", file=sys.stderr)
sys.exit(1)
# read bytes from stdin and encrypt
message, meta = crypto.encrypt(sys.stdin.buffer.read(), key_crns=crns)
print("Encrypted value: %r" % message)
message, meta = crypto.decrypt(message)
print("%r" % message)
print("%r" % meta)
```
## Finding Key CRNs
KeyProtect CRKs to be used for encryption are specified via `--key-crns` as a space separated list, or the `RSCRYPTO_KEY_CRNS` environment variable.
Key CRNs can be found via the IBM Cloud Console (KeyProtect UI) or the IBM Cloud CLI. (You will need the kp plugin.)
```sh
# Using the ic kp plugin to find a CRN
ic kp get -o json -i $instance_uuid $key_uuid
{
"id": "94e2639b-af2f-4f4f-a415-bb63820cf976",
"name": "the-one-key",
"type": "application/vnd.ibm.kms.key+json",
"extractable": false,
"state": 1,
"crn": "crn:v1:bluemix:public:kms:us-south:a/....:415ba6f3-43f9-4996-abcd-1234346:key:94e2639b-af2f-4f4f-a415-bb63820cf976"
}
```
# Using the rs-keyprotect CLI
rs-keyprotect is a quick stand-alone CLI utility for interacting with KeyProtect via terminal or shell scripts.
```sh
# set an API for the account you wish to interact with
export IBMCLOUD_API_KEY=...
# list KeyProtect instances in the account
rs-keyprotect list-instances
ID NAME REGION
07096bd5-6e6f-4b75-9978-9cbb18ce9a16 keyptest1 us-south
143ac075-31ad-4bcc-bc9f-c352ea6bd213 Key Protect-y6 us-south
# list the keys of an instance
rs-keyprotect -i fb680ac4-e2d7-40c3-8b64-be59b13236cd list
ID NAME EXTRACTABLE
52c3eea1-6db7-4dd8-8540-5d95af8c621b kpregress_at_pass_key False
e5931fa2-5830-4f12-9cfa-3d0099f79929 kpregress_at_pass_key False
```
For more usage, run `rs-keyprotect -h` and `rs-keyprotect <command> -h`
%package help
Summary: Development documents and examples for redstone
Provides: python3-redstone-doc
%description help
# redstone - A Pythonic IBM Cloud SDK
[](https://pypi.org/project/redstone)
[](https://pepy.tech/project/redstone)
[](https://opensource.org/licenses/Apache-2.0)
[](https://travis-ci.com/IBM/redstone)
[](https://redstone-py.readthedocs.io/en/latest/?badge=latest)
Redstone is a Python library for interacting with IBM Cloud services.
It currently includes support for IBM KeyProtect, IBM Kubernetes Service (IKS), and some
platform services like ResourceController and IAM.
Contributions in the form of feedback, patches, or bugs are appreciated.
* [Installation](#installation)
* [Usage](#usage)
* [rs-crypto](#encrypting-data-using-redstonecrypto-with-keyprotect)
* [rs-keyprotect](#using-the-rs-keyprotect-cli)
# Installation
You can install `redstone` with:
```sh
$ pip3 install redstone
# alternatively, you can do a user install if you are not an admin on your box
$ pip3 install --user redstone
```
# Usage
A default session is created for you on first access, which can be used to access service interfaces scoped to that account.
Default sessions will read an API key from the conventional `IBMCLOUD_API_KEY` environment variable.
Using the default session to get a CIS (Cloud Internet Services) client:
```python
>>> import redstone
>>> import os
>>> cis = redstone.service("CIS", service_instance_id=os.environ.get("CIS_CRN"))
>>> cis
<redstone.client.CIS object at 0x...>
>>> sorted(map(lambda x: x.get("name"), cis.pools()))
['au-syd', 'eu-de', 'eu-de-ams', 'eu-de-fra', 'eu-de-private', 'eu-gb', 'eu-gb-private', 'eu-syd-private', 'jp-tok', 'jp-tok-02', 'jp-tok-04', 'preprod', 'private-jp-tok', 'private-us-south', 'us-east', 'us-east-private', 'us-south']
>>>
```
Build your own session for interacting with multiple regions and/or accounts within the same Python context:
```python
>>> production = redstone.Session(
... region="us-south",
... iam_api_key=os.environ.get("IBMCLOUD_API_KEY")
... )
>>> production
<redstone.Session object at 0x...>
>>> rc = production.service("ResourceController")
>>> rc
<redstone.client.ResourceController object at 0x...>
>>> instance_id, instance_crn = rc.create_instance(name="mykpinstance")
>>> instance_crn
'crn:v1:bluemix:public:kms:us-south:a/...::'
>>> kp = production.service("KeyProtect", service_instance_id=instance_id)
>>> key = kp.create(name="mykey")
>>> key.get("name")
'mykey'
>>> kp.delete(key.get("id"))
>>> rc.delete_instance(instance_crn)
>>>
```
# Encrypting data using redstone.crypto with KeyProtect
Redstone includes support for directly encrypting and decrypting files or other data using IBM KeyProtect as a key provider.
There are two ways to use the crypto functionality, a CLI tool and the python module.
## rs-crypto CLI tool
Upon installing the redstone module with pip, it will also install a command-line script under `rs-crypto` that can
be used to encrypt and decrypt.
The script will read the API key used to interact with KeyProtect from the `IBMCLOUD_API_KEY` environment variable.
Encrypting a file is straight forward with the `encrypt` commmand. The encrypted data will be printed to stdout, and
can be redirected to a file.
```sh
IBMCLOUD_API_KEY=... rs-crypto encrypt --key-crns "crn:v1... crn:v1..." my-super-secret-file.txt > my-encrypted-file
```
Decrypting is similar. Note that the tool will print raw bytes to stdout, so you will probably want
to redirect to a file if the original data was binary.
```sh
IBMCLOUD_API_KEY=... rs-crypto decrypt my-encrypted-file > my-decrypted-file
```
The output of encrypt can be fed directly back to decrypt.
```sh
# you can also pipe directly to stdin by specifying the file as '-'
echo "some-secret-data" | rs-crypto encrypt --key-crns "crn:v1... crn:v1..." - | rs-crypto decrypt -
```
## using redstone.crypto
The python module is designed to be easy to use, even for those not familiar with python.
```python
import os
import sys
from redstone import crypto
# NOTE: here we demonstrate how we can use several keys that come from different instances and even different regions
# only one of the keys needs to be available for the decrypt operation to succeed
crns = [
"crn:v1:bluemix:public:kms:us-south:a/...:415ba6f3-43f9-4996-0000-123456789:key:94e2639b-af2f-4f4f-a415-bb63820cf976",
"crn:v1:bluemix:public:kms:us-east:a/...:077a4670-c2f2-415c-0000-123456789:key:1f5ead7e-a1f4-4d15-9641-80e9aa5c7e12",
]
if not os.getenv("IBMCLOUD_API_KEY"):
print("Remember to set 'IBMCLOUD_API_KEY' as the internal client uses that for authentication", file=sys.stderr)
sys.exit(1)
# read bytes from stdin and encrypt
message, meta = crypto.encrypt(sys.stdin.buffer.read(), key_crns=crns)
print("Encrypted value: %r" % message)
message, meta = crypto.decrypt(message)
print("%r" % message)
print("%r" % meta)
```
## Finding Key CRNs
KeyProtect CRKs to be used for encryption are specified via `--key-crns` as a space separated list, or the `RSCRYPTO_KEY_CRNS` environment variable.
Key CRNs can be found via the IBM Cloud Console (KeyProtect UI) or the IBM Cloud CLI. (You will need the kp plugin.)
```sh
# Using the ic kp plugin to find a CRN
ic kp get -o json -i $instance_uuid $key_uuid
{
"id": "94e2639b-af2f-4f4f-a415-bb63820cf976",
"name": "the-one-key",
"type": "application/vnd.ibm.kms.key+json",
"extractable": false,
"state": 1,
"crn": "crn:v1:bluemix:public:kms:us-south:a/....:415ba6f3-43f9-4996-abcd-1234346:key:94e2639b-af2f-4f4f-a415-bb63820cf976"
}
```
# Using the rs-keyprotect CLI
rs-keyprotect is a quick stand-alone CLI utility for interacting with KeyProtect via terminal or shell scripts.
```sh
# set an API for the account you wish to interact with
export IBMCLOUD_API_KEY=...
# list KeyProtect instances in the account
rs-keyprotect list-instances
ID NAME REGION
07096bd5-6e6f-4b75-9978-9cbb18ce9a16 keyptest1 us-south
143ac075-31ad-4bcc-bc9f-c352ea6bd213 Key Protect-y6 us-south
# list the keys of an instance
rs-keyprotect -i fb680ac4-e2d7-40c3-8b64-be59b13236cd list
ID NAME EXTRACTABLE
52c3eea1-6db7-4dd8-8540-5d95af8c621b kpregress_at_pass_key False
e5931fa2-5830-4f12-9cfa-3d0099f79929 kpregress_at_pass_key False
```
For more usage, run `rs-keyprotect -h` and `rs-keyprotect <command> -h`
%prep
%autosetup -n redstone-0.5.1
%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-redstone -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.1-1
- Package Spec generated
|