update 2024-12-04 10:24:33
This commit is contained in:
parent
7d98b66ae8
commit
a1ad7dabe3
104
netdata/Makefile
Normal file
104
netdata/Makefile
Normal file
@ -0,0 +1,104 @@
|
||||
#
|
||||
# Copyright (C) 2008-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netdata
|
||||
PKG_VERSION:=1.38.1
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:my-netdata:netdata
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=e32a5427f0c00550210dbbf0046c2621313955256edf836db686e2bc270b8d10
|
||||
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=protobuf/host
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_FLAGS:=no-mips16 gc-sections
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/netdata
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
DEPENDS:=+zlib +libuuid +libuv +libmnl +libjson-c +libopenssl \
|
||||
+libstdcpp +libatomic +protobuf +openssl-util +curl +bash
|
||||
TITLE:=Real-time performance monitoring tool
|
||||
URL:=https://www.netdata.cloud/
|
||||
endef
|
||||
|
||||
define Package/netdata/description
|
||||
netdata is a highly optimized Linux daemon providing real-time performance
|
||||
monitoring for Linux systems, applications and SNMP devices over the web.
|
||||
|
||||
If you want to use Python plugins install python3, python3-yaml and
|
||||
python3-urllib3
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-zlib \
|
||||
--with-math \
|
||||
--disable-x86-sse \
|
||||
--enable-lto \
|
||||
--disable-ebpf \
|
||||
--without-libcap \
|
||||
--disable-dbengine \
|
||||
--disable-compression \
|
||||
--disable-plugin-nfacct \
|
||||
--disable-plugin-freeipmi \
|
||||
--disable-plugin-cups \
|
||||
--disable-plugin-xenstat \
|
||||
--disable-exporting-prometheus-remote-write \
|
||||
--disable-unit-tests \
|
||||
--disable-ml
|
||||
|
||||
define Build/Configure
|
||||
$(SED) 's/m4_esyscmd(\[git describe .*\])/$(PKG_VERSION)/' $(PKG_BUILD_DIR)/configure.ac
|
||||
$(Build/Configure/Default)
|
||||
endef
|
||||
|
||||
define Package/netdata/conffiles
|
||||
/etc/netdata/
|
||||
endef
|
||||
|
||||
define Package/netdata/install
|
||||
$(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
|
||||
$(CP) ./files/netdata.conf $(1)/etc/netdata
|
||||
touch $(1)/etc/netdata/.opt-out-from-anonymous-statistics
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
|
||||
$(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc
|
||||
$(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdatacli $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata-claim.sh $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/share/netdata
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
|
||||
rm $(1)/usr/share/netdata/web/demo*html
|
||||
rm $(1)/usr/share/netdata/web/fonts/*.svg
|
||||
rm $(1)/usr/share/netdata/web/fonts/*.ttf
|
||||
rm $(1)/usr/share/netdata/web/fonts/*.woff
|
||||
rm $(1)/usr/share/netdata/web/images/*.png
|
||||
rm $(1)/usr/share/netdata/web/images/*.gif
|
||||
rm $(1)/usr/share/netdata/web/images/*.ico
|
||||
rm -rf $(1)/usr/share/netdata/web/old
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,netdata))
|
32
netdata/files/netdata.conf
Normal file
32
netdata/files/netdata.conf
Normal file
@ -0,0 +1,32 @@
|
||||
# Full configuration can be retrieved from the running
|
||||
# server at http://localhost:19999/netdata.conf
|
||||
#
|
||||
# Example:
|
||||
# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
|
||||
#
|
||||
|
||||
[global]
|
||||
update every = 2
|
||||
memory deduplication (ksm) = no
|
||||
debug log = syslog
|
||||
error log = syslog
|
||||
access log = none
|
||||
run as user = root
|
||||
|
||||
[web]
|
||||
allow connections from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
|
||||
allow dashboard from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
|
||||
|
||||
[plugins]
|
||||
cgroups = no
|
||||
apps = no
|
||||
charts.d = no
|
||||
fping = no
|
||||
node.d = no
|
||||
python.d = no
|
||||
|
||||
[health]
|
||||
enabled = no
|
||||
|
||||
[plugin:proc:ipc]
|
||||
shared memory totals = no
|
29
netdata/files/netdata.init
Normal file
29
netdata/files/netdata.init
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
APPBINARY=/usr/sbin/netdata
|
||||
CONFIGFILE=/etc/netdata/netdata.conf
|
||||
|
||||
start_service() {
|
||||
local cloud_claim_token cloud_claim_rooms
|
||||
config_get cloud_claim_token "config" "cloud_claim_token"
|
||||
config_get cloud_claim_rooms "config" "cloud_claim_rooms"
|
||||
|
||||
mkdir -m 0755 -p /var/cache/netdata
|
||||
chown nobody /var/cache/netdata
|
||||
mkdir -m 0755 -p /var/lib/netdata
|
||||
chown nobody /var/lib/netdata
|
||||
mkdir -m 0755 -p /var/log/netdata
|
||||
chown nobody /var/log/netdata
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $APPBINARY -D -c $CONFIGFILE
|
||||
if [ -n "$cloud_claim_token" ] && [ -n "$cloud_claim_rooms" ]; then
|
||||
procd_append_param command -W "claim -token=$cloud_claim_token -rooms=$cloud_claim_rooms"
|
||||
fi
|
||||
procd_set_param file $CONFIGFILE
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
22
netdata/patches/001-disable-plugins-by-default.patch
Normal file
22
netdata/patches/001-disable-plugins-by-default.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- a/collectors/charts.d.plugin/charts.d.conf
|
||||
+++ b/collectors/charts.d.plugin/charts.d.conf
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
# the default enable/disable for all charts.d collectors
|
||||
# the default is "yes"
|
||||
-# enable_all_charts="yes"
|
||||
+enable_all_charts="no"
|
||||
|
||||
# BY DEFAULT ENABLED MODULES
|
||||
# ap=yes
|
||||
--- a/collectors/python.d.plugin/python.d.conf
|
||||
+++ b/collectors/python.d.plugin/python.d.conf
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
# Enable / disable the whole python.d.plugin (all its modules)
|
||||
-enabled: yes
|
||||
+enabled: no
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Enable / Disable python.d.plugin modules
|
@ -0,0 +1,112 @@
|
||||
--- a/collectors/python.d.plugin/Makefile.am
|
||||
+++ b/collectors/python.d.plugin/Makefile.am
|
||||
@@ -124,109 +124,3 @@ dist_third_party_DATA = \
|
||||
python_modules/third_party/monotonic.py \
|
||||
python_modules/third_party/filelock.py \
|
||||
$(NULL)
|
||||
-
|
||||
-pythonyaml2dir=$(pythonmodulesdir)/pyyaml2
|
||||
-dist_pythonyaml2_DATA = \
|
||||
- python_modules/pyyaml2/__init__.py \
|
||||
- python_modules/pyyaml2/composer.py \
|
||||
- python_modules/pyyaml2/constructor.py \
|
||||
- python_modules/pyyaml2/cyaml.py \
|
||||
- python_modules/pyyaml2/dumper.py \
|
||||
- python_modules/pyyaml2/emitter.py \
|
||||
- python_modules/pyyaml2/error.py \
|
||||
- python_modules/pyyaml2/events.py \
|
||||
- python_modules/pyyaml2/loader.py \
|
||||
- python_modules/pyyaml2/nodes.py \
|
||||
- python_modules/pyyaml2/parser.py \
|
||||
- python_modules/pyyaml2/reader.py \
|
||||
- python_modules/pyyaml2/representer.py \
|
||||
- python_modules/pyyaml2/resolver.py \
|
||||
- python_modules/pyyaml2/scanner.py \
|
||||
- python_modules/pyyaml2/serializer.py \
|
||||
- python_modules/pyyaml2/tokens.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-pythonyaml3dir=$(pythonmodulesdir)/pyyaml3
|
||||
-dist_pythonyaml3_DATA = \
|
||||
- python_modules/pyyaml3/__init__.py \
|
||||
- python_modules/pyyaml3/composer.py \
|
||||
- python_modules/pyyaml3/constructor.py \
|
||||
- python_modules/pyyaml3/cyaml.py \
|
||||
- python_modules/pyyaml3/dumper.py \
|
||||
- python_modules/pyyaml3/emitter.py \
|
||||
- python_modules/pyyaml3/error.py \
|
||||
- python_modules/pyyaml3/events.py \
|
||||
- python_modules/pyyaml3/loader.py \
|
||||
- python_modules/pyyaml3/nodes.py \
|
||||
- python_modules/pyyaml3/parser.py \
|
||||
- python_modules/pyyaml3/reader.py \
|
||||
- python_modules/pyyaml3/representer.py \
|
||||
- python_modules/pyyaml3/resolver.py \
|
||||
- python_modules/pyyaml3/scanner.py \
|
||||
- python_modules/pyyaml3/serializer.py \
|
||||
- python_modules/pyyaml3/tokens.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-python_urllib3dir=$(pythonmodulesdir)/urllib3
|
||||
-dist_python_urllib3_DATA = \
|
||||
- python_modules/urllib3/__init__.py \
|
||||
- python_modules/urllib3/_collections.py \
|
||||
- python_modules/urllib3/connection.py \
|
||||
- python_modules/urllib3/connectionpool.py \
|
||||
- python_modules/urllib3/exceptions.py \
|
||||
- python_modules/urllib3/fields.py \
|
||||
- python_modules/urllib3/filepost.py \
|
||||
- python_modules/urllib3/response.py \
|
||||
- python_modules/urllib3/poolmanager.py \
|
||||
- python_modules/urllib3/request.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-python_urllib3_utildir=$(python_urllib3dir)/util
|
||||
-dist_python_urllib3_util_DATA = \
|
||||
- python_modules/urllib3/util/__init__.py \
|
||||
- python_modules/urllib3/util/connection.py \
|
||||
- python_modules/urllib3/util/request.py \
|
||||
- python_modules/urllib3/util/response.py \
|
||||
- python_modules/urllib3/util/retry.py \
|
||||
- python_modules/urllib3/util/selectors.py \
|
||||
- python_modules/urllib3/util/ssl_.py \
|
||||
- python_modules/urllib3/util/timeout.py \
|
||||
- python_modules/urllib3/util/url.py \
|
||||
- python_modules/urllib3/util/wait.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-python_urllib3_packagesdir=$(python_urllib3dir)/packages
|
||||
-dist_python_urllib3_packages_DATA = \
|
||||
- python_modules/urllib3/packages/__init__.py \
|
||||
- python_modules/urllib3/packages/ordered_dict.py \
|
||||
- python_modules/urllib3/packages/six.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-python_urllib3_backportsdir=$(python_urllib3_packagesdir)/backports
|
||||
-dist_python_urllib3_backports_DATA = \
|
||||
- python_modules/urllib3/packages/backports/__init__.py \
|
||||
- python_modules/urllib3/packages/backports/makefile.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-python_urllib3_ssl_match_hostnamedir=$(python_urllib3_packagesdir)/ssl_match_hostname
|
||||
-dist_python_urllib3_ssl_match_hostname_DATA = \
|
||||
- python_modules/urllib3/packages/ssl_match_hostname/__init__.py \
|
||||
- python_modules/urllib3/packages/ssl_match_hostname/_implementation.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-python_urllib3_contribdir=$(python_urllib3dir)/contrib
|
||||
-dist_python_urllib3_contrib_DATA = \
|
||||
- python_modules/urllib3/contrib/__init__.py \
|
||||
- python_modules/urllib3/contrib/appengine.py \
|
||||
- python_modules/urllib3/contrib/ntlmpool.py \
|
||||
- python_modules/urllib3/contrib/pyopenssl.py \
|
||||
- python_modules/urllib3/contrib/securetransport.py \
|
||||
- python_modules/urllib3/contrib/socks.py \
|
||||
- $(NULL)
|
||||
-
|
||||
-python_urllib3_securetransportdir=$(python_urllib3_contribdir)/_securetransport
|
||||
-dist_python_urllib3_securetransport_DATA = \
|
||||
- python_modules/urllib3/contrib/_securetransport/__init__.py \
|
||||
- python_modules/urllib3/contrib/_securetransport/bindings.py \
|
||||
- python_modules/urllib3/contrib/_securetransport/low_level.py \
|
||||
- $(NULL)
|
@ -0,0 +1,14 @@
|
||||
--- a/collectors/python.d.plugin/python_modules/bases/loaders.py
|
||||
+++ b/collectors/python.d.plugin/python_modules/bases/loaders.py
|
||||
@@ -10,9 +10,9 @@ PY_VERSION = version_info[:2]
|
||||
|
||||
try:
|
||||
if PY_VERSION > (3, 1):
|
||||
- from pyyaml3 import SafeLoader as YamlSafeLoader
|
||||
+ from yaml import SafeLoader as YamlSafeLoader
|
||||
else:
|
||||
- from pyyaml2 import SafeLoader as YamlSafeLoader
|
||||
+ from yaml import SafeLoader as YamlSafeLoader
|
||||
except ImportError:
|
||||
from yaml import SafeLoader as YamlSafeLoader
|
||||
|
387
netdata/patches/004-fix-libjudy-compile.patch
Normal file
387
netdata/patches/004-fix-libjudy-compile.patch
Normal file
@ -0,0 +1,387 @@
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -227,7 +227,3 @@ Session.*.vim
|
||||
|
||||
# Jupyter notebook checkpoints
|
||||
.ipynb_checkpoints
|
||||
-
|
||||
-# Judy stuff
|
||||
-JudyLTables.c
|
||||
-judyltablesgen
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -503,15 +503,10 @@ libjudy_a_SOURCES = libnetdata/libjudy/s
|
||||
libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c \
|
||||
libnetdata/libjudy/src/JudyL/JudyLPrev.c \
|
||||
libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c \
|
||||
+ libnetdata/libjudy/src/JudyL/JudyLTables.c \
|
||||
libnetdata/libjudy/src/JudyHS/JudyHS.c \
|
||||
$(NULL)
|
||||
|
||||
-nodist_libjudy_a_SOURCES = JudyLTables.c
|
||||
-
|
||||
-BUILT_SOURCES += JudyLTables.c
|
||||
-
|
||||
-CLEANFILES += JudyLTables.c
|
||||
-
|
||||
libjudy_a_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough
|
||||
|
||||
libnetdata/libjudy/src/JudyL/libjudy_a-JudyLPrev.$(OBJEXT) : CFLAGS += -DJUDYPREV
|
||||
@@ -521,16 +516,6 @@ libnetdata/libjudy/src/JudyL/libjudy_a-J
|
||||
libnetdata/libjudy/src/JudyL/libjudy_a-JudyLByCount.$(OBJEXT) : CFLAGS += -DNOSMARTJBB -DNOSMARTJBU -DNOSMARTJLB
|
||||
libnetdata/libjudy/src/JudyL/libjudy_a-j__udyLGet.$(OBJEXT) : CFLAGS += -DJUDYGETINLINE
|
||||
|
||||
-noinst_PROGRAMS = judyltablesgen
|
||||
-
|
||||
-judyltablesgen_SOURCES = libnetdata/libjudy/src/JudyL/JudyLTablesGen.c
|
||||
-judyltablesgen_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough
|
||||
-
|
||||
-$(builddir)/judyltablesgen$(EXEEXT) : CFLAGS += -Wno-format -Wno-format-security
|
||||
-
|
||||
-JudyLTables.c: $(abs_top_srcdir)/libnetdata/libjudy/src/JudyL/JudyLTablesGen.c $(builddir)/judyltablesgen$(EXEEXT)
|
||||
- $(builddir)/judyltablesgen$(EXEEXT)
|
||||
-
|
||||
libjudy_a-JudyLTables.$(OBJEXT) : CFLAGS += -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyL
|
||||
|
||||
if ENABLE_DBENGINE
|
||||
--- /dev/null
|
||||
+++ b/libnetdata/libjudy/src/JudyL/JudyLTables.c
|
||||
@@ -0,0 +1,338 @@
|
||||
+// @(#) From generation tool: $Revision: 4.37 $ $Source: /judy/src/JudyCommon/JudyTables.c $
|
||||
+// Pregenerated and modified by hand. Do not overwrite!
|
||||
+
|
||||
+#include "JudyL.h"
|
||||
+// Leave the malloc() sizes readable in the binary (via strings(1)):
|
||||
+#ifdef JU_64BIT
|
||||
+const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 13";
|
||||
+#else // JU_32BIT
|
||||
+const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 25";
|
||||
+#endif // JU_64BIT
|
||||
+
|
||||
+#ifdef JU_64BIT
|
||||
+// object uses 64 words
|
||||
+// cJU_BITSPERSUBEXPB = 32
|
||||
+const uint8_t
|
||||
+j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||
+ 23, 23, 23, 32, 32, 32, 32, 32,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 64,
|
||||
+ 64, 64, 64, 64, 64, 64, 64, 64
|
||||
+};
|
||||
+
|
||||
+// object uses 15 words
|
||||
+// cJL_LEAF1_MAXPOP1 = 13
|
||||
+const uint8_t
|
||||
+j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 5, 5, 7, 7, 11, 11,
|
||||
+ 11, 15, 15, 15, 15
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 1, 1, 1, 1, 1, 2, 2,
|
||||
+ 2, 2, 2, 2, 2
|
||||
+};
|
||||
+
|
||||
+// object uses 64 words
|
||||
+// cJL_LEAF2_MAXPOP1 = 51
|
||||
+const uint8_t
|
||||
+j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 5, 5, 7, 11, 11, 11,
|
||||
+ 15, 15, 15, 15, 23, 23, 23, 23,
|
||||
+ 23, 23, 32, 32, 32, 32, 32, 32,
|
||||
+ 32, 47, 47, 47, 47, 47, 47, 47,
|
||||
+ 47, 47, 47, 47, 47, 64, 64, 64,
|
||||
+ 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
+ 64, 64, 64
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 1, 1, 1, 2, 3, 3, 3,
|
||||
+ 3, 3, 3, 3, 5, 5, 5, 5,
|
||||
+ 5, 5, 7, 7, 7, 7, 7, 7,
|
||||
+ 7, 10, 10, 10, 10, 10, 10, 10,
|
||||
+ 10, 10, 10, 10, 10, 13, 13, 13,
|
||||
+ 13, 13, 13, 13, 13, 13, 13, 13,
|
||||
+ 13, 13, 13
|
||||
+};
|
||||
+
|
||||
+// object uses 64 words
|
||||
+// cJL_LEAF3_MAXPOP1 = 46
|
||||
+const uint8_t
|
||||
+j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 5, 7, 7, 11, 11, 11,
|
||||
+ 15, 15, 23, 23, 23, 23, 23, 23,
|
||||
+ 32, 32, 32, 32, 32, 32, 32, 47,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 47,
|
||||
+ 47, 47, 64, 64, 64, 64, 64, 64,
|
||||
+ 64, 64, 64, 64, 64, 64
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 1, 2, 2, 2, 3, 3, 3,
|
||||
+ 4, 4, 6, 6, 6, 6, 6, 6,
|
||||
+ 9, 9, 9, 9, 9, 9, 9, 13,
|
||||
+ 13, 13, 13, 13, 13, 13, 13, 13,
|
||||
+ 13, 13, 18, 18, 18, 18, 18, 18,
|
||||
+ 18, 18, 18, 18, 18, 18
|
||||
+};
|
||||
+
|
||||
+// object uses 63 words
|
||||
+// cJL_LEAF4_MAXPOP1 = 42
|
||||
+const uint8_t
|
||||
+j__L_Leaf4PopToWords[cJL_LEAF4_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 5, 7, 11, 11, 11, 15,
|
||||
+ 15, 15, 23, 23, 23, 23, 23, 32,
|
||||
+ 32, 32, 32, 32, 32, 47, 47, 47,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||
+ 63, 63, 63, 63, 63, 63, 63, 63,
|
||||
+ 63, 63
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf4Offset[cJL_LEAF4_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 1, 2, 2, 4, 4, 4, 5,
|
||||
+ 5, 5, 8, 8, 8, 8, 8, 11,
|
||||
+ 11, 11, 11, 11, 11, 16, 16, 16,
|
||||
+ 16, 16, 16, 16, 16, 16, 16, 21,
|
||||
+ 21, 21, 21, 21, 21, 21, 21, 21,
|
||||
+ 21, 21
|
||||
+};
|
||||
+
|
||||
+// object uses 64 words
|
||||
+// cJL_LEAF5_MAXPOP1 = 39
|
||||
+const uint8_t
|
||||
+j__L_Leaf5PopToWords[cJL_LEAF5_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 5, 7, 11, 11, 15, 15,
|
||||
+ 15, 23, 23, 23, 23, 23, 32, 32,
|
||||
+ 32, 32, 32, 47, 47, 47, 47, 47,
|
||||
+ 47, 47, 47, 47, 64, 64, 64, 64,
|
||||
+ 64, 64, 64, 64, 64, 64, 64
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf5Offset[cJL_LEAF5_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 2, 2, 2, 3, 4, 4, 6, 6,
|
||||
+ 6, 9, 9, 9, 9, 9, 12, 12,
|
||||
+ 12, 12, 12, 18, 18, 18, 18, 18,
|
||||
+ 18, 18, 18, 18, 25, 25, 25, 25,
|
||||
+ 25, 25, 25, 25, 25, 25, 25
|
||||
+};
|
||||
+
|
||||
+// object uses 63 words
|
||||
+// cJL_LEAF6_MAXPOP1 = 36
|
||||
+const uint8_t
|
||||
+j__L_Leaf6PopToWords[cJL_LEAF6_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 7, 7, 11, 11, 15, 15,
|
||||
+ 23, 23, 23, 23, 23, 32, 32, 32,
|
||||
+ 32, 32, 47, 47, 47, 47, 47, 47,
|
||||
+ 47, 47, 63, 63, 63, 63, 63, 63,
|
||||
+ 63, 63, 63, 63
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf6Offset[cJL_LEAF6_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 3, 3, 3, 5, 5, 6, 6,
|
||||
+ 10, 10, 10, 10, 10, 14, 14, 14,
|
||||
+ 14, 14, 20, 20, 20, 20, 20, 20,
|
||||
+ 20, 20, 27, 27, 27, 27, 27, 27,
|
||||
+ 27, 27, 27, 27
|
||||
+};
|
||||
+
|
||||
+// object uses 64 words
|
||||
+// cJL_LEAF7_MAXPOP1 = 34
|
||||
+const uint8_t
|
||||
+j__L_Leaf7PopToWords[cJL_LEAF7_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 7, 11, 11, 15, 15, 15,
|
||||
+ 23, 23, 23, 23, 32, 32, 32, 32,
|
||||
+ 32, 47, 47, 47, 47, 47, 47, 47,
|
||||
+ 47, 64, 64, 64, 64, 64, 64, 64,
|
||||
+ 64, 64
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf7Offset[cJL_LEAF7_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 3, 3, 5, 5, 7, 7, 7,
|
||||
+ 11, 11, 11, 11, 15, 15, 15, 15,
|
||||
+ 15, 22, 22, 22, 22, 22, 22, 22,
|
||||
+ 22, 30, 30, 30, 30, 30, 30, 30,
|
||||
+ 30, 30
|
||||
+};
|
||||
+
|
||||
+// object uses 63 words
|
||||
+// cJL_LEAFW_MAXPOP1 = 31
|
||||
+const uint8_t
|
||||
+j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||
+ 23, 23, 23, 32, 32, 32, 32, 47,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||
+ 63, 63, 63, 63, 63, 63, 63
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 2, 3, 4, 6, 6, 8, 8, 12,
|
||||
+ 12, 12, 12, 16, 16, 16, 16, 24,
|
||||
+ 24, 24, 24, 24, 24, 24, 24, 32,
|
||||
+ 32, 32, 32, 32, 32, 32, 32
|
||||
+};
|
||||
+
|
||||
+// object uses 64 words
|
||||
+// cJU_BITSPERSUBEXPL = 64
|
||||
+const uint8_t
|
||||
+j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 3, 5, 5, 7, 7, 11,
|
||||
+ 11, 11, 11, 15, 15, 15, 15, 23,
|
||||
+ 23, 23, 23, 23, 23, 23, 23, 32,
|
||||
+ 32, 32, 32, 32, 32, 32, 32, 32,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 47,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 64,
|
||||
+ 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
+ 64, 64, 64, 64, 64, 64, 64, 64
|
||||
+};
|
||||
+#else // JU_32BIT
|
||||
+// object uses 64 words
|
||||
+// cJU_BITSPERSUBEXPB = 32
|
||||
+const uint8_t
|
||||
+j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||
+ 23, 23, 23, 32, 32, 32, 32, 32,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 64,
|
||||
+ 64, 64, 64, 64, 64, 64, 64, 64
|
||||
+};
|
||||
+
|
||||
+// object uses 32 words
|
||||
+// cJL_LEAF1_MAXPOP1 = 25
|
||||
+const uint8_t
|
||||
+j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 5, 5, 7, 11, 11, 11,
|
||||
+ 15, 15, 15, 15, 23, 23, 23, 23,
|
||||
+ 23, 23, 32, 32, 32, 32, 32, 32,
|
||||
+ 32
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 1, 1, 1, 2, 3, 3, 3,
|
||||
+ 3, 3, 3, 3, 5, 5, 5, 5,
|
||||
+ 5, 5, 7, 7, 7, 7, 7, 7,
|
||||
+ 7
|
||||
+};
|
||||
+
|
||||
+// object uses 63 words
|
||||
+// cJL_LEAF2_MAXPOP1 = 42
|
||||
+const uint8_t
|
||||
+j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 5, 7, 11, 11, 11, 15,
|
||||
+ 15, 15, 23, 23, 23, 23, 23, 32,
|
||||
+ 32, 32, 32, 32, 32, 47, 47, 47,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||
+ 63, 63, 63, 63, 63, 63, 63, 63,
|
||||
+ 63, 63
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 1, 2, 2, 4, 4, 4, 5,
|
||||
+ 5, 5, 8, 8, 8, 8, 8, 11,
|
||||
+ 11, 11, 11, 11, 11, 16, 16, 16,
|
||||
+ 16, 16, 16, 16, 16, 16, 16, 21,
|
||||
+ 21, 21, 21, 21, 21, 21, 21, 21,
|
||||
+ 21, 21
|
||||
+};
|
||||
+
|
||||
+// object uses 63 words
|
||||
+// cJL_LEAF3_MAXPOP1 = 36
|
||||
+const uint8_t
|
||||
+j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 7, 7, 11, 11, 15, 15,
|
||||
+ 23, 23, 23, 23, 23, 32, 32, 32,
|
||||
+ 32, 32, 47, 47, 47, 47, 47, 47,
|
||||
+ 47, 47, 63, 63, 63, 63, 63, 63,
|
||||
+ 63, 63, 63, 63
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 1, 3, 3, 3, 5, 5, 6, 6,
|
||||
+ 10, 10, 10, 10, 10, 14, 14, 14,
|
||||
+ 14, 14, 20, 20, 20, 20, 20, 20,
|
||||
+ 20, 20, 27, 27, 27, 27, 27, 27,
|
||||
+ 27, 27, 27, 27
|
||||
+};
|
||||
+
|
||||
+// object uses 63 words
|
||||
+// cJL_LEAFW_MAXPOP1 = 31
|
||||
+const uint8_t
|
||||
+j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||
+ 23, 23, 23, 32, 32, 32, 32, 47,
|
||||
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||
+ 63, 63, 63, 63, 63, 63, 63
|
||||
+};
|
||||
+const uint8_t
|
||||
+j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 2, 3, 4, 6, 6, 8, 8, 12,
|
||||
+ 12, 12, 12, 16, 16, 16, 16, 24,
|
||||
+ 24, 24, 24, 24, 24, 24, 24, 32,
|
||||
+ 32, 32, 32, 32, 32, 32, 32
|
||||
+};
|
||||
+
|
||||
+// object uses 32 words
|
||||
+// cJU_BITSPERSUBEXPL = 32
|
||||
+const uint8_t
|
||||
+j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] =
|
||||
+{
|
||||
+ 0,
|
||||
+ 3, 3, 3, 5, 5, 7, 7, 11,
|
||||
+ 11, 11, 11, 15, 15, 15, 15, 23,
|
||||
+ 23, 23, 23, 23, 23, 23, 23, 32,
|
||||
+ 32, 32, 32, 32, 32, 32, 32, 32
|
||||
+};
|
||||
+#endif // JU_64BIT
|
3
netdata/root/etc/config/netdata
Normal file
3
netdata/root/etc/config/netdata
Normal file
@ -0,0 +1,3 @@
|
||||
config netdata 'config'
|
||||
option cloud_claim_token ''
|
||||
option cloud_claim_rooms ''
|
14
parted/Config.in
Normal file
14
parted/Config.in
Normal file
@ -0,0 +1,14 @@
|
||||
menu "Configuration"
|
||||
depends on PACKAGE_parted
|
||||
|
||||
config PARTED_READLINE
|
||||
bool "Use readline library"
|
||||
depends on PACKAGE_parted
|
||||
default y
|
||||
|
||||
config PARTED_LVM2
|
||||
bool "Support LVM"
|
||||
depends on PACKAGE_parted
|
||||
default n
|
||||
|
||||
endmenu
|
79
parted/Makefile
Normal file
79
parted/Makefile
Normal file
@ -0,0 +1,79 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=parted
|
||||
PKG_VERSION:=3.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/parted/
|
||||
PKG_HASH:=3b43dbe33cca0f9a18601ebab56b7852b128ec1a3df3a9b30ccde5e73359e612
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:parted_project:parted
|
||||
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PARTED_LVM2 \
|
||||
CONFIG_PARTED_READLINE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libparted
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=GNU Parted library
|
||||
DEPENDS:=+libblkid +libuuid +PARTED_LVM2:libdevmapper
|
||||
endef
|
||||
|
||||
define Package/libparted/description
|
||||
GNU Parted shared library
|
||||
endef
|
||||
|
||||
define Package/parted
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=GNU Parted
|
||||
SUBMENU:=Disc
|
||||
DEPENDS:=+libparted +PARTED_READLINE:libreadline +PARTED_READLINE:libncurses
|
||||
endef
|
||||
|
||||
define Package/parted/description
|
||||
GNU Parted manipulates partition tables. This is useful for
|
||||
creating space for new operating systems, reorganizing
|
||||
disk usage, copying data on hard disks and disk imaging.
|
||||
endef
|
||||
|
||||
define Package/parted/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
$(if $(CONFIG_PARTED_READLINE),--with-readline,--without-readline) \
|
||||
$(if $(CONFIG_PARTED_LVM2),--enable-device-mapper,--disable-device-mapper)
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/parted $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so** $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/parted/*.h $(1)/usr/include/parted/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libparted/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so** $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/parted/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parted $(1)/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partprobe $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libparted))
|
||||
$(eval $(call BuildPackage,parted))
|
7
parted/test.sh
Normal file
7
parted/test.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
"parted")
|
||||
test $(/sbin/parted --version | grep '^Copyright' | wc -l) -gt 0
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user