[Nut-upsdev] Re: [nut-commits] svn commit r831 - in trunk: .
Arjen de Korte
nut+devel at de-korte.org
Sun Mar 4 10:20:13 CET 2007
>> First, this problem doesn't apply to packages, since packagers will
>> take care of ensuring that both user and group exists.
Apparently, some don't (are you listening here, Stanislav?) and so far,
this has not been a problem as long as you took care of the permissions on
the files installed. With the introduction of dev/hotplug this situation
has changed radically.
>> Next, while we can't be sure of the user/group existance, as Arjen
>> told, it's part of the install step. We can't assert this existance
>> neither at config nor install time, since for example, these are
>> created at package install time. Nor we can create these
>> automatically...
This can usually be done quite easily by pre/post installation scripts
that are executed when packages are installed via RPM for instance.
>
> I agree that we should not try to create any users as part of "make
> install". We do, however, have to do substitutions in files such as
> scripts/udev/nut-usbups.rules.in:
>
> SYSFS{idVendor}=="050d", SYSFS{idProduct}=="0751", MODE="664",
> GROUP="@RUN_AS_USER@"
>
> Since @RUN_AS_USER@ is a username, and groupnames are not equal to
> usernames in some distributions, it is not logical to use
> @RUN_AS_USER@ as a group name. Therefore, what I propose is to add to
> the ./configure script an option --with-group=groupname, analogously
> to --with-user=username.
Full ack. I have prepared a patch that takes this into account.
> The group name could default to $username if not specified.
This is where it starts to get ugly. By default we use user "nobody" and
probably the default group should be "nogroup". If someone only specifies
"--with-user=nut" we could either leave the group at "nogroup" or assume
that the group "nut" exists as well. Neither of these options is very
appealing to me. I think the better solution here would be if
--with-user=<someuser> is specified, --with-group=<whatever> is mandatory.
By doing so people are made aware that the user they created must be a
member of the specified group. I'd rather break the configuration script
in case of missing configuration options (no group is specified), than
giving up at run time.
> Users who follow the INSTALL file should have no problems.
We all know how often people don't read the instructions... :-)
Best regards, Arjen
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
More information about the Nut-upsdev
mailing list