mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 11:58:12 +02:00
contrib/rpm: add NetworkManager-config-dhcp-dhclient package
This allows to get rid of the dhclient requirement of NetworkManager package and moves the package dependency to the new sub package NetworkManager-config-dhcp-dhclient. For the moment, I think dhclient should still be the default choice for regular users due to dhclient providing better better previledge separation of network facing code. A user who knows that he's doing, can now however remove dhclient while keeping NetworkManager. https://bugzilla.redhat.com/show_bug.cgi?id=1204226
This commit is contained in:
parent
e9bf87805c
commit
209b5a57fd
3 changed files with 34 additions and 1 deletions
11
contrib/fedora/rpm/05-dhcp-dhclient.conf
Normal file
11
contrib/fedora/rpm/05-dhcp-dhclient.conf
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Provided by NetworkManager-config-dhcp-dhclient package
|
||||
# to enable dhclient dhcp plugin by default.
|
||||
#
|
||||
# Do not modify this file, instead
|
||||
# - uninstall the package NetworkManager-config-dhcp-dhclient
|
||||
# - shadow the file with /etc/NetworkManager/conf.d/05-dhcp-dhclient.conf
|
||||
# - overwrite main.dhcp setting in a configuration file in /etc
|
||||
#
|
||||
# See man NetworkManager.conf(5)
|
||||
[main]
|
||||
dhcp=dhclient
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
%global epoch_version 1
|
||||
|
||||
%global obsoletes_device_plugins 1:0.9.9.95-1
|
||||
%global obsoletes_dhclient 1:1.5.0
|
||||
|
||||
%global systemd_dir %{_prefix}/lib/systemd/system
|
||||
%global nmlibdir %{_prefix}/lib/%{name}
|
||||
|
|
@ -106,6 +107,7 @@ Source: __SOURCE1__
|
|||
Source1: NetworkManager.conf
|
||||
Source2: 00-server.conf
|
||||
Source3: 20-connectivity-fedora.conf
|
||||
Source4: 05-dhcp-dhclient.conf
|
||||
|
||||
#Patch1: 0001-some.patch
|
||||
|
||||
|
|
@ -116,7 +118,6 @@ Requires(postun): systemd
|
|||
Requires: dbus >= %{dbus_version}
|
||||
Requires: glib2 >= %{glib2_version}
|
||||
Requires: iproute
|
||||
Requires: dhclient >= 12:4.1.0
|
||||
Requires: libnl3 >= %{libnl3_version}
|
||||
Requires: %{name}-libnm%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Requires: ppp = %{ppp_version}
|
||||
|
|
@ -333,6 +334,18 @@ ethernet devices with no carrier.
|
|||
This package is intended to be installed by default for server
|
||||
deployments.
|
||||
|
||||
%package config-dhcp-dhclient
|
||||
Summary: NetworkManager config file to use dhclient as DHCP plugin
|
||||
Group: System Environment/Base
|
||||
BuildArch: noarch
|
||||
Requires: dhclient >= 12:4.1.0
|
||||
Provides: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: %{name} < %{obsoletes_dhclient}
|
||||
|
||||
%description config-dhcp-dhclient
|
||||
This adds a NetworkManager configuration file to configure dhclient
|
||||
as DHCP plugin.
|
||||
|
||||
%package dispatcher-routing-rules
|
||||
Summary: NetworkManager dispatcher file for advanced routing rules
|
||||
Group: System Environment/Base
|
||||
|
|
@ -426,6 +439,7 @@ intltoolize --automake --copy --force
|
|||
--with-setting-plugins-default='ifcfg-rh,ibft' \
|
||||
--with-config-dns-rc-manager-default=symlink \
|
||||
--with-config-logging-backend-default=journal \
|
||||
--with-config-dhcp-default=internal \
|
||||
--enable-json-validation
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
|
@ -446,6 +460,7 @@ mkdir -p %{buildroot}%{nmlibdir}/conf.d
|
|||
mkdir -p %{buildroot}%{nmlibdir}/VPN
|
||||
cp %{SOURCE2} %{buildroot}%{nmlibdir}/conf.d/
|
||||
cp %{SOURCE3} %{buildroot}%{nmlibdir}/conf.d/
|
||||
cp %{SOURCE4} %{buildroot}%{nmlibdir}/conf.d/
|
||||
|
||||
# create a VPN directory
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/NetworkManager/VPN
|
||||
|
|
@ -662,6 +677,11 @@ fi
|
|||
%dir %{nmlibdir}/conf.d
|
||||
%{nmlibdir}/conf.d/00-server.conf
|
||||
|
||||
%files config-dhcp-dhclient
|
||||
%dir %{nmlibdir}
|
||||
%dir %{nmlibdir}/conf.d
|
||||
%{nmlibdir}/conf.d/05-dhcp-dhclient.conf
|
||||
|
||||
%files dispatcher-routing-rules
|
||||
%{_sysconfdir}/%{name}/dispatcher.d/10-ifcfg-rh-routes.sh
|
||||
%{_sysconfdir}/%{name}/dispatcher.d/no-wait.d/10-ifcfg-rh-routes.sh
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ fi
|
|||
SOURCE_NETWORKMANAGER_CONF="$(abs_path "$SOURCE_NETWORKMANAGER_CONF" "$SCRIPTDIR/NetworkManager.conf")" || die "invalid \$SOURCE_NETWORKMANAGER_CONF argument"
|
||||
SOURCE_CONFIG_SERVER="$(abs_path "$SOURCE_CONFIG_SERVER" "$SCRIPTDIR/00-server.conf")" || die "invalid \$SOURCE_CONFIG_SERVER argument"
|
||||
SOURCE_CONFIG_CONNECTIVITY_FEDORA="$(abs_path "$SOURCE_CONFIG_CONNECTIVITY_FEDORA" "$SCRIPTDIR/20-connectivity-fedora.conf")" || die "invalid \$SOURCE_CONFIG_CONNECTIVITY_FEDORA argument"
|
||||
SOURCE_CONFIG_DHCP_DHCLIENT="$(abs_path "$SOURCE_CONFIG_DHCP_DHCLIENT" "$SCRIPTDIR/05-dhcp-dhclient.conf")" || die "invalid \$SOURCE_CONFIG_DHCP_DHCLIENT argument"
|
||||
|
||||
TEMP="$(mktemp -d "$SCRIPTDIR/NetworkManager.$DATE.XXXXXX")"
|
||||
TEMPBASE="$(basename "$TEMP")"
|
||||
|
|
@ -156,6 +157,7 @@ cp "$SOURCE" "$TEMP/SOURCES/" || die "Could not copy source $SOURCE to $TEMP/SOU
|
|||
cp "$SOURCE_NETWORKMANAGER_CONF" "$TEMP/SOURCES/NetworkManager.conf" || die "Could not copy source $SOURCE_NETWORKMANAGER_CONF to $TEMP/SOURCES"
|
||||
cp "$SOURCE_CONFIG_SERVER" "$TEMP/SOURCES/00-server.conf" || die "Could not copy source $SOURCE_CONFIG_SERVER to $TEMP/SOURCES"
|
||||
cp "$SOURCE_CONFIG_CONNECTIVITY_FEDORA" "$TEMP/SOURCES/20-connectivity-fedora.conf" || die "Could not copy source $SOURCE_CONFIG_CONNECTIVITY_FEDORA to $TEMP/SOURCES"
|
||||
cp "$SOURCE_CONFIG_DHCP_DHCLIENT" "$TEMP/SOURCES/05-dhcp-dhclient.conf" || die "Could not copy source $SOURCE_CONFIG_DHCP_DHCLIENT to $TEMP/SOURCES"
|
||||
|
||||
write_changelog
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue