mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 3/4] doc: describe a strange behaviour and its solution
Date: Fri, 22 Feb 2019 11:03:02 +0100	[thread overview]
Message-ID: <20190222100303.16360-3-jbe@pengutronix.de> (raw)
In-Reply-To: <20190222100303.16360-1-jbe@pengutronix.de>

Using a unusual 'umask' leads to a strange erroneous behaviour. This was
reported on the PTXdist mailing list.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
 doc/daily_work.inc | 16 ++++++++++++++++
 doc/ref_manual.rst |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 3fc894106..74da11953 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1355,3 +1355,19 @@ shell script. This shell script makes use of some shell commands which must be
 present at run-time and thus depends on a package which provides these shell
 commands. But these shell commands are not required to build the shell script
 itself. In this case PTXdist can build both packages independently.
+
+``umask`` Pitfall
+-----------------
+
+When using PTXdist keep in mind it requires some 'always expected' permissions
+to do its job (this does not include root permissions!). But it includes some
+permissions related to file permission masks.
+
+PTXdist requires a ``umask`` of ``0022`` to be able to create files accessible
+by regular users. This is important at build-time, since it propagates to the
+generated target filesystem images as well. For example the ``install_tree``
+macro (refer :ref:`install_tree,reference`) uses the file permissions it finds
+in the build machine's filesystem also for the target filesystem image. With
+a different ``umask`` than ``0022`` at build-time this may fail badly at
+run-time with strange erroneous behaviour (for example some daemons with
+regular user permissions cannot acces their own configuration files).
diff --git a/doc/ref_manual.rst b/doc/ref_manual.rst
index 69f7fdee8..e2be86060 100644
--- a/doc/ref_manual.rst
+++ b/doc/ref_manual.rst
@@ -681,6 +681,8 @@ Copy a file from the package install directory to the root filesystem:
 
  $(call install_copy, foo, 0, 0, 0755, -, /usr/bin/foo)
 
+.. _install_tree,reference:
+
 install_tree
 ~~~~~~~~~~~~
 
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2019-02-22 10:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 10:03 [ptxdist] [PATCH 1/4] doc: BUILDTIME versus RUNTIME Juergen Borleis
2019-02-22 10:03 ` [ptxdist] [PATCH 2/4] doc: follow 'proselint' and improve the text Juergen Borleis
2019-02-22 10:03 ` Juergen Borleis [this message]
2019-02-22 10:03 ` [ptxdist] [PATCH 4/4] doc: fix missing step to setup a Python virtualenv Juergen Borleis
2019-02-22 11:37   ` Michael Olbrich

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=20190222100303.16360-3-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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