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
626
627
628
|
%global _empty_manifest_terminate_build 0
Name: python-ubirch-protocol
Version: 3.1.0
Release: 1
Summary: A ubirch-protocol implementation for python.
License: Apache Software License
URL: https://github.com/ubirch/ubirch-protocol-python
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/16/5a/466dae0503f5c343b7f7913c5e2c55390b3e737d652cbf184deabf07dac0/ubirch-protocol-3.1.0.tar.gz
BuildArch: noarch
Requires: python3-msgpack
Requires: python3-ed25519
Requires: python3-pyjks
Requires: python3-requests
%description
# ubirch-protocol for python
This is an implementation of the [ubirch-protocol](https://github.com/ubirch/ubirch-protocol)
for [Python 3](https://www.python.org/). Please see [ubirch-protocol](https://github.com/ubirch/ubirch-protocol)
for details.
The library consists of three parts which can be used individually:
* `ubirch.API` - a python layer covering the ubirch backend REST API
* `ubirch.Protocol` - the protocol compiler which packages messages and handles signing and verification
* `ubirch.KeyStore` - a simple key store based on [pyjks](https://pypi.org/project/pyjks/) to store keys and certificates
> the [ubirch](https://ubirch.com) protocol uses the [Ed25519](https://ed25519.cr.yp.to/) signature scheme by default.
## Usage
Install the library: `pip install ubirch-protocol`
### Creating keypair and messages
```python
import ubirch
from uuid import UUID
import binascii
# create a keystore for the device keypair
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
# create a UUID that identifies the device and load or create a keypair
uuid = UUID(hex="575A5601FD744F8EB6AEEF592CDEE12C")
if not keystore.exists_signing_key(uuid):
keystore.create_ed25519_keypair(uuid)
# implement the _sign method of the ubirch.Protocol to use the just created keys to sign the message
class ProtocolImpl(ubirch.Protocol):
def _sign(self, uuid: UUID, message: bytes) -> bytes:
return keystore.find_signing_key(uuid).sign(message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
# create ubirch protocol messages
print(binascii.hexlify(proto.message_chained(uuid, 0x00, [1, 2, 3])))
print(binascii.hexlify(proto.message_chained(uuid, 0x00, [4, 5, 6])))
```
### Sending messages using the ubirch API
Please see [test-protocol.py](examples/test-protocol.py) for a comprehensive example, how to create a device and
send data. Below is a snipped that will send two chained messages, using a generic key/value payload.
You will need a password for the ubirch backend. Go to https://console.demo.ubirch.com to register your UUID
under `Things`. Then click on your device and copy the password from the `apiConfig`-field.
```python
import ubirch
from uuid import UUID
import binascii
from datetime import datetime
# create a keystore for the device key pair
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
# create a UUID that identifies the device and load or create a key pair
uuid = UUID(hex="575A5601FD744F8EB6AEEF592CDEE12C")
if not keystore.exists_signing_key(uuid):
keystore.create_ed25519_keypair(uuid)
# implement the _sign method of the ubirch.Protocol
class ProtocolImpl(ubirch.Protocol):
def _sign(self, _uuid: UUID, message: bytes) -> bytes:
return keystore.find_signing_key(uuid).sign(message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
# create an instance of the ubirch API and set the password
api = ubirch.API()
api.set_authentication(uuid, "<< password for the ubirch backend >>") # register your UUID at https://console.demo.ubirch.com and retrieve your password
# message 1
msg = proto.message_chained(uuid, 0x53, {'ts': int(datetime.utcnow().timestamp()), 'v': 99})
print(binascii.hexlify(msg))
# send message to ubirch backend
r = api.send(uuid, msg)
print("{}: {}".format(r.status_code, r.content))
# message 2 (chained to message 1)
msg = proto.message_chained(uuid, 0x53, {"ts": int(datetime.utcnow().timestamp()), "v": 100})
print(binascii.hexlify(msg))
# send message to ubirch backend
r = api.send(uuid, msg)
print("{}: {}".format(r.status_code, r.content))
```
### Verification of received message
```python
import ubirch
from ed25519 import VerifyingKey, BadSignatureError
from uuid import UUID
remote_uuid = UUID(hex="9d3c78ff22f34441a5d185c636d486ff")
remote_vk = VerifyingKey("a2403b92bc9add365b3cd12ff120d020647f84ea6983f98bc4c87e0f4be8cd66", encoding='hex')
# create a keystore and insert the verifying key
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
keystore.insert_ed25519_verifying_key(remote_uuid, remote_vk)
# implement the _verify method of the ubirch.Protocol
class ProtocolImpl(ubirch.Protocol):
def _verify(self, uuid: UUID, message: bytes, signature: bytes) -> dict:
return keystore.find_verifying_key(uuid).verify(signature, message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
message = bytes.fromhex(
"9623c4109d3c78ff22f34441a5d185c636d486ffc440a5b371acdfc8495790ee86802399585da50401b0d3c87f60946719338eb0283d36c0bac9b8a6a75a5385342e62932335da988b97c0ec211556db082e9f8478070081a76d657373616765bf796f7572207265717565737420686173206265656e207375626d6974746564c440c8529623a4c2335f7a8ae1eeea655768d2e9a0df141f481ced557c9dac7216e8f64ca9f6970fc6c1096ed49bcc6f7fa77d8f85d05bff5e1301588597edc9770e")
# verify the message (throws an exception if the message could not be verified)
try:
print(proto.message_verify(message))
print("verification successful!")
except BadSignatureError as e:
print("ERROR: verification failed!")
```
### Existing keys
In case you create a key pair from our demo website, use the following code to insert it into the key store:
```python
import ubirch
import ed25519
import uuid
hwDeviceId = uuid.uuid4()
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
key_encoded = input("paste the encoded private key here:")
sk = ed25519.SigningKey(key_encoded, encoding='hex')
vk = sk.get_verifying_key()
keystore.insert_ed25519_keypair(hwDeviceId, vk, sk)
```
### Running the example
```bash
python3 -m venv venv3
. venv3/bin/activate
pip install -r requirements.txt
pip install ubirch-protocol
PYTHONPATH=. python3 examples/test-protocol.py
```
At the first launch the script generates a random UUID for your device and you will be asked
about the authentication token and the device group. You can safely ignore the device group, just press Enter.
The script creates a file `demo-device.ini` which is loaded upon running the script again. If
you need to change anything edit that file.
The script goes through a number of steps:
1. checks the existence of the device and deletes the device if it exists
2. registers the device with the backend
3. generates a new identity for that device and stores it in the key store
4. registers the new identity with the backend
5. sends two consecutive chained messages to the backend
### Testing
Unit tests are added to test the functionality of all objects provided in this library.
```bash
pip install -r requirements.test.txt
python3 -m pytest tests
```
# License
The protocol and its implementation are publicized under the [Apache License 2.0](LICENSE).
%package -n python3-ubirch-protocol
Summary: A ubirch-protocol implementation for python.
Provides: python-ubirch-protocol
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-ubirch-protocol
# ubirch-protocol for python
This is an implementation of the [ubirch-protocol](https://github.com/ubirch/ubirch-protocol)
for [Python 3](https://www.python.org/). Please see [ubirch-protocol](https://github.com/ubirch/ubirch-protocol)
for details.
The library consists of three parts which can be used individually:
* `ubirch.API` - a python layer covering the ubirch backend REST API
* `ubirch.Protocol` - the protocol compiler which packages messages and handles signing and verification
* `ubirch.KeyStore` - a simple key store based on [pyjks](https://pypi.org/project/pyjks/) to store keys and certificates
> the [ubirch](https://ubirch.com) protocol uses the [Ed25519](https://ed25519.cr.yp.to/) signature scheme by default.
## Usage
Install the library: `pip install ubirch-protocol`
### Creating keypair and messages
```python
import ubirch
from uuid import UUID
import binascii
# create a keystore for the device keypair
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
# create a UUID that identifies the device and load or create a keypair
uuid = UUID(hex="575A5601FD744F8EB6AEEF592CDEE12C")
if not keystore.exists_signing_key(uuid):
keystore.create_ed25519_keypair(uuid)
# implement the _sign method of the ubirch.Protocol to use the just created keys to sign the message
class ProtocolImpl(ubirch.Protocol):
def _sign(self, uuid: UUID, message: bytes) -> bytes:
return keystore.find_signing_key(uuid).sign(message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
# create ubirch protocol messages
print(binascii.hexlify(proto.message_chained(uuid, 0x00, [1, 2, 3])))
print(binascii.hexlify(proto.message_chained(uuid, 0x00, [4, 5, 6])))
```
### Sending messages using the ubirch API
Please see [test-protocol.py](examples/test-protocol.py) for a comprehensive example, how to create a device and
send data. Below is a snipped that will send two chained messages, using a generic key/value payload.
You will need a password for the ubirch backend. Go to https://console.demo.ubirch.com to register your UUID
under `Things`. Then click on your device and copy the password from the `apiConfig`-field.
```python
import ubirch
from uuid import UUID
import binascii
from datetime import datetime
# create a keystore for the device key pair
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
# create a UUID that identifies the device and load or create a key pair
uuid = UUID(hex="575A5601FD744F8EB6AEEF592CDEE12C")
if not keystore.exists_signing_key(uuid):
keystore.create_ed25519_keypair(uuid)
# implement the _sign method of the ubirch.Protocol
class ProtocolImpl(ubirch.Protocol):
def _sign(self, _uuid: UUID, message: bytes) -> bytes:
return keystore.find_signing_key(uuid).sign(message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
# create an instance of the ubirch API and set the password
api = ubirch.API()
api.set_authentication(uuid, "<< password for the ubirch backend >>") # register your UUID at https://console.demo.ubirch.com and retrieve your password
# message 1
msg = proto.message_chained(uuid, 0x53, {'ts': int(datetime.utcnow().timestamp()), 'v': 99})
print(binascii.hexlify(msg))
# send message to ubirch backend
r = api.send(uuid, msg)
print("{}: {}".format(r.status_code, r.content))
# message 2 (chained to message 1)
msg = proto.message_chained(uuid, 0x53, {"ts": int(datetime.utcnow().timestamp()), "v": 100})
print(binascii.hexlify(msg))
# send message to ubirch backend
r = api.send(uuid, msg)
print("{}: {}".format(r.status_code, r.content))
```
### Verification of received message
```python
import ubirch
from ed25519 import VerifyingKey, BadSignatureError
from uuid import UUID
remote_uuid = UUID(hex="9d3c78ff22f34441a5d185c636d486ff")
remote_vk = VerifyingKey("a2403b92bc9add365b3cd12ff120d020647f84ea6983f98bc4c87e0f4be8cd66", encoding='hex')
# create a keystore and insert the verifying key
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
keystore.insert_ed25519_verifying_key(remote_uuid, remote_vk)
# implement the _verify method of the ubirch.Protocol
class ProtocolImpl(ubirch.Protocol):
def _verify(self, uuid: UUID, message: bytes, signature: bytes) -> dict:
return keystore.find_verifying_key(uuid).verify(signature, message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
message = bytes.fromhex(
"9623c4109d3c78ff22f34441a5d185c636d486ffc440a5b371acdfc8495790ee86802399585da50401b0d3c87f60946719338eb0283d36c0bac9b8a6a75a5385342e62932335da988b97c0ec211556db082e9f8478070081a76d657373616765bf796f7572207265717565737420686173206265656e207375626d6974746564c440c8529623a4c2335f7a8ae1eeea655768d2e9a0df141f481ced557c9dac7216e8f64ca9f6970fc6c1096ed49bcc6f7fa77d8f85d05bff5e1301588597edc9770e")
# verify the message (throws an exception if the message could not be verified)
try:
print(proto.message_verify(message))
print("verification successful!")
except BadSignatureError as e:
print("ERROR: verification failed!")
```
### Existing keys
In case you create a key pair from our demo website, use the following code to insert it into the key store:
```python
import ubirch
import ed25519
import uuid
hwDeviceId = uuid.uuid4()
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
key_encoded = input("paste the encoded private key here:")
sk = ed25519.SigningKey(key_encoded, encoding='hex')
vk = sk.get_verifying_key()
keystore.insert_ed25519_keypair(hwDeviceId, vk, sk)
```
### Running the example
```bash
python3 -m venv venv3
. venv3/bin/activate
pip install -r requirements.txt
pip install ubirch-protocol
PYTHONPATH=. python3 examples/test-protocol.py
```
At the first launch the script generates a random UUID for your device and you will be asked
about the authentication token and the device group. You can safely ignore the device group, just press Enter.
The script creates a file `demo-device.ini` which is loaded upon running the script again. If
you need to change anything edit that file.
The script goes through a number of steps:
1. checks the existence of the device and deletes the device if it exists
2. registers the device with the backend
3. generates a new identity for that device and stores it in the key store
4. registers the new identity with the backend
5. sends two consecutive chained messages to the backend
### Testing
Unit tests are added to test the functionality of all objects provided in this library.
```bash
pip install -r requirements.test.txt
python3 -m pytest tests
```
# License
The protocol and its implementation are publicized under the [Apache License 2.0](LICENSE).
%package help
Summary: Development documents and examples for ubirch-protocol
Provides: python3-ubirch-protocol-doc
%description help
# ubirch-protocol for python
This is an implementation of the [ubirch-protocol](https://github.com/ubirch/ubirch-protocol)
for [Python 3](https://www.python.org/). Please see [ubirch-protocol](https://github.com/ubirch/ubirch-protocol)
for details.
The library consists of three parts which can be used individually:
* `ubirch.API` - a python layer covering the ubirch backend REST API
* `ubirch.Protocol` - the protocol compiler which packages messages and handles signing and verification
* `ubirch.KeyStore` - a simple key store based on [pyjks](https://pypi.org/project/pyjks/) to store keys and certificates
> the [ubirch](https://ubirch.com) protocol uses the [Ed25519](https://ed25519.cr.yp.to/) signature scheme by default.
## Usage
Install the library: `pip install ubirch-protocol`
### Creating keypair and messages
```python
import ubirch
from uuid import UUID
import binascii
# create a keystore for the device keypair
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
# create a UUID that identifies the device and load or create a keypair
uuid = UUID(hex="575A5601FD744F8EB6AEEF592CDEE12C")
if not keystore.exists_signing_key(uuid):
keystore.create_ed25519_keypair(uuid)
# implement the _sign method of the ubirch.Protocol to use the just created keys to sign the message
class ProtocolImpl(ubirch.Protocol):
def _sign(self, uuid: UUID, message: bytes) -> bytes:
return keystore.find_signing_key(uuid).sign(message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
# create ubirch protocol messages
print(binascii.hexlify(proto.message_chained(uuid, 0x00, [1, 2, 3])))
print(binascii.hexlify(proto.message_chained(uuid, 0x00, [4, 5, 6])))
```
### Sending messages using the ubirch API
Please see [test-protocol.py](examples/test-protocol.py) for a comprehensive example, how to create a device and
send data. Below is a snipped that will send two chained messages, using a generic key/value payload.
You will need a password for the ubirch backend. Go to https://console.demo.ubirch.com to register your UUID
under `Things`. Then click on your device and copy the password from the `apiConfig`-field.
```python
import ubirch
from uuid import UUID
import binascii
from datetime import datetime
# create a keystore for the device key pair
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
# create a UUID that identifies the device and load or create a key pair
uuid = UUID(hex="575A5601FD744F8EB6AEEF592CDEE12C")
if not keystore.exists_signing_key(uuid):
keystore.create_ed25519_keypair(uuid)
# implement the _sign method of the ubirch.Protocol
class ProtocolImpl(ubirch.Protocol):
def _sign(self, _uuid: UUID, message: bytes) -> bytes:
return keystore.find_signing_key(uuid).sign(message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
# create an instance of the ubirch API and set the password
api = ubirch.API()
api.set_authentication(uuid, "<< password for the ubirch backend >>") # register your UUID at https://console.demo.ubirch.com and retrieve your password
# message 1
msg = proto.message_chained(uuid, 0x53, {'ts': int(datetime.utcnow().timestamp()), 'v': 99})
print(binascii.hexlify(msg))
# send message to ubirch backend
r = api.send(uuid, msg)
print("{}: {}".format(r.status_code, r.content))
# message 2 (chained to message 1)
msg = proto.message_chained(uuid, 0x53, {"ts": int(datetime.utcnow().timestamp()), "v": 100})
print(binascii.hexlify(msg))
# send message to ubirch backend
r = api.send(uuid, msg)
print("{}: {}".format(r.status_code, r.content))
```
### Verification of received message
```python
import ubirch
from ed25519 import VerifyingKey, BadSignatureError
from uuid import UUID
remote_uuid = UUID(hex="9d3c78ff22f34441a5d185c636d486ff")
remote_vk = VerifyingKey("a2403b92bc9add365b3cd12ff120d020647f84ea6983f98bc4c87e0f4be8cd66", encoding='hex')
# create a keystore and insert the verifying key
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
keystore.insert_ed25519_verifying_key(remote_uuid, remote_vk)
# implement the _verify method of the ubirch.Protocol
class ProtocolImpl(ubirch.Protocol):
def _verify(self, uuid: UUID, message: bytes, signature: bytes) -> dict:
return keystore.find_verifying_key(uuid).verify(signature, message)
# create an instance of the ubirch protocol
proto = ProtocolImpl()
message = bytes.fromhex(
"9623c4109d3c78ff22f34441a5d185c636d486ffc440a5b371acdfc8495790ee86802399585da50401b0d3c87f60946719338eb0283d36c0bac9b8a6a75a5385342e62932335da988b97c0ec211556db082e9f8478070081a76d657373616765bf796f7572207265717565737420686173206265656e207375626d6974746564c440c8529623a4c2335f7a8ae1eeea655768d2e9a0df141f481ced557c9dac7216e8f64ca9f6970fc6c1096ed49bcc6f7fa77d8f85d05bff5e1301588597edc9770e")
# verify the message (throws an exception if the message could not be verified)
try:
print(proto.message_verify(message))
print("verification successful!")
except BadSignatureError as e:
print("ERROR: verification failed!")
```
### Existing keys
In case you create a key pair from our demo website, use the following code to insert it into the key store:
```python
import ubirch
import ed25519
import uuid
hwDeviceId = uuid.uuid4()
keystore = ubirch.KeyStore("demo-device.jks", "keystore")
key_encoded = input("paste the encoded private key here:")
sk = ed25519.SigningKey(key_encoded, encoding='hex')
vk = sk.get_verifying_key()
keystore.insert_ed25519_keypair(hwDeviceId, vk, sk)
```
### Running the example
```bash
python3 -m venv venv3
. venv3/bin/activate
pip install -r requirements.txt
pip install ubirch-protocol
PYTHONPATH=. python3 examples/test-protocol.py
```
At the first launch the script generates a random UUID for your device and you will be asked
about the authentication token and the device group. You can safely ignore the device group, just press Enter.
The script creates a file `demo-device.ini` which is loaded upon running the script again. If
you need to change anything edit that file.
The script goes through a number of steps:
1. checks the existence of the device and deletes the device if it exists
2. registers the device with the backend
3. generates a new identity for that device and stores it in the key store
4. registers the new identity with the backend
5. sends two consecutive chained messages to the backend
### Testing
Unit tests are added to test the functionality of all objects provided in this library.
```bash
pip install -r requirements.test.txt
python3 -m pytest tests
```
# License
The protocol and its implementation are publicized under the [Apache License 2.0](LICENSE).
%prep
%autosetup -n ubirch-protocol-3.1.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-ubirch-protocol -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 3.1.0-1
- Package Spec generated
|