#7 Move the NetworkManager dispatcher script out of /etc
Closed 20 days ago by lkundrak. Opened a month ago by lkundrak.
rpms/ lkundrak/puppet lr/nm-dispatcher-dir  into  master

file modified
+15 -6

@@ -23,9 +23,15 @@ 

  %global pending_upgrade_path %{_localstatedir}/lib/rpm-state/puppet

  %global pending_upgrade_file %{pending_upgrade_path}/upgrade_pending

  

+ %if 0%{?fedora} > 30 || 0%{?rhel} > 8

+ %global nm_dispatcher_dir %{buildroot}%{_prefix}/lib/NetworkManager

+ %else

+ %global nm_dispatcher_dir %{buildroot}%{_sysconfdir}/NetworkManager

+ %endif

+ 

  Name:           puppet

  Version:        5.5.10

- Release:        5%{?dist}

+ Release:        6%{?dist}

  Summary:        A network tool for managing many disparate systems

  License:        ASL 2.0

  URL:            http://puppetlabs.com

@@ -189,10 +195,10 @@ 

  # /etc/resolv.conf and such (https://bugzilla.redhat.com/532085).

  %if 0%{?_with_systemd}

  install -Dpv -m0755 %{SOURCE3} \

-     %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/98-%{name}

+     %{buildroot}%{nm_dispatcher_dir}/dispatcher.d/98-%{name}

  %else

  install -Dpv -m0755 %{SOURCE2} \

-     %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/98-%{name}

+     %{buildroot}%{nm_dispatcher_dir}/dispatcher.d/98-%{name}

  %endif

  

  # Install the ext/ directory to %%{_datadir}/%%{name}

@@ -235,9 +241,9 @@ 

  %{_tmpfilesdir}/%{name}.conf

  %endif

  %config(noreplace) %{_sysconfdir}/logrotate.d/puppet

- %dir %{_sysconfdir}/NetworkManager

- %dir %{_sysconfdir}/NetworkManager/dispatcher.d

- %{_sysconfdir}/NetworkManager/dispatcher.d/98-puppet

+ %dir %{nm_dispatcher_dir}

+ %dir %{nm_dispatcher_dir}/dispatcher.d

+ %{nm_dispatcher_dir}/dispatcher.d/98-puppet

  

  %files headless

  %doc README.md examples

@@ -383,6 +389,9 @@ 

  exit 0

  

  %changelog

+ * Thu Aug 22 2019 Lubomir Rintel <lkundrak@v3.sk> - 5.5.10-6

+ - Move the NetworkManager dispatcher script out of /etc

+ 

  * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.10-5

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

  

It's not user configuration and shouldn't ever have been there. Except for that
it used to be the only location NetworkManager looked into. With NetworkManager
1.20 that is no longer the case and the dispatcher scripts can be moved to
/usr/lib.

Merging with the provenpackager hat on.

Pull-Request has been closed by lkundrak

20 days ago