Browse code

Uncomment the TasksMax val later in the deb build

The original sed placement was creating packages with an
"unsupported" tag in the package name.

Fixes #24197

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>

Christy Perez authored on 2016/07/01 05:33:21
Showing 1 changed files
... ...
@@ -1,6 +1,8 @@
1 1
 #!/usr/bin/make -f
2 2
 
3 3
 VERSION = $(shell cat VERSION)
4
+SYSTEMD_VERSION := $(shell dpkg-query -W -f='$${Version}\n' systemd | cut -d- -f1)
5
+SYSTEMD_GT_227 := $(shell [ '$(SYSTEMD_VERSION)' ] && [ '$(SYSTEMD_VERSION)' -gt 227 ] && echo true )
4 6
 
5 7
 override_dh_gencontrol:
6 8
 	# if we're on Ubuntu, we need to Recommends: apparmor
... ...
@@ -32,6 +34,10 @@ override_dh_auto_install:
32 32
 override_dh_installinit:
33 33
 	# use "docker" as our service name, not "docker-engine"
34 34
 	dh_installinit --name=docker
35
+ifeq (true, $(SYSTEMD_GT_227))
36
+	$(warning "Setting TasksMax=infinity")
37
+	sed -i -- 's/#TasksMax=infinity/TasksMax=infinity/' debian/docker-engine/lib/systemd/system/docker.service
38
+endif
35 39
 
36 40
 override_dh_installudev:
37 41
 	# match our existing priority