diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-11-03 22:51:23 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-11-04 06:52:51 -0700 |
commit | 6e8b34a46a285da1a041946b43e5ef0aa48fc057 (patch) | |
tree | d518188825bd3fc179b25d273c704bac8dfb7071 /meta-webserver/recipes-httpd/monkey | |
parent | 3473d942743b7dc2b1d82bf5d3398416e7db6f88 (diff) | |
download | meta-openembedded-6e8b34a46a285da1a041946b43e5ef0aa48fc057.tar.gz |
monkey: Keep /var/volatile empty
/var/volatile is populated at runtime as it can be mounted from a
different partition, therefore its better to keep it empty and only
populate it during runtime.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd/monkey')
-rw-r--r-- | meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb index 1386770c8..fff406a3f 100644 --- a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb +++ b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb | |||
@@ -17,7 +17,7 @@ UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases" | |||
17 | UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz" | 17 | UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz" |
18 | 18 | ||
19 | EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \ | 19 | EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \ |
20 | -DPID_FILE=${localstatedir}/run/monkey.pid \ | 20 | -DPID_FILE=/run/monkey.pid \ |
21 | -DINSTALL_SYSCONFDIR=${sysconfdir}/monkey/ \ | 21 | -DINSTALL_SYSCONFDIR=${sysconfdir}/monkey/ \ |
22 | -DWITH_PLUGINS=* \ | 22 | -DWITH_PLUGINS=* \ |
23 | -DWITHOUT_PLUGINS=mbedtls \ | 23 | -DWITHOUT_PLUGINS=mbedtls \ |
@@ -38,10 +38,18 @@ inherit cmake pkgconfig update-rc.d systemd | |||
38 | OECMAKE_GENERATOR = "Unix Makefiles" | 38 | OECMAKE_GENERATOR = "Unix Makefiles" |
39 | 39 | ||
40 | do_install:append() { | 40 | do_install:append() { |
41 | rm -rf ${D}/run | 41 | rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/run ${D}${localstatedir}/log |
42 | rm -rf ${D}${localstatedir}/run | 42 | rmdir --ignore-fail-on-non-empty ${D}${localstatedir} |
43 | install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey | 43 | install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey |
44 | 44 | # Create /var/log/monkey in runtime. | |
45 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then | ||
46 | install -d ${D}${nonarch_libdir}/tmpfiles.d | ||
47 | echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf | ||
48 | fi | ||
49 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then | ||
50 | install -d ${D}${sysconfdir}/default/volatiles | ||
51 | echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} | ||
52 | fi | ||
45 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 53 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
46 | install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service | 54 | install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service |
47 | fi | 55 | fi |
@@ -56,8 +64,7 @@ PACKAGES += "${PN}-plugins" | |||
56 | 64 | ||
57 | FILES:${PN}-plugins = "${libdir}/monkey-*.so" | 65 | FILES:${PN}-plugins = "${libdir}/monkey-*.so" |
58 | 66 | ||
59 | FILES:${PN} += "${localstatedir}/www/monkey/ /run" | 67 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" |
60 | |||
61 | 68 | ||
62 | CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \ | 69 | CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \ |
63 | ${sysconfdir}/monkey/sites/default \ | 70 | ${sysconfdir}/monkey/sites/default \ |