PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS:= \
- CONFIG_ZABBIX_GNUTLS \
- CONFIG_ZABBIX_OPENSSL \
CONFIG_ZABBIX_MYSQL \
CONFIG_ZABBIX_POSTGRESQL
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-define Package/zabbix-agentd/config
-comment "SSL support"
-
-choice
- prompt "Selected SSL library"
- default ZABBIX_NOSSL
-
- config ZABBIX_OPENSSL
- bool "OpenSSL"
-
- config ZABBIX_GNUTLS
- bool "GnuTLS"
-
- config ZABBIX_NOSSL
- bool "No SSL support"
-
-endchoice
-endef
-
define Package/zabbix-server/config
comment "Database Software"
TITLE:=Zabbix
URL:=https://www.zabbix.com/
USERID:=zabbix=53:zabbix=53
- DEPENDS += $(ICONV_DEPENDS) +libpcre +zlib +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl
+ DEPENDS+=$(ICONV_DEPENDS) +libpcre +zlib
endef
define Package/zabbix-agentd
$(call Package/zabbix/Default)
TITLE+= agentd
+ PROVIDES:=zabbix-agentd
+ VARIANT:=nossl
+ DEFAULT_VARIANT:=1
+endef
+
+define Package/zabbix-agentd-openssl
+ $(call Package/zabbix/Default)
+ TITLE+= agentd (with OpenSSL)
+ DEPENDS+= +libopenssl
+ PROVIDES:=zabbix-agentd
+ VARIANT:=openssl
+endef
+
+define Package/zabbix-agentd-gnutls
+ $(call Package/zabbix/Default)
+ TITLE+= agentd (with GnuTLS)
+ DEPENDS+= +libgnutls
+ PROVIDES:=zabbix-agentd
+ VARIANT:=gnutls
endef
define Package/zabbix-extra-mac80211
define Package/zabbix-sender
$(call Package/zabbix/Default)
TITLE+= sender
+ PROVIDES:=zabbix-sender
+ VARIANT:=nossl
+ DEFAULT_VARIANT:=1
+endef
+
+define Package/zabbix-sender-openssl
+ $(call Package/zabbix/Default)
+ TITLE+= sender (with OpenSSL)
+ DEPENDS+= +libopenssl
+ PROVIDES:=zabbix-sender
+ VARIANT:=openssl
+endef
+
+define Package/zabbix-sender-gnutls
+ $(call Package/zabbix/Default)
+ TITLE+= sender (with GnuTLS)
+ DEPENDS+= +libgnutls
+ PROVIDES:=zabbix-sender
+ VARIANT:=gnutls
endef
define Package/zabbix-get
$(call Package/zabbix/Default)
TITLE+= get
+ PROVIDES:=zabbix-get
+ VARIANT:=nossl
+ DEFAULT_VARIANT:=1
endef
-define Package/zabbix-server
+define Package/zabbix-get-openssl
+ $(call Package/zabbix/Default)
+ TITLE+= get (with OpenSSL)
+ DEPENDS+= +libopenssl
+ PROVIDES:=zabbix-get
+ VARIANT:=openssl
+endef
+
+define Package/zabbix-get-gnutls
+ $(call Package/zabbix/Default)
+ TITLE+= get (with GnuTLS)
+ DEPENDS+= +libgnutls
+ PROVIDES:=zabbix-get
+ VARIANT:=gnutls
+endef
+
+define Package/zabbix-server/Default
$(call Package/zabbix/Default)
TITLE+= server
DEPENDS += +ZABBIX_POSTGRESQL:libpq \
+fping
endef
+define Package/zabbix-server
+ $(call Package/zabbix-server/Default)
+ PROVIDES:=zabbix-server
+ VARIANT:=nossl
+ DEFAULT_VARIANT:=1
+endef
+
+define Package/zabbix-server-openssl
+ $(call Package/zabbix-server/Default)
+ TITLE+= (with OpenSSL)
+ PROVIDES:=zabbix-server
+ DEPENDS+= +libopenssl
+ VARIANT:=openssl
+endef
+
+define Package/zabbix-server-gnutls
+ $(call Package/zabbix-server/Default)
+ TITLE+= (with GnuTLS)
+ PROVIDES:=zabbix-server
+ DEPENDS+= +libgnutls
+ VARIANT:=gnutls
+endef
+
define Package/zabbix-server-frontend
$(call Package/zabbix/Default)
TITLE+= server-frontend
+php8-mod-session +php8-mod-sockets +php8-mod-mbstring +php8-mod-gettext
endef
-define Package/zabbix-proxy
+define Package/zabbix-proxy/Default
$(call Package/zabbix/Default)
TITLE+= proxy
DEPENDS += +ZABBIX_POSTGRESQL:libpq \
+fping
endef
+define Package/zabbix-proxy
+ $(call Package/zabbix-proxy/Default)
+ PROVIDES:=zabbix-proxy
+ VARIANT:=nossl
+ DEFAULT_VARIANT:=1
+endef
+
+define Package/zabbix-proxy-openssl
+ $(call Package/zabbix-proxy/Default)
+ TITLE+= (with OpenSSL)
+ PROVIDES:=zabbix-proxy
+ DEPENDS+= +libopenssl
+ VARIANT:=openssl
+endef
+
+define Package/zabbix-proxy-gnutls
+ $(call Package/zabbix-proxy/Default)
+ TITLE+= (with GnuTLS)
+ PROVIDES:=zabbix-proxy
+ DEPENDS+= +libgnutls
+ VARIANT:=gnutls
+endef
+
define Package/zabbix-extra-mac80211/description
An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters.
It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root.
$(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \
--with-libevent=$(STAGING_DIR)/usr/include/libevent \
--with-libpcre=$(STAGING_DIR)/usr/include \
- --with-zlib=$(STAGING_DIR)/usr/include \
- $(if $(CONFIG_ZABBIX_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr") \
- $(if $(CONFIG_ZABBIX_OPENSSL),--with-openssl="$(STAGING_DIR)/usr")
+ --with-zlib=$(STAGING_DIR)/usr/include
+
+ifeq ($(BUILD_VARIANT),openssl)
+ CONFIGURE_ARGS+= --with-openssl="$(STAGING_DIR)/usr"
+endif
+
+ifeq ($(BUILD_VARIANT),gnutls)
+ CONFIGURE_ARGS+= --with-gnutls="$(STAGING_DIR)/usr"
+endif
CONFIGURE_VARS += \
ac_cv_header_sys_sysinfo_h=no
define Package/zabbix-agentd/conffiles
/etc/zabbix_agentd.conf
endef
+Package/zabbix-agentd-openssl/conffiles = $(Package/zabbix-agentd/conffiles)
+Package/zabbix-agentd-gnutls/conffiles = $(Package/zabbix-agentd/conffiles)
+
define Package/zabbix-server/conffiles
/etc/zabbix_server.conf
endef
+Package/zabbix-server-openssl/conffiles = $(Package/zabbix-server/conffiles)
+Package/zabbix-server-gnutls/conffiles = $(Package/zabbix-server/conffiles)
+
define Package/zabbix-proxy/conffiles
/etc/zabbix_proxy.conf
endef
+Package/zabbix-proxy-openssl/conffiles = $(Package/zabbix-proxy/conffiles)
+Package/zabbix-proxy-gnutls/conffiles = $(Package/zabbix-proxy/conffiles)
ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
define Build/Prepare/zabbix-extra-mac80211
$(call Package/zabbix/install/etc,$(1),agentd)
$(call Package/zabbix/install/init.d,$(1),agentd)
endef
+Package/zabbix-agentd-openssl/install = $(Package/zabbix-agentd/install)
+Package/zabbix-agentd-gnutls/install = $(Package/zabbix-agentd/install)
define Package/zabbix-extra-mac80211/install
$(call Package/zabbix/install/zabbix.conf.d,$(1),mac80211)
define Package/zabbix-sender/install
$(call Package/zabbix/install/bin,$(1),sender)
endef
+Package/zabbix-sender-openssl/install = $(Package/zabbix-sender/install)
+Package/zabbix-sender-gnutls/install = $(Package/zabbix-sender/install)
define Package/zabbix-get/install
$(call Package/zabbix/install/bin,$(1),get)
endef
+Package/zabbix-get-openssl/install = $(Package/zabbix-get/install)
+Package/zabbix-get-gnutls/install = $(Package/zabbix-get/install)
define Package/zabbix-server/install
$(call Package/zabbix/install/sbin,$(1),server)
$(call Package/zabbix/install/etc,$(1),server)
endef
+Package/zabbix-server-openssl/install = $(Package/zabbix-server/install)
+Package/zabbix-server-gnutls/install = $(Package/zabbix-server/install)
define Package/zabbix-server-frontend/install
$(INSTALL_DIR) $(1)/www/zabbix
$(call Package/zabbix/install/sbin,$(1),proxy)
$(call Package/zabbix/install/etc,$(1),proxy)
endef
+Package/zabbix-proxy-openssl/install = $(Package/zabbix-proxy/install)
+Package/zabbix-proxy-gnutls/install = $(Package/zabbix-proxy/install)
$(eval $(call BuildPackage,zabbix-agentd))
+$(eval $(call BuildPackage,zabbix-agentd-openssl))
+$(eval $(call BuildPackage,zabbix-agentd-gnutls))
$(eval $(call BuildPackage,zabbix-extra-mac80211))
$(eval $(call BuildPackage,zabbix-extra-network))
$(eval $(call BuildPackage,zabbix-extra-wifi))
$(eval $(call BuildPackage,zabbix-sender))
+$(eval $(call BuildPackage,zabbix-sender-openssl))
+$(eval $(call BuildPackage,zabbix-sender-gnutls))
$(eval $(call BuildPackage,zabbix-server))
+$(eval $(call BuildPackage,zabbix-server-openssl))
+$(eval $(call BuildPackage,zabbix-server-gnutls))
$(eval $(call BuildPackage,zabbix-server-frontend))
$(eval $(call BuildPackage,zabbix-proxy))
+$(eval $(call BuildPackage,zabbix-proxy-openssl))
+$(eval $(call BuildPackage,zabbix-proxy-gnutls))
$(eval $(call BuildPackage,zabbix-get))
+$(eval $(call BuildPackage,zabbix-get-openssl))
+$(eval $(call BuildPackage,zabbix-get-gnutls))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-crcmod
+PKG_VERSION:=1.7
+PKG_RELEASE:=1
+
+PYPI_NAME:=crcmod
+PKG_HASH:=dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e
+
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=David Bauer <mail@david-bauer.net>
+
+PYTHON3_PKG_SETUP_ARGS:=
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-crcmod
+ SECTION:=lang-python
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python3-crcmod
+ URL:=http://crcmod.sourceforge.net/
+ DEPENDS:=+python3-light
+endef
+
+define Package/python3-crcmod/description
+The software in this package is a Python module for generating
+objects that compute the Cyclic Redundancy Check (CRC).
+endef
+
+$(eval $(call Py3Package,python3-crcmod))
+$(eval $(call BuildPackage,python3-crcmod))
+$(eval $(call BuildPackage,python3-crcmod-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pycrate
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/P1sec/pycrate/archive/refs/tags/$(PKG_VERSION).tar.gz?
+PKG_HASH:=73072234359cdc11d7c6790c367d5565fdaea284a07df882b8b5295f2a4f83d1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pycrate-$(PKG_VERSION)
+
+PKG_LICENSE:=LGPL-2.1
+PKG_MAINTAINER:=David Bauer <mail@david-bauer.net>
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pycrate
+ SECTION:=lang-python
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python3-pycrate
+ URL:=https://github.com/P1sec/pycrate
+ DEPENDS:=+python3-light
+endef
+
+define Package/python3-pycrate/description
+Provides a runtime for encoding and decoding data structures, including CSN.1
+and ASN.1. Additionally, it features a 3G and LTE mobile core network.
+endef
+
+$(eval $(call Py3Package,python3-pycrate))
+$(eval $(call BuildPackage,python3-pycrate))
+$(eval $(call BuildPackage,python3-pycrate-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=cloudflared
-PKG_VERSION:=2022.9.1
+PKG_VERSION:=2022.10.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/cloudflare/cloudflared/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=4919eef5814b4ecc41e1359f9546389688194c9e893b4de3c40b0e3cd2919605
+PKG_HASH:=f83c1ab042e7b15da69d2e7764898e0bc30f94ecd7db36dbd6270ebade1d5d27
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
include $(TOPDIR)/rules.mk
PKG_NAME:=https-dns-proxy
-PKG_VERSION:=2021-11-22
-PKG_RELEASE:=7
+PKG_VERSION:=2022-08-12
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/
-PKG_SOURCE_DATE:=2021-11-22
-PKG_SOURCE_VERSION:=9336fd6272d67e8bb6e304fa54f3139a3d26f08f
-PKG_MIRROR_HASH:=60b1ddabaf1db3a9ee19f3294a1df714364d580cef5e3c2161363c371a557456
+PKG_SOURCE_DATE:=2022-08-12
+PKG_SOURCE_VERSION:=a344d192e22e0c133aecfd766fefa7474cf2594f
+PKG_MIRROR_HASH:=d3de80df13157e1f5066689880a7132532895d24b36f16c9f0b2acf764cf773f
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
local cfg="$1" param listen_addr listen_port ipv6_resolvers_only p
config_get_bool ipv6_resolvers_only "$cfg" 'use_ipv6_resolvers_only' '0'
append_parm "$cfg" 'resolver_url' '-r'
- append_parm "$cfg" 'polling_interval' '-i'
append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1'
append_parm "$cfg" 'listen_port' '-p' "$port"
append_parm "$cfg" 'dscp_codepoint' '-c'
append_bootstrap "$cfg" 'bootstrap_dns' '-b' "$DEFAULT_BOOTSTRAP"
append_parm "$cfg" 'user' '-u' 'nobody'
append_parm "$cfg" 'group' '-g' 'nogroup'
+ append_parm "$cfg" 'ca_certs_file' '-C'
+ append_parm "$cfg" 'polling_interval' '-i'
append_parm "$cfg" 'proxy_server' '-t'
append_parm "$cfg" 'logfile' '-l'
append_bool "$cfg" 'use_http1' '-x'
}
# shellcheck disable=SC1091
-service_triggers() {
- local iface
+service_triggers() {
+ local wan wan6 i
. /lib/functions/network.sh
network_flush_cache
- network_find_wan iface
- iface="${iface:-wan}"
- if [ -n "$iface" ]; then
- procd_add_interface_trigger "interface.*" "$iface" "/etc/init.d/${packageName}" restart
- fi
+ network_find_wan wan
+ network_find_wan6 wan6
+ wan="${wan:-wan}"
+ for i in "$wan" "$wan6"; do
+ procd_add_interface_trigger "interface.*" "$i" "/etc/init.d/${packageName}" restart
+ done
procd_add_config_trigger "config.change" "$packageName" "/etc/init.d/${packageName}" restart
}
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -21,9 +21,9 @@ if(NOT CMAKE_BUILD_TYPE)
- message(STATUS "Setting build type to '${CMAKE_BUILD_TYPE}' as none was specified.")
+@@ -25,9 +25,9 @@ if (NOT CMAKE_INSTALL_BINDIR)
+ set(CMAKE_INSTALL_BINDIR bin)
endif()
-set(CMAKE_C_FLAGS "-Wall -Wextra --pedantic -Wno-strict-aliasing -Wno-variadic-macros")
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=qcsuper
+PKG_VERSION:=2022-08-11
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/P1sec/QCSuper.git
+PKG_SOURCE_VERSION:=5c4e5295bf336bcce63c8ad7112ac04dee4b04fd
+PKG_MIRROR_HASH:=45ec6f839945f3c3cbd21ca973f3df2e8972113e32995bf5435403eea6872596
+
+PKG_MAINTAINER:=David Bauer <mail@david-bauer.net>
+PKG_LICENSE:=GPL-3.0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/qcsuper
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+python3-light +python3-pyserial +python3-crcmod +python3-ctypes +python3-pycrate +python3-logging +python3-urllib
+ TITLE:=QCSuper
+ URL:=https://github.com/P1sec/QCSuper
+endef
+
+define Package/qcsuper/description
+QCSuper is a tool communicating with Qualcomm-based modems,
+allowing to capture raw 2G/3G/4G radio frames, among other things.
+
+It will allow you to generate PCAP captures of it using an USB dongle
+or an existing capture in another format.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/qcsuper/install
+ $(INSTALL_DIR) $(1)/usr/lib/qcsuper/inputs $(1)/usr/lib/qcsuper/modules $(1)/usr/lib/qcsuper/protocol $(1)/usr/bin
+
+ $(CP) $(PKG_BUILD_DIR)/inputs/* $(1)/usr/lib/qcsuper/inputs/
+ $(RM) -rf $(1)/usr/lib/qcsuper/inputs/external
+ $(RM) -rf $(1)/usr/lib/qcsuper/inputs/adb_bridge
+ $(RM) -rf $(1)/usr/lib/qcsuper/inputs/adb_wsl2_bridge
+
+ $(CP) $(PKG_BUILD_DIR)/modules/* $(1)/usr/lib/qcsuper/modules/
+
+ $(CP) $(PKG_BUILD_DIR)/protocol/* $(1)/usr/lib/qcsuper/protocol/
+
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/qcsuper.py $(1)/usr/lib/qcsuper/
+ $(LN) /usr/lib/qcsuper/qcsuper.py $(1)/usr/bin/qcsuper
+endef
+
+$(eval $(call BuildPackage,qcsuper))
include $(TOPDIR)/rules.mk
PKG_NAME:=samba
-PKG_VERSION:=4.14.14
+PKG_VERSION:=4.17.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
http://samba.mirror.bit.nl/samba/ftp/stable/ \
https://download.samba.org/pub/samba/stable/
-PKG_HASH:=abd5e9e6aa45e55114b188ba189ebdfc8fd3d7718d43f749e477ce7f791e5519
+PKG_HASH:=04868ecda82fcbeda7b8bf519a2461a64d55c6e70efc6f6053b2fbba55f1823a
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=COPYING
define Package/samba4-libs
$(call Package/samba4/Default)
TITLE+= libs
- DEPENDS:= +libtirpc +libreadline +libpopt +libcap +zlib +libgnutls +libtasn1 +libuuid +libopenssl +libpthread +KERNEL_IO_URING:liburing \
+ DEPENDS:= +libtirpc +libreadline +libpopt +libcap +zlib +libgnutls +perlbase-json-pp +libtasn1 +libuuid +libopenssl +libpthread +KERNEL_IO_URING:liburing \
+PACKAGE_libpam:libpam \
+SAMBA4_SERVER_VFS:attr \
+SAMBA4_SERVER_AVAHI:libavahi-client \
--without-automount \
--without-iconv \
--without-lttng \
- --without-ntvfs-fileserver \
--without-pam \
--without-systemd \
--without-utmp \
--without-automount \
--without-iconv \
--without-lttng \
- --without-ntvfs-fileserver \
--without-pam \
--without-systemd \
--without-utmp \
HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support --without-winbind \
--without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo \
- --without-dnsupdate --without-ads --without-ldap --without-ldb-lmdb
+ --without-ads --without-ldap --without-ldb-lmdb
# Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
# Support for Nettle wasn't comitted
CONFIGURE_ARGS += --without-winbind --without-ldb-lmdb --with-acl-support
else
CONFIGURE_ARGS += --without-winbind --without-ads --without-ldap --without-ldb-lmdb --without-ad-dc \
- --without-json --without-libarchive --disable-python --nopyc --nopyo --without-dnsupdate --without-acl-support
+ --without-json --without-libarchive --disable-python --nopyc --nopyo --without-acl-support
endif
SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
export COMPILE_ET=$(STAGING_DIR_HOSTPKG)/bin/compile_et_samba
export ASN1_COMPILE=$(STAGING_DIR_HOSTPKG)/bin/asn1_compile_samba
+export PYTHONHASHSEED=1
# make sure we use the hostpkg build toolset and we need to find host 'yapp'
HOST_CONFIGURE_VARS+= \
$(call Host/Prepare/Default)
$(SED) 's,mandatory=True,mandatory=False,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
$(SED) 's,gnutls_version =.*,gnutls_version = gnutls_min_required_version,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
+ $(SED) 's,gnutls_version_str.*,gnutls_version_str = "3.7.7",g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
+ $(SED) 's,(gnutls_version > .*,(parse_version(gnutls_version) > parse_version("3.6.10")):,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
+ $(SED) 's,(gnutls_version < .*,(parse_version(gnutls_version) < parse_version("3.5.2")):,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
endef
define Host/Compile
(cd $(HOST_BUILD_DIR); \
+++ /dev/null
---- a/source3/wscript
-+++ b/source3/wscript
-@@ -885,7 +885,7 @@ msg.msg_accrightslen = sizeof(fd);
- if conf.env.with_iconv:
- conf.DEFINE('HAVE_ICONV', 1)
-
-- if Options.options.with_pam:
-+ if Options.options.with_pam != False:
- use_pam=True
- conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
- if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
-@@ -962,6 +962,17 @@ int i; i = PAM_RADIO_TYPE;
- "or headers not found. Use --without-pam to disable "
- "PAM support.");
-
-+ else:
-+ Logs.warn("PAM disabled")
-+ use_pam=False
-+ conf.undefine('WITH_PAM')
-+ conf.undefine('WITH_PAM_MODULES')
-+ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
-+ conf.undefine('PAM_RHOST')
-+ conf.undefine('PAM_TTY')
-+ conf.undefine('HAVE_PAM_PAM_APPL_H')
-+
-+
- seteuid = False
-
- #
+++ /dev/null
-samba: build dnsserver_common code
-
-Just 'install' does not seem to do it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
---- a/source4/dns_server/wscript_build
-+++ b/source4/dns_server/wscript_build
-@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common',
- source='dnsserver_common.c',
- deps='samba-util samba-errors ldbsamba clidns',
- private_library=True,
-- install=bld.AD_DC_BUILD_IS_ENABLED()
-+ enabled=bld.AD_DC_BUILD_IS_ENABLED()
- )
-
- bld.SAMBA_MODULE('service_dns',
+++ /dev/null
---- a/nsswitch/wins.c
-+++ b/nsswitch/wins.c
-@@ -40,6 +40,14 @@ static pthread_mutex_t wins_nss_mutex =
- #define INADDRSZ 4
- #endif
-
-+#ifndef NETDB_INTERNAL
-+#define NETDB_INTERNAL -1
-+#endif
-+
-+#ifndef NETDB_SUCCESS
-+#define NETDB_SUCCESS 0
-+#endif
-+
- NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
- struct hostent *he,
- char *buffer,
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
-@@ -32,6 +32,8 @@
- #include <talloc.h>
+@@ -33,6 +33,7 @@
#include <sys/time.h>
+ #include <sys/types.h>
#include <stdbool.h>
+#include <sys/stat.h>
-+#include <sys/types.h>
/* for old gcc releases that don't have the feature test macro __has_attribute */
#ifndef __has_attribute
--- a/wscript_configure_embedded_heimdal
+++ b/wscript_configure_embedded_heimdal
-@@ -2,3 +2,14 @@ if not conf.env['FLEX']:
- conf.fatal("Embedded Heimdal build requires flex but it was not found. Install flex or use --with-system-mitkrb5 or --with-system-heimdalkrb5")
+@@ -6,3 +6,14 @@ if not conf.env['BISON']:
- conf.RECURSE('source4/heimdal_build')
+ conf.define('USING_EMBEDDED_HEIMDAL', 1)
+ conf.RECURSE('third_party/heimdal_build')
+
+def check_system_heimdal_binary(name):
+ if conf.LIB_MAY_BE_BUNDLED(name):
check_system_heimdal_lib("com_err", "com_right_r com_err", "com_err.h")
if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"):
-@@ -96,7 +88,4 @@ finally:
+@@ -86,9 +78,6 @@ finally:
#if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
# conf.define('USING_SYSTEM_TOMMATH', 1)
-check_system_heimdal_binary("compile_et")
-check_system_heimdal_binary("asn1_compile")
-
+ conf.env.KRB5_VENDOR = 'heimdal'
conf.define('USING_SYSTEM_KRB5', 1)
+ conf.define('USING_SYSTEM_HEIMDAL', 1)
--- a/lib/util/util_paths.c
+++ b/lib/util/util_paths.c
-@@ -26,6 +26,9 @@
- #include "dynconfig/dynconfig.h"
- #include "lib/util/util_paths.h"
+@@ -28,6 +28,10 @@
#include "system/passwd.h"
+ #include "system/filesys.h"
+
+#if !defined(__GLIBC__)
+ #define NSS_BUFLEN_PASSWD 1024
+#endif
-
++
/**
* @brief Returns an absolute path to a file in the Samba modules directory.
+ *
--- a/python/wscript
+++ b/python/wscript
-@@ -73,9 +73,9 @@ def configure(conf):
- for module, package in selftest_pkgs.items():
- find_third_party_module(conf, module, package)
+@@ -90,9 +90,9 @@ def configure(conf):
+ "'python3-iso8601'. Please install "
+ "one of the packages.")
- if not Options.options.without_ad_dc:
- for module, package in ad_dc_pkgs.items():
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
-@@ -507,7 +507,7 @@ static NTSTATUS messaging_init_internal(
+@@ -500,7 +500,7 @@ static NTSTATUS messaging_init_internal(
return NT_STATUS_ACCESS_DENIED;
}
if (priv_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
-@@ -670,7 +670,7 @@ NTSTATUS messaging_reinit(struct messagi
+@@ -663,7 +663,7 @@ NTSTATUS messaging_reinit(struct messagi
msg_ctx->per_process_talloc_ctx,
msg_ctx->event_ctx,
&msg_ctx->id.unique_id,
+++ /dev/null
-From: https://gitlab.com/samba-team/samba/-/commit/29f11005f56ebc2202e7883ea4d9ca7e7a46d9bb
-
-From 29f11005f56ebc2202e7883ea4d9ca7e7a46d9bb Mon Sep 17 00:00:00 2001
-From: "Sergey V. Lobanov" <sergey@lobanov.in>
-Date: Thu, 10 Feb 2022 00:02:17 +0300
-Subject: [PATCH] wafsamba: replace 'echo -n' with printf
-
-This patch makes samba_cross.py compatible with old bash (e.g. 3.2)
-
-Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
-Reviewed-by: Christof Schmitt <cs@samba.org>
-Reviewed-by: Andreas Schneider <asn@samba.org>
-
-Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
-Autobuild-Date(master): Fri Feb 11 07:58:57 UTC 2022 on sn-devel-184
----
- buildtools/wafsamba/samba_cross.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/buildtools/wafsamba/samba_cross.py
-+++ b/buildtools/wafsamba/samba_cross.py
-@@ -134,7 +134,7 @@ class cross_Popen(Utils.subprocess.Popen
- cross_answers_incomplete = True
- add_answer(ca_file, msg, ans)
- (retcode, retstring) = ans
-- args = ['/bin/sh', '-c', "echo -n '%s'; exit %d" % (retstring, retcode)]
-+ args = ['/bin/sh', '-c', "printf %%s '%s'; exit %d" % (retstring, retcode)]
- real_Popen.__init__(*(obj, args), **kw)
-
-
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
-@@ -416,22 +416,13 @@ def configure(conf):
+@@ -436,22 +436,13 @@ def configure(conf):
conf.CHECK_FUNCS('prctl dirname basename')
conf.CHECK_CODE('''
struct ucred cred;
-@@ -817,9 +808,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
+@@ -834,9 +825,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
# look for a method of finding the list of network interfaces
for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
if conf.CHECK_CODE('''
#define %s 1
#define NO_CONFIG_H 1
-@@ -832,7 +820,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
+@@ -849,7 +837,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
#include "tests/getifaddrs.c"
''' % method,
method,
addmain=False,
execute=True):
break
-@@ -880,7 +868,6 @@ def build(bld):
+@@ -897,7 +885,6 @@ def build(bld):
break
extra_libs = ''
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
-@@ -11,13 +11,13 @@ conf.CHECK_FUNCS_IN('backtrace backtrace
+@@ -12,17 +12,17 @@ conf.CHECK_FUNCS_IN('backtrace backtrace
conf.CHECK_HEADERS('execinfo.h')
conf.SET_TARGET_TYPE('LIBUNWIND', 'EMPTY')
--if conf.check_cfg(package='libunwind-generic',
-- args='--cflags --libs',
-- msg='Checking for libunwind',
-- uselib_store='LIBUNWIND',
-- mandatory=False):
-- if conf.CHECK_HEADERS('libunwind.h'):
-- conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
-+# if conf.check_cfg(package='libunwind-generic',
-+ # args='--cflags --libs',
-+ # msg='Checking for libunwind',
-+ # uselib_store='LIBUNWIND',
-+ # mandatory=False):
-+ # if conf.CHECK_HEADERS('libunwind.h'):
-+ # conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
-
- conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h')
-
+-if Options.options.with_libunwind:
+- if conf.check_cfg(package='libunwind-generic',
+- args='--cflags --libs',
+- msg='Checking for libunwind',
+- uselib_store='LIBUNWIND',
+- mandatory=False):
+- if conf.CHECK_HEADERS('libunwind.h'):
+- conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
+- else:
+- raise Errors.WafError('--with-libunwind specified but libunwind not found')
+-elif Options.options.with_libunwind == None:
++#if Options.options.with_libunwind:
++ #if conf.check_cfg(package='libunwind-generic',
++ #args='--cflags --libs',
++ #msg='Checking for libunwind',
++ #uselib_store='LIBUNWIND',
++ #mandatory=False):
++ #if conf.CHECK_HEADERS('libunwind.h'):
++ #conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
++ #else:
++ #raise Errors.WafError('--with-libunwind specified but libunwind not found')
++if Options.options.with_libunwind == None:
+ if not conf.CONFIG_SET('HAVE_BACKTRACE_SYMBOLS') \
+ and not Options.options.disable_fault_handling:
+ raise Errors.WafError(
--- /dev/null
+--- a/third_party/heimdal/cf/make-proto.pl
++++ b/third_party/heimdal/cf/make-proto.pl
+@@ -4,7 +4,7 @@
+ use Getopt::Std;
+ use File::Compare;
+
+-use JSON;
++use JSON::PP;
+
+ my $comment = 0;
+ my $doxygen = 0;
+@@ -70,7 +70,7 @@ if($opt_x) {
+ my $EXP;
+ local $/;
+ open(EXP, '<', $opt_x) || die "open ${opt_x}";
+- my $obj = JSON->new->utf8->decode(<EXP>);
++ my $obj = JSON::PP->new->utf8->decode(<EXP>);
+ close $EXP;
+
+ foreach my $x (keys %$obj) {
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking whether setresuid is available: NO
Checking whether seteuid is available: NO
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
Checking for ftruncate extend: OK
getcwd takes a NULL argument: OK
Checking for readlink breakage: OK
+Checking for gnutls fips mode support: NO
\ No newline at end of file
--- /dev/null
+# SPDX-Identifier-License: GPL-2.0-only
+#
+# Copyright (C) 2005 Fabian Schneider,
+# 2010 Florian Sesser,
+# 2022 Thomas Hühn
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cpusage
+PKG_VERSION:=$(AUTORELEASE)
+PKG_MAINTAINER:=Thomas Hühn <thomas.huehn@hs-nordhausen.de>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/cpusage
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Outputs CPU usage statistics once per second
+endef
+
+define Package/cpusage/description
+ CPUsage outputs CPU usage statistics once per second.
+ Optionally writes CSV output (see '-o' option).
+ Originally written by Fabian Schneider (TUM, TUB) in 2005.
+ Timestamp and CSV-compliance by Florian Sesser (TUM), 2010.
+ Refreshed by Thomas Hühn in 2022.
+endef
+
+define Build/Compile
+ $(TARGET_CC) $(TARGET_CFLAGS) \
+ -o $(PKG_BUILD_DIR)/cpusage $(PKG_BUILD_DIR)/cpusage.c
+endef
+
+define Package/cpusage/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cpusage $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,cpusage))
--- /dev/null
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/resource.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#define CPUSTATES 7
+#define IDLEI 3
+/* long names:
+ * user - nice - system - idle - iowait - irq - soft irq */
+char *cpustatenames[] = {"user", "nice", "system", "idle",
+ "iowait", "irq", "softirq", NULL};
+
+#define LIMIT 95
+
+static const char usage[] =
+ "\n usage: cpusage [ -hos ] [ -a | -l limit | -o ] [ -c CPU ]\n";
+
+char *appname;
+
+static float cpu_perc[CPUSTATES];
+static float cpu_max[CPUSTATES];
+static float cpu_min[CPUSTATES];
+
+int cpunum; /* -1 all, 0-n CPU/Core 0-n */
+
+int output;
+
+int breakloop;
+
+/* returns 1-n yielding the number of CPU's/Cores */
+int getNumCPU() {
+ char buffer[32768];
+ int fd, len, i;
+ char *test;
+
+ fd = open("/proc/stat", O_RDONLY);
+ if (fd <= 0)
+ fprintf(stderr, "%s: cannot open /proc/stat \n", appname);
+
+ len = read(fd, buffer, sizeof(buffer) - 1);
+ close(fd);
+ buffer[len] = '\0';
+
+ i = 0;
+
+ test = strstr(buffer, "cpu");
+ if (test != NULL) {
+ test += sizeof("cpu");
+ test = strstr(test, "cpu");
+ }
+
+ while (test != NULL) {
+ test += sizeof("cpu");
+ /* fprintf(stderr, "%s: DEBUG: %s\n", appname, test); */
+ i++;
+ test = strstr(test, "cpu");
+ }
+ return i;
+}
+
+void getSysinfo(unsigned long *ptr, size_t size) {
+ char buffer[4096];
+ char match[100];
+ char *start;
+ int fd, len, j;
+
+ for (j = 0; j < size; j++)
+ ptr[j] = 0;
+
+ fd = open("/proc/stat", O_RDONLY);
+ if (fd <= 0)
+ fprintf(stderr, "%s: cannot open /proc/stat\n", appname);
+
+ len = read(fd, buffer, sizeof(buffer) - 1);
+ close(fd);
+ buffer[len] = '\0';
+
+ strcpy(match, "cpu ");
+ start = buffer;
+ if (cpunum != -1) {
+ sprintf(match, "cpu%d ", cpunum);
+ start = strstr(buffer, match);
+ }
+
+ strcat(match, "%ld %ld %ld %ld %ld %ld %ld");
+ if (sscanf(start, match, &ptr[0], &ptr[1], &ptr[2], &ptr[3], &ptr[4], &ptr[5],
+ &ptr[6]) != 7) {
+ fprintf(stderr, "%s: wrong /proc/stat format\n", appname);
+ }
+}
+
+long perc(int cpustates, long *cp_time, long *cp_old, long *cp_diff) {
+
+ int i = 0;
+ long total = 0;
+
+ for (i = 0; i < cpustates; i++) {
+ cp_diff[i] = cp_time[i] - cp_old[i];
+ total += cp_diff[i];
+ }
+
+ for (i = 0; i < cpustates; i++) {
+ cpu_perc[i] = ((float)cp_diff[i] * 100.0 / total);
+ /* new max ? */
+ if (cpu_perc[i] > cpu_max[i])
+ cpu_max[i] = cpu_perc[i];
+ /* new min ? */
+ if (cpu_perc[i] < cpu_min[i])
+ cpu_min[i] = cpu_perc[i];
+ }
+
+ return total;
+}
+
+void print_perc(float *perc, const char *head) {
+ int i;
+ time_t Zeitstempel;
+ struct tm *now;
+
+ /* human readable */
+ if ((output == 0) && (head != ""))
+ printf("%s: ", head);
+
+ /* machine readable */
+ if ((output == 1) && (head != ""))
+ printf("%s;", head);
+
+ /* timestamp */
+ time(&Zeitstempel);
+ now = localtime(&Zeitstempel);
+ if (output == 0)
+ printf("timestamp: %04d-%02d-%02d %02d.%02d.%02d, ", now->tm_year + 1900,
+ now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min,
+ now->tm_sec);
+ else
+ printf("%04d-%02d-%02d;%02d:%02d:%02d;", now->tm_year + 1900,
+ now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min,
+ now->tm_sec);
+
+ if (output == 0)
+ printf("%s: %5.1f%%, ", cpustatenames[0], perc[0]);
+ else
+ printf("%.1f", perc[0]);
+
+ /* print out calculated information in percentages */
+ for (i = 1; i < CPUSTATES; i++) {
+ if (output == 0)
+ printf("%s: %5.1f%%, ", cpustatenames[i], perc[i]);
+ else
+ printf(";%.1f", perc[i]);
+ }
+ printf("\n");
+}
+
+/* to catch Strg+C when looping */
+void loop_term_handler(int signum) { breakloop = 1; }
+
+int main(int argc, char **argv) {
+
+ appname = argv[0];
+
+ int i, c, limit;
+ int runonce; /* run just once and exit */
+ int avg; /* is avg measurement allready running */
+ int avg_run; /* did we allready had an avg measurement */
+ static long cp_time1[CPUSTATES];
+ static long cp_time2[CPUSTATES];
+ static long cp_avg_start[CPUSTATES];
+ static long cp_avg_stop[CPUSTATES];
+ static long cp_diff[CPUSTATES];
+
+ struct sigaction sigold, signew;
+
+ long *old = cp_time2;
+ long *new = cp_time1;
+
+ long total;
+ limit = LIMIT;
+ output = 0; /* 0: human readable; 1: machine readable */
+ runonce = 0; /* 0: run continuesly; 1: run once */
+
+ cpunum = -1; /* -1: all CPUs/Cores, 0-n: special CPU/Core */
+
+ /* reading commandline options */
+ while (1) {
+ c = getopt(argc, argv, "saohl:c:");
+
+ if (c == -1) {
+ break;
+ }
+
+ switch (c) {
+ /*run once and exit */
+ case 's':
+ runonce = 1;
+ break;
+ /* use avg from begin to end -> same as "-l 100" */
+ case 'a':
+ limit = 100;
+ break;
+ case 'o':
+ output = 1; /* machine readable */
+ // header for CSV output
+ printf("date;time;user;nice;system;idle;iowait;irq;softirq\n");
+ break;
+ /* print usage */
+ case 'h':
+ fprintf(stderr, "%s: %s", appname, usage);
+ exit(0);
+ break;
+ /* set limit */
+ case 'l':
+ if (!(sscanf(optarg, "%d", &limit) == 1)) {
+ fprintf(stderr, "%s: option for -l should be integer (is %s)\n",
+ appname, optarg);
+ exit(1);
+ }
+ break;
+ /* select CPU/Core */
+ case 'c':
+ if (!(sscanf(optarg, "%d", &cpunum) == 1)) {
+ fprintf(stderr, "%s: option for -c should be integer (is %s)\n",
+ appname, optarg);
+ exit(1);
+ }
+ break;
+ }
+ }
+
+ if (cpunum != -1) {
+ int numcpu = getNumCPU();
+ if (cpunum < numcpu) {
+ printf("-- Selected CPU %d\n", cpunum);
+ } else {
+ if (numcpu == 1) {
+ fprintf(stderr, "%s: CPU %d not available (found %d CPU: [0])\n",
+ appname, cpunum, numcpu);
+ } else {
+ fprintf(stderr,
+ "%s: CPU %d not available (found %d CPU's: [0]-[%d])\n ",
+ appname, cpunum, numcpu, numcpu - 1);
+ }
+ exit(1);
+ }
+ }
+
+ breakloop = 0;
+
+ for (i = 0; i < CPUSTATES; i++) {
+ cpu_max[i] = 0;
+ cpu_min[i] = 100;
+ }
+
+ /* get information */
+ getSysinfo((unsigned long *)new, CPUSTATES);
+
+ /* catch Strg+C when capturing to call pcap_breakloop() */
+ memset(&signew, 0, sizeof(signew));
+ signew.sa_handler = loop_term_handler;
+ if (sigaction(SIGINT, &signew, &sigold) < 0) {
+ fprintf(stderr, "Could not set signal handler -> exiting");
+ }
+
+ avg = 0;
+ avg_run = 0;
+
+ if (runonce) {
+ breakloop = 1;
+ }
+
+ while (1) {
+ usleep(1000000);
+
+ if (new == cp_time1) {
+ new = cp_time2;
+ old = cp_time1;
+ } else {
+ new = cp_time1;
+ old = cp_time2;
+ }
+
+ /* get information again */
+ getSysinfo((unsigned long *)new, CPUSTATES);
+
+ /* convert cp_time counts to percentages */
+ total = perc(CPUSTATES, new, old, cp_diff);
+
+ /* check for avg measurement start */
+ if (!avg_run && !avg && (cpu_perc[IDLEI] <= limit)) {
+ avg = 1;
+ for (i = 0; i < CPUSTATES; i++)
+ cp_avg_start[i] = new[i];
+ }
+
+ /* check for avg measurement stop */
+ if (!avg_run && avg && (cpu_perc[IDLEI] > limit)) {
+ avg = 0;
+ for (i = 0; i < CPUSTATES; i++)
+ cp_avg_stop[i] = new[i];
+ avg_run = 1;
+ }
+
+ print_perc(cpu_perc, "");
+
+ if (breakloop) {
+ if (avg) {
+ avg = 0;
+ for (i = 0; i < CPUSTATES; i++)
+ cp_avg_stop[i] = new[i];
+ }
+ break;
+ }
+ }
+
+ /* Set default behaviour when loop is done */
+ if (sigaction(SIGINT, &sigold, &signew) < 0) {
+ fprintf(stderr, "%s: Could not restore signal handler -> exiting", appname);
+ }
+
+ if (!runonce && output == 0) {
+ // print avg only when not making a one-shot msg and
+ // when not writing CSV output
+ printf("---Summary----\n");
+
+ print_perc(cpu_min, "Min");
+
+ print_perc(cpu_max, "Max");
+
+ perc(CPUSTATES, cp_avg_start, cp_avg_stop, cp_diff);
+
+ print_perc(cpu_perc, "Avg");
+ }
+
+ return 0;
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=stress-ng
-PKG_VERSION:=0.14.03
+PKG_VERSION:=0.14.06
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ColinIanKing/stress-ng/tar.gz/refs/tags/V$(PKG_VERSION)?
-PKG_HASH:=95012c62883ab5826e6157557a075df98cce3cbce2a48bb40851bcc968a8441a
+PKG_HASH:=54f6c3f84b20efedafd3394ec168e53632a685cfdd76f24270653e898d9ede08
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=GPL-2.0-only
+++ /dev/null
---- a/stress-ng.h
-+++ b/stress-ng.h
-@@ -34,10 +34,6 @@
- #ifndef _LARGEFILE64_SOURCE
- #define _LARGEFILE64_SOURCE
- #endif
--#if !defined(__PCC__) && \
-- !defined(__TINYC__)
--#define _FORTIFY_SOURCE 2
--#endif
-
- #if !defined(_FILE_OFFSET_BITS)
- #define _FILE_OFFSET_BITS (64)
+++ /dev/null
-From a5e564bdd14dbda666fc7caffecc0f6e3527df85 Mon Sep 17 00:00:00 2001
-From: Alexandru Ardelean <ardeleanalex@gmail.com>
-Date: Fri, 12 Aug 2022 15:36:02 +0300
-Subject: [PATCH] stress-sysinval: fix fstat/fstat64 compat check
-
-It seems that __NR_fstat64 may be defined while __NR_fstat may be
-undefined.
-Looking at the kernel file 'include/uapi/asm-generic/unistd.h' this looks
-possible where there is a 32-bit arch.
-
-In any case, checking that __NR_fstat64 exists/has-a-value when adding it
-to the table looks like a good idea, vs adding __NR_fstat.
-
-This was found when updating stress-ng here:
- https://github.com/openwrt/packages/pull/19048
-
-The ARCHS (or ARC) build is failing. No idea why it's the only one.
-But this patch fixes it.
-
-Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
----
- stress-sysinval.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/stress-sysinval.c
-+++ b/stress-sysinval.c
-@@ -590,8 +590,8 @@ static const stress_syscall_arg_t stress
- { SYS(fstat), 2, { ARG_FD, ARG_PTR_WR, 0, 0, 0, 0 } },
- #endif
- #if DEFSYS(fstat64)
-- { SYS(fstat), 2, { ARG_FD, ARG_PTR, 0, 0, 0, 0 } },
-- { SYS(fstat), 2, { ARG_FD, ARG_PTR_WR, 0, 0, 0, 0 } },
-+ { SYS(fstat64), 2, { ARG_FD, ARG_PTR, 0, 0, 0, 0 } },
-+ { SYS(fstat64), 2, { ARG_FD, ARG_PTR_WR, 0, 0, 0, 0 } },
- #endif
- #if DEFSYS(fstatat)
- { SYS(fstatat), 4, { ARG_DIRFD, ARG_EMPTY_FILENAME, ARG_PTR, ARG_FLAG, 0, 0 } },
include $(TOPDIR)/rules.mk
PKG_NAME:=yq
-PKG_VERSION:=4.27.5
+PKG_VERSION:=4.28.1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/mikefarah/yq/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0b9ed8759c53534978a661786845eb3c6ec425aee15bab4742d1bead73e28150
+PKG_HASH:=fde7e2d1d79c927f0d36a4d2b5fadff516db8285d88363cf7af34239512c084d
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MIT