Can't build for scarthgap

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Can't build for scarthgap

跳至解决方案
615 次查看
dvlogic
Contributor III

We have a custom target and have been using the Debian package management

PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"

When I upgraded from kirkstone to scarthgap, I get the following error as its trying to populate my rootfs "do_rootfs"

W: No sandbox user '_apt' on the system, can not drop privileges
E: Sub-process dpkg returned an error code (1)

I know building the stock "imx-image-core" works so its must be something with one of my recipes or some recipe I'm missing.  

For the life of me I can't figure out what I need to do different.

Also, If I comment out the above 2 lines, related to package management, everything builds and I end up with a working image (just without Debian package management).

0 项奖励
回复
1 解答
454 次查看
dvlogic
Contributor III

In the above github repo, the sym link lines (https://github.com/kraj/meta-openwrt/blob/a5f219e0e6a4bc32db06569079ed5785f05c5dde/recipes-core/uci/... were the cause of my apt packaging problem.  I totally overlooked that they were trying to link via the host absolute path which was obviously why it was failing.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
455 次查看
dvlogic
Contributor III

In the above github repo, the sym link lines (https://github.com/kraj/meta-openwrt/blob/a5f219e0e6a4bc32db06569079ed5785f05c5dde/recipes-core/uci/... were the cause of my apt packaging problem.  I totally overlooked that they were trying to link via the host absolute path which was obviously why it was failing.

0 项奖励
回复
551 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @dvlogic 

I hope you are doing very well.

 

It appears the log is related to the _apt system user not being present in your root filesystem. This user is required by apt to safely drop privileges when downloading or installing packages.

Please try add the below to the local.conf:

IMAGE_INSTALL:append = " apt base-passwd passwd adduser"

 

Best regards,

Salas.

0 项奖励
回复
536 次查看
dvlogic
Contributor III

Thanks for the reply, but it turns out it was something different.   Looking back at my error, I should have noticed the failure was from to my uci recipe (which is a legacy library some of our sources use when we ported from OpenWRT).

Errors were encountered while processing:
/home/fpBuild/build/tmp/work/fspimxv7-poky-linux/fsp-image-core-dev/1.0/oe-rootfs-repo/armv8a/./uci_git-r0_arm64.deb
W: No sandbox user '_apt' on the system, can not drop privileges
E: Sub-process dpkg returned an error code (1)

 By removing the uci dependency I'm able to use the Debian package manager.  

My next step is to figure out why my uci recipe is failing - it comes from here https://github.com/kraj/meta-openwrt/blob/master/recipes-core/uci/uci_git.bb

0 项奖励
回复