diff --git a/.gitignore b/.gitignore index 9cda3e5..362c1dd 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..6985029 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/nispor.spec b/nispor.spec index 87bbf0b..d35fcb8 100644 --- a/nispor.spec +++ b/nispor.spec @@ -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 - 1.0.1-2 +- Upload new cargo vendor tarbal without crates used for windows platform. + * Tue Nov 10 2020 Fernando Fernandez Mancera - 1.0.1-1 - Upgrade to 1.0.1 -* Mon Nov 09 2020 Gris Ge - 1.0.0-2 -- Fix iface type of python bonding - * Mon Nov 09 2020 Gris Ge - 1.0.0-1 - Upgrade to 1.0.0 -* Sat Oct 10 2020 Gris Ge - 0.6.1-2 -- Fix incorrect build requirements. +* Mon Oct 19 2020 Gris Ge - 0.6.1-2 +- Rebuild to load the compose settings. -* Sat Oct 10 2020 Gris Ge - 0.6.1-1 +* Tue Oct 13 2020 Gris Ge - 0.6.1-1 - Upgrade to 0.6.1 +* Fri Oct 09 2020 Fernando Fernandez Mancera - 0.6.0-2 +- VXLAN Python fix incorrect destination port + +* Fri Oct 09 2020 Fernando Fernandez Mancera - 0.6.0-1 +- Upgrade to 0.6.0 + * Sun Sep 20 2020 Gris Ge - 0.5.1-1 - Upgrade to 0.5.1 -* Mon Sep 07 2020 Gris Ge - 0.5.0-2 +* Thu Sep 17 2020 Gris Ge - 0.5.0-3 +- Trigger rebuild for CI gating + +* Tue Sep 08 2020 Gris Ge - 0.5.0-2 - Fix the python3-nispor requirement -* Mon Sep 07 2020 Gris Ge - 0.5.0-1 +* Fri Sep 04 2020 Gris Ge - 0.5.0-1 - Upgrade to 0.5.0 +* Sat Aug 29 2020 Gris Ge - 0.4.0-3 +- Fix the ldconfig + * Wed Aug 26 2020 Gris Ge - 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 - 0.4.0-1 - Upgrade to 0.4.0 * Mon Aug 17 2020 Gris Ge - 0.3.0-2 -- Fix python linux bridge vlan filter +- Fix python linux bridge vlan filtering * Sun Aug 16 2020 Gris Ge - 0.3.0-1 - Upgrade to 0.3.0 +* Tue Aug 11 2020 Gris Ge - 0.2.0-1 +- Upgrade to 0.2.0 + * Thu Jul 09 2020 Gris Ge - 0.1.1-2 - Include license and documents * Wed Jul 08 2020 Gris Ge - 0.1.1-1 -- Upgrade to 0.1.1 - -* Tue Jul 07 14:50:05 CST 2020 Gris Ge - 0.1.0-1 -- Initial package +- Initial build. diff --git a/sources b/sources index f1e0412..26a0e26 100644 --- a/sources +++ b/sources @@ -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 diff --git a/tests/npc_query.sh b/tests/npc_query.sh new file mode 100644 index 0000000..0c478d9 --- /dev/null +++ b/tests/npc_query.sh @@ -0,0 +1,3 @@ +#!/bin/bash -ex + +npc lo 2> /dev/null diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..83046b5 --- /dev/null +++ b/tests/tests.yml @@ -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