I have tested to set capabilities on the node binary within a custom recipe
(custom layer) but that failed.
pkg_postinst_${PN} () {
setcap cap_net_raw+eip $D${bindir}/node
}
PACKAGE_WRITE_DEPS = "libcap-native"
RDEPENDS_${PN} = "libcap"
The error message:
ERROR: core-image-full-cmdline-1.0-r
Hi Markus,
Have you tried doing it in the postinst step executed on your target? Try:
pkg_postinst_ontarget_${PN} () {
setcap cap_net_raw+eip $D${bindir}/node
}
RDEPENDS_${PN} += "libcap-bin"
/ptw
> I have tested to set capabilities on the node binary within a custom recipe
> (custom layer
Thanks Piotr, that worked!
How can this be achieved when the rootfs is created and not on first boot?
I would like not to ship libcap binaries with the target in production.
/Markus
On Thu, 8 Nov 2018 at 22:53, Piotr Tworek wrote:
> Hi Markus,
>
> Have you tried doing it in the postinst step e
Hi!
On Fri, Nov 9, 2018 at 12:16 PM Markus W markus4dev-at-gmail.com wrote:
> On Thu, 8 Nov 2018 at 22:53, Piotr Tworek wrote:
...
>> pkg_postinst_ontarget_${PN} () {
>>setcap cap_net_raw+eip $D${bindir}/node
>> }
...
> How can this be achieved when the rootfs is created and not on first
>
Thanks Uwe!
I tried the global approach by adding the following to my local.conf file:
ROOTFS_POSTPROCESS_COMMAND += "my_setcap_function"
my_setcap_function() {
setcap cap_net_raw+eip ${IMAGE_ROOTFS}/usr/bin/node
}
But got the following warning:
WARNING: core-image-full-cmdline-1.0-r0 do_ro
Sometimes the problem is that parts of the underscored function name are seen
as overrides, so you should try using "mysetcapfunction" instead as a name.
Also, there's a semicolon missing:
ROOTFS_POSTPROCESS_COMMAND += "my_setcap_function;"
On 12-11-18 14:09, Markus W wrote:
> Thanks Uwe!
>
>
On Mon, Nov 12, 2018 at 3:09 PM Markus W markus4dev-at-gmail.com wrote:
>
> Thanks Uwe!
>
> I tried the global approach by adding the following to my local.conf file:
>
> ROOTFS_POSTPROCESS_COMMAND += "my_setcap_function"
>
> my_setcap_function() {
> setcap cap_net_raw+eip ${IMAGE_ROOTFS}/usr/b