2017-08-10 35 views
0

我在buildroot中添加了一個包。值得注意的是fcron-3.2.1。該文件說,把這個包中生成文件(fcron.mk):添加用戶在Buildroot中創建自定義包

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」以上,但它仍然沒有通過,只是說要請創建一個用戶。 AM我在buildroot中正確創建了所需的用戶和組?

回答

0

這是fcron構建系統,試圖將用戶和組添加到主機,因爲它顯然不考慮安裝在臨時目錄中。您需要告知fcron構建系統不要在安裝期間添加用戶和組。如果從配置選項fcron不是立即顯而易見的,您可以查看發行版如何解決它,它們也會遇到同樣的問題。可能您需要修補其Makefile.am並在fcron.mk中設置FCRON_AUTORECONF = YES

相關問題