[yocto] setcap using recipe

Kumar, Shrawan Shrawan.Kumar at harman.com
Fri Jun 24 03:41:49 PDT 2016


Hello All,



Is there a way to  add a capability to a binary (cap_net_raw+ep),into a recipe?


Example :

do_install() {

           install -d ${D}${bindir}

           install -m 0755 helloworld ${D}${bindir}

           install -d ${D}/lib/systemd/system

           install -m 0755 hello.service ${D}/lib/systemd/system/

           setcap cap_net_raw+ep  ${D}${bindir}/helloworld

}



If yes is this correct approach to achieve the same from  package recipe itself ?





Thanks and Regards

Shrawan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160624/f93567fb/attachment.html>


More information about the yocto mailing list