[Slackbuilds-users] users and groups
rworkman at slackbuilds.org
Sat Dec 28 01:40:07 UTC 2019
On Fri, 27 Dec 2019 19:36:41 +0000
Marcelo Caballero via SlackBuilds-users <slackbuilds-users at slackbuilds.org> wrote:
> All of the SlackBuilds that required to have a user and group they
> implement a restriction that prevents the script to continue if the
> user or group is missing. I searched the FAQ and the wiki but I was
> unavailable to find anything related about this.
> For example from the avahi readme: "First, be sure you have an
> "avahi" user and group. Do this *before* you install the avahi
> package." So that means that we can run the SlackBuild without a user
> and group and then before we install the package we can add the user
> and group. But the SlackBuild will fail without user/group...
> This prevents one to build the package in a different machine
> (without to worry about users and groups) and then transfer the
> package and install it to the preferred machine. Also any custom
> script or tool for building packages it would fail without to
> modified the SlackBuild first and remove the user and group
First, let's assume that "appsomething" needs an "appsomething"
user and group at build time.
The only way to successfully build it is to create the user and
group prior to the build process. The resulting package, in that
case, will have directories and/or files owned by the "appsomething"
user and/or group, AND/OR some executable in the resulting package
will run as "appsomething" user or group and/or drop privileges
to that user/group after executing, or something alone those lines.
The above is essentially why we require the user/group to be
in place *before* running the build script.
We are aware that in many cases, the initial assumption is not
true - perhaps there are no "appsomething" user/group owned files
in the resulting package, and there's technically no reason to
require the user/group during build time. That's fine, but there's
no harm in creating it. Either way, you now have a package of
"appsomething" that you can install on the build machine, or if
you're like many users, you can copy is to a package storage and
install it on one or more other machines. For those other machines,
the advice to make sure the user/group is present before installation
is correct - for exactly the reason mentioned above about the
possibility of "appsomething" owned directories/files in the package.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 195 bytes
Desc: OpenPGP digital signature
More information about the SlackBuilds-users