diff options
author | Jonathan Liu <net147@gmail.com> | 2013-07-08 23:20:32 +1000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-07-09 17:04:40 +0100 |
commit | a8e0bfb91214f1f387b781b89340eee582496c01 (patch) | |
tree | 3df789b4341cbda89bb1365e200b8e54b29d2981 /meta-webserver/recipes-httpd | |
parent | 9d53e8111db2a1dc2a3df05926d90988c08e7dbe (diff) | |
download | meta-openembedded-a8e0bfb91214f1f387b781b89340eee582496c01.tar.gz |
nostromo: fix installed but not shipped /run and /run/nostromo warnings
Changes:
- Remove unnecessary -c option from install
- Add tmpfiles.d config to create /run/nostromo when systemd is
enabled in DISTRO_FEATURES
- Add postinst script to create /run/nostromo using tmpfiles.d if
running systemd (detected by existence of /sys/fs/cgroup/systemd),
otherwise using populate-volatile.sh if it exists
- Remove /var/log/nostromo and /var/run/nostromo from package
Signed-off-by: Jonathan Liu <net147@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-httpd')
-rw-r--r-- | meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf | 1 | ||||
-rw-r--r-- | meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb | 20 |
2 files changed, 17 insertions, 4 deletions
diff --git a/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf b/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf new file mode 100644 index 000000000..b7a9f4886 --- /dev/null +++ b/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf | |||
@@ -0,0 +1 @@ | |||
d /run/nostromo - www-data www-data - | |||
diff --git a/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb index 94c32d8a2..e34fba260 100644 --- a/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb +++ b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb | |||
@@ -7,6 +7,7 @@ SRC_URI = "http://www.nazgul.ch/dev/${BPN}-${PV}.tar.gz \ | |||
7 | file://0001-GNUmakefile-add-possibility-to-override-variables.patch \ | 7 | file://0001-GNUmakefile-add-possibility-to-override-variables.patch \ |
8 | file://nhttpd.conf \ | 8 | file://nhttpd.conf \ |
9 | file://volatiles \ | 9 | file://volatiles \ |
10 | file://tmpfiles.conf \ | ||
10 | file://nostromo \ | 11 | file://nostromo \ |
11 | " | 12 | " |
12 | 13 | ||
@@ -35,18 +36,29 @@ do_install() { | |||
35 | install -d ${D}${localstatedir}/nostromo/conf | 36 | install -d ${D}${localstatedir}/nostromo/conf |
36 | install -d ${D}${localstatedir}/nostromo/htdocs/cgi-bin | 37 | install -d ${D}${localstatedir}/nostromo/htdocs/cgi-bin |
37 | install -d ${D}${localstatedir}/nostromo/icons | 38 | install -d ${D}${localstatedir}/nostromo/icons |
38 | install -d ${D}${localstatedir}/log/nostromo | ||
39 | install -d ${D}${localstatedir}/run/nostromo | ||
40 | install -d ${D}${sysconfdir}/init.d | 39 | install -d ${D}${sysconfdir}/init.d |
41 | install -m 0644 conf/mimes ${D}${localstatedir}/nostromo/conf/mimes | 40 | install -m 0644 conf/mimes ${D}${localstatedir}/nostromo/conf/mimes |
42 | install -m 0644 ${WORKDIR}/nhttpd.conf ${D}${sysconfdir} | 41 | install -m 0644 ${WORKDIR}/nhttpd.conf ${D}${sysconfdir} |
43 | install -m 0755 ${WORKDIR}/nostromo ${D}${sysconfdir}/init.d | 42 | install -m 0755 ${WORKDIR}/nostromo ${D}${sysconfdir}/init.d |
44 | install -c -D -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/nostromo | 43 | install -D -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/nostromo |
44 | if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
45 | install -D -m 0644 ${WORKDIR}/tmpfiles.conf ${D}${sysconfdir}/tmpfiles.d/nostromo.conf | ||
46 | fi | ||
45 | install -m 0644 htdocs/index.html ${D}${localstatedir}/nostromo/htdocs/index.html | 47 | install -m 0644 htdocs/index.html ${D}${localstatedir}/nostromo/htdocs/index.html |
46 | install -m 0644 htdocs/nostromo.gif ${D}${localstatedir}/nostromo/htdocs/nostromo.gif | 48 | install -m 0644 htdocs/nostromo.gif ${D}${localstatedir}/nostromo/htdocs/nostromo.gif |
47 | install -m 0644 icons/dir.gif ${D}${localstatedir}/nostromo/icons/dir.gif | 49 | install -m 0644 icons/dir.gif ${D}${localstatedir}/nostromo/icons/dir.gif |
48 | install -m 0644 icons/file.gif ${D}${localstatedir}/nostromo/icons/file.gif | 50 | install -m 0644 icons/file.gif ${D}${localstatedir}/nostromo/icons/file.gif |
49 | chown -R www-data:www-data ${D}/${localstatedir}/nostromo ${D}/${localstatedir}/log/nostromo ${D}/${localstatedir}/run/nostromo | 51 | chown -R www-data:www-data ${D}/${localstatedir}/nostromo |
50 | } | 52 | } |
51 | 53 | ||
52 | CONFFILES_${PN} += "/var/nostromo/conf/mimes ${sysconfdir}/nhttpd.conf" | 54 | CONFFILES_${PN} += "/var/nostromo/conf/mimes ${sysconfdir}/nhttpd.conf" |
55 | |||
56 | pkg_postinst_${PN} () { | ||
57 | if [ -z "$D" ]; then | ||
58 | if [ -e /sys/fs/cgroup/systemd ]; then | ||
59 | systemd-tmpfiles --create | ||
60 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then | ||
61 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
62 | fi | ||
63 | fi | ||
64 | } | ||