Merge pull request #20731 from pprindeville/isc-dhcp-update-4.4.3-P1
authorPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 7 Apr 2023 18:38:30 +0000 (12:38 -0600)
committerGitHub <noreply@github.com>
Fri, 7 Apr 2023 18:38:30 +0000 (12:38 -0600)
isc-dhcp: Update to 4.4.3-P1

180 files changed:
.github/workflows/entrypoint.sh
admin/sudo/Makefile
admin/sudo/patches/020-no-owner-change.patch
lang/golang/golang-compiler.mk
lang/golang/golang-values.mk
lang/golang/golang/Makefile
lang/golang/golang/patches/001-cmd-link-use-gold-on-ARM-ARM64-only-if-gold-is-available.patch
lang/maturin/Makefile [new file with mode: 0644]
lang/node/Makefile
lang/node/patches/990-delete_unnecessary_libraries_for_host_execute.patch
lang/node/patches/991-v8_zlib_support.patch
lang/node/patches/992-v8_add_include_dirs.patch [new file with mode: 0644]
lang/node/patches/992-v8_compiler_add_include_dirs.patch [deleted file]
lang/perl-cgi/Makefile
lang/perl-text-csv_xs/Makefile
lang/python/bcrypt/Makefile
lang/python/borgbackup/Makefile
lang/python/host-pip-requirements/Cython.txt [deleted file]
lang/python/host-pip-requirements/cffi.txt [deleted file]
lang/python/host-pip-requirements/ply.txt [deleted file]
lang/python/host-pip-requirements/setuptools-scm.txt [deleted file]
lang/python/host-pip-requirements/toml.txt [deleted file]
lang/python/numpy/Makefile
lang/python/pillow/Makefile
lang/python/python-aio-mqtt-mod/Makefile [new file with mode: 0644]
lang/python/python-apipkg/Makefile
lang/python/python-augeas/Makefile
lang/python/python-bidict/Makefile
lang/python/python-ble2mqtt/Makefile [new file with mode: 0644]
lang/python/python-bleak/Makefile [new file with mode: 0644]
lang/python/python-build/Makefile [new file with mode: 0644]
lang/python/python-cffi/Makefile
lang/python/python-cryptography/Makefile
lang/python/python-cython/Makefile [new file with mode: 0644]
lang/python/python-dateutil/Makefile
lang/python/python-dbus-fast/Makefile [new file with mode: 0644]
lang/python/python-editables/Makefile [new file with mode: 0644]
lang/python/python-execnet/Makefile
lang/python/python-flit-core/Makefile [new file with mode: 0644]
lang/python/python-flit-scm/Makefile [new file with mode: 0644]
lang/python/python-hatch-fancy-pypi-readme/Makefile [new file with mode: 0644]
lang/python/python-hatch-vcs/Makefile [new file with mode: 0644]
lang/python/python-hatchling/Makefile [new file with mode: 0644]
lang/python/python-iniconfig/Makefile
lang/python/python-installer/Makefile [new file with mode: 0644]
lang/python/python-jsonschema/Makefile
lang/python/python-packaging/Makefile
lang/python/python-pathspec/Makefile [new file with mode: 0644]
lang/python/python-pluggy/Makefile
lang/python/python-ply/Makefile
lang/python/python-poetry-core/Makefile [new file with mode: 0644]
lang/python/python-psutil/Makefile
lang/python/python-py/Makefile
lang/python/python-pycares/Makefile
lang/python/python-pycparser/Makefile
lang/python/python-pynacl/Makefile
lang/python/python-pyproject-hooks/Makefile [new file with mode: 0644]
lang/python/python-pytest-forked/Makefile
lang/python/python-pytest-xdist/Makefile
lang/python/python-pytest/Makefile
lang/python/python-pytz/Makefile
lang/python/python-setuptools-scm/Makefile [new file with mode: 0644]
lang/python/python-tomli/Makefile [new file with mode: 0644]
lang/python/python-typing-extensions/Makefile
lang/python/python-wheel/Makefile [new file with mode: 0644]
lang/python/python-yaml/Makefile
lang/python/python-zipp/Makefile
lang/python/python3-host-build.mk [new file with mode: 0644]
lang/python/python3-host.mk
lang/python/python3-package.mk
lang/python/python3/Makefile
lang/rust/Config.in [deleted file]
lang/rust/Makefile
lang/rust/files/cargo-config [new file with mode: 0644]
lang/rust/maturin/Makefile [deleted file]
lang/rust/rust-host-build.mk [new file with mode: 0644]
lang/rust/rust-host.mk [deleted file]
lang/rust/rust-package.mk
lang/rust/rust-values.mk [new file with mode: 0644]
lang/rust/rust_config.mk [deleted file]
libs/afalg_engine/Config.in
libs/afalg_engine/Makefile
libs/afalg_engine/files/afalg.cnf
libs/gost_engine/Makefile
libs/gost_engine/files/gost.cnf
libs/libdmapsharing/Makefile
libs/libdmapsharing/patches/001-disable_pixbuf.patch
libs/openblas/Makefile
libs/pcre2/Makefile
libs/rpcsvc-proto/Makefile
net/adblock/Makefile
net/adblock/files/adblock.sh
net/adblock/files/adblock.sources
net/banip/Makefile
net/banip/files/README.md
net/banip/files/banip-functions.sh
net/banip/files/banip-service.sh
net/banip/files/banip.countries
net/banip/files/banip.init
net/banip/files/banip.tpl
net/beanstalkd/Makefile
net/beanstalkd/patches/900-makefile.patch [deleted file]
net/beanstalkd/patches/901-fix-headers.patch [deleted file]
net/beanstalkd/patches/902-replace-posix_fallocate.patch [deleted file]
net/beanstalkd/patches/903-fix-size_t-format-spec [new file with mode: 0644]
net/cloudflared/Makefile
net/curl/Config.in
net/curl/Makefile
net/dmapd/Makefile
net/dnslookup/Makefile
net/dnsproxy/Makefile
net/gensio/Makefile
net/haproxy/Makefile
net/haproxy/get-latest-patches.sh
net/natmap/Makefile
net/natmap/files/natmap.config
net/net-snmp/files/snmpd.init
net/netbird/Makefile
net/onionshare-cli/Makefile
net/samba4/Makefile
net/samba4/patches/009-samba-4-11-fix-host-tools-checks.patch.patch
net/samba4/patches/021-source4-msgsock-nvram-fix.patch
net/samba4/patches/102-samba-4.11-unbundle-libbsd.patch
net/sing-box/Makefile
net/snort3/Makefile
net/strongswan/Makefile
net/strongswan/files/swanctl.init
net/tinyproxy/Makefile
net/tinyproxy/files/tinyproxy.config
net/tinyproxy/files/tinyproxy.init
net/tinyproxy/patches/120-fix_INET6.patch
net/transmission-web-control/Makefile
net/transmission/Makefile
net/v2raya/Makefile
net/v2raya/files/v2raya.config
net/v2raya/files/v2raya.init
net/v2raya/patches/013-fix-we-should-skip-interface-ppp-to-avoid-to-break-net.patch [deleted file]
net/v2raya/patches/014-fix-seed-cannot-be-read-from-vless-sharing-link-and-add-m.patch [deleted file]
net/v2raya/patches/015-fix-a-problem-that-supervisor-cannot-exit-normally.patch [deleted file]
net/v2raya/patches/016-fix-unexpected-exit-does-not-apply-stop-steps.patch [deleted file]
net/v2raya/patches/017-optimize-reduce-disk-writes.patch [deleted file]
net/v2raya/patches/018-fix-do-not-rollback-closed-transaction.patch [deleted file]
net/v2raya/patches/019-fix-simple-obfs.patch [deleted file]
net/v2raya/patches/020-feat-add-nftables-support.patch [deleted file]
utils/apparmor/Makefile
utils/cni-plugins-nft/Makefile
utils/collectd/Makefile
utils/coreutils/Makefile
utils/coreutils/patches/001-no_docs_man_tests.patch
utils/docker-compose/Makefile
utils/fio/Makefile
utils/gummiboot/Makefile
utils/gummiboot/patches/015-gummiboot-aarch64-support.patch [new file with mode: 0644]
utils/lxc/Makefile
utils/lxc/patches/001-build-detect-where-struct-mount_attr-is-declared.patch [deleted file]
utils/lxc/patches/002-build-detect-sys-pidfd.h-availability.patch [deleted file]
utils/lxc/patches/003-build-check-for-FS_CONFIG_-header-symbol-in-sys-moun.patch [deleted file]
utils/lxc/patches/011-tree-wide-wipe-direct-or-indirect-linux-mount.h-incl.patch [deleted file]
utils/lxc/patches/012-tree-wide-use-struct-clone_args-directly.patch [deleted file]
utils/lxc/patches/013-tree-wide-use-struct-open_how-directly.patch [deleted file]
utils/nano/Makefile
utils/open-vm-tools/Makefile
utils/open-vm-tools/patches/0001-werror.patch
utils/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch
utils/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
utils/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch
utils/open-vm-tools/patches/010-warnings.patch
utils/pax-utils/Config.in [new file with mode: 0644]
utils/pax-utils/Makefile [new file with mode: 0644]
utils/ripgrep/Makefile
utils/setools/Makefile
utils/squashfs-tools/Makefile
utils/stress-ng/Makefile
utils/stress-ng/patches/001-disable-gpu-stressor.patch
utils/stress-ng/patches/002-disable-xxhash.patch
utils/swig/Makefile
utils/syncthing/Makefile
utils/xz/Makefile
utils/yq/Makefile
utils/zoneinfo/Makefile

index 6af84b8e7ee6d30dd1bb017fe9d8d9ccd5f960e9..8f00a84685729708dec46b36db41b68fc46aa940 100755 (executable)
@@ -39,5 +39,5 @@ for PKG in /ci/*.ipk; do
                echo "No test.sh script available"
        fi
 
-       opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove
+       opkg remove "$PKG_NAME" --force-removal-of-dependent-packages --force-remove --autoremove || true
 done
index fbb6adcc0dc8ff82153646581dbb136c4f8d551b..9b90d1fc568e68790967dc9700f935e3db6cc9ca 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sudo
-PKG_VERSION:=1.9.12p2
+PKG_VERSION:=1.9.13p3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.sudo.ws/dist
-PKG_HASH:=b9a0b1ae0f1ddd9be7f3eafe70be05ee81f572f6f536632c44cd4101bb2a8539
+PKG_HASH:=92334a12bb93e0c056b09f53e255ccb7d6f67c6350e2813cd9593ceeca78560b
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
index 31184469bae88ef844c6e3ddf3697b3eb8875207..1dbc0a251d907feeb16c5b50ea1d74dc1538b234 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -75,7 +75,7 @@ GREP = @GREP@
+@@ -73,7 +73,7 @@ EGREP = @EGREP@
  SED = @SED@
  
  INSTALL = $(SHELL) $(scriptdir)/install-sh -c
index 8f9c9a380e78e0d3d61c5cda196d057d21ef95eb..b8c278568d3a9ca81ca9101fc579fd4b8361617b 100644 (file)
@@ -76,8 +76,10 @@ define GoCompiler/Default/Install/Bin
        $(INSTALL_BIN) -p "$(1)/bin/$(4)"/* "$(2)/lib/go-$(3)/bin/"
   endif
 
-       $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg"
-       $(CP) "$(1)/pkg/$(4)$(if $(5),_$(5))" "$(2)/lib/go-$(3)/pkg/"
+       if [ -d "$(1)/pkg/$(4)$(if $(5),_$(5))" ]; then \
+               $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg" ; \
+               $(CP) "$(1)/pkg/$(4)$(if $(5),_$(5))" "$(2)/lib/go-$(3)/pkg/" ; \
+       fi
 
        $(INSTALL_DIR) "$(2)/lib/go-$(3)/pkg/tool/$(4)"
        $(INSTALL_BIN) -p "$(1)/pkg/tool/$(4)"/* "$(2)/lib/go-$(3)/pkg/tool/$(4)/"
index 2cd656dad2434fe71b409cbb21ffef9bf221b294..3c170f308ae9deef66057beb63c20a9ded7b85f7 100644 (file)
@@ -65,6 +65,10 @@ unexport \
   GOPPC64 \
   GOWASM
 
+# Environment variables for use with code coverage:
+unexport \
+  GOCOVERDIR
+
 # Special-purpose environment variables:
 unexport \
   GCCGOTOOLDIR \
@@ -202,12 +206,11 @@ GO_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mips64||mips64el||mipsel||pow
 
 # ASLR/PIE
 
-# From https://go.dev/src/cmd/internal/sys/supported.go
+# From https://go.dev/src/internal/platform/supported.go
 GO_PIE_SUPPORTED_OS_ARCH:= \
   android_386  android_amd64  android_arm  android_arm64 \
   linux_386    linux_amd64    linux_arm    linux_arm64 \
-  \
-  windows_386  windows_amd64  windows_arm \
+  windows_386  windows_amd64  windows_arm  windows_arm64 \
   \
   darwin_amd64 darwin_arm64 \
   ios_amd64    ios_arm64 \
@@ -219,7 +222,7 @@ GO_PIE_SUPPORTED_OS_ARCH:= \
   linux_ppc64le linux_riscv64 linux_s390x
 
 # From https://go.dev/src/cmd/go/internal/work/init.go
-go_pie_install_suffix=$(if $(filter $(1),aix_ppc64 windows_386 windows_amd64 windows_arm),,shared)
+go_pie_install_suffix=$(if $(filter $(1),aix_ppc64 windows_386 windows_amd64 windows_arm windows_arm64),,shared)
 
 ifneq ($(filter $(GO_HOST_OS_ARCH),$(GO_PIE_SUPPORTED_OS_ARCH)),)
   GO_HOST_PIE_SUPPORTED:=1
index 130cb75e238ab549bb4c814f1c71d380064f7bd8..535c6e4aa1e3428287cc1691a6e879c36f5d873f 100644 (file)
@@ -7,8 +7,8 @@
 
 include $(TOPDIR)/rules.mk
 
-GO_VERSION_MAJOR_MINOR:=1.19
-GO_VERSION_PATCH:=7
+GO_VERSION_MAJOR_MINOR:=1.20
+GO_VERSION_PATCH:=2
 
 PKG_NAME:=golang
 PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
@@ -20,7 +20,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \
 
 PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
 PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=775bdf285ceaba940da8a2fe20122500efd7a0b65dbcee85247854a8d7402633
+PKG_HASH:=4d0e2850d197b4ddad3bdb0196300179d095bb3aefd4dfbc3b36702c3728f8ab
 
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
@@ -63,6 +63,8 @@ HOST_GO_VALID_OS_ARCH:= \
   aix_ppc64 \
   js_wasm \
   \
+  freebsd_riscv64 \
+  \
   linux_ppc64 linux_ppc64le \
   linux_mips linux_mipsle linux_mips64 linux_mips64le \
   linux_loong64 linux_riscv64 linux_s390x \
@@ -86,6 +88,12 @@ BOOTSTRAP_GO_VALID_OS_ARCH:= \
                  solaris_amd64 \
   windows_386    windows_amd64
 
+BOOTSTRAP_1_17_SOURCE:=go1.17.13.src.tar.gz
+BOOTSTRAP_1_17_SOURCE_URL:=$(GO_SOURCE_URLS)
+BOOTSTRAP_1_17_HASH:=a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd
+
+BOOTSTRAP_1_17_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.17
+
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 include ../golang-compiler.mk
@@ -94,6 +102,7 @@ include ../golang-package.mk
 PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
 HOST_UNPACK:=$(HOST_TAR) -C "$(HOST_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
 BOOTSTRAP_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_SOURCE)"
+BOOTSTRAP_1_17_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_17_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_17_SOURCE)"
 
 # don't strip ELF executables in test data
 RSTRIP:=:
@@ -181,8 +190,7 @@ ifeq ($(BOOTSTRAP_ROOT_DIR),)
   $(eval $(call Download,golang-bootstrap))
 
   define Bootstrap/Prepare
-       mkdir -p "$(BOOTSTRAP_BUILD_DIR)"
-       $(BOOTSTRAP_UNPACK)
+       mkdir -p "$(BOOTSTRAP_BUILD_DIR)" && $(BOOTSTRAP_UNPACK) ;
   endef
   Hooks/HostPrepare/Post+=Bootstrap/Prepare
 
@@ -190,6 +198,23 @@ ifeq ($(BOOTSTRAP_ROOT_DIR),)
 endif
 
 
+# Bootstrap 1.17
+
+define Download/golang-bootstrap-1.17
+  FILE:=$(BOOTSTRAP_1_17_SOURCE)
+  URL:=$(BOOTSTRAP_1_17_SOURCE_URL)
+  HASH:=$(BOOTSTRAP_1_17_HASH)
+endef
+$(eval $(call Download,golang-bootstrap-1.17))
+
+define Bootstrap-1.17/Prepare
+       mkdir -p "$(BOOTSTRAP_1_17_BUILD_DIR)" && $(BOOTSTRAP_1_17_UNPACK) ;
+endef
+Hooks/HostPrepare/Post+=Bootstrap-1.17/Prepare
+
+$(eval $(call GoCompiler/AddProfile,Bootstrap-1.17,$(BOOTSTRAP_1_17_BUILD_DIR),,bootstrap-1.17,$(GO_HOST_OS_ARCH)))
+
+
 # Host
 
 ifeq ($(GO_HOST_PIE_SUPPORTED),1)
@@ -220,8 +245,13 @@ define Host/Compile
                $(HOST_GO_VARS) \
        )
 
-       $(call GoCompiler/Host/Make, \
+       $(call GoCompiler/Bootstrap-1.17/Make, \
                GOROOT_BOOTSTRAP="$(BOOTSTRAP_ROOT_DIR)" \
+               $(HOST_GO_VARS) \
+       )
+
+       $(call GoCompiler/Host/Make, \
+               GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_17_BUILD_DIR)" \
                $(if $(HOST_GO_ENABLE_PIE),GO_LDFLAGS="-buildmode pie") \
                $(HOST_GO_VARS) \
        )
index 7eb40a4749cd57faa5712610ed6489f2c9a0920d..683480442f2f8dde1a688a1e66ed510c2e685d20 100644 (file)
@@ -13,7 +13,7 @@ Fixes #22040.
 
 --- a/src/cmd/link/internal/ld/lib.go
 +++ b/src/cmd/link/internal/ld/lib.go
-@@ -1502,25 +1502,20 @@ func (ctxt *Link) hostlink() {
+@@ -1535,25 +1535,20 @@ func (ctxt *Link) hostlink() {
                }
  
                if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && buildcfg.GOOS == "linux" {
diff --git a/lang/maturin/Makefile b/lang/maturin/Makefile
new file mode 100644 (file)
index 0000000..e1c7ca5
--- /dev/null
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2023 Luca Barbato
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=maturin
+PKG_VERSION:=0.14.15
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/PyO3/maturin/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=60cbf8ff73a36333c3f5483ca679a52169839db381f06683d8e61a6c00c28cf7
+
+PKG_MAINTAINER:=Luca Barbato <lu_zero@luminem.org>
+PKG_LICENSE:=Apache-2.0 MIT
+PKG_LICENSE_FILES:=license-apache license-mit
+
+HOST_BUILD_DEPENDS:=rust/host
+PKG_HOST_ONLY:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include ../rust/rust-host-build.mk
+
+define Package/maturin
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Rust
+  TITLE:=Build and publish crates as python packages
+  DEPENDS:=$(RUST_ARCH_DEPENDS)
+  URL:=https://maturin.rs
+endef
+
+define Package/maturin/description
+  Build and publish crates with pyo3, rust-cpython, cffi and uniffi
+  bindings as well as rust binaries as python packages.
+endef
+
+$(eval $(call RustBinHostBuild))
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,maturin))
index f1eacd891e5275d6cebb3184afd5fdc982798202..6da85cc1255e68e70a531e8fe52e5d971aa1b71c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v18.14.2
+PKG_VERSION:=v18.15.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION)
-PKG_HASH:=fbc364dd25fee2cacc0f2033db2d86115fc07575310ea0e64408b8170d09c685
+PKG_HASH:=8e44d65018ff973284195c23186469a0ea4082e97ec4200e5f5706d5584daa37
 
 PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>, Adrian Panella <ianchi74@outlook.com>
 PKG_LICENSE:=MIT
index f9e5329db05069488ecc647edd6195c27ede37c6..d9b5b6889f282e0db9b698ccf7409f22c696b08a 100644 (file)
@@ -51,7 +51,7 @@
        'dependencies': [
          'v8_base_without_compiler',
          'v8_compiler_for_mksnapshot',
-@@ -1442,6 +1445,7 @@
+@@ -1450,6 +1453,7 @@
      {
        'target_name': 'torque',
        'type': 'executable',
@@ -59,7 +59,7 @@
        'dependencies': [
          'torque_base',
          # "build/win:default_exe_manifest",
-@@ -1480,6 +1484,7 @@
+@@ -1488,6 +1492,7 @@
      {
        'target_name': 'torque-language-server',
        'type': 'executable',
@@ -67,7 +67,7 @@
        'conditions': [
          ['want_separate_host_toolset', {
            'toolsets': ['host'],
-@@ -1507,6 +1512,8 @@
+@@ -1515,6 +1520,8 @@
      {
        'target_name': 'gen-regexp-special-case',
        'type': 'executable',
index d8c478b8f70922d84c63755dc98a4accb5275eaa..cc400a36edf512172420b16be0f8db9f4f645872 100644 (file)
@@ -62,7 +62,7 @@
          'include_dirs': [
            '<(V8_ROOT)/include',
          ],
-@@ -1729,6 +1736,7 @@
+@@ -1737,6 +1744,7 @@
           }],
        ],
        'direct_dependent_settings': {
@@ -70,7 +70,7 @@
          'include_dirs': [
            '<(V8_ROOT)/include',
          ],
-@@ -1909,15 +1917,19 @@
+@@ -1917,15 +1925,19 @@
          }],
        ],
        'direct_dependent_settings': {
diff --git a/lang/node/patches/992-v8_add_include_dirs.patch b/lang/node/patches/992-v8_add_include_dirs.patch
new file mode 100644 (file)
index 0000000..8588621
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/tools/v8_gypfiles/v8.gyp
++++ b/tools/v8_gypfiles/v8.gyp
+@@ -242,6 +242,7 @@
+       'sources': [
+         '<(V8_ROOT)/src/init/setup-isolate-full.cc',
+       ],
++      'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+     },  # v8_init
+     {
+       'target_name': 'v8_initializers',
+@@ -714,6 +715,7 @@
+         'v8_shared_internal_headers',
+       ],
+       'sources': ['<@(v8_compiler_sources)'],
++      'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+       'conditions': [
+         ['OS=="win"', {
+           'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
+@@ -1431,6 +1433,7 @@
+       'type': 'executable',
+       'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+       'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ],
++      'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+       'dependencies': [
+         'v8_base_without_compiler',
+         'v8_compiler_for_mksnapshot',
diff --git a/lang/node/patches/992-v8_compiler_add_include_dirs.patch b/lang/node/patches/992-v8_compiler_add_include_dirs.patch
deleted file mode 100644 (file)
index c80cea0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/tools/v8_gypfiles/v8.gyp
-+++ b/tools/v8_gypfiles/v8.gyp
-@@ -714,6 +714,7 @@
-         'v8_shared_internal_headers',
-       ],
-       'sources': ['<@(v8_compiler_sources)'],
-+      'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
-       'conditions': [
-         ['OS=="win"', {
-           'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
index f79b9627ec0532ece99cd415f589337d3bbc6470..04dade2f5d42d9af7170b0d3bf4c03f2bf7a051e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-cgi
-PKG_VERSION:=4.54
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=4.56
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://www.cpan.org/authors/id/L/LE/LEEJO
 PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_HASH:=9608a044ae2e87cefae8e69b113e3828552ddaba0d596a02f9954c6ac17fa294
+PKG_HASH:=2d36d930b89ecdfbcc7d6d4740821bd466a0218abf1bd413568640b2f43799b7
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
index a9aeb25ce9b0815561498609482402597ab01dbe..cdaa17152f62c547dc7c89335179fac566710b86 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-text-csv_xs
-PKG_VERSION:=1.47
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=1.50
+PKG_RELEASE:=1
 
 PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/H/HM/HMBRAND
-PKG_HASH:=4bbaffbdfb68505ef3326dc748e63ebe0db31157b78ca8dfcb8c3cd1d1313262
+PKG_HASH:=85b5e1bed7e11dc0413d4e920cee25d980de47376c0048029041cf461eac96b1
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Text-CSV_XS-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
index 62312343f84fce77ae1e74df5d981eca848d2008..9e49ce333abfda751ea0fe9802f9a004a735ef8d 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bcrypt
 PKG_VERSION:=3.1.7
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42
@@ -15,8 +15,7 @@ PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_DEPENDS:=libffi/host
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.1
+PKG_BUILD_DEPENDS:=libffi/host python-cffi/host  # cffi>=1.1
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 0637d1b0b67065d93e4ac4011fd4c90c929f468e..a8629deef13639dbc594e3c38e77292544b2fdce 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2022 Julien Malik <julien.malik@paraiso.me>
+# Copyright (C) 2023 Julien Malik <julien.malik@paraiso.me>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=borgbackup
-PKG_VERSION:=1.2.3
-PKG_RELEASE:=1
+PKG_VERSION:=1.2.4
+PKG_RELEASE:=2
 
 PYPI_NAME:=borgbackup
-PKG_HASH:=e32418f8633c96fa9681352a56eb63b98e294203472c114a5242709d36966785
+PKG_HASH:=a4bd54e9469e81b7a30a6711423115abc818d9cd844ecb1ca0e6104bc5374da8
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
@@ -22,6 +22,7 @@ include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
 
+# see #20462 and #12942: email and urllib shall come with python3-light
 define Package/borgbackup
   SECTION:=lang
   CATEGORY:=Languages
@@ -30,8 +31,17 @@ define Package/borgbackup
   URL:=https://github.com/borgbackup/borg
   DEPENDS:= \
       +python3-light \
+      +python3-codecs \
+      +python3-email \
+      +python3-logging \
+      +python3-lzma \
       +python3-msgpack \
+      +python3-packaging \
       +python3-pyfuse3 \
+      +python3-readline \
+      +python3-unittest \
+      +python3-urllib \
+      +python3-uuid \
       +libacl \
       +libopenssl \
       +liblz4 \
@@ -47,7 +57,7 @@ define Package/borgbackup/description
   The data deduplication technique used makes Borg suitable for daily backups since only changes are stored. The authenticated encryption technique makes it suitable for backups to not fully trusted targets.
 endef
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython
+PKG_BUILD_DEPENDS:=python-cython/host
 
 # borg setup.py shall find these via pkg-config, but depends on python pkgconfig PyPi module
 # which quickly becomes a nightmare to build, since it build-depends on poetry which is not
diff --git a/lang/python/host-pip-requirements/Cython.txt b/lang/python/host-pip-requirements/Cython.txt
deleted file mode 100644 (file)
index 5de50dd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Cython==0.29.32 --hash=sha256:8733cf4758b79304f2a4e39ebfac5e92341bce47bcceb26c1254398b2f8c1af7
diff --git a/lang/python/host-pip-requirements/cffi.txt b/lang/python/host-pip-requirements/cffi.txt
deleted file mode 100644 (file)
index 94ef13b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-cffi==1.15.0 --hash=sha256:920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954
-pycparser==2.21 --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
diff --git a/lang/python/host-pip-requirements/ply.txt b/lang/python/host-pip-requirements/ply.txt
deleted file mode 100644 (file)
index 807e19e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ply==3.11 --hash=sha256:00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3
diff --git a/lang/python/host-pip-requirements/setuptools-scm.txt b/lang/python/host-pip-requirements/setuptools-scm.txt
deleted file mode 100644 (file)
index 83b57e1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-setuptools-scm==6.0.1 --hash=sha256:d1925a69cb07e9b29416a275b9fadb009a23c148ace905b2fb220649a6c18e92
diff --git a/lang/python/host-pip-requirements/toml.txt b/lang/python/host-pip-requirements/toml.txt
deleted file mode 100644 (file)
index 108bf10..0000000
+++ /dev/null
@@ -1 +0,0 @@
-toml==0.10.2 --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f
index 3124ca8f14c65d1f11dbc6e85dc5c52f9653607e..35aab8d7967244cd4b2d0a9c852d6de42bf702e6 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=numpy
 PKG_VERSION:=1.23.3
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=2
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd
@@ -21,7 +21,7 @@ PKG_CPE_ID:=cpe:/a:numpy:numpy
 PKG_CONFIG_DEPENDS:= \
         CONFIG_NUMPY_OPENBLAS_SUPPORT
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython
+PKG_BUILD_DEPENDS:=python-cython/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 157575ccaaa6a2e5693fc2f3468b18d7aa2997b9..bcf793697a20ee9ab5deabb485f943fdef89383b 100644 (file)
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pillow
-PKG_VERSION:=9.4.0
+PKG_VERSION:=9.5.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=Pillow
-PKG_HASH:=a1c2d7780448eb93fbcc3789bf3916aa5720d942e37945f4056680317f1cd23e
+PKG_HASH:=bf548479d336726d7a0eceb6e767e179fbde37833ae42794602631a070d630f1
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=HPND
diff --git a/lang/python/python-aio-mqtt-mod/Makefile b/lang/python/python-aio-mqtt-mod/Makefile
new file mode 100644 (file)
index 0000000..b5afab5
--- /dev/null
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2023
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-aio-mqtt-mod
+PKG_VERSION:=0.3.3
+PKG_RELEASE:=1
+
+PYPI_NAME:=aio-mqtt-mod
+PKG_HASH:=2271f8a2fd6c6aea914896dc3d4dd6e384cd0da405b06dcfa566bd01f968bf9d
+
+PKG_MAINTAINER:=Quintin Hill <stuff@quintin.me.uk>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-aio-mqtt-mod
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Asynchronous MQTT client
+  URL:=https://github.com/devbis/aio-mqtt
+  DEPENDS:=+python3-light +python3-asyncio +python3-openssl
+endef
+
+define Package/python3-aio-mqtt-mod/description
+  Asynchronous MQTT client for 3.1.1 protocol version (mod).
+endef
+
+$(eval $(call Py3Package,python3-aio-mqtt-mod))
+$(eval $(call BuildPackage,python3-aio-mqtt-mod))
+$(eval $(call BuildPackage,python3-aio-mqtt-mod-src))
index 2e905a8932190d5fc5cb9dfdba0f903110227d1c..b33781831217885c9d267e5be573d2713b7b4a1e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-apipkg
 PKG_VERSION:=1.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PYPI_NAME:=apipkg
 PKG_HASH:=37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index dab2d5e91e50ec2c108c11d1757d1e9484cd4c0c..e366d429bf2da0f346f6e2bc410e2560bba8522f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-augeas
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=python-augeas
 PKG_HASH:=5194a49e86b40ffc57055f73d833f87e39dce6fce934683e7d0d5bbb8eff3b8c
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=COPYING
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.0.0
+PKG_BUILD_DEPENDS:=python-cffi/host  # cffi>=1.0.0
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index b6735b82fa7289eecfd1960024b8aff7f44bfa14..f95eb07e98c1d9ef576bac7183d1a95956b02f7e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-bidict
 PKG_VERSION:=0.21.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=bidict
 PKG_HASH:=4fa46f7ff96dc244abfc437383d987404ae861df797e2fd5b190e233c302be09
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-ble2mqtt/Makefile b/lang/python/python-ble2mqtt/Makefile
new file mode 100644 (file)
index 0000000..9fff9be
--- /dev/null
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2023
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-ble2mqtt
+PKG_VERSION:=0.1.5
+PKG_RELEASE:=1
+
+PYPI_NAME:=ble2mqtt
+PKG_HASH:=0015cae0c36badb48cbd4a1c8b1a8029e45ab0891a95363fe00624c2629b4510
+
+PKG_MAINTAINER:=Quintin Hill <stuff@quintin.me.uk>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-ble2mqtt
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Bluetooth to MQTT bridge
+  URL:=https://github.com/devbis/ble2mqtt/
+  DEPENDS:=+python3-light +python3-aio-mqtt-mod +python3-asyncio +python3-bleak +python3-logging
+endef
+
+define Package/python3-ble2mqtt/description
+  Bluetooth to MQTT bridge, add your bluetooth-capable (including controllable)
+  devices to your smart home
+endef
+
+$(eval $(call Py3Package,python3-ble2mqtt))
+$(eval $(call BuildPackage,python3-ble2mqtt))
+$(eval $(call BuildPackage,python3-ble2mqtt-src))
diff --git a/lang/python/python-bleak/Makefile b/lang/python/python-bleak/Makefile
new file mode 100644 (file)
index 0000000..b97d650
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2023
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-bleak
+PKG_VERSION:=0.20.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=bleak
+PKG_HASH:=7f6fe69454ad5d4c0ab05ae4a9aa1aabd6926d7128eab2fac4ef8a58a72999ee
+
+PKG_MAINTAINER:=Quintin Hill <stuff@quintin.me.uk>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-bleak
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Bluetooth Low Energy platform Agnostic Klient
+  URL:=https://github.com/hbldh/bleak
+  DEPENDS:=+python3-light +python3-async-timeout +python3-asyncio \
+       +python3-dbus-fast +python3-ctypes +python3-logging
+endef
+
+define Package/python3-bleak/description
+  Bleak is an acronym for Bluetooth Low Energy platform Agnostic Klient.
+  Bleak is a GATT client software, capable of connecting to BLE devices acting
+  as GATT servers.  It is designed to provide a asynchronous, cross-platform
+  Python API to connect and communicate with e.g. sensors.
+endef
+
+$(eval $(call Py3Package,python3-bleak))
+$(eval $(call BuildPackage,python3-bleak))
+$(eval $(call BuildPackage,python3-bleak-src))
diff --git a/lang/python/python-build/Makefile b/lang/python/python-build/Makefile
new file mode 100644 (file)
index 0000000..e600237
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-build
+PKG_VERSION:=0.10.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=build
+PKG_HASH:=d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-installer/host \
+       python-flit-core/host \
+       python-packaging/host \
+       python-pyproject-hooks/host \
+       python-tomli/host
+
+PYTHON3_HOST_BUILD_VARS:=PYTHONPATH=src
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-build
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A simple, correct Python build frontend
+  URL:=https://github.com/pypa/build
+  DEPENDS:=+python3-light +python3-logging
+  BUILDONLY:=1
+endef
+
+define Package/python3-build/description
+A simple, correct PEP 517 build frontend.
+
+build will invoke the PEP 517 hooks to build a distribution package. It
+is a simple build tool and does not perform any dependency management.
+endef
+
+$(eval $(call Py3Package,python3-build))
+$(eval $(call BuildPackage,python3-build))
+$(eval $(call BuildPackage,python3-build-src))
+$(eval $(call HostBuild))
index 41549e922334a6991236ec43ddf162d02b44383e..b14ef8099e94b79911ce05fbb1d79a1cc3cc4e1c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015-2018 OpenWrt.org
+# Copyright (C) 2015-2016, 2018-2021, 2023 Jeffery To
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,19 +8,28 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cffi
-PKG_VERSION:=1.15.0
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=1.15.1
+PKG_RELEASE:=1
 
 PYPI_NAME:=cffi
-PKG_HASH:=920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954
+PKG_HASH:=d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-wheel/host \
+       python-pycparser/host
+
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include ../python3-package.mk
+include ../python3-host-build.mk
 
 define Package/python3-cffi
   SECTION:=lang
@@ -41,3 +50,4 @@ endef
 $(eval $(call Py3Package,python3-cffi))
 $(eval $(call BuildPackage,python3-cffi))
 $(eval $(call BuildPackage,python3-cffi-src))
+$(eval $(call HostBuild))
index f9805d1b381d23c9e189677a1ab9d38f720b8109..eca9394584cef767bf8b15d261768896aa7234ba 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015-2018 OpenWrt.org
+# Copyright (C) 2015-2016, 2018-2023 Jeffery To
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptography
 PKG_VERSION:=3.4.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PYPI_NAME:=cryptography
 PKG_HASH:=94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c
@@ -18,9 +18,7 @@ PKG_LICENSE:=Apache-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
-PKG_BUILD_DEPENDS:=libffi/host
-
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.12
+PKG_BUILD_DEPENDS:=libffi/host python-cffi/host  # cffi>=1.12
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-cython/Makefile b/lang/python/python-cython/Makefile
new file mode 100644 (file)
index 0000000..99ad7d9
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cython
+PKG_VERSION:=0.29.33
+PKG_RELEASE:=1
+
+PYPI_NAME:=Cython
+PKG_HASH:=5040764c4a4d2ce964a395da24f0d1ae58144995dab92c6b96f44c3f4d72286a
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-wheel/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-cython
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Cython compiler for writing C extensions
+  URL:=https://cython.org/
+  DEPENDS:=+python3
+  BUILDONLY:=1
+endef
+
+define Package/python3-cython/description
+Cython is a language that makes writing C extensions for Python as easy
+as Python itself. Cython is based on Pyrex, but supports more cutting
+edge functionality and optimizations.
+
+The Cython language is very close to the Python language, but Cython
+additionally supports calling C functions and declaring C types on
+variables and class attributes. This allows the compiler to generate
+very efficient C code from Cython code.
+
+This makes Cython the ideal language for wrapping external C libraries,
+and for fast C modules that speed up the execution of Python code.
+endef
+
+$(eval $(call Py3Package,python3-cython))
+$(eval $(call BuildPackage,python3-cython))
+$(eval $(call BuildPackage,python3-cython-src))
+$(eval $(call HostBuild))
index 394a307b6fd29708b2ea5b3722e2e34db27a5142..57e8a95aa84344c2957cb3ef2246a5c40be76612 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-dateutil
 PKG_VERSION:=2.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-2-Clause
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-dbus-fast/Makefile b/lang/python/python-dbus-fast/Makefile
new file mode 100644 (file)
index 0000000..ad6b0b4
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2023
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-dbus-fast
+PKG_VERSION:=1.84.2
+PKG_RELEASE:=1
+
+PYPI_NAME:=dbus-fast
+PYPI_SOURCE_NAME:=dbus_fast
+PKG_HASH:=62b00b85c5835bff1d7ab5b12d494e588d92612bedbd7ca86176861729b8e4bc
+
+PKG_MAINTAINER:=Quintin Hill <stuff@quintin.me.uk>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-dbus-fast
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A faster version of dbus-next
+  URL:=https://github.com/Bluetooth-Devices/dbus-fast
+  DEPENDS:=+python3-light +python3-async-timeout +python3-asyncio \
+       +python3-logging +python3-urllib +python3-xml
+endef
+
+define Package/python3-dbus-fast/description
+  dbus-fast is a Python library for DBus that aims to be a performant fully
+  featured high level library primarily geared towards integration of
+  applications into Linux desktop and mobile environments.
+endef
+
+$(eval $(call Py3Package,python3-dbus-fast))
+$(eval $(call BuildPackage,python3-dbus-fast))
+$(eval $(call BuildPackage,python3-dbus-fast-src))
diff --git a/lang/python/python-editables/Makefile b/lang/python/python-editables/Makefile
new file mode 100644 (file)
index 0000000..dc0547e
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-editables
+PKG_VERSION:=0.3
+PKG_RELEASE:=1
+
+PYPI_NAME:=editables
+PKG_HASH:=167524e377358ed1f1374e61c268f0d7a4bf7dbd046c656f7b410cde16161b1a
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-wheel/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-editables
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Editable installations
+  URL:=https://github.com/pfmoore/editables
+  DEPENDS:=+python3-light
+  BUILDONLY:=1
+endef
+
+define Package/python3-editables/description
+A Python library for creating "editable wheels"
+
+This library supports the building of wheels which, when installed, will
+expose packages in a local directory on sys.path in "editable mode". In
+other words, changes to the package source will be reflected in the
+package visible to Python, without needing a reinstall.
+endef
+
+$(eval $(call Py3Package,python3-editables))
+$(eval $(call BuildPackage,python3-editables))
+$(eval $(call BuildPackage,python3-editables-src))
+$(eval $(call HostBuild))
index 1b45788d4746fc185e33a5aea3b1e7e1b17a44cc..b82b4fd9f6d970834d0deda6a286cd2fde4f346e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-execnet
 PKG_VERSION:=1.8.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=execnet
 PKG_HASH:=b73c5565e517f24b62dea8a5ceac178c661c4309d3aa0c3e420856c072c411b4
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-flit-core/Makefile b/lang/python/python-flit-core/Makefile
new file mode 100644 (file)
index 0000000..42274d6
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-flit-core
+PKG_VERSION:=3.8.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=flit-core
+PYPI_SOURCE_NAME:=flit_core
+PKG_HASH:=b305b30c99526df5e63d6022dd2310a0a941a187bd3884f4c8ef0418df6c39f3
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-flit-core
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Distribution-building parts of Flit
+  URL:=https://github.com/pypa/flit
+  DEPENDS:=+python3-light +python3-email +python3-logging
+  BUILDONLY:=1
+endef
+
+define Package/python3-flit-core/description
+This provides a PEP 517 build backend for packages using Flit. The only
+public interface is the API specified by PEP 517, at flit_core.buildapi.
+endef
+
+define Py3Host/Install/Installer
+       $(call HostPython3/Run, \
+               $(HOST_BUILD_DIR), \
+               bootstrap_install.py \
+                       --installdir "$(1)/lib/python$(PYTHON3_VERSION)/site-packages" \
+                       "$(PYTHON3_HOST_BUILD_DIR)"/openwrt-build/$(PYPI_SOURCE_NAME)-$(PKG_VERSION)-*.whl \
+       )
+endef
+
+Host/Compile=$(Py3Host/Compile/Bootstrap)
+
+$(eval $(call Py3Package,python3-flit-core))
+$(eval $(call BuildPackage,python3-flit-core))
+$(eval $(call BuildPackage,python3-flit-core-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-flit-scm/Makefile b/lang/python/python-flit-scm/Makefile
new file mode 100644 (file)
index 0000000..57660f7
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-flit-scm
+PKG_VERSION:=1.7.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=flit-scm
+PYPI_SOURCE_NAME:=flit_scm
+PKG_HASH:=961bd6fb24f31bba75333c234145fff88e6de0a90fc0f7e5e7c79deca69f6bb2
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-flit-core/host \
+       python-setuptools-scm/host \
+       python-tomli/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-flit-scm
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A PEP 518 build backend that uses setuptools_scm and flit
+  URL:=https://gitlab.com/WillDaSilva/flit_scm
+  DEPENDS:=+python3-light +python3-flit-core +python3-setuptools-scm +python3-tomli
+  BUILDONLY:=1
+endef
+
+define Package/python3-flit-scm/description
+A PEP 518 build backend that uses setuptools_scm to generate a version
+file from your version control system, then flit_core to build the
+package.
+endef
+
+$(eval $(call Py3Package,python3-flit-scm))
+$(eval $(call BuildPackage,python3-flit-scm))
+$(eval $(call BuildPackage,python3-flit-scm-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-hatch-fancy-pypi-readme/Makefile b/lang/python/python-hatch-fancy-pypi-readme/Makefile
new file mode 100644 (file)
index 0000000..4a2ab87
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-hatch-fancy-pypi-readme
+PKG_VERSION:=22.8.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=hatch-fancy-pypi-readme
+PYPI_SOURCE_NAME:=hatch_fancy_pypi_readme
+PKG_HASH:=da91282ca09601c18aded8e378daf8b578c70214866f0971156ee9bb9ce6c26a
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-hatchling/host \
+       python-tomli/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-hatch-fancy-pypi-readme
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Fancy PyPI READMEs with Hatch
+  URL:=https://github.com/hynek/hatch-fancy-pypi-readme
+  DEPENDS:=+python3-light +python3-hatchling +python3-tomli
+  BUILDONLY:=1
+endef
+
+define Package/python3-hatch-fancy-pypi-readme/description
+hatch-fancy-pypi-readme is a Hatch metadata plugin for everyone who
+cares about the first impression of their project’s PyPI landing page.
+It allows you to define your PyPI project description in terms of
+concatenated fragments that are based on static strings, files, and most
+importantly: parts of files defined using cut-off points or regular
+expressions.
+
+Once you’ve assembled your readme, you can additionally run regular
+expression-based substitutions over it. For instance to make relative
+links absolute or to linkify users and issue numbers in your changelog.
+endef
+
+$(eval $(call Py3Package,python3-hatch-fancy-pypi-readme))
+$(eval $(call BuildPackage,python3-hatch-fancy-pypi-readme))
+$(eval $(call BuildPackage,python3-hatch-fancy-pypi-readme-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-hatch-vcs/Makefile b/lang/python/python-hatch-vcs/Makefile
new file mode 100644 (file)
index 0000000..39f8909
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-hatch-vcs
+PKG_VERSION:=0.3.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=hatch-vcs
+PYPI_SOURCE_NAME:=hatch_vcs
+PKG_HASH:=cec5107cfce482c67f8bc96f18bbc320c9aa0d068180e14ad317bbee5a153fee
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-hatchling/host \
+       python-setuptools-scm/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-hatch-vcs
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Hatch plugin for versioning with your preferred VCS
+  URL:=https://github.com/ofek/hatch-vcs
+  DEPENDS:=+python3-light +python3-hatchling +python3-setuptools-scm
+  BUILDONLY:=1
+endef
+
+define Package/python3-hatch-vcs/description
+This provides a plugin for Hatch that uses your preferred version
+control system (like Git) to determine project versions.
+endef
+
+$(eval $(call Py3Package,python3-hatch-vcs))
+$(eval $(call BuildPackage,python3-hatch-vcs))
+$(eval $(call BuildPackage,python3-hatch-vcs-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-hatchling/Makefile b/lang/python/python-hatchling/Makefile
new file mode 100644 (file)
index 0000000..6ba6c63
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-hatchling
+PKG_VERSION:=1.13.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=hatchling
+PKG_HASH:=f8d275a2cc720735286b7c2e2bc35da05761e6d3695c2fa416550395f10c53c7
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-editables/host \
+       python-packaging/host \
+       python-pathspec/host \
+       python-pluggy/host \
+       python-tomli/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-hatchling
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Modern, extensible Python build backend
+  URL:=https://hatch.pypa.io/latest/
+  DEPENDS:= \
+      +python3-light \
+      +python3-email \
+      +python3-editables \
+      +python3-packaging \
+      +python3-pathspec \
+      +python3-pluggy \
+      +python3-tomli
+  BUILDONLY:=1
+endef
+
+define Package/python3-hatchling/description
+This is the extensible, standards compliant build backend used by Hatch.
+endef
+
+$(eval $(call Py3Package,python3-hatchling))
+$(eval $(call BuildPackage,python3-hatchling))
+$(eval $(call BuildPackage,python3-hatchling-src))
+$(eval $(call HostBuild))
index 5d5da76172f9e23406a846ae8f4763b0dba93c6c..98cd0cd7a0d4c2bd97d27af6372ace111946bb73 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-iniconfig
 PKG_VERSION:=1.1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=iniconfig
 PKG_HASH:=bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-installer/Makefile b/lang/python/python-installer/Makefile
new file mode 100644 (file)
index 0000000..898a74a
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-installer
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=installer
+PKG_HASH:=a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-flit-core/host
+
+PYTHON3_HOST_INSTALL_VARS:=PYTHONPATH=src
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-installer
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A library for installing Python wheels
+  URL:=https://github.com/pypa/installer
+  DEPENDS:=+python3-light +python3-email
+  BUILDONLY:=1
+endef
+
+define Package/python3-installer/description
+This is a low-level library for installing a Python package from a wheel
+distribution. It provides basic functionality and abstractions for
+handling wheels and installing packages from wheels.
+endef
+
+Host/Compile=$(Py3Host/Compile/Bootstrap)
+
+$(eval $(call Py3Package,python3-installer))
+$(eval $(call BuildPackage,python3-installer))
+$(eval $(call BuildPackage,python3-installer-src))
+$(eval $(call HostBuild))
index 4167ef29c041a3bd6cd29259fbd81348a9996779..67121c7a5d6bc569ae3e40234b7b6a23cbf40f51 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-jsonschema
 PKG_VERSION:=4.17.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=jsonschema
 PKG_HASH:=0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d
@@ -11,7 +11,7 @@ PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 6a0eaad75fbb4bd381fd47a50373066cd7c29077..c727c20aab14985cc7512e21f8931b4f969a9b0e 100644 (file)
@@ -7,19 +7,24 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-packaging
-PKG_VERSION:=20.9
+PKG_VERSION:=23.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=packaging
-PKG_HASH:=5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5
+PKG_HASH:=b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 PKG_LICENSE:=Apache-2.0 BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
 
+PKG_BUILD_DEPENDS:=python-flit-core/host
+HOST_BUILD_DEPENDS:=python3/host python-flit-core/host python-installer/host
+
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include ../python3-package.mk
+include ../python3-host-build.mk
 
 define Package/python3-packaging
   SECTION:=lang
@@ -27,7 +32,7 @@ define Package/python3-packaging
   SUBMENU:=Python
   TITLE:=Core utilities for Python packages
   URL:=https://github.com/pypa/packaging
-  DEPENDS:=+python3-light +python3-pyparsing +python3-six +python3-logging +python3-distutils +python3-urllib
+  DEPENDS:=+python3-light +python3-logging +python3-urllib @BROKEN
 endef
 
 define Package/python3-packaging/description
@@ -35,6 +40,9 @@ define Package/python3-packaging/description
   markers, requirements, tags, utilities.
 endef
 
+Host/Compile=$(Py3Host/Compile/Bootstrap)
+
 $(eval $(call Py3Package,python3-packaging))
 $(eval $(call BuildPackage,python3-packaging))
 $(eval $(call BuildPackage,python3-packaging-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-pathspec/Makefile b/lang/python/python-pathspec/Makefile
new file mode 100644 (file)
index 0000000..86bde00
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pathspec
+PKG_VERSION:=0.11.1
+PKG_RELEASE:=1
+
+PYPI_NAME:=pathspec
+PKG_HASH:=2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687
+
+PKG_LICENSE:=MPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-flit-core/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-pathspec
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=gitignore style pattern matching of file paths
+  URL:=https://github.com/cpburnz/python-pathspec
+  DEPENDS:=+python3-light
+  BUILDONLY:=1
+endef
+
+define Package/python3-pathspec/description
+pathspec is a utility library for pattern matching of file paths. So far
+this only includes Git's wildmatch pattern matching which itself is
+derived from Rsync's wildmatch. Git uses wildmatch for its gitignore
+files.
+endef
+
+$(eval $(call Py3Package,python3-pathspec))
+$(eval $(call BuildPackage,python3-pathspec))
+$(eval $(call BuildPackage,python3-pathspec-src))
+$(eval $(call HostBuild))
index f9d3c39d611298e8413515e44b4b78294e4a43fc..d035c9abecb8966fbf1f7bd9631fadc65ecbea3e 100644 (file)
@@ -8,21 +8,29 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pluggy
-PKG_VERSION:=0.13.1
-PKG_RELEASE:=4
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
 
 PYPI_NAME:=pluggy
-PKG_HASH:=15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0
+PKG_HASH:=4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159
 
-PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-wheel/host \
+       python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include ../python3-package.mk
+include ../python3-host-build.mk
 
 define Package/python3-pluggy
   SUBMENU:=Python
@@ -40,3 +48,4 @@ endef
 $(eval $(call Py3Package,python3-pluggy))
 $(eval $(call BuildPackage,python3-pluggy))
 $(eval $(call BuildPackage,python3-pluggy-src))
+$(eval $(call HostBuild))
index 6a0b283eb8076a3053d2370d96170264d20c3ee3..002bfa96ef85d9fa931d8fcc96f85089a39acae6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015-2018 OpenWrt.org
+# Copyright (C) 2015-2016, 2018, 2023 Jeffery To
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -18,9 +18,13 @@ PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=README.md
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-wheel/host
+
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include ../python3-package.mk
+include ../python3-host-build.mk
 
 define Package/python3-ply
   SECTION:=lang
@@ -39,3 +43,4 @@ endef
 $(eval $(call Py3Package,python3-ply))
 $(eval $(call BuildPackage,python3-ply))
 $(eval $(call BuildPackage,python3-ply-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-poetry-core/Makefile b/lang/python/python-poetry-core/Makefile
new file mode 100644 (file)
index 0000000..6cdb6d2
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-poetry-core
+PKG_VERSION:=1.5.2
+PKG_RELEASE:=1
+
+PYPI_NAME:=poetry-core
+PYPI_SOURCE_NAME:=poetry_core
+PKG_HASH:=c6556c3b1ec5b8668e6ef5a4494726bc41d31907339425e194e78a6178436c14
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-poetry-core
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Poetry PEP 517 Build Backend
+  URL:=https://github.com/python-poetry/poetry-core
+  DEPENDS:=+python3
+  BUILDONLY:=1
+endef
+
+define Package/python3-poetry-core/description
+A PEP 517 build backend implementation developed for Poetry. This
+project is intended to be a light weight, fully compliant,
+self-contained package allowing PEP 517 compatible build frontends to
+build Poetry managed projects.
+endef
+
+$(eval $(call Py3Package,python3-poetry-core))
+$(eval $(call BuildPackage,python3-poetry-core))
+$(eval $(call BuildPackage,python3-poetry-core-src))
+$(eval $(call HostBuild))
index 59b4f0fd145278ec3e327c496240a92502e6d1a3..07baf6693fe585318c45c39bf2f7587f99fcaab4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-psutil
 PKG_VERSION:=5.9.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=psutil
 PKG_HASH:=869842dbd66bb80c3217158e629d6fceaecc3a3166d3d1faee515b05dd26ca25
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=BSD 3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index ca20dbba6c63d789eea15373fdb5b62792262061..c909e10e83e1378bd77e0007bf19560ea3f4fe61 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-py
 PKG_VERSION:=1.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=py
 PKG_HASH:=21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 2eed1c2b10144be38a7ccbcd5f516f138bf7a84d..c3516f73f4ce7f19dac24d30486400b9be66892a 100644 (file)
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pycares
 PKG_VERSION:=4.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pycares
 PKG_HASH:=c542696f6dac978e9d99192384745a65f80a7d9450501151e4a7563e06010d45
@@ -12,9 +12,7 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Fabian Lipken <dynasticorpheus@gmail.com>
 
-PKG_BUILD_DEPENDS:=libffi/host
-
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.5.0
+PKG_BUILD_DEPENDS:=libffi/host python-cffi/host  # cffi>=1.5.0
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index c0da351577e7e36054afa3983f452ac0caab99ff..5085372dc42be757b7bee13790c498dd40740255 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pycparser
 PKG_VERSION:=2.21
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pycparser
 PKG_HASH:=e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
@@ -18,11 +18,19 @@ PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=ply  # ply==3.10
+PKG_BUILD_DEPENDS:=python-ply/host  # ply==3.10
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-wheel/host \
+       python-ply/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include ../python3-package.mk
+include ../python3-host-build.mk
 
 define Package/python3-pycparser
   SECTION:=lang
@@ -44,3 +52,4 @@ endef
 $(eval $(call Py3Package,python3-pycparser))
 $(eval $(call BuildPackage,python3-pycparser))
 $(eval $(call BuildPackage,python3-pycparser-src))
+$(eval $(call HostBuild))
index 6635f4935ec3465a976c8b87122520116cffaf4f..d3469cc43dea52ff6f7b9722bc50c8bd8a08f5a0 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pynacl
 PKG_VERSION:=1.5.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=PyNaCl
 PKG_HASH:=8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba
@@ -11,9 +11,7 @@ PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_DEPENDS:=libffi/host
-
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.4.1
+PKG_BUILD_DEPENDS:=libffi/host python-cffi/host  # cffi>=1.4.1
 
 PYTHON3_PKG_SETUP_VARS:= SODIUM_INSTALL=system
 
diff --git a/lang/python/python-pyproject-hooks/Makefile b/lang/python/python-pyproject-hooks/Makefile
new file mode 100644 (file)
index 0000000..50b3780
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pyproject-hooks
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=pyproject_hooks
+PKG_HASH:=f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-flit-core/host python-installer/host python-tomli/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-pyproject-hooks
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Wrappers to call pyproject.toml-based build backend hooks
+  URL:=https://github.com/pypa/pyproject-hooks
+  DEPENDS:=+python3-light
+  BUILDONLY:=1
+endef
+
+define Package/python3-pyproject-hooks/description
+This is a low-level library for calling build-backends in
+pyproject.toml-based project. It provides the basic functionality to
+help write tooling that generates distribution files from Python
+projects.
+endef
+
+Host/Compile=$(Py3Host/Compile/Bootstrap)
+
+$(eval $(call Py3Package,python3-pyproject-hooks))
+$(eval $(call BuildPackage,python3-pyproject-hooks))
+$(eval $(call BuildPackage,python3-pyproject-hooks-src))
+$(eval $(call HostBuild))
index dba2daa8fb977ab1a94a9fe63adc933b4da311ba..55edae8f59e7165a7b2608c71da2cb7e27ea151c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest-forked
 PKG_VERSION:=1.3.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PYPI_NAME:=pytest-forked
 PKG_HASH:=6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index c73229bee5ba6dc5d06b65b0094b6d036f7b66ed..2aaf5551a46ee6d4cc99204e2f0b93e3120215cc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest-xdist
 PKG_VERSION:=2.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest-xdist
 PKG_HASH:=718887296892f92683f6a51f25a3ae584993b06f7076ce1e1fd482e59a8220a2
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 7a91b4f637cc76684d4e5513902a963a4889997b..bbd8f8819b63750b9ec7416cbb01354f8e42af22 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest
 PKG_VERSION:=6.2.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest
 PKG_HASH:=671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
@@ -38,7 +38,8 @@ define Package/python3-pytest
        +python3-pluggy \
        +python3-packaging \
        +python3-toml \
-       +python3-iniconfig
+       +python3-iniconfig \
+       @BROKEN
 endef
 
 define Package/python3-pytest/description
index a39428a8ef8699adfeea256c04f45aa8aeb6ced9..62c1b3a2cda80e988042afec7a597cfe827ff27e 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytz
-PKG_VERSION:=2022.7.1
+PKG_VERSION:=2023.3
 PKG_RELEASE:=1
 
 PYPI_NAME:=pytz
-PKG_HASH:=01a0681c4b9684a28304615eba55d1ab31ae00bf68ec157ec3708a8182dbbcd0
+PKG_HASH:=1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=MIT
diff --git a/lang/python/python-setuptools-scm/Makefile b/lang/python/python-setuptools-scm/Makefile
new file mode 100644 (file)
index 0000000..c9a0ec7
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-setuptools-scm
+PKG_VERSION:=7.1.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=setuptools-scm
+PYPI_SOURCE_NAME:=setuptools_scm
+PKG_HASH:=6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:= \
+       python3/host \
+       python-build/host \
+       python-installer/host \
+       python-wheel/host \
+       python-packaging/host \
+       python-tomli/host \
+       python-typing-extensions/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-setuptools-scm
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=the blessed package to manage your versions by scm tags
+  URL:=https://github.com/pypa/setuptools_scm
+  DEPENDS:= \
+      +python3-light \
+      +python3-logging \
+      +python3-packaging \
+      +python3-setuptools \
+      +python3-tomli \
+      +python3-typing-extensions
+  BUILDONLY:=1
+endef
+
+define Package/python3-setuptools-scm/description
+setuptools_scm extracts Python package versions from git or hg metadata
+instead of declaring them as the version argument or in a SCM managed
+file.
+
+Additionally setuptools_scm provides setuptools with a list of files
+that are managed by the SCM (i.e. it automatically adds all of the
+SCM-managed files to the sdist). Unwanted files must be excluded by
+discarding them via MANIFEST.in.
+endef
+
+$(eval $(call Py3Package,python3-setuptools-scm))
+$(eval $(call BuildPackage,python3-setuptools-scm))
+$(eval $(call BuildPackage,python3-setuptools-scm-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-tomli/Makefile b/lang/python/python-tomli/Makefile
new file mode 100644 (file)
index 0000000..db615e3
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-tomli
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=1
+
+PYPI_NAME:=tomli
+PKG_HASH:=de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-flit-core/host python-installer/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-tomli
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A lil' TOML parser
+  URL:=https://github.com/hukkin/tomli
+  DEPENDS:=+python3-light
+  BUILDONLY:=1
+endef
+
+define Package/python3-tomli/description
+Tomli is a Python library for parsing TOML. Tomli is fully compatible
+with TOML v1.0.0.
+endef
+
+Host/Compile=$(Py3Host/Compile/Bootstrap)
+
+$(eval $(call Py3Package,python3-tomli))
+$(eval $(call BuildPackage,python3-tomli))
+$(eval $(call BuildPackage,python3-tomli-src))
+$(eval $(call HostBuild))
index b60c9ad10c59ec6d14abf3a7c7026fe2f1973324..5f511d54bb9e72474373e78fd6a9509bb619220f 100644 (file)
@@ -19,9 +19,13 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=PSF-2.0
 PKG_LICENSE_FILES:=LICENSE
 
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-wheel/host
+
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include ../python3-package.mk
+include ../python3-host-build.mk
 
 define Package/python3-typing-extensions
   SUBMENU:=Python
@@ -40,3 +44,4 @@ endef
 $(eval $(call Py3Package,python3-typing-extensions))
 $(eval $(call BuildPackage,python3-typing-extensions))
 $(eval $(call BuildPackage,python3-typing-extensions-src))
+$(eval $(call HostBuild))
diff --git a/lang/python/python-wheel/Makefile b/lang/python/python-wheel/Makefile
new file mode 100644 (file)
index 0000000..abf604a
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-wheel
+PKG_VERSION:=0.40.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=wheel
+PKG_HASH:=cd1196f3faee2b31968d626e1731c94f99cbdb67cf5a46e4f5656cbee7738873
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+PKG_HOST_ONLY:=1
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-flit-core/host
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include ../python3-package.mk
+include ../python3-host-build.mk
+
+define Package/python3-wheel
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A built-package format for Python
+  URL:=https://github.com/pypa/wheel
+  DEPENDS:=+python3-light +python3-email +python3-logging +python3-setuptools
+  BUILDONLY:=1
+endef
+
+define Package/python3-wheel/description
+This library is the reference implementation of the Python wheel
+packaging standard, as defined in PEP 427.
+endef
+
+$(eval $(call Py3Package,python3-wheel))
+$(eval $(call BuildPackage,python3-wheel))
+$(eval $(call BuildPackage,python3-wheel-src))
+$(eval $(call HostBuild))
index 1f471e03ba8c1d2a703fb1064e1255919c46cd29..4c2cbd7be4c432bb106bb66a14cf096bb30d8b87 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-yaml
 PKG_VERSION:=6.0
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=2
 
 PYPI_NAME:=PyYAML
 PKG_HASH:=68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2
@@ -19,7 +19,7 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython
+PKG_BUILD_DEPENDS:=python-cython/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 17c442952f7797b00ca085648cf45500bc68657a..3d48b31c31c52f71fa6ae9a887b8309a37d6423a 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-zipp
 PKG_VERSION:=3.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=zipp
 PKG_HASH:=3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76
@@ -11,7 +11,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm toml  # setuptools_scm[toml] >= 3.4.1
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host  # setuptools_scm[toml] >= 3.4.1
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python3-host-build.mk b/lang/python/python3-host-build.mk
new file mode 100644 (file)
index 0000000..738d157
--- /dev/null
@@ -0,0 +1,99 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
+include $(python3_mk_path)python3-host.mk
+
+PYTHON3_HOST_BUILD?=1
+
+PYTHON3_HOST_BUILD_CONFIG_SETTINGS?=
+PYTHON3_HOST_BUILD_VARS?=
+PYTHON3_HOST_BUILD_ARGS?=
+PYTHON3_HOST_BUILD_PATH?=
+
+PYTHON3_HOST_INSTALL_VARS?=
+
+PYTHON3_HOST_WHEEL_NAME?=$(subst -,_,$(if $(PYPI_SOURCE_NAME),$(PYPI_SOURCE_NAME),$(PKG_NAME)))
+PYTHON3_HOST_WHEEL_VERSION?=$(PKG_VERSION)
+
+PYTHON3_HOST_BUILD_DIR?=$(HOST_BUILD_DIR)/$(PYTHON3_HOST_BUILD_PATH)
+
+
+PYTHON3_HOST_DIR_NAME:=$(lastword $(subst /,$(space),$(CURDIR)))
+PYTHON3_HOST_STAGING_DIR:=$(TMP_DIR)/host-stage-$(PYTHON3_HOST_DIR_NAME)
+PYTHON3_HOST_STAGING_FILES_LIST_DIR:=$(HOST_BUILD_PREFIX)/stamp
+PYTHON3_HOST_STAGING_FILES_LIST:=$(PYTHON3_HOST_STAGING_FILES_LIST_DIR)/$(PYTHON3_HOST_DIR_NAME).list
+
+define Py3Host/Compile/Bootstrap
+       $(call HostPython3/Run, \
+               $(HOST_BUILD_DIR), \
+               -m flit_core.wheel \
+                       --outdir "$(PYTHON3_HOST_BUILD_DIR)"/openwrt-build \
+                       "$(PYTHON3_HOST_BUILD_DIR)" \
+       )
+endef
+
+define Py3Host/Compile
+       $(call HostPython3/Run, \
+               $(HOST_BUILD_DIR), \
+               -m build \
+                       --no-isolation \
+                       --outdir "$(PYTHON3_HOST_BUILD_DIR)"/openwrt-build \
+                       --wheel \
+                       $(foreach setting,$(PYTHON3_HOST_BUILD_CONFIG_SETTINGS),--config-setting=$(setting)) \
+                       $(PYTHON3_HOST_BUILD_ARGS) \
+                       "$(PYTHON3_HOST_BUILD_DIR)" \
+                       , \
+               $(PYTHON3_HOST_BUILD_VARS) \
+       )
+endef
+
+define Py3Host/Install/Installer
+       $(call HostPython3/Run, \
+               $(HOST_BUILD_DIR), \
+               -m installer \
+                       --destdir "$(1)" \
+                       --prefix "" \
+                       "$(PYTHON3_HOST_BUILD_DIR)"/openwrt-build/$(PYTHON3_HOST_WHEEL_NAME)-$(PYTHON3_HOST_WHEEL_VERSION)-*.whl \
+                       , \
+               $(PYTHON3_HOST_INSTALL_VARS) \
+       )
+endef
+
+define Py3Host/Install
+       rm -rf "$(PYTHON3_HOST_STAGING_DIR)"
+       mkdir -p "$(PYTHON3_HOST_STAGING_DIR)" "$(PYTHON3_HOST_STAGING_FILES_LIST_DIR)"
+
+       $(call Py3Host/Install/Installer,$(PYTHON3_HOST_STAGING_DIR))
+
+       $(call Py3Host/Uninstall,$(1))
+
+       cd "$(PYTHON3_HOST_STAGING_DIR)" && find ./ > "$(PYTHON3_HOST_STAGING_DIR).files"
+
+       $(call locked, \
+               mv "$(PYTHON3_HOST_STAGING_DIR).files" "$(PYTHON3_HOST_STAGING_FILES_LIST)" && \
+               $(CP) "$(PYTHON3_HOST_STAGING_DIR)"/* "$(1)/", \
+               host-staging-dir \
+       )
+
+       rm -rf "$(PYTHON3_HOST_STAGING_DIR)"
+endef
+
+define Py3Host/Uninstall
+       if [ -f "$(PYTHON3_HOST_STAGING_FILES_LIST)" ]; then \
+               "$(SCRIPT_DIR)/clean-package.sh" \
+                       "$(PYTHON3_HOST_STAGING_FILES_LIST)" \
+                       "$(1)" ; \
+               rm -f "$(PYTHON3_HOST_STAGING_FILES_LIST)" ; \
+       fi
+endef
+
+ifeq ($(strip $(PYTHON3_HOST_BUILD)),1)
+  Host/Compile=$(Py3Host/Compile)
+  Host/Install=$(Py3Host/Install)
+  Host/Uninstall=$(call Py3Host/Uninstall,$(HOST_BUILD_PREFIX))
+endif
index 8a05c332cf453e9a927a2978c869244ed461e2ec..54f9bde1e1a44f8706bffbe956e91b45b6682a2b 100644 (file)
 python3_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
 include $(python3_mk_path)python3-version.mk
 
+# Unset environment variables
+
+# https://docs.python.org/3/using/cmdline.html#environment-variables
+unexport \
+       PYTHONHOME \
+       PYTHONPATH \
+       PYTHONSAFEPATH \
+       PYTHONPLATLIBDIR \
+       PYTHONSTARTUP \
+       PYTHONOPTIMIZE \
+       PYTHONBREAKPOINT \
+       PYTHONDEBUG \
+       PYTHONINSPECT \
+       PYTHONUNBUFFERED \
+       PYTHONVERBOSE \
+       PYTHONCASEOK \
+       PYTHONDONTWRITEBYTECODE \
+       PYTHONPYCACHEPREFIX \
+       PYTHONHASHSEED \
+       PYTHONINTMAXSTRDIGITS \
+       PYTHONIOENCODING \
+       PYTHONNOUSERSITE \
+       PYTHONUSERBASE \
+       PYTHONEXECUTABLE \
+       PYTHONWARNINGS \
+       PYTHONFAULTHANDLER \
+       PYTHONTRACEMALLOC \
+       PYTHONPROFILEIMPORTTIME \
+       PYTHONASYNCIODEBUG \
+       PYTHONMALLOC \
+       PYTHONMALLOCSTATS \
+       PYTHONLEGACYWINDOWSFSENCODING \
+       PYTHONLEGACYWINDOWSSTDIO \
+       PYTHONCOERCECLOCALE \
+       PYTHONDEVMODE \
+       PYTHONUTF8 \
+       PYTHONWARNDEFAULTENCODING \
+       PYTHONNODEBUGRANGES
+
+# https://docs.python.org/3/using/cmdline.html#debug-mode-variables
+unexport \
+       PYTHONTHREADDEBUG \
+       PYTHONDUMPREFS \
+       PYTHONDUMPREFSFILE
+
 HOST_PYTHON3_DIR:=$(STAGING_DIR_HOSTPKG)
 HOST_PYTHON3_INC_DIR:=$(HOST_PYTHON3_DIR)/include/python$(PYTHON3_VERSION)
 HOST_PYTHON3_LIB_DIR:=$(HOST_PYTHON3_DIR)/lib/python$(PYTHON3_VERSION)
@@ -31,10 +76,7 @@ HOST_PYTHON3_VARS = \
        LDSHARED="$(HOSTCC) -shared" \
        CFLAGS="$(HOST_CFLAGS)" \
        CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \
-       LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib" \
-       PYTHONPATH="$(HOST_PYTHON3PATH)" \
-       PYTHONDONTWRITEBYTECODE=0 \
-       PYTHONOPTIMIZE=""
+       LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib"
 
 # $(1) => directory of python script
 # $(2) => python script and its arguments
@@ -51,6 +93,11 @@ HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION)
 
 HOST_PYTHON3_PIP_CACHE_DIR:=$(DL_DIR)/pip-cache
 
+HOST_PYTHON3_PIP_VARS:= \
+       PIP_CACHE_DIR="$(HOST_PYTHON3_PIP_CACHE_DIR)" \
+       PIP_CONFIG_FILE=/dev/null \
+       PIP_DISABLE_PIP_VERSION_CHECK=1
+
 define SetupPyShim
        if [ -f $(1)/pyproject.toml ] && [ ! -f $(1)/setup.py ] ; then \
                $(CP) $(python3_mk_path)setup.py.shim $(1)setup.py ; \
@@ -62,11 +109,11 @@ endef
 define HostPython3/PipInstall
        $(call locked, \
                $(HOST_PYTHON3_VARS) \
+               $(HOST_PYTHON3_PIP_VARS) \
                $(HOST_PYTHON3_PIP) \
-                       --cache-dir "$(HOST_PYTHON3_PIP_CACHE_DIR)" \
-                       --disable-pip-version-check \
                        install \
                        --no-binary :all: \
+                       --progress-bar off \
                        --require-hashes \
                        $(1) \
                $(if $(CONFIG_PYTHON3_HOST_PIP_CACHE_WORLD_READABLE), \
@@ -76,14 +123,3 @@ define HostPython3/PipInstall
                pip \
        )
 endef
-
-# $(1) => build subdir
-# $(2) => additional arguments to setup.py
-# $(3) => additional variables
-define HostPython3/ModSetup
-       $(call SetupPyShim,$(HOST_BUILD_DIR)/$(strip $(1)))
-       $(call HostPython3/Run, \
-               $(HOST_BUILD_DIR)/$(strip $(1)), \
-               setup.py $(2), \
-               $(3) PY_PKG_VERSION=$(PKG_VERSION))
-endef
index a24892ac5704468bead769c263d9de574797e3c8..f2336b8fcf1569c26a12bbfde188c3b390c4af04 100644 (file)
@@ -42,7 +42,6 @@ PYTHON3_VARS = \
        __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON3)" \
        PYTHONPATH="$(PYTHON3PATH)" \
        PYTHONDONTWRITEBYTECODE=1 \
-       PYTHONOPTIMIZE="" \
        _python_sysroot="$(STAGING_DIR)" \
        _python_prefix="/usr" \
        _python_exec_prefix="/usr"
@@ -207,10 +206,13 @@ endef
 
 ifneq ($(strip $(PYPI_NAME)),)
 define Py3Build/CheckHostPipVersionMatch
-       if grep -q "$(PYPI_NAME)==" $(python3_mk_path)host-pip-requirements/*.txt ; then \
-               if ! grep -q "$(PYPI_NAME)==$(PKG_VERSION)" $(python3_mk_path)host-pip-requirements/*.txt ; then \
-                       printf "\nPlease update version of $(PYPI_NAME) to $(PKG_VERSION) in 'host-pip-requirements'/\n\n" ; \
-                       exit 1 ; \
+       if [ -d "$(python3_mk_path)host-pip-requirements" ] && \
+                       [ -n "$$$$($(FIND) $(python3_mk_path)host-pip-requirements -maxdepth 1 -mindepth 1 -name '*.txt' -print -quit 2>/dev/null)" ]; then \
+               if grep -q "$(PYPI_NAME)==" $(python3_mk_path)host-pip-requirements/*.txt ; then \
+                       if ! grep -q "$(PYPI_NAME)==$(PKG_VERSION)" $(python3_mk_path)host-pip-requirements/*.txt ; then \
+                               printf "\nPlease update version of $(PYPI_NAME) to $(PKG_VERSION) in 'host-pip-requirements'/\n\n" ; \
+                               exit 1 ; \
+                       fi \
                fi \
        fi
 endef
index aa2f2624f031a5276232a65ffa5d96c31dbe2ed0..b666c411213fe3fdc1b5787acc6378d659166839 100644 (file)
@@ -179,11 +179,11 @@ endif
 
 ifeq ($(PYTHON3_SETUPTOOLS_BUILD),1)
 define Build/Compile/python3-setuptools
+       $(HOST_PYTHON3_PIP_VARS) \
        $(HOST_PYTHON3_PIP) \
-               --disable-pip-version-check \
-               --cache-dir "$(DL_DIR)/pip-cache" \
                install \
                --ignore-installed \
+               --progress-bar off \
                --root=$(PKG_BUILD_DIR)/install-setuptools \
                --prefix=/usr \
                $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py3-none-any.whl
@@ -197,11 +197,11 @@ endif # CONFIG_PACKAGE_python3-setuptools
 
 ifdef CONFIG_PACKAGE_python3-pip
 define Build/Compile/python3-pip
+       $(HOST_PYTHON3_PIP_VARS) \
        $(HOST_PYTHON3_PIP) \
-               --disable-pip-version-check \
-               --cache-dir "$(DL_DIR)/pip-cache" \
                install \
                --ignore-installed \
+               --progress-bar off \
                --root=$(PKG_BUILD_DIR)/install-pip \
                --prefix=/usr \
                $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py3-none-any.whl
diff --git a/lang/rust/Config.in b/lang/rust/Config.in
deleted file mode 100644 (file)
index 490322f..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-# Rust Language Options
-menu "Compiler Options"
-       visible if PACKAGE_rust
-
-       config RUST_DEBUG
-               bool "Enables Debugging Environment (--enable-debug)"
-
-       config RUST_DOCS
-               bool "Build standard library documentation (--enable-docs)"
-
-       config RUST_COMPILER_DOCS
-               bool "Build compiler documentation (--enable-compiler-docs)"
-
-       config RUST_OPTIMIZE_TESTS
-               bool "Build tests with optimizations (--enable-optimized-tests)"
-
-       config RUST_PARALLEL
-               bool "Build with multi-threaded support (--enable-parallel-compiler)"
-
-       config RUST_VERBOSE_TESTS
-               bool "Enable verbose output when running tests (--enable-verbose-tests)"
-
-       config RUST_CCACHE
-               bool "Build with ccache enabled (--enable-ccache)"
-
-       config RUST_LLVM_STATIC
-               bool "Statically link to libstdc++ to LLVM (--enable-llvm-static-stdccp)"
-
-       config RUST_LLVM_SHARED
-               bool "Prefer shared linking to LLVM (--enable-llvm-link-shared)"
-
-       config RUST_CODEGEN_TESTS
-               bool "Run the src/test/codegen tests (--enable-codegen-tests)"
-
-       config RUST_OPTION_CHECKING
-               bool "Complain about unrecognized options in this configure script (--enable-option-checking)"
-               default y
-
-       config RUST_ENABLE_NINJA
-               bool "Build LLVM using the Ninja generator (--enable-ninja)"
-               default y
-
-       config RUST_LOCKED_DEPS
-               bool "Force Cargo.lock to be up to date (--enable-locked-deps)"
-
-       config RUST_VENDOR
-               bool "Enable usage of vendored Rust crates (--enable-vendor)"
-
-       config RUST_SANITIZERS
-               bool "Build the sanitizer runtimes (asan, lsan, msan, tsan) (--enable-sanitizers)"
-
-       config RUST_DIST_SRC
-               bool "When building tarballs enables building a source tarball (--enable-dist-src)"
-
-       config RUST_CARGO_NATIVE_STATIC
-               bool "Build static native libraries in Cargo (--enable-cargo-native-static)"
-
-       config RUST_PROFILER
-               bool "Build the profiler runtime (--enable-profiler)"
-
-       config RUST_FULL_TOOLS
-               bool "Build all tools (--enable-full-tools)"
-
-       config RUST_MISSING_TOOLS
-               bool "Allow failures when building tools (--enable-missing-tools)"
-               default y
-
-       config RUST_USE_LIBCXX
-               bool "Build LLVM with libc++ (--enable-use-libcxx)"
-
-       config RUST_CONTROL_FLOW_GUARD
-               bool "Enable Control Flow Guard (--enable-control-flow-guard)"
-
-       config RUST_OPTIMIZE_LLVM
-               bool "Build optimized LLVM (--enable-optimize-llvm)"
-               default y
-
-       config RUST_LLVM_ASSERTIONS
-               bool "Build LLVM with assertions (--enable-llvm-assertions)"
-
-       config RUST_DEBUG_ASSERTIONS
-               bool "Build with debugging assertions (--enable-debug-assertions)"
-
-       config RUST_LLVM_RELEASE_DEBUGINFO
-               bool "Build LLVM with debugger metadata (--enable-llvm-release-debuginfo)"
-
-       config RUST_MANAGE_SUBMODULES
-               bool "Let the build manage the git submodules (--enable-manage-submodules)"
-               default y
-
-       config RUST_FULL_BOOTSTRAP
-               bool "Full Bootstrap - Build three compilers instead of two (--enable-full-bootstrap)"
-
-endmenu
-
index 2b247069a8fa2aba3baeda83d7a60e7c542e9b31..b574b718a67dd5964efad2886dd32e6d0e2be9c1 100644 (file)
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rust
-PKG_VERSION:=1.68.0
+PKG_VERSION:=1.68.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=rustc-$(PKG_VERSION)-src.tar.gz
 PKG_SOURCE_URL:=https://static.rust-lang.org/dist/
-PKG_HASH:=eaf4d8b19f23a232a4770fb53ab5e7acdedec11da1d02b0e5d491ca92ca96d62
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/rustc-$(PKG_VERSION)-src/
+PKG_HASH:=93339c23f7cd4d0c45db58e18b4c6e16d6070f4277aad9d2492d23294bf32e96
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/rustc-$(PKG_VERSION)-src
 
 PKG_MAINTAINER:=Luca Barbato <lu_zero@luminem.org>
 PKG_LICENSE:=Apache-2.0 MIT
@@ -20,17 +20,24 @@ PKG_LICENSE_FILES:=LICENSE-APACHE LICENSE-MIT
 HOST_BUILD_DEPENDS:=python3/host
 PKG_HOST_ONLY:=1
 
-include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include ./rust-values.mk
 
-# rust environment variables
-include ./rust-host.mk
-
-# Rust Temp Directory
-RUST_TMP_DIR:=$(TMP_DIR)/rust-install
+define Package/rust
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Rust
+  TITLE:=Rust Programming Language Compiler
+  URL:=https://www.rust-lang.org/
+  DEPENDS:=$(RUST_ARCH_DEPENDS)
+endef
 
-RUST_INSTALL_HOST_FILENAME:=$(PKG_NAME)-$(PKG_VERSION)-$(RUSTC_HOST_ARCH)-install.tar.xz
-RUST_INSTALL_TARGET_FILENAME:=$(PKG_NAME)-$(PKG_VERSION)-$(RUSTC_TARGET_ARCH)-install.tar.xz
+define Package/rust/description
+  Rust is a multi-paradigm, general-purpose programming language designed for performance
+  and safety, especially safe concurrency. Rust is syntactically similar to C++, but can
+  guarantee memory safety by using a borrow checker to validate references.
+endef
 
 # Rust-lang has an uninstall script
 RUST_UNINSTALL:=$(CARGO_HOME)/lib/rustlib/uninstall.sh
@@ -41,8 +48,8 @@ TARGET_CONFIGURE_ARGS = \
        --set=target.$(RUSTC_TARGET_ARCH).cc=$(TARGET_CC_NOCACHE) \
        --set=target.$(RUSTC_TARGET_ARCH).cxx=$(TARGET_CXX_NOCACHE) \
        --set=target.$(RUSTC_TARGET_ARCH).linker=$(TARGET_CC_NOCACHE) \
-       --set=target.$(RUSTC_TARGET_ARCH).musl-root=$(TOOLCHAIN_DIR) \
-       --set=target.$(RUSTC_TARGET_ARCH).ranlib=$(TARGET_RANLIB)
+       --set=target.$(RUSTC_TARGET_ARCH).ranlib=$(TARGET_RANLIB) \
+       $(if $(CONFIG_USE_MUSL),--set=target.$(RUSTC_TARGET_ARCH).musl-root=$(TOOLCHAIN_DIR))
 
 # CARGO_HOME is an environmental
 HOST_CONFIGURE_OPTS += CARGO_HOME="$(CARGO_HOME)"
@@ -59,83 +66,39 @@ HOST_CONFIGURE_ARGS = \
        --datadir=$(CARGO_HOME)/share \
        --mandir=$(CARGO_HOME)/man \
        --dist-compression-formats=xz \
-       --enable-llvm-link-shared \
-       --enable-llvm-plugins \
        --enable-missing-tools \
-       --enable-ninja \
        --disable-sanitizers \
        --release-channel=stable \
        --enable-cargo-native-static \
+       --set=llvm.download-ci-llvm=true \
        $(TARGET_CONFIGURE_ARGS)
 
-define Host/Prepare
-       # Ensure rust temp directory
-       [ -d $(RUST_TMP_DIR) ] || \
-         mkdir -p $(RUST_TMP_DIR)
-
-       $(call Host/Prepare/Default)
-endef
-
 define Host/Uninstall
        # Call the Uninstall script
        [ -f $(RUST_UNINSTALL) ] && \
-         $(BASH) $(RUST_UNINSTALL) || echo No Uninstall
-
-       rm -rf $(RUST_TMP_DIR)
+               $(BASH) $(RUST_UNINSTALL) || echo No Uninstall
 endef
 
-# Makes and then packages the dist artifacts
 define Host/Compile
-       cd $(HOST_BUILD_DIR) && \
-         $(PYTHON) x.py --config ./config.toml dist build-manifest cargo llvm-tools \
-           rustc rust-std rust-src
-
-       $(call Host/PackageDist)
+       ( \
+               cd $(HOST_BUILD_DIR) ; \
+               $(PYTHON) x.py --config ./config.toml dist build-manifest cargo llvm-tools \
+                       rustc rust-std rust-src ; \
+       )
 endef
 
-# Distribution Artifacts are packaged by Host/PackageDist
-# We just need to extract and install
 define Host/Install
-       $(TAR) -C $(RUST_TMP_DIR) -xJf $(DL_DIR)/$(RUST_INSTALL_HOST_FILENAME) && \
-       $(TAR) -C $(RUST_TMP_DIR) -xJf $(DL_DIR)/$(RUST_INSTALL_TARGET_FILENAME)
-
-       cd $(RUST_TMP_DIR) && \
-         find -iname "*.xz" -exec tar -xJf {} ";" && \
-         find ./* -type f -name install.sh -execdir sh {} --prefix=$(CARGO_HOME) --disable-ldconfig \;
-
-       echo -e "[target.$(RUSTC_TARGET_ARCH)]\nlinker = \"$(TARGET_CC_NOCACHE)\"\nrustflags = [\"-Ctarget-feature=-crt-static\", \"-Clink-args=$(RUSTC_LDFLAGS)\"]" > $(CARGO_HOME)/config
-       echo -e "\n[profile.stripped]\ninherits = \"release\"\nopt-level = \"s\"\nstrip = true" >> $(CARGO_HOME)/config
-endef
-
-# Packages the Distribution Artifacts into HOST and TARGET bundles.
-define Host/PackageDist
        ( \
                cd $(HOST_BUILD_DIR)/build/dist ; \
-               $(TAR) -cJf $(DL_DIR)/$(RUST_INSTALL_TARGET_FILENAME) \
-                       rust-*-$(RUSTC_TARGET_ARCH).tar.xz ; \
-               $(TAR) -cJf $(DL_DIR)/$(RUST_INSTALL_HOST_FILENAME) \
-                       --exclude rust-*-$(RUSTC_TARGET_ARCH).tar.xz *.xz ; \
+               find -iname "*.xz" -exec tar -xJf {} \; ; \
+               find ./* -type f -name install.sh -execdir sh {} --prefix=$(CARGO_HOME) --disable-ldconfig \; ; \
+               \
+               sed -e 's|@RUSTC_TARGET_ARCH@|$(RUSTC_TARGET_ARCH)|g' \
+                   -e 's|@TARGET_CC_NOCACHE@|$(TARGET_CC_NOCACHE)|g' \
+                   -e 's|@RUSTC_LDFLAGS@|$(RUSTC_LDFLAGS)|g' \
+                       $(CURDIR)/files/cargo-config > $(CARGO_HOME)/config ; \
        )
 endef
 
-define Package/rust
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=Rust Programming Language Compiler
-  URL:=https://www.rust-lang.org/
-  DEPENDS:=$(RUST_ARCH_DEPENDS) \
-    +pkg-config +libunwind +libopenssl +liblzma +libc
-endef
-
-define Package/rust/description
-  Rust is a multi-paradigm, general-purpose programming language designed for performance
-  and safety, especially safe concurrency. Rust is syntactically similar to C++, but can
-  guarantee memory safety by using a borrow checker to validate references.
-endef
-
-define Package/rust/config
-       source "$(SOURCE)/Config.in"
-endef
-
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,rust))
diff --git a/lang/rust/files/cargo-config b/lang/rust/files/cargo-config
new file mode 100644 (file)
index 0000000..2ed5129
--- /dev/null
@@ -0,0 +1,8 @@
+[target.@RUSTC_TARGET_ARCH@]
+linker = "@TARGET_CC_NOCACHE@"
+rustflags = ["-Ctarget-feature=-crt-static", "-Clink-args=@RUSTC_LDFLAGS@"]
+
+[profile.stripped]
+inherits = "release"
+opt-level = "s"
+strip = true
diff --git a/lang/rust/maturin/Makefile b/lang/rust/maturin/Makefile
deleted file mode 100644 (file)
index c2ed4bc..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Copyright (C) 2023 Luca Barbato
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=maturin
-PKG_VERSION:=0.14.10
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/PyO3/maturin/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=8fc9bcdcb7f1535d5e3e8bb500c348ca1bff5a6dce87b0ab7dbc5a49723da28a
-
-PKG_MAINTAINER:=Luca Barbato <lu_zero@luminem.org>
-PKG_LICENSE:=Apache-2.0 MIT
-PKG_LICENSE_FILES:=license-apache license-mit
-
-HOST_BUILD_DEPENDS:=rust/host
-PKG_BUILD_DEPENDS:=rust/host
-
-PKG_BUILD_PARALLEL:=1
-PKG_HOST_ONLY:=1
-
-include ../rust-package.mk
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-
-define Package/maturin
-  SECTION:=lang
-  CATEGORY:=Languages
-  SUBMENU:=Rust
-  TITLE:=Build and publish crates as python packages
-  DEPENDS:=$(RUST_ARCH_DEPENDS)
-  URL:=https://maturin.rs
-endef
-
-define Host/Compile
-       $(call Host/Compile/Cargo)
-endef
-
-define Package/maturin/description
-  Build and publish crates with pyo3, rust-cpython, cffi and uniffi
-  bindings as well as rust binaries as python packages.
-endef
-
-define Host/Install
-       $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
-       $(INSTALL_BIN) $(HOST_INSTALL_DIR)/bin/maturin $(STAGING_DIR_HOSTPKG)/bin/maturin
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,maturin))
diff --git a/lang/rust/rust-host-build.mk b/lang/rust/rust-host-build.mk
new file mode 100644 (file)
index 0000000..39cf1f2
--- /dev/null
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2023 Luca Barbato and Donald Hoskins
+
+ifeq ($(origin RUST_INCLUDE_DIR),undefined)
+  RUST_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+include $(RUST_INCLUDE_DIR)/rust-values.mk
+
+# $(1) path to the package (optional)
+# $(2) additional arguments to cargo (optional)
+define Host/Compile/Cargo
+       ( \
+               cd $(HOST_BUILD_DIR) ; \
+               export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \
+               CARGO_HOME=$(CARGO_HOME) \
+               CC=$(HOSTCC_NOCACHE) \
+               cargo install -v \
+                       --profile stripped \
+                       $(if $(RUST_PKG_FEATURES),--features "$(RUST_PKG_FEATURES)") \
+                       --root $(HOST_INSTALL_DIR) \
+                       --path "$(if $(strip $(1)),$(strip $(1)),.)" $(2) ; \
+       )
+endef
+
+define Host/Uninstall/Cargo
+       ( \
+               cd $(HOST_BUILD_DIR) ; \
+               export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \
+               CARGO_HOME=$(CARGO_HOME) \
+               CC=$(HOSTCC_NOCACHE) \
+               cargo uninstall -v \
+                       --root $(HOST_INSTALL_DIR) || true ; \
+       )
+endef
+
+define RustBinHostBuild
+  define Host/Install
+       $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
+       $(INSTALL_BIN) $(HOST_INSTALL_DIR)/bin/* $(STAGING_DIR_HOSTPKG)/bin/
+  endef
+endef
+
+Host/Compile=$(call Host/Compile/Cargo)
+Host/Uninstall=$(call Host/Uninstall/Cargo)
diff --git a/lang/rust/rust-host.mk b/lang/rust/rust-host.mk
deleted file mode 100644 (file)
index acc93c5..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Copyright (C) 2023 Luca Barbato and Donald Hoskins
-
-# Rust Environmental Vars
-CONFIG_HOST_SUFFIX:=$(word 4, $(subst -, ,$(GNU_HOST_NAME)))
-RUSTC_HOST_ARCH:=$(HOST_ARCH)-unknown-linux-$(CONFIG_HOST_SUFFIX)
-CARGO_HOME:=$(STAGING_DIR_HOST)/cargo
-
-# Support only a subset for now.
-RUST_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||mips64||mips64el||mipsel||powerpc64||x86_64)
-
-# Common Build Flags
-RUST_BUILD_FLAGS = \
-  CARGO_HOME="$(CARGO_HOME)"
-
-# This adds the rust environmental variables to Make calls
-MAKE_FLAGS += $(RUST_BUILD_FLAGS)
-
-# Force linking of the SSP library
-ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
-  ifeq ($(strip $(PKG_SSP)),1)
-    RUSTC_LDFLAGS += -lssp_nonshared
-  endif
-endif
-ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG
-  ifeq ($(strip $(PKG_SSP)),1)
-    TARGET_CFLAGS += -lssp_nonshared
-  endif
-endif
-
-# mips64 openwrt has a specific targed in rustc
-ifeq ($(ARCH),mips64)
-  RUSTC_TARGET_ARCH:=$(REAL_GNU_TARGET_NAME)
-else
-  RUSTC_TARGET_ARCH:=$(subst openwrt,unknown,$(REAL_GNU_TARGET_NAME))
-endif
-
-RUSTC_TARGET_ARCH:=$(subst muslgnueabi,musleabi,$(RUSTC_TARGET_ARCH))
-
-ifeq ($(ARCH),i386)
-  RUSTC_TARGET_ARCH:=$(subst i486,i586,$(RUSTC_TARGET_ARCH))
-endif
-
-# ARM Logic
-ifeq ($(ARCH),arm)
-  ifeq ($(CONFIG_arm_v7),y)
-    RUSTC_TARGET_ARCH:=$(subst arm,armv7,$(RUSTC_TARGET_ARCH))
-  endif
-
-  ifeq ($(CONFIG_HAS_FPU),y)
-    RUSTC_TARGET_ARCH:=$(subst musleabi,musleabihf,$(RUSTC_TARGET_ARCH))
-  endif
-endif
-
-ifeq ($(ARCH),aarch64)
-    RUST_CFLAGS:=-mno-outline-atomics
-endif
index 54c2aa89ac5be0accc2e214562359f02f3229d74..6ab0e239922efdf985e9fdd3267f8158f6d85cb5 100644 (file)
@@ -2,27 +2,50 @@
 #
 # Copyright (C) 2023 Luca Barbato and Donald Hoskins
 
-rust_mk_path:=$(dir $(lastword $(MAKEFILE_LIST)))
-include $(rust_mk_path)rust-host.mk
+# Variables (all optional) to be set in package Makefiles:
+#
+# RUST_PKG_FEATURES - list of options, default empty
+#
+#   Space or comma separated list of features to activate
+#
+#   e.g. RUST_PKG_FEATURES:=enable-foo,with-bar
 
-# $(1) path to the package
-# $(2) additional arguments to cargo
-define Host/Compile/Cargo
-       ( \
-               cd $(HOST_BUILD_DIR) ; \
-               export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \
-               CARGO_HOME=$(CARGO_HOME) CC=$(HOSTCC) \
-                       cargo install -v --profile stripped --root $(HOST_INSTALL_DIR) --path "$(if $(strip $(1)),$(strip $(1)),.)" $(2) ; \
-       )
-endef
+ifeq ($(origin RUST_INCLUDE_DIR),undefined)
+  RUST_INCLUDE_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
+endif
+include $(RUST_INCLUDE_DIR)/rust-values.mk
+
+# Support only a subset for now.
+RUST_ARCH_DEPENDS:=@(aarch64||arm||i386||i686||mips||mipsel||mips64||mips64el||mipsel||powerpc64||x86_64)
 
-# $(1) path to the package
-# $(2) additional arguments to cargo
+# $(1) path to the package (optional)
+# $(2) additional arguments to cargo (optional)
 define Build/Compile/Cargo
        ( \
                cd $(PKG_BUILD_DIR) ; \
                export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \
-               CARGO_HOME=$(CARGO_HOME) TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUST_CFLAGS)" TARGET_CC=$(TARGET_CC_NOCACHE) CC=cc \
-                       cargo install -v --profile stripped --target $(RUSTC_TARGET_ARCH) --root $(PKG_INSTALL_DIR) --path "$(if $(strip $(1)),$(strip $(1)),.)" $(2) ; \
+               CARGO_HOME=$(CARGO_HOME) \
+               TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUST_CFLAGS)" \
+               TARGET_CC=$(TARGET_CC_NOCACHE) \
+               CC=$(HOSTCC_NOCACHE) \
+               $(CARGO_VARS) \
+               cargo install -v \
+                       --profile stripped \
+                       --target $(RUSTC_TARGET_ARCH) \
+                       $(if $(strip $(RUST_PKG_FEATURES)),--features "$(strip $(RUST_PKG_FEATURES))") \
+                       --root $(PKG_INSTALL_DIR) \
+                       --path "$(if $(strip $(1)),$(strip $(1)),.)" \
+                       $(2) ; \
        )
 endef
+
+define RustBinPackage
+  ifndef Package/$(1)/install
+    define Package/$(1)/install
+       $$(INSTALL_DIR) $$(1)/usr/bin/
+       $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/bin/* $$(1)/usr/bin/
+    endef
+  endif
+endef
+
+Build/Compile=$(call Build/Compile/Cargo)
diff --git a/lang/rust/rust-values.mk b/lang/rust/rust-values.mk
new file mode 100644 (file)
index 0000000..daebec2
--- /dev/null
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2023 Luca Barbato and Donald Hoskins
+
+# Rust Environmental Vars
+CONFIG_HOST_SUFFIX:=$(word 4, $(subst -, ,$(GNU_HOST_NAME)))
+RUSTC_HOST_ARCH:=$(HOST_ARCH)-unknown-linux-$(CONFIG_HOST_SUFFIX)
+CARGO_HOME:=$(STAGING_DIR_HOSTPKG)/cargo
+CARGO_VARS:=
+
+ifeq ($(CONFIG_USE_MUSL),y)
+# Force linking of the SSP library for musl
+ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
+  ifeq ($(strip $(PKG_SSP)),1)
+    RUSTC_LDFLAGS += -lssp_nonshared
+  endif
+endif
+ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG
+  ifeq ($(strip $(PKG_SSP)),1)
+    TARGET_CFLAGS += -lssp_nonshared
+  endif
+endif
+endif
+
+# mips64 openwrt has a specific targed in rustc
+ifeq ($(ARCH),mips64)
+  RUSTC_TARGET_ARCH:=$(REAL_GNU_TARGET_NAME)
+else
+  RUSTC_TARGET_ARCH:=$(subst openwrt,unknown,$(REAL_GNU_TARGET_NAME))
+endif
+
+RUSTC_TARGET_ARCH:=$(subst muslgnueabi,musleabi,$(RUSTC_TARGET_ARCH))
+
+ifeq ($(ARCH),i386)
+  RUSTC_TARGET_ARCH:=$(subst i486,i586,$(RUSTC_TARGET_ARCH))
+endif
+
+# ARM Logic
+ifeq ($(ARCH),arm)
+  ifeq ($(CONFIG_arm_v7),y)
+    RUSTC_TARGET_ARCH:=$(subst arm,armv7,$(RUSTC_TARGET_ARCH))
+  endif
+
+  ifeq ($(CONFIG_HAS_FPU),y)
+    RUSTC_TARGET_ARCH:=$(subst musleabi,musleabihf,$(RUSTC_TARGET_ARCH))
+  endif
+endif
+
+ifeq ($(ARCH),aarch64)
+    RUST_CFLAGS:=-mno-outline-atomics
+endif
diff --git a/lang/rust/rust_config.mk b/lang/rust/rust_config.mk
deleted file mode 100644 (file)
index 75017f8..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-ifeq ($(CONFIG_RUST_DEBUG),y)
-CONFIGURE_ARGS += --enable-debug
-endif
-
-ifeq ($(CONFIG_RUST_DOCS),y)
-CONFIGURE_ARGS += --enable-docs
-else
-CONFIGURE_ARGS += --disable-docs
-endif
-
-ifeq ($(CONFIG_RUST_COMPILER_DOCS),y)
-CONFIGURE_ARGS += --enable-compiler-docs
-else
-CONFIGURE_ARGS += --disable-compiler-docs
-endif
-
-ifeq ($(CONFIG_RUST_OPTIMIZE_TESTS),y)
-CONFIGURE_ARGS += --enable-optimize-tests
-endif
-
-ifeq ($(CONFIG_RUST_PARALLEL),y)
-CONFIGURE_ARGS += --enable-parallel-compiler
-endif
-
-ifeq ($(CONFIG_RUST_VERBOSE_TESTS),y)
-CONFIGURE_ARGS += --enable-verbose-tests
-endif
-
-ifeq ($(filter $(CONFIG_RUST_CCACHE) $(CCACHE),y),)
-CONFIGURE_ARGS += --enable-ccache
-endif
-
-ifeq ($(CONFIG_RUST_CCACHE),y)
-CONFIGURE_ARGS += --enable-ccache
-endif
-
-ifeq ($(CONFIG_RUST_LLVM_STATIC),y)
-CONFIGURE_ARGS += --enable-llvm-static-stdcpp
-endif
-
-ifeq ($(CONFIG_RUST_LLVM_SHARED),y)
-CONFIGURE_ARGS += --enable-llvm-link-shared
-endif
-
-ifeq ($(CONFIG_RUST_CODEGEN_TESTS),y)
-CONFIGURE_ARGS += --enable-codegen-tests
-endif
-
-ifeq ($(CONFIG_RUST_OPTION_CHECKING),y)
-CONFIGURE_ARGS += --enable-option-checking
-endif
-
-ifeq ($(CONFIG_RUST_ENABLE_NINJA),y)
-CONFIGURE_ARGS += --enable-ninja
-endif
-
-ifeq ($(CONFIG_RUST_LOCKED_DEPS),y)
-CONFIGURE_ARGS += --enable-locked-deps
-endif
-
-ifeq ($(CONFIG_RUST_VENDOR),y)
-CONFIGURE_ARGS += --enable-vendor
-endif
-
-ifeq ($(CONFIG_RUST_SANITIZERS),y)
-CONFIGURE_ARGS += --enable-sanitizers
-endif
-
-ifeq ($(CONFIG_RUST_DIST_SRC),y)
-CONFIGURE_ARGS += --enable-dist-src
-endif
-
-ifeq ($(CONFIG_RUST_CARGO_NATIVE_STATIC),y)
-CONFIGURE_ARGS += --enable-cargo-native-static
-endif
-
-ifeq ($(CONFIG_RUST_PROFILER),y)
-CONFIGURE_ARGS += --enable-profiler
-endif
-
-ifeq ($(CONFIG_RUST_FULL_TOOLS),y)
-CONFIGURE_ARGS += --enable-full-tools
-endif
-
-ifeq ($(CONFIG_RUST_MISSING_TOOLS),y)
-CONFIGURE_ARGS += --enable-missing-tools
-endif
-
-ifeq ($(CONFIG_RUST_USE_LIBCXX),y)
-CONFIGURE_ARGS += --enable-use-libcxx
-endif
-
-ifeq ($(CONFIG_RUST_CONTROL_FLOW_GUARD),y)
-CONFIGURE_ARGS += --enable-control-flow-guard
-endif
-
-ifeq ($(CONFIG_RUST_OPTIMIZE_LLVM),y)
-CONFIGURE_ARGS += --enable-optimize-llvm
-endif
-
-ifeq ($(CONFIG_RUST_LLVM_ASSERTIONS),y)
-CONFIGURE_ARGS += --enable-llvm-assertions
-endif
-
-ifeq ($(CONFIG_RUST_DEBUG_ASSERTIONS),y)
-CONFIGURE_ARGS += --enable-debug-assertions
-endif
-
-ifeq ($(CONFIG_RUST_LLVM_RELEASE_DEBUGINFO),y)
-CONFIGURE_ARGS += --enable-llvm-release-debuginfo
-endif
-
-ifeq ($(CONFIG_RUST_MANAGE_SUBMODULES),y)
-CONFIGURE_ARGS += --enable-manage-submodules
-endif
-
-ifeq ($(CONFIG_RUST_FULL_BOOTSTRAP),y)
-CONFIGURE_ARGS += --enable-full-bootstrap
-endif
index ed67f52039dc48b996f281c5ac14939474d3a296..a81a892e901fa4554ded807169e3cf48aabc01b8 100644 (file)
@@ -9,19 +9,6 @@ if PACKAGE_libopenssl-afalg_sync
            This increases memory usage, and has problems when process fork
            with open digest contexts (openssh will not work because of it).
 
-    config AFALG_FALLBACK
-       bool "Enable software fallback feature"
-       default y
-       help
-           Use software to fulfill small requests.  Using AF_ALG adds latency,
-           which makes it slow to perform small requests.  Enabling this
-           option overcomes this problem, at the cost of increased memory
-           and CPU usage.  This is a new, experimental feature; if you
-           encounter any problem, this is the first option to disable.
-           The fallback will fail if you enable this engine alongside
-           devcrypto, so you'll not be able to install both at the same
-           time if this option is enabled.
-
     config AFALG_UPDATE_CTR_IV
        bool "Don't rely on kernel to update CTR IV"
        default y
index 2dc5af7a161eef779079744da945025fbd5bf894..a227c079f6a95d261e132b27367795880869ed4d 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=afalg_engine
 PKG_VERSION:=1.2.0-beta.1
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/cotequeiroz/afalg_engine/archive/v$(PKG_VERSION)
@@ -25,7 +25,7 @@ PKG_CONFIG_DEPENDS:= \
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
-include $(INCLUDE_DIR)/openssl-engine.mk
+include $(INCLUDE_DIR)/openssl-module.mk
 
 $(eval $(call Package/openssl/add-engine,afalg,libopenssl-afalg_sync))
 define Package/libopenssl-afalg_sync
@@ -33,7 +33,7 @@ define Package/libopenssl-afalg_sync
     TITLE:=AF_ALG engine using sync crypto API
     URL:=https://github.com/cotequeiroz/afalg_engine
     DEPENDS += @!OPENSSL_ENGINE_BUILTIN_AFALG +kmod-crypto-user
-    CONFLICTS:=libopenssl-afalg $(if $(CONFIG_AFALG_FALLBACK),libopenssl-devcrypto)
+    CONFLICTS:=libopenssl-afalg
     MENU:=1
 endef
 
@@ -54,7 +54,6 @@ endef
 CMAKE_OPTIONS += \
        -DOPENSSL_ENGINES_DIR=/usr/lib/$(ENGINES_DIR) \
        -DDIGESTS=$(if $(CONFIG_AFALG_DIGESTS),ON,OFF) \
-       -DFALLBACK=$(if $(CONFIG_AFALG_FALLBACK),ON,OFF) \
        -DUPDATE_CTR_IV=$(if $(CONFIG_AFALG_UPDATE_CTR_IV),ON,OFF) \
        -DUSE_ZERO_COPY=$(if $(CONFIG_AFALG_ZERO_COPY),ON,OFF)
 
index f17338b8877375bf21813f99f89d65b10c12204c..82f0cfadf86360051361441249298047e54a5752 100644 (file)
@@ -1,4 +1,4 @@
-[afalg]
+[afalg_sect]
 # Leave this alone and configure algorithms with CIPERS/DIGESTS below
 default_algorithms = ALL
 
index 94f6c990e5be840a25c85f227c414c295974b43f..d15a36f39fce84c49fe2e656100bee223f32dceb 100644 (file)
@@ -1,19 +1,12 @@
 include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/openssl-engine.mk
+include $(INCLUDE_DIR)/openssl-module.mk
 
 PKG_NAME:=gost_engine
-ifeq ($(ENGINES_DIR),engines-1.1)
-  PKG_VERSION:=1.1.0.3
-  PKG_HASH:=fff725052e82c9adb5b738729b30141f61ac91fa457a4f4b5de18b8b24092f75
-  PKG_LICENSE:=OpenSSL
-  PATCH_DIR=./patches-1.1
-else
-  PKG_VERSION:=3.0.1
-  PKG_HASH:=bfeac85883724cfbe0ecc6d942ac0524b908143e019ab3d3b6abe47a3466a628
-  PKG_LICENSE:=Apache-2.0
-  PATCH_DIR=./patches-3
-endif
-PKG_RELEASE:=7
+PKG_VERSION:=3.0.1
+PKG_HASH:=bfeac85883724cfbe0ecc6d942ac0524b908143e019ab3d3b6abe47a3466a628
+PKG_LICENSE:=Apache-2.0
+PATCH_DIR=./patches-3
+PKG_RELEASE:=8
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/gost-engine/engine/archive/v$(PKG_VERSION)
index 84a707c93de2ffb43edf006ece32734e065b7e85..8980c5289a195b64c42a41e53e3822d8427bd8db 100644 (file)
@@ -1,4 +1,4 @@
-[gost]
+[gost_sect]
 default_algorithms = ALL
 # CRYPT_PARAMS: OID of default GOST 28147-89 parameters It allows the
 # user to choose between different parameter sets of symmetric cipher
index 84031cc8d65e6c678e664e064c9e01c8b3aac41b..b56515ab47c988c17ed815e3e3821c9ef879a353 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdmapsharing
-PKG_VERSION:=3.9.10
+PKG_VERSION:=3.9.12
 PKG_RELEASE:=1
 
 PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.flyn.org/projects/libdmapsharing/
-PKG_HASH:=e216425d61a109f08f0ac93065f4603d1e61ebd85c09802c03a9ecce5bb35094
+PKG_HASH:=aa47e405c5059ff35ff6fc447e497dc1ff15558859a57710a664350314abf750
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=LGPL-2.1-or-later
@@ -32,7 +32,7 @@ include $(INCLUDE_DIR)/nls.mk
 define Package/libdmapsharing
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libsoup +mdnsresponder +gstreamer1-plugins-base +gst1-mod-app
+  DEPENDS:=+libsoup3 +mdnsresponder +gstreamer1-plugins-base +gst1-mod-app
   TITLE:=libdmapsharing
   URL:=https://www.flyn.org/projects/libdmapsharing/
 endef
index 47d4a0c3166d4556b19d3d02df26297d31b0189d..11b2567ff4ad959f1446ef70850cfb63b062fc7b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -125,15 +125,7 @@ fi
+@@ -126,15 +126,7 @@ fi
  AC_SUBST(GOBJECT_CFLAGS)
  AC_SUBST(GOBJECT_LIBS)
  
index 83d7d7099d8399b8da99fc3cd99116b78f8d6271..38947885812450034d5cbfe78d7254987edd29d3 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=OpenBLAS
-PKG_VERSION:=0.3.21
-PKG_RELEASE:=2
+PKG_VERSION:=0.3.23
+PKG_RELEASE:=1
 
 PKG_SOURCE:=OpenBLAS-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/xianyi/OpenBLAS/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=f36ba3d7a60e7c8bcc54cd9aaa9b1223dd42eaf02c811791c37e8ca707c241ca
+PKG_HASH:=5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114
 PKG_LICENSE:=BSD 3-Clause
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
@@ -27,6 +27,7 @@ define Package/openblas
   DEPENDS:= \
        @!arc \
        @!powerpc \
+       @!SOFT_FLOAT \
        +INSTALL_GFORTRAN:libgfortran
 endef
 
index 1bd6d27599e651fcb3dd45ac5e890f675521a924..8abdd5d7179afe1e00700b07ced21bc5654dd57f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcre2
 PKG_VERSION:=10.37
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pcre/$(PKG_NAME)/$(PKG_VERSION)
@@ -28,6 +28,7 @@ PKG_CONFIG_DEPENDS:=\
 PKG_BUILD_DEPENDS:=zlib
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libpcre2/default
@@ -55,6 +56,18 @@ define Package/libpcre2-32
   TITLE:=A Perl Compatible Regular Expression library (32bit support)
 endef
 
+CMAKE_HOST_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON \
+       -DPCRE2_BUILD_PCRE2_8=ON \
+       -DPCRE2_BUILD_PCRE2_16=ON \
+       -DPCRE2_BUILD_PCRE2_32=ON \
+       -DPCRE2_DEBUG=OFF \
+       -DPCRE2_DISABLE_PERCENT_ZT=ON \
+       -DPCRE2_SUPPORT_JIT=OFF \
+       -DPCRE2_SHOW_REPORT=OFF \
+       -DPCRE2_BUILD_PCRE2GREP=OFF \
+       -DPCRE2_BUILD_TESTS=OFF
+
 CMAKE_OPTIONS += \
        -DBUILD_SHARED_LIBS=ON \
        -DPCRE2_BUILD_PCRE2_8=ON \
@@ -92,3 +105,4 @@ endef
 $(eval $(call BuildPackage,libpcre2))
 $(eval $(call BuildPackage,libpcre2-16))
 $(eval $(call BuildPackage,libpcre2-32))
+$(eval $(call HostBuild))
index 4a668d2b4652c5bc0910fe4a8774de6eaef5a8ae..cc665af83741c78ee2d0594328e891366cb51da9 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcsvc-proto
 PKG_VERSION:=1.4.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/thkukuk/rpcsvc-proto/releases/download/v$(PKG_VERSION)
@@ -13,6 +13,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
 
 HOST_BUILD_DEPENDS:=gettext-full/host
 PKG_BUILD_DEPENDS:=rpcsvc-proto/host
index 22a59a926ada529e90766656b94f295e27f3f0af..6eda908a4f86914d34824dfbe046a1c370fbbe0f 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.1.5
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 2647df093c6a5cff08309b970597d6bedbf1d86f..e76e81450703d997d78e2da6ac6ec341d578b690 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # dns based ad/abuse domain blocking
-# Copyright (c) 2015-2022 Dirk Brenken (dev@brenken.org)
+# Copyright (c) 2015-2023 Dirk Brenken (dev@brenken.org)
 # This is free software, licensed under the GNU General Public License v3.
 
 # disable (s)hellcheck in release
@@ -566,6 +566,7 @@ f_extconf() {
                                                set firewall."adblock_${zone}${port}".src_dport="${port}"
                                                set firewall."adblock_${zone}${port}".dest_port="${port}"
                                                set firewall."adblock_${zone}${port}".target="DNAT"
+                                               set firewall."adblock_${zone}${port}".family="any"
                                        EOC
                                fi
                                fwcfg="${fwcfg/adblock_${zone}${port}[ |\$]/}"
@@ -686,8 +687,13 @@ f_list() {
                        src_name="${mode}"
                        if [ "${src_name}" = "blacklist" ] && [ -f "${adb_blacklist}" ]; then
                                rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
-                               "${adb_awk}" "${rset}" "${adb_blacklist}" |
-                                       "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' >"${adb_tmpdir}/tmp.raw.${src_name}"
+                               "${adb_awk}" "${rset}" "${adb_blacklist}" >"${adb_tmpdir}/tmp.raw.${src_name}"
+                               if [ -s "${adb_whitelist}" ]; then
+                                       "${adb_awk}" 'NR==FNR{member[$1];next}!($1 in member)' "${adb_whitelist}" "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}"
+                               else
+                                       cat "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}"
+                               fi
+                               "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${adb_tmpdir}/tmp.deduplicate.${src_name}" >"${adb_tmpdir}/tmp.raw.${src_name}"
                                "${adb_sort}" ${adb_srtopts} -u "${adb_tmpdir}/tmp.raw.${src_name}" 2>/dev/null >"${adb_tmpfile}.${src_name}"
                                out_rc="${?}"
                                rm -f "${adb_tmpdir}/tmp.raw.${src_name}"
index d6f56f6d4eaf08201627e7b5ee2c6a18b0c50901..85af8602b4ab497393eeb8dede15e20cbd4e8381 100644 (file)
@@ -63,7 +63,7 @@
                "descurl": "https://github.com/hoshsadiq/adblock-nocoin-list"
        },
        "cpbl": {
-               "url": "https://raw.githubusercontent.com/bongochong/CombinedPrivacyBlockLists/master/NoFormatting/BlacklistedDomains.txt",
+               "url": "https://raw.githubusercontent.com/bongochong/CombinedPrivacyBlockLists/master/NoFormatting/cpbl-ctld.txt",
                "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
                "size": "XL",
                "focus": "compilation",
index 7e1d5265a700a5bfa39e1d024c120b6c753edd30..d2e54a2ad1bf2cc93caa0ad2ea79c2b9d2e4e315 100644 (file)
@@ -7,8 +7,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=banip
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.8.3
+PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 8e7afa35d5717ea9b3f56de47e1b33c396c1c2b6..f4116889b71fa03e1f1db7322fa642f2367f52ed 100644 (file)
@@ -75,7 +75,7 @@ IP address blocking is commonly used to protect against brute force attacks, pre
 * Provides a set search engine for certain IPs
 * Feed parsing by fast & flexible regex rulesets
 * Minimal status & error logging to syslog, enable debug logging to receive more output
-* Procd based init system support (start/stop/restart/reload/status/report/search/survey)
+* Procd based init system support (start/stop/restart/reload/status/report/search/survey/lookup)
 * Procd network interface trigger support
 * Ability to add new banIP feeds on your own
 
@@ -114,6 +114,7 @@ Available commands:
        report          [text|json|mail] Print banIP related set statistics
        search          [<IPv4 address>|<IPv6 address>] Check if an element exists in a banIP set
        survey          [<set name>] List all elements of a given banIP set
+       lookup          Lookup the IPs of domain names in the local lists and update them
        running         Check if service is running
        status          Service status
        trace           Start with syscall trace
@@ -148,6 +149,7 @@ Available commands:
 | ban_dev                 | list   | - / autodetect                | wan device(s), e.g. 'eth2'                                                            |
 | ban_trigger             | list   | -                             | logical startup trigger interface(s), e.g. 'wan'                                      |
 | ban_triggerdelay        | option | 10                            | trigger timeout before banIP processing begins                                        |
+| ban_triggeraction       | option | start                         | trigger action on ifup events, e.g. start, restart or reload                          |
 | ban_deduplicate         | option | 1                             | deduplicate IP addresses across all active sets                                       |
 | ban_splitsize           | option | 0                             | split ext. sets after every n lines/members (saves RAM)                               |
 | ban_cores               | option | - / autodetect                | limit the cpu cores used by banIP (saves RAM)                                         |
@@ -168,6 +170,7 @@ Available commands:
 | ban_mailsender          | option | no-reply@banIP                | sender address for banIP related notification E-Mails                                 |
 | ban_mailtopic           | option | banIP notification            | topic for banIP related notification E-Mails                                          |
 | ban_mailprofile         | option | ban_notify                    | mail profile used in 'msmtp' for banIP related notification E-Mails                   |
+| ban_mailnotification    | option | 0                             | receive E-Mail notifications with every banIP run                                     |
 | ban_reportelements      | option | 1                             | list set elements in the report, disable this to speed up the report significantly    |
 | ban_resolver            | option | -                             | external resolver used for DNS lookups                                                |
 
@@ -224,18 +227,16 @@ Available commands:
 ~# /etc/init.d/banip status
 ::: banIP runtime information
   + status            : active (nft: ✔, monitor: ✔)
-  + version           : 0.8.2-2
-  + element_count     : 211397
-  + active_feeds      : allowlistvMAC, allowlistv4, allowlistv6, adawayv4, adawayv6, adguardv4, adguardtrackersv4, adguardv6, adguardtrackersv
-                        6, antipopadsv4, antipopadsv6, cinsscorev4, countryv6, countryv4, deblv4, deblv6, dohv4, dohv6, firehol1v4, oisdsmallv
-                        6, oisdsmallv4, stevenblackv6, stevenblackv4, webclientv4, blocklistvMAC, blocklistv4, blocklistv6
-  + active_devices    : eth2 ::: wan, wan6
-  + active_subnets    : 91.64.148.211/24, 2b02:710c:0:80:e442:4b0c:637d:1d33/128
+  + version           : 0.8.3-1
+  + element_count     : 281161
+  + active_feeds      : allowlistvMAC, allowlistv6, allowlistv4, adawayv4, adguardtrackersv4, adawayv6, adguardv6, adguardv4, adguardtrackersv6, antipopadsv6, antipopadsv4, cinsscorev4, deblv4, countryv6, countryv4, deblv6, dohv4, dohv6, iblockadsv4, firehol1v4, oisdbigv4, yoyov6, threatviewv4, yoyov4, oisdbigv6, blocklistvMAC, blocklistv4, blocklistv6
+  + active_devices    : br-wan ::: wan, wan6
+  + active_subnets    : 91.64.169.252/24, 2a02:710c:0:60:958b:3bd0:9e14:abb/128
   + nft_info          : priority: -200, policy: memory, loglevel: warn, expiry: -
   + run_info          : base: /mnt/data/banIP, backup: /mnt/data/banIP/backup, report: /mnt/data/banIP/report, feed: /etc/banip/banip.feeds
   + run_flags         : auto: ✔, proto (4/6): ✔/✔, log (wan-inp/wan-fwd/lan-fwd): ✔/✔/✔, dedup: ✔, split: ✘, allowed only: ✘
-  + last_run          : action: restart, duration: 0m 55s, date: 2023-03-10 19:33:08
-  + system_info       : cores: 2, memory: 1830, device: Turris Omnia, OpenWrt SNAPSHOT r22248-bf055fcdca
+  + last_run          : action: reload, duration: 1m 0s, date: 2023-04-06 12:34:10
+  + system_info       : cores: 4, memory: 1822, device: Bananapi BPI-R3, OpenWrt SNAPSHOT r22498-75f7e2d10b
 ```
 
 **banIP search information**  
@@ -286,15 +287,22 @@ list ban_logterm 'SecurityEvent=\"InvalidAccountID\".*RemoteAddress='
 **allow-/blocklist handling**  
 banIP supports local allow and block lists (IPv4, IPv6, CIDR notation or domain names), located in /etc/banip/banip.allowlist and /etc/banip/banip.blocklist.  
 Unsuccessful login attempts or suspicious requests will be tracked and added to the local blocklist (see the 'ban\_autoblocklist' option). The blocklist behaviour can be further tweaked with the 'ban\_nftexpiry' option.  
-Furthermore the uplink subnet will be added to local allowlist (see 'ban\_autowallowlist' option).  
-Both lists also accept domain names as input to allow IP filtering based on these names. The corresponding IPs (IPv4 & IPv6) will be extracted in a detached background process and added to the sets.
+Furthermore the uplink subnet will be added to local allowlist (see 'ban\_autoallowlist' option).  
+Both lists also accept domain names as input to allow IP filtering based on these names. The corresponding IPs (IPv4 & IPv6) will be extracted and added to the sets. You can also start the domain lookup separately via /etc/init.d/banip lookup at any time.
 
 **allowlist-only mode**  
 banIP supports an "allowlist only" mode. This option restricts the internet access from/to a small number of secure websites/IPs, and block access from/to the rest of the internet. All IPs and Domains which are _not_ listed in the allowlist are blocked.
 
-**redirect Asterisk security logs to lodg/logread**   
+**redirect Asterisk security logs to lodg/logread**  
 banIP only supports logfile scanning via logread, so to monitor attacks on Asterisk, its security log must be available via logread. To do this, edit '/etc/asterisk/logger.conf' and add the line 'syslog.local0 = security', then run 'asterisk -rx reload logger' to update the running Asterisk configuration.
 
+**send status E-Mails and update the banIP lists via cron job**  
+For a regular, automatic status mailing and update of the used lists on a daily basis set up a cron job, e.g.
+```
+55 03 * * * /etc/init.d/banip report mail
+00 04 * * * /etc/init.d/banip reload
+```
+
 **tweaks for low memory systems**  
 nftables supports the atomic loading of rules/sets/members, which is cool but unfortunately is also very memory intensive. To reduce the memory pressure on low memory systems (i.e. those with 256-512Mb RAM), you should optimize your configuration with the following options:  
 
index 6e231a65245c4cf526fdded3508501cc7610fdf2..991d1147e8d78ec3b696d19845f2ffa3b9140679 100644 (file)
@@ -34,6 +34,7 @@ ban_mailsender="no-reply@banIP"
 ban_mailreceiver=""
 ban_mailtopic="banIP notification"
 ban_mailprofile="ban_notify"
+ban_mailnotifcation="0"
 ban_reportelements="1"
 ban_nftloglevel="warn"
 ban_nftpriority="-200"
@@ -77,8 +78,9 @@ ban_debug="0"
 f_system() {
        local cpu core
 
+       [ -z "${ban_dev}" ] && ban_cores="$(uci_get banip global ban_cores)"
        ban_memory="$("${ban_awkcmd}" '/^MemAvailable/{printf "%s",int($2/1000)}' "/proc/meminfo" 2>/dev/null)"
-       ban_ver="$(${ban_ubuscmd} -S call rpc-sys packagelist 2>/dev/null | jsonfilter -ql1 -e '@.packages.banip')"
+       ban_ver="$(${ban_ubuscmd} -S call rpc-sys packagelist '{ "all": true }' 2>/dev/null | jsonfilter -ql1 -e '@.packages.banip')"
        ban_sysver="$(${ban_ubuscmd} -S call system board 2>/dev/null | jsonfilter -ql1 -e '@.model' -e '@.release.description' |
                "${ban_awkcmd}" 'BEGIN{RS="";FS="\n"}{printf "%s, %s",$1,$2}')"
        if [ -z "${ban_cores}" ]; then
@@ -167,8 +169,15 @@ f_log() {
                fi
        fi
        if [ "${class}" = "err" ]; then
-               f_genstatus "error"
+               "${ban_nftcmd}" delete table inet banIP >/dev/null 2>&1
+               if [ "${ban_enabled}" = "1" ]; then
+                       f_genstatus "error"
+                       [ "${ban_mailnotification}" = "1" ] && [ -n "${ban_mailreceiver}" ] && [ -x "${ban_mailcmd}" ] && f_mail
+               else
+                       f_genstatus "disabled"
+               fi
                f_rmdir "${ban_tmpdir}"
+               f_rmpid
                rm -rf "${ban_lock}"
                exit 1
        fi
@@ -351,10 +360,10 @@ f_getif() {
 # get wan devices
 #
 f_getdev() {
-       local dev iface update="0" cnt="0" cnt_max="10"
+       local dev iface update="0" cnt="0" cnt_max="30"
 
        if [ "${ban_autodetect}" = "1" ]; then
-               while [ -z "${ban_dev}" ] && [ "${cnt}" -le "${cnt_max}" ]; do
+               while [ "${cnt}" -lt "${cnt_max}" ] && [ -z "${ban_dev}" ]; do
                        network_flush_cache
                        for iface in ${ban_ifv4} ${ban_ifv6}; do
                                network_get_device dev "${iface}"
@@ -418,7 +427,7 @@ f_getsub() {
 f_getelements() {
        local file="${1}"
 
-       [ -s "${file}" ] && printf "%s" "elements={ $(cat "${file}") };"
+       [ -s "${file}" ] && printf "%s" "elements={ $(cat "${file}" 2>/dev/null) };"
 }
 
 # build initial nft file with base table, chains and rules
@@ -857,7 +866,6 @@ f_genstatus() {
                fi
                runtime="action: ${ban_action:-"-"}, duration: ${duration:-"-"}, date: $(date "+%Y-%m-%d %H:%M:%S")"
        fi
-       f_system
        [ ${ban_splitsize:-"0"} -gt "0" ] && split="1"
 
        : >"${ban_rtfile}"
@@ -921,7 +929,7 @@ f_genstatus() {
 # get status information
 #
 f_getstatus() {
-       local key keylist type value index_key1 index_key2 index_value1 index_value2 actual="${1}"
+       local key keylist type value index_key1 index_key2 index_value1 index_value2
 
        [ -z "${ban_dev}" ] && f_conf
        json_load_file "${ban_rtfile}" >/dev/null 2>&1
@@ -968,8 +976,6 @@ f_getstatus() {
                                done
                                json_select ".."
                        fi
-                       value="$(printf "%s" "${value}" |
-                               awk '{NR=1;max=118;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max)}else{printf"%-24s%s\n","",substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
                        printf "  + %-17s : %s\n" "${key}" "${value:-"-"}"
                done
        else
@@ -980,7 +986,7 @@ f_getstatus() {
 # domain lookup
 #
 f_lookup() {
-       local cnt list domain lookup ip start_time end_time duration cnt_domain="0" cnt_ip="0" feed="${1}"
+       local cnt list domain lookup ip elementsv4 elementsv6 start_time end_time duration cnt_domain="0" cnt_ip="0" feed="${1}"
 
        start_time="$(date "+%s")"
        if [ "${feed}" = "allowlist" ]; then
@@ -997,32 +1003,36 @@ f_lookup() {
                        else
                                if { [ "${feed}" = "allowlist" ] && ! "${ban_grepcmd}" -q "^${ip}" "${ban_allowlist}"; } ||
                                        { [ "${feed}" = "blocklist" ] && ! "${ban_grepcmd}" -q "^${ip}" "${ban_blocklist}"; }; then
-                                       cnt_ip="$((cnt_ip + 1))"
                                        if [ "${ip##*:}" = "${ip}" ]; then
-                                               if ! "${ban_nftcmd}" add element inet banIP "${feed}v4" "{ ${ip} }" >/dev/null 2>&1; then
-                                                       f_log "info" "failed to add IP '${ip}' (${domain}) to ${feed}v4 set"
-                                                       continue
-                                               fi
+                                               elementsv4="${elementsv4} ${ip},"
                                        else
-                                               if ! "${ban_nftcmd}" add element inet banIP "${feed}v6" "{ ${ip} }" >/dev/null 2>&1; then
-                                                       f_log "info" "failed to add IP '${ip}' (${domain}) to ${feed}v6 set"
-                                                       continue
-                                               fi
+                                               elementsv6="${elementsv6} ${ip},"
                                        fi
                                        if [ "${feed}" = "allowlist" ] && [ "${ban_autoallowlist}" = "1" ]; then
                                                printf "%-42s%s\n" "${ip}" "# '${domain}' added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_allowlist}"
                                        elif [ "${feed}" = "blocklist" ] && [ "${ban_autoblocklist}" = "1" ]; then
                                                printf "%-42s%s\n" "${ip}" "# '${domain}' added on $(date "+%Y-%m-%d %H:%M:%S")" >>"${ban_blocklist}"
                                        fi
+                                       cnt_ip="$((cnt_ip + 1))"
                                fi
                        fi
                done
                cnt_domain="$((cnt_domain + 1))"
        done
+       if [ -n "${elementsv4}" ]; then
+               if ! "${ban_nftcmd}" add element inet banIP "${feed}v4" "{ ${elementsv4} }" >/dev/null 2>&1; then
+                       f_log "info" "failed to add lookup file to ${feed}v4 set"
+               fi
+       fi
+       if [ -n "${elementsv6}" ]; then
+               if ! "${ban_nftcmd}" add element inet banIP "${feed}v6" "{ ${elementsv6} }" >/dev/null 2>&1; then
+                       f_log "info" "failed to add lookup file to ${feed}v6 set"
+               fi
+       fi
        end_time="$(date "+%s")"
        duration="$(((end_time - start_time) / 60))m $(((end_time - start_time) % 60))s"
 
-       f_log "debug" "f_lookup  ::: name: ${feed}, cnt_domain: ${cnt_domain}, cnt_ip: ${cnt_ip}, duration: ${duration}"
+       f_log "info" "Lookup summary for the local ${feed}: Domains processed: ${cnt_domain}, IPs added: ${cnt_ip}, Duration: ${duration}"
 }
 
 # table statistics
@@ -1182,18 +1192,16 @@ f_report() {
                        [ -s "${report_jsn}" ] && cat "${report_jsn}"
                        ;;
                "mail")
-                       [ -x "${ban_mailcmd}" ] && f_mail
+                       [ -n "${ban_mailreceiver}" ] && [ -x "${ban_mailcmd}" ] && f_mail
                        ;;
        esac
+       rm -f "${report_txt}"
 }
 
 # set search
 #
 f_search() {
-       local table_sets ip proto run_search search="${1}"
-
-       f_system
-       run_search="/var/run/banIP.search"
+       local set table_sets ip proto run_search hold cnt search="${1}"
 
        if [ -n "${search}" ]; then
                ip="$(printf "%s" "${search}" | "${ban_awkcmd}" 'BEGIN{RS="(([0-9]{1,3}\\.){3}[0-9]{1,3})+"}{printf "%s",RT}')"
@@ -1210,13 +1218,15 @@ f_search() {
                return
        fi
        printf "%s\n%s\n%s\n" ":::" "::: banIP Search" ":::"
-       printf "%s\n" "    Looking for IP '${ip}' on $(date "+%Y-%m-%d %H:%M:%S")"
-       printf "%s\n" "    ---"
-       cnt=1
+       printf "    %s\n" "Looking for IP '${ip}' on $(date "+%Y-%m-%d %H:%M:%S")"
+       printf "    %s\n" "---"
+       cnt="1"
+       run_search="/var/run/banIP.search"
        for set in ${table_sets}; do
+               [ -f "${run_search}" ] && break
                (
                        if "${ban_nftcmd}" get element inet banIP "${set}" "{ ${ip} }" >/dev/null 2>&1; then
-                               printf "%s\n" "    IP found in Set '${set}'"
+                               printf "    %s\n" "IP found in Set '${set}'"
                                : >"${run_search}"
                        fi
                ) &
@@ -1225,11 +1235,8 @@ f_search() {
                cnt="$((cnt + 1))"
        done
        wait
-       if [ ! -f "${run_search}" ]; then
-               printf "%s\n" "    IP not found"
-       else
-               rm -f "${run_search}"
-       fi
+       [ ! -f "${run_search}" ] && printf "    %s\n" "IP not found"
+       rm -f "${run_search}"
 }
 
 # set survey
@@ -1237,17 +1244,15 @@ f_search() {
 f_survey() {
        local set_elements set="${1}"
 
-       f_system
-       [ -n "${set}" ] && set_elements="$("${ban_nftcmd}" -j list set inet banIP "${set}" 2>/dev/null | jsonfilter -qe '@.nftables[*].set.elem[*]')"
-
-       if [ -z "${set}" ] || [ -z "${set_elements}" ]; then
+       if [ -z "${set}" ]; then
                printf "%s\n%s\n%s\n" ":::" "::: no valid survey input" ":::"
                return
        fi
+       [ -n "${set}" ] && set_elements="$("${ban_nftcmd}" -j list set inet banIP "${set}" 2>/dev/null | jsonfilter -qe '@.nftables[*].set.elem[*]')"
        printf "%s\n%s\n%s\n" ":::" "::: banIP Survey" ":::"
-       printf "%s\n" "    List the elements of Set '${set}' on $(date "+%Y-%m-%d %H:%M:%S")"
-       printf "%s\n" "    ---"
-       printf "%s\n" "${set_elements}"
+       printf "    %s\n" "List the elements of Set '${set}' on $(date "+%Y-%m-%d %H:%M:%S")"
+       printf "    %s\n" "---"
+       [ -n "${set_elements}" ] && printf "%s\n" "${set_elements}" || printf "    %s\n" "empty set"
 }
 
 # send status mails
@@ -1257,11 +1262,12 @@ f_mail() {
 
        # load mail template
        #
-       [ ! -r "${ban_mailtemplate}" ] && f_log "err" "the mail template is missing"
-       . "${ban_mailtemplate}"
-
-       [ -z "${ban_mailreceiver}" ] && f_log "err" "the option 'ban_mailreceiver' is missing"
-       [ -z "${mail_text}" ] && f_log "err" "the 'mail_text' is empty"
+       if [ -r "${ban_mailtemplate}" ]; then
+               . "${ban_mailtemplate}"
+       else
+               f_log "info" "the mail template is missing"
+       fi
+       [ -z "${mail_text}" ] && f_log "info" "the 'mail_text' template variable is empty"
        [ "${ban_debug}" = "1" ] && msmtp_debug="--debug"
 
        # send mail
@@ -1273,11 +1279,12 @@ f_mail() {
                f_log "info" "failed to send status mail (${?})"
        fi
 
-       f_log "debug" "f_mail    ::: template: ${ban_mailtemplate}, profile: ${ban_mailprofile}, receiver: ${ban_mailreceiver}, rc: ${?}"
+       f_log "debug" "f_mail    ::: notification: ${ban_mailnotification}, template: ${ban_mailtemplate}, profile: ${ban_mailprofile}, receiver: ${ban_mailreceiver}, rc: ${?}"
 }
 
 # check banIP availability and initial sourcing
 #
+f_system
 if [ "${ban_action}" != "stop" ]; then
        if [ -r "/lib/functions.sh" ] && [ -r "/lib/functions/network.sh" ] && [ -r "/usr/share/libubox/jshn.sh" ]; then
                . "/lib/functions.sh"
index 94c1d47edd70f3d3c3fe7ca737c1e00b3339515b..10f0b974781dad83eca74cac881f68896f48c5d8 100755 (executable)
@@ -29,12 +29,12 @@ f_mkfile "${ban_allowlist}"
 #
 if [ "${ban_action}" != "reload" ]; then
        if [ -x "${ban_fw4cmd}" ]; then
-               cnt=0
-               while [ "${cnt}" -lt "10" ] && ! /etc/init.d/firewall status | grep -q "^active"; do
+               cnt="0"
+               while [ "${cnt}" -lt "30" ] && ! /etc/init.d/firewall status >/dev/null 2>&1; do
                        cnt="$((cnt + 1))"
                        sleep 1
                done
-               if ! /etc/init.d/firewall status | grep -q "^active"; then
+               if ! /etc/init.d/firewall status >/dev/null 2>&1; then
                        f_log "err" "nft based firewall/fw4 not functional"
                fi
        else
@@ -124,24 +124,34 @@ for feed in allowlist ${ban_feed} blocklist; do
        fi
 done
 wait
+f_rmset
+f_rmdir "${ban_tmpdir}"
+f_genstatus "active"
+f_log "info" "finished banIP download processes"
 
 # start domain lookup
 #
-f_log "info" "start detached banIP domain lookup"
-(f_lookup "allowlist") &
-hold="$((cnt % ban_cores))"
-[ "${hold}" = "0" ] && wait
-(f_lookup "blocklist") &
+f_log "info" "start banIP domain lookup"
+cnt="1"
+for list in allowlist blocklist; do
+       (f_lookup "${list}") &
+       hold="$((cnt % ban_cores))"
+       [ "${hold}" = "0" ] && wait
+       cnt="$((cnt + 1))"
+done
+wait
 
-# tidy up
+# end processing
 #
-f_rmset
-f_rmdir "${ban_tmpdir}"
-f_genstatus "active"
-f_log "info" "finished banIP download processes"
+if [ "${ban_mailnotification}" = "1" ] && [ -n "${ban_mailreceiver}" ] && [ -x "${ban_mailcmd}" ]; then
+       (
+               sleep ${ban_triggerdelay}
+               f_mail
+       ) &
+fi
 rm -rf "${ban_lock}"
 
-# start log service
+# start detached log service
 #
 if [ -x "${ban_logreadcmd}" ] && [ -n "${ban_logterm%%??}" ]; then
        f_log "info" "start detached banIP log service"
@@ -184,7 +194,7 @@ if [ -x "${ban_logreadcmd}" ] && [ -n "${ban_logterm%%??}" ]; then
                        fi
                done
 
-# start no-op service loop
+# start detached no-op service loop
 #
 else
        f_log "info" "start detached no-op banIP service (logterms are missing)"
index 92aa6c15c3cdd006d04a5a53b5ecbd7406452b69..42387630296747d6483b392d2d938e0c66941943 100644 (file)
@@ -1,5 +1,5 @@
-tw;Taiwan
 af;Afghanistan
+ax;Åland Islands
 al;Albania
 dz;Algeria
 as;American Samoa
@@ -25,7 +25,6 @@ bj;Benin
 bm;Bermuda
 bt;Bhutan
 bo;Bolivia
-bq;Caribbean Netherlands
 ba;Bosnia
 bw;Botswana
 bv;Bouvet Island
@@ -36,32 +35,30 @@ bn;Brunei
 bg;Bulgaria
 bf;Burkina Faso
 bi;Burundi
-cv;Cape Verde
 kh;Cambodia
 cm;Cameroon
 ca;Canada
+cv;Cape Verde
+bq;Caribbean Netherlands
 ky;Cayman Islands
 cf;Central African Republic
 td;Chad
 cl;Chile
 cn;China
-hk;Hong Kong
-mo;Macau
 cx;Christmas Island
 cc;Cocos (Keeling) Islands
 co;Colombia
 km;Comoros
 cg;Congo - Brazzaville
+cd;Congo - Kinshasa
 ck;Cook Islands
 cr;Costa Rica
+ci;Côte d’Ivoire
 hr;Croatia
 cu;Cuba
 cw;Curaçao
 cy;Cyprus
 cz;Czechia
-ci;Côte d’Ivoire
-kp;North Korea
-cd;Congo - Kinshasa
 dk;Denmark
 dj;Djibouti
 dm;Dominica
@@ -100,8 +97,8 @@ gw;Guinea-Bissau
 gy;Guyana
 ht;Haiti
 hm;Heard & McDonald Islands
-va;Vatican City
 hn;Honduras
+hk;Hong Kong
 hu;Hungary
 is;Iceland
 in;India
@@ -130,6 +127,7 @@ ly;Libya
 li;Liechtenstein
 lt;Lithuania
 lu;Luxembourg
+mo;Macau
 mg;Madagascar
 mw;Malawi
 my;Malaysia
@@ -143,6 +141,7 @@ mu;Mauritius
 yt;Mayotte
 mx;Mexico
 fm;Micronesia
+md;Moldova
 mc;Monaco
 mn;Mongolia
 me;Montenegro
@@ -162,10 +161,13 @@ ng;Nigeria
 nu;Niue
 nf;Norfolk Island
 mp;Northern Mariana Islands
+kp;North Korea
+mk;North Macedonia
 no;Norway
 om;Oman
 pk;Pakistan
 pw;Palau
+ps;Palestine
 pa;Panama
 pg;Papua New Guinea
 py;Paraguay
@@ -176,19 +178,10 @@ pl;Poland
 pt;Portugal
 pr;Puerto Rico
 qa;Qatar
-kr;South Korea
-md;Moldova
+re;Réunion
 ro;Romania
 ru;Russia
 rw;Rwanda
-re;Réunion
-bl;St. Barthélemy
-sh;St. Helena
-kn;St. Kitts & Nevis
-lc;St. Lucia
-mf;St. Martin
-pm;St. Pierre & Miquelon
-vc;St. Vincent & Grenadines
 ws;Samoa
 sm;San Marino
 st;São Tomé & Príncipe
@@ -205,19 +198,27 @@ sb;Solomon Islands
 so;Somalia
 za;South Africa
 gs;South Georgia & South Sandwich Islands
+kr;South Korea
 ss;South Sudan
 es;Spain
 lk;Sri Lanka
-ps;Palestine
+bl;St. Barthélemy
+sh;St. Helena
+kn;St. Kitts & Nevis
+lc;St. Lucia
+mf;St. Martin
+pm;St. Pierre & Miquelon
+vc;St. Vincent & Grenadines
 sd;Sudan
 sr;Suriname
 sj;Svalbard & Jan Mayen
 se;Sweden
 ch;Switzerland
 sy;Syria
+tw;Taiwan
 tj;Tajikistan
+tz;Tanzania
 th;Thailand
-mk;North Macedonia
 tl;Timor-Leste
 tg;Togo
 tk;Tokelau
@@ -232,13 +233,13 @@ ug;Uganda
 ua;Ukraine
 ae;United Arab Emirates
 gb;United Kingdom
-tz;Tanzania
-um;U.S. Outlying Islands
-vi;U.S. Virgin Islands
 us;United States
 uy;Uruguay
+um;U.S. Outlying Islands
+vi;U.S. Virgin Islands
 uz;Uzbekistan
 vu;Vanuatu
+va;Vatican City
 ve;Venezuela
 vn;Vietnam
 wf;Wallis & Futuna
@@ -246,4 +247,3 @@ eh;Western Sahara
 ye;Yemen
 zm;Zambia
 zw;Zimbabwe
-ax;Åland Islands
index c56004279cfd5dc5656131858d92a55df9d33192..6822a1bcb26504ee57ad34b291c5b3c5e0b251da 100755 (executable)
@@ -12,6 +12,7 @@ USE_PROCD=1
 extra_command "report" "[text|json|mail] Print banIP related set statistics"
 extra_command "search" "[<IPv4 address>|<IPv6 address>] Check if an element exists in a banIP set"
 extra_command "survey" "[<set name>] List all elements of a given banIP set"
+extra_command "lookup" "Lookup the IPs of domain names in the local lists and update them"
 
 ban_init="/etc/init.d/banip"
 ban_service="/usr/bin/banip-service.sh"
@@ -19,10 +20,11 @@ ban_funlib="/usr/lib/banip-functions.sh"
 ban_pidfile="/var/run/banip.pid"
 ban_lock="/var/run/banip.lock"
 
-[ "${action}" = "stop" ] && ! /etc/init.d/banip running && exit 0
-[ ! -r "${ban_funlib}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "stop" ] || [ "${action}" = "report" ] || [ "${action}" = "search" ] || [ "${action}" = "survey" ] || [ "${action}" = "status" ]; } && exit 1
-[ -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ]; } && exit 1
-[ ! -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ]; } && mkdir -p "${ban_lock}"
+[ "${action}" = "boot" ] && /etc/init.d/banip running && exit 0
+{ [ "${action}" = "stop" ] || [ "${action}" = "lookup" ]; } && ! /etc/init.d/banip running && exit 0
+[ ! -r "${ban_funlib}" ] && [ "${action}" != "boot" ] && exit 1
+[ -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "lookup" ]; } && exit 1
+[ ! -d "${ban_lock}" ] && { [ "${action}" = "start" ] || [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "lookup" ]; } && mkdir -p "${ban_lock}"
 
 boot() {
        : >"${ban_pidfile}"
@@ -60,6 +62,7 @@ stop_service() {
        "${ban_nftcmd}" delete table inet banIP >/dev/null 2>&1
        f_genstatus "stopped"
        f_rmpid
+       [ "${action}" = "stop" ] && rm -rf "${ban_lock}"
 }
 
 restart() {
@@ -72,10 +75,8 @@ status() {
 }
 
 status_service() {
-       local actual="${1}"
-
        [ -z "$(command -v "f_system")" ] && . "${ban_funlib}"
-       [ -n "${actual}" ] && f_actual || f_getstatus
+       f_getstatus
 }
 
 report() {
@@ -93,15 +94,30 @@ survey() {
        f_survey "${1}"
 }
 
+lookup() {
+       local list hold cnt="1"
+
+       [ -z "$(command -v "f_system")" ] && . "${ban_funlib}"
+       for list in allowlist blocklist; do
+               (f_lookup "${list}") &
+               hold="$((cnt % ban_cores))"
+               [ "${hold}" = "0" ] && wait
+               cnt="$((cnt + 1))"
+       done
+       wait
+       rm -rf "${ban_lock}"
+}
+
 service_triggers() {
-       local iface trigger delay
+       local iface trigger trigger_action delay
 
        trigger="$(uci_get banip global ban_trigger)"
+       trigger_action="$(uci_get banip global ban_triggeraction "start")"
        delay="$(uci_get banip global ban_triggerdelay "10")"
        PROCD_RELOAD_DELAY=$((delay * 1000))
 
        for iface in ${trigger}; do
-               procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" "start"
+               procd_add_interface_trigger "interface.*.up" "${iface}" "${ban_init}" "${trigger_action}"
        done
        procd_add_reload_trigger "banip"
 }
index 0474eb34499b1b0df30abc90effd997f21c6952b..f6bd5214c2948049146335476b1e7d7a073dc1b6 100644 (file)
@@ -6,7 +6,7 @@
 #
 local banip_info report_info log_info system_info mail_text
 
-banip_info="$(/etc/init.d/banip status 2>/dev/null)"
+banip_info="$(/etc/init.d/banip status 2>/dev/null | awk '{NR=1;max=140;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max)}else{print substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
 report_info="$(cat ${ban_reportdir}/ban_report.txt 2>/dev/null)"
 log_info="$("${ban_logreadcmd}" -l 100 -e "banIP/" 2>/dev/null | awk '{NR=1;max=140;if(length($0)>max+1)while($0){if(NR==1){print substr($0,1,max)}else{print substr($0,1,max)}{$0=substr($0,max+1);NR=NR+1}}else print}')"
 system_info="$(
@@ -14,11 +14,17 @@ system_info="$(
        ubus call system board | awk 'BEGIN{FS="[{}\"]"}{if($2=="kernel"||$2=="hostname"||$2=="system"||$2=="model"||$2=="description")printf "  + %-12s: %s\n",$2,$4}'
 )"
 
-# mail body
+# content header
 #
 mail_text="$(printf "%s\n" "<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>")"
+
+# content body
+#
 mail_text="$(printf "%s\n" "${mail_text}\n<strong>++\n++ System Information ++\n++</strong>\n${system_info:-"-"}")"
 mail_text="$(printf "%s\n" "${mail_text}\n\n<strong>++\n++ banIP Status ++\n++</strong>\n${banip_info:-"-"}")"
-mail_text="$(printf "%s\n" "${mail_text}\n\n<strong>++\n++ banIP Report ++\n++</strong>\n${report_info:-"-"}")"
-mail_text="$(printf "%s\n" "${mail_text}\n\n<strong>++\n++ Logfile Information ++\n++</strong>\n${log_info}")"
+[ -n "${report_info}" ] && mail_text="$(printf "%s\n" "${mail_text}\n\n<strong>++\n++ banIP Report ++\n++</strong>\n${report_info}")"
+[ -n "${log_info}" ] && mail_text="$(printf "%s\n" "${mail_text}\n\n<strong>++\n++ Logfile Information ++\n++</strong>\n${log_info}")"
+
+# content footer
+#
 mail_text="$(printf "%s\n" "${mail_text}</pre></body></html>")"
index 97c2608eb572ca9a7a5b5a637f44bca392f91add..6606f931f44d9bca82082dc64c479f3f24c78a75 100644 (file)
@@ -1,20 +1,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=beanstalkd
-PKG_VERSION:=1.9
-PKG_RELEASE:=2
-
-# for now, build from latest commit since releases are infrequent and
-# useful fixes trickle in...
-PKG_SOURCE_URL:=https://github.com/kr/beanstalkd.git
-PKG_SOURCE_VERSION:=b7b4a6a14b7e8d096dc8cbc255b23be17a228cbb
-
-PKG_SOURCE_PROTO:=git
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=6d5155ab347b731640495b1f0df6a4a849e84194d2ef0c2ec6af3879ee1aca2c
+PKG_VERSION:=1.13
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://github.com/beanstalkd/$(PKG_NAME)/archive/refs/tags
+PKG_SOURCE_VERSION:=1.13
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_URL_FILE:=v$(PKG_SOURCE_VERSION).tar.gz
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-v$(PKG_VERSION)
-PKG_HASH:=6d5155ab347b731640495b1f0df6a4a849e84194d2ef0c2ec6af3879ee1aca2c
+PKG_HASH:=26292dcdc0a7011d2f8ad968612f2cd8b2ef07687224876015399ae85e9e5263
 
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
 PKG_LICENSE:=MIT
diff --git a/net/beanstalkd/patches/900-makefile.patch b/net/beanstalkd/patches/900-makefile.patch
deleted file mode 100644 (file)
index 3cac717..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -1,17 +1,16 @@
--PREFIX=/usr/local
--BINDIR=$(DESTDIR)$(PREFIX)/bin
--CFLAGS=-Wall -Werror\
--      -Wformat=2\
--      -g\
--
--LDFLAGS=
--OS=$(shell uname|tr A-Z a-z)
--INSTALL=install
--
--VERS=$(shell ./vers.sh)
--TARG=beanstalkd
--MOFILE=main.o
--OFILES=\
-+PREFIX ?= /usr/local
-+BINDIR = $(DESTDIR)$(PREFIX)/bin
-+CFLAGS += -Wall -Werror -Wformat=2 -g
-+LDFLAGS += 
-+LDLIBS ?= 
-+
-+OS ?= $(shell uname | tr 'A-Z' 'a-z')
-+INSTALL ?= install
-+
-+VERS = $(shell ./vers.sh)
-+TARG = beanstalkd
-+MOFILE = main.o
-+OFILES = \
-       $(OS).o\
-       conn.o\
-       file.o\
-@@ -29,52 +28,44 @@ OFILES=\
-       vers.o\
-       walg.o\
--TOFILES=\
-+TOFILES = \
-       testheap.o\
-       testjobs.o\
-       testserv.o\
-       testutil.o\
--HFILES=\
-+HFILES = \
-       dat.h\
-       sd-daemon.h\
- ifeq ($(OS),linux)
--
--LDLIBS=\
--      -lrt\
--
-+   LDLIBS += -lrt
- endif
--CLEANFILES=\
-+CLEANFILES = \
-       vers.c\
--.PHONY: all
- all: $(TARG)
- $(TARG): $(OFILES) $(MOFILE)
-       $(LINK.o) -o $@ $^ $(LDLIBS)
--.PHONY: install
- install: $(BINDIR)/$(TARG)
- $(BINDIR)/%: %
-       $(INSTALL) -d $(dir $@)
-       $(INSTALL) $< $@
--CLEANFILES:=$(CLEANFILES) $(TARG)
-+CLEANFILES := $(CLEANFILES) $(TARG)
- $(OFILES) $(MOFILE): $(HFILES)
--.PHONY: clean
- clean:
-       rm -f *.o $(CLEANFILES)
--.PHONY: check
- check: ct/_ctcheck
-       ct/_ctcheck
--.PHONY: bench
- bench: ct/_ctcheck
-       ct/_ctcheck -b
-@@ -88,11 +79,8 @@ ct/ct.o ct/_ctcheck.o: ct/ct.h ct/intern
- $(TOFILES): $(HFILES) ct/ct.h
--CLEANFILES:=$(CLEANFILES) ct/_* ct/*.o
-+CLEANFILES += ct/_* ct/*.o
--ifneq ($(shell ./verc.sh),$(shell cat vers.c 2>/dev/null))
--.PHONY: vers.c
--endif
- vers.c:
-       ./verc.sh >vers.c
-@@ -100,3 +88,9 @@ doc/beanstalkd.1 doc/beanstalkd.1.html:
-       ronn $<
- freebsd.o: darwin.c
-+
-+.PHONY: all install clean check bench
-+
-+ifneq ($(shell ./verc.sh),$(shell cat vers.c 2>/dev/null))
-+.PHONY: vers.c
-+endif
diff --git a/net/beanstalkd/patches/901-fix-headers.patch b/net/beanstalkd/patches/901-fix-headers.patch
deleted file mode 100644 (file)
index 3c97abc..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/sd-daemon.c
-+++ b/sd-daemon.c
-@@ -32,7 +32,7 @@
- #include <sys/stat.h>
- #include <sys/socket.h>
- #include <sys/un.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <netinet/in.h>
- #include <stdlib.h>
- #include <errno.h>
diff --git a/net/beanstalkd/patches/902-replace-posix_fallocate.patch b/net/beanstalkd/patches/902-replace-posix_fallocate.patch
deleted file mode 100644 (file)
index 3371ff4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/linux.c
-+++ b/linux.c
-@@ -1,4 +1,6 @@
- #define _XOPEN_SOURCE 600
-+#include <unistd.h>
-+#include <sys/types.h>
- #include <stdint.h>
- #include <fcntl.h>
- #include <stdlib.h>
-@@ -19,7 +21,7 @@ static int epfd;
- int
- rawfalloc(int fd, int len)
- {
--    return posix_fallocate(fd, 0, len);
-+    return ftruncate(fd, len);
- }
diff --git a/net/beanstalkd/patches/903-fix-size_t-format-spec b/net/beanstalkd/patches/903-fix-size_t-format-spec
new file mode 100644 (file)
index 0000000..01043a6
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/net.c
++++ b/net.c
+@@ -158,7 +158,7 @@ make_unix_socket(char *path)
+     memset(&addr, 0, sizeof(struct sockaddr_un));
+     addr.sun_family = AF_UNIX;
+     if (strlen(path) > maxlen) {
+-        warnx("socket path %s is too long (%ld characters), where maximum allowed is %ld",
++        warnx("socket path %s is too long (%zu characters), where maximum allowed is %zu",
+               path, strlen(path), maxlen);
+         return -1;
+     }
index 3f573ff2357ba90d48d2a7c77e86179a4d2bafda..fb2c2f1ecfcc6e2e63099c57ede35b0649401e17 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cloudflared
-PKG_VERSION:=2023.3.0
+PKG_VERSION:=2023.3.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/cloudflare/cloudflared/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=90fad1f6eb59689e06d09837c5ec9a3e7e3d177fea15190027f60c5b9e7950be
+PKG_HASH:=cdd0f02fc4170842c8210db2b700bad88d8a7b5d00fb8f7336073737f11fc718
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
index 5e7e554d7b41c3b32ae4a9172f8edc8877ab348e..24b7b9627188437e986c3015765c7e369019fe2c 100644 (file)
@@ -139,7 +139,7 @@ config LIBCURL_ZSTD
 
 config LIBCURL_UNIX_SOCKETS
        bool "Enable unix domain socket support"
-       default n
+       default y
        help
                Enable HTTP over unix domain sockets.
                To use this with the curl command line, you specify the socket path to the new --unix-domain option.
index 94dd07ff67621b1f4320b4d3a6b6e63b15e30e2d..c3ba55ac0e3a5a6b75a6720b83dd2e0e581ac4c8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/nls.mk
 
 PKG_NAME:=curl
-PKG_VERSION:=7.88.1
+PKG_VERSION:=8.0.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://github.com/curl/curl/releases/download/curl-$(subst .,_,
        https://dl.uxnr.de/mirror/curl/ \
        https://curl.askapache.com/download/ \
        https://curl.se/download/
-PKG_HASH:=1dae31b2a7c1fe269de99c0c31bb488346aab3459b5ffca909d6938249ae415f
+PKG_HASH:=0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index b5d6d184466df6599b4e294099a8f92a36749fb8..f073bcce3f2412c08b7753643cd146ebc34f6a84 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dmapd
-PKG_VERSION:=0.0.91
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=0.0.95
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.flyn.org/projects/dmapd
-PKG_HASH:=494647918e15ef1b6b9aa1e3bff35fad26d0c17e13c65ab87a7b0d3f8ceced02
+PKG_HASH:=c2c387518ee012e2f2613770c1e7e7eeb5e58fb4605ed645f1db2aced1585a52
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
index 522e498124d935fba1fc987568a1ec3bd3f91c21..d4da7b21b8ca9cfbf6ef9eb950262e54774f04a9 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnslookup
-PKG_VERSION:=1.8.1
+PKG_VERSION:=1.9.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ameshkov/dnslookup/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=51b9cbc626e091eb7a98bc326ad026f36d95f8b5917f71f13011466fcdddb3f9
+PKG_HASH:=ac108b80f5d7b510ce1fdb1880470d177c5b89cf228c34302442527cf68bb76e
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=MIT
index faf495f92e22d7ae363b658578d43e696e543e64..2e5724ed96f984a01669875419b388a5dcb7d1bf 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsproxy
-PKG_VERSION:=0.48.0
+PKG_VERSION:=0.48.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b63d10b0f7d4ede68aae9bda9ef306a0673c8ca97ef9d57b838edb53e0023f8b
+PKG_HASH:=bc5f5e6d812293c13b7b6d42eae72a82231d9f332af1d2947c37dbdbf663abf3
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=Apache-2.0
index 2744a2acca91fc4bb1472a0e5f75107b9ea0bd93..c49da8e13fd565f5fc0c8bb02e217bb24cbfa056 100644 (file)
@@ -33,7 +33,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_GENSIO_TCL \
        CONFIG_GENSIO_SSHD
 
-PKG_BUILD_DEPENDS:=PACKAGE_python3-gensio:swig
+PKG_BUILD_DEPENDS:=PACKAGE_python3-gensio:swig/host
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python3-package.mk
@@ -129,10 +129,11 @@ endef
 
 define Package/python3-gensio
 $(call Package/gensio/Default)
-  TITLE+= (Python3-bindings)
+  TITLE+= (Python bindings)
   SECTION:=lang
   CATEGORY:=Languages
-  DEPENDS:=+PACKAGE_python3-gensio:python3-light +libgensio
+  SUBMENU:=Python
+  DEPENDS:=+PACKAGE_python3-gensio:python3-light +libgensiocpp
 endef
 
 define Package/python3-gensio/description
index bf84d48de5f77b2d29191498d18c7050beec6342..17f89348092ad0ea279cb005a018b7d0d8ac8a96 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=2.6.9
+PKG_VERSION:=2.6.12
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.haproxy.org/download/2.6/src
-PKG_HASH:=f01a1c5f465dc1b5cd175d0b28b98beb4dfe82b5b5b63ddcc68d1df433641701
+PKG_HASH:=58f9edb26bf3288f4b502658399281cc5d6478468bd178eafe579c8f41895854
 
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
                Christian Lachner <gladiac@gmail.com>
index 8c17d3e4f83fa1127d2c4ebeab6530133bd78e03..c5f8c7031fc2e58965657c41294fc0f4d83a369b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 CLONEURL=https://git.haproxy.org/git/haproxy-2.6.git
-BASE_TAG=v2.6.9
+BASE_TAG=v2.6.12
 TMP_REPODIR=tmprepo
 PATCHESDIR=patches
 
index 4f79967acfe60a47fcdad9140c4c5f5ce10553bb..7c70475b3768c1407deb62f6843ee2a52b0f62ae 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=natmap
-PKG_VERSION:=20221225
+PKG_VERSION:=20230322
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/heiher/natmap/releases/download/$(PKG_VERSION)
-PKG_HASH:=cc19a5b876fd75424619ae90aa6b0414a438c1f6f55537b9b28f1c23d925f6ff
+PKG_HASH:=d1abe36eb4deac725e2d20674590fc726b8c79d21b053b40059b093592fd8b8a
 
 PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
 PKG_LICENSE:=MIT
index 01328c1bbc60f3b55d2e747a7ae3e07838299e1f..6e8862b3341432c181e0e18879ccacfbdd31af79 100644 (file)
@@ -4,7 +4,7 @@ config natmap
        option udp_mode '1'
        option interface ''
        option interval ''
-       option stun_server 'stun.stunprotocol.org'
+       option stun_server 'stunserver.stunprotocol.org'
        option http_server 'example.com'
        option port '8080'
        option forward_target ''
index 158871041cd619a8ee7c26ceca8e89ccfc8c1584..daecb73c9a66f67de713c697cbf90b467099daf5 100644 (file)
@@ -200,14 +200,14 @@ snmpd_extend_add() {
 }
 
 snmpd_disk_add() {
-        local cfg="$1"
-        local disk='disk'
-
-        config_get partition "$cfg" partition
-        [ -n "$partition" ] || return 0
-        config_get size "$cfg" size
-        [ -n "$size" ] || return 0
-        echo "$disk $partition $size" >> $CONFIGFILE
+       local cfg="$1"
+       local disk='disk'
+
+       config_get partition "$cfg" partition
+       [ -n "$partition" ] || return 0
+       config_get size "$cfg" size
+       [ -n "$size" ] || return 0
+       echo "$disk $partition $size" >> $CONFIGFILE
 }
 
 snmpd_engineid_add() {
@@ -336,7 +336,7 @@ start_service() {
        procd_close_instance
 }
 
-stop_service() {
+service_stopped() {
        [ -f "$CONFIGFILE" ] || return
        rm -f "$CONFIGFILE"
        procd_set_config_changed firewall
index 2820be2bcafb896357216490c930ffa062fce05f..44defd3545527bd720ecb49e307832d849dbfbb6 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netbird
-PKG_VERSION:=0.14.3
+PKG_VERSION:=0.14.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/netbirdio/netbird/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=ce56a0419cea1296f4b61d1ecb04e5f812805538e17f5211c5f05ed2b5b98dbc
+PKG_HASH:=2ea6be9c50a5ac241fbae35934c9c710697de39e8a0393f8e1800285a7904d0d
 
 PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
index 60e7b3b1221bc86a7b13bb15f215212973633adc..9acbec99fc7abd06d6009e81263c679024025aeb 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=onionshare-cli
 PKG_VERSION:=2.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=onionshare-cli
 PYPI_SOURCE_NAME:=onionshare_cli
@@ -19,7 +19,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm toml
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../../lang/python/pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 6ed983a2d6d28191d30481fb924909bc2220c404..ee1ac2620ceaa069859e2ecfb686fb3d2a853d2e 100644 (file)
@@ -2,7 +2,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
-PKG_VERSION:=4.17.5
+PKG_VERSION:=4.18.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:= \
                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:=ebb7880d474ffc09d73b5fc77bcbd657f6235910337331a9c24d7f69ca11442b
+PKG_HASH:=70348656ef807be9c8be4465ca157cef4d99818e234253d2c684cc18b8408149
 
 PKG_LICENSE:=GPL-3.0-only
 PKG_LICENSE_FILES:=COPYING
index 5c5c52db86580d0939db47256d28ad298c8b3242..4f06db369420ddb97abd51019f543cbf3d595d77 100644 (file)
 +
 +check_system_heimdal_binary("compile_et")
 +check_system_heimdal_binary("asn1_compile")
---- a/wscript_configure_system_heimdal
-+++ b/wscript_configure_system_heimdal
-@@ -37,14 +37,6 @@ def check_system_heimdal_lib(name, funct
-     conf.define('USING_SYSTEM_%s' % name.upper(), 1)
-     return True
--def check_system_heimdal_binary(name):
--    if conf.LIB_MAY_BE_BUNDLED(name):
--        return False
--    if not conf.find_program(name, var=name.upper()):
--        return False
--    conf.define('USING_SYSTEM_%s' % name.upper(), 1)
--    return True
--
- 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"):
-@@ -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)
index db846b9048ce208efefc597f140e5a8cf8506127..2bd1e79c652f772a116b86a3d49ccac0a14dec86 100644 (file)
@@ -1,6 +1,6 @@
 --- a/source4/lib/messaging/messaging.c
 +++ b/source4/lib/messaging/messaging.c
-@@ -525,7 +525,7 @@ static struct imessaging_context *imessa
+@@ -526,7 +526,7 @@ static struct imessaging_context *imessa
                goto fail;
        }
  
index f5a6924dfae1fa743187b6ee21b2399b19cecd6c..766fefc522b1ef95337c94fadcdeb33a509fc757 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/replace/wscript
 +++ b/lib/replace/wscript
-@@ -436,22 +436,13 @@ def configure(conf):
+@@ -434,22 +434,13 @@ def configure(conf):
  
      conf.CHECK_FUNCS('prctl dirname basename')
  
@@ -29,7 +29,7 @@
  
      conf.CHECK_CODE('''
                  struct ucred cred;
-@@ -834,9 +825,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
+@@ -832,9 +823,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']:
@@ -39,7 +39,7 @@
          if conf.CHECK_CODE('''
                             #define %s 1
                             #define NO_CONFIG_H 1
-@@ -849,7 +837,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
+@@ -847,7 +835,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
                             #include "tests/getifaddrs.c"
                             ''' % method,
                             method,
@@ -48,7 +48,7 @@
                             addmain=False,
                             execute=True):
              break
-@@ -897,7 +885,6 @@ def build(bld):
+@@ -895,7 +883,6 @@ def build(bld):
                  break
  
      extra_libs = ''
index 7103e36e12df5ae213a767ec4dcb33c86a3df06e..15d4368f66faadac5e834830a0ea86ed095a7089 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sing-box
-PKG_VERSION:=1.1.6
+PKG_VERSION:=1.2.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=2fdf93fd49c9375cd14b2fe2e2163cbad4b65d0cfa422c592855e7810036ef56
+PKG_HASH:=0f304b75c2e9f61e3f7808f23fe8fbe08161553475d9bec0dea4a5acf4452d2d
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
@@ -19,6 +19,8 @@ PKG_USE_MIPS16:=0
 GO_PKG:=github.com/sagernet/sing-box
 GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/sing-box
 
+GO_PKG_LDFLAGS_X:=$(GO_PKG)/constant.Version=$(PKG_VERSION)
+
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/golang/golang-package.mk
 
@@ -47,6 +49,9 @@ define Package/sing-box/config
                        bool "Build with Clash API support"
                        default y
 
+               config SINGBOX_WITH_DHCP
+                       bool "Build with DHCP support, see DHCP DNS transport."
+
                config SINGBOX_WITH_ECH
                        bool "Build with TLS ECH extension support for TLS outbound"
 
@@ -67,6 +72,10 @@ define Package/sing-box/config
                        bool "Build with QUIC support"
                        default y
 
+               config SINGBOX_WITH_REALITY_SERVER
+                       bool "Build with reality TLS server support, see TLS."
+                       default y
+
                config SINGBOX_WITH_SHADOWSOCKSR
                        bool "Build with ShadowsocksR support"
 
@@ -86,12 +95,14 @@ endef
 PKG_CONFIG_DEPENDS:= \
        CONFIG_SINGBOX_WITH_ACME \
        CONFIG_SINGBOX_WITH_CLASH_API \
+       CONFIG_SINGBOX_WITH_DHCP \
        CONFIG_SINGBOX_WITH_ECH \
        CONFIG_SINGBOX_WITH_EMBEDDED_TOR \
        CONFIG_SINGBOX_WITH_GRPC \
        CONFIG_SINGBOX_WITH_GVISOR \
        CONFIG_SINGBOX_WITH_LWIP \
        CONFIG_SINGBOX_WITH_QUIC \
+       CONFIG_SINGBOX_WITH_REALITY_SERVER \
        CONFIG_SINGBOX_WITH_SHADOWSOCKSR \
        CONFIG_SINGBOX_WITH_UTLS \
        CONFIG_SINGBOX_WITH_V2RAY_API \
@@ -100,6 +111,7 @@ PKG_CONFIG_DEPENDS:= \
 GO_PKG_TAGS:=$(subst $(space),$(comma),$(strip \
        $(if $(CONFIG_SINGBOX_WITH_ACME),with_acme) \
        $(if $(CONFIG_SINGBOX_WITH_CLASH_API),with_clash_api) \
+       $(if $(CONFIG_SINGBOX_WITH_DHCP),with_dhcp) \
        $(if $(CONFIG_SINGBOX_WITH_ECH),with_ech) \
        $(if $(CONFIG_SINGBOX_WITH_EMBEDDED_TOR),with_embedded_tor) \
        $(if $(CONFIG_SINGBOX_WITH_GRPC),with_grpc) \
@@ -107,6 +119,7 @@ GO_PKG_TAGS:=$(subst $(space),$(comma),$(strip \
        $(if $(CONFIG_SINGBOX_WITH_LWIP),with_lwip) \
        $(if $(CONFIG_SINGBOX_WITH_QUIC),with_quic) \
        $(if $(CONFIG_SINGBOX_WITH_SHADOWSOCKSR),with_shadowsocksr) \
+       $(if $(CONFIG_SINGBOX_WITH_REALITY_SERVER),with_reality_server) \
        $(if $(CONFIG_SINGBOX_WITH_UTLS),with_utls) \
        $(if $(CONFIG_SINGBOX_WITH_V2RAY_API),with_v2ray_api) \
        $(if $(CONFIG_SINGBOX_WITH_WIREGUARD),with_wireguard) \
index 68e2bbe1cfec800e534e189131d6a3880fe1a02e..0f1238a43a372c0bb500fe4f843effb37b268dce 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=snort3
-PKG_VERSION:=3.1.57.0
+PKG_VERSION:=3.1.58.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/snort3/snort3/archive/refs/tags/
-PKG_HASH:=cec779dde2fbf7e3d20b721c04b89f6f84ef663bf1afba06535188e7c766721c
+PKG_HASH:=c2b37899db42e2db9a05089abbe0ba48633c6c48496d2c64565500b4f9061d78
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=GPL-2.0-only
index 8c38c703ddfee05032301f211eae978a53e62112..7f0e0c9609a128b5a5e1f93d8a3d3d8fd495c6a3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=strongswan
 PKG_VERSION:=5.9.10
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
@@ -130,7 +130,16 @@ define Package/strongswan
 $(call Package/strongswan/Default)
   MENU:=1
   DEPENDS:= +libpthread +ip \
+       +kmod-crypto-aead \
        +kmod-crypto-authenc \
+       +kmod-crypto-cbc \
+       +kmod-lib-zlib-inflate \
+       +kmod-lib-zlib-deflate \
+       +kmod-crypto-des \
+       +kmod-crypto-echainiv \
+       +kmod-crypto-hmac \
+       +kmod-crypto-md5 \
+       +kmod-crypto-sha1 \
        +kmod-ipsec +kmod-ipsec4 +IPV6:kmod-ipsec6
 endef
 
index 9d34b1041db03104d772e9036a4a7c2c6e9088be..3af15f19e4311639d2c65b5e414eb424f6eeeef6 100644 (file)
@@ -63,9 +63,12 @@ file_reset() {
 
 xappend() {
        local file="$1"
-       shift
+       local indent="$2"
+       shift 2
 
-       echo "$@" >> "$file"
+       for cmd in "$@"; do
+               echo "$indent$cmd" >> "$file"
+       done
 }
 
 swan_reset() {
@@ -77,23 +80,23 @@ swan_xappend() {
 }
 
 swan_xappend0() {
-       swan_xappend "$@"
+       swan_xappend "" "$@"
 }
 
 swan_xappend1() {
-       swan_xappend "  ""$@"
+       swan_xappend "  " "$@"
 }
 
 swan_xappend2() {
-       swan_xappend "    ""$@"
+       swan_xappend "    " "$@"
 }
 
 swan_xappend3() {
-       swan_xappend "      ""$@"
+       swan_xappend "      " "$@"
 }
 
 swan_xappend4() {
-       swan_xappend "        ""$@"
+       swan_xappend "        " "$@"
 }
 
 swanctl_reset() {
@@ -105,23 +108,23 @@ swanctl_xappend() {
 }
 
 swanctl_xappend0() {
-       swanctl_xappend "$@"
+       swanctl_xappend "" "$@"
 }
 
 swanctl_xappend1() {
-       swanctl_xappend "  ""$@"
+       swanctl_xappend "  " "$@"
 }
 
 swanctl_xappend2() {
-       swanctl_xappend "    ""$@"
+       swanctl_xappend "    " "$@"
 }
 
 swanctl_xappend3() {
-       swanctl_xappend "      ""$@"
+       swanctl_xappend "      " "$@"
 }
 
 swanctl_xappend4() {
-       swanctl_xappend "        ""$@"
+       swanctl_xappend "        " "$@"
 }
 
 warning() {
@@ -331,11 +334,11 @@ config_child() {
        [ -n "$local_subnet" ] && swanctl_xappend4 "local_ts = $local_subnet"
        [ -n "$remote_subnet" ] && swanctl_xappend4 "remote_ts = $remote_subnet"
 
-       [ -n "$hw_offload" ] && swanctl_append4 "hw_offload = $hw_offload"
+       [ -n "$hw_offload" ] && swanctl_xappend4 "hw_offload = $hw_offload"
        [ $ipcomp -eq 1 ] && swanctl_xappend4 "ipcomp = 1"
-       [ -n "$interface" ] && swanctl_append4 "interface = $interface"
-       [ -n "$priority" ] && swanctl_append4 "priority = $priority"
-       [ -n "$if_id" ] && { swanctl_xappend4 "if_id_in = $if_id" ; swanctl_xappend4 "if_id_out = $if_id" ; }
+       [ -n "$interface" ] && swanctl_xappend4 "interface = $interface"
+       [ -n "$priority" ] && swanctl_xappend4 "priority = $priority"
+       [ -n "$if_id" ] && swanctl_xappend4 "if_id_in = $if_id" "if_id_out = $if_id"
        [ -n "$startaction" -a "$startaction" != "none" ] && swanctl_xappend4 "start_action = $startaction"
        [ -n "$closeaction" -a "$closeaction" != "none" ] && swanctl_xappend4 "close_action = $closeaction"
        swanctl_xappend4 "esp_proposals = $esp_proposal"
index 89a4bd0c95e10b4a3e4a7ed9a1ea0a3ad4d52a3e..b1ac9cf19d3dad6b2a346cb0c778790bf0ac5772 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tinyproxy
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.11.1
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/tinyproxy/tinyproxy/releases/download/$(PKG_VERSION)
-PKG_HASH:=59be87689c415ba0d9c9bc6babbdd3df3b372d60b21e526b118d722dbc995682
+PKG_HASH:=d66388448215d0aeb90d0afdd58ed00386fb81abc23ebac9d80e194fceb40f7c
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=GPL-2.0-or-later
index ac7b46ff0cc42e8d98549c9e55334a03ba843dfb..e62ce1cf03d4a01c56e393d293c7ebb07dd6d5fe 100644 (file)
@@ -63,6 +63,13 @@ option DefaultErrorFile "/usr/share/tinyproxy/default.html"
 #
 option StatFile "/usr/share/tinyproxy/stats.html"
 
+#
+# BasicAuth: Tinyproxy server operators may want to not run an "open" proxy 
+# for the whole world, but rather limit usage to a smaller goup 
+# of users. They then put the line.
+#
+#option BasicAuth "username password"
+
 #
 # Where to log the information. Either LogFile or Syslog should be set,
 # but not both.
index 1feac669c3d1433ed78404e8a72f0740e4822c2e..4afdae6aa22cce4fe8b04e77af1e8cec2112dc13 100644 (file)
@@ -55,6 +55,14 @@ proxy_string() {
        }
 }
 
+proxy_m_string() {
+       local SECTION=$1
+       local OPTION=$2
+
+       config_get _value "$SECTION" "$OPTION"
+       [ -n "$_value" ] && echo "${ALIAS:-${OPTION}} ""$_value"
+}
+
 proxy_flag() {
        local SECTION=$1
        local OPTION=$2
@@ -108,6 +116,8 @@ start_proxy() {
        proxy_string "$1" StatFile
        proxy_string "$1" LogFile
 
+       proxy_m_string "$1" BasicAuth
+
        proxy_flag "$1" Syslog
 
        proxy_atom "$1" LogLevel
index 3911c18f0b3857b13e3cd5292245f0930883c69e..6281a422390746128124b2cbfacff34d690f1391 100644 (file)
@@ -1,16 +1,15 @@
 --- a/src/sock.c
 +++ b/src/sock.c
-@@ -39,8 +39,7 @@
-  * returned if the bind succeeded.  Otherwise, -1 is returned
+@@ -63,7 +63,7 @@ static const char * family_string (int a
   * to indicate an error.
   */
--static int
+ static int
 -bind_socket (int sockfd, const char *addr, int family)
-+static int bind_socket (int sockfd, const char *addr)
++bind_socket (int sockfd, const char *addr)
  {
          struct addrinfo hints, *res, *ressave;
-@@ -48,7 +47,7 @@ bind_socket (int sockfd, const char *add
+         int n;
+@@ -72,14 +72,14 @@ bind_socket (int sockfd, const char *add
          assert (addr != NULL && strlen (addr) != 0);
  
          memset (&hints, 0, sizeof (struct addrinfo));
 +        hints.ai_family = AF_UNSPEC;
          hints.ai_socktype = SOCK_STREAM;
  
-         /* The local port it not important */
-@@ -112,14 +111,12 @@ int opensock (const char *host, int port
+         /* The local port is not important */
+         n = getaddrinfo (addr, NULL, &hints, &res);
+         if (n != 0) {
+                 log_message (LOG_INFO,
+-                        "bind_socket: getaddrinfo failed for %s: %s (af: %s)", addr, get_gai_error (n), family_string(family));
++                        "bind_socket: getaddrinfo failed for %s: %s", addr, get_gai_error (n));
+                 return -1;
+         }
+@@ -102,14 +102,14 @@ bind_socket (int sockfd, const char *add
+  * Try binding the given socket to supplied addresses, stopping when one succeeds.
+  */
+ static int
+-bind_socket_list (int sockfd, sblist *addresses, int family)
++bind_socket_list (int sockfd, sblist *addresses)
+ {
+         size_t nb_addresses = sblist_getsize(addresses);
+         size_t i;
+         for (i = 0; i < nb_addresses; i++) {
+                 const char *address = *(const char **)sblist_get(addresses, i);
+-                if (bind_socket(sockfd, address, family) >= 0) {
++                if (bind_socket(sockfd, address) >= 0) {
+                         log_message(LOG_INFO, "Bound to %s", address);
+                         return 0;
+                 }
+@@ -170,14 +170,12 @@ int opensock (const char *host, int port
  
                  /* Bind to the specified address */
                  if (bind_to) {
                                  close (sockfd);
                                  continue;       /* can't bind, so try again */
                          }
-                 } else if (config.bind_address) {
--                        if (bind_socket (sockfd, config.bind_address,
--                                         res->ai_family) < 0) {
-+                        if (bind_socket (sockfd, config.bind_address) < 0) {
+                 } else if (config->bind_addrs) {
+-                        if (bind_socket_list (sockfd, config->bind_addrs,
+-                                              res->ai_family) < 0) {
++                        if (bind_socket_list (sockfd, config->bind_addrs) < 0) {
                                  close (sockfd);
                                  continue;       /* can't bind, so try again */
                          }
index 616b5756795443068aa3220bd5250bb5041743b8..4497051787cba68b3c01949babab598a7214f0e0 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission-web-control
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/ronggang/transmission-web-control
@@ -34,8 +34,8 @@ define Build/Compile
 endef
 
 define Package/transmission-web-control/install
-       $(INSTALL_DIR) $(1)/usr/share/transmission/web
-       $(CP) $(PKG_BUILD_DIR)/src/* $(1)/usr/share/transmission/web
+       $(INSTALL_DIR) $(1)/usr/share/transmission/public_html
+       $(CP) $(PKG_BUILD_DIR)/src/* $(1)/usr/share/transmission/public_html
 endef
 
 $(eval $(call BuildPackage,transmission-web-control))
index dc95537c210060ce6faa3017cea530648f234051..e0c03f3cae5a73d8ebbaa76d6102f0a119beee44 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
-PKG_VERSION:=4.0.1
+PKG_VERSION:=4.0.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/transmission/transmission/releases/download/$(PKG_VERSION)/
-PKG_HASH:=8fc5aef23638c983406f6a3ee9918369e4cdc84e3228bd2fb3d01dd55cdad900
+PKG_HASH:=39bf7a104a722805a9dc089cdaaffe33bf90b82230a7ea7f340cae59f00a2ee8
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0-or-later
index 3787374c457760a47ef63ac3fd60a0a03a65ee86..9bb77c92815e5c8db75eecfa44bbd63057c15289 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v2rayA
-PKG_VERSION:=1.5.9.1698.1
-PKG_RELEASE:=4
+PKG_VERSION:=2.0.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=247a357230c616bf48309c61d119686e4ad56939c05afef584c45051e9dc6220
+PKG_HASH:=fb0c60d95cd208e3306cf9c5488f41fe7cf6697d58dc377e5e7d471e37ce9060
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
 
 PKG_LICENSE:=AGPL-3.0-only
@@ -22,7 +22,9 @@ PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
 GO_PKG:=github.com/v2rayA/v2rayA
-GO_PKG_LDFLAGS_X:=$(GO_PKG)/conf.Version=$(PKG_VERSION)
+GO_PKG_LDFLAGS_X:= \
+       $(GO_PKG)/conf.Version=$(PKG_VERSION) \
+       $(GO_PKG)/core/iptables.TproxyNotSkipBr=true
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/golang/golang-package.mk
@@ -57,7 +59,7 @@ define Download/v2raya-web
        URL:=https://codeload.github.com/v2rayA/v2raya-web/tar.gz/v$(PKG_VERSION)?
        URL_FILE:=$(WEB_FILE)
        FILE:=$(WEB_FILE)
-       HASH:=149097a42c3e5fa6f5c3cd46d1bf7ec4546e79ad37c1446b759539e700bd75e2
+       HASH:=39eacb70753b309a0f44ede282ad01b5c6a13d51bed72d0f5563574de9bea0b7
 endef
 
 define Build/Prepare
index 131131cf81a88e1e312f361ea5f747ab914ebb19..8ebf318cda5d12bafac1c0a133113b28bc481949 100644 (file)
@@ -10,11 +10,11 @@ config v2raya 'config'
 
        # Make sure your IPv6 network works fine before you turn it on.
        # Optional values: auto, on, off.
-       option ipv6_support 'on'
+       option ipv6_support 'auto'
 
        # Experimental feature. Make sure you have installed nftables.
        # Optional values: auto, on, off.
-       option nftables_support 'on'
+       option nftables_support 'auto'
 
        # Optional values: trace, debug, info, warn or error
        option log_level 'info'
@@ -48,7 +48,3 @@ config v2raya 'config'
        # v2rayA will pass in the --stage (pre-start, post-start, pre-stop, post-stop) argument.
        option plugin_manager ''
 
-       # Specify the certification path instead of automatically generating a self-signed certificate.
-       # Example: /etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key
-       option vless_grpc_inbound_cert_key ''
-
index 2b77fa5dcdcdba7ee55b6b1dfa29c9226f58baf3..b4a719613017f885a12d431779f8142fa74cc12a 100755 (executable)
@@ -42,8 +42,8 @@ start_service() {
 
        append_env_arg "config" "address" "0.0.0.0:2017"
        append_env_arg "config" "config" "/etc/v2raya"
-       append_env_arg "config" "ipv6_support" "on"
-       append_env_arg "config" "nftables_support" "on"
+       append_env_arg "config" "ipv6_support" "auto"
+       append_env_arg "config" "nftables_support" "auto"
        append_env_arg "config" "log_level" "info"
        append_env_arg "config" "log_file" "/var/log/v2raya/v2raya.log"
        append_env_arg "config" "log_max_days" "3"
@@ -52,7 +52,6 @@ start_service() {
        append_env_arg "config" "transparent_hook"
        append_env_arg "config" "core_hook"
        append_env_arg "config" "plugin_manager"
-       append_env_arg "config" "vless_grpc_inbound_cert_key"
        append_env_bool "config" "log_disable_color"
        append_env_bool "config" "log_disable_timestamp"
 
diff --git a/net/v2raya/patches/013-fix-we-should-skip-interface-ppp-to-avoid-to-break-net.patch b/net/v2raya/patches/013-fix-we-should-skip-interface-ppp-to-avoid-to-break-net.patch
deleted file mode 100644 (file)
index 5de1a86..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-From ca6a05273284daa04856a840e64f3936f700b7c3 Mon Sep 17 00:00:00 2001
-From: mzz2017 <mzz@tuta.io>
-Date: Fri, 16 Sep 2022 15:13:11 +0800
-Subject: [PATCH] fix: we should skip interface ppp+ to avoid to break net
-
----
- service/core/iptables/tproxy.go | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
---- a/core/iptables/tproxy.go
-+++ b/core/iptables/tproxy.go
-@@ -16,7 +16,7 @@ var Tproxy tproxy
- func (t *tproxy) AddIPWhitelist(cidr string) {
-       // avoid duplication
-       t.RemoveIPWhitelist(cidr)
--      pos := 5
-+      pos := 7
-       if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
-               pos += 3
-       }
-@@ -67,6 +67,8 @@ iptables -w 2 -t mangle -A TP_RULE -j CO
- iptables -w 2 -t mangle -A TP_RULE -m mark --mark 0x40/0xc0 -j RETURN
- iptables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
- iptables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
-+iptables -w 2 -t mangle -A TP_RULE -i ppp+ -j RETURN
-+iptables -w 2 -t mangle -A TP_RULE -i dn42-+ -j RETURN
- `
-       if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
-               commands += `
-@@ -125,6 +127,8 @@ ip6tables -w 2 -t mangle -A TP_RULE -j C
- ip6tables -w 2 -t mangle -A TP_RULE -m mark --mark 0x40/0xc0 -j RETURN
- ip6tables -w 2 -t mangle -A TP_RULE -i docker+ -j RETURN
- ip6tables -w 2 -t mangle -A TP_RULE -i veth+ -j RETURN
-+ip6tables -w 2 -t mangle -A TP_RULE -i ppp+ -j RETURN
-+ip6tables -w 2 -t mangle -A TP_RULE -i dn42-+ -j RETURN
- `
-               if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
-                       commands += `
diff --git a/net/v2raya/patches/014-fix-seed-cannot-be-read-from-vless-sharing-link-and-add-m.patch b/net/v2raya/patches/014-fix-seed-cannot-be-read-from-vless-sharing-link-and-add-m.patch
deleted file mode 100644 (file)
index ba50306..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-From 5db722b22b39642280572a62b149d4e1efa21ce3 Mon Sep 17 00:00:00 2001
-From: mzz2017 <mzz@tuta.io>
-Date: Mon, 8 Aug 2022 22:30:36 +0800
-Subject: [PATCH] fix: seed cannot be read from vless sharing-link and add
- missing sni field. #616
-
----
- service/core/serverObj/v2ray.go | 24 +++++++++++-------------
- 1 file changed, 11 insertions(+), 13 deletions(-)
-
---- a/core/serverObj/v2ray.go
-+++ b/core/serverObj/v2ray.go
-@@ -12,7 +12,6 @@ import (
-       "time"
-       jsoniter "github.com/json-iterator/go"
--      "github.com/tidwall/gjson"
-       "github.com/v2rayA/v2rayA/common"
-       "github.com/v2rayA/v2rayA/core/coreObj"
-       "github.com/v2rayA/v2rayA/core/v2ray/service"
-@@ -39,6 +38,7 @@ type V2Ray struct {
-       Net           string `json:"net"`
-       Type          string `json:"type"`
-       Host          string `json:"host"`
-+      SNI           string `json:"sni"`
-       Path          string `json:"path"`
-       TLS           string `json:"tls"`
-       Flow          string `json:"flow,omitempty"`
-@@ -69,7 +69,8 @@ func ParseVlessURL(vless string) (data *
-               ID:            u.User.String(),
-               Net:           u.Query().Get("type"),
-               Type:          u.Query().Get("headerType"),
--              Host:          u.Query().Get("sni"),
-+              Host:          u.Query().Get("host"),
-+              SNI:           u.Query().Get("sni"),
-               Path:          u.Query().Get("path"),
-               TLS:           u.Query().Get("security"),
-               Flow:          u.Query().Get("flow"),
-@@ -86,16 +87,13 @@ func ParseVlessURL(vless string) (data *
-       if data.Type == "" {
-               data.Type = "none"
-       }
--      if data.Host == "" {
--              data.Host = u.Query().Get("host")
--      }
-       if data.TLS == "" {
-               data.TLS = "none"
-       }
-       if data.Flow == "" {
-               data.Flow = "xtls-rprx-direct"
-       }
--      if data.Type == "mkcp" || data.Type == "kcp" {
-+      if data.Net == "mkcp" || data.Net == "kcp" {
-               data.Path = u.Query().Get("seed")
-       }
-       return data, nil
-@@ -145,6 +143,7 @@ func ParseVmessURL(vmess string) (data *
-               if aid == "" {
-                       aid = q.Get("aid")
-               }
-+              sni := q.Get("sni")
-               info = V2Ray{
-                       ID:            subMatch[1],
-                       Add:           subMatch[2],
-@@ -152,6 +151,7 @@ func ParseVmessURL(vmess string) (data *
-                       Ps:            ps,
-                       Host:          obfsParam,
-                       Path:          path,
-+                      SNI:           sni,
-                       Net:           obfs,
-                       Aid:           aid,
-                       TLS:           map[string]string{"1": "tls"}[q.Get("tls")],
-@@ -165,12 +165,6 @@ func ParseVmessURL(vmess string) (data *
-               if err != nil {
-                       return
-               }
--              if info.Host == "" {
--                      sni := gjson.Get(raw, "sni")
--                      if sni.Exists() {
--                              info.Host = sni.String()
--                      }
--              }
-       }
-       // correct the wrong vmess as much as possible
-       if strings.HasPrefix(info.Host, "/") && info.Path == "" {
-@@ -328,7 +322,9 @@ func (v *V2Ray) Configuration(info Prior
-                               core.StreamSettings.TLSSettings.AllowInsecure = true
-                       }
-                       // SNI
--                      if v.Host != "" {
-+                      if v.SNI != "" {
-+                              core.StreamSettings.TLSSettings.ServerName = v.SNI
-+                      } else if v.Host != "" {
-                               core.StreamSettings.TLSSettings.ServerName = v.Host
-                       }
-                       // Alpn
-@@ -345,6 +341,8 @@ func (v *V2Ray) Configuration(info Prior
-                       // SNI
-                       if v.Host != "" {
-                               core.StreamSettings.XTLSSettings.ServerName = v.Host
-+                      } else if v.Host != "" {
-+                              core.StreamSettings.TLSSettings.ServerName = v.Host
-                       }
-                       if v.AllowInsecure {
-                               core.StreamSettings.XTLSSettings.AllowInsecure = true
diff --git a/net/v2raya/patches/015-fix-a-problem-that-supervisor-cannot-exit-normally.patch b/net/v2raya/patches/015-fix-a-problem-that-supervisor-cannot-exit-normally.patch
deleted file mode 100644 (file)
index 5447dc0..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-From 3f78422f81f3abc2668fc3938b31d213bfe4dfff Mon Sep 17 00:00:00 2001
-From: mzz2017 <mzz@tuta.io>
-Date: Sun, 28 Aug 2022 17:54:36 +0800
-Subject: [PATCH] fix: a problem that supervisor cannot exit normally
-
----
- service/core/specialMode/infra/handle.go     | 11 ++++++----
- service/core/specialMode/infra/supervisor.go | 22 ++++++++------------
- 2 files changed, 16 insertions(+), 17 deletions(-)
-
---- a/core/specialMode/infra/handle.go
-+++ b/core/specialMode/infra/handle.go
-@@ -127,10 +127,13 @@ func (interfaceHandle *handle) handleRec
-       return results, msg
- }
--func packetFilter(portCache *portCache, pPacket *gopacket.Packet, whitelistDnsServers *v2router.GeoIPMatcher) (m *dnsmessage.Message, pSAddr, pSPort, pDAddr, pDPort *gopacket.Endpoint) {
--      packet := *pPacket
--      trans := packet.TransportLayer()
-+func packetFilter(portCache *portCache, packet gopacket.Packet, whitelistDnsServers *v2router.GeoIPMatcher) (m *dnsmessage.Message, pSAddr, pSPort, pDAddr, pDPort *gopacket.Endpoint) {
-+      //跳过非网络层的包
-+      if packet.NetworkLayer() == nil {
-+              return
-+      }
-       //跳过非传输层的包
-+      trans := packet.TransportLayer()
-       if trans == nil {
-               return
-       }
-@@ -180,7 +183,7 @@ func packetFilter(portCache *portCache,
- }
- func (interfaceHandle *handle) handlePacket(packet gopacket.Packet, ifname string, whitelistDnsServers *v2router.GeoIPMatcher, whitelistDomains *strmatcher.MatcherGroup) {
--      m, sAddr, sPort, dAddr, dPort := packetFilter(interfaceHandle.portCache, &packet, whitelistDnsServers)
-+      m, sAddr, sPort, dAddr, dPort := packetFilter(interfaceHandle.portCache, packet, whitelistDnsServers)
-       if m == nil {
-               return
-       }
---- a/core/specialMode/infra/supervisor.go
-+++ b/core/specialMode/infra/supervisor.go
-@@ -9,7 +9,6 @@ import (
-       v2router "github.com/v2rayA/v2ray-lib/router"
-       "github.com/v2rayA/v2rayA/pkg/util/log"
-       "sync"
--      "time"
- )
- type DnsSupervisor struct {
-@@ -70,7 +69,7 @@ func (d *DnsSupervisor) DeleteHandles(if
-       }
-       close(d.handles[ifname].done)
-       delete(d.handles, ifname)
--      log.Trace("DnsSupervisor:%v closed", ifname)
-+      log.Trace("DnsSupervisor:%v deleted", ifname)
-       return
- }
-@@ -81,28 +80,24 @@ func (d *DnsSupervisor) Run(ifname strin
-       d.inner.Lock()
-       handle, ok := d.handles[ifname]
-       if !ok {
-+              d.inner.Unlock()
-               return fmt.Errorf("Run: %v not exsits", ifname)
-       }
-       if handle.running {
-+              d.inner.Unlock()
-               return fmt.Errorf("Run: %v is running", ifname)
-       }
-       handle.running = true
-       log.Trace("[DnsSupervisor] " + ifname + ": running")
--      pkgsrc := gopacket.NewPacketSource(handle, layers.LayerTypeEthernet)
-+      // we only decode UDP packets
-+      pkgsrc := gopacket.NewPacketSource(handle, layers.LayerTypeDNS)
-       pkgsrc.NoCopy = true
-+      //pkgsrc.Lazy = true
-       d.inner.Unlock()
-       packets := pkgsrc.Packets()
-       go func() {
--              for {
--                      //心跳包,防止内存泄漏
--                      packets <- gopacket.NewPacket(nil, layers.LinkTypeEthernet, gopacket.DecodeOptions{})
--                      select {
--                      case <-handle.done:
--                              return
--                      default:
--                              time.Sleep(2 * time.Second)
--                      }
--              }
-+              <-handle.done
-+              packets <- gopacket.NewPacket(nil, layers.LinkTypeEthernet, pkgsrc.DecodeOptions)
-       }()
- out:
-       for packet := range packets {
-@@ -113,5 +108,6 @@ out:
-               }
-               go handle.handlePacket(packet, ifname, whitelistDnsServers, whitelistDomains)
-       }
-+      log.Trace("DnsSupervisor:%v closed", ifname)
-       return
- }
diff --git a/net/v2raya/patches/016-fix-unexpected-exit-does-not-apply-stop-steps.patch b/net/v2raya/patches/016-fix-unexpected-exit-does-not-apply-stop-steps.patch
deleted file mode 100644 (file)
index a945dbd..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 153b72ed623876ad73b731c2ec2344e9057d3c35 Mon Sep 17 00:00:00 2001
-From: mzz2017 <mzz@tuta.io>
-Date: Wed, 21 Sep 2022 16:50:24 +0800
-Subject: [PATCH] fix: unexpected exit does not apply stop steps
-
----
- service/core/v2ray/process.go        | 4 ++--
- service/core/v2ray/processManager.go | 8 +++-----
- 2 files changed, 5 insertions(+), 7 deletions(-)
-
---- a/core/v2ray/process.go
-+++ b/core/v2ray/process.go
-@@ -35,7 +35,7 @@ type Process struct {
-       tag2WhichIndex map[string]int
- }
--func NewProcess(tmpl *Template, prestart func() error, poststart func() error) (process *Process, err error) {
-+func NewProcess(tmpl *Template, prestart func() error, poststart func() error, stopfunc func(p *Process)) (process *Process, err error) {
-       process = &Process{
-               template: tmpl,
-       }
-@@ -111,7 +111,7 @@ func NewProcess(tmpl *Template, prestart
-                       // canceled by v2rayA
-                       return
-               }
--              defer ProcessManager.Stop(false)
-+              defer stopfunc(process)
-               var t []string
-               if p != nil {
-                       if p.Success() {
---- a/core/v2ray/processManager.go
-+++ b/core/v2ray/processManager.go
-@@ -245,16 +245,14 @@ func (m *CoreProcessManager) Start(t *Te
-               return m.beforeStart(t)
-       }, func() error {
-               return m.afterStart(t)
-+      }, func(p *Process) {
-+              m.p = p
-+              ProcessManager.Stop(false)
-       })
-       if err != nil {
-               return err
-       }
-       m.p = process
--      defer func() {
--              if err != nil {
--                      m.stop(true)
--              }
--      }()
-       configure.SetRunning(true)
-       return nil
diff --git a/net/v2raya/patches/017-optimize-reduce-disk-writes.patch b/net/v2raya/patches/017-optimize-reduce-disk-writes.patch
deleted file mode 100644 (file)
index 5437570..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-From 00366b224b2e28861b80f677e8aa604c5d08dae3 Mon Sep 17 00:00:00 2001
-From: Kelo <meetkelo@outlook.com>
-Date: Sat, 29 Oct 2022 16:27:26 +0800
-Subject: [PATCH] optimize: reduce disk writes
-
----
- service/db/boltdb.go  | 43 +++++++++++++++++++++++++++++++----
- service/db/listOp.go  | 48 +++++++++++++++++++++------------------
- service/db/plainOp.go | 52 ++++++++++++++++++++++++-------------------
- service/db/setOp.go   | 20 +++++++++--------
- 4 files changed, 105 insertions(+), 58 deletions(-)
-
---- a/db/boltdb.go
-+++ b/db/boltdb.go
-@@ -1,13 +1,14 @@
- package db
- import (
--      "go.etcd.io/bbolt"
--      "github.com/v2rayA/v2rayA/conf"
--      "github.com/v2rayA/v2rayA/pkg/util/copyfile"
--      "github.com/v2rayA/v2rayA/pkg/util/log"
-       "os"
-       "path/filepath"
-       "sync"
-+
-+      "github.com/v2rayA/v2rayA/conf"
-+      "github.com/v2rayA/v2rayA/pkg/util/copyfile"
-+      "github.com/v2rayA/v2rayA/pkg/util/log"
-+      "go.etcd.io/bbolt"
- )
- var once sync.Once
-@@ -46,3 +47,37 @@ func DB() *bbolt.DB {
-       once.Do(initDB)
-       return db
- }
-+
-+// The function should return a dirty flag.
-+// If the dirty flag is true and there is no error then the transaction is commited.
-+// Otherwise, the transaction is rolled back.
-+func Transaction(db *bbolt.DB, fn func(*bbolt.Tx) (bool, error)) error {
-+      tx, err := db.Begin(true)
-+      if err != nil {
-+              return err
-+      }
-+      defer tx.Rollback()
-+      dirty, err := fn(tx)
-+      if err != nil {
-+              _ = tx.Rollback()
-+              return err
-+      }
-+      if !dirty {
-+              return nil
-+      }
-+      return tx.Commit()
-+}
-+
-+// If the bucket does not exist, the dirty flag is setted
-+func CreateBucketIfNotExists(tx *bbolt.Tx, name []byte, dirty *bool) (*bbolt.Bucket, error) {
-+      bkt := tx.Bucket(name)
-+      if bkt != nil {
-+              return bkt, nil
-+      }
-+      bkt, err := tx.CreateBucket(name)
-+      if err != nil {
-+              return nil, err
-+      }
-+      *dirty = true
-+      return bkt, nil
-+}
---- a/db/listOp.go
-+++ b/db/listOp.go
-@@ -2,13 +2,14 @@ package db
- import (
-       "fmt"
--      "go.etcd.io/bbolt"
--      jsoniter "github.com/json-iterator/go"
--      "github.com/tidwall/gjson"
--      "github.com/tidwall/sjson"
-       "reflect"
-       "sort"
-       "strconv"
-+
-+      jsoniter "github.com/json-iterator/go"
-+      "github.com/tidwall/gjson"
-+      "github.com/tidwall/sjson"
-+      "go.etcd.io/bbolt"
- )
- func ListSet(bucket string, key string, index int, val interface{}) (err error) {
-@@ -31,20 +32,21 @@ func ListSet(bucket string, key string,
- }
- func ListGet(bucket string, key string, index int) (b []byte, err error) {
--      err = DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      err = Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       v := bkt.Get([]byte(key))
-                       if v == nil {
--                              return fmt.Errorf("ListGet: can't get element from an empty list")
-+                              return dirty, fmt.Errorf("ListGet: can't get element from an empty list")
-                       }
-                       r := gjson.GetBytes(v, strconv.Itoa(index))
-                       if r.Exists() {
-                               b = []byte(r.Raw)
--                              return nil
-+                              return dirty, nil
-                       } else {
--                              return fmt.Errorf("ListGet: no such element")
-+                              return dirty, fmt.Errorf("ListGet: no such element")
-                       }
-               }
-       })
-@@ -79,24 +81,25 @@ func ListAppend(bucket string, key strin
- }
- func ListGetAll(bucket string, key string) (list [][]byte, err error) {
--      err = DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      err = Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       b := bkt.Get([]byte(key))
-                       if b == nil {
--                              return nil
-+                              return dirty, nil
-                       }
-                       parsed := gjson.ParseBytes(b)
-                       if !parsed.IsArray() {
--                              return fmt.Errorf("ListGetAll: is not array")
-+                              return dirty, fmt.Errorf("ListGetAll: is not array")
-                       }
-                       results := parsed.Array()
-                       for _, r := range results {
-                               list = append(list, []byte(r.Raw))
-                       }
-               }
--              return nil
-+              return dirty, nil
-       })
-       return list, err
- }
-@@ -143,21 +146,22 @@ func ListRemove(bucket, key string, inde
- }
- func ListLen(bucket string, key string) (length int, err error) {
--      err = DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      err = Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       b := bkt.Get([]byte(key))
-                       if b == nil {
--                              return nil
-+                              return dirty, nil
-                       }
-                       parsed := gjson.ParseBytes(b)
-                       if !parsed.IsArray() {
--                              return fmt.Errorf("ListLen: is not array")
-+                              return dirty, fmt.Errorf("ListLen: is not array")
-                       }
-                       length = len(parsed.Array())
-               }
--              return nil
-+              return dirty, nil
-       })
-       return length, err
- }
---- a/db/plainOp.go
-+++ b/db/plainOp.go
-@@ -2,50 +2,54 @@ package db
- import (
-       "fmt"
--      "go.etcd.io/bbolt"
-+
-       jsoniter "github.com/json-iterator/go"
-       "github.com/v2rayA/v2rayA/common"
-       "github.com/v2rayA/v2rayA/pkg/util/log"
-+      "go.etcd.io/bbolt"
- )
- func Get(bucket string, key string, val interface{}) (err error) {
--      return DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      return Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       if v := bkt.Get([]byte(key)); v == nil {
--                              return fmt.Errorf("Get: key is not found")
-+                              return dirty, fmt.Errorf("Get: key is not found")
-                       } else {
--                              return jsoniter.Unmarshal(v, val)
-+                              return dirty, jsoniter.Unmarshal(v, val)
-                       }
-               }
-       })
- }
- func GetRaw(bucket string, key string) (b []byte, err error) {
--      err = DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      err = Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       v := bkt.Get([]byte(key))
-                       if v == nil {
--                              return fmt.Errorf("GetRaw: key is not found")
-+                              return dirty, fmt.Errorf("GetRaw: key is not found")
-                       }
-                       b = common.BytesCopy(v)
--                      return nil
-+                      return dirty, nil
-               }
-       })
-       return b, err
- }
- func Exists(bucket string, key string) (exists bool) {
--      if err := DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      if err := Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       v := bkt.Get([]byte(key))
-                       exists = v != nil
--                      return nil
-+                      return dirty, nil
-               }
-       }); err != nil {
-               log.Warn("%v", err)
-@@ -55,23 +59,25 @@ func Exists(bucket string, key string) (
- }
- func GetBucketLen(bucket string) (length int, err error) {
--      err = DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      err = Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       length = bkt.Stats().KeyN
-               }
--              return nil
-+              return dirty, nil
-       })
-       return length, err
- }
- func GetBucketKeys(bucket string) (keys []string, err error) {
--      err = DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      err = Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
--                      return bkt.ForEach(func(k, v []byte) error {
-+                      return dirty, bkt.ForEach(func(k, v []byte) error {
-                               keys = append(keys, string(k))
-                               return nil
-                       })
---- a/db/setOp.go
-+++ b/db/setOp.go
-@@ -4,8 +4,9 @@ import (
-       "bytes"
-       "crypto/sha256"
-       "encoding/gob"
--      "go.etcd.io/bbolt"
-+
-       "github.com/v2rayA/v2rayA/common"
-+      "go.etcd.io/bbolt"
- )
- type set map[[32]byte]interface{}
-@@ -28,26 +29,27 @@ func toSha256(val interface{}) (hash [32
- }
- func setOp(bucket string, key string, f func(m set) (readonly bool, err error)) (err error) {
--      return DB().Update(func(tx *bbolt.Tx) error {
--              if bkt, err := tx.CreateBucketIfNotExists([]byte(bucket)); err != nil {
--                      return err
-+      return Transaction(DB(), func(tx *bbolt.Tx) (bool, error) {
-+              dirty := false
-+              if bkt, err := CreateBucketIfNotExists(tx, []byte(bucket), &dirty); err != nil {
-+                      return dirty, err
-               } else {
-                       var m set
-                       v := bkt.Get([]byte(key))
-                       if v == nil {
-                               m = make(set)
-                       } else if err := gob.NewDecoder(bytes.NewReader(v)).Decode(&m); err != nil {
--                              return err
-+                              return dirty, err
-                       }
-                       if readonly, err := f(m); err != nil {
--                              return err
-+                              return dirty, err
-                       } else if readonly {
--                              return nil
-+                              return dirty, nil
-                       }
-                       if b, err := common.ToBytes(m); err != nil {
--                              return err
-+                              return dirty, err
-                       } else {
--                              return bkt.Put([]byte(key), b)
-+                              return true, bkt.Put([]byte(key), b)
-                       }
-               }
-       })
diff --git a/net/v2raya/patches/018-fix-do-not-rollback-closed-transaction.patch b/net/v2raya/patches/018-fix-do-not-rollback-closed-transaction.patch
deleted file mode 100644 (file)
index b9815f4..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 451912074ba1ba4000c66874876bc0a6b64cb5da Mon Sep 17 00:00:00 2001
-From: Kelo <meetkelo@outlook.com>
-Date: Sun, 30 Oct 2022 16:49:22 +0800
-Subject: [PATCH] fix: do not rollback closed transaction
-
----
- service/db/boltdb.go | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
---- a/db/boltdb.go
-+++ b/db/boltdb.go
-@@ -56,14 +56,13 @@ func Transaction(db *bbolt.DB, fn func(*
-       if err != nil {
-               return err
-       }
--      defer tx.Rollback()
-       dirty, err := fn(tx)
-       if err != nil {
-               _ = tx.Rollback()
-               return err
-       }
-       if !dirty {
--              return nil
-+              return tx.Rollback()
-       }
-       return tx.Commit()
- }
diff --git a/net/v2raya/patches/019-fix-simple-obfs.patch b/net/v2raya/patches/019-fix-simple-obfs.patch
deleted file mode 100644 (file)
index e76b49c..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-From 58a6cf270e43ec3eaeef7d1c65de76278dd6d349 Mon Sep 17 00:00:00 2001
-From: mzz2017 <2017@duck.com>
-Date: Mon, 13 Feb 2023 14:42:07 +0800
-Subject: [PATCH] fix: simple-obfs
-
----
- service/pkg/plugin/simpleobfs/http.go | 8 +++++++-
- service/pkg/plugin/simpleobfs/tls.go  | 7 +++++++
- 2 files changed, 14 insertions(+), 1 deletion(-)
-
---- a/pkg/plugin/simpleobfs/http.go
-+++ b/pkg/plugin/simpleobfs/http.go
-@@ -12,6 +12,7 @@ import (
-       "net"
-       "net/http"
-       "strings"
-+      "sync"
- )
- // HTTPObfs is shadowsocks http simple-obfs implementation
-@@ -24,9 +25,13 @@ type HTTPObfs struct {
-       offset        int
-       firstRequest  bool
-       firstResponse bool
-+      rMu           sync.Mutex
-+      wMu           sync.Mutex
- }
- func (ho *HTTPObfs) Read(b []byte) (int, error) {
-+      ho.rMu.Lock()
-+      defer ho.rMu.Unlock()
-       if ho.buf != nil {
-               n := copy(b, ho.buf[ho.offset:])
-               ho.offset += n
-@@ -64,6 +69,8 @@ func (ho *HTTPObfs) Read(b []byte) (int,
- }
- func (ho *HTTPObfs) Write(b []byte) (int, error) {
-+      ho.wMu.Lock()
-+      defer ho.wMu.Unlock()
-       if ho.firstRequest {
-               randBytes := make([]byte, 16)
-               rand.Read(randBytes)
-@@ -71,7 +78,6 @@ func (ho *HTTPObfs) Write(b []byte) (int
-               req.Header.Set("User-Agent", fmt.Sprintf("curl/7.%d.%d", rand.Int()%54, rand.Int()%2))
-               req.Header.Set("Upgrade", "websocket")
-               req.Header.Set("Connection", "Upgrade")
--              req.Host = ho.host
-               if ho.port != "80" {
-                       req.Host = fmt.Sprintf("%s:%s", ho.host, ho.port)
-               }
---- a/pkg/plugin/simpleobfs/tls.go
-+++ b/pkg/plugin/simpleobfs/tls.go
-@@ -8,6 +8,7 @@ import (
-       "io"
-       "math/rand"
-       "net"
-+      "sync"
-       "time"
- )
-@@ -26,6 +27,8 @@ type TLSObfs struct {
-       remain        int
-       firstRequest  bool
-       firstResponse bool
-+      rMu           sync.Mutex
-+      wMu           sync.Mutex
- }
- func (to *TLSObfs) read(b []byte, discardN int) (int, error) {
-@@ -54,6 +57,8 @@ func (to *TLSObfs) read(b []byte, discar
- }
- func (to *TLSObfs) Read(b []byte) (int, error) {
-+      to.rMu.Lock()
-+      defer to.rMu.Unlock()
-       if to.remain > 0 {
-               length := to.remain
-               if length > len(b) {
-@@ -77,6 +82,8 @@ func (to *TLSObfs) Read(b []byte) (int,
-       return to.read(b, 3)
- }
- func (to *TLSObfs) Write(b []byte) (int, error) {
-+      to.wMu.Lock()
-+      defer to.wMu.Unlock()
-       length := len(b)
-       for i := 0; i < length; i += chunkSize {
-               end := i + chunkSize
diff --git a/net/v2raya/patches/020-feat-add-nftables-support.patch b/net/v2raya/patches/020-feat-add-nftables-support.patch
deleted file mode 100644 (file)
index 50ef49b..0000000
+++ /dev/null
@@ -1,624 +0,0 @@
-From d10cf52839e848870df0ea852d9a818ac03e7aa3 Mon Sep 17 00:00:00 2001
-From: cubercsl <2014cais01@gmail.com>
-Date: Thu, 19 Jan 2023 16:43:30 +0800
-Subject: [PATCH 1/5] feat: add nftables support
-
-fix: use iptables-nft if nftables-support is on
-fix: save nft to V2RAYA_CONFIG
-fix: tproxy for ipv6
-chore: small change in table format
----
- service/conf/environmentConfig.go     |   1 +
- service/core/iptables/dropSpoofing.go |   4 +-
- service/core/iptables/iptables.go     |   7 +-
- service/core/iptables/redirect.go     | 142 +++++++++++++++++--
- service/core/iptables/tproxy.go       | 195 +++++++++++++++++++++++++-
- service/core/iptables/utils.go        |  23 ++-
- service/core/iptables/watcher.go      |   1 +
- service/core/v2ray/asset/asset.go     |  17 ++-
- service/core/v2ray/transparent.go     |   9 +-
- 9 files changed, 367 insertions(+), 32 deletions(-)
-
---- a/conf/environmentConfig.go
-+++ b/conf/environmentConfig.go
-@@ -24,6 +24,7 @@ type Params struct {
-       WebDir                  string   `id:"webdir" desc:"v2rayA web files directory. use embedded files if not specify."`
-       VlessGrpcInboundCertKey []string `id:"vless-grpc-inbound-cert-key" desc:"Specify the certification path instead of automatically generating a self-signed certificate. Example: /etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key"`
-       IPV6Support             string   `id:"ipv6-support" default:"auto" desc:"Optional values: auto, on, off. Make sure your IPv6 network works fine before you turn it on."`
-+      NFTablesSupport         string   `id:"nftables-support" default:"off" desc:"Optional values: auto, on, off. Experimental feature. Make sure you have installed nftables."`
-       PassCheckRoot           bool     `desc:"Skip privilege checking. Use it only when you cannot start v2raya but confirm you have root privilege"`
-       ResetPassword           bool     `id:"reset-password"`
-       LogLevel                string   `id:"log-level" default:"info" desc:"Optional values: trace, debug, info, warn or error"`
---- a/core/iptables/dropSpoofing.go
-+++ b/core/iptables/dropSpoofing.go
-@@ -34,7 +34,7 @@ ip6tables -w 2 -I FORWARD -j DROP_SPOOFI
- `
-       }
-       return Setter{
--              Cmds:      commands,
-+              Cmds: commands,
-       }
- }
-@@ -54,6 +54,6 @@ ip6tables -w 2 -X DROP_SPOOFING
- `
-       }
-       return Setter{
--              Cmds:      commands,
-+              Cmds: commands,
-       }
- }
---- a/core/iptables/iptables.go
-+++ b/core/iptables/iptables.go
-@@ -1,11 +1,12 @@
- package iptables
- import (
--      "github.com/v2rayA/v2rayA/common"
--      "github.com/v2rayA/v2rayA/common/cmds"
-       "strings"
-       "sync"
-       "time"
-+
-+      "github.com/v2rayA/v2rayA/common"
-+      "github.com/v2rayA/v2rayA/common/cmds"
- )
- // http://briteming.hatenablog.com/entry/2019/06/18/175518
-@@ -56,6 +57,10 @@ func (c Setter) Run(stopAtError bool) er
-       if common.IsDocker() {
-               commands = strings.ReplaceAll(commands, "iptables", "iptables-legacy")
-               commands = strings.ReplaceAll(commands, "ip6tables", "ip6tables-legacy")
-+      } else if (!cmds.IsCommandValid("iptables") || IsNFTablesSupported()) &&
-+              cmds.IsCommandValid("iptables-nft") {
-+              commands = strings.ReplaceAll(commands, "iptables", "iptables-nft")
-+              commands = strings.ReplaceAll(commands, "ip6tables", "ip6tables-nft")
-       }
-       var errs []error
-       if c.PreFunc != nil {
---- a/core/iptables/redirect.go
-+++ b/core/iptables/redirect.go
-@@ -2,15 +2,34 @@ package iptables
- import (
-       "fmt"
--      "github.com/v2rayA/v2rayA/common/cmds"
-+      "os"
-       "strings"
-+
-+      "github.com/v2rayA/v2rayA/common/cmds"
-+      "github.com/v2rayA/v2rayA/core/v2ray/asset"
- )
--type redirect struct{}
-+type redirect interface {
-+      AddIPWhitelist(cidr string)
-+      RemoveIPWhitelist(cidr string)
-+      GetSetupCommands() Setter
-+      GetCleanCommands() Setter
-+}
-+
-+type legacyRedirect struct{}
-+type nftRedirect struct{}
- var Redirect redirect
--func (r *redirect) AddIPWhitelist(cidr string) {
-+func init() {
-+      if IsNFTablesSupported() {
-+              Redirect = &nftRedirect{}
-+      } else {
-+              Redirect = &legacyRedirect{}
-+      }
-+}
-+
-+func (r *legacyRedirect) AddIPWhitelist(cidr string) {
-       // avoid duplication
-       r.RemoveIPWhitelist(cidr)
-       var commands string
-@@ -22,13 +41,13 @@ func (r *redirect) AddIPWhitelist(cidr s
-       cmds.ExecCommands(commands, false)
- }
--func (r *redirect) RemoveIPWhitelist(cidr string) {
-+func (r *legacyRedirect) RemoveIPWhitelist(cidr string) {
-       var commands string
-       commands = fmt.Sprintf(`iptables -w 2 -t mangle -D TP_RULE -d %s -j RETURN`, cidr)
-       cmds.ExecCommands(commands, false)
- }
--func (r *redirect) GetSetupCommands() Setter {
-+func (r *legacyRedirect) GetSetupCommands() Setter {
-       commands := `
- iptables -w 2 -t nat -N TP_OUT
- iptables -w 2 -t nat -N TP_PRE
-@@ -84,11 +103,11 @@ ip6tables -w 2 -t nat -A TP_OUT -j TP_RU
- `
-       }
-       return Setter{
--              Cmds:      commands,
-+              Cmds: commands,
-       }
- }
--func (r *redirect) GetCleanCommands() Setter {
-+func (r *legacyRedirect) GetCleanCommands() Setter {
-       commands := `
- iptables -w 2 -t nat -F TP_OUT
- iptables -w 2 -t nat -D OUTPUT -p tcp -j TP_OUT
-@@ -112,6 +131,113 @@ ip6tables -w 2 -t nat -X TP_RULE
- `
-       }
-       return Setter{
--              Cmds:      commands,
-+              Cmds: commands,
-+      }
-+}
-+
-+func (t *nftRedirect) AddIPWhitelist(cidr string) {
-+      command := fmt.Sprintf("nft add element inet v2raya interface { %s }", cidr)
-+      if !strings.Contains(cidr, ".") {
-+              command = strings.Replace(command, "interface", "interface6", 1)
-+      }
-+      cmds.ExecCommands(command, false)
-+}
-+
-+func (t *nftRedirect) RemoveIPWhitelist(cidr string) {
-+      command := fmt.Sprintf("nft delete element inet v2raya interface { %s }", cidr)
-+      if !strings.Contains(cidr, ".") {
-+              command = strings.Replace(command, "interface", "interface6", 1)
-       }
-+      cmds.ExecCommands(command, false)
-+}
-+
-+func (r *nftRedirect) GetSetupCommands() Setter {
-+      // 198.18.0.0/15 and fc00::/7 are reserved for private use but used by fakedns
-+      table := `
-+table inet v2raya {
-+    set whitelist {
-+        type ipv4_addr
-+        flags interval
-+        auto-merge
-+        elements = {
-+            0.0.0.0/32,
-+            10.0.0.0/8,
-+            100.64.0.0/10,
-+            127.0.0.0/8,
-+            169.254.0.0/16,
-+            172.16.0.0/12,
-+            192.0.0.0/24,
-+            192.0.2.0/24,
-+            192.88.99.0/24,
-+            192.168.0.0/16,
-+            198.51.100.0/24,
-+            203.0.113.0/24,
-+            224.0.0.0/4,
-+            240.0.0.0/4
-+        }
-+    }
-+
-+    set whitelist6 {
-+        type ipv6_addr
-+        flags interval
-+        auto-merge
-+        elements = {
-+            ::/128,
-+            ::1/128,
-+            64:ff9b::/96,
-+            100::/64,
-+            2001::/32,
-+            2001:20::/28,
-+            fe80::/10,
-+            ff00::/8
-+        }
-+    }
-+
-+    set interface {
-+        type ipv4_addr
-+        flags interval
-+        auto-merge
-+    }
-+
-+    set interface6 {
-+        type ipv6_addr
-+        flags interval
-+        auto-merge
-+    }
-+
-+    chain tp_rule {
-+        ip daddr @whitelist return
-+        ip daddr @interface return
-+        ip6 daddr @whitelist6 return
-+        ip6 daddr @interface6 return
-+        meta mark & 0x80 == 0x80 return
-+        meta l4proto tcp redirect to :32345
-+    }
-+
-+    chain tp_pre {
-+        type nat hook prerouting priority dstnat - 5
-+        meta nfproto { ipv4, ipv6 } meta l4proto tcp jump tp_rule
-+    }
-+
-+    chain tp_out {
-+        type nat hook output priority -105
-+        meta nfproto { ipv4, ipv6 } meta l4proto tcp jump tp_rule
-+    }
-+}
-+`
-+      if !IsIPv6Supported() {
-+              table = strings.ReplaceAll(table, "meta nfproto { ipv4, ipv6 }", "meta nfproto ipv4")
-+      }
-+
-+      nftablesConf := asset.GetNFTablesConfigPath()
-+      os.WriteFile(nftablesConf, []byte(table), 0644)
-+
-+      command := `nft -f ` + nftablesConf
-+
-+      return Setter{Cmds: command}
-+}
-+
-+func (r *nftRedirect) GetCleanCommands() Setter {
-+      command := `nft delete table inet v2raya`
-+      return Setter{Cmds: command}
- }
---- a/core/iptables/tproxy.go
-+++ b/core/iptables/tproxy.go
-@@ -2,18 +2,36 @@ package iptables
- import (
-       "fmt"
-+      "os"
-+      "strings"
-+
-       "github.com/v2rayA/v2rayA/common/cmds"
-+      "github.com/v2rayA/v2rayA/core/v2ray/asset"
-       "github.com/v2rayA/v2rayA/db/configure"
--      "strings"
- )
--type tproxy struct {
--      watcher *LocalIPWatcher
-+type tproxy interface {
-+      AddIPWhitelist(cidr string)
-+      RemoveIPWhitelist(cidr string)
-+      GetSetupCommands() Setter
-+      GetCleanCommands() Setter
- }
-+type legacyTproxy struct{}
-+
-+type nftTproxy struct{}
-+
- var Tproxy tproxy
--func (t *tproxy) AddIPWhitelist(cidr string) {
-+func init() {
-+      if IsNFTablesSupported() {
-+              Tproxy = &nftTproxy{}
-+      } else {
-+              Tproxy = &legacyTproxy{}
-+      }
-+}
-+
-+func (t *legacyTproxy) AddIPWhitelist(cidr string) {
-       // avoid duplication
-       t.RemoveIPWhitelist(cidr)
-       pos := 7
-@@ -30,7 +48,7 @@ func (t *tproxy) AddIPWhitelist(cidr str
-       cmds.ExecCommands(commands, false)
- }
--func (t *tproxy) RemoveIPWhitelist(cidr string) {
-+func (t *legacyTproxy) RemoveIPWhitelist(cidr string) {
-       var commands string
-       commands = fmt.Sprintf(`iptables -w 2 -t mangle -D TP_RULE -d %s -j RETURN`, cidr)
-       if !strings.Contains(cidr, ".") {
-@@ -40,7 +58,7 @@ func (t *tproxy) RemoveIPWhitelist(cidr
-       cmds.ExecCommands(commands, false)
- }
--func (t *tproxy) GetSetupCommands() Setter {
-+func (t *legacyTproxy) GetSetupCommands() Setter {
-       commands := `
- ip rule add fwmark 0x40/0xc0 table 100
- ip route add local 0.0.0.0/0 dev lo table 100
-@@ -158,7 +176,7 @@ ip6tables -w 2 -t mangle -A TP_MARK -j C
-       }
- }
--func (t *tproxy) GetCleanCommands() Setter {
-+func (t *legacyTproxy) GetCleanCommands() Setter {
-       commands := `
- ip rule del fwmark 0x40/0xc0 table 100 
- ip route del local 0.0.0.0/0 dev lo table 100
-@@ -195,3 +213,166 @@ ip6tables -w 2 -t mangle -X TP_MARK
-               Cmds:      commands,
-       }
- }
-+
-+func (t *nftTproxy) AddIPWhitelist(cidr string) {
-+      command := fmt.Sprintf("nft add element inet v2raya interface { %s }", cidr)
-+      if !strings.Contains(cidr, ".") {
-+              command = strings.Replace(command, "interface", "interface6", 1)
-+      }
-+      cmds.ExecCommands(command, false)
-+}
-+
-+func (t *nftTproxy) RemoveIPWhitelist(cidr string) {
-+      command := fmt.Sprintf("nft delete element inet v2raya interface { %s }", cidr)
-+      if !strings.Contains(cidr, ".") {
-+              command = strings.Replace(command, "interface", "interface6", 1)
-+      }
-+      cmds.ExecCommands(command, false)
-+}
-+
-+func (t *nftTproxy) GetSetupCommands() Setter {
-+      // 198.18.0.0/15 and fc00::/7 are reserved for private use but used by fakedns
-+      table := `
-+table inet v2raya {
-+    set whitelist {
-+        type ipv4_addr
-+        flags interval
-+        auto-merge
-+        elements = {
-+            0.0.0.0/32,
-+            10.0.0.0/8,
-+            100.64.0.0/10,
-+            127.0.0.0/8,
-+            169.254.0.0/16,
-+            172.16.0.0/12,
-+            192.0.0.0/24,
-+            192.0.2.0/24,
-+            192.88.99.0/24,
-+            192.168.0.0/16,
-+            198.51.100.0/24,
-+            203.0.113.0/24,
-+            224.0.0.0/4,
-+            240.0.0.0/4
-+        }
-+    }
-+
-+    set whitelist6 {
-+        type ipv6_addr
-+        flags interval
-+        auto-merge
-+        elements = {
-+            ::/128,
-+            ::1/128,
-+            64:ff9b::/96,
-+            100::/64,
-+            2001::/32,
-+            2001:20::/28,
-+            fe80::/10,
-+            ff00::/8
-+        }
-+    }
-+
-+    set interface {
-+        type ipv4_addr
-+        flags interval
-+        auto-merge
-+    }
-+
-+    set interface6 {
-+        type ipv6_addr
-+        flags interval
-+        auto-merge
-+    }
-+
-+    chain tp_out {
-+        meta mark & 0x80 == 0x80 return
-+        meta l4proto { tcp, udp } fib saddr type local fib daddr type != local jump tp_rule
-+    }
-+
-+    chain tp_pre {
-+        iifname "lo" mark & 0xc0 != 0x40 return
-+        meta l4proto { tcp, udp } fib saddr type != local fib daddr type != local jump tp_rule
-+        meta l4proto { tcp, udp } mark & 0xc0 == 0x40 tproxy ip to 127.0.0.1:32345
-+        meta l4proto { tcp, udp } mark & 0xc0 == 0x40 tproxy ip6 to [::1]:32345
-+    }
-+
-+    chain output {
-+        type route hook output priority mangle - 5; policy accept;
-+        meta nfproto { ipv4, ipv6 } jump tp_out
-+    }
-+
-+    chain prerouting {
-+        type filter hook prerouting priority mangle - 5; policy accept;
-+        meta nfproto { ipv4, ipv6 } jump tp_pre
-+    }
-+
-+    chain tp_rule {
-+        meta mark set ct mark
-+        meta mark & 0xc0 == 0x40 return
-+        iifname "docker*" return
-+        iifname "veth*" return
-+        iifname "wg*" return
-+        iifname "ppp*" return
-+        # anti-pollution
-+        ip daddr @interface return
-+        ip daddr @whitelist return
-+        ip6 daddr @interface6 return
-+        ip6 daddr @whitelist6 return
-+        jump tp_mark
-+    }
-+
-+    chain tp_mark {
-+        tcp flags & (fin | syn | rst | ack) == syn meta mark set mark | 0x40
-+        meta l4proto udp ct state new meta mark set mark | 0x40
-+        ct mark set mark
-+    }
-+}
-+`
-+      if configure.GetSettingNotNil().AntiPollution != configure.AntipollutionClosed {
-+              table = strings.ReplaceAll(table, "# anti-pollution", `
-+        meta l4proto { tcp, udp } th dport 53 jump tp_mark
-+        meta mark & 0xc0 == 0x40 return
-+              `)
-+      }
-+
-+      if !IsIPv6Supported() {
-+              // drop ipv6 packets hooks
-+              table = strings.ReplaceAll(table, "meta nfproto { ipv4, ipv6 }", "meta nfproto ipv4")
-+      }
-+
-+      nftablesConf := asset.GetNFTablesConfigPath()
-+      os.WriteFile(nftablesConf, []byte(table), 0644)
-+
-+      command := `
-+ip rule add fwmark 0x40/0xc0 table 100
-+ip route add local 0.0.0.0/0 dev lo table 100
-+`
-+      if IsIPv6Supported() {
-+              command += `
-+ip -6 rule add fwmark 0x40/0xc0 table 100
-+ip -6 route add local ::/0 dev lo table 100
-+`
-+      }
-+
-+      command += `nft -f ` + nftablesConf
-+      return Setter{Cmds: command}
-+}
-+
-+func (t *nftTproxy) GetCleanCommands() Setter {
-+      command := `
-+ip rule del fwmark 0x40/0xc0 table 100
-+ip route del local 0.0.0.0/0 dev lo table 100
-+`
-+      if IsIPv6Supported() {
-+              command += `
-+ip -6 rule del fwmark 0x40/0xc0 table 100
-+ip -6 route del local ::/0 dev lo table 100
-+              `
-+      }
-+
-+      command += `nft delete table inet v2raya`
-+      if !IsIPv6Supported() {
-+              command = strings.Replace(command, "inet", "ip", 1)
-+      }
-+      return Setter{Cmds: command}
-+}
---- a/core/iptables/utils.go
-+++ b/core/iptables/utils.go
-@@ -1,12 +1,13 @@
- package iptables
- import (
-+      "net"
-+      "strconv"
-+
-       "github.com/v2rayA/v2rayA/common"
-       "github.com/v2rayA/v2rayA/common/cmds"
-       "github.com/v2rayA/v2rayA/conf"
-       "golang.org/x/net/nettest"
--      "net"
--      "strconv"
- )
- func IPNet2CIDR(ipnet *net.IPNet) string {
-@@ -44,3 +45,21 @@ func IsIPv6Supported() bool {
-       }
-       return cmds.IsCommandValid("ip6tables")
- }
-+
-+func IsNFTablesSupported() bool {
-+
-+      switch conf.GetEnvironmentConfig().NFTablesSupport {
-+      // Warning:
-+      // This is an experimental feature for nftables support.
-+      // The default value is "off" for now but may be changed to "auto" in the future
-+      case "on":
-+              return true
-+      case "off":
-+              return false
-+      default:
-+      }
-+      if common.IsDocker() {
-+              return false
-+      }
-+      return cmds.IsCommandValid("nft")
-+}
---- a/core/iptables/watcher.go
-+++ b/core/iptables/watcher.go
-@@ -10,6 +10,7 @@ type LocalIPWatcher struct {
-       cidrPool    map[string]struct{}
-       AddedFunc   func(cidr string)
-       RemovedFunc func(cidr string)
-+      UpdateFunc  func(cidrs []string)
- }
- func NewLocalIPWatcher(interval time.Duration, AddedFunc func(cidr string), RemovedFunc func(cidr string)) *LocalIPWatcher {
---- a/core/v2ray/asset/asset.go
-+++ b/core/v2ray/asset/asset.go
-@@ -3,12 +3,6 @@ package asset
- import (
-       "errors"
-       "fmt"
--      "github.com/adrg/xdg"
--      "github.com/muhammadmuzzammil1998/jsonc"
--      "github.com/v2rayA/v2rayA/common/files"
--      "github.com/v2rayA/v2rayA/conf"
--      "github.com/v2rayA/v2rayA/core/v2ray/where"
--      "github.com/v2rayA/v2rayA/pkg/util/log"
-       "io"
-       "io/fs"
-       "net/http"
-@@ -17,6 +11,13 @@ import (
-       "path/filepath"
-       "runtime"
-       "time"
-+
-+      "github.com/adrg/xdg"
-+      "github.com/muhammadmuzzammil1998/jsonc"
-+      "github.com/v2rayA/v2rayA/common/files"
-+      "github.com/v2rayA/v2rayA/conf"
-+      "github.com/v2rayA/v2rayA/core/v2ray/where"
-+      "github.com/v2rayA/v2rayA/pkg/util/log"
- )
- func GetV2rayLocationAssetOverride() string {
-@@ -140,6 +141,10 @@ func GetV2rayConfigDirPath() (p string)
-       return conf.GetEnvironmentConfig().V2rayConfigDirectory
- }
-+func GetNFTablesConfigPath() (p string) {
-+      return path.Join(conf.GetEnvironmentConfig().Config, "v2raya.nft")
-+}
-+
- func Download(url string, to string) (err error) {
-       log.Info("Downloading %v to %v", url, to)
-       c := http.Client{Timeout: 90 * time.Second}
---- a/core/v2ray/transparent.go
-+++ b/core/v2ray/transparent.go
-@@ -2,13 +2,14 @@ package v2ray
- import (
-       "fmt"
-+      "strings"
-+      "time"
-+
-       "github.com/v2rayA/v2rayA/conf"
-       "github.com/v2rayA/v2rayA/core/iptables"
-       "github.com/v2rayA/v2rayA/core/specialMode"
-       "github.com/v2rayA/v2rayA/db/configure"
-       "github.com/v2rayA/v2rayA/pkg/util/log"
--      "strings"
--      "time"
- )
- func deleteTransparentProxyRules() {
-@@ -45,12 +46,12 @@ func writeTransparentProxyRules() (err e
-                       }
-                       return fmt.Errorf("not support \"tproxy\" mode of transparent proxy: %w", err)
-               }
--              iptables.SetWatcher(&iptables.Tproxy)
-+              iptables.SetWatcher(iptables.Tproxy)
-       case configure.TransparentRedirect:
-               if err = iptables.Redirect.GetSetupCommands().Run(true); err != nil {
-                       return fmt.Errorf("not support \"redirect\" mode of transparent proxy: %w", err)
-               }
--              iptables.SetWatcher(&iptables.Redirect)
-+              iptables.SetWatcher(iptables.Redirect)
-       case configure.TransparentSystemProxy:
-               if err = iptables.SystemProxy.GetSetupCommands().Run(true); err != nil {
-                       return fmt.Errorf("not support \"system proxy\" mode of transparent proxy: %w", err)
index a77a17b8006aae2dddc24ffd5a73522e6d45381f..f812d2a2e3caba8353ce7c993b1d8eabdf56bcd2 100644 (file)
@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apparmor
 PKG_VERSION:=3.0.3
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://gitlab.com/apparmor/apparmor/-/archive/v$(PKG_VERSION)
@@ -15,8 +15,7 @@ PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
 
-PKG_BUILD_DEPENDS:=swig/host
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=swig/host python-setuptools-scm/host
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -131,8 +130,6 @@ define Build/Compile
 endef
 
 define Build/Install
-       # Make sure we have python's setup tools installed
-       $(call Py3Build/InstallBuildDepends)
        $(INSTALL_DIR) $(PKG_INSTALL_DIR)-libapparmor $(PKG_INSTALL_DIR)-utils $(PKG_INSTALL_DIR)-profiles
        # Installing libapparmor
        +$(MAKE_VARS) PYTHON=$(HOST_PYTHON) VERSION=$(PYTHON3_VERSION) \
index 5a3720b1f05045b760903623753e8761aca483e2..b82a162b7abd9ff281aacdf8734887b5e7c9b413 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cni-plugins-nft
-PKG_VERSION:=1.0.11
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=1.0.12
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/greenpau/cni-plugins/archive/v$(PKG_VERSION)
-PKG_HASH:=f6c68268893c9d9967dd4d8f3684df0f4f989e7ebf373e72b20d1f290ff9e240
+PKG_HASH:=51c4b41c61f46c7dfc691d52dba301e7d8189589e1a625772f761ea3ae804fb3
 
 PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
 PKG_LICENSE:=Apache-2.0
index c3d2b8b6b10655f575f27c7c3d213b6859499b1f..270d93d7fb5f99641f76faed57a05ad1e47a2bea 100644 (file)
@@ -528,4 +528,4 @@ $(eval $(call BuildPlugin,write-graphite,Carbon/Graphite output,write_graphite,+
 $(eval $(call BuildPlugin,write-http,HTTP POST output,write_http,+PACKAGE_collectd-mod-write-http:libcurl))
 
 $(eval $(call BuildScriptPlugin,sqm,SQM/qdisc collection,sqm_collectd,+PACKAGE_collectd-mod-sqm:collectd-mod-exec))
-$(eval $(call BuildScriptLuaPlugin,ltq-dsl,Lantiq DSL collection,dsl,ltq-dsl-app +PACKAGE_collectd-mod-ltq-dsl:collectd-mod-lua +libubus-lua))
+$(eval $(call BuildScriptLuaPlugin,ltq-dsl,Lantiq DSL collection,dsl,@ltq-dsl-app +PACKAGE_collectd-mod-ltq-dsl:collectd-mod-lua +libubus-lua))
index d1af3ce962f1346c5077629ae3ae2dc402129334..dd1afd792c8511a0d9fa869604da96b9d95d0716 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=coreutils
-PKG_VERSION:=9.1
+PKG_VERSION:=9.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/coreutils
-PKG_HASH:=61a1f410d78ba7e7f37a5a4f50e6d1320aca33375484a3255eddf17a38580423
+PKG_HASH:=6885ff47b9cdb211de47d368c17853f406daaf98b148aaecdf10de29cc04b0b3
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=GPL-3.0-or-later
index e4feaf5cd9a45a3d029ff35f7821e8ab809f27d2..3c5bf2ec3af9dc5885b8a9164ca63fedf1a129e2 100644 (file)
@@ -9,7 +9,7 @@
  
  EXTRA_DIST =                          \
    .mailmap                            \
-@@ -210,6 +210,3 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib
+@@ -211,6 +211,3 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib
  
  include $(top_srcdir)/lib/local.mk
  include $(top_srcdir)/src/local.mk
@@ -18,7 +18,7 @@
 -include $(top_srcdir)/tests/local.mk
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -4115,11 +4115,7 @@ RECURSIVE_TARGETS = all-recursive check-
+@@ -4145,11 +4145,7 @@ RECURSIVE_TARGETS = all-recursive check-
        install-ps-recursive install-recursive installcheck-recursive \
        installdirs-recursive pdf-recursive ps-recursive \
        tags-recursive uninstall-recursive
@@ -31,7 +31,7 @@
  am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  am__vpath_adj = case $$p in \
      $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-@@ -4369,10 +4365,10 @@ am__DIST_COMMON = $(doc_coreutils_TEXINF
+@@ -4399,10 +4395,10 @@ am__DIST_COMMON = $(doc_coreutils_TEXINF
        $(top_srcdir)/build-aux/missing \
        $(top_srcdir)/build-aux/test-driver \
        $(top_srcdir)/build-aux/texinfo.tex \
        $(top_srcdir)/tests/local.mk ABOUT-NLS AUTHORS COPYING \
        ChangeLog INSTALL NEWS README THANKS TODO build-aux/compile \
        build-aux/config.guess build-aux/config.rpath \
-@@ -4479,7 +4475,7 @@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
- ERRNO_H = @ERRNO_H@
+@@ -4516,7 +4512,7 @@ ERROR_H = @ERROR_H@
  ETAGS = @ETAGS@
+ EUIDACCESS_LIBGEN = @EUIDACCESS_LIBGEN@
  EXEEXT = @EXEEXT@
 -EXTRA_MANS = @EXTRA_MANS@
 +EXTRA_MANS =
+ FDATASYNC_LIB = @FDATASYNC_LIB@
+ FILE_HAS_ACL_LIB = @FILE_HAS_ACL_LIB@
  FLOAT_H = @FLOAT_H@
- FNMATCH_H = @FNMATCH_H@
- GETADDRINFO_LIB = @GETADDRINFO_LIB@
-@@ -6057,7 +6053,7 @@ libexecdir = @libexecdir@
- lispdir = @lispdir@
- localedir = @localedir@
+@@ -6171,7 +6167,7 @@ localedir_c_make = @localedir_c_make@
  localstatedir = @localstatedir@
+ localstatedir_c = @localstatedir_c@
+ localstatedir_c_make = @localstatedir_c_make@
 -man1_MANS = @man1_MANS@
 +man1_MANS =
  mandir = @mandir@
- mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
-@@ -6080,7 +6076,7 @@ top_build_prefix = @top_build_prefix@
+ mandir_c = @mandir_c@
mandir_c_make = @mandir_c_make@
+@@ -6220,7 +6216,7 @@ top_build_prefix = @top_build_prefix@
  top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
  ALL_RECURSIVE_TARGETS = distcheck-hook check-root
@@ -73,7 +73,7 @@
  
  #if GNU_MAKE
  #     [nicer features that work only with GNU Make]
-@@ -8272,7 +8268,7 @@ all: $(BUILT_SOURCES)
+@@ -8425,7 +8421,7 @@ all: $(BUILT_SOURCES)
  .SUFFIXES: .1 .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sh .sh$(EXEEXT) .trs .x .xpl .xpl$(EXEEXT) .y
  am--refresh: Makefile
        @:
@@ -82,7 +82,7 @@
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-@@ -8294,7 +8290,7 @@ Makefile: $(srcdir)/Makefile.in $(top_bu
+@@ -8447,7 +8443,7 @@ Makefile: $(srcdir)/Makefile.in $(top_bu
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
        esac;
index 34ff2e08a6b74ed65e1973c77603db3acfae38a7..b172870e06a756ddd113c18dc04e0b86a3a48c4a 100644 (file)
@@ -1,14 +1,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=compose
-PKG_VERSION:=2.16.0
+PKG_VERSION:=2.17.2
 PKG_RELEASE:=1
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/docker/compose/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=556dc59075280442128f5b45a8ff37638fb357c2a956bd751dd0ba747c93e71d
+PKG_HASH:=d6e6de858ecdb0104991c86c66dde5dd4fb6a1160d707308d8ad3167450c8094
 
 PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 
index 622bfe49f505a5286b2c9390010028fbc8ab288a..2569762c69faff1d2962adc75540409e8f849a30 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fio
-PKG_VERSION:=3.29
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=3.34
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
-PKG_HASH:=acffb407d14e973321ada4cf234b2840a94fff7989350cfe62142daba79e6786
+PKG_HASH:=a5a28f19c701d4c8e04924bec1b85f6ac8c67fc8fe75968a5d6990e0b656a7a7
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0-or-later
index 3e2037d2cba52f6b1ec46e95351bd6a4d82ffd0f..b1e6d052ecb4b0b4d07c94b90e609836eb0a885a 100644 (file)
@@ -6,14 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gummiboot
-PKG_VERSION:=45
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=48.1
+PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/rzr/gummiboot.git
-PKG_SOURCE_DATE:=2021-04-11
-PKG_SOURCE_VERSION:=eb3daf2ca4cb1657cf1f780957485d690a552bf6
-PKG_MIRROR_HASH:=4c57791693b57bbe36e85b49d70310728b8008c4c545006a71c5a5f71b8df501
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://dev.alpinelinux.org/archive/gummiboot/
+PKG_HASH:=2b649a6eb22007cd34bb355ba4ca6c1a8058e115c13048985f09a0f11f3d5295
 
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=LICENSE
@@ -42,7 +40,8 @@ endef
 CONFIGURE_ARGS += \
        --with-efi-libdir=$(STAGING_DIR)/usr/lib \
        --with-efi-ldsdir=$(STAGING_DIR)/usr/lib \
-       --with-efi-includedir=$(STAGING_DIR)/usr/include
+       --with-efi-includedir=$(STAGING_DIR)/usr/include \
+       --disable-manpages
 
 define Build/Compile
        +$(MAKE_VARS) EFI_CFLAGS="-I$(TOOLCHAIN_DIR)/include $(TARGET_CFLAGS)" \
diff --git a/utils/gummiboot/patches/015-gummiboot-aarch64-support.patch b/utils/gummiboot/patches/015-gummiboot-aarch64-support.patch
new file mode 100644 (file)
index 0000000..84e3ee9
--- /dev/null
@@ -0,0 +1,121 @@
+From koen.kooi at linaro.org  Sat Apr 11 01:23:22 2015
+From: koen.kooi at linaro.org (Koen Kooi)
+Date: Sat, 11 Apr 2015 10:23:22 +0200
+Subject: [systemd-devel] [gummiboot][PATCH 1/5] Makefile: support non-x86
+       builds
+Message-ID: <1428740606-30060-1-git-send-email-koen.kooi@linaro.org>
+
+Move the no-mmx/no-sse CFLAGS to X86-64 and IA32 defines in preparation
+for ARM32 and Aarch64 support.
+
+Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
+---
+ Makefile.am | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -94,17 +94,23 @@ efi_cflags = \
+       -ffreestanding \
+       -fno-strict-aliasing \
+       -fno-stack-protector \
+-      -Wsign-compare \
+-      -mno-sse \
+-      -mno-mmx
++      -Wsign-compare
+ if ARCH_X86_64
+ efi_cflags += \
+       -mno-red-zone \
++      -mno-sse \
++      -mno-mmx
+       -DEFI_FUNCTION_WRAPPER \
+       -DGNU_EFI_USE_MS_ABI
+ endif
++if ARCH_IA32
++efi_cflags += \
++      -mno-sse \
++      -mno-mmx
++endif
++
+ efi_ldflags = \
+       $(EFI_LDFLAGS) \
+       -T $(EFI_LDS_DIR)/elf_$(ARCH)_efi.lds \
+@@ -115,6 +121,17 @@ efi_ldflags = \
+       -L $(EFI_LIB_DIR) \
+       $(EFI_LDS_DIR)/crt0-efi-$(ARCH).o
++# Aarch64 and ARM32 don't have an EFI capable objcopy
++if ARCH_AARCH64
++efi_ldflags += \
++      --defsym=EFI_SUBSYSTEM=0xa
++
++FORMAT = -O binary
++else
++FORMAT = --target=efi-app-$(ARCH)
++endif
++
++
+ # ------------------------------------------------------------------------------
+ gummiboot_headers = \
+       src/efi/util.h \
+@@ -150,7 +167,7 @@ $(gummiboot_solib): $(gummiboot_objects)
+ $(gummiboot): $(gummiboot_solib)
+       $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
+         -j .dynsym -j .rel -j .rela -j .reloc \
+-        --target=efi-app-$(ARCH) $< $@
++        $(FORMAT) $< $@
+ # ------------------------------------------------------------------------------
+ stub_headers = \
+@@ -185,7 +202,7 @@ $(stub_solib): $(stub_objects)
+ $(stub): $(stub_solib)
+       $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
+         -j .dynsym -j .rel -j .rela -j .reloc \
+-        --target=efi-app-$(ARCH) $< $@
++        $(FORMAT) $< $@
+ # ------------------------------------------------------------------------------
+ CLEANFILES += test-disk.img
+--- a/src/efi/util.c
++++ b/src/efi/util.c
+@@ -33,12 +33,17 @@ UINT64 ticks_read(VOID) {
+         __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
+         return (d << 32) | a;
+ }
+-#else
++#elif __i386__
+ UINT64 ticks_read(VOID) {
+         UINT64 val;
+         __asm__ volatile ("rdtsc" : "=A" (val));
+         return val;
+ }
++#else
++UINT64 ticks_read(VOID) {
++        UINT64 val = 1;
++        return val;
++}
+ #endif
+ /* count TSC ticks during a millisecond delay */
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,6 +51,7 @@ dnl Define ARCH_<NAME> conditionals
+ SET_ARCH(IA32, i*86*)
+ SET_ARCH(X86_64, x86_64*)
+ SET_ARCH(IA64, ia64*)
++SET_ARCH(AARCH64, aarch64*)
+ ARCH=`echo $host | sed "s/\(-\).*$//"`
+@@ -61,6 +62,9 @@ AM_COND_IF(ARCH_IA32, [
+ AM_COND_IF(ARCH_X86_64, [
+         MACHINE_TYPE_NAME=x64])
++AM_COND_IF(ARCH_AARCH64, [
++        MACHINE_TYPE_NAME=aa64])
++
+ AC_SUBST([ARCH])
+ AC_SUBST([MACHINE_TYPE_NAME])
index feafd092e2e3a0727b922e093b66c125e7c7ff3d..94b606afc152fc764cab302a1b08ff3635ce29f5 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=5.0.1
-PKG_RELEASE:=4
+PKG_VERSION:=5.0.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://linuxcontainers.org/downloads/lxc/
-PKG_HASH:=d8195423bb1e206f8521d24b6cde4789f043960c7cf065990a9cf741dcfd4222
+PKG_HASH:=bea08d2e49efcee34fa58acd2bc95c0adc64d291c07f4cfaf4ac1d8ac5a36f45
 
 PKG_MAINTAINER:=Marko Ratkaj <markoratkaj@gmail.com>
 PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause GPL-2.0
diff --git a/utils/lxc/patches/001-build-detect-where-struct-mount_attr-is-declared.patch b/utils/lxc/patches/001-build-detect-where-struct-mount_attr-is-declared.patch
deleted file mode 100644 (file)
index 89b52fc..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-From c1115e1503bf955c97f4cf3b925a6a9f619764c3 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <brauner@kernel.org>
-Date: Tue, 9 Aug 2022 16:14:25 +0200
-Subject: build: detect where struct mount_attr is declared
-
-Fixes: #4176
-Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
----
- meson.build                | 30 ++++++++++++++++++++++++++++--
- src/lxc/conf.c             |  6 +++---
- src/lxc/conf.h             |  2 +-
- src/lxc/mount_utils.c      |  6 +++---
- src/lxc/syscall_wrappers.h | 12 ++++++++++--
- 5 files changed, 45 insertions(+), 11 deletions(-)
-
---- a/meson.build
-+++ b/meson.build
-@@ -589,7 +589,6 @@ decl_headers = '''
- foreach decl: [
-     '__aligned_u64',
-     'struct clone_args',
--    'struct mount_attr',
-     'struct open_how',
-     'struct rtnl_link_stats64',
- ]
-@@ -609,7 +608,6 @@ foreach tuple: [
-     ['struct seccomp_notif_sizes'],
-     ['struct clone_args'],
-     ['__aligned_u64'],
--    ['struct mount_attr'],
-     ['struct open_how'],
-     ['struct rtnl_link_stats64'],
- ]
-@@ -629,6 +627,34 @@ foreach tuple: [
-     endif
- endforeach
-+## Types.
-+decl_headers = '''
-+#include <sys/mount.h>
-+'''
-+
-+# We get -1 if the size cannot be determined
-+if cc.sizeof('struct mount_attr', prefix: decl_headers, args: '-D_GNU_SOURCE') > 0
-+    srcconf.set10('HAVE_' + 'struct mount_attr'.underscorify().to_upper(), true)
-+    found_types += 'struct mount_attr (sys/mount.h)'
-+else
-+    srcconf.set10('HAVE_' + 'struct mount_attr'.underscorify().to_upper(), false)
-+    missing_types += 'struct mount_attr (sys/mount.h)'
-+endif
-+
-+## Types.
-+decl_headers = '''
-+#include <linux/mount.h>
-+'''
-+
-+# We get -1 if the size cannot be determined
-+if cc.sizeof('struct mount_attr', prefix: decl_headers, args: '-D_GNU_SOURCE') > 0
-+    srcconf.set10('HAVE_UAPI_' + 'struct mount_attr'.underscorify().to_upper(), true)
-+    found_types += 'struct mount_attr (linux/mount.h)'
-+else
-+    srcconf.set10('HAVE_UAPI_' + 'struct mount_attr'.underscorify().to_upper(), false)
-+    missing_types += 'struct mount_attr (linux/mount.h)'
-+endif
-+
- ## Headers.
- foreach ident: [
-     ['bpf',               '''#include <sys/syscall.h>
---- a/src/lxc/conf.c
-+++ b/src/lxc/conf.c
-@@ -2885,7 +2885,7 @@ static int __lxc_idmapped_mounts_child(s
-               struct lxc_mount_options opts = {};
-               int dfd_from;
-               const char *source_relative, *target_relative;
--              struct lxc_mount_attr attr = {};
-+              struct mount_attr attr = {};
-               ret = parse_lxc_mount_attrs(&opts, mntent.mnt_opts);
-               if (ret < 0)
-@@ -3005,7 +3005,7 @@ static int __lxc_idmapped_mounts_child(s
-               /* Set propagation mount options. */
-               if (opts.attr.propagation) {
--                      attr = (struct lxc_mount_attr) {
-+                      attr = (struct mount_attr) {
-                               .propagation = opts.attr.propagation,
-                       };
-@@ -4109,7 +4109,7 @@ int lxc_idmapped_mounts_parent(struct lx
-       for (;;) {
-               __do_close int fd_from = -EBADF, fd_userns = -EBADF;
--              struct lxc_mount_attr attr = {};
-+              struct mount_attr attr = {};
-               struct lxc_mount_options opts = {};
-               ssize_t ret;
---- a/src/lxc/conf.h
-+++ b/src/lxc/conf.h
-@@ -223,7 +223,7 @@ struct lxc_mount_options {
-       unsigned long mnt_flags;
-       unsigned long prop_flags;
-       char *data;
--      struct lxc_mount_attr attr;
-+      struct mount_attr attr;
-       char *raw_options;
- };
---- a/src/lxc/mount_utils.c
-+++ b/src/lxc/mount_utils.c
-@@ -31,7 +31,7 @@ lxc_log_define(mount_utils, lxc);
-  * setting in @attr_set, but must also specify MOUNT_ATTR__ATIME in the
-  * @attr_clr field.
-  */
--static inline void set_atime(struct lxc_mount_attr *attr)
-+static inline void set_atime(struct mount_attr *attr)
- {
-       switch (attr->attr_set & MOUNT_ATTR__ATIME) {
-       case MOUNT_ATTR_RELATIME:
-@@ -272,7 +272,7 @@ int create_detached_idmapped_mount(const
- {
-       __do_close int fd_tree_from = -EBADF;
-       unsigned int open_tree_flags = OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC;
--      struct lxc_mount_attr attr = {
-+      struct mount_attr attr = {
-               .attr_set       = MOUNT_ATTR_IDMAP | attr_set,
-               .attr_clr       = attr_clr,
-               .userns_fd      = userns_fd,
-@@ -335,7 +335,7 @@ int __fd_bind_mount(int dfd_from, const
-                   __u64 attr_clr, __u64 propagation, int userns_fd,
-                   bool recursive)
- {
--      struct lxc_mount_attr attr = {
-+      struct mount_attr attr = {
-               .attr_set       = attr_set,
-               .attr_clr       = attr_clr,
-               .propagation    = propagation,
---- a/src/lxc/syscall_wrappers.h
-+++ b/src/lxc/syscall_wrappers.h
-@@ -18,6 +18,12 @@
- #include "macro.h"
- #include "syscall_numbers.h"
-+#if HAVE_STRUCT_MOUNT_ATTR
-+#include <sys/mount.h>
-+#elif HAVE_UAPI_STRUCT_MOUNT_ATTR
-+#include <linux/mount.h>
-+#endif
-+
- #ifdef HAVE_LINUX_MEMFD_H
- #include <linux/memfd.h>
- #endif
-@@ -210,16 +216,18 @@ extern int fsmount(int fs_fd, unsigned i
- /*
-  * mount_setattr()
-  */
--struct lxc_mount_attr {
-+#if !HAVE_STRUCT_MOUNT_ATTR && !HAVE_UAPI_STRUCT_MOUNT_ATTR
-+struct mount_attr {
-       __u64 attr_set;
-       __u64 attr_clr;
-       __u64 propagation;
-       __u64 userns_fd;
- };
-+#endif
- #if !HAVE_MOUNT_SETATTR
- static inline int mount_setattr(int dfd, const char *path, unsigned int flags,
--                              struct lxc_mount_attr *attr, size_t size)
-+                              struct mount_attr *attr, size_t size)
- {
-       return syscall(__NR_mount_setattr, dfd, path, flags, attr, size);
- }
diff --git a/utils/lxc/patches/002-build-detect-sys-pidfd.h-availability.patch b/utils/lxc/patches/002-build-detect-sys-pidfd.h-availability.patch
deleted file mode 100644 (file)
index 677c08f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From ef1e0607b82e27350c2d677d649c6a0a9693fd40 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <brauner@kernel.org>
-Date: Tue, 9 Aug 2022 16:27:40 +0200
-Subject: build: detect sys/pidfd.h availability
-
-Fixes: #4176
-Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
----
- meson.build             | 1 +
- src/lxc/process_utils.h | 6 ++++++
- 2 files changed, 7 insertions(+)
-
---- a/meson.build
-+++ b/meson.build
-@@ -734,6 +734,7 @@ foreach tuple: [
-     ['sys/resource.h'],
-     ['sys/memfd.h'],
-     ['sys/personality.h'],
-+    ['sys/pidfd.h'],
-     ['sys/signalfd.h'],
-     ['sys/timerfd.h'],
-     ['pty.h'],
---- a/src/lxc/process_utils.h
-+++ b/src/lxc/process_utils.h
-@@ -15,6 +15,10 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-+#if HAVE_SYS_PIDFD_H
-+#include <sys/pidfd.h>
-+#endif
-+
- #include "compiler.h"
- #include "syscall_numbers.h"
-@@ -136,9 +140,11 @@
- #endif
- /* waitid */
-+#if !HAVE_SYS_PIDFD_H
- #ifndef P_PIDFD
- #define P_PIDFD 3
- #endif
-+#endif
- #ifndef CLONE_ARGS_SIZE_VER0
- #define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */
diff --git a/utils/lxc/patches/003-build-check-for-FS_CONFIG_-header-symbol-in-sys-moun.patch b/utils/lxc/patches/003-build-check-for-FS_CONFIG_-header-symbol-in-sys-moun.patch
deleted file mode 100644 (file)
index 20d4069..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-From cbabe8abf11e7e7fb49c123bae31efdd9bc8f1e8 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <brauner@kernel.org>
-Date: Tue, 9 Aug 2022 17:19:40 +0200
-Subject: build: check for FS_CONFIG_* header symbol in sys/mount.h
-
-Fixes: #4176
-Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
----
- meson.build           | 59 +++++++++++++++++++++++++++++++++++++++++--
- src/lxc/mount_utils.h | 16 ++++++++++++
- 2 files changed, 73 insertions(+), 2 deletions(-)
-
---- a/meson.build
-+++ b/meson.build
-@@ -638,8 +638,7 @@ if cc.sizeof('struct mount_attr', prefix
-     found_types += 'struct mount_attr (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'struct mount_attr'.underscorify().to_upper(), false)
--    missing_types += 'struct mount_attr (sys/mount.h)'
--endif
-+    missing_types += 'struct mount_attr (sys/mount.h)' endif
- ## Types.
- decl_headers = '''
-@@ -655,6 +654,62 @@ else
-     missing_types += 'struct mount_attr (linux/mount.h)'
- endif
-+if cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')
-+    srcconf.set10('HAVE_' + 'FSCONFIG_SET_FLAG'.underscorify().to_upper(), true)
-+    found_types += 'FSCONFIG_SET_FLAG'
-+else
-+    srcconf.set10('HAVE_' + 'FSCONFIG_SET_FLAG'.underscorify().to_upper(), false)
-+    missing_types += 'FSCONFIG_SET_FLAG'
-+endif
-+
-+if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_STRING')
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_STRING'.underscorify().to_upper(), true)
-+    found_types += 'FS_CONFIG_SET_STRING'
-+else
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_STRING'.underscorify().to_upper(), false)
-+    missing_types += 'FS_CONFIG_SET_STRING'
-+endif
-+
-+if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_BINARY')
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_BINARY'.underscorify().to_upper(), true)
-+    found_types += 'FS_CONFIG_SET_BINARY'
-+else
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_BINARY'.underscorify().to_upper(), false)
-+    missing_types += 'FS_CONFIG_SET_BINARY'
-+endif
-+
-+if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_PATH_EMPTY')
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_EMPTY'.underscorify().to_upper(), true)
-+    found_types += 'FS_CONFIG_SET_PATH_EMPTY'
-+else
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_EMPTY'.underscorify().to_upper(), false)
-+    missing_types += 'FS_CONFIG_SET_PATH_EMPTY'
-+endif
-+
-+if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_PATH_FD')
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_FD'.underscorify().to_upper(), true)
-+    found_types += 'FS_CONFIG_SET_PATH_FD'
-+else
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_FD'.underscorify().to_upper(), false)
-+    missing_types += 'FS_CONFIG_SET_PATH_FD'
-+endif
-+
-+if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_CMD_CREATE')
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_CREATE'.underscorify().to_upper(), true)
-+    found_types += 'FS_CONFIG_SET_CMD_CREATE'
-+else
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_CREATE'.underscorify().to_upper(), false)
-+    missing_types += 'FS_CONFIG_SET_CMD_CREATE'
-+endif
-+
-+if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_CMD_RECONFIGURE')
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_RECONFIGURE'.underscorify().to_upper(), true)
-+    found_types += 'FS_CONFIG_SET_CMD_RECONFIGURE'
-+else
-+    srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_RECONFIGURE'.underscorify().to_upper(), false)
-+    missing_types += 'FS_CONFIG_SET_CMD_RECONFIGURE'
-+endif
-+
- ## Headers.
- foreach ident: [
-     ['bpf',               '''#include <sys/syscall.h>
---- a/src/lxc/mount_utils.h
-+++ b/src/lxc/mount_utils.h
-@@ -82,37 +82,53 @@ struct lxc_rootfs;
- #endif
- /* fsconfig() commands */
-+#if !HAVE_FSCONFIG_SET_FLAG
- #ifndef FSCONFIG_SET_FLAG
- #define FSCONFIG_SET_FLAG 0 /* Set parameter, supplying no value */
- #endif
-+#endif
-+#if !HAVE_FSCONFIG_SET_STRING
- #ifndef FSCONFIG_SET_STRING
- #define FSCONFIG_SET_STRING 1 /* Set parameter, supplying a string value */
- #endif
-+#endif
-+#if !HAVE_FSCONFIG_SET_BINARY
- #ifndef FSCONFIG_SET_BINARY
- #define FSCONFIG_SET_BINARY 2 /* Set parameter, supplying a binary blob value */
- #endif
-+#endif
-+#if !HAVE_FSCONFIG_SET_PATH
- #ifndef FSCONFIG_SET_PATH
- #define FSCONFIG_SET_PATH 3 /* Set parameter, supplying an object by path */
- #endif
-+#endif
-+#if !HAVE_FSCONFIG_SET_PATH_EMPTY
- #ifndef FSCONFIG_SET_PATH_EMPTY
- #define FSCONFIG_SET_PATH_EMPTY 4 /* Set parameter, supplying an object by (empty) path */
- #endif
-+#endif
-+#if !HAVE_FSCONFIG_SET_FD
- #ifndef FSCONFIG_SET_FD
- #define FSCONFIG_SET_FD 5 /* Set parameter, supplying an object by fd */
- #endif
-+#endif
-+#if !HAVE_FSCONFIG_CMD_CREATE
- #ifndef FSCONFIG_CMD_CREATE
- #define FSCONFIG_CMD_CREATE 6 /* Invoke superblock creation */
- #endif
-+#endif
-+#if !FSCONFIG_CMD_RECONFIGURE
- #ifndef FSCONFIG_CMD_RECONFIGURE
- #define       FSCONFIG_CMD_RECONFIGURE 7      /* Invoke superblock reconfiguration */
- #endif
-+#endif
- /* fsmount() flags */
- #ifndef FSMOUNT_CLOEXEC
diff --git a/utils/lxc/patches/011-tree-wide-wipe-direct-or-indirect-linux-mount.h-incl.patch b/utils/lxc/patches/011-tree-wide-wipe-direct-or-indirect-linux-mount.h-incl.patch
deleted file mode 100644 (file)
index eb19001..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-From 4771699fd97b1e9ee7dc4f7cfe01c8ddd698f682 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <brauner@kernel.org>
-Date: Wed, 10 Aug 2022 11:42:52 +0200
-Subject: tree-wide: wipe direct or indirect linux/mount.h inclusion
-
-It is incompatible with sys/mount.h and causes massive headaches.
-
-Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
----
- meson.build                | 44 +++++++++++++-------------------------
- src/lxc/macro.h            | 13 +++++++++++
- src/lxc/mount_utils.h      |  2 +-
- src/lxc/syscall_wrappers.h |  9 ++------
- src/lxc/utils.c            |  2 --
- 5 files changed, 31 insertions(+), 39 deletions(-)
-
---- a/meson.build
-+++ b/meson.build
-@@ -627,7 +627,6 @@ foreach tuple: [
-     endif
- endforeach
--## Types.
- decl_headers = '''
- #include <sys/mount.h>
- '''
-@@ -640,74 +639,61 @@ else
-     srcconf.set10('HAVE_' + 'struct mount_attr'.underscorify().to_upper(), false)
-     missing_types += 'struct mount_attr (sys/mount.h)' endif
--## Types.
--decl_headers = '''
--#include <linux/mount.h>
--'''
--
--# We get -1 if the size cannot be determined
--if cc.sizeof('struct mount_attr', prefix: decl_headers, args: '-D_GNU_SOURCE') > 0
--    srcconf.set10('HAVE_UAPI_' + 'struct mount_attr'.underscorify().to_upper(), true)
--    found_types += 'struct mount_attr (linux/mount.h)'
--else
--    srcconf.set10('HAVE_UAPI_' + 'struct mount_attr'.underscorify().to_upper(), false)
--    missing_types += 'struct mount_attr (linux/mount.h)'
--endif
--
-+## Check if sys/mount.h defines the fsconfig commands
- if cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')
-     srcconf.set10('HAVE_' + 'FSCONFIG_SET_FLAG'.underscorify().to_upper(), true)
--    found_types += 'FSCONFIG_SET_FLAG'
-+    found_types += 'FSCONFIG_SET_FLAG (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'FSCONFIG_SET_FLAG'.underscorify().to_upper(), false)
--    missing_types += 'FSCONFIG_SET_FLAG'
-+    missing_types += 'FSCONFIG_SET_FLAG (sys/mount.h)'
- endif
- if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_STRING')
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_STRING'.underscorify().to_upper(), true)
--    found_types += 'FS_CONFIG_SET_STRING'
-+    found_types += 'FS_CONFIG_SET_STRING (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_STRING'.underscorify().to_upper(), false)
--    missing_types += 'FS_CONFIG_SET_STRING'
-+    missing_types += 'FS_CONFIG_SET_STRING (sys/mount.h)'
- endif
- if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_BINARY')
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_BINARY'.underscorify().to_upper(), true)
--    found_types += 'FS_CONFIG_SET_BINARY'
-+    found_types += 'FS_CONFIG_SET_BINARY (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_BINARY'.underscorify().to_upper(), false)
--    missing_types += 'FS_CONFIG_SET_BINARY'
-+    missing_types += 'FS_CONFIG_SET_BINARY (sys/mount.h)'
- endif
- if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_PATH_EMPTY')
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_EMPTY'.underscorify().to_upper(), true)
--    found_types += 'FS_CONFIG_SET_PATH_EMPTY'
-+    found_types += 'FS_CONFIG_SET_PATH_EMPTY (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_EMPTY'.underscorify().to_upper(), false)
--    missing_types += 'FS_CONFIG_SET_PATH_EMPTY'
-+    missing_types += 'FS_CONFIG_SET_PATH_EMPTY (sys/mount.h)'
- endif
- if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_PATH_FD')
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_FD'.underscorify().to_upper(), true)
--    found_types += 'FS_CONFIG_SET_PATH_FD'
-+    found_types += 'FS_CONFIG_SET_PATH_FD (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_PATH_FD'.underscorify().to_upper(), false)
--    missing_types += 'FS_CONFIG_SET_PATH_FD'
-+    missing_types += 'FS_CONFIG_SET_PATH_FD (sys/mount.h)'
- endif
- if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_CMD_CREATE')
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_CREATE'.underscorify().to_upper(), true)
--    found_types += 'FS_CONFIG_SET_CMD_CREATE'
-+    found_types += 'FS_CONFIG_SET_CMD_CREAT (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_CREATE'.underscorify().to_upper(), false)
--    missing_types += 'FS_CONFIG_SET_CMD_CREATE'
-+    missing_types += 'FS_CONFIG_SET_CMD_CREATE (sys/mount.h)'
- endif
- if cc.has_header_symbol('sys/mount.h', 'FS_CONFIG_SET_CMD_RECONFIGURE')
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_RECONFIGURE'.underscorify().to_upper(), true)
--    found_types += 'FS_CONFIG_SET_CMD_RECONFIGURE'
-+    found_types += 'FS_CONFIG_SET_CMD_RECONFIGURE (sys/mount.h)'
- else
-     srcconf.set10('HAVE_' + 'FS_CONFIG_SET_CMD_RECONFIGURE'.underscorify().to_upper(), false)
--    missing_types += 'FS_CONFIG_SET_CMD_RECONFIGURE'
-+    missing_types += 'FS_CONFIG_SET_CMD_RECONFIGURE (sys/mount.h)'
- endif
- ## Headers.
---- a/src/lxc/macro.h
-+++ b/src/lxc/macro.h
-@@ -8,6 +8,7 @@
- #include <asm/types.h>
- #include <limits.h>
- #include <linux/if_link.h>
-+#include <linux/ioctl.h>
- #include <linux/loop.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
-@@ -812,4 +813,16 @@ static inline bool is_set(__u32 bit, __u
- #define BIT(nr) (1UL << (nr))
-+#ifndef FS_IOC_GETFLAGS
-+#define FS_IOC_GETFLAGS _IOR('f', 1, long)
-+#endif
-+
-+#ifndef FS_IOC_SETFLAGS
-+#define FS_IOC_SETFLAGS _IOW('f', 2, long)
-+#endif
-+
-+#ifndef FS_IMMUTABLE_FL
-+#define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */
-+#endif
-+
- #endif /* __LXC_MACRO_H */
---- a/src/lxc/mount_utils.h
-+++ b/src/lxc/mount_utils.h
-@@ -124,7 +124,7 @@ struct lxc_rootfs;
- #endif
- #endif
--#if !FSCONFIG_CMD_RECONFIGURE
-+#if !HAVE_FSCONFIG_CMD_RECONFIGURE
- #ifndef FSCONFIG_CMD_RECONFIGURE
- #define       FSCONFIG_CMD_RECONFIGURE 7      /* Invoke superblock reconfiguration */
- #endif
---- a/src/lxc/syscall_wrappers.h
-+++ b/src/lxc/syscall_wrappers.h
-@@ -10,6 +10,7 @@
- #include <linux/keyctl.h>
- #include <sched.h>
- #include <stdint.h>
-+#include <sys/mount.h>
- #include <sys/prctl.h>
- #include <sys/syscall.h>
- #include <sys/types.h>
-@@ -18,12 +19,6 @@
- #include "macro.h"
- #include "syscall_numbers.h"
--#if HAVE_STRUCT_MOUNT_ATTR
--#include <sys/mount.h>
--#elif HAVE_UAPI_STRUCT_MOUNT_ATTR
--#include <linux/mount.h>
--#endif
--
- #ifdef HAVE_LINUX_MEMFD_H
- #include <linux/memfd.h>
- #endif
-@@ -216,7 +211,7 @@ extern int fsmount(int fs_fd, unsigned i
- /*
-  * mount_setattr()
-  */
--#if !HAVE_STRUCT_MOUNT_ATTR && !HAVE_UAPI_STRUCT_MOUNT_ATTR
-+#if !HAVE_STRUCT_MOUNT_ATTR
- struct mount_attr {
-       __u64 attr_set;
-       __u64 attr_clr;
---- a/src/lxc/utils.c
-+++ b/src/lxc/utils.c
-@@ -19,8 +19,6 @@
- #include <string.h>
- #include <sys/mman.h>
- #include <sys/mount.h>
--/* Needs to be after sys/mount.h header */
--#include <linux/fs.h>
- #include <sys/param.h>
- #include <sys/prctl.h>
- #include <sys/stat.h>
diff --git a/utils/lxc/patches/012-tree-wide-use-struct-clone_args-directly.patch b/utils/lxc/patches/012-tree-wide-use-struct-clone_args-directly.patch
deleted file mode 100644 (file)
index 7ab536e..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-From 63468abd3287ebd5cc4ed9205334217031049fb4 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <brauner@kernel.org>
-Date: Wed, 10 Aug 2022 12:03:54 +0200
-Subject: tree-wide: use struct clone_args directly
-
-Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
----
- meson.build             | 1 -
- src/lxc/process_utils.c | 2 +-
- src/lxc/process_utils.h | 7 ++++---
- src/lxc/start.c         | 2 +-
- src/lxc/start.h         | 1 -
- src/tests/reboot.c      | 2 --
- 6 files changed, 6 insertions(+), 9 deletions(-)
-
---- a/meson.build
-+++ b/meson.build
-@@ -582,7 +582,6 @@ decl_headers = '''
- #include <linux/fs.h>
- #include <linux/if_link.h>
- #include <linux/openat2.h>
--#include <linux/sched.h>
- #include <linux/types.h>
- '''
---- a/src/lxc/process_utils.c
-+++ b/src/lxc/process_utils.c
-@@ -90,7 +90,7 @@ __returns_twice pid_t lxc_raw_legacy_clo
- __returns_twice pid_t lxc_raw_clone(unsigned long flags, int *pidfd)
- {
-       pid_t pid;
--      struct lxc_clone_args args = {
-+      struct clone_args args = {
-               .flags          = flags,
-               .pidfd          = ptr_to_u64(pidfd),
-       };
---- a/src/lxc/process_utils.h
-+++ b/src/lxc/process_utils.h
-@@ -5,7 +5,6 @@
- #include "config.h"
--#include <linux/sched.h>
- #include <sched.h>
- #include <signal.h>
- #include <stdbool.h>
-@@ -165,7 +164,8 @@
- #define u64_to_ptr(x) ((void *)(uintptr_t)x)
- #endif
--struct lxc_clone_args {
-+#if !HAVE_STRUCT_CLONE_ARGS
-+struct clone_args {
-       __aligned_u64 flags;
-       __aligned_u64 pidfd;
-       __aligned_u64 child_tid;
-@@ -178,8 +178,9 @@ struct lxc_clone_args {
-       __aligned_u64 set_tid_size;
-       __aligned_u64 cgroup;
- };
-+#endif
--__returns_twice static inline pid_t lxc_clone3(struct lxc_clone_args *args, size_t size)
-+__returns_twice static inline pid_t lxc_clone3(struct clone_args *args, size_t size)
- {
-       return syscall(__NR_clone3, args, size);
- }
---- a/src/lxc/start.c
-+++ b/src/lxc/start.c
-@@ -1673,7 +1673,7 @@ static int lxc_spawn(struct lxc_handler
-       } else {
-               int cgroup_fd = -EBADF;
--              struct lxc_clone_args clone_args = {
-+              struct clone_args clone_args = {
-                       .flags = handler->clone_flags,
-                       .pidfd = ptr_to_u64(&handler->pidfd),
-                       .exit_signal = SIGCHLD,
---- a/src/lxc/start.h
-+++ b/src/lxc/start.h
-@@ -5,7 +5,6 @@
- #include "config.h"
--#include <linux/sched.h>
- #include <sched.h>
- #include <signal.h>
- #include <stdbool.h>
---- a/src/tests/reboot.c
-+++ b/src/tests/reboot.c
-@@ -32,8 +32,6 @@
- #include "namespace.h"
--#include <sched.h>
--#include <linux/sched.h>
- #include <linux/reboot.h>
- int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...);
diff --git a/utils/lxc/patches/013-tree-wide-use-struct-open_how-directly.patch b/utils/lxc/patches/013-tree-wide-use-struct-open_how-directly.patch
deleted file mode 100644 (file)
index cbcd081..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-From 133aa416ca2a5996090ec0e697e253646364d274 Mon Sep 17 00:00:00 2001
-From: Christian Brauner <brauner@kernel.org>
-Date: Wed, 10 Aug 2022 12:18:49 +0200
-Subject: tree-wide: use struct open_how directly
-
-Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
----
- meson.build                | 2 --
- src/lxc/file_utils.c       | 2 +-
- src/lxc/mount_utils.c      | 8 ++++----
- src/lxc/syscall_wrappers.h | 6 ++++--
- src/lxc/utils.c            | 2 +-
- 5 files changed, 10 insertions(+), 10 deletions(-)
-
---- a/meson.build
-+++ b/meson.build
-@@ -579,9 +579,7 @@ decl_headers = '''
- #include <uchar.h>
- #include <sys/mount.h>
- #include <sys/stat.h>
--#include <linux/fs.h>
- #include <linux/if_link.h>
--#include <linux/openat2.h>
- #include <linux/types.h>
- '''
---- a/src/lxc/file_utils.c
-+++ b/src/lxc/file_utils.c
-@@ -652,7 +652,7 @@ int open_at(int dfd, const char *path, u
-           unsigned int resolve_flags, mode_t mode)
- {
-       __do_close int fd = -EBADF;
--      struct lxc_open_how how = {
-+      struct open_how how = {
-               .flags          = o_flags,
-               .mode           = mode,
-               .resolve        = resolve_flags,
---- a/src/lxc/mount_utils.c
-+++ b/src/lxc/mount_utils.c
-@@ -186,7 +186,7 @@ int fs_prepare(const char *fs_name,
-       int fd_from;
-       if (!is_empty_string(path_from)) {
--              struct lxc_open_how how = {
-+              struct open_how how = {
-                       .flags          = o_flags_from,
-                       .resolve        = resolve_flags_from,
-               };
-@@ -237,7 +237,7 @@ int fs_attach(int fd_fs,
-       int fd_to, ret;
-       if (!is_empty_string(path_to)) {
--              struct lxc_open_how how = {
-+              struct open_how how = {
-                       .flags          = o_flags_to,
-                       .resolve        = resolve_flags_to,
-               };
-@@ -308,7 +308,7 @@ int move_detached_mount(int dfd_from, in
-       int fd_to, ret;
-       if (!is_empty_string(path_to)) {
--              struct lxc_open_how how = {
-+              struct open_how how = {
-                       .flags          = o_flags_to,
-                       .resolve        = resolve_flags_to,
-               };
-@@ -348,7 +348,7 @@ int __fd_bind_mount(int dfd_from, const
-       set_atime(&attr);
-       if (!is_empty_string(path_from)) {
--              struct lxc_open_how how = {
-+              struct open_how how = {
-                       .flags          = o_flags_from,
-                       .resolve        = resolve_flags_from,
-               };
---- a/src/lxc/syscall_wrappers.h
-+++ b/src/lxc/syscall_wrappers.h
-@@ -240,11 +240,13 @@ static inline int mount_setattr(int dfd,
-  * @mode: O_CREAT/O_TMPFILE file mode.
-  * @resolve: RESOLVE_* flags.
-  */
--struct lxc_open_how {
-+#if !HAVE_STRUCT_OPEN_HOW
-+struct open_how {
-       __u64 flags;
-       __u64 mode;
-       __u64 resolve;
- };
-+#endif
- /* how->resolve flags for openat2(2). */
- #ifndef RESOLVE_NO_XDEV
-@@ -296,7 +298,7 @@ struct lxc_open_how {
- #define PROTECT_OPEN_RW (O_CLOEXEC | O_NOCTTY | O_RDWR | O_NOFOLLOW)
- #if !HAVE_OPENAT2
--static inline int openat2(int dfd, const char *filename, struct lxc_open_how *how, size_t size)
-+static inline int openat2(int dfd, const char *filename, struct open_how *how, size_t size)
- {
-       return syscall(__NR_openat2, dfd, filename, how, size);
- }
---- a/src/lxc/utils.c
-+++ b/src/lxc/utils.c
-@@ -1095,7 +1095,7 @@ int __safe_mount_beneath_at(int beneath_
-                           unsigned int flags, const void *data)
- {
-       __do_close int source_fd = -EBADF, target_fd = -EBADF;
--      struct lxc_open_how how = {
-+      struct open_how how = {
-               .flags          = PROTECT_OPATH_DIRECTORY,
-               .resolve        = PROTECT_LOOKUP_BENEATH_WITH_MAGICLINKS,
-       };
index 2db13c5832e4c71faaff666ea07da5b4a0c987a6..e68b289501af04534dfbc5e4d3fdb74d4df9c2b4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
 PKG_VERSION:=7.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/nano
@@ -138,7 +138,7 @@ endef
 define Package/nano-full/install
        $(call Package/nano/install,$1)
        $(INSTALL_DIR) $(1)/etc $(1)/usr/share/nano
-       $(INSTALL_CONF) ./files/nanorc $(1)/etc/nanorc
+       $(INSTALL_DATA) ./files/nanorc $(1)/etc/nanorc
        $(INSTALL_DATA) ./files/uci.nanorc $(1)/usr/share/nano
        $(CP) $(PKG_INSTALL_DIR)/usr/share/nano/* $(1)/usr/share/nano
 endef
index 172639304d45b2845eac1f8316d576ab8e28ba3f..c86af28a2deff236003b51e818fde1722a0efebb 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=open-vm-tools
-PKG_VERSION:=12.1.5
+PKG_VERSION:=12.2.0
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-20735119.tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-21223074.tar.gz
 PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION)
-PKG_HASH:=72cb68c71c59fd429bcb357926f41f07e21c737a341534b707fc1df010ed4868
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-20735119
+PKG_HASH:=ddc797cb75c435ad03c197ee0753156add148d06aefb14587dd31bff7556479a
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-21223074
 
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=LICENSE
@@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=glib2/host
+PKG_BUILD_DEPENDS:=glib2/host rpcsvc-proto/host
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
index 223939b73671da2558b5fc4d24a68ed5aa8f1763..09eb72d3843e8dbcfada661b02dccdb34b0b1896 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1451,7 +1451,17 @@ AC_C_VOLATILE
+@@ -1461,7 +1461,17 @@ AC_C_VOLATILE
  
  ### General flags / actions
  CFLAGS="$CFLAGS -Wall"
index de31de4a16388b3fa0f4ab931dff8b16508dbdae..90392f69bf3fcb4e731aeaba47c1dd55cea730bd 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1441,6 +1441,7 @@ AC_TYPE_OFF_T
+@@ -1451,6 +1451,7 @@ AC_TYPE_OFF_T
  AC_TYPE_PID_T
  AC_TYPE_SIZE_T
  AC_CHECK_MEMBERS([struct stat.st_rdev])
index 3e0b8f31608d20ec292d14983726aef2969718a3..579846b42195ac8e11879b9fc6681e855290ef5c 100644 (file)
@@ -27,7 +27,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1169,6 +1169,7 @@ AC_CHECK_FUNCS(
+@@ -1179,6 +1179,7 @@ AC_CHECK_FUNCS(
  
  AC_CHECK_FUNCS([ecvt])
  AC_CHECK_FUNCS([fcvt])
@@ -35,7 +35,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
  
  AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes])
  
-@@ -1378,10 +1379,13 @@ fi
+@@ -1388,10 +1389,13 @@ fi
  ###
  
  AC_CHECK_HEADERS([crypt.h])
@@ -65,7 +65,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
  #ifdef __APPLE__
  #include <sys/socket.h>
  #include <TargetConditionals.h>
-@@ -1025,31 +1022,32 @@ Id_EndSuperUser(uid_t uid)  // IN:
+@@ -1025,24 +1022,23 @@ Id_EndSuperUser(uid_t uid)  // IN:
  static Bool
  IdIsSetUGid(void)
  {
@@ -77,13 +77,13 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
      * We use __secure_getenv, which returns NULL if the binary is
 -    * setuid or setgid. Alternatives include,
 +    * setuid or setgid, when issetugid or getauxval(AT_SECURE) is not
-+    * available. Alternatives include,
++    * available. Alternatives included
      *
 -    *   a) getauxval(AT_SECURE); not available until glibc 2.16.
 -    *   b) __libc_enable_secure; may not be exported.
 +    *   a) issetugid(); not (yet?) available in glibc.
 +    *   b) getauxval(AT_SECURE); not available until glibc 2.16.
-+    *   c) __libc_enable_secure; may not be exported.
++    *   c) c) __libc_enable_secure; may not be exported.
      *
 -    * Use (a) when we are based on glibc 2.16, or newer.
 +    * Use (b) when we are based on glibc 2.16, or newer.
@@ -99,10 +99,11 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
 +#elif HAVE___SECURE_GETENV
     static const char envName[] = "VMW_SETUGID_TEST";
  
-    if (setenv(envName, "1", TRUE) == -1) {
-       return TRUE; /* Conservative */
+    /*
+@@ -1062,7 +1058,9 @@ IdIsSetUGid(void)
+       return secure_getenv(envName) == NULL;
     }
-    return __secure_getenv(envName) == NULL;
+    return TRUE;
 -#endif
 +#else
 +   /* Android does not have a secure_getenv, so be conservative. */
index 9de17af2e0e89094a68cb6ca7f0ef870246dcc87..e4935b186ed26cb8cdf55d2b1f67462a6aa05f6a 100644 (file)
@@ -40,7 +40,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
  #include "unicodeOperations.h"
 --- a/lib/include/asyncsocket.h
 +++ b/lib/include/asyncsocket.h
-@@ -171,7 +171,7 @@ typedef struct AsyncSocket AsyncSocket;
+@@ -175,7 +175,7 @@ typedef struct AsyncSocket AsyncSocket;
   * Or the client can specify its favorite poll class and locking behavior.
   * Use of IVmdbPoll is only supported for regular sockets and for Attach.
   */
index 6681586a9b12510031338096e505112193995fc9..b63a1081f3494be89fce6f6a1c0f47c5f554fcf2 100644 (file)
@@ -38,7 +38,7 @@
  #include <stdlib.h>
  #include <stdio.h>
  #include <unistd.h>
-@@ -2573,7 +2574,7 @@ HgfsStatToFileAttr(struct stat *stats,
+@@ -2566,7 +2567,7 @@ HgfsStatToFileAttr(struct stat *stats,
  #      define FMTTIMET "l"
  #   endif
  #else
@@ -47,7 +47,7 @@
  #endif
     LOG(4, "access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n"
         "attr: %"FMTTIMET"d/%"FMT64"u\n",
-@@ -5301,7 +5302,7 @@ HgfsWriteCheckIORange(off_t offset,
+@@ -5294,7 +5295,7 @@ HgfsWriteCheckIORange(off_t offset,
        goto exit;
     }
  
diff --git a/utils/pax-utils/Config.in b/utils/pax-utils/Config.in
new file mode 100644 (file)
index 0000000..06958c7
--- /dev/null
@@ -0,0 +1,4 @@
+config PAX_UTILS_SECCOMP
+       depends on PACKAGE_pax-utils
+       bool "build with support for seccomp"
+       default n
diff --git a/utils/pax-utils/Makefile b/utils/pax-utils/Makefile
new file mode 100644 (file)
index 0000000..d44a5da
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2019 Daniel Engberg <daniel.engberg.lists@pyret.net>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pax-utils
+PKG_VERSION:=1.3.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://dev.gentoo.org/~sam/distfiles/app-misc/pax-utils/
+PKG_HASH:=108362d29668d25cf7b0cadc63b15a4c1cfc0dbc71adc151b33c5fe7dece939a
+
+PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/meson.mk
+
+define Package/pax-utils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=ELF utils for security relevant property checking
+  URL:=https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities
+  DEPENDS:=+libcap
+endef
+
+define Package/pax-utils/description
+  A suite of ELF tools to aid auditing systems. Contains various
+  ELF related utils for ELF32, ELF64 binaries useful for displaying
+  PaX and security info on a large groups of binary files.
+endef
+
+define Package/pax-utils/config
+  source "$(SOURCE)/Config.in"
+endef
+
+MESON_ARGS += \
+       -Dlddtree_implementation=sh \
+       -Duse_seccomp=$(if $(CONFIG_PAX_UTILS_SECCOMP),true,false)
+
+define Package/pax-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{dumpelf,lddtree,pspax,scanelf,scanmacho,symtree} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,pax-utils))
index fe449bc2d8bb8f03ffd804044d665f6b9cd61367..56658540f99f2fe6f2eab9add65dd44c39c2003b 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ripgrep
 PKG_VERSION:=13.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/BurntSushi/ripgrep/tar.gz/$(PKG_VERSION)?
@@ -18,12 +18,10 @@ PKG_LICENSE_FILES:=LICENSE-MIT UNLICENSE
 
 PKG_BUILD_DEPENDS:=rust/host
 
-include ../../lang/rust/rust-package.mk
-include $(INCLUDE_DIR)/package.mk
+RUST_PKG_FEATURES:=pcre2
 
-define Build/Compile
-       $(call Build/Compile/Cargo,, --features 'pcre2')
-endef
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/rust/rust-package.mk
 
 define Package/ripgrep
   SECTION:=utils
@@ -38,9 +36,5 @@ define Package/ripgrep/description
   while respecting your gitignore
 endef
 
-define Package/ripgrep/install
-       $(INSTALL_DIR) $(1)/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/stripped/rg $(1)/bin/rg
-endef
-
+$(eval $(call RustBinPackage,ripgrep))
 $(eval $(call BuildPackage,ripgrep))
index 8b1b2eb8bd3cb87e3b7c597ff380f7aef8c9cf3f..2e6d3f915d04147179793bd6577a759fcecc9882 100644 (file)
@@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=setools
 PKG_VERSION:=4.4.0
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/SELinuxProject/setools/releases/download/$(PKG_VERSION)
 PKG_HASH:=f3786677e40b7f16a226f48f233dcf835e700739614a7dbed2ff61cc9607814e
 PKG_BUILD_DIR:=$(BUILD_DIR)/setools
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython # Cython>=0.27
+PKG_BUILD_DEPENDS:=python-cython/host # Cython>=0.27
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
index 1964aa3a76d41e4bf73efc6aa27ddc2d76aa2035..04628bc35fd419b4a37257203a419e78538ed897 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squashfs-tools
-PKG_VERSION:=4.5.1
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=4.6.1
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
@@ -18,7 +18,7 @@ PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/plougher/squashfs-tools/tar.gz/${PKG_VERSION}?
-PKG_HASH:=277b6e7f75a4a57f72191295ae62766a10d627a4f5e5f19eadfbc861378deea7
+PKG_HASH:=94201754b36121a9f022a190c75f718441df15402df32c2b520ca331a107511c
 
 PKG_BUILD_PARALLEL:=1
 include $(INCLUDE_DIR)/package.mk
@@ -52,9 +52,6 @@ endef
 
 Build/Configure:=
 
-MAKE_FLAGS += \
-       XATTR_SUPPORT=
-
 ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
 MAKE_FLAGS += XZ_SUPPORT=1
 endif
index 97e86c846feb5800ce7a2fdc1e22174e2073fc6e..248468a86dbca3658ddd7d6fe22589f957e3ab1c 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stress-ng
-PKG_VERSION:=0.15.03
+PKG_VERSION:=0.15.06
 PKG_RELEASE:=1
 
 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:=7cceca64da37fd3c8db7167ed386fd7d3e1d9d6891a1f6227911ab8d4b17379c
+PKG_HASH:=c38cefcf0a83f6c65aed7c36e57a9a1ee8373418ef71cf089a75b0661dcd4623
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=GPL-2.0-only
index af1882901c3c57697440ff98828c1a490bdb5224..4fc4941e0c585ee2a9ee09bef93fe9e05bf092a9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.config
 +++ b/Makefile.config
-@@ -272,7 +272,7 @@ LD_GOLD:
+@@ -264,7 +264,7 @@ clean:
  libraries: \
        configdir \
        LIB_AIO LIB_APPARMOR LIB_BSD LIB_CRYPT LIB_DL \
index 5c01764cd7411d3896fae09c68d4a8e44e748f6d..d24e6f0625d1840e6c22f472298529432652b7ba 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.config
 +++ b/Makefile.config
-@@ -274,7 +274,7 @@ libraries: \
+@@ -266,7 +266,7 @@ libraries: \
        LIB_AIO LIB_APPARMOR LIB_BSD LIB_CRYPT LIB_DL \
        LIB_IPSEC_MB LIB_JPEG \
        LIB_JUDY LIB_KMOD LIB_MD LIB_PTHREAD LIB_PTHREAD_SPINLOCK \
index 03378e196bc935fea768aaf9aa2e231299893d1c..ecd128f52f4413bcc491437a0df29c43a5e8360b 100644 (file)
@@ -20,6 +20,7 @@ PKG_LICENSE_FILES:=LICENSE
 
 PKG_HOST_ONLY:=1
 HOST_BUILD_PARALLEL:=1
+HOST_BUILD_DEPENDS:=pcre2/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -33,7 +34,7 @@ define Package/swig
 endef
 
 HOST_CONFIGURE_ARGS += \
-       --without-pcre
+       --with-pcre
 
 define Package/swig/description
   tool that generates bindings for various languages
index 9feb2e93cc7353a039dd8b25b74d174d3eea455f..ecd21ad7d5f66934591e30f8dc67aa6fa813ffd4 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syncthing
-PKG_VERSION:=1.23.0
+PKG_VERSION:=1.23.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)
-PKG_HASH:=0f66d3dd2a7915a6f3ca6773c1dc02345444b2644a533211ce1ee57b371ae458
+PKG_HASH:=3d0eca0e6f4eaaeba4879918b3f54f47d59fb5f4288a83af821d509271ada189
 
 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)
 
index fe989b798128286cec6e4640f9d4625159d3fb4c..3d26b1f527c89d14ad92dd7b6ce9cb3e7f792ec2 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xz
-PKG_VERSION:=5.4.1
+PKG_VERSION:=5.4.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/lzmautils
-PKG_HASH:=dd172acb53867a68012f94c17389401b2f274a1aa5ae8f84cbfb8b7e383ea8d3
+PKG_HASH:=aa49909cbd9028c4666a35fa4975f9a6203ed98154fbb8223ee43ef9ceee97c3
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=Public-Domain LGPL-2.1-or-later GPL-2.0-or-later GPL-3.0-or-later
index 78f71a0563dffdf62da55c4a1427cd44cfd123fd..4349a9898db10e4cc5cb0e2c73085c60cc81b836 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=yq
-PKG_VERSION:=4.31.2
+PKG_VERSION:=4.33.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mikefarah/yq/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=82d5ef2ab01bc5065e7efe671d92fb82e53f41dc67b04cab6c3b22fd144bd009
+PKG_HASH:=eea0435bef57a4523dbbe3680fafc321d821986a49a92af69b0c637a428d454d
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 PKG_LICENSE:=MIT
index 251a1cd08fa663789a4ddeb9abf82736367964e0..7608fcef6562452c3ca850571b761b0e95e567a7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2022 OpenWrt.org
+# Copyright (C) 2007-2023 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zoneinfo
-PKG_VERSION:=2022g
+PKG_VERSION:=2023c
 PKG_RELEASE:=1
 
 #As i couldn't find real license used "Public Domain"
@@ -19,14 +19,14 @@ PKG_LICENSE:=Public Domain
 PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
 PKG_SOURCE_CODE:=tzcode$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_HASH:=4491db8281ae94a84d939e427bdd83dc389f26764d27d9a5c52d782c16764478
+PKG_HASH:=3f510b5d1b4ae9bb38e485aa302a776b317fb3637bdb6404c4adf7b6cadd965c
 
 include $(INCLUDE_DIR)/package.mk
 
 define Download/tzcode
    FILE=$(PKG_SOURCE_CODE)
    URL=$(PKG_SOURCE_URL)
-   HASH:=9610bb0b9656ff404c361a41f3286da53064b5469d84f00c9cb2314c8614da74
+   HASH:=46d17f2bb19ad73290f03a203006152e0fa0d7b11e5b71467c4a823811b214e7
 endef
 
 $(eval $(call Download,tzcode))