Sync SPEC with NM git
This commit is contained in:
parent
ed4473292d
commit
a2e07e734d
@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
%global real_version_major %(echo '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[0-9][0-9]*\\)\\.[0-9][0-9]*$/\\1/p')
|
%global real_version_major %(echo '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[0-9][0-9]*\\)\\.[0-9][0-9]*$/\\1/p')
|
||||||
|
|
||||||
|
%global systemd_units NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
%bcond_with meson
|
%bcond_with meson
|
||||||
@ -51,11 +53,6 @@
|
|||||||
%bcond_with test
|
%bcond_with test
|
||||||
%bcond_with lto
|
%bcond_with lto
|
||||||
%bcond_with sanitizer
|
%bcond_with sanitizer
|
||||||
%if 0%{?fedora} > 28 || 0%{?rhel} > 7
|
|
||||||
%bcond_with libnm_glib
|
|
||||||
%else
|
|
||||||
%bcond_without libnm_glib
|
|
||||||
%endif
|
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
%bcond_without connectivity_fedora
|
%bcond_without connectivity_fedora
|
||||||
%else
|
%else
|
||||||
@ -88,10 +85,37 @@
|
|||||||
%global with_modem_manager_1 0
|
%global with_modem_manager_1 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} <= 7
|
%if 0%{?fedora} >= 31 || 0%{?rhel} > 7
|
||||||
%global dhcp_default dhclient
|
|
||||||
%else
|
|
||||||
%global dhcp_default internal
|
%global dhcp_default internal
|
||||||
|
%else
|
||||||
|
%global dhcp_default dhclient
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
%global logging_backend_default journal
|
||||||
|
%global dns_rc_manager_default symlink
|
||||||
|
%else
|
||||||
|
%global logging_backend_default syslog
|
||||||
|
%global dns_rc_manager_default file
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel}
|
||||||
|
%global config_plugins_default ifcfg-rh,ibft
|
||||||
|
%global ibft_enabled yes
|
||||||
|
%else
|
||||||
|
%global config_plugins_default ifcfg-rh
|
||||||
|
%global ibft_enabled no
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
# Altough eBPF would be available on Fedora's kernel, it seems
|
||||||
|
# we often get SELinux denials (rh#1651654). But even aside them,
|
||||||
|
# bpf(BPF_MAP_CREATE, ...) randomly fails with EPERM. That might
|
||||||
|
# be related to `ulimit -l`. Anyway, this is not usable at the
|
||||||
|
# moment.
|
||||||
|
%global ebpf_enabled no
|
||||||
|
%else
|
||||||
|
%global ebpf_enabled no
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -146,7 +170,6 @@ BuildRequires: intltool
|
|||||||
BuildRequires: gettext-devel
|
BuildRequires: gettext-devel
|
||||||
|
|
||||||
BuildRequires: dbus-devel >= %{dbus_version}
|
BuildRequires: dbus-devel >= %{dbus_version}
|
||||||
BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
|
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
BuildRequires: wireless-tools-devel >= %{wireless_tools_version}
|
BuildRequires: wireless-tools-devel >= %{wireless_tools_version}
|
||||||
%endif
|
%endif
|
||||||
@ -334,37 +357,6 @@ This package contains NetworkManager support for PPP.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package glib
|
|
||||||
Summary: Libraries for adding NetworkManager support to applications (old API).
|
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: dbus >= %{dbus_version}
|
|
||||||
Requires: dbus-glib >= %{dbus_glib_version}
|
|
||||||
Conflicts: NetworkManager-libnm < %{epoch}:%{version}-%{release}
|
|
||||||
|
|
||||||
%description glib
|
|
||||||
This package contains the libraries that make it easier to use some
|
|
||||||
NetworkManager functionality from applications that use glib. This is
|
|
||||||
the older NetworkManager API. See also NetworkManager-libnm.
|
|
||||||
|
|
||||||
|
|
||||||
%package glib-devel
|
|
||||||
Summary: Header files for adding NetworkManager support to applications (old API).
|
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: %{name}-glib%{?_isa} = %{epoch}:%{version}-%{release}
|
|
||||||
Requires: glib2-devel
|
|
||||||
Requires: pkgconfig
|
|
||||||
Requires: dbus-glib-devel >= %{dbus_glib_version}
|
|
||||||
Provides: %{name}-devel = %{epoch}:%{version}-%{release}
|
|
||||||
Provides: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
|
|
||||||
Obsoletes: %{name}-devel < %{epoch}:%{version}-%{release}
|
|
||||||
|
|
||||||
%description glib-devel
|
|
||||||
This package contains the header and pkg-config files for development
|
|
||||||
applications using NetworkManager functionality from applications that
|
|
||||||
use glib.
|
|
||||||
This is the older NetworkManager API. See also NetworkManager-libnm-devel.
|
|
||||||
|
|
||||||
|
|
||||||
%package libnm
|
%package libnm
|
||||||
Summary: Libraries for adding NetworkManager support to applications (new API).
|
Summary: Libraries for adding NetworkManager support to applications (new API).
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -465,6 +457,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
|||||||
%build
|
%build
|
||||||
%if %{with meson}
|
%if %{with meson}
|
||||||
%meson \
|
%meson \
|
||||||
|
-Db_ndebug=false \
|
||||||
--warnlevel 2 \
|
--warnlevel 2 \
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
--werror \
|
--werror \
|
||||||
@ -535,10 +528,13 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
|||||||
-Dconcheck=true \
|
-Dconcheck=true \
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
-Dlibpsl=true \
|
-Dlibpsl=true \
|
||||||
-Debpf=true \
|
|
||||||
%else
|
%else
|
||||||
-Dlibpsl=false \
|
-Dlibpsl=false \
|
||||||
|
%endif
|
||||||
|
%if %{ebpf_enabled} != yes
|
||||||
-Debpf=false \
|
-Debpf=false \
|
||||||
|
%else
|
||||||
|
-Debpf=true \
|
||||||
%endif
|
%endif
|
||||||
-Dsession_tracking=systemd \
|
-Dsession_tracking=systemd \
|
||||||
-Dsuspend_resume=systemd \
|
-Dsuspend_resume=systemd \
|
||||||
@ -548,20 +544,21 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
|||||||
-Dtests=yes \
|
-Dtests=yes \
|
||||||
-Dvalgrind=no \
|
-Dvalgrind=no \
|
||||||
-Difcfg_rh=true \
|
-Difcfg_rh=true \
|
||||||
|
%if %{ibft_enabled} != yes
|
||||||
|
-Dibft=false \
|
||||||
|
%else
|
||||||
|
-Dibft=true \
|
||||||
|
%endif
|
||||||
|
-Difupdown=false \
|
||||||
%if %{with ppp}
|
%if %{with ppp}
|
||||||
-Dpppd_plugin_dir=%{_libdir}/pppd/%{ppp_version} \
|
-Dpppd_plugin_dir=%{_libdir}/pppd/%{ppp_version} \
|
||||||
-Dppp=true \
|
-Dppp=true \
|
||||||
%endif
|
%endif
|
||||||
-Ddist_version=%{version}-%{release} \
|
-Ddist_version=%{version}-%{release} \
|
||||||
-Dconfig_plugins_default='ifcfg-rh' \
|
-Dconfig_plugins_default=%{config_plugins_default} \
|
||||||
-Dconfig_dns_rc_manager_default=symlink \
|
-Dconfig_dns_rc_manager_default=%{dns_rc_manager_default} \
|
||||||
-Dconfig_logging_backend_default=journal \
|
-Dconfig_logging_backend_default=%{logging_backend_default} \
|
||||||
-Djson_validation=true \
|
-Djson_validation=true
|
||||||
%if %{with libnm_glib}
|
|
||||||
-Dlibnm_glib=true
|
|
||||||
%else
|
|
||||||
-Dlibnm_glib=false
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
@ -651,11 +648,10 @@ intltoolize --automake --copy --force
|
|||||||
--enable-concheck \
|
--enable-concheck \
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
--with-libpsl \
|
--with-libpsl \
|
||||||
--with-ebpf \
|
|
||||||
%else
|
%else
|
||||||
--without-libpsl \
|
--without-libpsl \
|
||||||
--without-ebpf \
|
|
||||||
%endif
|
%endif
|
||||||
|
--with-ebpf=%{ebpf_enabled} \
|
||||||
--with-session-tracking=systemd \
|
--with-session-tracking=systemd \
|
||||||
--with-suspend-resume=systemd \
|
--with-suspend-resume=systemd \
|
||||||
--with-systemdsystemunitdir=%{systemd_dir} \
|
--with-systemdsystemunitdir=%{systemd_dir} \
|
||||||
@ -669,20 +665,17 @@ intltoolize --automake --copy --force
|
|||||||
%endif
|
%endif
|
||||||
--with-valgrind=no \
|
--with-valgrind=no \
|
||||||
--enable-ifcfg-rh=yes \
|
--enable-ifcfg-rh=yes \
|
||||||
|
--enable-config-plugin-ibft=%{ibft_enabled} \
|
||||||
|
--enable-ifupdown=no \
|
||||||
%if %{with ppp}
|
%if %{with ppp}
|
||||||
--with-pppd-plugin-dir=%{_libdir}/pppd/%{ppp_version} \
|
--with-pppd-plugin-dir=%{_libdir}/pppd/%{ppp_version} \
|
||||||
--enable-ppp=yes \
|
--enable-ppp=yes \
|
||||||
%endif
|
%endif
|
||||||
--with-dist-version=%{version}-%{release} \
|
--with-dist-version=%{version}-%{release} \
|
||||||
--with-config-plugins-default='ifcfg-rh' \
|
--with-config-plugins-default=%{config_plugins_default} \
|
||||||
--with-config-dns-rc-manager-default=symlink \
|
--with-config-dns-rc-manager-default=%{dns_rc_manager_default} \
|
||||||
--with-config-logging-backend-default=journal \
|
--with-config-logging-backend-default=%{logging_backend_default} \
|
||||||
--enable-json-validation \
|
--enable-json-validation
|
||||||
%if %{with libnm_glib}
|
|
||||||
--with-libnm-glib
|
|
||||||
%else
|
|
||||||
--without-libnm-glib
|
|
||||||
%endif
|
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
@ -759,7 +752,7 @@ fi
|
|||||||
/usr/bin/udevadm control --reload-rules || :
|
/usr/bin/udevadm control --reload-rules || :
|
||||||
/usr/bin/udevadm trigger --subsystem-match=net || :
|
/usr/bin/udevadm trigger --subsystem-match=net || :
|
||||||
|
|
||||||
%systemd_post NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service
|
%systemd_post %{systemd_units}
|
||||||
|
|
||||||
%triggerin -- initscripts
|
%triggerin -- initscripts
|
||||||
if [ -f %{_sbindir}/ifup -a ! -L %{_sbindir}/ifup ]; then
|
if [ -f %{_sbindir}/ifup -a ! -L %{_sbindir}/ifup ]; then
|
||||||
@ -788,13 +781,10 @@ fi
|
|||||||
/usr/bin/udevadm control --reload-rules || :
|
/usr/bin/udevadm control --reload-rules || :
|
||||||
/usr/bin/udevadm trigger --subsystem-match=net || :
|
/usr/bin/udevadm trigger --subsystem-match=net || :
|
||||||
|
|
||||||
%systemd_postun
|
%systemd_postun %{systemd_units}
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?fedora} < 28
|
%if (0%{?fedora} && 0%{?fedora} < 28) || 0%{?rhel}
|
||||||
%post glib -p /sbin/ldconfig
|
|
||||||
%postun glib -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%post libnm -p /sbin/ldconfig
|
%post libnm -p /sbin/ldconfig
|
||||||
%postun libnm -p /sbin/ldconfig
|
%postun libnm -p /sbin/ldconfig
|
||||||
%endif
|
%endif
|
||||||
@ -903,47 +893,6 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{with libnm_glib}
|
|
||||||
%files glib -f %{name}.lang
|
|
||||||
%{_libdir}/libnm-glib.so.*
|
|
||||||
%{_libdir}/libnm-glib-vpn.so.*
|
|
||||||
%{_libdir}/libnm-util.so.*
|
|
||||||
%{_libdir}/girepository-1.0/NetworkManager-1.0.typelib
|
|
||||||
%{_libdir}/girepository-1.0/NMClient-1.0.typelib
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with libnm_glib}
|
|
||||||
%files glib-devel
|
|
||||||
%dir %{_includedir}/libnm-glib
|
|
||||||
%dir %{_includedir}/%{name}
|
|
||||||
%{_includedir}/libnm-glib/*.h
|
|
||||||
%{_includedir}/%{name}/%{name}.h
|
|
||||||
%{_includedir}/%{name}/NetworkManagerVPN.h
|
|
||||||
%{_includedir}/%{name}/nm-setting*.h
|
|
||||||
%{_includedir}/%{name}/nm-connection.h
|
|
||||||
%{_includedir}/%{name}/nm-utils-enum-types.h
|
|
||||||
%{_includedir}/%{name}/nm-utils.h
|
|
||||||
%{_includedir}/%{name}/nm-version.h
|
|
||||||
%{_includedir}/%{name}/nm-version-macros.h
|
|
||||||
%{_libdir}/pkgconfig/libnm-glib.pc
|
|
||||||
%{_libdir}/pkgconfig/libnm-glib-vpn.pc
|
|
||||||
%{_libdir}/pkgconfig/libnm-util.pc
|
|
||||||
%{_libdir}/pkgconfig/%{name}.pc
|
|
||||||
%{_libdir}/libnm-glib.so
|
|
||||||
%{_libdir}/libnm-glib-vpn.so
|
|
||||||
%{_libdir}/libnm-util.so
|
|
||||||
%{_datadir}/gir-1.0/NetworkManager-1.0.gir
|
|
||||||
%{_datadir}/gir-1.0/NMClient-1.0.gir
|
|
||||||
%dir %{_datadir}/gtk-doc/html/libnm-glib
|
|
||||||
%{_datadir}/gtk-doc/html/libnm-glib/*
|
|
||||||
%dir %{_datadir}/gtk-doc/html/libnm-util
|
|
||||||
%{_datadir}/gtk-doc/html/libnm-util/*
|
|
||||||
%{_datadir}/vala/vapi/libnm-*.deps
|
|
||||||
%{_datadir}/vala/vapi/libnm-*.vapi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%files libnm -f %{name}.lang
|
%files libnm -f %{name}.lang
|
||||||
%{_libdir}/libnm.so.*
|
%{_libdir}/libnm.so.*
|
||||||
%{_libdir}/girepository-1.0/NM-1.0.typelib
|
%{_libdir}/girepository-1.0/NM-1.0.typelib
|
||||||
|
Loading…
Reference in New Issue
Block a user