public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/3] tmpfiles.eclass: Explicit warn on ROOT != / to avoid breakage
Date: Sun, 30 Apr 2017 21:06:54 +0200	[thread overview]
Message-ID: <20170430190655.9946-2-mgorny@gentoo.org> (raw)
In-Reply-To: <20170430190655.9946-1-mgorny@gentoo.org>

---
 eclass/tmpfiles.eclass | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass
index 9cf040de987f..018ea45d4182 100644
--- a/eclass/tmpfiles.eclass
+++ b/eclass/tmpfiles.eclass
@@ -110,7 +110,18 @@ tmpfiles_process() {
 	[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename"
 
 	# Only process tmpfiles for the currently running system
-	[[ ${ROOT} == / ]] || return 0
+	if [[ ${ROOT} != / ]]; then
+		ewarn "Warning: tmpfiles.d not processed on ROOT != /. If you do not use"
+		ewarn "a service manager supporting tmpfiles.d, you need to run"
+		ewarn "the following command after booting (or chroot-ing with all"
+		ewarn "appropriate filesystems mounted) into the ROOT:"
+		ewarn
+		ewarn "  tmpfiles --create"
+		ewarn
+		ewarn "Failure to do so may result in missing runtime directories"
+		ewarn "and failures to run programs or start services."
+		return
+	fi
 
 	if type systemd-tmpfiles &> /dev/null; then
 		systemd-tmpfiles --create "$@"
-- 
2.13.0.rc1



  reply	other threads:[~2017-04-30 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 19:06 [gentoo-dev] [PATCH 1/3] tmpfiles.eclass: Support using on non-Linux systems Michał Górny
2017-04-30 19:06 ` Michał Górny [this message]
2017-04-30 19:06 ` [gentoo-dev] [PATCH 3/3] app-portage/eix: Convert to tmpfiles.eclass (example) Michał Górny
2017-05-02 14:38 ` [gentoo-dev] [PATCH 1/3] tmpfiles.eclass: Support using on non-Linux systems William Hubbs
2017-05-02 14:56   ` Michał Górny
2017-05-02 16:21   ` Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170430190655.9946-2-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox