Can't build for scarthgap

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't build for scarthgap

Jump to solution
696 Views
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 Kudos
Reply
1 Solution
535 Views
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.

View solution in original post

0 Kudos
Reply
3 Replies
536 Views
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 Kudos
Reply
632 Views
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 Kudos
Reply
617 Views
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 Kudos
Reply