diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2019-11-22 16:24:41 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-27 13:25:18 +0000 |
commit | 63dd6190cbd5c64780522576e8df0aef66b711d8 (patch) | |
tree | cbb09594327eec1be08cd999db870a61fa99e690 /meta | |
parent | e6254f385e3b4f63a3e59957f6511cf9ed209842 (diff) | |
download | poky-63dd6190cbd5c64780522576e8df0aef66b711d8.tar.gz |
rpcbind: use upstream systemd service
Use upstream systemd service files instead of our own service files.
This also makes sure that /run/rpcbind.sock is used which fixes the
following systemd warning:
/usr/lib/systemd/system/rpcbind.socket:5: ListenStream= references a
path below legacy directory /var/run/, updating /var/run/rpcbind.sock
\xe2\x86\x92 /run/rpcbind.sock; please update the unit file accordingly.
(From OE-Core rev: ad08385393bb0d072f2f27f5a189041037e06195)
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
5 files changed, 45 insertions, 32 deletions
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch new file mode 100644 index 0000000000..b92f2cf7b1 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/0001-systemd-use-EnvironmentFile.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From da528d5d60137f13202102b53cf178aba45849a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Agner <stefan.agner@toradex.com> | ||
3 | Date: Sun, 6 Oct 2019 00:05:54 +0200 | ||
4 | Subject: [PATCH] systemd: use EnvironmentFile | ||
5 | |||
6 | Use OE specific environment file. | ||
7 | |||
8 | Upstream-Status: Inappropriate [OE specific] | ||
9 | Signed-off-by: Stefan Agner <stefan.agner@toradex.com> | ||
10 | --- | ||
11 | configure.ac | 2 ++ | ||
12 | systemd/rpcbind.service.in | 2 +- | ||
13 | 2 files changed, 3 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 2dd9471..47a46c0 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -69,5 +69,7 @@ AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) | ||
20 | # 2 "evals" needed to expand variable names | ||
21 | AC_SUBST([_sbindir]) | ||
22 | AC_CONFIG_COMMANDS_PRE([eval eval _sbindir=$sbindir]) | ||
23 | +AC_SUBST([_sysconfdir]) | ||
24 | +AC_CONFIG_COMMANDS_PRE([eval eval _sysconfdir=$sbindir]) | ||
25 | |||
26 | AC_OUTPUT([Makefile systemd/rpcbind.service]) | ||
27 | diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in | ||
28 | index 7b1c74b..f45ee1e 100644 | ||
29 | --- a/systemd/rpcbind.service.in | ||
30 | +++ b/systemd/rpcbind.service.in | ||
31 | @@ -11,7 +11,7 @@ Wants=rpcbind.target | ||
32 | |||
33 | [Service] | ||
34 | Type=notify | ||
35 | -# distro can provide a drop-in adding EnvironmentFile=-/??? if needed. | ||
36 | +EnvironmentFile=-@_sysconfdir@/rpcbind.conf | ||
37 | ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f | ||
38 | |||
39 | [Install] | ||
40 | -- | ||
41 | 2.23.0 | ||
42 | |||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf index 2a4dfbcfbc..f423ac1788 100644 --- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf | |||
@@ -1,3 +1,3 @@ | |||
1 | # Optional arguments passed to rpcbind. | 1 | # Optional arguments passed to rpcbind. |
2 | # | 2 | # |
3 | RPCBIND_OPTS="" | 3 | RPCBIND_OPTIONS="" |
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service deleted file mode 100644 index 9cdade4959..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=RPC Bind Service | ||
3 | Requires=rpcbind.socket | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf | ||
8 | ExecStart=@SBINDIR@/rpcbind $RPCBIND_OPTS | ||
9 | SuccessExitStatus=2 | ||
10 | |||
11 | [Install] | ||
12 | Also=rpcbind.socket | ||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket deleted file mode 100644 index d63c1d9720..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=RPCbind Server Activation Socket | ||
3 | |||
4 | [Socket] | ||
5 | ListenStream=/var/run/rpcbind.sock | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=sockets.target | ||
diff --git a/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb b/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb index 19d778b6d1..aff00e56e6 100644 --- a/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb +++ b/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb | |||
@@ -13,9 +13,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ | |||
13 | SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ | 13 | SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ |
14 | file://init.d \ | 14 | file://init.d \ |
15 | file://rpcbind.conf \ | 15 | file://rpcbind.conf \ |
16 | file://rpcbind.socket \ | ||
17 | file://rpcbind.service \ | ||
18 | file://rpcbind_add_option_to_fix_port_number.patch \ | 16 | file://rpcbind_add_option_to_fix_port_number.patch \ |
17 | file://0001-systemd-use-EnvironmentFile.patch \ | ||
19 | " | 18 | " |
20 | SRC_URI[md5sum] = "ed46f09b9c0fa2d49015f6431bc5ea7b" | 19 | SRC_URI[md5sum] = "ed46f09b9c0fa2d49015f6431bc5ea7b" |
21 | SRC_URI[sha256sum] = "2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a" | 20 | SRC_URI[sha256sum] = "2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a" |
@@ -28,7 +27,7 @@ PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" | |||
28 | INITSCRIPT_NAME = "rpcbind" | 27 | INITSCRIPT_NAME = "rpcbind" |
29 | INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." | 28 | INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." |
30 | 29 | ||
31 | SYSTEMD_SERVICE_${PN} = "rpcbind.service" | 30 | SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" |
32 | 31 | ||
33 | inherit useradd | 32 | inherit useradd |
34 | 33 | ||
@@ -50,12 +49,4 @@ do_install_append () { | |||
50 | -e 's,/sbin/,${sbindir}/,g' \ | 49 | -e 's,/sbin/,${sbindir}/,g' \ |
51 | ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind | 50 | ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind |
52 | chmod 0755 ${D}${sysconfdir}/init.d/rpcbind | 51 | chmod 0755 ${D}${sysconfdir}/init.d/rpcbind |
53 | |||
54 | install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir} | ||
55 | install -d ${D}${systemd_unitdir}/system | ||
56 | install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system | ||
57 | install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system | ||
58 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
59 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
60 | ${D}${systemd_unitdir}/system/rpcbind.service | ||
61 | } | 52 | } |