Hi, The only change needed on the recipe are: -PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap" +PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap libcap-native" The patch 0001-Add-support-for-setcap-in-STAGING_DIR_NATIVE.patch is not need because with the addition of the libcap-native the meson find_program will find the setcap binary on the native sysroot and will use it. Richard Purdie escreveu no dia quinta, 18/02/2021 à(s) 21:44: > On Thu, 2021-02-18 at 20:58 +0100, Alexander Kanavin wrote: > > On Thu, 18 Feb 2021 at 20:22, Jate Sujjavanich > wrote: > > > +-setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', > required : false) > > > ++stagingdirnative = get_option('stagingdirnative') > > > ++setcap = find_program(stagingdirnative + '/usr/sbin/setcap', > stagingdirnative + '/sbin/setcap', required > > > : false) > > > > > > > Just remove the hardcoded paths from find_program altogether (see meson > manual), and it will take the binary > > from PATH env var, which is exactly how native sysroots are supposed to > work. > > I'm guessing upstream does this so you can build as a normal user who > doesn't have sbin in PATH and still use setcap during "make install". > > We need something upstream might accept. I suspect what we need here > is a way to specify a specific path to the util and then fall back on > the current approach if the feature is enabled but no path provided. > Please do ensure that it won't look in the host's directories unless > its enabled though. > > Cheers, > > Richard > > > > > -- Best regards, José Quaresma