about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2010-12-22 04:14:05 +0100
committerMichael Biebl <biebl@debian.org>2010-12-22 04:27:57 +0100
commit626ff75cc2dd1619054aa38f523369416bb567b8 (patch)
tree7afa73c5eb3151528b80169865c38f8de75fbd41
parentdb7196a3d5bc8a3a5da5ce06a9542075d523f4fe (diff)
Enable systemd support
- Install NetworkManager.service unit file in /lib/systemd/system.
- Add --with-systemdsystemunitdir=/lib/systemd/system to configure flags.
- Add debian/patches/03-systemd.patch containing Debian specific tweaks for
  the NetworkManager.service unit file.
-rw-r--r--debian/changelog5
-rw-r--r--debian/network-manager.install1
-rw-r--r--debian/patches/03-systemd.patch18
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules1
5 files changed, 26 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 9e11e701..4f39ec0e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,11 @@ network-manager (0.8.2-3) UNRELEASED; urgency=low
     - Bump Build-Depends on debhelper to (>= 7.0.50~) for override targets.
     - Convert debian/rules to use dh.
     - Add debian/network-manager.docs.
+  * Enable systemd support
+    - Install NetworkManager.service unit file in /lib/systemd/system.
+    - Add --with-systemdsystemunitdir=/lib/systemd/system to configure flags.
+    - Add debian/patches/03-systemd.patch containing Debian specific tweaks
+      for the NetworkManager.service unit file.
 
  -- Michael Biebl <biebl@debian.org>  Wed, 22 Dec 2010 00:52:46 +0100
 
diff --git a/debian/network-manager.install b/debian/network-manager.install
index a3e07a73..a6867c12 100644
--- a/debian/network-manager.install
+++ b/debian/network-manager.install
@@ -19,4 +19,5 @@ debian/tmp/etc/dbus-1/system.d/nm-dispatcher.conf
 debian/tmp/etc/dbus-1/system.d/nm-avahi-autoipd.conf
 debian/tmp/etc/NetworkManager/dispatcher.d/
 debian/tmp/lib/udev/rules.d/*.rules
+debian/tmp/lib/systemd/system/NetworkManager.service
 debian/NetworkManager.conf etc/NetworkManager/
diff --git a/debian/patches/03-systemd.patch b/debian/patches/03-systemd.patch
new file mode 100644
index 00000000..e54abc3d
--- /dev/null
+++ b/debian/patches/03-systemd.patch
@@ -0,0 +1,18 @@
+Description: Debian specific tweaks for NetworkManager systemd service file
+ - Install an alias named network-manager.service as the legacy SysV init script
+   in Debian is called network-manager.
+ - Do not install NetworkManager into the network.target, as this will lead to a
+   dependency loop (NetworkManager is installed in /usr).
+Author: Michael Biebl <biebl@debian.org>
+diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in
+index d93fc67..5604729 100644
+--- a/data/NetworkManager.service.in
++++ b/data/NetworkManager.service.in
+@@ -8,5 +8,6 @@ BusName=org.freedesktop.NetworkManager
+ ExecStart=@sbindir@/NetworkManager --no-daemon
+ 
+ [Install]
+-WantedBy=network.target multi-user.target
++WantedBy=multi-user.target
+ Alias=dbus-org.freedesktop.NetworkManager.service
++Alias=network-manager.service
diff --git a/debian/patches/series b/debian/patches/series
index 7aabc163..c278fbe1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,6 @@
 # Debian patches for network-manager
 02-dbus_access_network_manager.patch
+03-systemd.patch
 40-umanaged-interfaces.patch
 50-bridge-interfaces.patch
 60-policy-stop-touching-etc-hosts.patch
diff --git a/debian/rules b/debian/rules
index 82072b26..5139d15e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,7 @@ override_dh_auto_configure:
 		--with-resolvconf=/sbin/resolvconf \
 		--with-dhclient=/sbin/dhclient \
 		--with-iptables=/sbin/iptables \
+		--with-systemdsystemunitdir=/lib/systemd/system \
 		--with-crypto=gnutls \
 		--disable-more-warnings \
 		--with-docs