diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-01-17 00:51:12 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 00:52:31 +0000 |
commit | 7c098b4a62c2855a321e9db893531006ff2da6e5 (patch) | |
tree | 37d5a5304ef0898d5626d6ddd77223213540c6d1 | |
parent | dbfcfbfeb28a3257c629e6ebaf3399da4b7aa087 (diff) | |
download | poky-7c098b4a62c2855a321e9db893531006ff2da6e5.tar.gz |
distcc: add systemd support
Add systemd support for distcc.
These unit files mainly use the same files in Fedora 20 as a reference.
[YOCTO #4420]
(From OE-Core rev: baae0b0e8786e26b60e17c4febd57ca1915f1e55)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/distcc/distcc_3.1.bb | 14 | ||||
-rw-r--r-- | meta/recipes-devtools/distcc/files/default | 5 | ||||
-rw-r--r-- | meta/recipes-devtools/distcc/files/distccd.service | 11 |
3 files changed, 27 insertions, 3 deletions
diff --git a/meta/recipes-devtools/distcc/distcc_3.1.bb b/meta/recipes-devtools/distcc/distcc_3.1.bb index e351a58192..c3cbd05f0e 100644 --- a/meta/recipes-devtools/distcc/distcc_3.1.bb +++ b/meta/recipes-devtools/distcc/distcc_3.1.bb | |||
@@ -22,12 +22,13 @@ SRC_URI = "http://distcc.googlecode.com/files/${BPN}-${PV}.tar.bz2 \ | |||
22 | file://separatebuilddir.patch \ | 22 | file://separatebuilddir.patch \ |
23 | file://default \ | 23 | file://default \ |
24 | file://distccmon-gnome.desktop \ | 24 | file://distccmon-gnome.desktop \ |
25 | file://distcc" | 25 | file://distcc \ |
26 | file://distccd.service" | ||
26 | 27 | ||
27 | SRC_URI[md5sum] = "a1a9d3853df7133669fffec2a9aab9f3" | 28 | SRC_URI[md5sum] = "a1a9d3853df7133669fffec2a9aab9f3" |
28 | SRC_URI[sha256sum] = "f55dbafd76bed3ce57e1bbcdab1329227808890d90f4c724fcd2d53f934ddd89" | 29 | SRC_URI[sha256sum] = "f55dbafd76bed3ce57e1bbcdab1329227808890d90f4c724fcd2d53f934ddd89" |
29 | 30 | ||
30 | inherit autotools pkgconfig update-rc.d useradd | 31 | inherit autotools pkgconfig update-rc.d useradd systemd |
31 | 32 | ||
32 | EXTRA_OECONF += "--disable-Werror PYTHON=/dev/null" | 33 | EXTRA_OECONF += "--disable-Werror PYTHON=/dev/null" |
33 | 34 | ||
@@ -40,11 +41,17 @@ USERADD_PARAM_${PN} = "--system \ | |||
40 | 41 | ||
41 | INITSCRIPT_NAME = "distcc" | 42 | INITSCRIPT_NAME = "distcc" |
42 | 43 | ||
44 | SYSTEMD_PACKAGES = "${PN}" | ||
45 | SYSTEMD_SERVICE_${PN} = "distccd.service" | ||
46 | |||
43 | do_install_append() { | 47 | do_install_append() { |
44 | install -d ${D}${sysconfdir}/init.d/ | 48 | install -d ${D}${sysconfdir}/init.d/ |
45 | install -d ${D}${sysconfdir}/default | 49 | install -d ${D}${sysconfdir}/default |
46 | install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/ | 50 | install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/ |
47 | install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc | 51 | install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc |
52 | install -d ${D}${systemd_unitdir}/system/ | ||
53 | install -m 0644 ${WORKDIR}/distccd.service ${D}${systemd_unitdir}/system | ||
54 | sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distccd.service | ||
48 | ${DESKTOPINSTALL} | 55 | ${DESKTOPINSTALL} |
49 | } | 56 | } |
50 | DESKTOPINSTALL = "" | 57 | DESKTOPINSTALL = "" |
@@ -58,7 +65,8 @@ FILES_${PN} = " ${sysconfdir} \ | |||
58 | ${bindir}/distcc \ | 65 | ${bindir}/distcc \ |
59 | ${bindir}/lsdistcc \ | 66 | ${bindir}/lsdistcc \ |
60 | ${bindir}/distccd \ | 67 | ${bindir}/distccd \ |
61 | ${bindir}/distccmon-text" | 68 | ${bindir}/distccmon-text \ |
69 | ${systemd_unitdir}/system/distccd.service" | ||
62 | FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \ | 70 | FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \ |
63 | ${datadir}/distcc" | 71 | ${datadir}/distcc" |
64 | 72 | ||
diff --git a/meta/recipes-devtools/distcc/files/default b/meta/recipes-devtools/distcc/files/default index 95290f8488..63c4159b9d 100644 --- a/meta/recipes-devtools/distcc/files/default +++ b/meta/recipes-devtools/distcc/files/default | |||
@@ -17,3 +17,8 @@ STARTDISTCC="true" | |||
17 | # ALLOWEDNETS="127.0.0.1" | 17 | # ALLOWEDNETS="127.0.0.1" |
18 | 18 | ||
19 | ALLOWEDNETS="192.168.7.0/24" | 19 | ALLOWEDNETS="192.168.7.0/24" |
20 | |||
21 | # | ||
22 | # OPTIONS is used for the systemd service file | ||
23 | # | ||
24 | OPTIONS="--allow 192.168.7.0/24" | ||
diff --git a/meta/recipes-devtools/distcc/files/distccd.service b/meta/recipes-devtools/distcc/files/distccd.service new file mode 100644 index 0000000000..0253ddf52a --- /dev/null +++ b/meta/recipes-devtools/distcc/files/distccd.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Distccd A Distributed Compilation Server | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | User=distcc | ||
7 | EnvironmentFile=-/etc/default/distcc | ||
8 | ExecStart=@BINDIR@/distccd --verbose --no-detach --daemon $OPTIONS | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||