Stopped syncing from Fedora ELN to RHEL9

Merged RHEL8 into RHEL9

commit a65b8987f0e0e97d04fb280dbcd4ef27ddd10c85
Author: Gris Ge <fge@redhat.com>
Date:   Fri Nov 13 23:21:30 2020 +0800

    Upload new cargo vendor tarbal without crates used for windows platform.

    Resolves: RHBZ#1848817

    Signed-off-by: Gris Ge <fge@redhat.com>

Squashed remainder of RHEL8 commits

Signed-off-by: Troy Dawson <tdawson@redhat.com>
This commit is contained in:
Troy Dawson 2021-01-18 14:24:54 -08:00
parent 2b26f551ba
commit fbb3510b77
6 changed files with 76 additions and 96 deletions

8
.gitignore vendored
View File

@ -1,6 +1,12 @@
/nispor-0.4.0.tar.gz
/nispor-0.5.0-vendor.tar.xz
/nispor-0.5.0.tar.gz
/nispor-0.5.1-vendor.tar.xz
/nispor-0.5.1.tar.gz
/nispor-0.6.0.tar.gz
/nispor-0.6.0-vendor.tar.xz
/nispor-0.6.1.tar.gz
/nispor-0.6.1-vendor.tar.xz
/nispor-1.0.0.tar.gz
/nispor-1.0.0-vendor.tar.xz
/nispor-1.0.1.tar.gz
/nispor-1.0.1-vendor.tar.xz

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,54 +1,20 @@
# The check need root privilege
%bcond_with check
Name: nispor
Version: 1.0.1
Release: 1%{?dist}
Summary: Unified interface for Linux network state querying
Release: 2%{?dist}
Summary: API for network status querying
License: ASL 2.0
URL: https://github.com/nispor/nispor
Source: https://github.com/nispor/nispor/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
ExclusiveArch: %{rust_arches}
Source1: %{name}-%{version}-vendor.tar.xz
BuildRequires: pkg-config
BuildRequires: python3-devel
BuildRequires: rust-packaging
BuildRequires: systemd-devel
BuildRequires: rust-toolset
BuildRequires: systemd-rpm-macros
BuildRequires: (crate(serde/default) >= 1.0 with crate(serde/default) < 2.0)
BuildRequires: (crate(serde_derive/default) >= 1.0 with crate(serde_derive/default) < 2.0)
BuildRequires: (crate(serde_json/default) >= 1.0 with crate(serde_json/default) < 2.0)
BuildRequires: (crate(rtnetlink/default) >= 0.5.0 with crate(rtnetlink/default) < 0.6.0)
BuildRequires: (crate(netlink-packet-route/default) >= 0.5.0 with crate(netlink-packet-route/default) < 0.6.0)
BuildRequires: (crate(netlink-packet-utils/default) >= 0.3.0 with crate(netlink-packet-utils/default) < 0.4.0)
BuildRequires: (crate(netlink-sys/default) >= 0.4.0 with crate(netlink-sys/default) < 0.5.0)
BuildRequires: (crate(tokio/macros) >= 0.2.0 with crate(tokio/macros) < 0.3.0)
BuildRequires: (crate(tokio/rt-core) >= 0.2.0 with crate(tokio/rt-core) < 0.3.0)
BuildRequires: (crate(varlink/default) >= 11 with crate(varlink/default) < 12)
BuildRequires: (crate(libc/default) >= 0.2.74 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(clap/default) >= 2.33.3 with crate(clap/default) < 3.0)
BuildRequires: (crate(serde_yaml/default) >= 0.8 with crate(serde_yaml/default) < 0.9)
BuildRequires: systemd-devel
%description
Unified interface for Linux network state querying.
%package -n rust-%{name}-devel
Summary: %{summary}
BuildArch: noarch
%description -n rust-%{name}-devel
This package contains library source intended for building other packages
which use "%{name}" crate.
%package -n rust-%{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%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 python3-%{name}
Summary: %{summary}
Requires: nispor = %{?epoch:%{epoch}:}%{version}-%{release}
@ -67,14 +33,10 @@ Requires: nispor%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
This package contains C binding of %{name}.
%prep
%autosetup -n %{name}-%{version_no_tilde} -p1
%autosetup -p1
%cargo_prep
for sub_dir in lib cli clib varlink;do
pushd src/$sub_dir
%cargo_prep
popd
done
# Source1 is vendored dependencies
%cargo_prep -V 1
# The cargo_prep will create `.cargo/config` which take precedence over
# `.cargo/config.toml` shipped by upstream which fix the SONAME of cdylib.
@ -84,34 +46,29 @@ sed -i -e "s/rustflags = \[\(.\+\), \]$/rustflags = [\1, \"$_FLAGS\"]/" \
.cargo/config
%build
for sub_dir in lib cli clib varlink;do
pushd src/$sub_dir
%cargo_build
popd
done
make
pushd src/python
%py3_build
popd
%post
/sbin/ldconfig
%systemd_post nispor.service
%preun
%systemd_preun nispor.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart nispor.service
%install
pushd src/lib
%cargo_install
popd
env SKIP_PYTHON_INSTALL=1 PREFIX=%{_prefix} LIBDIR=%{_libdir} %make_install
pushd src/python
%py3_install
popd
%if %{with check}
%check
%cargo_test
%endif
%files
%doc AUTHORS CHANGELOG DEVEL.md README.md
%license LICENSE
@ -131,65 +88,60 @@ popd
%{_includedir}/nispor.h
%{_libdir}/pkgconfig/nispor.pc
%files -n rust-%{name}-devel
%license LICENSE
%{cargo_registry}/%{name}-%{version_no_tilde}/
%files -n rust-%{name}+default-devel
%ghost %{cargo_registry}/%{name}-%{version_no_tilde}/Cargo.toml
%post
%systemd_post nispor.service
%preun
%systemd_preun nispor.service
%postun
%systemd_postun_with_restart nispor.service
%changelog
* Fri Nov 13 2020 Gris Ge <fge@redhat.com> - 1.0.1-2
- Upload new cargo vendor tarbal without crates used for windows platform.
* Tue Nov 10 2020 Fernando Fernandez Mancera <ferferna@redhat.com> - 1.0.1-1
- Upgrade to 1.0.1
* Mon Nov 09 2020 Gris Ge <fge@redhat.com> - 1.0.0-2
- Fix iface type of python bonding
* Mon Nov 09 2020 Gris Ge <fge@redhat.com> - 1.0.0-1
- Upgrade to 1.0.0
* Sat Oct 10 2020 Gris Ge <fge@redhat.com> - 0.6.1-2
- Fix incorrect build requirements.
* Mon Oct 19 2020 Gris Ge <fge@redhat.com> - 0.6.1-2
- Rebuild to load the compose settings.
* Sat Oct 10 2020 Gris Ge <fge@redhat.com> - 0.6.1-1
* Tue Oct 13 2020 Gris Ge <fge@redhat.com> - 0.6.1-1
- Upgrade to 0.6.1
* Fri Oct 09 2020 Fernando Fernandez Mancera <ferferna@redhat.com> - 0.6.0-2
- VXLAN Python fix incorrect destination port
* Fri Oct 09 2020 Fernando Fernandez Mancera <ferferna@redhat.com> - 0.6.0-1
- Upgrade to 0.6.0
* Sun Sep 20 2020 Gris Ge <fge@redhat.com> - 0.5.1-1
- Upgrade to 0.5.1
* Mon Sep 07 2020 Gris Ge <fge@redhat.com> - 0.5.0-2
* Thu Sep 17 2020 Gris Ge <fge@redhat.com> - 0.5.0-3
- Trigger rebuild for CI gating
* Tue Sep 08 2020 Gris Ge <fge@redhat.com> - 0.5.0-2
- Fix the python3-nispor requirement
* Mon Sep 07 2020 Gris Ge <fge@redhat.com> - 0.5.0-1
* Fri Sep 04 2020 Gris Ge <fge@redhat.com> - 0.5.0-1
- Upgrade to 0.5.0
* Sat Aug 29 2020 Gris Ge <fge@redhat.com> - 0.4.0-3
- Fix the ldconfig
* Wed Aug 26 2020 Gris Ge <fge@redhat.com> - 0.4.0-2
- The mainpackage is not noarch.
- Remove useless-provides.
- Add ldconfig to post and postun scripts
* Wed Aug 26 2020 Gris Ge <fge@redhat.com> - 0.4.0-1
- Upgrade to 0.4.0
* Mon Aug 17 2020 Gris Ge <fge@redhat.com> - 0.3.0-2
- Fix python linux bridge vlan filter
- Fix python linux bridge vlan filtering
* Sun Aug 16 2020 Gris Ge <fge@redhat.com> - 0.3.0-1
- Upgrade to 0.3.0
* Tue Aug 11 2020 Gris Ge <fge@redhat.com> - 0.2.0-1
- Upgrade to 0.2.0
* Thu Jul 09 2020 Gris Ge <fge@redhat.com> - 0.1.1-2
- Include license and documents
* Wed Jul 08 2020 Gris Ge <fge@redhat.com> - 0.1.1-1
- Upgrade to 0.1.1
* Tue Jul 07 14:50:05 CST 2020 Gris Ge <cnfourt@gmail.com> - 0.1.0-1
- Initial package
- Initial build.

View File

@ -1 +1,2 @@
SHA512 (nispor-1.0.1.tar.gz) = 11b4ff7a895951bce04c9d03721634d9270985fbf60676d64583c33f8702ff69136c573eaf24a6aebe5ea852278e2271f5fbdfa6823be23699be917a648fc3a3
99f1af27b17459da54d0abc83e0ba5c2 nispor-1.0.1.tar.gz
aeaaf5f3b4ca661655454c5a2624c52c nispor-1.0.1-vendor.tar.xz

3
tests/npc_query.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash -ex
npc lo 2> /dev/null

12
tests/tests.yml Normal file
View File

@ -0,0 +1,12 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
remote_user: root
tests:
- npc_query_lo:
dir: .
run: ./npc_query.sh
required_packages:
- nispor