summaryrefslogtreecommitdiffstats
path: root/docs/manual/adding-packages-generic.txt
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-04-12 07:14:18 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-04-25 22:56:42 +0200
commit1f3af04db77f9e9e707bd37ee85f6508aef797f2 (patch)
treed697d2aa29aaa71c77f9e3186e6d98cb697fc21b /docs/manual/adding-packages-generic.txt
parent74bdc4b9ddf6d4d2ecdd238715dcbf14292b8829 (diff)
downloadbuildroot-novena-1f3af04db77f9e9e707bd37ee85f6508aef797f2.tar.gz
buildroot-novena-1f3af04db77f9e9e707bd37ee85f6508aef797f2.zip
packages: add ability for packages to create users
Packages that install daemons may need those daemons to run as a non-root, or an otherwise non-system (eg. 'daemon'), user. Add infrastructure for packages to create users, by declaring the FOO_USERS variable that contain a makedev-syntax-like description of the user(s) to add. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Cc: Cam Hutchison <camh@xdna.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'docs/manual/adding-packages-generic.txt')
-rw-r--r--docs/manual/adding-packages-generic.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index a615ae2c9..aa94b8869 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -53,7 +53,11 @@ system is based on hand-written Makefiles or shell scripts.
36: /bin/foo f 4755 0 0 - - - - -
37: endef
38:
-39: $(eval $(generic-package))
+39: define LIBFOO_USERS
+40: foo -1 libfoo -1 * - - - LibFoo daemon
+41: endef
+42:
+43: $(eval $(generic-package))
--------------------------------
The Makefile begins on line 7 to 11 with metadata information: the
@@ -140,7 +144,10 @@ On line 31..33, we define a device-node file used by this package
On line 35..37, we define the permissions to set to specific files
installed by this package (+LIBFOO_PERMISSIONS+).
-Finally, on line 39, we call the +generic-package+ function, which
+On lines 39..41, we define a user that is used by this package (eg.
+to run a daemon as non-root) (+LIBFOO_USERS+).
+
+Finally, on line 43, we call the +generic-package+ function, which
generates, according to the variables defined previously, all the
Makefile code necessary to make your package working.
@@ -307,6 +314,11 @@ information is (assuming the package name is +libfoo+) :
You can find some documentation for this syntax in the xref:makedev-syntax[].
This variable is optional.
+* +LIBFOO_USERS+ lists the users to create for this package, if it installs
+ a program you want to run as a specific user (eg. as a daemon, or as a
+ cron-job). The syntax is similar in spirit to the makedevs one, and is
+ described in the xref:makeuser-syntax[]. This variable is optional.
+
* +LIBFOO_LICENSE+ defines the license (or licenses) under which the package
is released.
This name will appear in the manifest file produced by +make legal-info+.