Compare commits

..

66 commits

Author SHA1 Message Date
Gris Ge
7d49e3addc Upgrade to 2.2.57
Signed-off-by: Gris Ge <fge@redhat.com>
2025-12-09 20:51:02 +08:00
Packit
0ca843f2ec Update to 2.2.55 upstream release
- Resolves: rhbz#2414345

Upstream tag: v2.2.55
Upstream commit: 4d343091

Commit authored by Packit automation (https://packit.dev/)
2025-11-12 08:47:25 +00:00
Packit
23abcc69ee Update to 2.2.54 upstream release
- Resolves: rhbz#2405107

Upstream tag: v2.2.54
Upstream commit: 5a034cb5

Commit authored by Packit automation (https://packit.dev/)
2025-10-20 16:42:02 +00:00
Python Maint
bdb03f4c30 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:33:05 +02:00
Gris Ge
e7c2375e1f Upgrade to 2.2.52
Signed-off-by: Gris Ge <fge@redhat.com>
2025-09-18 21:40:18 +08:00
Packit
a6c562ce45 Update to 2.2.50 upstream release
- Resolves: rhbz#2391026

Upstream tag: v2.2.50
Upstream commit: 13aa57ed

Commit authored by Packit automation (https://packit.dev/)
2025-08-27 10:36:33 +08:00
Python Maint
f960cf8bda Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:02:31 +02:00
Packit
ba8c42c768 Update to 2.2.49 upstream release
- Resolves: rhbz#2385933

Upstream tag: v2.2.49
Upstream commit: 30da87be

Commit authored by Packit automation (https://packit.dev/)
2025-08-01 13:12:37 +00:00
Fedora Release Engineering
ce71231b52 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 22:52:25 +00:00
Íñigo Huguet
e14d59ed10 python: use pyproject macros
Macros based on directly calling to setup.py (%py3_*) has been
deprecated and will be removed in the future. Macros based on
pyproject.toml (%pyproject_*) should be used now.

See https://fedoraproject.org/wiki/Changes/DeprecateSetuppyMacros.

Switch to the new macros.

Signed-off-by: Íñigo Huguet <ihuguet@riseup.net>
2025-07-24 15:43:12 +02:00
Gris Ge
80fe03c349 Upgrade to 2.2.48
Signed-off-by: Gris Ge <fge@redhat.com>
2025-07-11 23:55:19 +08:00
Gris Ge
10a99f7354 test: Include error message
Signed-off-by: Gris Ge <fge@redhat.com>
2025-07-11 10:07:53 +08:00
Packit
c219b9935e Update to 2.2.47 upstream release
- Resolves: rhbz#2379363

Upstream tag: v2.2.47
Upstream commit: 6d01ecf6

Commit authored by Packit automation (https://packit.dev/)
2025-07-10 19:35:17 +00:00
Packit
b99a445432 Update to 2.2.46 upstream release
Upstream tag: v2.2.46
Upstream commit: e7fc66d4

Commit authored by Packit automation (https://packit.dev/)
2025-06-23 20:27:48 +08:00
Python Maint
35709ca98f Rebuilt for Python 3.14 2025-06-02 23:23:14 +02:00
Packit
bb5b08abc6 Update to 2.2.45 upstream release
- Resolves: rhbz#2368875

Upstream tag: v2.2.45
Upstream commit: 6a1574f9

Commit authored by Packit automation (https://packit.dev/)
2025-05-28 02:47:39 +00:00
Packit
bed009cc94 Update to 2.2.44 upstream release
- Resolves: rhbz#2354855

Upstream tag: v2.2.44
Upstream commit: 0c2ab3b4

Commit authored by Packit automation (https://packit.dev/)
2025-04-17 11:55:30 +00:00
Gris Ge
64c094a94c Add notes for bundle update with nispor and rust-netlink
Signed-off-by: Gris Ge <fge@redhat.com>
2025-04-08 15:38:00 +08:00
Gris Ge
cca6f2991f Upgrade to 2.2.43
Signed-off-by: Gris Ge <fge@redhat.com>
2025-04-02 14:48:13 +08:00
Gris Ge
3bc67a4618 Upgrade to 2.2.42
Signed-off-by: Gris Ge <fge@redhat.com>
2025-03-05 22:03:31 +08:00
Gris Ge
db95d29ae3 Fix rust-nmstate-query_apply-devel dependency
Signed-off-by: Gris Ge <fge@redhat.com>
2025-02-24 15:37:50 +08:00
Gris Ge
71bef322e8 Upgrade 2.2.41
Signed-off-by: Gris Ge <fge@redhat.com>
2025-02-24 14:58:50 +08:00
Packit
c60263f5c1 Update to 2.2.40 upstream release
- Resolves: rhbz#2341922

Upstream tag: v2.2.40
Upstream commit: c10a3f6f

Commit authored by Packit automation (https://packit.dev/)
2025-01-24 11:43:39 +00:00
Fedora Release Engineering
d73ec668f2 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 20:12:29 +00:00
Gris Ge
4cbe1d99e6 Upgrade nmstate-libs along with nmstate rpm when installed
https://issues.redhat.com/browse/RHEL-52890 suggest nmstate rpm to
depend on nmstate-libs when nmstate-libs installed, with this we can
force upgrading both nmstate-libs and nmstate at the same time.

It does not any dependency between nmstate and nmstate-libs as we are
rust project, this is purely for user experience on manual rpm upgrade.

Signed-off-by: Gris Ge <fge@redhat.com>
2024-11-29 13:15:07 +08:00
Packit
14312fee95 Update to 2.2.39 upstream release
- Resolves: rhbz#2313710

Upstream tag: v2.2.39
Upstream commit: 43bbc0b7

Commit authored by Packit automation (https://packit.dev/)
2024-11-20 09:01:56 +00:00
Gris Ge
cda27569f4 Upgrade to 2.2.35
Signed-off-by: Gris Ge <fge@redhat.com>
2024-08-24 08:13:58 +08:00
Packit
ffa5cc509c Update to 2.2.34 upstream release
- Resolves: rhbz#2302393

Upstream tag: v2.2.34
Upstream commit: 84dd568c

Commit authored by Packit automation (https://packit.dev/)
2024-08-01 21:47:06 +00:00
Fedora Release Engineering
06d7310403 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 19:35:26 +00:00
Gris Ge
95dab51ed0 Upgrade to 2.2.33
Signed-off-by: Gris Ge <fge@redhat.com>
2024-06-13 17:19:15 +08:00
Python Maint
ef31f52d33 Rebuilt for Python 3.13 2024-06-07 11:23:32 +02:00
Gris Ge
a66dfbca3c Fix cargo vendor license file
Signed-off-by: Gris Ge <fge@redhat.com>
2024-03-25 08:09:54 +08:00
Gris Ge
665de0ae7c patchelf is not required anymore
Signed-off-by: Gris Ge <fge@redhat.com>
2024-03-21 23:11:43 +08:00
Gris Ge
2c93753894 Fix ELN build by moving vendor folder to rust folder
Signed-off-by: Gris Ge <fge@redhat.com>
2024-03-21 22:28:07 +08:00
Gris Ge
130a58c8a2 Upgrade to 2.2.26
Signed-off-by: Gris Ge <fge@redhat.com>
2024-03-18 13:31:57 +08:00
Fedora Release Engineering
0e983069b7 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 09:05:30 +00:00
Fedora Release Engineering
c5b6623ec9 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 09:45:55 +00:00
Gris Ge
d2c17fdc30 Upgrade to 2.2.21
Signed-off-by: Gris Ge <fge@redhat.com>
2023-12-15 19:19:27 +08:00
Gris Ge
fc7f70b406 Use SPDX license for sub-packages
Signed-off-by: Gris Ge <fge@redhat.com>
2023-09-06 16:16:42 +08:00
Packit
25225840af [packit] 2.2.15 upstream release
Upstream tag: v2.2.15
Upstream commit: a09ca27d

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit/rpms/nmstate.git refs/heads/*:refs/remotes/packit/*
git checkout packit/2.2.15-rawhide-update-pull_from_upstream
```
2023-08-25 00:43:38 +00:00
Gris Ge
8d28bee3b4 Use SPDX license
Signed-off-by: Gris Ge <fge@redhat.com>
2023-08-21 20:20:52 +08:00
Packit
5fb767240f [packit] 2.2.14 upstream release
Upstream tag: v2.2.14
Upstream commit: c509a6a7

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit/rpms/nmstate.git refs/heads/*:refs/remotes/packit/*
git checkout packit/2.2.14-rawhide-update-pull_from_upstream
```
2023-07-27 04:44:48 +00:00
Gris Ge
0cf6b1cbad Upgrade 2.2.13
Signed-off-by: Gris Ge <fge@redhat.com>
2023-07-21 17:12:53 +08:00
Fedora Release Engineering
f0da2019bb Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 16:44:38 +00:00
Python Maint
e59491ce94 Rebuilt for Python 3.12 2023-06-14 00:43:02 +02:00
Gris Ge
898940fd21 New gpg public key and remove unused patches
Signed-off-by: Gris Ge <fge@redhat.com>
2023-06-05 16:25:38 +08:00
Packit
85faae152b [packit] 2.2.12 upstream release
Upstream tag: v2.2.12
Upstream commit: 71dd2292
2023-06-01 22:49:03 +00:00
Yaakov Selkowitz
6cdd9e7aa5 Use vendored deps for RHEL builds
RHEL does not provide individual Rust dependencies as separate packages.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2023-05-30 12:57:00 -04:00
Fabio Valentini
b3eb28c7df
Rebuild for tokio crate >= v1.24.2 (RUSTSEC-2023-0005) 2023-05-03 16:32:54 +02:00
Gris Ge
e8c90904f8 Fix error when DHCP on with auto address on STP enabled bridge
Signed-off-by: Gris Ge <fge@redhat.com>
2023-04-25 14:18:11 +08:00
Gris Ge
8aef716a1a Auto build once patch from cathay4t merged got dist-git
Signed-off-by: Gris Ge <fge@redhat.com>
2023-04-23 18:55:29 +08:00
Gris Ge
3128e422e0 Upgrade to 2.2.10
Signed-off-by: Gris Ge <fge@redhat.com>
2023-04-23 18:51:18 +08:00
Gris Ge
bea67c799a Upgrade to 2.2.9
Signed-off-by: Gris Ge <fge@redhat.com>
2023-03-23 21:53:05 +08:00
Gris Ge
aebe3709e8 Enable packit
Signed-off-by: Gris Ge <fge@redhat.com>
2023-03-22 16:22:26 +08:00
Gris Ge
59c76c1953 Upgrade to 2.2.8
Signed-off-by: Gris Ge <fge@redhat.com>
2023-03-12 14:54:43 +08:00
Fabio Valentini
0685232006
Rebuild for fixed frame pointer compiler flags in Rust RPM macros 2023-02-05 20:49:25 +01:00
Fabio Valentini
4be409df2e
Fix botched rpmautospec conversion 2023-02-05 20:48:28 +01:00
Fernando Fernandez Mancera
1289ce8baa Upgrade to 2.2.5
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2023-01-26 13:00:00 +01:00
Fernando Fernandez Mancera
ae9407560a Upgrade to 2.2.4
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2023-01-20 12:30:01 +01:00
Fedora Release Engineering
328381f9f1 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:39:39 +00:00
Gris Ge
878db1ae46 cargo: Use explicit dependency line for rust-nmstate+query_apply-devel
Resolves: RHBZ#2159314

Signed-off-by: Gris Ge <fge@redhat.com>
2023-01-16 14:35:39 +08:00
Gris Ge
16b8fe63d6 Upgrade to 2.2.3
Signed-off-by: Gris Ge <fge@redhat.com>
2023-01-09 16:08:03 +08:00
Gris Ge
6cfc035196 Fix regression of VRF support
Signed-off-by: Gris Ge <fge@redhat.com>
2022-12-18 19:15:56 +08:00
Gris Ge
999e4c93ae Upgrade to 2.2.2
Signed-off-by: Gris Ge <fge@redhat.com>
2022-12-15 11:03:36 +08:00
Gris Ge
3fd9def4c9 Add feature sub package
Signed-off-by: Gris Ge <fge@redhat.com>
2022-10-31 17:19:27 +08:00
Gris Ge
5f2fc75273 Upgrade to 2.2.0
Signed-off-by: Gris Ge <fge@redhat.com>
2022-10-18 01:32:05 +08:00
7 changed files with 257 additions and 31 deletions

92
.gitignore vendored
View file

@ -77,3 +77,95 @@
/nmstate-2.1.2.tar.gz.asc
/nmstate-2.1.4.tar.gz
/nmstate-2.1.4.tar.gz.asc
/nmstate-2.2.0.tar.gz
/nmstate-2.2.0.tar.gz.asc
/nmstate-2.2.2.tar.gz
/nmstate-2.2.2.tar.gz.asc
/nmstate-2.2.3.tar.gz.asc
/nmstate-2.2.3.tar.gz
/nmstate-2.2.4.tar.gz
/nmstate-2.2.4.tar.gz.asc
/nmstate-2.2.5.tar.gz
/nmstate-2.2.5.tar.gz.asc
/nmstate-2.2.8.tar.gz
/nmstate-2.2.8.tar.gz.asc
/nmstate-2.2.9.tar.gz
/nmstate-2.2.9.tar.gz.asc
/nmstate-2.2.10.tar.gz
/nmstate-2.2.10.tar.gz.asc
/nmstate-vendor-2.2.10.tar.xz
/nmstate-2.2.12.tar.gz
/nmstate-2.2.12.tar.gz.asc
/nmstate-vendor-2.2.12.tar.xz
/nmstate-2.2.13.tar.gz
/nmstate-2.2.13.tar.gz.asc
/nmstate-vendor-2.2.13.tar.xz
/nmstate-2.2.14.tar.gz
/nmstate-2.2.14.tar.gz.asc
/nmstate-vendor-2.2.14.tar.xz
/nmstate-2.2.15.tar.gz
/nmstate-2.2.15.tar.gz.asc
/nmstate-vendor-2.2.15.tar.xz
/nmstate-2.2.21.tar.gz
/nmstate-2.2.21.tar.gz.asc
/nmstate-vendor-2.2.21.tar.xz
/nmstate-2.2.26.tar.gz
/nmstate-2.2.26.tar.gz.asc
/nmstate-vendor-2.2.26.tar.xz
/nmstate-2.2.33.tar.gz
/nmstate-2.2.33.tar.gz.asc
/nmstate-vendor-2.2.33.tar.xz
/nmstate-2.2.34.tar.gz
/nmstate-2.2.34.tar.gz.asc
/nmstate-vendor-2.2.34.tar.xz
/nmstate-2.2.35.tar.gz
/nmstate-2.2.35.tar.gz.asc
/nmstate-vendor-2.2.35.tar.xz
/nmstate-2.2.39.tar.gz
/nmstate-2.2.39.tar.gz.asc
/nmstate-vendor-2.2.39.tar.xz
/nmstate-2.2.40.tar.gz
/nmstate-2.2.40.tar.gz.asc
/nmstate-vendor-2.2.40.tar.xz
/nmstate-2.2.41.tar.gz
/nmstate-2.2.41.tar.gz.asc
/nmstate-vendor-2.2.41.tar.xz
/nmstate-2.2.42.tar.gz
/nmstate-2.2.42.tar.gz.asc
/nmstate-vendor-2.2.42.tar.xz
/nmstate-2.2.43.tar.gz
/nmstate-2.2.43.tar.gz.asc
/nmstate-vendor-2.2.43.tar.xz
/nmstate-2.2.44.tar.gz
/nmstate-2.2.44.tar.gz.asc
/nmstate-vendor-2.2.44.tar.xz
/nmstate-2.2.45.tar.gz
/nmstate-2.2.45.tar.gz.asc
/nmstate-vendor-2.2.45.tar.xz
/nmstate-2.2.46.tar.gz
/nmstate-2.2.46.tar.gz.asc
/nmstate-vendor-2.2.46.tar.xz
/nmstate-2.2.47.tar.gz
/nmstate-2.2.47.tar.gz.asc
/nmstate-vendor-2.2.47.tar.xz
/nmstate-2.2.48.tar.gz
/nmstate-2.2.48.tar.gz.asc
/nmstate-vendor-2.2.48.tar.xz
/nmstate-2.2.49.tar.gz
/nmstate-2.2.49.tar.gz.asc
/nmstate-vendor-2.2.49.tar.xz
/nmstate-2.2.50.tar.gz
/nmstate-2.2.50.tar.gz.asc
/nmstate-vendor-2.2.50.tar.xz
/nmstate-2.2.52.tar.gz
/nmstate-2.2.52.tar.gz.asc
/nmstate-vendor-2.2.52.tar.xz
/nmstate-2.2.54.tar.gz
/nmstate-2.2.54.tar.gz.asc
/nmstate-vendor-2.2.54.tar.xz
/nmstate-2.2.55.tar.gz
/nmstate-2.2.55.tar.gz.asc
/nmstate-vendor-2.2.55.tar.xz
/nmstate-2.2.57.tar.gz
/nmstate-2.2.57.tar.gz.asc
/nmstate-vendor-2.2.57.tar.xz

29
.packit.yaml Normal file
View file

@ -0,0 +1,29 @@
---
downstream_package_name: nmstate
upstream_project_url: https://github.com/nmstate/nmstate
issue_repository: https://github.com/nmstate/nmstate
update_release: false
upstream_package_name: nmstate
upstream_tag_template: v{version}
copy_upstream_release_description: true
jobs:
# This is triggered by https://release-monitoring.org/
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-all
# This is triggered at Fedora dist-git for creating koji build after
# PR in src.fedoraproject.org been merged.
- job: koji_build
trigger: commit
allowed_pr_authors: ["packit-stg", "packit"]
dist_git_branches:
- fedora-all
# This is triggered at Fedora messaging bus about koji build finished.
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-branched

View file

@ -1,3 +1,10 @@
# nmstate
The nmstate package
The nmstate package
## Bundle update with rust-netlink and nispor
When certain nmstate update requires new release of rust-netlink or nispor,
please check this document on correct procedure:
https://docs.fedoraproject.org/en-US/package-maintainers/Package_Update_Guide/#multiple_packages

3
README.packit Normal file
View file

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 1.12.0.post1.dev13+gd51655c23.

View file

@ -2,37 +2,57 @@
%define libname libnmstate
Name: nmstate
Version: 2.1.4
Release: 1%{?dist}
Version: 2.2.57
Release: %autorelease
Summary: Declarative network manager API
License: LGPLv2+
License: Apache-2.0 AND LGPL-2.1-or-later
URL: https://github.com/%{srcname}/%{srcname}
Source0: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
Source1: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz.asc
Source2: https://nmstate.io/nmstate.gpg
BuildRequires: patchelf
Source3: %{url}/releases/download/v%{version}/%{srcname}-vendor-%{version}.tar.xz
# Force nmstate-libs upgrade along with nmstate rpm when installed
# https://issues.redhat.com/browse/RHEL-52890
Requires: (nmstate-libs%{?_isa} = %{version}-%{release} if nmstate-libs)
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: gnupg2
BuildRequires: systemd-devel
BuildRequires: systemd-rpm-macros
%if 0%{?rhel}
BuildRequires: rust-toolset
%else
BuildRequires: rust-packaging
BuildRequires: (crate(ipnet/default) >= 2.5 with crate(ipnet/default) < 3.0)
BuildRequires: (crate(clap/cargo) >= 3.1 with crate(clap/cargo) < 4.0)
BuildRequires: (crate(clap/default) >= 3.1 with crate(clap/default) < 4.0)
BuildRequires: (crate(time/std) >= 0.3 with crate(time/std) < 0.4)
BuildRequires: (crate(time/formatting) >= 0.3 with crate(time/formatting) < 0.4)
BuildRequires: (crate(time/parsing) >= 0.3 with crate(time/parsing) < 0.4)
BuildRequires: (crate(env_logger/default) >= 0.11 with crate(env_logger/default) < 0.12)
BuildRequires: (crate(libc/default) >= 0.2 with crate(libc/default) < 0.3)
BuildRequires: (crate(log/default) >= 0.4 with crate(log/default) < 0.5)
BuildRequires: (crate(nispor/default) >= 1.2.27 with crate(nispor/default) < 2.0)
BuildRequires: (crate(serde/default) >= 1.0 with crate(serde/default) < 2.0)
BuildRequires: (crate(serde/derive) >= 1.0 with crate(serde/derive) < 2.0)
BuildRequires: (crate(serde_json/default) >= 1.0 with crate(serde_json/default) < 2.0)
BuildRequires: (crate(serde_yaml/default) >= 0.8 with crate(serde_yaml/default) < 0.9)
BuildRequires: (crate(serde_yaml/default) >= 0.9 with crate(serde_yaml/default) < 1.0)
BuildRequires: (crate(uuid/v4) >= 1.1 with crate(uuid/v4) < 2.0)
BuildRequires: (crate(uuid/v5) >= 1.1 with crate(uuid/v5) < 2.0)
BuildRequires: (crate(zbus/default) >= 1.9 with crate(zbus/default) < 2.0)
BuildRequires: (crate(zvariant/default) >= 2.10 with crate(zvariant/default) < 3.0)
BuildRequires: (crate(log/default) >= 0.4 with crate(log/default) < 0.5)
BuildRequires: (crate(libc/default) >= 0.2 with crate(libc/default) < 0.3)
BuildRequires: (crate(clap/default) >= 3.1 with crate(clap/default) < 4.0)
BuildRequires: (crate(clap/cargo) >= 3.1 with crate(clap/cargo) < 4.0)
BuildRequires: (crate(ctrlc/default) >= 3.2 with crate(ctrlc/default) < 4.0)
BuildRequires: (crate(env_logger/default) >= 0.9 with crate(env_logger/default) < 1.0)
BuildRequires: (crate(nispor/default) >= 1.2.7 with crate(nispor/default) < 2.0)
BuildRequires: (crate(zbus/default) >= 5.1 with crate(zbus/default) < 6.0)
BuildRequires: (crate(zvariant/default) >= 5.1 with crate(zvariant/default) < 6.0)
BuildRequires: (crate(nix/default) >= 0.30 with crate(nix/default) < 0.31)
BuildRequires: (crate(toml/default) >= 0.9 with crate(toml/default) < 1.0)
BuildRequires: (crate(tokio/default) >= 1.3 with crate(tokio/default) < 2.0)
BuildRequires: (crate(tokio/net) >= 1.3 with crate(tokio/net) < 2.0)
BuildRequires: (crate(tokio/rt) >= 1.3 with crate(tokio/rt) < 2.0)
BuildRequires: (crate(tokio/signal) >= 1.3 with crate(tokio/signal) < 2.0)
BuildRequires: (crate(tokio/time) >= 1.3 with crate(tokio/time) < 2.0)
BuildRequires: (crate(once_cell/default) >= 1.12 with crate(once_cell/default) < 2.0)
%endif
%generate_buildrequires
pushd rust/src/python >/dev/null
%pyproject_buildrequires
popd >/dev/null
%description
Nmstate is a library with an accompanying command line tool that manages host
@ -48,7 +68,7 @@ Summary: C binding of nmstate
Recommends: NetworkManager
# Avoid automatically generated profiles
Recommends: NetworkManager-config-server
License: ASL 2.0
License: Apache-2.0
%description libs
C binding of nmstate.
@ -57,7 +77,7 @@ C binding of nmstate.
Summary: Development files for nmstate
Group: Development/Libraries
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
License: ASL 2.0
License: Apache-2.0
%description devel
Development files of nmstate C binding.
@ -65,6 +85,7 @@ Development files of nmstate C binding.
%package static
Summary: Static development files for nmstate
Group: Development/Libraries
License: Apache-2.0
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description static
@ -85,13 +106,16 @@ Suggests: NetworkManager-team
Provides: nmstate-plugin-ovsdb = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Obsoletes: nmstate-plugin-ovsdb < 2.0-1
License: Apache-2.0
%description -n python3-%{libname}
This package contains the Python 3 library for Nmstate.
%if ! 0%{?rhel}
%package -n rust-%{name}-devel
Summary: Rust crate of nmstate
BuildArch: noarch
License: Apache-2.0
%description -n rust-%{name}-devel
This package contains library source intended for building other packages
@ -100,29 +124,72 @@ which use "%{name}" crate.
%package -n rust-%{name}+default-devel
Summary: Rust crate of nmstate with default feature
BuildArch: noarch
License: Apache-2.0
%description -n rust-%{name}+default-devel
This package contains library source intended for building other packages
which use "%{name}" crate with default feature.
%package -n rust-%{name}+gen_conf-devel
Summary: Rust crate of nmstate with default feature
BuildArch: noarch
License: Apache-2.0
%description -n rust-%{name}+gen_conf-devel
This package contains library source intended for building other packages
which use "%{name}" crate with gen_conf feature.
%package -n rust-%{name}+query_apply-devel
Summary: Rust crate of nmstate with query_apply feature
BuildArch: noarch
License: Apache-2.0
# https://bugzilla.redhat.com/show_bug.cgi?id=2161128
Requires: (crate(nispor/default) >= 1.2.17 with crate(nispor/default) < 2.0)
Requires: (crate(nix/default) >= 0.26 with crate(nix/default) < 0.27)
Requires: (crate(zbus/default) >= 5.1 with crate(zbus/default) < 6.0)
%description -n rust-%{name}+query_apply-devel
This package contains library source intended for building other packages
which use "%{name}" crate with query_apply feature.
%package -n rust-%{name}+gen_revert-devel
Summary: Rust crate of nmstate with gen_revert feature
BuildArch: noarch
License: Apache-2.0
%description -n rust-%{name}+gen_revert-devel
This package contains library source intended for building other packages
which use "%{name}" crate with gen_revert feature.
%endif
%prep
gpg2 --import --import-options import-export,import-minimal \
%{SOURCE2} > ./gpgkey-mantainers.gpg
gpgv2 --keyring ./gpgkey-mantainers.gpg %{SOURCE1} %{SOURCE0}
%autosetup -p1
%autosetup -n %{name}-%{version_no_tilde} -p1 %{?rhel:-a3}
pushd rust
rm .cargo/config.toml
%if 0%{?rhel}
mv ../vendor ./
%cargo_prep -v vendor
%else
%cargo_prep
%endif
popd
%build
pushd rust
%cargo_build
%cargo_license_summary
%{cargo_license} > ../LICENSE.dependencies
%if 0%{?rhel}
%cargo_vendor_manifest
%endif
popd
pushd rust/src/python
%py3_build
%pyproject_wheel
popd
%install
@ -131,19 +198,33 @@ env SKIP_PYTHON_INSTALL=1 \
LIBDIR=%{_libdir} \
SYSCONFDIR=%{_sysconfdir} \
%make_install
patchelf --set-soname libnmstate.so.2 \
%{buildroot}/%{_libdir}/libnmstate.so.%{version}
pushd rust/src/python
%py3_install
%pyproject_install
popd
%if ! 0%{?rhel}
pushd rust/src/lib
# Fedora cargo2rpm has problem when working with worksace dependency
# https://pagure.io/fedora-rust/cargo2rpm/issue/13
# we use `cargo package` to generate the expanded Cargo.toml which
# is also the one used in crates.io
cargo package --frozen --no-verify --target-dir %{_tmppath}
tar xf %{_tmppath}/package/nmstate-%{version}.crate \
nmstate-%{version}/Cargo.toml
mv nmstate-%{version}/Cargo.toml ./Cargo.toml
# Remove worksapce Cargo.toml
rm ../../Cargo.toml
%cargo_install
popd
%endif
%files
%doc README.md
%license LICENSE.dependencies
%if 0%{?rhel}
%license rust/cargo-vendor.txt
%endif
%doc examples/
%{_mandir}/man8/nmstatectl.8*
%{_mandir}/man8/nmstate-autoconf.8*
@ -165,11 +246,12 @@ popd
%files -n python3-%{libname}
%license LICENSE
%{python3_sitelib}/%{libname}
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}-*.dist-info/
%files static
%{_libdir}/libnmstate.a
%if ! 0%{?rhel}
%files -n rust-%{name}-devel
%license LICENSE
%{cargo_registry}/%{name}-%{version}/
@ -177,5 +259,15 @@ popd
%files -n rust-%{name}+default-devel
%ghost %{cargo_registry}/%{name}-%{version}/Cargo.toml
%files -n rust-%{name}+gen_conf-devel
%ghost %{cargo_registry}/%{name}-%{version}/Cargo.toml
%files -n rust-%{name}+query_apply-devel
%ghost %{cargo_registry}/%{name}-%{version}/Cargo.toml
%files -n rust-%{name}+gen_revert-devel
%ghost %{cargo_registry}/%{name}-%{version}/Cargo.toml
%endif
%changelog
%autochangelog

View file

@ -1,3 +1,4 @@
SHA512 (nmstate-2.1.4.tar.gz) = 698aa3f2d4ac68fe8d00ca1d984ce23f1ab8433885dcea8835d9023d4bc5313620c9064fd9c59d4bd46f111cf7ac14364ae29aa8817d553cba732e23ee4bd1e2
SHA512 (nmstate-2.1.4.tar.gz.asc) = 3ada247852b7236111f57e70e9dd597f8df0c954d2da4a36496639aa55fc65805b3fd6fcfa006ee60d21d9de4f9c1eee9c72abb217fc8da459500d6effd8f1ce
SHA512 (nmstate.gpg) = 91c6b1d8aef4944520d4bdd4e90121bbbbaf772444f5eb6081cee81e17b21b66798437cdc09a117c6fc77c54d798aaa30400857aa090cb2102b47841f45cf6eb
SHA512 (nmstate-2.2.57.tar.gz) = b203455ce70e8c2f0e0d67d0b57ded8da1a8a6492bc636412b4682d15453cdb694cf33b1c84498ab50e3a42a79d3a763ef3316943b356ccab5f858df03fd0a63
SHA512 (nmstate-2.2.57.tar.gz.asc) = 972de00f4b4e18410c5aa6a6d23606ceda496c18747f7ba95e6602f21f24f8b3eaffe1d3e82aaf3e529592989f12ce1198b40c8b83abb6b7d108666b56ec7359
SHA512 (nmstate.gpg) = e465239bc2a037457c5cb105f69cb033c092708285689f906b5e40cae01e12629bec1cdee7eb6aa3a327e4fc93dfd5ce0e006b295fe5ced8df039f9098cef0bc
SHA512 (nmstate-vendor-2.2.57.tar.xz) = 88c69f1f20367acd858b25bb0e834ae7b21b4291d90b0ed62dd33c9a427f845b98fa56ba6b8d4228bc6c807f2293d77f4cd6ed7a568e6ceff19c875ef3bea6dd

View file

@ -2,6 +2,8 @@
TMP_FILE=$(mktemp /tmp/nmstate.XXXXXX.yaml)
nmstatectl show > $TMP_FILE 2>/dev/null
nmstatectl show > $TMP_FILE
nmstatectl set $TMP_FILE 2>/dev/null
cat $TMP_FILE
nmstatectl set $TMP_FILE 2>&1