2021-02-10 17:54:40 +00:00
|
|
|
# PyCA cryptography
|
|
|
|
|
|
|
|
https://cryptography.io/en/latest/
|
|
|
|
|
|
|
|
## Packaging python-cryptography
|
|
|
|
|
|
|
|
The example assumes
|
|
|
|
|
|
|
|
* Fedora Rawhide (f34)
|
|
|
|
* PyCA cryptography release ``3.4``
|
2021-04-22 07:46:45 +00:00
|
|
|
* Update Bugzilla issue is ``RHBZ#00000001``
|
2021-02-10 17:54:40 +00:00
|
|
|
|
2021-04-22 07:46:45 +00:00
|
|
|
### Build new python-cryptography
|
2021-02-10 17:54:40 +00:00
|
|
|
|
|
|
|
Switch and update branch
|
|
|
|
|
|
|
|
```shell
|
|
|
|
fedpkg switch-branch rawhide
|
|
|
|
fedpkg pull
|
|
|
|
```
|
|
|
|
|
|
|
|
Bump version and get sources
|
|
|
|
|
|
|
|
```shell
|
2021-04-22 07:46:45 +00:00
|
|
|
rpmdev-bumpspec -c "Update to 3.4 (#00000001)" -n 3.4 python-cryptography.spec
|
|
|
|
spectool -gf python-cryptography.spec
|
2021-02-10 17:54:40 +00:00
|
|
|
```
|
|
|
|
|
2021-04-22 07:46:45 +00:00
|
|
|
Upload new source
|
2021-02-10 17:54:40 +00:00
|
|
|
|
|
|
|
```shell
|
2021-04-22 07:46:45 +00:00
|
|
|
fedpkg new-sources cryptography-3.4.tar.gz
|
2021-02-10 17:54:40 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Commit changes
|
|
|
|
|
|
|
|
```shell
|
|
|
|
fedpkg commit --clog
|
|
|
|
fedpkg push
|
|
|
|
```
|
|
|
|
|
2021-04-22 07:46:45 +00:00
|
|
|
Build
|
2021-02-10 17:54:40 +00:00
|
|
|
|
|
|
|
```shell
|
2021-04-22 07:46:45 +00:00
|
|
|
fedpkg build
|
2021-02-10 17:54:40 +00:00
|
|
|
```
|
|
|
|
|
2021-04-22 07:46:45 +00:00
|
|
|
## RHEL/CentOS builds
|
2021-02-10 17:54:40 +00:00
|
|
|
|
2021-04-22 07:46:45 +00:00
|
|
|
RHEL and CentOS use a different approach for Rust crates packaging than
|
|
|
|
Fedora. On Fedora Rust dependencies are packaged as RPMs, e.g.
|
|
|
|
``rust-pyo3+default-devel`` RPM. These packages don't exist on RHEL and
|
|
|
|
CentOS. Instead python-cryptography uses a tar ball with vendored crates.
|
|
|
|
The tar ball is created by a script:
|
2021-02-10 17:54:40 +00:00
|
|
|
|
|
|
|
```shell
|
2021-04-22 07:46:45 +00:00
|
|
|
./vendor_rust.py
|
|
|
|
rhpkg upload cryptography-3.4-vendor.tar.bz2
|
2021-02-10 17:54:40 +00:00
|
|
|
```
|