Tizen:GBS,使用 gbs 构建 tizen 时初始化加密库 (xmlsec) 时出错
Tizen : GBS, error in initializing cryptographic library (xmlsec) when building tizen using gbs
尝试使用 gbs 为 tizen 项目构建(生成 rpms)时,我设置了 gbs,安装了 mic 并使用适当的配置文件、repos 和 url 设置了 .gbs.conf 文件。
当我尝试使用
构建目标架构 (armv7l) 时
sudo gbs build -A armv7l --debug --clean
当它尝试对临时文件夹中的构建进行签名时,
它尝试生成作者签名和分发者签名,但失败并显示 [542s] 错误:xmlsec 加密初始化失败。 以下是日志。
> [541s] Sign as platform level
> [541s] Generate Author Signature
> [541s] Key type rsa
> [541s] Package is a directory
> [542s] func=xmlSecOpenSSLAppLoadRANDFile:file=app.c:line=1499:obj=unknown:subj=RAND_load_file:error=4:crypto library function failed:file=/home/abuild/.rnd
> [542s] func=xmlSecOpenSSLAppInit:file=app.c:line=68:obj=unknown:subj=xmlSecOpenSSLAppLoadRANDFile:error=1:xmlsec library function failed:
> [542s] func=xmlSecAppCryptoInit:file=crypto.c:line=26:obj=unknown:subj=xmlSecCryptoAppInit:error=1:xmlsec library function failed:
> [542s] Error: xmlsec crypto intialization failed.
> [542s] Error: initialization failed
> [542s] Usage: xmlsec <command> [<options>] [<files>]
> [542s]
> [542s] xmlsec is a command line tool for signing, verifying, encrypting and
> [542s] decrypting XML documents. The allowed <command> values are:
> [542s] --help display this help information and exit
> [542s] --help-all display help information for all commands/options and exit
> [542s] --help-<cmd> display help information for command <cmd> and exit
> [542s] --version print version information and exit
> [542s] --keys keys XML file manipulation
> [542s] --sign sign data and output XML document
> [542s] --verify verify signed document
> [542s] --sign-tmpl create and sign dynamicaly generated signature template
> [542s] --encrypt encrypt data and output XML document
> [542s] --decrypt decrypt data from XML document
> [542s]
> [542s]
> [542s] Report bugs to http://www.aleksey.com/xmlsec/bugs.html
> [542s]
> [542s] Written by Aleksey Sanin <aleksey@aleksey.com>.
> [542s]
> [542s] Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved..
> [542s] This is free software: see the source for copying information.
> [542s]
> [542s] Failed to generate Author Signature. [1]
> [542s] Generate Distributor Signature
> [542s] Key type rsa
> [542s] Package is a directory
> [542s] func=xmlSecOpenSSLAppLoadRANDFile:file=app.c:line=1499:obj=unknown:subj=RAND_load_file:error=4:crypto library function failed:file=/home/abuild/.rnd
> [542s] func=xmlSecOpenSSLAppInit:file=app.c:line=68:obj=unknown:subj=xmlSecOpenSSLAppLoadRANDFile:error=1:xmlsec library function failed:
> [542s] func=xmlSecAppCryptoInit:file=crypto.c:line=26:obj=unknown:subj=xmlSecCryptoAppInit:error=1:xmlsec library function failed:
> [542s] Error: xmlsec crypto intialization failed.
> [542s] Error: initialization failed
> [542s] Usage: xmlsec <command> [<options>] [<files>]
> [542s]
> [542s] xmlsec is a command line tool for signing, verifying, encrypting and
> [542s] decrypting XML documents. The allowed <command> values are:
> [542s] --help display this help information and exit
> [542s] --help-all display help information for all commands/options and exit
> [542s] --help-<cmd> display help information for command <cmd> and exit
> [542s] --version print version information and exit
> [542s] --keys keys XML file manipulation
> [542s] --sign sign data and output XML document
> [542s] --verify verify signed document
> [542s] --sign-tmpl create and sign dynamicaly generated signature template
> [542s] --encrypt encrypt data and output XML document
> [542s] --decrypt decrypt data from XML document
> [542s]
> [542s]
> [542s] Report bugs to http://www.aleksey.com/xmlsec/bugs.html
> [542s]
> [542s] Written by Aleksey Sanin <aleksey@aleksey.com>.
> [542s]
> [542s] Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved..
> [542s] This is free software: see the source for copying information.
> [542s]
> [542s] Failed to generate Distributor Signature. [1]
> [542s] error: Bad exit status from /var/tmp/rpm-tmp.2K6qZw (%install)
> [542s]
> [542s]
> [542s] RPM build errors:
> [542s] Bad exit status from /var/tmp/rpm-tmp.2K6qZw (%install)
gbs.conf中的'buildroot'文件夹应该是root[=拥有的文件夹21=] 或者你应该 运行 以 root 身份构建。
"unable to write to /dev/null" 是一个错误,当您不是 root 用户时,您可能会在日志中看到该错误。这与 xmlsec 加密初始化失败的原因相同(无法加载 RAND 文件并且无法签署 signature1.xml、author-signature.xml 文件)。
因此 solution 或至少可以将 'buildroot' 更改为 /tmp/ 或根目录下的任何其他文件夹。
尝试使用 gbs 为 tizen 项目构建(生成 rpms)时,我设置了 gbs,安装了 mic 并使用适当的配置文件、repos 和 url 设置了 .gbs.conf 文件。
当我尝试使用
构建目标架构 (armv7l) 时sudo gbs build -A armv7l --debug --clean
当它尝试对临时文件夹中的构建进行签名时, 它尝试生成作者签名和分发者签名,但失败并显示 [542s] 错误:xmlsec 加密初始化失败。 以下是日志。
> [541s] Sign as platform level
> [541s] Generate Author Signature
> [541s] Key type rsa
> [541s] Package is a directory
> [542s] func=xmlSecOpenSSLAppLoadRANDFile:file=app.c:line=1499:obj=unknown:subj=RAND_load_file:error=4:crypto library function failed:file=/home/abuild/.rnd
> [542s] func=xmlSecOpenSSLAppInit:file=app.c:line=68:obj=unknown:subj=xmlSecOpenSSLAppLoadRANDFile:error=1:xmlsec library function failed:
> [542s] func=xmlSecAppCryptoInit:file=crypto.c:line=26:obj=unknown:subj=xmlSecCryptoAppInit:error=1:xmlsec library function failed:
> [542s] Error: xmlsec crypto intialization failed.
> [542s] Error: initialization failed
> [542s] Usage: xmlsec <command> [<options>] [<files>]
> [542s]
> [542s] xmlsec is a command line tool for signing, verifying, encrypting and
> [542s] decrypting XML documents. The allowed <command> values are:
> [542s] --help display this help information and exit
> [542s] --help-all display help information for all commands/options and exit
> [542s] --help-<cmd> display help information for command <cmd> and exit
> [542s] --version print version information and exit
> [542s] --keys keys XML file manipulation
> [542s] --sign sign data and output XML document
> [542s] --verify verify signed document
> [542s] --sign-tmpl create and sign dynamicaly generated signature template
> [542s] --encrypt encrypt data and output XML document
> [542s] --decrypt decrypt data from XML document
> [542s]
> [542s]
> [542s] Report bugs to http://www.aleksey.com/xmlsec/bugs.html
> [542s]
> [542s] Written by Aleksey Sanin <aleksey@aleksey.com>.
> [542s]
> [542s] Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved..
> [542s] This is free software: see the source for copying information.
> [542s]
> [542s] Failed to generate Author Signature. [1]
> [542s] Generate Distributor Signature
> [542s] Key type rsa
> [542s] Package is a directory
> [542s] func=xmlSecOpenSSLAppLoadRANDFile:file=app.c:line=1499:obj=unknown:subj=RAND_load_file:error=4:crypto library function failed:file=/home/abuild/.rnd
> [542s] func=xmlSecOpenSSLAppInit:file=app.c:line=68:obj=unknown:subj=xmlSecOpenSSLAppLoadRANDFile:error=1:xmlsec library function failed:
> [542s] func=xmlSecAppCryptoInit:file=crypto.c:line=26:obj=unknown:subj=xmlSecCryptoAppInit:error=1:xmlsec library function failed:
> [542s] Error: xmlsec crypto intialization failed.
> [542s] Error: initialization failed
> [542s] Usage: xmlsec <command> [<options>] [<files>]
> [542s]
> [542s] xmlsec is a command line tool for signing, verifying, encrypting and
> [542s] decrypting XML documents. The allowed <command> values are:
> [542s] --help display this help information and exit
> [542s] --help-all display help information for all commands/options and exit
> [542s] --help-<cmd> display help information for command <cmd> and exit
> [542s] --version print version information and exit
> [542s] --keys keys XML file manipulation
> [542s] --sign sign data and output XML document
> [542s] --verify verify signed document
> [542s] --sign-tmpl create and sign dynamicaly generated signature template
> [542s] --encrypt encrypt data and output XML document
> [542s] --decrypt decrypt data from XML document
> [542s]
> [542s]
> [542s] Report bugs to http://www.aleksey.com/xmlsec/bugs.html
> [542s]
> [542s] Written by Aleksey Sanin <aleksey@aleksey.com>.
> [542s]
> [542s] Copyright (C) 2002-2016 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved..
> [542s] This is free software: see the source for copying information.
> [542s]
> [542s] Failed to generate Distributor Signature. [1]
> [542s] error: Bad exit status from /var/tmp/rpm-tmp.2K6qZw (%install)
> [542s]
> [542s]
> [542s] RPM build errors:
> [542s] Bad exit status from /var/tmp/rpm-tmp.2K6qZw (%install)
gbs.conf中的'buildroot'文件夹应该是root[=拥有的文件夹21=] 或者你应该 运行 以 root 身份构建。
"unable to write to /dev/null" 是一个错误,当您不是 root 用户时,您可能会在日志中看到该错误。这与 xmlsec 加密初始化失败的原因相同(无法加载 RAND 文件并且无法签署 signature1.xml、author-signature.xml 文件)。
因此 solution 或至少可以将 'buildroot' 更改为 /tmp/ 或根目录下的任何其他文件夹。