diff options
author | Thomas Haller <thaller@redhat.com> | 2016-10-14 09:56:45 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-10-27 11:46:15 +0200 |
commit | 209b5a57fd03b6e1d1814a3020017f4404279264 (patch) | |
tree | e29f3fdbabdbcfa95f0e186bb3641e45b4874406 | |
parent | e9bf87805cf968ef4542fefb123384dbf4b5f98c (diff) | |
download | NetworkManager-209b5a57fd03b6e1d1814a3020017f4404279264.tar.gz |
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
-rw-r--r-- | contrib/fedora/rpm/05-dhcp-dhclient.conf | 11 | ||||
-rw-r--r-- | contrib/fedora/rpm/NetworkManager.spec | 22 | ||||
-rwxr-xr-x | contrib/fedora/rpm/build.sh | 2 |
3 files changed, 34 insertions, 1 deletions
diff --git a/contrib/fedora/rpm/05-dhcp-dhclient.conf b/contrib/fedora/rpm/05-dhcp-dhclient.conf new file mode 100644 index 0000000000..7f15de6f9c --- /dev/null +++ b/contrib/fedora/rpm/05-dhcp-dhclient.conf @@ -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 diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index c2e12167a6..9406a50f80 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -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 diff --git a/contrib/fedora/rpm/build.sh b/contrib/fedora/rpm/build.sh index 35336bad15..38288edc00 100755 --- a/contrib/fedora/rpm/build.sh +++ b/contrib/fedora/rpm/build.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 |