|
@@ -1,24 +1,37 @@
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
%define _unpackaged_files_terminate_build 1
|
|
%define _unpackaged_files_terminate_build 1
|
|
%define udev_scriptdir /lib/udev
|
|
%define udev_scriptdir /lib/udev
|
|
-
|
|
+%global systemd_dir /lib/systemd/system
|
|
|
|
+%if !%{with systemd}
|
|
|
|
+%global dbus_sys_dir %{_datadir}/dbus-1/system.d
|
|
|
|
+%else
|
|
|
|
+%global dbus_sys_dir %{_sysconfdir}/dbus-1/system.d
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+%global nm_confdir %{_prefix}/lib/%{name}
|
|
|
|
+
|
|
%define dbus_version 1.4.20
|
|
%define dbus_version 1.4.20
|
|
%define dbus_glib_version 0.96
|
|
%define dbus_glib_version 0.96
|
|
|
|
|
|
%define gtk3_version 3.8.0
|
|
%define gtk3_version 3.8.0
|
|
%define wireless_tools_version 29
|
|
%define wireless_tools_version 29
|
|
%define libnl3_version 3.2.14
|
|
%define libnl3_version 3.2.14
|
|
-%define ppp_version 2.4.7
|
|
+%define ppp_version 2.4.8
|
|
%define mm_version 1.10.4
|
|
%define mm_version 1.10.4
|
|
|
|
|
|
Name: NetworkManager
|
|
Name: NetworkManager
|
|
Summary: Network connection manager and user applications
|
|
Summary: Network connection manager and user applications
|
|
Summary(ja): ネットワーク接続マネージャとユーザアプリケーション
|
|
Summary(ja): ネットワーク接続マネージャとユーザアプリケーション
|
|
-Version: 1.20.2
|
|
+Version: 1.22.10
|
|
-Release: 1%{?snapshot}%{?_dist_release}
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
Group: System Environment/Base
|
|
Group: System Environment/Base
|
|
|
|
+
|
|
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+
|
|
License: GPLv2+
|
|
License: GPLv2+
|
|
URL: https://www.gnome.org/projects/NetworkManager/
|
|
URL: https://www.gnome.org/projects/NetworkManager/
|
|
-
|
|
|
|
%global shortver %(echo "%{version}" | sed -e 's/\.[0-9]*$//')
|
|
%global shortver %(echo "%{version}" | sed -e 's/\.[0-9]*$//')
|
|
Source: https://download.gnome.org/sources/NetworkManager/%{shortver}/%{name}-%{version}.tar.xz
|
|
Source: https://download.gnome.org/sources/NetworkManager/%{shortver}/%{name}-%{version}.tar.xz
|
|
Source2: nm-system-settings.conf
|
|
Source2: nm-system-settings.conf
|
|
@@ -40,7 +53,9 @@ Requires: ppp
|
|
Requires: avahi
|
|
Requires: avahi
|
|
Requires: dnsmasq
|
|
Requires: dnsmasq
|
|
Requires: initscripts >= 8.80.0
|
|
Requires: initscripts >= 8.80.0
|
|
|
|
+%if !%{with systemd}
|
|
Requires: eudev
|
|
Requires: eudev
|
|
|
|
+%endif
|
|
Requires: ModemManager >= %{mm_version}
|
|
Requires: ModemManager >= %{mm_version}
|
|
Requires: mobile-broadband-provider-info
|
|
Requires: mobile-broadband-provider-info
|
|
Obsoletes: dhcdbd
|
|
Obsoletes: dhcdbd
|
|
@@ -56,7 +71,6 @@ BuildRequires: polkit-devel
|
|
BuildRequires: ppp-devel >= %{ppp_version}
|
|
BuildRequires: ppp-devel >= %{ppp_version}
|
|
BuildRequires: libuuid-devel
|
|
BuildRequires: libuuid-devel
|
|
BuildRequires: nss-devel >= 3.11.7
|
|
BuildRequires: nss-devel >= 3.11.7
|
|
-BuildRequires: pkgconfig(libudev)
|
|
|
|
BuildRequires: pkgconfig(gudev-1.0)
|
|
BuildRequires: pkgconfig(gudev-1.0)
|
|
BuildRequires: pkgconfig(bluez)
|
|
BuildRequires: pkgconfig(bluez)
|
|
BuildRequires: pkgconfig(jansson)
|
|
BuildRequires: pkgconfig(jansson)
|
|
@@ -67,10 +81,12 @@ BuildRequires: ppp
|
|
BuildRequires: ModemManager-glib-devel >= %{mm_version}
|
|
BuildRequires: ModemManager-glib-devel >= %{mm_version}
|
|
BuildRequires: readline-devel
|
|
BuildRequires: readline-devel
|
|
BuildRequires: libndp-devel
|
|
BuildRequires: libndp-devel
|
|
|
|
+%if !%{with systemd}
|
|
BuildRequires: elogind-devel
|
|
BuildRequires: elogind-devel
|
|
-
|
|
+BuildRequires: pkgconfig(libudev)
|
|
-Vendor: Project Vine
|
|
+%else
|
|
-Distribution: Vine Linux
|
|
+BuildRequires: systemd-devel
|
|
|
|
+%endif
|
|
|
|
|
|
%description
|
|
%description
|
|
NetworkManager attempts to keep an active network connection available at all
|
|
NetworkManager attempts to keep an active network connection available at all
|
|
@@ -169,7 +185,8 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%setup -q
|
|
%setup -q
|
|
-
|
|
+%if !%{with systemd}
|
|
|
|
+%endif
|
|
|
|
|
|
%build
|
|
%build
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
@@ -188,11 +205,24 @@ sed -i "s|redhat-release|vine-release|g" configure
|
|
--enable-vala=yes \
|
|
--enable-vala=yes \
|
|
--enable-introspection \
|
|
--enable-introspection \
|
|
--with-pppd-plugin-dir=%{_libdir}/pppd/%{ppp_version} \
|
|
--with-pppd-plugin-dir=%{_libdir}/pppd/%{ppp_version} \
|
|
|
|
+ --enable-ppp \
|
|
--with-dist-version=%{version}-%{release} \
|
|
--with-dist-version=%{version}-%{release} \
|
|
--with-libnm-glib \
|
|
--with-libnm-glib \
|
|
--with-consolekit=no \
|
|
--with-consolekit=no \
|
|
|
|
+%if %{with systemd}
|
|
|
|
+ --with-session-tracking=systemd \
|
|
|
|
+ --with-suspend-resume=systemd \
|
|
|
|
+ --with-systemdsystemunitdir=%{systemd_dir} \
|
|
|
|
+ --with-runstatedir=%{_rundir} \
|
|
|
|
+%else
|
|
--with-session-tracking=elogind \
|
|
--with-session-tracking=elogind \
|
|
- --with-suspend-resume=elogind
|
|
+ --with-suspend-resume=elogind \
|
|
|
|
+%endif
|
|
|
|
+ --with-system-ca-path=/etc/pki/tls/cert.pem \
|
|
|
|
+ --with-dbus-sys-dir=%{dbus_sys_dir} \
|
|
|
|
+ --enable-polkit=yes \
|
|
|
|
+ --enable-polkit-agent \
|
|
|
|
+ %{nil}
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
@@ -221,8 +251,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} \;
|
|
|
|
|
|
%find_lang %{name}
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
+%if !%{with systemd}
|
|
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
|
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
|
install -m 0755 %{SOURCE1000} %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
|
|
install -m 0755 %{SOURCE1000} %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
|
|
|
|
+%endif
|
|
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/run/NetworkManager
|
|
mkdir -p %{buildroot}%{_localstatedir}/run/NetworkManager
|
|
|
|
|
|
@@ -233,18 +265,58 @@ rm -f %{buildroot}%{_libdir}/gnome-bluetooth/plugins/libnma.so
|
|
%clean
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%pre
|
|
|
|
+if [ -f "%{systemd_dir}/network-online.target.wants/NetworkManager-wait-online.service" ] ; then
|
|
|
|
+ # older versions used to install this file, effectively always enabling
|
|
|
|
+ # NetworkManager-wait-online.service. We no longer do that and rely on
|
|
|
|
+ # preset.
|
|
|
|
+ # But on package upgrade we must explicitly enable it (rh#1455704).
|
|
|
|
+ systemctl enable NetworkManager-wait-online.service || :
|
|
|
|
+fi
|
|
|
|
+%endif
|
|
|
|
|
|
%post
|
|
%post
|
|
|
|
+%if %{with systemd}
|
|
|
|
+/bin/udevadm control --reload-rules || :
|
|
|
|
+/bin/udevadm trigger --subsystem-match=net || :
|
|
|
|
+%systemd_post %{systemd_units}
|
|
|
|
+%else
|
|
|
|
+/sbin/udevadm control --reload-rules || :
|
|
|
|
+/sbin/udevadm trigger --subsystem-match=net || :
|
|
if [ "$1" == "1" ]; then
|
|
if [ "$1" == "1" ]; then
|
|
- /sbin/chkconfig --add NetworkManager
|
|
+ /sbin/chkconfig --add NetworkManager
|
|
- /sbin/chkconfig NetworkManager resetpriorities
|
|
+ /sbin/chkconfig NetworkManager resetpriorities
|
|
|
|
+fi
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+if [ "$1" == "1" ]; then
|
|
|
|
+ if [ ! -f /sbin/ifup -o -L /sbin/ifup ]; then
|
|
|
|
+ /usr/sbin/update-alternatives \
|
|
|
|
+ --install /sbin/ifup ifup %{_libexecdir}/nm-ifup 50 \
|
|
|
|
+ --slave /sbin/ifdown ifdown %{_libexecdir}/nm-ifdown
|
|
|
|
+ fi
|
|
fi
|
|
fi
|
|
|
|
|
|
%preun
|
|
%preun
|
|
if [ $1 -eq 0 ]; then
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
+%if %{with systemd}
|
|
|
|
+ # Package removal, not upgrade
|
|
|
|
+ /bin/systemctl --no-reload disable NetworkManager.service >/dev/null 2>&1 ||
|
|
|
|
+:
|
|
|
|
+ # Don't kill networking entirely just on package remove
|
|
|
|
+ #/bin/systemctl stop NetworkManager.service >/dev/null 2>&1 || :
|
|
|
|
+
|
|
|
|
+%systemd_preun NetworkManager-wait-online.service NetworkManager-dispatcher.service
|
|
|
|
+%else
|
|
/sbin/service NetworkManager stop >/dev/null 2>&1
|
|
/sbin/service NetworkManager stop >/dev/null 2>&1
|
|
killall -TERM nm-system-settings >/dev/null 2>&1
|
|
killall -TERM nm-system-settings >/dev/null 2>&1
|
|
/sbin/chkconfig --del NetworkManager
|
|
/sbin/chkconfig --del NetworkManager
|
|
|
|
+%endif
|
|
|
|
+ if [ -L /sbin/ifup ]; then
|
|
|
|
+ /usr/sbin/update-alternatives \
|
|
|
|
+ --remove ifup %{_libexecdir}/nm-ifup >/dev/null 2>&1 || :
|
|
|
|
+ fi
|
|
fi
|
|
fi
|
|
|
|
|
|
%post libnm -p /sbin/ldconfig
|
|
%post libnm -p /sbin/ldconfig
|
|
@@ -255,9 +327,16 @@ fi
|
|
%postun glib -p /sbin/ldconfig
|
|
%postun glib -p /sbin/ldconfig
|
|
%endif
|
|
%endif
|
|
|
|
|
|
|
|
+%triggerpostun -- initscripts < 8.91.16-2
|
|
|
|
+if [ ! -f /sbin/ifup -o -L /sbin/ifup ]; then
|
|
|
|
+ /usr/sbin/update-alternatives \
|
|
|
|
+ --install /sbin/ifup ifup %{_libexecdir}/nm-ifup 50 \
|
|
|
|
+ --slave /sbin/ifdown ifdown %{_libexecdir}/nm-ifdown
|
|
|
|
+fi
|
|
|
|
+
|
|
%posttrans
|
|
%posttrans
|
|
for file in `ls %{_sysconfdir}/sysconfig/network-scripts/ifcfg-*`
|
|
for file in `ls %{_sysconfdir}/sysconfig/network-scripts/ifcfg-*`
|
|
-do
|
|
+do
|
|
grep "^UUID=" $file > /dev/null 2>&1
|
|
grep "^UUID=" $file > /dev/null 2>&1
|
|
if [ "$?" != "0" ]; then
|
|
if [ "$?" != "0" ]; then
|
|
device_name=`grep "DEVICE=" $file | awk -F'=' '{print $2;}' | grep -v lo`
|
|
device_name=`grep "DEVICE=" $file | awk -F'=' '{print $2;}' | grep -v lo`
|
|
@@ -273,30 +352,50 @@ done
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-,root,root,0755)
|
|
%defattr(-,root,root,0755)
|
|
-%doc COPYING NEWS AUTHORS README CONTRIBUTING TODO
|
|
+%license COPYING
|
|
-%{_sysconfdir}/dbus-1/system.d/org.freedesktop.NetworkManager.conf
|
|
+%doc NEWS AUTHORS README CONTRIBUTING TODO
|
|
-#{_sysconfdir}/dbus-1/system.d/nm-avahi-autoipd.conf
|
|
+%{dbus_sys_dir}/*
|
|
-%{_sysconfdir}/dbus-1/system.d/nm-dispatcher.conf
|
|
|
|
-%{_sysconfdir}/dbus-1/system.d/nm-ifcfg-rh.conf
|
|
|
|
-%config %{_sysconfdir}/rc.d/init.d/NetworkManager
|
|
|
|
%{_sbindir}/%{name}
|
|
%{_sbindir}/%{name}
|
|
%dir %{_sysconfdir}/%{name}/
|
|
%dir %{_sysconfdir}/%{name}/
|
|
-%dir %{_sysconfdir}/%{name}/dispatcher.d
|
|
|
|
%dir %{_sysconfdir}/%{name}/VPN
|
|
%dir %{_sysconfdir}/%{name}/VPN
|
|
%dir %{_sysconfdir}/%{name}/conf.d
|
|
%dir %{_sysconfdir}/%{name}/conf.d
|
|
|
|
+%dir %{_sysconfdir}/%{name}/dispatcher.d
|
|
|
|
+%dir %{_sysconfdir}/%{name}/dnsmasq-shared.d
|
|
|
|
+%dir %{_sysconfdir}/%{name}/dnsmasq.d
|
|
|
|
+%dir %{_sysconfdir}/%{name}/system-connections
|
|
|
|
+%dir %{nm_confdir}
|
|
|
|
+%dir %{nm_confdir}/VPN
|
|
|
|
+%dir %{nm_confdir}/conf.d
|
|
|
|
+%dir %{nm_confdir}/dispatcher.d
|
|
|
|
+%dir %{nm_confdir}/dispatcher.d/no-wait.d
|
|
|
|
+%dir %{nm_confdir}/dispatcher.d/pre-up.d
|
|
|
|
+%dir %{nm_confdir}/dispatcher.d/pre-down.d
|
|
|
|
+%dir %{nm_confdir}/system-connections
|
|
|
|
+%ifarch x86_64
|
|
|
|
+%dir %{_libdir}/%{name}
|
|
|
|
+%endif
|
|
|
|
+%{_libdir}/%{name}/%{version}-%{release}
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{systemd_dir}/*
|
|
|
|
+%{nm_confdir}/dispatcher.d/90-nm-cloud-setup.sh
|
|
|
|
+%{nm_confdir}/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh
|
|
|
|
+%else
|
|
|
|
+%config %{_sysconfdir}/rc.d/init.d/NetworkManager
|
|
|
|
+%endif
|
|
%config(noreplace) %{_sysconfdir}/%{name}/nm-system-settings.conf
|
|
%config(noreplace) %{_sysconfdir}/%{name}/nm-system-settings.conf
|
|
%config(noreplace) %{_sysconfdir}/%{name}/conf.d/00-server.conf
|
|
%config(noreplace) %{_sysconfdir}/%{name}/conf.d/00-server.conf
|
|
%{_bindir}/nm-online
|
|
%{_bindir}/nm-online
|
|
%{_bindir}/nmcli
|
|
%{_bindir}/nmcli
|
|
#{_libexecdir}/nm-avahi-autoipd.action
|
|
#{_libexecdir}/nm-avahi-autoipd.action
|
|
|
|
+%{_libexecdir}/nm-cloud-setup
|
|
%{_libexecdir}/nm-dhcp-helper
|
|
%{_libexecdir}/nm-dhcp-helper
|
|
%{_libexecdir}/nm-dispatcher
|
|
%{_libexecdir}/nm-dispatcher
|
|
%{_libexecdir}/nm-iface-helper
|
|
%{_libexecdir}/nm-iface-helper
|
|
%{_libexecdir}/nm-ifdown
|
|
%{_libexecdir}/nm-ifdown
|
|
%{_libexecdir}/nm-ifup
|
|
%{_libexecdir}/nm-ifup
|
|
%{_libexecdir}/nm-initrd-generator
|
|
%{_libexecdir}/nm-initrd-generator
|
|
-%dir %{_libdir}/NetworkManager
|
|
+%dir %{_libdir}/pppd
|
|
-%{_libdir}/NetworkManager/%{version}-%{release}
|
|
+%dir %{_libdir}/pppd/%{ppp_version}
|
|
%{_libdir}/pppd/%{ppp_version}/nm-pppd-plugin.so
|
|
%{_libdir}/pppd/%{ppp_version}/nm-pppd-plugin.so
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man1/*
|
|
%exclude %{_mandir}/man1/nmtui*
|
|
%exclude %{_mandir}/man1/nmtui*
|
|
@@ -305,7 +404,6 @@ done
|
|
%{_mandir}/man8/*
|
|
%{_mandir}/man8/*
|
|
%dir %{_localstatedir}/run/NetworkManager
|
|
%dir %{_localstatedir}/run/NetworkManager
|
|
%dir %{_localstatedir}/lib/NetworkManager
|
|
%dir %{_localstatedir}/lib/NetworkManager
|
|
-%dir %{_sysconfdir}/NetworkManager/system-connections
|
|
|
|
%{_datadir}/bash-completion/completions/nmcli
|
|
%{_datadir}/bash-completion/completions/nmcli
|
|
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
|
|
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
|
|
%{_datadir}/polkit-1/actions/*.policy
|
|
%{_datadir}/polkit-1/actions/*.policy
|
|
@@ -378,6 +476,11 @@ done
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Wed Apr 01 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.22.10-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- built with ppp-2.4.8.
|
|
|
|
+- made ifup/ifdown selectable in alternatives.
|
|
|
|
+
|
|
* Sun Sep 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.20.2-1
|
|
* Sun Sep 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.20.2-1
|
|
- new upstream release.
|
|
- new upstream release.
|
|
- added nmtui*.
|
|
- added nmtui*.
|