[oe] [meta-webserver][PATCH v4] netdata: add new recipe

Martin Jansa martin.jansa at gmail.com
Thu Apr 21 11:51:59 UTC 2016


On Thu, Apr 21, 2016 at 01:29:32PM +0200, Christophe PRIOUZEAU wrote:
> Netdata are a performance monitoring tools for Linux systems, applications.
> Netdata interface are available via http on port 19999:
>  http://<ip address>:19999
> 
> Signed-off-by: Christophe Priouzeau <christophe.priouzeau at st.com>
> ---
>  .../netdata/0001-Correct-Timeout-issue.patch       |   35 +
>  .../recipes-webadmin/netdata/netdata/netdata.conf  | 5083 ++++++++++++++++++++
>  .../netdata/netdata/netdata.service                |   13 +
>  .../recipes-webadmin/netdata/netdata_git.bb        |   52 +
>  4 files changed, 5183 insertions(+)
>  create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata/0001-Correct-Timeout-issue.patch
>  create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata/netdata.conf
>  create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata/netdata.service
>  create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata_git.bb
> 
> diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_git.bb b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
> new file mode 100644
> index 0000000..817090e
> --- /dev/null
> +++ b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
> @@ -0,0 +1,52 @@
> +HOMEPAGE = "https://github.com/firehol/netdata/"
> +SUMMARY = "Real-time performance monitoring"
> +LICENSE = "GPLv3"
> +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=747afe070ea9d6c2be0a31353609a35b"
> +
> +SRC_URI = "git://github.com/firehol/netdata.git;protocol=https"
> +SRCREV = "36c1304e37094174ea51001903058e65053107ca"
> +
> +# patch to disable timeout because timeout are not available with actual version
> +# of core-utils
> +SRC_URI += "file://0001-Correct-Timeout-issue.patch"
> +
> +# default netdata.conf for netdata configuration
> +SRC_URI += "file://netdata.conf"
> +
> +# file for providing systemd service support
> +SRC_URI += "file://netdata.service"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit pkgconfig autotools useradd systemd
> +
> +#systemd
> +SYSTEMD_PACKAGES = "${PN}"
> +SYSTEMD_SERVICE_${PN} = "netdata.service"
> +SYSTEMD_AUTO_ENABLE_${PN} = "enable"
> +
> +#User specific
> +USERADD_PACKAGES = "${PN}"
> +GROUPADD_PARAM_${PN} = "--system netdata"
> +
> +do_install_append() {
> +    #set S UID for plugins
> +    chmod 4755 ${D}${libdir_native}/netdata/netdata/plugins.d/apps.plugin

Why libdir_native (_native suffix also in other variables) when this is
target recipe?

> +    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> +        # Install systemd unit files
> +        install -d ${D}${systemd_unitdir}/system
> +        install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
> +        sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
> +    fi
> +
> +    # Install default netdata.conf
> +    install -d ${D}${sysconfdir_native}/netdata
> +    install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir_native}/netdata/
> +    sed -i -e 's,@@sysconfdir,${sysconfdir_native},g' ${D}${sysconfdir_native}/netdata/netdata.conf
> +    sed -i -e 's,@@libdir,${libdir_native},g' ${D}${sysconfdir_native}/netdata/netdata.conf
> +    sed -i -e 's,@@datadir,${datadir_native},g' ${D}${sysconfdir_native}/netdata/netdata.conf
> +}
> +
> +FILES_${PN}-dbg += "/usr/lib/netdata/netdata/plugins.d/.debug"

This should respect libdir variable as well.

> +RDEPENDS_${PN} = "bash"
> --
> 1.9.1
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20160421/7f5c7cee/attachment-0002.sig>


More information about the Openembedded-devel mailing list