在Buildroot

时间:2017-08-10 10:32:56

标签: linux buildroot

我在buildroot中添加了一个包。特别是fcron-3.2.1。文档说将它放在包makefile(fcron.mk)中:

LIBFOO_USERS

Lists the users to create for this package, if it 
installs a program you want to run as a specific user (e.g. as a 
daemon, or as a cron-job). The syntax is similar in spirit to the 
makedevs one, and is described in the Chapter 24, Makeusers syntax 
documentation. This variable is optional.

所以我的fcron.mk文件如下所示:

#############################################################
#
# fcron
#
#############################################################

FCRON_VERSION = 3.2.1
FCRON_OVERRIDE_SRCDIR = ../fcron-3.2.1
FCRON_OVERRIDE_RSYNC = YES
FCRON_INSTALL_STAGING = YES
FCRON_INSTALL_TARGET = YES
FCRON_SITE_METHOD = local
FCRON_CONF_OPTS = --enable-shared
FCRON_SITE = www.nomad-digital.com

define FCRON_USERS
    fcron -1 fcron -1 * - - - Fcron daemon
endef

$(eval $(autotools-package))

当我尝试在buildroot中安装时,出现以下错误。

>>> fcron custom Installing to staging directory
Checking if group fcron exists ... no.
Would you like to add fcron in /etc/passwd with the following command ?
    groupadd fcron
If you use NYS, ldap, etc, you should add the group manually (say no here)
Please answer with 'y' or 'n' (default: 'y'): y
groupadd: Permission denied
groupadd cannot lock /etc/group; try again later.
Group "fcron" does not exists : please create it or choose another groupname with configure script.

我有一种感觉,我试图在主机上创建一个用户,而不是在我的buildroot图像中,但即使我回答“' n'上面,它仍然没有通过,只是说请创建一个用户。我是否在buildroot中正确创建了所需的用户和组?

1 个答案:

答案 0 :(得分:0)

fcron 构建系统尝试将用户和组添加到主机,因为它显然不考虑在临时目录中安装。您需要告诉 fcron 构建系统不要在安装期间添加用户和组。如果从 fcron 配置选项中不能立即看出这一点,您可以看看分布如何解决它,它们会遇到同样的问题。可能您需要修补其Makefile.am并在FCRON_AUTORECONF = YES中设置fcron.mk