代码拉取完成,页面将自动刷新
%global libsomajor 1
%bcond_with doc
Summary: Network configuration tool using YAML
Name: netplan
Version: 1.1
Release: 1%{?dist}
License: GPL-3.0-only
URL: http://netplan.io/
Source0: https://github.com/canonical/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc meson
BuildRequires: pkgconfig(bash-completion) pkgconfig(glib-2.0) pkgconfig(gio-2.0) pkgconfig(libsystemd)
BuildRequires: pkgconfig(systemd) pkgconfig(yaml-0.1) pkgconfig(uuid) python3-devel python3-cffi
BuildRequires: python3dist(coverage) python3dist(netifaces) python3dist(pycodestyle) python3dist(pyflakes)
BuildRequires: python3dist(pytest) python3dist(pytest-cov) python3dist(pyyaml) python3dist(rich)
BuildRequires: pkgconfig(cmocka) python3-dbus
BuildRequires: systemd-rpm-macros systemd-udev
BuildRequires: dbus-x11
BuildRequires: %{_bindir}/find
BuildRequires: %{_sbindir}/ip
BuildRequires: %{_bindir}/ovs-vsctl
%if %{with doc}
BuildRequires: %{_bindir}/pandoc
%endif
Requires: python3dist(netifaces) python3dist(pyyaml) python3dist(rich)
Requires: %{_sbindir}/ip
Requires: dbus-common
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-default-backend
Suggests: %{name}-default-backend-NetworkManager
%description
netplan reads network configuration from /etc/netplan/*.yaml which are written by administrators,
installers, cloud image instantiations, or other OS deployments. During early boot, it generates
backend specific configuration files in /run to hand off control of devices to a particular
networking daemon.
Currently supported backends are NetworkManager and systemd-networkd.
%package libs
Summary: Network configuration tool using YAML (core library)
%description libs
netplan reads network configuration from /etc/netplan/*.yaml which are written by administrators,
installers, cloud image instantiations, or other OS deployments. During early boot, it generates
backend specific configuration files in /run to hand off control of devices to a particular
networking daemon.
This package provides Netplan's core libraries.
%package devel
Summary: Network configuration tool using YAML (development files)
Requires: %{name}-libs = %{version}-%{release}
%description devel
netplan reads network configuration from /etc/netplan/*.yaml which are written by administrators,
installers, cloud image instantiations, or other OS deployments. During early boot, it generates
backend specific configuration files in /run to hand off control of devices to a particular
networking daemon.
This package provides development headers and libraries for building applications using Netplan.
%package default-backend-NetworkManager
Summary: Network configuration tool using YAML (NetworkManager backend)
Requires: %{name} = %{version}-%{release}
Requires: NetworkManager
Requires: NetworkManager-config-server
Recommends: (NetworkManager-wifi if linux-firmware)
Suggests: NetworkManager-wifi
Conflicts: %{name}-default-backend
Provides: %{name}-default-backend
BuildArch: noarch
%description default-backend-NetworkManager
netplan reads network configuration from /etc/netplan/*.yaml which are written by administrators,
installers, cloud image instantiations, or other OS deployments. During early boot, it generates
backend specific configuration files in /run to hand off control of devices to a particular
networking daemon.
This package configures Netplan to use NetworkManager as its backend.
%prep
%autosetup -p1
sed -e "s/werror=true/werror=false/g" -i meson.build
sed -i 's/egrep/grep -E/g' tests/validate_docs.sh
%build
%meson
%meson_build
%install
%meson_install
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
mkdir -p %{buildroot}%{_prefix}/lib/%{name}
mv %{buildroot}%{python3_sitelib}/%{name}/* %{buildroot}%{python3_sitearch}/%{name}/
cat > %{buildroot}%{_prefix}/lib/%{name}/00-netplan-default-renderer-nm.yaml <<EOF
network:
renderer: NetworkManager
EOF
%check
%meson_test
%clean
rm -rf %{buildroot}/usr/lib/python3.11/site-packages/netplan/__pycache__
%files
%license COPYING
%doc %{_docdir}/%{name}/
%{_sbindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/dbus-1/system-services/io.netplan.Netplan.service
%{_datadir}/dbus-1/system.d/io.netplan.Netplan.conf
%{_systemdgeneratordir}/%{name}
%if %{with doc}
%{_mandir}/man5/%{name}.5*
%{_mandir}/man8/%{name}*.8*
%endif
%dir %{_sysconfdir}/%{name}
%dir %{_prefix}/lib/%{name}
%{_libexecdir}/%{name}/
%{_datadir}/bash-completion/completions/%{name}
%{python3_sitearch}/%{name}/
%files libs
%license COPYING
%{_libdir}/libnetplan.so.%{libsomajor}{,.*}
%files devel
%{_includedir}/%{name}/
%{_libdir}/libnetplan.so
%{_libdir}/pkgconfig/%{name}.pc
%files default-backend-NetworkManager
%{_prefix}/lib/%{name}/00-netplan-default-renderer-nm.yaml
%changelog
* Thu Sep 19 2024 Miaojun Dong <zoedong@tencent.com> - 1.1-1
- Upgrade version to 1.1 (Fix CVE-2022-4968)
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.106-2
- Rebuilt for loongarch release
* Mon Nov 20 2023 Miaojun Dong <zoedong@tencent.com> - 0.106-1
- Initial Build
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。