Dear Yocto community,

I know it is not ideal, but I need to install a package in the building host 
that is close source. Because of it, I just received the deb package without 
the source code. This deb package only needs to run on the building host aka 
native, but I am unable to achieve it. This is how the recipe look like:

SUMMARY = "Recipe for installing deb package"
DESCRIPTION = "It installs own deb package"
HOMEPAGE = ""
LICENSE = "CLOSED"

DEPENDS = "dpkg-native ldconfig-native virtual/fakeroot-native"

SRC_URI = "file://close-source-deb-file.amd64.deb;unpack=0"

fakeroot do_install : append () {
touch ${ STAGING_DIR_NATIVE } / var / lib / dpkg / status
${ STAGING_BINDIR_NATIVE } / dpkg -- force architecture -- instdir = ${ D } / \
-- admindir = ${ STAGING_DIR_NATIVE } / var / lib / dpkg / \
- i ${ WORKDIR } / close - source - deb - file. amd64. deb
}
do_install [ depends ] += "virtual/fakeroot-native:do_populate_sysroot"

FILES : ${ PN } += " \
/usr/* \
/etc/* \
"
However, when I tried to run this recipe I got stuck in the extraction part of 
the process with the error "Cannot change ownership":

| NOTE : Skipping as already exists in sysroot : [ 'glibc' , 'ldconfig-native' 
, 'gcc-cross-aarch64' ,
'gcc-runtime' , 'quilt-native' , 'dpkg-native' , 'patch-native' , 
'pseudo-native' , 'xz-native' ,
'linux-libc-headers' , 'libgcc' , 'libtool-native' , 'attr-native' , 
'gettext-minimal-native' ,
'bzip2-native' , 'gettext-native' , 'perl-native' , 'zlib-native' , 
'opkg-utils-native' , 'libmpc-native' ,
'binutils-cross-aarch64' , 'zstd-native' , 'gnu-config-native' , 'gmp-native' , 
'flex-native' , 'mpfr-native' ,
'texinfo-dummy-native' , 'make-native' , 'gdbm-native' , 'm4-native' ]
| DEBUG : Python function extend_recipe_sysroot finished
| DEBUG : Executing shell function do_install
| tar :. / conffiles : Cannot change ownership to uid 0 , gid 0 : Invalid 
argument
| tar :. / control : Cannot change ownership to uid 0 , gid 0 : Invalid argument
| tar :. / md5sums : Cannot change ownership to uid 0 , gid 0 : Invalid argument
| tar :. / postinst : Cannot change ownership to uid 0 , gid 0 : Invalid 
argument
| tar :. / shlibs : Cannot change ownership to uid 0 , gid 0 : Invalid argument
| tar :. / triggers : Cannot change ownership to uid 0 , gid 0 : Invalid 
argument
| tar :. : Cannot change ownership to uid 0 , gid 0 : Invalid argument
| tar : Exiting with failure status due to previous errors
| dpkg - deb : error : tar subprocess returned error exit status 2
| dpkg : error processing archive pwd / close - source - deb - file. amd64. deb 
(-- install ):
| dpkg - deb -- control subprocess returned error exit status 2
| Errors were encountered while processing :

I know this error is typical of tar when the uid and gid of the user and the 
owner are not the same but I cannot use the flag "--no-same-owner" as far as I 
know using dpkg. I also tried with pseudo and fakeroot, but the result is the 
same. I have been looking the code of dpkg but adding the flag to the variable 
TAR seems not to be working because it will not find the binary $PATH.

So I do not know what else kind I tried to make it work. Have I something 
missed? Could you maybe point me into the right direction?

Thanks for your help.

Happy coding,

JM
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64009): https://lists.yoctoproject.org/g/yocto/message/64009
Mute This Topic: https://lists.yoctoproject.org/mt/108951488/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to